From lede-commits at lists.infradead.org  Mon Apr  1 02:17:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 01 Apr 2024 05:17:04 -0400
Subject: [openwrt/openwrt]  qca-ssdk: rework make to allow parallel building
In-Reply-To: <171196302498.2122696.15727880482929603603@git-01.infra.openwrt.org>
References: <171196302498.2122696.15727880482929603603@git-01.infra.openwrt.org>
Message-ID: <mailman.22149.1711963032.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/00f8c86624a7d61010a7455e882fa3221187bd87

commit 00f8c86624a7d61010a7455e882fa3221187bd87
Author: Sean Khan <datapronix at protonmail.com>
AuthorDate: Tue Mar 26 19:40:21 2024 -0400

    qca-ssdk: rework make to allow parallel building
    
    The current build procedure always wipes away build files, this is
    costly as ssdk is a parent dependency on a whole host of packages and
    will always end up rebuilding (and in serial) the whole package.
    
    This patch includes:
    
    1. Module Building Optimization: Instead of creating a temporary
    directory (temp) and copying files into it for module building,
    the directly invoke the module build command with the
    necessary paths. This simplifies the build process
    and avoids unnecessary file operations, speeding up
    the build process and reducing disk usage.
    
    2. Parallel Build Support: By removing the explicit creation of
    the temporary directory and associated file copying operations,
    and passing in $(MAKE) $(PKG_JOBS) allows building in parallel.
    
    3. Fix `EXTRA_CFLAGS`: This variable is referenced and set within MAKE_FLAGS,
    so doesn't preserve spaces. Should have its defined value quoted.
    
    Signed-off-by: Sean Khan <datapronix at protonmail.com>
---
 package/kernel/qca-ssdk/Makefile                   | 12 ++++--
 .../patches/200-allow-parallel-build.patch         | 50 ++++++++++++++++++++++
 2 files changed, 59 insertions(+), 3 deletions(-)

diff --git a/package/kernel/qca-ssdk/Makefile b/package/kernel/qca-ssdk/Makefile
index cd81aeb61c..8d49ec9e3b 100644
--- a/package/kernel/qca-ssdk/Makefile
+++ b/package/kernel/qca-ssdk/Makefile
@@ -10,6 +10,7 @@ PKG_SOURCE_VERSION:=23a5aa4a4d5834da7a07efb58baebfbee91786b0
 PKG_MIRROR_HASH:=2310cdad1ebc424c534aa3a2c71e72e0ab3635295653a88d17dfc64c402cd151
 
 PKG_FLAGS:=nonshared
+PKG_BUILD_PARALLEL:=1
 PKG_BUILD_FLAGS:=no-lto
 
 include $(INCLUDE_DIR)/kernel.mk
@@ -21,7 +22,7 @@ define KernelPackage/qca-ssdk
   SUBMENU:=Network Devices
   TITLE:=Qualcom SSDK switch driver
   DEPENDS:=@(TARGET_qualcommax)
-  FILES:=$(PKG_BUILD_DIR)/build/bin/qca-ssdk.ko
+  FILES:=$(PKG_BUILD_DIR)/qca-ssdk.ko
   AUTOLOAD:=$(call AutoLoad,30,qca-ssdk)
 endef
 
@@ -31,7 +32,7 @@ endef
 
 GCC_VERSION=$(shell echo "$(CONFIG_GCC_VERSION)" | sed 's/[^0-9.]*\([0-9.]*\).*/\1/')
 
-LNX_CONFIG_OPTS = LNX_MAKEOPTS='$(KERNEL_MAKEOPTS)' MODULE_TYPE=KSLIB modules
+LNX_CONFIG_OPTS = LNX_MAKEOPTS='$(KERNEL_MAKEOPTS)' PRJ_PATH=$(PKG_BUILD_DIR) MODULE_TYPE=KSLIB modules
 
 MAKE_FLAGS+= \
 	TARGET_NAME=$(CONFIG_TARGET_NAME) \
@@ -42,7 +43,7 @@ MAKE_FLAGS+= \
 	ARCH=$(LINUX_KARCH) \
 	TARGET_SUFFIX=$(CONFIG_TARGET_SUFFIX) \
 	GCC_VERSION=$(GCC_VERSION) \
-	EXTRA_CFLAGS=-fno-stack-protector -I$(STAGING_DIR)/usr/include \
+	EXTRA_CFLAGS="-fno-stack-protector -I$(STAGING_DIR)/usr/include" \
 	SoC=$(CONFIG_TARGET_SUBTARGET) \
 	PTP_FEATURE=disable SWCONFIG_FEATURE=disable \
 	ISISC_ENABLE=disable IN_QCA803X_PHY=FALSE \
@@ -57,6 +58,11 @@ ifeq ($(CONFIG_TARGET_SUBTARGET), "ipq60xx")
     MAKE_FLAGS+= CHIP_TYPE=CPPE
 endif
 
+
+define Build/Compile
+	+$(MAKE) $(PKG_JOBS) $(MAKE_FLAGS) -C $(PKG_BUILD_DIR) $(LNX_CONFIG_OPTS)
+endef
+
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include/qca-ssdk
 	$(INSTALL_DIR) $(1)/usr/include/qca-ssdk/api
diff --git a/package/kernel/qca-ssdk/patches/200-allow-parallel-build.patch b/package/kernel/qca-ssdk/patches/200-allow-parallel-build.patch
new file mode 100644
index 0000000000..5635c2fdcf
--- /dev/null
+++ b/package/kernel/qca-ssdk/patches/200-allow-parallel-build.patch
@@ -0,0 +1,50 @@
+--- a/Makefile
++++ b/Makefile
+@@ -1,17 +1,19 @@
+-include ./config
+-
+ ifndef PRJ_PATH
+   PRJ_PATH=$(shell pwd)
+ endif
+ export PRJ_PATH
+ 
+-include ./make/config.mk
+-include ./make/tools.mk
+-include ./make/$(OS)_opt.mk
++include $(PRJ_PATH)/config
++
++include $(PRJ_PATH)/make/config.mk
++include $(PRJ_PATH)/make/tools.mk
++include $(PRJ_PATH)/make/$(OS)_opt.mk
+ 
+ SUB_DIR=$(patsubst %/, %, $(dir $(wildcard src/*/Makefile)))
+ SUB_LIB=$(subst src/, , $(SUB_DIR))
+ 
++include $(PRJ_PATH)/Makefile.modules
++
+ ####################################################################
+ # 			SSDK-Style Makefile
+ ####################################################################
+@@ -27,11 +29,7 @@ all: $(BIN_DIR) kslib
+ # 			LNX Modules-Style Makefile
+ ####################################################################
+ modules: $(BIN_DIR) kslib_c
+-	mkdir -p ./temp/;cp * ./temp -a;cd ./temp;cp ../Makefile.modules ./Makefile;
+-	make -C $(SYS_PATH) M=$(PRJ_PATH)/temp $(LNX_MAKEOPTS) modules
+-	cp $(PRJ_PATH)/temp/Module.symvers $(PRJ_PATH)/Module.symvers;
+-	cp temp/*.ko build/bin;
+-	rm -Rf ./temp/*.o ./temp/*.ko ./temp/*.a
++	@$(MAKE) -C $(SYS_PATH) M=$(PRJ_PATH) $(LNX_MAKEOPTS) modules
+ 	@echo "---Build [SSDK-$(VERSION)] at $(BUILD_DATE) finished."
+ 
+ kslib_c:
+--- a/make/linux_opt.mk
++++ b/make/linux_opt.mk
+@@ -777,6 +777,6 @@ LOCAL_CFLAGS += $(CPU_CFLAG) -D"KBUILD_M
+ ####################################################################
+ # 			cflags for LNX Modules-Style Makefile
+ ####################################################################
+-LNX_LOCAL_CFLAGS += $(MODULE_INC) $(MODULE_CFLAG) ${EXTRA_INC} -DFALLTHROUGH
++LNX_LOCAL_CFLAGS = $(MODULE_INC) $(MODULE_CFLAG) ${EXTRA_INC} -DFALLTHROUGH
+ export LNX_LOCAL_CFLAGS
+ 



From lede-commits at lists.infradead.org  Mon Apr  1 04:39:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 01 Apr 2024 07:39:42 -0400
Subject: [openwrt/openwrt]  generic: 6.1: refresh backport patches
In-Reply-To: <171197158283.2399735.14290035533217244897@git-01.infra.openwrt.org>
References: <171197158283.2399735.14290035533217244897@git-01.infra.openwrt.org>
Message-ID: <mailman.22161.1711971593.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5aa63c2b85ee3e0d0e6ede58ef5a6dc68de02393

commit 5aa63c2b85ee3e0d0e6ede58ef5a6dc68de02393
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Mon Apr 1 10:44:17 2024 +0200

    generic: 6.1: refresh backport patches
    
    Refresh backport patches for kernel 6.1.82 with make target/linux/refresh.
    
    Fixes: 06cdc07f8cc7 ("ath79: add support for Huawei AP5030DN")
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../backport-6.1/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/generic/backport-6.1/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch b/target/linux/generic/backport-6.1/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch
index 8d88d46955..64d1b160d3 100644
--- a/target/linux/generic/backport-6.1/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch
+++ b/target/linux/generic/backport-6.1/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch
@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/phy/broadcom.c
 +++ b/drivers/net/phy/broadcom.c
-@@ -941,6 +941,8 @@ static struct phy_driver broadcom_driver
+@@ -942,6 +942,8 @@ static struct phy_driver broadcom_driver
  	.config_intr	= bcm_phy_config_intr,
  	.handle_interrupt = bcm_phy_handle_interrupt,
  	.link_change_notify	= bcm54xx_link_change_notify,



From lede-commits at lists.infradead.org  Mon Apr  1 09:47:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 01 Apr 2024 12:47:03 -0400
Subject: [openwrt/openwrt]  README: replace "MacOSX" with "macOS"
In-Reply-To: <171199002355.2813044.7022637496139683321@git-01.infra.openwrt.org>
References: <171199002355.2813044.7022637496139683321@git-01.infra.openwrt.org>
Message-ID: <mailman.22231.1711990035.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3e3e1b8bab94d5eb162604d4c198b426761598d7

commit 3e3e1b8bab94d5eb162604d4c198b426761598d7
Author: Gentry Deng <me at gend.moe>
AuthorDate: Sun Mar 31 21:42:12 2024 +0800

    README: replace "MacOSX" with "macOS"
    
    In October 2018, the last version of the operating system named "Mac OS X" ended its life cycle.
    
    It's time to change it to "macOS".
    
    Signed-off-by: Gentry Deng <me at gend.moe>
---
 README.md | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/README.md b/README.md
index 8bca0ee7b0..9141b2392d 100644
--- a/README.md
+++ b/README.md
@@ -31,7 +31,7 @@ An advanced user may require additional or specific package. (Toolchain, SDK, ..
 
 ## Development
 
-To build your own firmware you need a GNU/Linux, BSD or MacOSX system (case
+To build your own firmware you need a GNU/Linux, BSD or macOS system (case
 sensitive filesystem required). Cygwin is unsupported because of the lack of a
 case sensitive file system.
 



From lede-commits at lists.infradead.org  Mon Apr  1 10:44:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 01 Apr 2024 13:44:49 -0400
Subject: [openwrt/openwrt]  qca-nss-dp: cp instead of symlink for
 `nss_dp_arch.h`
In-Reply-To: <171199348940.2873996.723529137391253964@git-01.infra.openwrt.org>
References: <171199348940.2873996.723529137391253964@git-01.infra.openwrt.org>
Message-ID: <mailman.22240.1711993494.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a0962e8c0435c5511059206c40dbab9dc522767c

commit a0962e8c0435c5511059206c40dbab9dc522767c
Author: Sean Khan <datapronix at protonmail.com>
AuthorDate: Sun Mar 31 22:03:22 2024 -0400

    qca-nss-dp: cp instead of symlink for `nss_dp_arch.h`
    
    Build files shouldn't be symlinked into the staging directory, as doing so
    would create a race condition if the build folder for 'qca-nss-dp' gets
    deleted for any reason.
    
    We should instead just copy over the required platform file to avoid
    breaking compilation for any dependent packages.
    
    Signed-off-by: Sean Khan <datapronix at protonmail.com>
---
 package/kernel/qca-nss-dp/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/qca-nss-dp/Makefile b/package/kernel/qca-nss-dp/Makefile
index e17446d236..167a9af4e4 100644
--- a/package/kernel/qca-nss-dp/Makefile
+++ b/package/kernel/qca-nss-dp/Makefile
@@ -39,7 +39,7 @@ EXTRA_CFLAGS+= \
 
 NSS_DP_HAL_DIR:=$(PKG_BUILD_DIR)/hal
 define Build/Configure
-	$(LN) $(NSS_DP_HAL_DIR)/soc_ops/$(CONFIG_TARGET_SUBTARGET)/nss_$(CONFIG_TARGET_SUBTARGET).h \
+	$(CP) $(NSS_DP_HAL_DIR)/soc_ops/$(CONFIG_TARGET_SUBTARGET)/nss_$(CONFIG_TARGET_SUBTARGET).h \
 		$(PKG_BUILD_DIR)/exports/nss_dp_arch.h
 endef
 



From lede-commits at lists.infradead.org  Tue Apr  2 02:10:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 05:10:36 -0400
Subject: [openwrt/openwrt]  toolchain/gcc: fix build errors on macOS with
 Xcode 15.3
In-Reply-To: <171204903632.4140916.13210315751782345012@git-01.infra.openwrt.org>
References: <171204903632.4140916.13210315751782345012@git-01.infra.openwrt.org>
Message-ID: <mailman.22418.1712049045.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/631014d9b097b533920d3dbf120218ab735716cc

commit 631014d9b097b533920d3dbf120218ab735716cc
Author: Georgi Valkov <gvalkov at gmail.com>
AuthorDate: Sat Mar 30 22:10:27 2024 +0200

    toolchain/gcc: fix build errors on macOS with Xcode 15.3
    
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__locale:550:5: error: '__abi_tag__' attribute only applies to structs, variables, functions, and namespaces
        _LIBCPP_INLINE_VISIBILITY
        ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:891:37: note: expanded from macro '_LIBCPP_INLINE_VISIBILITY'
     #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
                                        ^
    /Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk/usr/include/c++/v1/__config:870:26: note: expanded from macro '_LIBCPP_HIDE_FROM_ABI'
              __attribute__((__abi_tag__(_LIBCPP_TOSTRING(_LIBCPP_ODR_SIGNATURE))))
    
    Fixed using backport of upstream commits [1-2] as discussed here
    https://gcc.gnu.org/bugzilla/show_bug.cgi?id=111632#c21
    
    [1] Include safe-ctype.h after C++ standard headers, to avoid over-poisoning
    https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=9970b576b7e4ae337af1268395ff221348c4b34a
    
    [2] libcc1: fix <vector> include
    https://gcc.gnu.org/git/?p=gcc.git;a=commit;h=5213047b1d50af63dfabb5e5649821a6cb157e33
    
    Signed-off-by: Georgi Valkov <gvalkov at gmail.com>
---
 ...e-ctype.h-after-C-standard-headers-to-avo.patch | 139 +++++++++++++++++++++
 ...e-ctype.h-after-C-standard-headers-to-avo.patch | 139 +++++++++++++++++++++
 .../021-libcc1-fix-vector-include.patch            |  65 ++++++++++
 ...e-ctype.h-after-C-standard-headers-to-avo.patch | 139 +++++++++++++++++++++
 .../021-libcc1-fix-vector-include.patch            |  65 ++++++++++
 5 files changed, 547 insertions(+)

diff --git a/toolchain/gcc/patches-11.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch b/toolchain/gcc/patches-11.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
new file mode 100644
index 0000000000..a17c56b272
--- /dev/null
+++ b/toolchain/gcc/patches-11.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
@@ -0,0 +1,139 @@
+From 9970b576b7e4ae337af1268395ff221348c4b34a Mon Sep 17 00:00:00 2001
+From: Francois-Xavier Coudert <fxcoudert at gcc.gnu.org>
+Date: Thu, 7 Mar 2024 14:36:03 +0100
+Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid
+ over-poisoning
+
+When building gcc's C++ sources against recent libc++, the poisoning of
+the ctype macros due to including safe-ctype.h before including C++
+standard headers such as <list>, <map>, etc, causes many compilation
+errors, similar to:
+
+  In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+  In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+  In file included from /usr/include/c++/v1/vector:321:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_bool.h:20:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_integral.h:32:
+  In file included from /usr/include/c++/v1/locale:202:
+  /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
+  only applies to structs, variables, functions, and namespaces
+    546 |     _LIBCPP_INLINE_VISIBILITY
+        |     ^
+  /usr/include/c++/v1/__config:813:37: note: expanded from macro
+  '_LIBCPP_INLINE_VISIBILITY'
+    813 | #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
+        |                                     ^
+  /usr/include/c++/v1/__config:792:26: note: expanded from macro
+  '_LIBCPP_HIDE_FROM_ABI'
+    792 |
+    __attribute__((__abi_tag__(_LIBCPP_TOSTRING(
+  _LIBCPP_VERSIONED_IDENTIFIER))))
+        |                          ^
+  In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+  In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+  In file included from /usr/include/c++/v1/vector:321:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_bool.h:20:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_integral.h:32:
+  In file included from /usr/include/c++/v1/locale:202:
+  /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
+  declaration list
+    547 |     char_type toupper(char_type __c) const
+        |                                     ^
+  /usr/include/c++/v1/__locale:553:48: error: too many arguments
+  provided to function-like macro invocation
+    553 |     const char_type* toupper(char_type* __low, const
+    char_type* __high) const
+        |                                                ^
+  /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
+  macro 'toupper' defined here
+    146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
+        |         ^
+
+This is because libc++ uses different transitive includes than
+libstdc++, and some of those transitive includes pull in various ctype
+declarations (typically via <locale>).
+
+There was already a special case for including <string> before
+safe-ctype.h, so move the rest of the C++ standard header includes to
+the same location, to fix the problem.
+
+gcc/ChangeLog:
+
+	* system.h: Include safe-ctype.h after C++ standard headers.
+
+Signed-off-by: Dimitry Andric <dimitry at andric.com>
+---
+ gcc/system.h | 39 ++++++++++++++++++---------------------
+ 1 file changed, 18 insertions(+), 21 deletions(-)
+
+diff --git a/gcc/system.h b/gcc/system.h
+index b0edab02885..ab29fc19776 100644
+--- a/gcc/system.h
++++ b/gcc/system.h
+@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
+ #undef fread_unlocked
+ #undef fwrite_unlocked
+ 
+-/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
+-   the ctype macros through safe-ctype.h */
+-
+-#ifdef __cplusplus
+-#ifdef INCLUDE_STRING
+-# include <string>
+-#endif
+-#endif
+-
+-/* There are an extraordinary number of issues with <ctype.h>.
+-   The last straw is that it varies with the locale.  Use libiberty's
+-   replacement instead.  */
+-#include "safe-ctype.h"
+-
+-#include <sys/types.h>
+-
+-#include <errno.h>
+-
+-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
+-extern int errno;
+-#endif
++/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
++   poisoning the ctype macros through safe-ctype.h */
+ 
+ #ifdef __cplusplus
+ #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
+@@ -229,6 +210,9 @@ extern int errno;
+ #ifdef INCLUDE_SET
+ # include <set>
+ #endif
++#ifdef INCLUDE_STRING
++# include <string>
++#endif
+ #ifdef INCLUDE_VECTOR
+ # include <vector>
+ #endif
+@@ -244,6 +228,19 @@ extern int errno;
+ # include <type_traits>
+ #endif
+ 
++/* There are an extraordinary number of issues with <ctype.h>.
++   The last straw is that it varies with the locale.  Use libiberty's
++   replacement instead.  */
++#include "safe-ctype.h"
++
++#include <sys/types.h>
++
++#include <errno.h>
++
++#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
++extern int errno;
++#endif
++
+ /* Some of glibc's string inlines cause warnings.  Plus we'd rather
+    rely on (and therefore test) GCC's string builtins.  */
+ #define __NO_STRING_INLINES
+-- 
+2.39.3
+
diff --git a/toolchain/gcc/patches-12.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch b/toolchain/gcc/patches-12.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
new file mode 100644
index 0000000000..986d19057f
--- /dev/null
+++ b/toolchain/gcc/patches-12.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
@@ -0,0 +1,139 @@
+From 9970b576b7e4ae337af1268395ff221348c4b34a Mon Sep 17 00:00:00 2001
+From: Francois-Xavier Coudert <fxcoudert at gcc.gnu.org>
+Date: Thu, 7 Mar 2024 14:36:03 +0100
+Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid
+ over-poisoning
+
+When building gcc's C++ sources against recent libc++, the poisoning of
+the ctype macros due to including safe-ctype.h before including C++
+standard headers such as <list>, <map>, etc, causes many compilation
+errors, similar to:
+
+  In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+  In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+  In file included from /usr/include/c++/v1/vector:321:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_bool.h:20:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_integral.h:32:
+  In file included from /usr/include/c++/v1/locale:202:
+  /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
+  only applies to structs, variables, functions, and namespaces
+    546 |     _LIBCPP_INLINE_VISIBILITY
+        |     ^
+  /usr/include/c++/v1/__config:813:37: note: expanded from macro
+  '_LIBCPP_INLINE_VISIBILITY'
+    813 | #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
+        |                                     ^
+  /usr/include/c++/v1/__config:792:26: note: expanded from macro
+  '_LIBCPP_HIDE_FROM_ABI'
+    792 |
+    __attribute__((__abi_tag__(_LIBCPP_TOSTRING(
+  _LIBCPP_VERSIONED_IDENTIFIER))))
+        |                          ^
+  In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+  In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+  In file included from /usr/include/c++/v1/vector:321:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_bool.h:20:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_integral.h:32:
+  In file included from /usr/include/c++/v1/locale:202:
+  /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
+  declaration list
+    547 |     char_type toupper(char_type __c) const
+        |                                     ^
+  /usr/include/c++/v1/__locale:553:48: error: too many arguments
+  provided to function-like macro invocation
+    553 |     const char_type* toupper(char_type* __low, const
+    char_type* __high) const
+        |                                                ^
+  /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
+  macro 'toupper' defined here
+    146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
+        |         ^
+
+This is because libc++ uses different transitive includes than
+libstdc++, and some of those transitive includes pull in various ctype
+declarations (typically via <locale>).
+
+There was already a special case for including <string> before
+safe-ctype.h, so move the rest of the C++ standard header includes to
+the same location, to fix the problem.
+
+gcc/ChangeLog:
+
+	* system.h: Include safe-ctype.h after C++ standard headers.
+
+Signed-off-by: Dimitry Andric <dimitry at andric.com>
+---
+ gcc/system.h | 39 ++++++++++++++++++---------------------
+ 1 file changed, 18 insertions(+), 21 deletions(-)
+
+diff --git a/gcc/system.h b/gcc/system.h
+index b0edab02885..ab29fc19776 100644
+--- a/gcc/system.h
++++ b/gcc/system.h
+@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
+ #undef fread_unlocked
+ #undef fwrite_unlocked
+ 
+-/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
+-   the ctype macros through safe-ctype.h */
+-
+-#ifdef __cplusplus
+-#ifdef INCLUDE_STRING
+-# include <string>
+-#endif
+-#endif
+-
+-/* There are an extraordinary number of issues with <ctype.h>.
+-   The last straw is that it varies with the locale.  Use libiberty's
+-   replacement instead.  */
+-#include "safe-ctype.h"
+-
+-#include <sys/types.h>
+-
+-#include <errno.h>
+-
+-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
+-extern int errno;
+-#endif
++/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
++   poisoning the ctype macros through safe-ctype.h */
+ 
+ #ifdef __cplusplus
+ #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
+@@ -229,6 +210,9 @@ extern int errno;
+ #ifdef INCLUDE_SET
+ # include <set>
+ #endif
++#ifdef INCLUDE_STRING
++# include <string>
++#endif
+ #ifdef INCLUDE_VECTOR
+ # include <vector>
+ #endif
+@@ -245,6 +229,19 @@ extern int errno;
+ # include <type_traits>
+ #endif
+ 
++/* There are an extraordinary number of issues with <ctype.h>.
++   The last straw is that it varies with the locale.  Use libiberty's
++   replacement instead.  */
++#include "safe-ctype.h"
++
++#include <sys/types.h>
++
++#include <errno.h>
++
++#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
++extern int errno;
++#endif
++
+ /* Some of glibc's string inlines cause warnings.  Plus we'd rather
+    rely on (and therefore test) GCC's string builtins.  */
+ #define __NO_STRING_INLINES
+-- 
+2.39.3
+
diff --git a/toolchain/gcc/patches-12.x/021-libcc1-fix-vector-include.patch b/toolchain/gcc/patches-12.x/021-libcc1-fix-vector-include.patch
new file mode 100644
index 0000000000..b6b15cd1c6
--- /dev/null
+++ b/toolchain/gcc/patches-12.x/021-libcc1-fix-vector-include.patch
@@ -0,0 +1,65 @@
+From 5213047b1d50af63dfabb5e5649821a6cb157e33 Mon Sep 17 00:00:00 2001
+From: Francois-Xavier Coudert <fxcoudert at gcc.gnu.org>
+Date: Sat, 16 Mar 2024 09:50:00 +0100
+Subject: [PATCH] libcc1: fix <vector> include
+
+Use INCLUDE_VECTOR before including system.h, instead of directly
+including <vector>, to avoid running into poisoned identifiers.
+
+Signed-off-by: Dimitry Andric <dimitry at andric.com>
+
+libcc1/ChangeLog:
+
+	PR middle-end/111632
+	* libcc1plugin.cc: Fix include.
+	* libcp1plugin.cc: Fix include.
+---
+ libcc1/libcc1plugin.cc | 3 +--
+ libcc1/libcp1plugin.cc | 3 +--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
+index 72d17c3b81c..e64847466f4 100644
+--- a/libcc1/libcc1plugin.cc
++++ b/libcc1/libcc1plugin.cc
+@@ -32,6 +32,7 @@
+ #undef PACKAGE_VERSION
+ 
+ #define INCLUDE_MEMORY
++#define INCLUDE_VECTOR
+ #include "gcc-plugin.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -69,8 +70,6 @@
+ #include "gcc-c-interface.h"
+ #include "context.hh"
+ 
+-#include <vector>
+-
+ using namespace cc1_plugin;
+ 
+ 

+diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
+index 0eff7c68d29..da68c5d0ac1 100644
+--- a/libcc1/libcp1plugin.cc
++++ b/libcc1/libcp1plugin.cc
+@@ -33,6 +33,7 @@
+ #undef PACKAGE_VERSION
+ 
+ #define INCLUDE_MEMORY
++#define INCLUDE_VECTOR
+ #include "gcc-plugin.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -71,8 +72,6 @@
+ #include "rpc.hh"
+ #include "context.hh"
+ 
+-#include <vector>
+-
+ using namespace cc1_plugin;
+ 
+ 

+-- 
+2.39.3
+
diff --git a/toolchain/gcc/patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch b/toolchain/gcc/patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
new file mode 100644
index 0000000000..986d19057f
--- /dev/null
+++ b/toolchain/gcc/patches-13.x/020-Include-safe-ctype.h-after-C-standard-headers-to-avo.patch
@@ -0,0 +1,139 @@
+From 9970b576b7e4ae337af1268395ff221348c4b34a Mon Sep 17 00:00:00 2001
+From: Francois-Xavier Coudert <fxcoudert at gcc.gnu.org>
+Date: Thu, 7 Mar 2024 14:36:03 +0100
+Subject: [PATCH] Include safe-ctype.h after C++ standard headers, to avoid
+ over-poisoning
+
+When building gcc's C++ sources against recent libc++, the poisoning of
+the ctype macros due to including safe-ctype.h before including C++
+standard headers such as <list>, <map>, etc, causes many compilation
+errors, similar to:
+
+  In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+  In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+  In file included from /usr/include/c++/v1/vector:321:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_bool.h:20:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_integral.h:32:
+  In file included from /usr/include/c++/v1/locale:202:
+  /usr/include/c++/v1/__locale:546:5: error: '__abi_tag__' attribute
+  only applies to structs, variables, functions, and namespaces
+    546 |     _LIBCPP_INLINE_VISIBILITY
+        |     ^
+  /usr/include/c++/v1/__config:813:37: note: expanded from macro
+  '_LIBCPP_INLINE_VISIBILITY'
+    813 | #  define _LIBCPP_INLINE_VISIBILITY _LIBCPP_HIDE_FROM_ABI
+        |                                     ^
+  /usr/include/c++/v1/__config:792:26: note: expanded from macro
+  '_LIBCPP_HIDE_FROM_ABI'
+    792 |
+    __attribute__((__abi_tag__(_LIBCPP_TOSTRING(
+  _LIBCPP_VERSIONED_IDENTIFIER))))
+        |                          ^
+  In file included from /home/dim/src/gcc/master/gcc/gensupport.cc:23:
+  In file included from /home/dim/src/gcc/master/gcc/system.h:233:
+  In file included from /usr/include/c++/v1/vector:321:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_bool.h:20:
+  In file included from
+  /usr/include/c++/v1/__format/formatter_integral.h:32:
+  In file included from /usr/include/c++/v1/locale:202:
+  /usr/include/c++/v1/__locale:547:37: error: expected ';' at end of
+  declaration list
+    547 |     char_type toupper(char_type __c) const
+        |                                     ^
+  /usr/include/c++/v1/__locale:553:48: error: too many arguments
+  provided to function-like macro invocation
+    553 |     const char_type* toupper(char_type* __low, const
+    char_type* __high) const
+        |                                                ^
+  /home/dim/src/gcc/master/gcc/../include/safe-ctype.h:146:9: note:
+  macro 'toupper' defined here
+    146 | #define toupper(c) do_not_use_toupper_with_safe_ctype
+        |         ^
+
+This is because libc++ uses different transitive includes than
+libstdc++, and some of those transitive includes pull in various ctype
+declarations (typically via <locale>).
+
+There was already a special case for including <string> before
+safe-ctype.h, so move the rest of the C++ standard header includes to
+the same location, to fix the problem.
+
+gcc/ChangeLog:
+
+	* system.h: Include safe-ctype.h after C++ standard headers.
+
+Signed-off-by: Dimitry Andric <dimitry at andric.com>
+---
+ gcc/system.h | 39 ++++++++++++++++++---------------------
+ 1 file changed, 18 insertions(+), 21 deletions(-)
+
+diff --git a/gcc/system.h b/gcc/system.h
+index b0edab02885..ab29fc19776 100644
+--- a/gcc/system.h
++++ b/gcc/system.h
+@@ -194,27 +194,8 @@ extern int fprintf_unlocked (FILE *, const char *, ...);
+ #undef fread_unlocked
+ #undef fwrite_unlocked
+ 
+-/* Include <string> before "safe-ctype.h" to avoid GCC poisoning
+-   the ctype macros through safe-ctype.h */
+-
+-#ifdef __cplusplus
+-#ifdef INCLUDE_STRING
+-# include <string>
+-#endif
+-#endif
+-
+-/* There are an extraordinary number of issues with <ctype.h>.
+-   The last straw is that it varies with the locale.  Use libiberty's
+-   replacement instead.  */
+-#include "safe-ctype.h"
+-
+-#include <sys/types.h>
+-
+-#include <errno.h>
+-
+-#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
+-extern int errno;
+-#endif
++/* Include C++ standard headers before "safe-ctype.h" to avoid GCC
++   poisoning the ctype macros through safe-ctype.h */
+ 
+ #ifdef __cplusplus
+ #if defined (INCLUDE_ALGORITHM) || !defined (HAVE_SWAP_IN_UTILITY)
+@@ -229,6 +210,9 @@ extern int errno;
+ #ifdef INCLUDE_SET
+ # include <set>
+ #endif
++#ifdef INCLUDE_STRING
++# include <string>
++#endif
+ #ifdef INCLUDE_VECTOR
+ # include <vector>
+ #endif
+@@ -245,6 +229,19 @@ extern int errno;
+ # include <type_traits>
+ #endif
+ 
++/* There are an extraordinary number of issues with <ctype.h>.
++   The last straw is that it varies with the locale.  Use libiberty's
++   replacement instead.  */
++#include "safe-ctype.h"
++
++#include <sys/types.h>
++
++#include <errno.h>
++
++#if !defined (errno) && defined (HAVE_DECL_ERRNO) && !HAVE_DECL_ERRNO
++extern int errno;
++#endif
++
+ /* Some of glibc's string inlines cause warnings.  Plus we'd rather
+    rely on (and therefore test) GCC's string builtins.  */
+ #define __NO_STRING_INLINES
+-- 
+2.39.3
+
diff --git a/toolchain/gcc/patches-13.x/021-libcc1-fix-vector-include.patch b/toolchain/gcc/patches-13.x/021-libcc1-fix-vector-include.patch
new file mode 100644
index 0000000000..b6b15cd1c6
--- /dev/null
+++ b/toolchain/gcc/patches-13.x/021-libcc1-fix-vector-include.patch
@@ -0,0 +1,65 @@
+From 5213047b1d50af63dfabb5e5649821a6cb157e33 Mon Sep 17 00:00:00 2001
+From: Francois-Xavier Coudert <fxcoudert at gcc.gnu.org>
+Date: Sat, 16 Mar 2024 09:50:00 +0100
+Subject: [PATCH] libcc1: fix <vector> include
+
+Use INCLUDE_VECTOR before including system.h, instead of directly
+including <vector>, to avoid running into poisoned identifiers.
+
+Signed-off-by: Dimitry Andric <dimitry at andric.com>
+
+libcc1/ChangeLog:
+
+	PR middle-end/111632
+	* libcc1plugin.cc: Fix include.
+	* libcp1plugin.cc: Fix include.
+---
+ libcc1/libcc1plugin.cc | 3 +--
+ libcc1/libcp1plugin.cc | 3 +--
+ 2 files changed, 2 insertions(+), 4 deletions(-)
+
+diff --git a/libcc1/libcc1plugin.cc b/libcc1/libcc1plugin.cc
+index 72d17c3b81c..e64847466f4 100644
+--- a/libcc1/libcc1plugin.cc
++++ b/libcc1/libcc1plugin.cc
+@@ -32,6 +32,7 @@
+ #undef PACKAGE_VERSION
+ 
+ #define INCLUDE_MEMORY
++#define INCLUDE_VECTOR
+ #include "gcc-plugin.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -69,8 +70,6 @@
+ #include "gcc-c-interface.h"
+ #include "context.hh"
+ 
+-#include <vector>
+-
+ using namespace cc1_plugin;
+ 
+ 

+diff --git a/libcc1/libcp1plugin.cc b/libcc1/libcp1plugin.cc
+index 0eff7c68d29..da68c5d0ac1 100644
+--- a/libcc1/libcp1plugin.cc
++++ b/libcc1/libcp1plugin.cc
+@@ -33,6 +33,7 @@
+ #undef PACKAGE_VERSION
+ 
+ #define INCLUDE_MEMORY
++#define INCLUDE_VECTOR
+ #include "gcc-plugin.h"
+ #include "system.h"
+ #include "coretypes.h"
+@@ -71,8 +72,6 @@
+ #include "rpc.hh"
+ #include "context.hh"
+ 
+-#include <vector>
+-
+ using namespace cc1_plugin;
+ 
+ 

+-- 
+2.39.3
+



From lede-commits at lists.infradead.org  Tue Apr  2 07:19:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 10:19:54 -0400
Subject: [openwrt/openwrt]  zstd: update to 1.5.6
In-Reply-To: <171206759415.510858.2133507949368321416@git-01.infra.openwrt.org>
References: <171206759415.510858.2133507949368321416@git-01.infra.openwrt.org>
Message-ID: <mailman.22590.1712067599.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/004c8530193891f451b92095e26f09345fc308ec

commit 004c8530193891f451b92095e26f09345fc308ec
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Tue Apr 2 13:18:50 2024 +0200

    zstd: update to 1.5.6
    
    Full changelog here:
    https://github.com/facebook/zstd/releases/tag/v1.5.6
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 tools/zstd/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index 4d46a5f950..41dd70b7a9 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -1,11 +1,11 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=zstd
-PKG_VERSION:=1.5.5
+PKG_VERSION:=1.5.6
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/facebook/zstd/releases/download/v$(PKG_VERSION)
-PKG_HASH:=9c4396cc829cfae319a6e2615202e82aad41372073482fce286fac78646d3ee4
+PKG_HASH:=8c29e06cf42aacc1eafc4077ae2ec6c6fcb96a626157e0593d5e82a34fd403c1
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE



From lede-commits at lists.infradead.org  Tue Apr  2 09:35:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 12:35:58 -0400
Subject: [openwrt/openwrt]  procd: update to Git HEAD (2024-03-30)
In-Reply-To: <171207575887.754381.14357762659058808336@git-01.infra.openwrt.org>
References: <171207575887.754381.14357762659058808336@git-01.infra.openwrt.org>
Message-ID: <mailman.22647.1712075766.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d1eb0bec390a3bb77c3b3f5f792469a780578bbf

commit d1eb0bec390a3bb77c3b3f5f792469a780578bbf
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue Apr 2 10:27:21 2024 +0200

    procd: update to Git HEAD (2024-03-30)
    
    254810d16cf1 watchdog: always close fd on watchdog stop
    946552a7b598 trace: use standard POSIX header for basename()
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/system/procd/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index 662b03f2f0..af16724999 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_MIRROR_HASH:=b324cca5b9870c73f3b1c21547ca061acef6e7acb2488244c2f5be129d3a2e6c
-PKG_SOURCE_DATE:=2024-03-25
-PKG_SOURCE_VERSION:=ca8c30208d5e1aaa2c0e3f732c4c9944735e9850
+PKG_MIRROR_HASH:=2ba058d25c7489e9d38d674878087aa5d36ffd9fe4f83bee6c88e2a0c340c757
+PKG_SOURCE_DATE:=2024-03-30
+PKG_SOURCE_VERSION:=946552a7b598a0b88db6101e864679554ec4f221
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:09 -0400
Subject: [openwrt/openwrt]  ipq40xx: 6.6: update config file with missing
 symbol
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22772.1712094665.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f632e9295137d69139860337567a38350b6a8517

commit f632e9295137d69139860337567a38350b6a8517
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:19:15 2024 +0100

    ipq40xx: 6.6: update config file with missing symbol
    
    Update config file with missing symbol added with kernel 6.6.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/config-6.6 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/target/linux/ipq40xx/config-6.6 b/target/linux/ipq40xx/config-6.6
index 866d49c66f..22101d7df0 100644
--- a/target/linux/ipq40xx/config-6.6
+++ b/target/linux/ipq40xx/config-6.6
@@ -224,11 +224,13 @@ CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
 # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
 CONFIG_IOMMU_SUPPORT=y
+# CONFIG_IOMMUFD is not set
 # CONFIG_IPQ_APSS_PLL is not set
 CONFIG_IPQ_GCC_4019=y
 # CONFIG_IPQ_GCC_6018 is not set
 # CONFIG_IPQ_GCC_806X is not set
 # CONFIG_IPQ_GCC_8074 is not set
+# CONFIG_IPQ_GCC_9574 is not set
 # CONFIG_IPQ_LCC_806X is not set
 CONFIG_IRQCHIP=y
 CONFIG_IRQSTACKS=y
@@ -362,15 +364,19 @@ CONFIG_PHYLIB=y
 CONFIG_PHYLINK=y
 # CONFIG_PHY_QCOM_APQ8064_SATA is not set
 # CONFIG_PHY_QCOM_EDP is not set
+# CONFIG_PHY_QCOM_EUSB2_REPEATER is not set
 CONFIG_PHY_QCOM_IPQ4019_USB=y
 # CONFIG_PHY_QCOM_IPQ806X_SATA is not set
 # CONFIG_PHY_QCOM_IPQ806X_USB is not set
+# CONFIG_PHY_QCOM_M31_USB is not set
 # CONFIG_PHY_QCOM_PCIE2 is not set
 # CONFIG_PHY_QCOM_QMP is not set
 # CONFIG_PHY_QCOM_QUSB2 is not set
+# CONFIG_PHY_QCOM_SNPS_EUSB2 is not set
 # CONFIG_PHY_QCOM_USB_HS_28NM is not set
 # CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2 is not set
 # CONFIG_PHY_QCOM_USB_SS is not set
+# CONFIG_PHY_QCOM_SGMII_ETH is not set
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_APQ8064 is not set
 # CONFIG_PINCTRL_APQ8084 is not set
@@ -414,6 +420,8 @@ CONFIG_QCOM_IPQ4019_ESS_EDMA=y
 # CONFIG_QCOM_LLCC is not set
 # CONFIG_QCOM_OCMEM is not set
 # CONFIG_QCOM_PDC is not set
+# CONFIG_QCOM_RAMP_CTRL is not set
+# CONFIG_QCOM_RPM_MASTER_STATS is not set
 # CONFIG_QCOM_RMTFS_MEM is not set
 # CONFIG_QCOM_RPMH is not set
 CONFIG_QCOM_SCM=y
@@ -429,6 +437,7 @@ CONFIG_QCOM_WDT=y
 # CONFIG_QCS_GCC_404 is not set
 # CONFIG_QCS_Q6SSTOP_404 is not set
 # CONFIG_QCS_TURING_404 is not set
+# CONFIG_QDU_GCC_1000 is not set
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
 CONFIG_RATIONAL=y
@@ -452,6 +461,8 @@ CONFIG_RTC_CLASS=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_MC146818_LIB=y
 CONFIG_RWSEM_SPIN_ON_OWNER=y
+# CONFIG_SA_GCC_8775P is not set
+# CONFIG_SA_GPUCC_8775P is not set
 # CONFIG_SC_CAMCC_7280 is not set
 # CONFIG_SC_DISPCC_7180 is not set
 # CONFIG_SC_GCC_7180 is not set
@@ -470,6 +481,8 @@ CONFIG_RWSEM_SPIN_ON_OWNER=y
 # CONFIG_SDM_LPASSCC_845 is not set
 # CONFIG_SDM_VIDEOCC_845 is not set
 # CONFIG_SDX_GCC_65 is not set
+# CONFIG_SDX_GCC_75 is not set
+# CONFIG_SM_GCC_7150 is not set
 CONFIG_SERIAL_8250_FSL=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_MSM=y



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:07 -0400
Subject: [openwrt/openwrt]  ipq806x: 6.6: add pending patch fixing mtdcore
 with MTD OTP
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22773.1712094666.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8ec76705d42766156c4185f59998c7144f815363

commit 8ec76705d42766156c4185f59998c7144f815363
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 17:08:30 2024 +0100

    ipq806x: 6.6: add pending patch fixing mtdcore with MTD OTP
    
    Add pending patch fixing mtdcore with MTD OTP with a fragile detection
    if Nand supports OTP. Patch has been sent upstream and will be backported
    to stable kernel if accepted.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...0-mtd-limit-OTP-nvmem-to-non-nand-devices.patch | 63 ++++++++++++++++++++++
 1 file changed, 63 insertions(+)

diff --git a/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch b/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch
new file mode 100644
index 0000000000..80fd20318b
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch
@@ -0,0 +1,63 @@
+From 540dcef6f39d6356d2a65230a8d4e9738ee2d25b Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 20 Mar 2024 16:43:01 +0100
+Subject: [PATCH] mtd: limit OTP nvmem to non nand devices
+
+MTD OTP logic is very fragile and can be problematic with some specific
+kind of devices.
+
+NVMEM across the years had various iteration on how Cells could be
+declared in DT and MTD OTP probably was left behind and
+add_legacy_fixed_of_cells was enabled without thinking of the consequences.
+
+That option enables NVMEM to scan the provided of_node and treat each
+child as a NVMEM Cell, this was to support legacy NVMEM implementation
+and don't cause regression.
+
+This is problematic if we have devices like Nand where the OTP is
+triggered by setting a special mode in the flash. In this context real
+partitions declared in the Nand node are registered as OTP Cells and
+this cause probe fail with -EINVAL error.
+
+This was never notice due to the fact that till now, no Nand supported
+the OTP feature. With commit e87161321a40 ("mtd: rawnand: macronix: OTP
+access for MX30LFxG18AC") this changed and coincidentally this Nand is
+used on an FritzBox 7530 supported on OpenWrt.
+
+Alternative and more robust way to declare OTP Cells are already
+prossible by using the fixed-layout node or by declaring a child node
+with the compatible set to "otp-user" or "otp-factory".
+
+To fix this and limit any regression with other MTD that makes use of
+declaring OTP as direct child of the dev node, disable
+add_legacy_fixed_of_cells if we have a node called nand since it's the
+standard property name to identify Nand devices attached to a Nand
+Controller.
+
+With the following logic, the OTP NVMEM entry is correctly created with
+no Cells and the MTD Nand is correctly probed and partitions are
+correctly exposed.
+
+Fixes: 2cc3b37f5b6d ("nvmem: add explicit config option to read old syntax fixed OF cells")
+Cc: <stable at vger.kernel.org>
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/mtd/mtdcore.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
+index 5887feb347a4..6872477a5129 100644
+--- a/drivers/mtd/mtdcore.c
++++ b/drivers/mtd/mtdcore.c
+@@ -900,7 +900,7 @@ static struct nvmem_device *mtd_otp_nvmem_register(struct mtd_info *mtd,
+ 	config.name = compatible;
+ 	config.id = NVMEM_DEVID_AUTO;
+ 	config.owner = THIS_MODULE;
+-	config.add_legacy_fixed_of_cells = true;
++	config.add_legacy_fixed_of_cells = !of_node_name_eq(mtd->dev.of_node, "nand");
+ 	config.type = NVMEM_TYPE_OTP;
+ 	config.root_only = true;
+ 	config.ignore_wp = true;
+-- 
+2.43.0
+



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:02 -0400
Subject: [openwrt/openwrt]  kernel/ipq40xx: Restore kernel files for v6.1
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22774.1712094670.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2265413bbf4e49f2961ef9daac8637c0ec0075c4

commit 2265413bbf4e49f2961ef9daac8637c0ec0075c4
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:09:07 2024 +0100

    kernel/ipq40xx: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/config-6.1                    |  540 ++++++
 ...-clock-qcom-ipq4019-add-missing-networkin.patch |   30 +
 ...gcc-ipq4019-add-missing-networking-resets.patch |   30 +
 ...firmware-qcom_scm-disable-SDI-if-required.patch |   83 +
 ...100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch |   24 +
 .../104-clk-fix-apss-cpu-overclocking.patch        |  115 ++
 ...1-arm-compressed-add-appended-DTB-section.patch |   48 +
 ...ressed-set-ipq40xx-watchdog-to-allow-boot.patch |   66 +
 ...dhci-msm-use-sdhci_set_clock-instead-of-s.patch |   24 +
 ...ci-msm-comment-unused-sdhci_msm_set_clock.patch |  108 ++
 ...rmware-qcom-scm-fix-SCM-cold-boot-address.patch |  138 ++
 ...wnand-add-support-for-Toshiba-TC58NVG0S3H.patch |   29 +
 ...qess-introduce-the-Qualcomm-IPQESS-driver.patch | 2025 ++++++++++++++++++++
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |  238 +++
 ...pqess-Add-out-of-band-DSA-tagging-support.patch |  173 ++
 ...m-ipqess-release-IRQ-s-on-network-device-.patch |   75 +
 ...mm-ipqess-enable-threaded-NAPI-by-default.patch |   49 +
 ...m-ipq4019-Add-description-for-the-IPQESS-.patch |   78 +
 ...qca8k-add-IPQ4019-built-in-switch-support.patch | 1132 +++++++++++
 .../707-arm-dts-ipq4019-add-switch-node.patch      |   98 +
 ...com-ipq4019-add-QCA8075-PHY-Package-nodes.patch |   67 +
 .../710-arm-dts-ipq4019-QCA807x-properties.patch   |   25 +
 ...net-qualcomm-ipqess-fix-TX-timeout-errors.patch |   64 +
 .../patches-6.1/850-soc-add-qualcomm-syscon.patch  |  175 ++
 ...ware-qcom_scm-Clear-download-bit-during-r.patch |   27 +
 .../ipq40xx/patches-6.1/998-lantiq-atm-hacks.patch |   43 +
 .../999-atm-mpoa-intel-dsl-phy-support.patch       |  137 ++
 27 files changed, 5641 insertions(+)

diff --git a/target/linux/ipq40xx/config-6.1 b/target/linux/ipq40xx/config-6.1
new file mode 100644
index 0000000000..f14dd0a474
--- /dev/null
+++ b/target/linux/ipq40xx/config-6.1
@@ -0,0 +1,540 @@
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_APQ_GCC_8084 is not set
+# CONFIG_APQ_MMCC_8084 is not set
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_IPQ40XX=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+# CONFIG_ARCH_MDM9615 is not set
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+# CONFIG_ARCH_MSM8909 is not set
+# CONFIG_ARCH_MSM8916 is not set
+# CONFIG_ARCH_MSM8960 is not set
+# CONFIG_ARCH_MSM8974 is not set
+# CONFIG_ARCH_MSM8X60 is not set
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_QCOM=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+# CONFIG_ARM_ATAG_DTB_COMPAT is not set
+CONFIG_ARM_CPUIDLE=y
+# CONFIG_ARM_CPU_TOPOLOGY is not set
+CONFIG_ARM_GIC=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_QCOM_CPUFREQ_HW is not set
+# CONFIG_ARM_QCOM_CPUFREQ_NVMEM is not set
+# CONFIG_ARM_QCOM_SPM_CPUIDLE is not set
+# CONFIG_ARM_SMMU is not set
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_AT803X_PHY=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BCH=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BOUNCE=y
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CLKSRC_QCOM=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE_PARTITION=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_QCOM=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_CPUFREQ_DT_PLATDEV=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FREQ=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+CONFIG_CPU_FREQ_GOV_COMMON=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THERMAL=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CRC8=y
+CONFIG_CRYPTO_AES_ARM=y
+CONFIG_CRYPTO_AES_ARM_BS=y
+CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y
+CONFIG_CRYPTO_BLAKE2S_ARM=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CRYPTD=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_DEV_QCE=y
+# CONFIG_CRYPTO_DEV_QCE_ENABLE_AEAD is not set
+# CONFIG_CRYPTO_DEV_QCE_ENABLE_ALL is not set
+# CONFIG_CRYPTO_DEV_QCE_ENABLE_SHA is not set
+CONFIG_CRYPTO_DEV_QCE_ENABLE_SKCIPHER=y
+CONFIG_CRYPTO_DEV_QCE_SKCIPHER=y
+CONFIG_CRYPTO_DEV_QCE_SW_MAX_LEN=512
+CONFIG_CRYPTO_DEV_QCOM_RNG=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_LIB_DES=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RNG_DEFAULT=y
+CONFIG_CRYPTO_SEQIV=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA256_ARM=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_SIMD=y
+CONFIG_CRYPTO_XTS=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DEBUG_MISC=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DTC=y
+CONFIG_DT_IDLE_STATES=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_EXTCON=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_74X164=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_WATCHDOG=y
+CONFIG_GPIO_WATCHDOG_ARCH_INITCALL=y
+CONFIG_GRO_CELLS=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HAVE_SMP=y
+CONFIG_HIGHMEM=y
+# CONFIG_HIGHPTE is not set
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_QCOM=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_OPTEE=y
+CONFIG_HZ_FIXED=0
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+# CONFIG_I2C_QCOM_CCI is not set
+CONFIG_I2C_QUP=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
+# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
+CONFIG_IOMMU_SUPPORT=y
+# CONFIG_IPQ_APSS_PLL is not set
+CONFIG_IPQ_GCC_4019=y
+# CONFIG_IPQ_GCC_6018 is not set
+# CONFIG_IPQ_GCC_806X is not set
+# CONFIG_IPQ_GCC_8074 is not set
+# CONFIG_IPQ_LCC_806X is not set
+CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_KMAP_LOCAL=y
+CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
+# CONFIG_KPSS_XCC is not set
+# CONFIG_KRAITCC is not set
+CONFIG_LED_TRIGGER_PHY=y
+CONFIG_LEDS_LP5523=y
+CONFIG_LEDS_LP5562=y
+CONFIG_LEDS_LP55XX_COMMON=y
+CONFIG_LEDS_TLC591XX=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MDIO_GPIO=y
+CONFIG_MDIO_IPQ4019=y
+# CONFIG_MDM_GCC_9615 is not set
+# CONFIG_MDM_LCC_9615 is not set
+CONFIG_MEMFD_CREATE=y
+# CONFIG_MFD_HI6421_SPMI is not set
+# CONFIG_MFD_QCOM_RPM is not set
+# CONFIG_MFD_SPMI_PMIC is not set
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_CQHCI=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_IO_ACCESSORS=y
+CONFIG_MMC_SDHCI_MSM=y
+# CONFIG_MMC_SDHCI_PCI is not set
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MSM_GCC_8660 is not set
+# CONFIG_MSM_GCC_8909 is not set
+# CONFIG_MSM_GCC_8916 is not set
+# CONFIG_MSM_GCC_8939 is not set
+# CONFIG_MSM_GCC_8960 is not set
+# CONFIG_MSM_GCC_8974 is not set
+# CONFIG_MSM_GCC_8976 is not set
+# CONFIG_MSM_GCC_8994 is not set
+# CONFIG_MSM_GCC_8996 is not set
+# CONFIG_MSM_GCC_8998 is not set
+# CONFIG_MSM_GPUCC_8998 is not set
+# CONFIG_MSM_LCC_8960 is not set
+# CONFIG_MSM_MMCC_8960 is not set
+# CONFIG_MSM_MMCC_8974 is not set
+# CONFIG_MSM_MMCC_8996 is not set
+# CONFIG_MSM_MMCC_8998 is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_ECC_SW_BCH=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+CONFIG_MTD_NAND_QCOM=y
+# CONFIG_MTD_QCOMSMEM_PARTS is not set
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_SPLIT_WRGG_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEON=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_QCA8K_IPQ4019=y
+CONFIG_NET_DSA_TAG_OOB=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NLS=y
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=4
+CONFIG_NVMEM=y
+CONFIG_NVMEM_QCOM_QFPROM=y
+# CONFIG_NVMEM_QCOM_SEC_QFPROM is not set
+# CONFIG_NVMEM_SPMI_SDAM is not set
+CONFIG_NVMEM_SYSFS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OPTEE=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_DW=y
+CONFIG_PCIE_DW_HOST=y
+CONFIG_PCIE_QCOM=y
+CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+# CONFIG_PHY_QCOM_APQ8064_SATA is not set
+# CONFIG_PHY_QCOM_EDP is not set
+CONFIG_PHY_QCOM_IPQ4019_USB=y
+# CONFIG_PHY_QCOM_IPQ806X_SATA is not set
+# CONFIG_PHY_QCOM_IPQ806X_USB is not set
+# CONFIG_PHY_QCOM_PCIE2 is not set
+# CONFIG_PHY_QCOM_QMP is not set
+# CONFIG_PHY_QCOM_QUSB2 is not set
+# CONFIG_PHY_QCOM_USB_HS_28NM is not set
+# CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2 is not set
+# CONFIG_PHY_QCOM_USB_SS is not set
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_APQ8064 is not set
+# CONFIG_PINCTRL_APQ8084 is not set
+CONFIG_PINCTRL_IPQ4019=y
+# CONFIG_PINCTRL_IPQ8064 is not set
+# CONFIG_PINCTRL_MDM9615 is not set
+CONFIG_PINCTRL_MSM=y
+# CONFIG_PINCTRL_MSM8226 is not set
+# CONFIG_PINCTRL_MSM8660 is not set
+# CONFIG_PINCTRL_MSM8909 is not set
+# CONFIG_PINCTRL_MSM8916 is not set
+# CONFIG_PINCTRL_MSM8960 is not set
+# CONFIG_PINCTRL_QCOM_SPMI_PMIC is not set
+# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set
+# CONFIG_PINCTRL_SDX65 is not set
+CONFIG_PM_OPP=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO_RESTART=y
+CONFIG_POWER_RESET_MSM=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PRINTK_TIME=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_QCA807X_PHY=y
+# CONFIG_QCM_DISPCC_2290 is not set
+# CONFIG_QCM_GCC_2290 is not set
+CONFIG_QCOM_A53PLL=y
+# CONFIG_QCOM_ADM is not set
+CONFIG_QCOM_BAM_DMA=y
+# CONFIG_QCOM_COMMAND_DB is not set
+# CONFIG_QCOM_CPR is not set
+# CONFIG_QCOM_EBI2 is not set
+# CONFIG_QCOM_GENI_SE is not set
+# CONFIG_QCOM_GSBI is not set
+# CONFIG_QCOM_HFPLL is not set
+# CONFIG_QCOM_ICC_BWMON is not set
+# CONFIG_QCOM_IOMMU is not set
+CONFIG_QCOM_IPQ4019_ESS_EDMA=y
+# CONFIG_QCOM_LLCC is not set
+# CONFIG_QCOM_OCMEM is not set
+# CONFIG_QCOM_PDC is not set
+# CONFIG_QCOM_RMTFS_MEM is not set
+# CONFIG_QCOM_RPMH is not set
+CONFIG_QCOM_SCM=y
+# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
+CONFIG_QCOM_SMEM=y
+# CONFIG_QCOM_SMSM is not set
+# CONFIG_QCOM_SOCINFO is not set
+# CONFIG_QCOM_SPM is not set
+# CONFIG_QCOM_STATS is not set
+CONFIG_QCOM_TCSR=y
+# CONFIG_QCOM_TSENS is not set
+CONFIG_QCOM_WDT=y
+# CONFIG_QCS_GCC_404 is not set
+# CONFIG_QCS_Q6SSTOP_404 is not set
+# CONFIG_QCS_TURING_404 is not set
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+# CONFIG_REGULATOR_QCOM_LABIBB is not set
+# CONFIG_REGULATOR_QCOM_SPMI is not set
+# CONFIG_REGULATOR_QCOM_USB_VBUS is not set
+CONFIG_REGULATOR_VCTRL=y
+CONFIG_REGULATOR_VQMMC_IPQ4019=y
+CONFIG_RESET_CONTROLLER=y
+# CONFIG_RESET_QCOM_AOSS is not set
+# CONFIG_RESET_QCOM_PDC is not set
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+# CONFIG_RTC_DRV_OPTEE is not set
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+# CONFIG_SC_CAMCC_7280 is not set
+# CONFIG_SC_DISPCC_7180 is not set
+# CONFIG_SC_GCC_7180 is not set
+# CONFIG_SC_GCC_8280XP is not set
+# CONFIG_SC_GPUCC_7180 is not set
+# CONFIG_SC_LPASSCC_7280 is not set
+# CONFIG_SC_LPASS_CORECC_7180 is not set
+# CONFIG_SC_LPASS_CORECC_7280 is not set
+# CONFIG_SC_MSS_7180 is not set
+# CONFIG_SC_VIDEOCC_7180 is not set
+# CONFIG_SDM_CAMCC_845 is not set
+# CONFIG_SDM_DISPCC_845 is not set
+# CONFIG_SDM_GCC_660 is not set
+# CONFIG_SDM_GCC_845 is not set
+# CONFIG_SDM_GPUCC_845 is not set
+# CONFIG_SDM_LPASSCC_845 is not set
+# CONFIG_SDM_VIDEOCC_845 is not set
+# CONFIG_SDX_GCC_65 is not set
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_MSM=y
+CONFIG_SERIAL_MSM_CONSOLE=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SKB_EXTENSIONS=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+# CONFIG_SM_CAMCC_8450 is not set
+# CONFIG_SM_GCC_8150 is not set
+# CONFIG_SM_GCC_8250 is not set
+# CONFIG_SM_GCC_8450 is not set
+# CONFIG_SM_GPUCC_6350 is not set
+# CONFIG_SM_GPUCC_8150 is not set
+# CONFIG_SM_GPUCC_8250 is not set
+# CONFIG_SM_GPUCC_8350 is not set
+# CONFIG_SM_VIDEOCC_8150 is not set
+# CONFIG_SM_VIDEOCC_8250 is not set
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_QUP=y
+CONFIG_SPMI=y
+# CONFIG_SPMI_HISI3670 is not set
+CONFIG_SPMI_MSM_PMIC_ARB=y
+# CONFIG_SPMI_PMIC_CLKDIV is not set
+CONFIG_SRCU=y
+CONFIG_SWPHY=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_TEE=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_UBIFS_FS=y
+CONFIG_UEVENT_HELPER_PATH=""
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/ipq40xx/patches-6.1/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch b/target/linux/ipq40xx/patches-6.1/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch
new file mode 100644
index 0000000000..87feaf79f8
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch
@@ -0,0 +1,30 @@
+From be59072c6eeb7535bf9a339fb9d5a8bfae17ac22 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko at sartura.hr>
+Date: Mon, 14 Aug 2023 12:40:23 +0200
+Subject: [PATCH] dt-bindings: clock: qcom: ipq4019: add missing networking
+ resets
+
+Add bindings for the missing networking resets found in IPQ4019 GCC.
+
+Signed-off-by: Robert Marko <robert.marko at sartura.hr>
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Link: https://lore.kernel.org/r/20230814104119.96858-1-robert.marko at sartura.hr
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+---
+ include/dt-bindings/clock/qcom,gcc-ipq4019.h | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/include/dt-bindings/clock/qcom,gcc-ipq4019.h
++++ b/include/dt-bindings/clock/qcom,gcc-ipq4019.h
+@@ -165,5 +165,11 @@
+ #define GCC_QDSS_BCR					69
+ #define GCC_MPM_BCR					70
+ #define GCC_SPDM_BCR					71
++#define ESS_MAC1_ARES					72
++#define ESS_MAC2_ARES					73
++#define ESS_MAC3_ARES					74
++#define ESS_MAC4_ARES					75
++#define ESS_MAC5_ARES					76
++#define ESS_PSGMII_ARES					77
+ 
+ #endif
diff --git a/target/linux/ipq40xx/patches-6.1/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch b/target/linux/ipq40xx/patches-6.1/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch
new file mode 100644
index 0000000000..70b278c803
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch
@@ -0,0 +1,30 @@
+From 20014461691efc9e274c3870357152db7f091820 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko at sartura.hr>
+Date: Mon, 14 Aug 2023 12:40:24 +0200
+Subject: [PATCH] clk: qcom: gcc-ipq4019: add missing networking resets
+
+IPQ4019 has more networking related resets that will be required for future
+wired networking support, so lets add them.
+
+Signed-off-by: Robert Marko <robert.marko at sartura.hr>
+Link: https://lore.kernel.org/r/20230814104119.96858-2-robert.marko at sartura.hr
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+---
+ drivers/clk/qcom/gcc-ipq4019.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/clk/qcom/gcc-ipq4019.c
++++ b/drivers/clk/qcom/gcc-ipq4019.c
+@@ -1707,6 +1707,12 @@ static const struct qcom_reset_map gcc_i
+ 	[GCC_TCSR_BCR] = {0x22000, 0},
+ 	[GCC_MPM_BCR] = {0x24000, 0},
+ 	[GCC_SPDM_BCR] = {0x25000, 0},
++	[ESS_MAC1_ARES] = {0x1200C, 0},
++	[ESS_MAC2_ARES] = {0x1200C, 1},
++	[ESS_MAC3_ARES] = {0x1200C, 2},
++	[ESS_MAC4_ARES] = {0x1200C, 3},
++	[ESS_MAC5_ARES] = {0x1200C, 4},
++	[ESS_PSGMII_ARES] = {0x1200C, 5},
+ };
+ 
+ static const struct regmap_config gcc_ipq4019_regmap_config = {
diff --git a/target/linux/ipq40xx/patches-6.1/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch b/target/linux/ipq40xx/patches-6.1/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch
new file mode 100644
index 0000000000..ae7e9f97c0
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch
@@ -0,0 +1,83 @@
+From ff4aa3bc98258a240b9bbab53fd8d2fb8184c485 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko at gmail.com>
+Date: Wed, 16 Aug 2023 18:45:39 +0200
+Subject: [PATCH] firmware: qcom_scm: disable SDI if required
+
+IPQ5018 has SDI (Secure Debug Image) enabled by TZ by default, and that
+means that WDT being asserted or just trying to reboot will hang the board
+in the debug mode and only pulling the power and repowering will help.
+Some IPQ4019 boards like Google WiFI have it enabled as well.
+
+Luckily, SDI can be disabled via an SCM call.
+
+So, lets use the boolean DT property to identify boards that have SDI
+enabled by default and use the SCM call to disable SDI during SCM probe.
+It is important to disable it as soon as possible as we might have a WDT
+assertion at any time which would then leave the board in debug mode,
+thus disabling it during SCM removal is not enough.
+
+Signed-off-by: Robert Marko <robimarko at gmail.com>
+Reviewed-by: Guru Das Srinagesh <quic_gurus at quicinc.com>
+Link: https://lore.kernel.org/r/20230816164641.3371878-2-robimarko at gmail.com
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+---
+ drivers/firmware/qcom_scm.c | 30 ++++++++++++++++++++++++++++++
+ drivers/firmware/qcom_scm.h |  1 +
+ 2 files changed, 31 insertions(+)
+
+--- a/drivers/firmware/qcom_scm.c
++++ b/drivers/firmware/qcom_scm.c
+@@ -407,6 +407,29 @@ int qcom_scm_set_remote_state(u32 state,
+ }
+ EXPORT_SYMBOL(qcom_scm_set_remote_state);
+ 
++static int qcom_scm_disable_sdi(void)
++{
++	int ret;
++	struct qcom_scm_desc desc = {
++		.svc = QCOM_SCM_SVC_BOOT,
++		.cmd = QCOM_SCM_BOOT_SDI_CONFIG,
++		.args[0] = 1, /* Disable watchdog debug */
++		.args[1] = 0, /* Disable SDI */
++		.arginfo = QCOM_SCM_ARGS(2),
++		.owner = ARM_SMCCC_OWNER_SIP,
++	};
++	struct qcom_scm_res res;
++
++	ret = qcom_scm_clk_enable();
++	if (ret)
++		return ret;
++	ret = qcom_scm_call(__scm->dev, &desc, &res);
++
++	qcom_scm_clk_disable();
++
++	return ret ? : res.result[0];
++}
++
+ static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
+ {
+ 	struct qcom_scm_desc desc = {
+@@ -1411,6 +1434,13 @@ static int qcom_scm_probe(struct platfor
+ 
+ 	__get_convention();
+ 
++
++	/*
++	 * Disable SDI if indicated by DT that it is enabled by default.
++	 */
++	if (of_property_read_bool(pdev->dev.of_node, "qcom,sdi-enabled"))
++		qcom_scm_disable_sdi();
++
+ 	/*
+ 	 * If requested enable "download mode", from this point on warmboot
+ 	 * will cause the boot stages to enter download mode, unless
+--- a/drivers/firmware/qcom_scm.h
++++ b/drivers/firmware/qcom_scm.h
+@@ -77,6 +77,7 @@ extern int scm_legacy_call(struct device
+ #define QCOM_SCM_SVC_BOOT		0x01
+ #define QCOM_SCM_BOOT_SET_ADDR		0x01
+ #define QCOM_SCM_BOOT_TERMINATE_PC	0x02
++#define QCOM_SCM_BOOT_SDI_CONFIG	0x09
+ #define QCOM_SCM_BOOT_SET_DLOAD_MODE	0x10
+ #define QCOM_SCM_BOOT_SET_ADDR_MC	0x11
+ #define QCOM_SCM_BOOT_SET_REMOTE_STATE	0x0a
diff --git a/target/linux/ipq40xx/patches-6.1/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch b/target/linux/ipq40xx/patches-6.1/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch
new file mode 100644
index 0000000000..8b9352e6f1
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch
@@ -0,0 +1,24 @@
+From ea9fba16d972becc84cd2a82d25030975dc609a5 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko at gmail.com>
+Date: Sat, 30 Sep 2023 13:09:27 +0200
+Subject: [PATCH] ARM: dts: qcom: ipq4019: add label to SCM
+
+Some IPQ4019 boards require SDI to be disabled by adding a property to the
+SCM node, so lets make that easy by adding a label to the SCM node.
+
+Signed-off-by: Robert Marko <robimarko at gmail.com>
+---
+ arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+@@ -155,7 +155,7 @@
+ 	};
+ 
+ 	firmware {
+-		scm {
++		scm: scm {
+ 			compatible = "qcom,scm-ipq4019", "qcom,scm";
+ 		};
+ 	};
diff --git a/target/linux/ipq40xx/patches-6.1/104-clk-fix-apss-cpu-overclocking.patch b/target/linux/ipq40xx/patches-6.1/104-clk-fix-apss-cpu-overclocking.patch
new file mode 100644
index 0000000000..2de03f7ae0
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/104-clk-fix-apss-cpu-overclocking.patch
@@ -0,0 +1,115 @@
+From f2b87dc1028b710ec8ce25808b9d21f92b376184 Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey at googlemail.com>
+Date: Sun, 11 Mar 2018 14:41:31 +0100
+Subject: [PATCH 2/2] clk: fix apss cpu overclocking
+
+There's an interaction issue between the clk changes:"
+clk: qcom: ipq4019: Add the apss cpu pll divider clock node
+clk: qcom: ipq4019: remove fixed clocks and add pll clocks
+" and the cpufreq-dt.
+
+cpufreq-dt is now spamming the kernel-log with the following:
+
+[ 1099.190658] cpu cpu0: dev_pm_opp_set_rate: failed to find current OPP
+for freq 761142857 (-34)
+
+This only happens on certain devices like the Compex WPJ428
+and AVM FritzBox!4040. However, other devices like the Asus
+RT-AC58U and Meraki MR33 work just fine.
+
+The issue stem from the fact that all higher CPU-Clocks
+are achieved by switching the clock-parent to the P_DDRPLLAPSS
+(ddrpllapss). Which is set by Qualcomm's proprietary bootcode
+as part of the DDR calibration.
+
+For example, the FB4040 uses 256 MiB Nanya NT5CC128M16IP clocked
+at round 533 MHz (ddrpllsdcc = 190285714 Hz).
+
+whereas the 128 MiB Nanya NT5CC64M16GP-DI in the ASUS RT-AC58U is
+clocked at a slightly higher 537 MHz ( ddrpllsdcc = 192000000 Hz).
+
+This patch attempts to fix the issue by modifying
+clk_cpu_div_round_rate(), clk_cpu_div_set_rate(), clk_cpu_div_recalc_rate()
+to use a new qcom_find_freq_close() function, which returns the closest
+matching frequency, instead of the next higher. This way, the SoC in
+the FB4040 (with its max clock speed of 710.4 MHz) will no longer
+try to overclock to 761 MHz.
+
+Fixes: d83dcacea18 ("clk: qcom: ipq4019: Add the apss cpu pll divider clock node")
+Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ drivers/clk/qcom/gcc-ipq4019.c | 34 +++++++++++++++++++++++++++++++---
+ 1 file changed, 31 insertions(+), 3 deletions(-)
+
+--- a/drivers/clk/qcom/gcc-ipq4019.c
++++ b/drivers/clk/qcom/gcc-ipq4019.c
+@@ -1243,6 +1243,29 @@ static const struct clk_fepll_vco gcc_fe
+ 	.reg = 0x2f020,
+ };
+ 
++
++const struct freq_tbl *qcom_find_freq_close(const struct freq_tbl *f,
++					     unsigned long rate)
++{
++	const struct freq_tbl *last = NULL;
++
++	for ( ; f->freq; f++) {
++		if (rate == f->freq)
++			return f;
++
++		if (f->freq > rate) {
++			if (!last ||
++			   (f->freq - rate) < (rate - last->freq))
++				return f;
++			else
++				return last;
++		}
++		last = f;
++	}
++
++	return last;
++}
++
+ /*
+  * Round rate function for APSS CPU PLL Clock divider.
+  * It looks up the frequency table and returns the next higher frequency
+@@ -1255,7 +1278,7 @@ static long clk_cpu_div_round_rate(struc
+ 	struct clk_hw *p_hw;
+ 	const struct freq_tbl *f;
+ 
+-	f = qcom_find_freq(pll->freq_tbl, rate);
++	f = qcom_find_freq_close(pll->freq_tbl, rate);
+ 	if (!f)
+ 		return -EINVAL;
+ 
+@@ -1277,7 +1300,7 @@ static int clk_cpu_div_set_rate(struct c
+ 	const struct freq_tbl *f;
+ 	u32 mask;
+ 
+-	f = qcom_find_freq(pll->freq_tbl, rate);
++	f = qcom_find_freq_close(pll->freq_tbl, rate);
+ 	if (!f)
+ 		return -EINVAL;
+ 
+@@ -1304,6 +1327,7 @@ static unsigned long
+ clk_cpu_div_recalc_rate(struct clk_hw *hw,
+ 			unsigned long parent_rate)
+ {
++	const struct freq_tbl *f;
+ 	struct clk_fepll *pll = to_clk_fepll(hw);
+ 	u32 cdiv, pre_div;
+ 	u64 rate;
+@@ -1324,7 +1348,11 @@ clk_cpu_div_recalc_rate(struct clk_hw *h
+ 	rate = clk_fepll_vco_calc_rate(pll, parent_rate) * 2;
+ 	do_div(rate, pre_div);
+ 
+-	return rate;
++	f = qcom_find_freq_close(pll->freq_tbl, rate);
++	if (!f)
++		return rate;
++
++	return f->freq;
+ };
+ 
+ static const struct clk_ops clk_regmap_cpu_div_ops = {
diff --git a/target/linux/ipq40xx/patches-6.1/301-arm-compressed-add-appended-DTB-section.patch b/target/linux/ipq40xx/patches-6.1/301-arm-compressed-add-appended-DTB-section.patch
new file mode 100644
index 0000000000..0448574e7e
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/301-arm-compressed-add-appended-DTB-section.patch
@@ -0,0 +1,48 @@
+From 0843a61d6913bdac8889eb048ed89f7903059787 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko at gmail.com>
+Date: Fri, 30 Oct 2020 13:36:31 +0100
+Subject: [PATCH] arm: compressed: add appended DTB section
+
+This adds a appended_dtb section to the ARM decompressor
+linker script.
+
+This allows using the existing ARM zImage appended DTB support for
+appending a DTB to the raw ELF kernel.
+
+Its size is set to 1MB max to match the zImage appended DTB size limit.
+
+To use it to pass the DTB to the kernel, objcopy is used:
+
+objcopy --set-section-flags=.appended_dtb=alloc,contents \
+	--update-section=.appended_dtb=<target>.dtb vmlinux
+
+This is based off the following patch:
+https://github.com/openwrt/openwrt/commit/c063e27e02a9dcac0e7f5877fb154e58fa3e1a69
+
+Signed-off-by: Robert Marko <robimarko at gmail.com>
+---
+ arch/arm/boot/compressed/vmlinux.lds.S | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/boot/compressed/vmlinux.lds.S
++++ b/arch/arm/boot/compressed/vmlinux.lds.S
+@@ -103,6 +103,13 @@ SECTIONS
+ 
+   _edata = .;
+ 
++  .appended_dtb : {
++    /* leave space for appended DTB */
++    . += 0x100000;
++  }
++
++  _edata_dtb = .;
++
+   /*
+    * The image_end section appears after any additional loadable sections
+    * that the linker may decide to insert in the binary image.  Having
+@@ -140,4 +147,4 @@ SECTIONS
+ 
+   ARM_ASSERTS
+ }
+-ASSERT(_edata_real == _edata, "error: zImage file size is incorrect");
++ASSERT(_edata_real == _edata_dtb, "error: zImage file size is incorrect");
diff --git a/target/linux/ipq40xx/patches-6.1/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch b/target/linux/ipq40xx/patches-6.1/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch
new file mode 100644
index 0000000000..4939c56470
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch
@@ -0,0 +1,66 @@
+From 11d6a6128a5a07c429941afc202b6e62a19771be Mon Sep 17 00:00:00 2001
+From: John Thomson <git at johnthomson.fastmail.com.au>
+Date: Fri, 23 Oct 2020 19:42:36 +1000
+Subject: [PATCH 2/2] arm: compressed: set ipq40xx watchdog to allow boot
+
+For IPQ40XX systems where the SoC watchdog is activated before linux,
+the watchdog timer may be too small for linux to finish uncompress,
+boot, and watchdog management start.
+If the watchdog is enabled, set the timeout for it to 30 seconds.
+The functionality and offsets were copied from:
+drivers/watchdog/qcom-wdt.c qcom_wdt_set_timeout & qcom_wdt_start
+The watchdog memory address was taken from:
+arch/arm/boot/dts/qcom-ipq4019.dtsi
+
+This was required on Mikrotik IPQ40XX consumer hardware using Mikrotik's
+RouterBoot bootloader.
+
+Signed-off-by: John Thomson <git at johnthomson.fastmail.com.au>
+---
+ arch/arm/boot/compressed/head.S | 35 +++++++++++++++++++++++++++++++++
+ 1 file changed, 35 insertions(+)
+
+--- a/arch/arm/boot/compressed/head.S
++++ b/arch/arm/boot/compressed/head.S
+@@ -620,6 +620,41 @@ not_relocated:	mov	r0, #0
+ 		bic	r4, r4, #1
+ 		blne	cache_on
+ 
++/* Set the Qualcom IPQ40xx watchdog timeout to 30 seconds
++ * if it is enabled, so that there is time for kernel
++ * to decompress, boot, and take over the watchdog.
++ * data and functionality from drivers/watchdog/qcom-wdt.c
++ * address from arch/arm/boot/dts/qcom-ipq4019.dtsi
++ */
++#ifdef CONFIG_ARCH_IPQ40XX
++watchdog_set:
++		/* offsets:
++		 * 0x04 reset	(=1 resets countdown)
++		 * 0x08 enable	(=0 disables)
++		 * 0x0c status	(=1 when SoC was reset by watchdog)
++		 * 0x10 bark	(=timeout warning in ticks)
++		 * 0x14 bite	(=timeout reset in ticks)
++		 * clock rate is 1<<15 hertz
++		 */
++		.equ watchdog, 0x0b017000	@Store watchdog base address
++		movw r0, #:lower16:watchdog
++		movt r0, #:upper16:watchdog
++		ldr r1, [r0, #0x08]	@Get enabled?
++		cmp r1, #1		@If not enabled, do not change
++		bne watchdog_finished
++		mov r1, #0
++		str r1, [r0, #0x08]	@Disable the watchdog
++		mov r1, #1
++		str r1, [r0, #0x04]	@Pet the watchdog
++		mov r1, #30		@30 seconds timeout
++		lsl r1, r1, #15		@converted to ticks
++		str r1, [r0, #0x10]	@Set the bark timeout
++		str r1, [r0, #0x14]	@Set the bite timeout
++		mov r1, #1
++		str r1, [r0, #0x08]	@Enable the watchdog
++watchdog_finished:
++#endif /* CONFIG_ARCH_IPQ40XX */
++
+ /*
+  * The C runtime environment should now be setup sufficiently.
+  * Set up some pointers, and start decompressing.
diff --git a/target/linux/ipq40xx/patches-6.1/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-6.1/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
new file mode 100644
index 0000000000..bf36164aed
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
@@ -0,0 +1,24 @@
+From f63ea127643a605da97090ce585fdd7c2d17fa42 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko at sartura.hr>
+Date: Mon, 14 Dec 2020 13:35:35 +0100
+Subject: [PATCH] mmc: sdhci-msm: use sdhci_set_clock
+
+When using sdhci_msm_set_clock clock setting will fail, so lets
+use the generic sdhci_set_clock.
+
+Signed-off-by: Robert Marko <robert.marko at sartura.hr>
+---
+ drivers/mmc/host/sdhci-msm.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/mmc/host/sdhci-msm.c
++++ b/drivers/mmc/host/sdhci-msm.c
+@@ -2451,7 +2451,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
+ 
+ static const struct sdhci_ops sdhci_msm_ops = {
+ 	.reset = sdhci_msm_reset,
+-	.set_clock = sdhci_msm_set_clock,
++	.set_clock = sdhci_set_clock,
+ 	.get_min_clock = sdhci_msm_get_min_clock,
+ 	.get_max_clock = sdhci_msm_get_max_clock,
+ 	.set_bus_width = sdhci_set_bus_width,
diff --git a/target/linux/ipq40xx/patches-6.1/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch b/target/linux/ipq40xx/patches-6.1/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
new file mode 100644
index 0000000000..b297600171
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
@@ -0,0 +1,108 @@
+From 28edd829133766eb3cefaf2e49d3ee701968061b Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 9 May 2023 01:57:17 +0200
+Subject: [PATCH] mmc: sdhci-msm: comment unused sdhci_msm_set_clock
+
+comment unused sdhci_msm_set_clock and __sdhci_msm_set_clock as due to some
+current problem, we are forced to use sdhci_set_clock.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/mmc/host/sdhci-msm.c | 86 ++++++++++++++++++------------------
+ 1 file changed, 43 insertions(+), 43 deletions(-)
+
+--- a/drivers/mmc/host/sdhci-msm.c
++++ b/drivers/mmc/host/sdhci-msm.c
+@@ -1751,49 +1751,49 @@ static unsigned int sdhci_msm_get_min_cl
+ 	return SDHCI_MSM_MIN_CLOCK;
+ }
+ 
+-/*
+- * __sdhci_msm_set_clock - sdhci_msm clock control.
+- *
+- * Description:
+- * MSM controller does not use internal divider and
+- * instead directly control the GCC clock as per
+- * HW recommendation.
+- **/
+-static void __sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
+-{
+-	u16 clk;
+-
+-	sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
+-
+-	if (clock == 0)
+-		return;
+-
+-	/*
+-	 * MSM controller do not use clock divider.
+-	 * Thus read SDHCI_CLOCK_CONTROL and only enable
+-	 * clock with no divider value programmed.
+-	 */
+-	clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
+-	sdhci_enable_clk(host, clk);
+-}
+-
+-/* sdhci_msm_set_clock - Called with (host->lock) spinlock held. */
+-static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
+-{
+-	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
+-	struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
+-
+-	if (!clock) {
+-		host->mmc->actual_clock = msm_host->clk_rate = 0;
+-		goto out;
+-	}
+-
+-	sdhci_msm_hc_select_mode(host);
+-
+-	msm_set_clock_rate_for_bus_mode(host, clock);
+-out:
+-	__sdhci_msm_set_clock(host, clock);
+-}
++// /*
++//  * __sdhci_msm_set_clock - sdhci_msm clock control.
++//  *
++//  * Description:
++//  * MSM controller does not use internal divider and
++//  * instead directly control the GCC clock as per
++//  * HW recommendation.
++//  **/
++// static void __sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
++// {
++// 	u16 clk;
++
++// 	sdhci_writew(host, 0, SDHCI_CLOCK_CONTROL);
++
++// 	if (clock == 0)
++// 		return;
++
++// 	/*
++// 	 * MSM controller do not use clock divider.
++// 	 * Thus read SDHCI_CLOCK_CONTROL and only enable
++// 	 * clock with no divider value programmed.
++// 	 */
++// 	clk = sdhci_readw(host, SDHCI_CLOCK_CONTROL);
++// 	sdhci_enable_clk(host, clk);
++// }
++
++// /* sdhci_msm_set_clock - Called with (host->lock) spinlock held. */
++// static void sdhci_msm_set_clock(struct sdhci_host *host, unsigned int clock)
++// {
++// 	struct sdhci_pltfm_host *pltfm_host = sdhci_priv(host);
++// 	struct sdhci_msm_host *msm_host = sdhci_pltfm_priv(pltfm_host);
++
++// 	if (!clock) {
++// 		host->mmc->actual_clock = msm_host->clk_rate = 0;
++// 		goto out;
++// 	}
++
++// 	sdhci_msm_hc_select_mode(host);
++
++// 	msm_set_clock_rate_for_bus_mode(host, clock);
++// out:
++// 	__sdhci_msm_set_clock(host, clock);
++// }
+ 
+ /*****************************************************************************\
+  *                                                                           *
diff --git a/target/linux/ipq40xx/patches-6.1/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch b/target/linux/ipq40xx/patches-6.1/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch
new file mode 100644
index 0000000000..cb06ff353c
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch
@@ -0,0 +1,138 @@
+From aaa675f07e781e248fcf169ce9a917b48bc2cc9b Mon Sep 17 00:00:00 2001
+From: Brian Norris <computersforpeace at gmail.com>
+Date: Fri, 28 Jul 2023 12:06:23 +0200
+Subject: [PATCH 3/3] firmware: qcom: scm: fix SCM cold boot address
+
+This effectively reverts upstream Linux commit 13e77747800e ("firmware:
+qcom: scm: Use atomic SCM for cold boot"), because Google WiFi boot
+firmwares don't support the atomic variant.
+
+This fixes SMP support for Google WiFi.
+
+Signed-off-by: Brian Norris <computersforpeace at gmail.com>
+---
+ drivers/firmware/qcom_scm-legacy.c | 62 +++++++++++++++++++++++++-----
+ drivers/firmware/qcom_scm.c        | 11 ++++++
+ 2 files changed, 63 insertions(+), 10 deletions(-)
+
+--- a/drivers/firmware/qcom_scm-legacy.c
++++ b/drivers/firmware/qcom_scm-legacy.c
+@@ -13,6 +13,9 @@
+ #include <linux/arm-smccc.h>
+ #include <linux/dma-mapping.h>
+ 
++#include <asm/cacheflush.h>
++#include <asm/outercache.h>
++
+ #include "qcom_scm.h"
+ 
+ static DEFINE_MUTEX(qcom_scm_lock);
+@@ -117,6 +120,25 @@ static void __scm_legacy_do(const struct
+ 	} while (res->a0 == QCOM_SCM_INTERRUPTED);
+ }
+ 
++static void qcom_scm_inv_range(unsigned long start, unsigned long end)
++{
++	u32 cacheline_size, ctr;
++
++	asm volatile("mrc p15, 0, %0, c0, c0, 1" : "=r" (ctr));
++	cacheline_size = 4 << ((ctr >> 16) & 0xf);
++
++	start = round_down(start, cacheline_size);
++	end = round_up(end, cacheline_size);
++	outer_inv_range(start, end);
++	while (start < end) {
++		asm ("mcr p15, 0, %0, c7, c6, 1" : : "r" (start)
++		     : "memory");
++		start += cacheline_size;
++	}
++	dsb();
++	isb();
++}
++
+ /**
+  * scm_legacy_call() - Sends a command to the SCM and waits for the command to
+  * finish processing.
+@@ -163,10 +185,16 @@ int scm_legacy_call(struct device *dev,
+ 
+ 	rsp = scm_legacy_command_to_response(cmd);
+ 
+-	cmd_phys = dma_map_single(dev, cmd, alloc_len, DMA_TO_DEVICE);
+-	if (dma_mapping_error(dev, cmd_phys)) {
+-		kfree(cmd);
+-		return -ENOMEM;
++	if (dev) {
++		cmd_phys = dma_map_single(dev, cmd, alloc_len, DMA_TO_DEVICE);
++		if (dma_mapping_error(dev, cmd_phys)) {
++			kfree(cmd);
++			return -ENOMEM;
++		}
++	} else {
++		cmd_phys = virt_to_phys(cmd);
++		__cpuc_flush_dcache_area(cmd, alloc_len);
++		outer_flush_range(cmd_phys, cmd_phys + alloc_len);
+ 	}
+ 
+ 	smc.args[0] = 1;
+@@ -182,13 +210,26 @@ int scm_legacy_call(struct device *dev,
+ 		goto out;
+ 
+ 	do {
+-		dma_sync_single_for_cpu(dev, cmd_phys + sizeof(*cmd) + cmd_len,
+-					sizeof(*rsp), DMA_FROM_DEVICE);
++		if (dev) {
++			dma_sync_single_for_cpu(dev, cmd_phys + sizeof(*cmd) +
++						cmd_len, sizeof(*rsp),
++						DMA_FROM_DEVICE);
++		} else {
++			unsigned long start = (uintptr_t)cmd + sizeof(*cmd) +
++					      cmd_len;
++			qcom_scm_inv_range(start, start + sizeof(*rsp));
++		}
+ 	} while (!rsp->is_complete);
+ 
+-	dma_sync_single_for_cpu(dev, cmd_phys + sizeof(*cmd) + cmd_len +
+-				le32_to_cpu(rsp->buf_offset),
+-				resp_len, DMA_FROM_DEVICE);
++	if (dev) {
++		dma_sync_single_for_cpu(dev, cmd_phys + sizeof(*cmd) + cmd_len +
++					le32_to_cpu(rsp->buf_offset),
++					resp_len, DMA_FROM_DEVICE);
++	} else {
++		unsigned long start = (uintptr_t)cmd + sizeof(*cmd) + cmd_len +
++				      le32_to_cpu(rsp->buf_offset);
++		qcom_scm_inv_range(start, start + resp_len);
++	}
+ 
+ 	if (res) {
+ 		res_buf = scm_legacy_get_response_buffer(rsp);
+@@ -196,7 +237,8 @@ int scm_legacy_call(struct device *dev,
+ 			res->result[i] = le32_to_cpu(res_buf[i]);
+ 	}
+ out:
+-	dma_unmap_single(dev, cmd_phys, alloc_len, DMA_TO_DEVICE);
++	if (dev)
++		dma_unmap_single(dev, cmd_phys, alloc_len, DMA_TO_DEVICE);
+ 	kfree(cmd);
+ 	return ret;
+ }
+--- a/drivers/firmware/qcom_scm.c
++++ b/drivers/firmware/qcom_scm.c
+@@ -312,6 +312,17 @@ static int qcom_scm_set_boot_addr(void *
+ 	desc.args[0] = flags;
+ 	desc.args[1] = virt_to_phys(entry);
+ 
++	/*
++	 * Factory firmware doesn't support the atomic variant. Non-atomic SCMs
++	 * require ugly DMA invalidation support that was dropped upstream a
++	 * while ago. For more info, see:
++	 *
++	 *  [RFC] qcom_scm: IPQ4019 firmware does not support atomic API?
++	 *  https://lore.kernel.org/linux-arm-msm/20200913201608.GA3162100 at bDebian/
++	 */
++	if (of_machine_is_compatible("google,wifi"))
++		return qcom_scm_call(__scm ? __scm->dev : NULL, &desc, NULL);
++
+ 	return qcom_scm_call_atomic(__scm ? __scm->dev : NULL, &desc, NULL);
+ }
+ 
diff --git a/target/linux/ipq40xx/patches-6.1/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch b/target/linux/ipq40xx/patches-6.1/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch
new file mode 100644
index 0000000000..91919b2894
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch
@@ -0,0 +1,29 @@
+From 35ca7e3e6ccd120d694a3425f37fc6374ad2e11e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Andreas=20B=C3=B6hler?= <dev at aboehler.at>
+Date: Wed, 20 Apr 2022 12:08:38 +0200
+Subject: [PATCH] mtd: rawnand: add support for Toshiba TC58NVG0S3HTA00
+ NAND flash
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The Toshiba TC58NVG0S3HTA00 is detected with 64 byte OOB while the flash
+has 128 bytes OOB. This adds a static NAND ID entry to correct this.
+
+Tested on FRITZ!Box 7530 flashed with OpenWrt.
+
+Signed-off-by: Andreas B?hler <dev at aboehler.at>
+(changed id_len to 8, added comment about possible counterfeits)
+---
+--- a/drivers/mtd/nand/raw/nand_ids.c
++++ b/drivers/mtd/nand/raw/nand_ids.c
+@@ -29,6 +29,9 @@ struct nand_flash_dev nand_flash_ids[] =
+ 	{"TC58NVG0S3E 1G 3.3V 8-bit",
+ 		{ .id = {0x98, 0xd1, 0x90, 0x15, 0x76, 0x14, 0x01, 0x00} },
+ 		  SZ_2K, SZ_128, SZ_128K, 0, 8, 64, NAND_ECC_INFO(1, SZ_512), },
++	{"TC58NVG0S3HTA00 1G 3.3V 8-bit", /* possibly counterfeit chip - see commit */
++		{ .id = {0x98, 0xf1, 0x80, 0x15} }, /* should be more bytes */
++		  SZ_2K, SZ_128, SZ_128K, 0, 8, 128, NAND_ECC_INFO(8, SZ_512), },
+ 	{"TC58NVG2S0F 4G 3.3V 8-bit",
+ 		{ .id = {0x98, 0xdc, 0x90, 0x26, 0x76, 0x15, 0x01, 0x08} },
+ 		  SZ_4K, SZ_512, SZ_256K, 0, 8, 224, NAND_ECC_INFO(4, SZ_512) },
diff --git a/target/linux/ipq40xx/patches-6.1/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch b/target/linux/ipq40xx/patches-6.1/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
new file mode 100644
index 0000000000..be12bfcd21
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
@@ -0,0 +1,2025 @@
+From 76e25c1f46456416ba5358be8a0677f1ab8196b6 Mon Sep 17 00:00:00 2001
+From: Maxime Chevallier <maxime.chevallier at bootlin.com>
+Date: Fri, 4 Nov 2022 18:41:48 +0100
+Subject: [PATCH] net: ipqess: introduce the Qualcomm IPQESS driver
+
+The Qualcomm IPQESS controller is a simple 1G Ethernet controller found
+on the IPQ4019 chip. This controller has some specificities, in that the
+IPQ4019 platform that includes that controller also has an internal
+switch, based on the QCA8K IP.
+
+It is connected to that switch through an internal link, and doesn't
+expose directly any external interface, hence it only supports the
+PHY_INTERFACE_MODE_INTERNAL for now.
+
+It has 16 RX and TX queues, with a very basic RSS fanout configured at
+init time.
+
+Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
+---
+ MAINTAINERS                                   |    7 +
+ drivers/net/ethernet/qualcomm/Kconfig         |   11 +
+ drivers/net/ethernet/qualcomm/Makefile        |    2 +
+ drivers/net/ethernet/qualcomm/ipqess/Makefile |    8 +
+ drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 1246 +++++++++++++++++
+ drivers/net/ethernet/qualcomm/ipqess/ipqess.h |  518 +++++++
+ .../ethernet/qualcomm/ipqess/ipqess_ethtool.c |  164 +++
+ 7 files changed, 1956 insertions(+)
+ create mode 100644 drivers/net/ethernet/qualcomm/ipqess/Makefile
+ create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess.c
+ create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess.h
+ create mode 100644 drivers/net/ethernet/qualcomm/ipqess/ipqess_ethtool.c
+
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -17075,6 +17075,13 @@ L:	netdev at vger.kernel.org
+ S:	Maintained
+ F:	drivers/net/ethernet/qualcomm/emac/
+ 
++QUALCOMM IPQESS ETHERNET DRIVER
++M:	Maxime Chevallier <maxime.chevallier at bootlin.com>
++L:	netdev at vger.kernel.org
++S:	Maintained
++F:	Documentation/devicetree/bindings/net/qcom,ipq4019-ess-edma.yaml
++F:	drivers/net/ethernet/qualcomm/ipqess/
++
+ QUALCOMM ETHQOS ETHERNET DRIVER
+ M:	Vinod Koul <vkoul at kernel.org>
+ R:	Bhupesh Sharma <bhupesh.sharma at linaro.org>
+--- a/drivers/net/ethernet/qualcomm/Kconfig
++++ b/drivers/net/ethernet/qualcomm/Kconfig
+@@ -60,6 +60,17 @@ config QCOM_EMAC
+ 	  low power, Receive-Side Scaling (RSS), and IEEE 1588-2008
+ 	  Precision Clock Synchronization Protocol.
+ 
++config QCOM_IPQ4019_ESS_EDMA
++	tristate "Qualcomm Atheros IPQ4019 ESS EDMA support"
++	depends on (OF && ARCH_QCOM) || COMPILE_TEST
++	select PHYLINK
++	help
++	  This driver supports the Qualcomm Atheros IPQ40xx built-in
++	  ESS EDMA ethernet controller.
++
++	  To compile this driver as a module, choose M here: the
++	  module will be called ipqess.
++
+ source "drivers/net/ethernet/qualcomm/rmnet/Kconfig"
+ 
+ endif # NET_VENDOR_QUALCOMM
+--- a/drivers/net/ethernet/qualcomm/Makefile
++++ b/drivers/net/ethernet/qualcomm/Makefile
+@@ -11,4 +11,6 @@ qcauart-objs := qca_uart.o
+ 
+ obj-y += emac/
+ 
++obj-$(CONFIG_QCOM_IPQ4019_ESS_EDMA) += ipqess/
++
+ obj-$(CONFIG_RMNET) += rmnet/
+--- /dev/null
++++ b/drivers/net/ethernet/qualcomm/ipqess/Makefile
+@@ -0,0 +1,8 @@
++# SPDX-License-Identifier: GPL-2.0-only
++#
++# Makefile for the IPQ ESS driver
++#
++
++obj-$(CONFIG_QCOM_IPQ4019_ESS_EDMA) += ipq_ess.o
++
++ipq_ess-objs := ipqess.o ipqess_ethtool.o
+--- /dev/null
++++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
+@@ -0,0 +1,1246 @@
++// SPDX-License-Identifier: GPL-2.0 OR ISC
++/* Copyright (c) 2014 - 2017, The Linux Foundation. All rights reserved.
++ * Copyright (c) 2017 - 2018, John Crispin <john at phrozen.org>
++ * Copyright (c) 2018 - 2019, Christian Lamparter <chunkeey at gmail.com>
++ * Copyright (c) 2020 - 2021, Gabor Juhos <j4g8y7 at gmail.com>
++ * Copyright (c) 2021 - 2022, Maxime Chevallier <maxime.chevallier at bootlin.com>
++ *
++ */
++
++#include <linux/bitfield.h>
++#include <linux/clk.h>
++#include <linux/if_vlan.h>
++#include <linux/interrupt.h>
++#include <linux/module.h>
++#include <linux/of.h>
++#include <linux/of_device.h>
++#include <linux/of_mdio.h>
++#include <linux/of_net.h>
++#include <linux/phylink.h>
++#include <linux/platform_device.h>
++#include <linux/reset.h>
++#include <linux/skbuff.h>
++#include <linux/vmalloc.h>
++#include <net/checksum.h>
++#include <net/ip6_checksum.h>
++
++#include "ipqess.h"
++
++#define IPQESS_RRD_SIZE		16
++#define IPQESS_NEXT_IDX(X, Y)  (((X) + 1) & ((Y) - 1))
++#define IPQESS_TX_DMA_BUF_LEN	0x3fff
++
++static void ipqess_w32(struct ipqess *ess, u32 reg, u32 val)
++{
++	writel(val, ess->hw_addr + reg);
++}
++
++static u32 ipqess_r32(struct ipqess *ess, u16 reg)
++{
++	return readl(ess->hw_addr + reg);
++}
++
++static void ipqess_m32(struct ipqess *ess, u32 mask, u32 val, u16 reg)
++{
++	u32 _val = ipqess_r32(ess, reg);
++
++	_val &= ~mask;
++	_val |= val;
++
++	ipqess_w32(ess, reg, _val);
++}
++
++void ipqess_update_hw_stats(struct ipqess *ess)
++{
++	u32 *p;
++	u32 stat;
++	int i;
++
++	lockdep_assert_held(&ess->stats_lock);
++
++	p = (u32 *)&ess->ipqess_stats;
++	for (i = 0; i < IPQESS_MAX_TX_QUEUE; i++) {
++		stat = ipqess_r32(ess, IPQESS_REG_TX_STAT_PKT_Q(i));
++		*p += stat;
++		p++;
++	}
++
++	for (i = 0; i < IPQESS_MAX_TX_QUEUE; i++) {
++		stat = ipqess_r32(ess, IPQESS_REG_TX_STAT_BYTE_Q(i));
++		*p += stat;
++		p++;
++	}
++
++	for (i = 0; i < IPQESS_MAX_RX_QUEUE; i++) {
++		stat = ipqess_r32(ess, IPQESS_REG_RX_STAT_PKT_Q(i));
++		*p += stat;
++		p++;
++	}
++
++	for (i = 0; i < IPQESS_MAX_RX_QUEUE; i++) {
++		stat = ipqess_r32(ess, IPQESS_REG_RX_STAT_BYTE_Q(i));
++		*p += stat;
++		p++;
++	}
++}
++
++static int ipqess_tx_ring_alloc(struct ipqess *ess)
++{
++	struct device *dev = &ess->pdev->dev;
++	int i;
++
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		struct ipqess_tx_ring *tx_ring = &ess->tx_ring[i];
++		size_t size;
++		u32 idx;
++
++		tx_ring->ess = ess;
++		tx_ring->ring_id = i;
++		tx_ring->idx = i * 4;
++		tx_ring->count = IPQESS_TX_RING_SIZE;
++		tx_ring->nq = netdev_get_tx_queue(ess->netdev, i);
++
++		size = sizeof(struct ipqess_buf) * IPQESS_TX_RING_SIZE;
++		tx_ring->buf = devm_kzalloc(dev, size, GFP_KERNEL);
++		if (!tx_ring->buf)
++			return -ENOMEM;
++
++		size = sizeof(struct ipqess_tx_desc) * IPQESS_TX_RING_SIZE;
++		tx_ring->hw_desc = dmam_alloc_coherent(dev, size, &tx_ring->dma,
++						       GFP_KERNEL);
++		if (!tx_ring->hw_desc)
++			return -ENOMEM;
++
++		ipqess_w32(ess, IPQESS_REG_TPD_BASE_ADDR_Q(tx_ring->idx),
++			   (u32)tx_ring->dma);
++
++		idx = ipqess_r32(ess, IPQESS_REG_TPD_IDX_Q(tx_ring->idx));
++		idx >>= IPQESS_TPD_CONS_IDX_SHIFT; /* need u32 here */
++		idx &= 0xffff;
++		tx_ring->head = idx;
++		tx_ring->tail = idx;
++
++		ipqess_m32(ess, IPQESS_TPD_PROD_IDX_MASK << IPQESS_TPD_PROD_IDX_SHIFT,
++			   idx, IPQESS_REG_TPD_IDX_Q(tx_ring->idx));
++		ipqess_w32(ess, IPQESS_REG_TX_SW_CONS_IDX_Q(tx_ring->idx), idx);
++		ipqess_w32(ess, IPQESS_REG_TPD_RING_SIZE, IPQESS_TX_RING_SIZE);
++	}
++
++	return 0;
++}
++
++static int ipqess_tx_unmap_and_free(struct device *dev, struct ipqess_buf *buf)
++{
++	int len = 0;
++
++	if (buf->flags & IPQESS_DESC_SINGLE)
++		dma_unmap_single(dev, buf->dma,	buf->length, DMA_TO_DEVICE);
++	else if (buf->flags & IPQESS_DESC_PAGE)
++		dma_unmap_page(dev, buf->dma, buf->length, DMA_TO_DEVICE);
++
++	if (buf->flags & IPQESS_DESC_LAST) {
++		len = buf->skb->len;
++		dev_kfree_skb_any(buf->skb);
++	}
++
++	buf->flags = 0;
++
++	return len;
++}
++
++static void ipqess_tx_ring_free(struct ipqess *ess)
++{
++	int i;
++
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		int j;
++
++		if (ess->tx_ring[i].hw_desc)
++			continue;
++
++		for (j = 0; j < IPQESS_TX_RING_SIZE; j++) {
++			struct ipqess_buf *buf = &ess->tx_ring[i].buf[j];
++
++			ipqess_tx_unmap_and_free(&ess->pdev->dev, buf);
++		}
++
++		ess->tx_ring[i].buf = NULL;
++	}
++}
++
++static int ipqess_rx_buf_prepare(struct ipqess_buf *buf,
++				 struct ipqess_rx_ring *rx_ring)
++{
++	memset(buf->skb->data, 0, sizeof(struct ipqess_rx_desc));
++
++	buf->dma = dma_map_single(rx_ring->ppdev, buf->skb->data,
++				  IPQESS_RX_HEAD_BUFF_SIZE, DMA_FROM_DEVICE);
++	if (dma_mapping_error(rx_ring->ppdev, buf->dma)) {
++		dev_kfree_skb_any(buf->skb);
++		buf->skb = NULL;
++		return -EFAULT;
++	}
++
++	buf->length = IPQESS_RX_HEAD_BUFF_SIZE;
++	rx_ring->hw_desc[rx_ring->head] = (struct ipqess_rx_desc *)buf->dma;
++	rx_ring->head = (rx_ring->head + 1) % IPQESS_RX_RING_SIZE;
++
++	ipqess_m32(rx_ring->ess, IPQESS_RFD_PROD_IDX_BITS,
++		   (rx_ring->head + IPQESS_RX_RING_SIZE - 1) % IPQESS_RX_RING_SIZE,
++		   IPQESS_REG_RFD_IDX_Q(rx_ring->idx));
++
++	return 0;
++}
++
++/* locking is handled by the caller */
++static int ipqess_rx_buf_alloc_napi(struct ipqess_rx_ring *rx_ring)
++{
++	struct ipqess_buf *buf = &rx_ring->buf[rx_ring->head];
++
++	buf->skb = napi_alloc_skb(&rx_ring->napi_rx, IPQESS_RX_HEAD_BUFF_SIZE);
++	if (!buf->skb)
++		return -ENOMEM;
++
++	return ipqess_rx_buf_prepare(buf, rx_ring);
++}
++
++static int ipqess_rx_buf_alloc(struct ipqess_rx_ring *rx_ring)
++{
++	struct ipqess_buf *buf = &rx_ring->buf[rx_ring->head];
++
++	buf->skb = netdev_alloc_skb_ip_align(rx_ring->ess->netdev,
++					     IPQESS_RX_HEAD_BUFF_SIZE);
++
++	if (!buf->skb)
++		return -ENOMEM;
++
++	return ipqess_rx_buf_prepare(buf, rx_ring);
++}
++
++static void ipqess_refill_work(struct work_struct *work)
++{
++	struct ipqess_rx_ring_refill *rx_refill = container_of(work,
++		struct ipqess_rx_ring_refill, refill_work);
++	struct ipqess_rx_ring *rx_ring = rx_refill->rx_ring;
++	int refill = 0;
++
++	/* don't let this loop by accident. */
++	while (atomic_dec_and_test(&rx_ring->refill_count)) {
++		napi_disable(&rx_ring->napi_rx);
++		if (ipqess_rx_buf_alloc(rx_ring)) {
++			refill++;
++			dev_dbg(rx_ring->ppdev,
++				"Not all buffers were reallocated");
++		}
++		napi_enable(&rx_ring->napi_rx);
++	}
++
++	if (atomic_add_return(refill, &rx_ring->refill_count))
++		schedule_work(&rx_refill->refill_work);
++}
++
++static int ipqess_rx_ring_alloc(struct ipqess *ess)
++{
++	int i;
++
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		int j;
++
++		ess->rx_ring[i].ess = ess;
++		ess->rx_ring[i].ppdev = &ess->pdev->dev;
++		ess->rx_ring[i].ring_id = i;
++		ess->rx_ring[i].idx = i * 2;
++
++		ess->rx_ring[i].buf = devm_kzalloc(&ess->pdev->dev,
++						   sizeof(struct ipqess_buf) * IPQESS_RX_RING_SIZE,
++						   GFP_KERNEL);
++
++		if (!ess->rx_ring[i].buf)
++			return -ENOMEM;
++
++		ess->rx_ring[i].hw_desc =
++			dmam_alloc_coherent(&ess->pdev->dev,
++					    sizeof(struct ipqess_rx_desc) * IPQESS_RX_RING_SIZE,
++					    &ess->rx_ring[i].dma, GFP_KERNEL);
++
++		if (!ess->rx_ring[i].hw_desc)
++			return -ENOMEM;
++
++		for (j = 0; j < IPQESS_RX_RING_SIZE; j++)
++			if (ipqess_rx_buf_alloc(&ess->rx_ring[i]) < 0)
++				return -ENOMEM;
++
++		ess->rx_refill[i].rx_ring = &ess->rx_ring[i];
++		INIT_WORK(&ess->rx_refill[i].refill_work, ipqess_refill_work);
++
++		ipqess_w32(ess, IPQESS_REG_RFD_BASE_ADDR_Q(ess->rx_ring[i].idx),
++			   (u32)(ess->rx_ring[i].dma));
++	}
++
++	ipqess_w32(ess, IPQESS_REG_RX_DESC0,
++		   (IPQESS_RX_HEAD_BUFF_SIZE << IPQESS_RX_BUF_SIZE_SHIFT) |
++		   (IPQESS_RX_RING_SIZE << IPQESS_RFD_RING_SIZE_SHIFT));
++
++	return 0;
++}
++
++static void ipqess_rx_ring_free(struct ipqess *ess)
++{
++	int i;
++
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		int j;
++
++		cancel_work_sync(&ess->rx_refill[i].refill_work);
++		atomic_set(&ess->rx_ring[i].refill_count, 0);
++
++		for (j = 0; j < IPQESS_RX_RING_SIZE; j++) {
++			dma_unmap_single(&ess->pdev->dev,
++					 ess->rx_ring[i].buf[j].dma,
++					 ess->rx_ring[i].buf[j].length,
++					 DMA_FROM_DEVICE);
++			dev_kfree_skb_any(ess->rx_ring[i].buf[j].skb);
++		}
++	}
++}
++
++static struct net_device_stats *ipqess_get_stats(struct net_device *netdev)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++
++	spin_lock(&ess->stats_lock);
++	ipqess_update_hw_stats(ess);
++	spin_unlock(&ess->stats_lock);
++
++	return &ess->stats;
++}
++
++static int ipqess_rx_poll(struct ipqess_rx_ring *rx_ring, int budget)
++{
++	u32 length = 0, num_desc, tail, rx_ring_tail;
++	int done = 0;
++
++	rx_ring_tail = rx_ring->tail;
++
++	tail = ipqess_r32(rx_ring->ess, IPQESS_REG_RFD_IDX_Q(rx_ring->idx));
++	tail >>= IPQESS_RFD_CONS_IDX_SHIFT;
++	tail &= IPQESS_RFD_CONS_IDX_MASK;
++
++	while (done < budget) {
++		struct ipqess_rx_desc *rd;
++		struct sk_buff *skb;
++
++		if (rx_ring_tail == tail)
++			break;
++
++		dma_unmap_single(rx_ring->ppdev,
++				 rx_ring->buf[rx_ring_tail].dma,
++				 rx_ring->buf[rx_ring_tail].length,
++				 DMA_FROM_DEVICE);
++
++		skb = xchg(&rx_ring->buf[rx_ring_tail].skb, NULL);
++		rd = (struct ipqess_rx_desc *)skb->data;
++		rx_ring_tail = IPQESS_NEXT_IDX(rx_ring_tail, IPQESS_RX_RING_SIZE);
++
++		/* Check if RRD is valid */
++		if (!(rd->rrd7 & cpu_to_le16(IPQESS_RRD_DESC_VALID))) {
++			num_desc = 1;
++			dev_kfree_skb_any(skb);
++			goto skip;
++		}
++
++		num_desc = le16_to_cpu(rd->rrd1) & IPQESS_RRD_NUM_RFD_MASK;
++		length = le16_to_cpu(rd->rrd6) & IPQESS_RRD_PKT_SIZE_MASK;
++
++		skb_reserve(skb, IPQESS_RRD_SIZE);
++		if (num_desc > 1) {
++			struct sk_buff *skb_prev = NULL;
++			int size_remaining;
++			int i;
++
++			skb->data_len = 0;
++			skb->tail += (IPQESS_RX_HEAD_BUFF_SIZE - IPQESS_RRD_SIZE);
++			skb->len = length;
++			skb->truesize = length;
++			size_remaining = length - (IPQESS_RX_HEAD_BUFF_SIZE - IPQESS_RRD_SIZE);
++
++			for (i = 1; i < num_desc; i++) {
++				struct sk_buff *skb_temp = rx_ring->buf[rx_ring_tail].skb;
++
++				dma_unmap_single(rx_ring->ppdev,
++						 rx_ring->buf[rx_ring_tail].dma,
++						 rx_ring->buf[rx_ring_tail].length,
++						 DMA_FROM_DEVICE);
++
++				skb_put(skb_temp, min(size_remaining, IPQESS_RX_HEAD_BUFF_SIZE));
++				if (skb_prev)
++					skb_prev->next = rx_ring->buf[rx_ring_tail].skb;
++				else
++					skb_shinfo(skb)->frag_list = rx_ring->buf[rx_ring_tail].skb;
++				skb_prev = rx_ring->buf[rx_ring_tail].skb;
++				rx_ring->buf[rx_ring_tail].skb->next = NULL;
++
++				skb->data_len += rx_ring->buf[rx_ring_tail].skb->len;
++				size_remaining -= rx_ring->buf[rx_ring_tail].skb->len;
++
++				rx_ring_tail = IPQESS_NEXT_IDX(rx_ring_tail, IPQESS_RX_RING_SIZE);
++			}
++
++		} else {
++			skb_put(skb, length);
++		}
++
++		skb->dev = rx_ring->ess->netdev;
++		skb->protocol = eth_type_trans(skb, rx_ring->ess->netdev);
++		skb_record_rx_queue(skb, rx_ring->ring_id);
++
++		if (rd->rrd6 & cpu_to_le16(IPQESS_RRD_CSUM_FAIL_MASK))
++			skb_checksum_none_assert(skb);
++		else
++			skb->ip_summed = CHECKSUM_UNNECESSARY;
++
++		if (rd->rrd7 & cpu_to_le16(IPQESS_RRD_CVLAN))
++			__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021Q),
++					       le16_to_cpu(rd->rrd4));
++		else if (rd->rrd1 & cpu_to_le16(IPQESS_RRD_SVLAN))
++			__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD),
++					       le16_to_cpu(rd->rrd4));
++
++		napi_gro_receive(&rx_ring->napi_rx, skb);
++
++		rx_ring->ess->stats.rx_packets++;
++		rx_ring->ess->stats.rx_bytes += length;
++
++		done++;
++skip:
++
++		num_desc += atomic_xchg(&rx_ring->refill_count, 0);
++		while (num_desc) {
++			if (ipqess_rx_buf_alloc_napi(rx_ring)) {
++				num_desc = atomic_add_return(num_desc,
++							     &rx_ring->refill_count);
++				if (num_desc >= DIV_ROUND_UP(IPQESS_RX_RING_SIZE * 4, 7))
++					schedule_work(&rx_ring->ess->rx_refill[rx_ring->ring_id].refill_work);
++				break;
++			}
++			num_desc--;
++		}
++	}
++
++	ipqess_w32(rx_ring->ess, IPQESS_REG_RX_SW_CONS_IDX_Q(rx_ring->idx),
++		   rx_ring_tail);
++	rx_ring->tail = rx_ring_tail;
++
++	return done;
++}
++
++static int ipqess_tx_complete(struct ipqess_tx_ring *tx_ring, int budget)
++{
++	int total = 0, ret;
++	int done = 0;
++	u32 tail;
++
++	tail = ipqess_r32(tx_ring->ess, IPQESS_REG_TPD_IDX_Q(tx_ring->idx));
++	tail >>= IPQESS_TPD_CONS_IDX_SHIFT;
++	tail &= IPQESS_TPD_CONS_IDX_MASK;
++
++	do {
++		ret = ipqess_tx_unmap_and_free(&tx_ring->ess->pdev->dev,
++					       &tx_ring->buf[tx_ring->tail]);
++		tx_ring->tail = IPQESS_NEXT_IDX(tx_ring->tail, tx_ring->count);
++
++		total += ret;
++	} while ((++done < budget) && (tx_ring->tail != tail));
++
++	ipqess_w32(tx_ring->ess, IPQESS_REG_TX_SW_CONS_IDX_Q(tx_ring->idx),
++		   tx_ring->tail);
++
++	if (netif_tx_queue_stopped(tx_ring->nq)) {
++		netdev_dbg(tx_ring->ess->netdev, "waking up tx queue %d\n",
++			   tx_ring->idx);
++		netif_tx_wake_queue(tx_ring->nq);
++	}
++
++	netdev_tx_completed_queue(tx_ring->nq, done, total);
++
++	return done;
++}
++
++static int ipqess_tx_napi(struct napi_struct *napi, int budget)
++{
++	struct ipqess_tx_ring *tx_ring = container_of(napi, struct ipqess_tx_ring,
++						    napi_tx);
++	int work_done = 0;
++	u32 tx_status;
++
++	tx_status = ipqess_r32(tx_ring->ess, IPQESS_REG_TX_ISR);
++	tx_status &= BIT(tx_ring->idx);
++
++	work_done = ipqess_tx_complete(tx_ring, budget);
++
++	ipqess_w32(tx_ring->ess, IPQESS_REG_TX_ISR, tx_status);
++
++	if (likely(work_done < budget)) {
++		if (napi_complete_done(napi, work_done))
++			ipqess_w32(tx_ring->ess,
++				   IPQESS_REG_TX_INT_MASK_Q(tx_ring->idx), 0x1);
++	}
++
++	return work_done;
++}
++
++static int ipqess_rx_napi(struct napi_struct *napi, int budget)
++{
++	struct ipqess_rx_ring *rx_ring = container_of(napi, struct ipqess_rx_ring,
++						    napi_rx);
++	struct ipqess *ess = rx_ring->ess;
++	u32 rx_mask = BIT(rx_ring->idx);
++	int remaining_budget = budget;
++	int rx_done;
++	u32 status;
++
++	do {
++		ipqess_w32(ess, IPQESS_REG_RX_ISR, rx_mask);
++		rx_done = ipqess_rx_poll(rx_ring, remaining_budget);
++		remaining_budget -= rx_done;
++
++		status = ipqess_r32(ess, IPQESS_REG_RX_ISR);
++	} while (remaining_budget > 0 && (status & rx_mask));
++
++	if (remaining_budget <= 0)
++		return budget;
++
++	if (napi_complete_done(napi, budget - remaining_budget))
++		ipqess_w32(ess, IPQESS_REG_RX_INT_MASK_Q(rx_ring->idx), 0x1);
++
++	return budget - remaining_budget;
++}
++
++static irqreturn_t ipqess_interrupt_tx(int irq, void *priv)
++{
++	struct ipqess_tx_ring *tx_ring = (struct ipqess_tx_ring *)priv;
++
++	if (likely(napi_schedule_prep(&tx_ring->napi_tx))) {
++		__napi_schedule(&tx_ring->napi_tx);
++		ipqess_w32(tx_ring->ess, IPQESS_REG_TX_INT_MASK_Q(tx_ring->idx),
++			   0x0);
++	}
++
++	return IRQ_HANDLED;
++}
++
++static irqreturn_t ipqess_interrupt_rx(int irq, void *priv)
++{
++	struct ipqess_rx_ring *rx_ring = (struct ipqess_rx_ring *)priv;
++
++	if (likely(napi_schedule_prep(&rx_ring->napi_rx))) {
++		__napi_schedule(&rx_ring->napi_rx);
++		ipqess_w32(rx_ring->ess, IPQESS_REG_RX_INT_MASK_Q(rx_ring->idx),
++			   0x0);
++	}
++
++	return IRQ_HANDLED;
++}
++
++static void ipqess_irq_enable(struct ipqess *ess)
++{
++	int i;
++
++	ipqess_w32(ess, IPQESS_REG_RX_ISR, 0xff);
++	ipqess_w32(ess, IPQESS_REG_TX_ISR, 0xffff);
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		ipqess_w32(ess, IPQESS_REG_RX_INT_MASK_Q(ess->rx_ring[i].idx), 1);
++		ipqess_w32(ess, IPQESS_REG_TX_INT_MASK_Q(ess->tx_ring[i].idx), 1);
++	}
++}
++
++static void ipqess_irq_disable(struct ipqess *ess)
++{
++	int i;
++
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		ipqess_w32(ess, IPQESS_REG_RX_INT_MASK_Q(ess->rx_ring[i].idx), 0);
++		ipqess_w32(ess, IPQESS_REG_TX_INT_MASK_Q(ess->tx_ring[i].idx), 0);
++	}
++}
++
++static int __init ipqess_init(struct net_device *netdev)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++	struct device_node *of_node = ess->pdev->dev.of_node;
++	int ret;
++
++	ret = of_get_ethdev_address(of_node, netdev);
++	if (ret)
++		eth_hw_addr_random(netdev);
++
++	return phylink_of_phy_connect(ess->phylink, of_node, 0);
++}
++
++static void ipqess_uninit(struct net_device *netdev)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++
++	phylink_disconnect_phy(ess->phylink);
++}
++
++static int ipqess_open(struct net_device *netdev)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++	int i, err;
++
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		int qid;
++
++		qid = ess->tx_ring[i].idx;
++		err = devm_request_irq(&netdev->dev, ess->tx_irq[qid],
++				       ipqess_interrupt_tx, 0,
++				       ess->tx_irq_names[qid],
++				       &ess->tx_ring[i]);
++		if (err)
++			return err;
++
++		qid = ess->rx_ring[i].idx;
++		err = devm_request_irq(&netdev->dev, ess->rx_irq[qid],
++				       ipqess_interrupt_rx, 0,
++				       ess->rx_irq_names[qid],
++				       &ess->rx_ring[i]);
++		if (err)
++			return err;
++
++		napi_enable(&ess->tx_ring[i].napi_tx);
++		napi_enable(&ess->rx_ring[i].napi_rx);
++	}
++
++	ipqess_irq_enable(ess);
++	phylink_start(ess->phylink);
++	netif_tx_start_all_queues(netdev);
++
++	return 0;
++}
++
++static int ipqess_stop(struct net_device *netdev)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++	int i;
++
++	netif_tx_stop_all_queues(netdev);
++	phylink_stop(ess->phylink);
++	ipqess_irq_disable(ess);
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		napi_disable(&ess->tx_ring[i].napi_tx);
++		napi_disable(&ess->rx_ring[i].napi_rx);
++	}
++
++	return 0;
++}
++
++static int ipqess_do_ioctl(struct net_device *netdev, struct ifreq *ifr, int cmd)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++
++	return phylink_mii_ioctl(ess->phylink, ifr, cmd);
++}
++
++static u16 ipqess_tx_desc_available(struct ipqess_tx_ring *tx_ring)
++{
++	u16 count = 0;
++
++	if (tx_ring->tail <= tx_ring->head)
++		count = IPQESS_TX_RING_SIZE;
++
++	count += tx_ring->tail - tx_ring->head - 1;
++
++	return count;
++}
++
++static int ipqess_cal_txd_req(struct sk_buff *skb)
++{
++	int tpds;
++
++	/* one TPD for the header, and one for each fragments */
++	tpds = 1 + skb_shinfo(skb)->nr_frags;
++	if (skb_is_gso(skb) && skb_is_gso_v6(skb)) {
++		/* for LSOv2 one extra TPD is needed */
++		tpds++;
++	}
++
++	return tpds;
++}
++
++static struct ipqess_buf *ipqess_get_tx_buffer(struct ipqess_tx_ring *tx_ring,
++					       struct ipqess_tx_desc *desc)
++{
++	return &tx_ring->buf[desc - tx_ring->hw_desc];
++}
++
++static struct ipqess_tx_desc *ipqess_tx_desc_next(struct ipqess_tx_ring *tx_ring)
++{
++	struct ipqess_tx_desc *desc;
++
++	desc = &tx_ring->hw_desc[tx_ring->head];
++	tx_ring->head = IPQESS_NEXT_IDX(tx_ring->head, tx_ring->count);
++
++	return desc;
++}
++
++static void ipqess_rollback_tx(struct ipqess *eth,
++			       struct ipqess_tx_desc *first_desc, int ring_id)
++{
++	struct ipqess_tx_ring *tx_ring = &eth->tx_ring[ring_id];
++	struct ipqess_tx_desc *desc = NULL;
++	struct ipqess_buf *buf;
++	u16 start_index, index;
++
++	start_index = first_desc - tx_ring->hw_desc;
++
++	index = start_index;
++	while (index != tx_ring->head) {
++		desc = &tx_ring->hw_desc[index];
++		buf = &tx_ring->buf[index];
++		ipqess_tx_unmap_and_free(&eth->pdev->dev, buf);
++		memset(desc, 0, sizeof(*desc));
++		if (++index == tx_ring->count)
++			index = 0;
++	}
++	tx_ring->head = start_index;
++}
++
++static int ipqess_tx_map_and_fill(struct ipqess_tx_ring *tx_ring,
++				  struct sk_buff *skb)
++{
++	struct ipqess_tx_desc *desc = NULL, *first_desc = NULL;
++	u32 word1 = 0, word3 = 0, lso_word1 = 0, svlan_tag = 0;
++	struct platform_device *pdev = tx_ring->ess->pdev;
++	struct ipqess_buf *buf = NULL;
++	u16 len;
++	int i;
++
++	if (skb_is_gso(skb)) {
++		if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4) {
++			lso_word1 |= IPQESS_TPD_IPV4_EN;
++			ip_hdr(skb)->check = 0;
++			tcp_hdr(skb)->check = ~csum_tcpudp_magic(ip_hdr(skb)->saddr,
++								 ip_hdr(skb)->daddr,
++								 0, IPPROTO_TCP, 0);
++		} else if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV6) {
++			lso_word1 |= IPQESS_TPD_LSO_V2_EN;
++			ipv6_hdr(skb)->payload_len = 0;
++			tcp_hdr(skb)->check = ~csum_ipv6_magic(&ipv6_hdr(skb)->saddr,
++							       &ipv6_hdr(skb)->daddr,
++							       0, IPPROTO_TCP, 0);
++		}
++
++		lso_word1 |= IPQESS_TPD_LSO_EN |
++			     ((skb_shinfo(skb)->gso_size & IPQESS_TPD_MSS_MASK) <<
++							   IPQESS_TPD_MSS_SHIFT) |
++			     (skb_transport_offset(skb) << IPQESS_TPD_HDR_SHIFT);
++	} else if (likely(skb->ip_summed == CHECKSUM_PARTIAL)) {
++		u8 css, cso;
++
++		cso = skb_checksum_start_offset(skb);
++		css = cso + skb->csum_offset;
++
++		word1 |= (IPQESS_TPD_CUSTOM_CSUM_EN);
++		word1 |= (cso >> 1) << IPQESS_TPD_HDR_SHIFT;
++		word1 |= ((css >> 1) << IPQESS_TPD_CUSTOM_CSUM_SHIFT);
++	}
++
++	if (skb_vlan_tag_present(skb)) {
++		switch (skb->vlan_proto) {
++		case htons(ETH_P_8021Q):
++			word3 |= BIT(IPQESS_TX_INS_CVLAN);
++			word3 |= skb_vlan_tag_get(skb) << IPQESS_TX_CVLAN_TAG_SHIFT;
++			break;
++		case htons(ETH_P_8021AD):
++			word1 |= BIT(IPQESS_TX_INS_SVLAN);
++			svlan_tag = skb_vlan_tag_get(skb);
++			break;
++		default:
++			dev_err(&pdev->dev, "no ctag or stag present\n");
++			goto vlan_tag_error;
++		}
++	}
++
++	if (eth_type_vlan(skb->protocol))
++		word1 |= IPQESS_TPD_VLAN_TAGGED;
++
++	if (skb->protocol == htons(ETH_P_PPP_SES))
++		word1 |= IPQESS_TPD_PPPOE_EN;
++
++	len = skb_headlen(skb);
++
++	first_desc = ipqess_tx_desc_next(tx_ring);
++	desc = first_desc;
++	if (lso_word1 & IPQESS_TPD_LSO_V2_EN) {
++		desc->addr = cpu_to_le32(skb->len);
++		desc->word1 = cpu_to_le32(word1 | lso_word1);
++		desc->svlan_tag = cpu_to_le16(svlan_tag);
++		desc->word3 = cpu_to_le32(word3);
++		desc = ipqess_tx_desc_next(tx_ring);
++	}
++
++	buf = ipqess_get_tx_buffer(tx_ring, desc);
++	buf->length = len;
++	buf->dma = dma_map_single(&pdev->dev, skb->data, len, DMA_TO_DEVICE);
++
++	if (dma_mapping_error(&pdev->dev, buf->dma))
++		goto dma_error;
++
++	desc->addr = cpu_to_le32(buf->dma);
++	desc->len  = cpu_to_le16(len);
++
++	buf->flags |= IPQESS_DESC_SINGLE;
++	desc->word1 = cpu_to_le32(word1 | lso_word1);
++	desc->svlan_tag = cpu_to_le16(svlan_tag);
++	desc->word3 = cpu_to_le32(word3);
++
++	for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
++		skb_frag_t *frag = &skb_shinfo(skb)->frags[i];
++
++		len = skb_frag_size(frag);
++		desc = ipqess_tx_desc_next(tx_ring);
++		buf = ipqess_get_tx_buffer(tx_ring, desc);
++		buf->length = len;
++		buf->flags |= IPQESS_DESC_PAGE;
++		buf->dma = skb_frag_dma_map(&pdev->dev, frag, 0, len,
++					    DMA_TO_DEVICE);
++
++		if (dma_mapping_error(&pdev->dev, buf->dma))
++			goto dma_error;
++
++		desc->addr = cpu_to_le32(buf->dma);
++		desc->len  = cpu_to_le16(len);
++		desc->svlan_tag = cpu_to_le16(svlan_tag);
++		desc->word1 = cpu_to_le32(word1 | lso_word1);
++		desc->word3 = cpu_to_le32(word3);
++	}
++	desc->word1 |= cpu_to_le32(1 << IPQESS_TPD_EOP_SHIFT);
++	buf->skb = skb;
++	buf->flags |= IPQESS_DESC_LAST;
++
++	return 0;
++
++dma_error:
++	ipqess_rollback_tx(tx_ring->ess, first_desc, tx_ring->ring_id);
++	dev_err(&pdev->dev, "TX DMA map failed\n");
++
++vlan_tag_error:
++	return -ENOMEM;
++}
++
++static void ipqess_kick_tx(struct ipqess_tx_ring *tx_ring)
++{
++	/* Ensure that all TPDs has been written completely */
++	dma_wmb();
++
++	/* update software producer index */
++	ipqess_w32(tx_ring->ess, IPQESS_REG_TPD_IDX_Q(tx_ring->idx),
++		   tx_ring->head);
++}
++
++static netdev_tx_t ipqess_xmit(struct sk_buff *skb, struct net_device *netdev)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++	struct ipqess_tx_ring *tx_ring;
++	int avail;
++	int tx_num;
++	int ret;
++
++	tx_ring = &ess->tx_ring[skb_get_queue_mapping(skb)];
++	tx_num = ipqess_cal_txd_req(skb);
++	avail = ipqess_tx_desc_available(tx_ring);
++	if (avail < tx_num) {
++		netdev_dbg(netdev,
++			   "stopping tx queue %d, avail=%d req=%d im=%x\n",
++			   tx_ring->idx, avail, tx_num,
++			   ipqess_r32(tx_ring->ess,
++				      IPQESS_REG_TX_INT_MASK_Q(tx_ring->idx)));
++		netif_tx_stop_queue(tx_ring->nq);
++		ipqess_w32(tx_ring->ess, IPQESS_REG_TX_INT_MASK_Q(tx_ring->idx), 0x1);
++		ipqess_kick_tx(tx_ring);
++		return NETDEV_TX_BUSY;
++	}
++
++	ret = ipqess_tx_map_and_fill(tx_ring, skb);
++	if (ret) {
++		dev_kfree_skb_any(skb);
++		ess->stats.tx_errors++;
++		goto err_out;
++	}
++
++	ess->stats.tx_packets++;
++	ess->stats.tx_bytes += skb->len;
++	netdev_tx_sent_queue(tx_ring->nq, skb->len);
++
++	if (!netdev_xmit_more() || netif_xmit_stopped(tx_ring->nq))
++		ipqess_kick_tx(tx_ring);
++
++err_out:
++	return NETDEV_TX_OK;
++}
++
++static int ipqess_set_mac_address(struct net_device *netdev, void *p)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++	const char *macaddr = netdev->dev_addr;
++	int ret = eth_mac_addr(netdev, p);
++
++	if (ret)
++		return ret;
++
++	ipqess_w32(ess, IPQESS_REG_MAC_CTRL1, (macaddr[0] << 8) | macaddr[1]);
++	ipqess_w32(ess, IPQESS_REG_MAC_CTRL0,
++		   (macaddr[2] << 24) | (macaddr[3] << 16) | (macaddr[4] << 8) |
++		    macaddr[5]);
++
++	return 0;
++}
++
++static void ipqess_tx_timeout(struct net_device *netdev, unsigned int txq_id)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++	struct ipqess_tx_ring *tr = &ess->tx_ring[txq_id];
++
++	netdev_warn(netdev, "TX timeout on queue %d\n", tr->idx);
++}
++
++static const struct net_device_ops ipqess_axi_netdev_ops = {
++	.ndo_init		= ipqess_init,
++	.ndo_uninit		= ipqess_uninit,
++	.ndo_open		= ipqess_open,
++	.ndo_stop		= ipqess_stop,
++	.ndo_do_ioctl		= ipqess_do_ioctl,
++	.ndo_start_xmit		= ipqess_xmit,
++	.ndo_get_stats		= ipqess_get_stats,
++	.ndo_set_mac_address	= ipqess_set_mac_address,
++	.ndo_tx_timeout		= ipqess_tx_timeout,
++};
++
++static void ipqess_hw_stop(struct ipqess *ess)
++{
++	int i;
++
++	/* disable all RX queue IRQs */
++	for (i = 0; i < IPQESS_MAX_RX_QUEUE; i++)
++		ipqess_w32(ess, IPQESS_REG_RX_INT_MASK_Q(i), 0);
++
++	/* disable all TX queue IRQs */
++	for (i = 0; i < IPQESS_MAX_TX_QUEUE; i++)
++		ipqess_w32(ess, IPQESS_REG_TX_INT_MASK_Q(i), 0);
++
++	/* disable all other IRQs */
++	ipqess_w32(ess, IPQESS_REG_MISC_IMR, 0);
++	ipqess_w32(ess, IPQESS_REG_WOL_IMR, 0);
++
++	/* clear the IRQ status registers */
++	ipqess_w32(ess, IPQESS_REG_RX_ISR, 0xff);
++	ipqess_w32(ess, IPQESS_REG_TX_ISR, 0xffff);
++	ipqess_w32(ess, IPQESS_REG_MISC_ISR, 0x1fff);
++	ipqess_w32(ess, IPQESS_REG_WOL_ISR, 0x1);
++	ipqess_w32(ess, IPQESS_REG_WOL_CTRL, 0);
++
++	/* disable RX and TX queues */
++	ipqess_m32(ess, IPQESS_RXQ_CTRL_EN_MASK, 0, IPQESS_REG_RXQ_CTRL);
++	ipqess_m32(ess, IPQESS_TXQ_CTRL_TXQ_EN, 0, IPQESS_REG_TXQ_CTRL);
++}
++
++static int ipqess_hw_init(struct ipqess *ess)
++{
++	int i, err;
++	u32 tmp;
++
++	ipqess_hw_stop(ess);
++
++	ipqess_m32(ess, BIT(IPQESS_INTR_SW_IDX_W_TYP_SHIFT),
++		   IPQESS_INTR_SW_IDX_W_TYPE << IPQESS_INTR_SW_IDX_W_TYP_SHIFT,
++		   IPQESS_REG_INTR_CTRL);
++
++	/* enable IRQ delay slot */
++	ipqess_w32(ess, IPQESS_REG_IRQ_MODRT_TIMER_INIT,
++		   (IPQESS_TX_IMT << IPQESS_IRQ_MODRT_TX_TIMER_SHIFT) |
++		   (IPQESS_RX_IMT << IPQESS_IRQ_MODRT_RX_TIMER_SHIFT));
++
++	/* Set Customer and Service VLAN TPIDs */
++	ipqess_w32(ess, IPQESS_REG_VLAN_CFG,
++		   (ETH_P_8021Q << IPQESS_VLAN_CFG_CVLAN_TPID_SHIFT) |
++		   (ETH_P_8021AD << IPQESS_VLAN_CFG_SVLAN_TPID_SHIFT));
++
++	/* Configure the TX Queue bursting */
++	ipqess_w32(ess, IPQESS_REG_TXQ_CTRL,
++		   (IPQESS_TPD_BURST << IPQESS_TXQ_NUM_TPD_BURST_SHIFT) |
++		   (IPQESS_TXF_BURST << IPQESS_TXQ_TXF_BURST_NUM_SHIFT) |
++		   IPQESS_TXQ_CTRL_TPD_BURST_EN);
++
++	/* Set RSS type */
++	ipqess_w32(ess, IPQESS_REG_RSS_TYPE,
++		   IPQESS_RSS_TYPE_IPV4TCP | IPQESS_RSS_TYPE_IPV6_TCP |
++		   IPQESS_RSS_TYPE_IPV4_UDP | IPQESS_RSS_TYPE_IPV6UDP |
++		   IPQESS_RSS_TYPE_IPV4 | IPQESS_RSS_TYPE_IPV6);
++
++	/* Set RFD ring burst and threshold */
++	ipqess_w32(ess, IPQESS_REG_RX_DESC1,
++		   (IPQESS_RFD_BURST << IPQESS_RXQ_RFD_BURST_NUM_SHIFT) |
++		   (IPQESS_RFD_THR << IPQESS_RXQ_RFD_PF_THRESH_SHIFT) |
++		   (IPQESS_RFD_LTHR << IPQESS_RXQ_RFD_LOW_THRESH_SHIFT));
++
++	/* Set Rx FIFO
++	 * - threshold to start to DMA data to host
++	 */
++	ipqess_w32(ess, IPQESS_REG_RXQ_CTRL,
++		   IPQESS_FIFO_THRESH_128_BYTE | IPQESS_RXQ_CTRL_RMV_VLAN);
++
++	err = ipqess_rx_ring_alloc(ess);
++	if (err)
++		return err;
++
++	err = ipqess_tx_ring_alloc(ess);
++	if (err)
++		goto err_rx_ring_free;
++
++	/* Load all of ring base addresses above into the dma engine */
++	ipqess_m32(ess, 0, BIT(IPQESS_LOAD_PTR_SHIFT), IPQESS_REG_TX_SRAM_PART);
++
++	/* Disable TX FIFO low watermark and high watermark */
++	ipqess_w32(ess, IPQESS_REG_TXF_WATER_MARK, 0);
++
++	/* Configure RSS indirection table.
++	 * 128 hash will be configured in the following
++	 * pattern: hash{0,1,2,3} = {Q0,Q2,Q4,Q6} respectively
++	 * and so on
++	 */
++	for (i = 0; i < IPQESS_NUM_IDT; i++)
++		ipqess_w32(ess, IPQESS_REG_RSS_IDT(i), IPQESS_RSS_IDT_VALUE);
++
++	/* Configure load balance mapping table.
++	 * 4 table entry will be configured according to the
++	 * following pattern: load_balance{0,1,2,3} = {Q0,Q1,Q3,Q4}
++	 * respectively.
++	 */
++	ipqess_w32(ess, IPQESS_REG_LB_RING, IPQESS_LB_REG_VALUE);
++
++	/* Configure Virtual queue for Tx rings */
++	ipqess_w32(ess, IPQESS_REG_VQ_CTRL0, IPQESS_VQ_REG_VALUE);
++	ipqess_w32(ess, IPQESS_REG_VQ_CTRL1, IPQESS_VQ_REG_VALUE);
++
++	/* Configure Max AXI Burst write size to 128 bytes*/
++	ipqess_w32(ess, IPQESS_REG_AXIW_CTRL_MAXWRSIZE,
++		   IPQESS_AXIW_MAXWRSIZE_VALUE);
++
++	/* Enable TX queues */
++	ipqess_m32(ess, 0, IPQESS_TXQ_CTRL_TXQ_EN, IPQESS_REG_TXQ_CTRL);
++
++	/* Enable RX queues */
++	tmp = 0;
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++)
++		tmp |= IPQESS_RXQ_CTRL_EN(ess->rx_ring[i].idx);
++
++	ipqess_m32(ess, IPQESS_RXQ_CTRL_EN_MASK, tmp, IPQESS_REG_RXQ_CTRL);
++
++	return 0;
++
++err_rx_ring_free:
++
++	ipqess_rx_ring_free(ess);
++	return err;
++}
++
++static void ipqess_mac_config(struct phylink_config *config, unsigned int mode,
++			      const struct phylink_link_state *state)
++{
++	/* Nothing to do, use fixed Internal mode */
++}
++
++static void ipqess_mac_link_down(struct phylink_config *config,
++				 unsigned int mode,
++				 phy_interface_t interface)
++{
++	/* Nothing to do, use fixed Internal mode */
++}
++
++static void ipqess_mac_link_up(struct phylink_config *config,
++			       struct phy_device *phy, unsigned int mode,
++			       phy_interface_t interface,
++			       int speed, int duplex,
++			       bool tx_pause, bool rx_pause)
++{
++	/* Nothing to do, use fixed Internal mode */
++}
++
++static struct phylink_mac_ops ipqess_phylink_mac_ops = {
++	.validate		= phylink_generic_validate,
++	.mac_config		= ipqess_mac_config,
++	.mac_link_up		= ipqess_mac_link_up,
++	.mac_link_down		= ipqess_mac_link_down,
++};
++
++static void ipqess_reset(struct ipqess *ess)
++{
++	reset_control_assert(ess->ess_rst);
++
++	mdelay(10);
++
++	reset_control_deassert(ess->ess_rst);
++
++	/* Waiting for all inner tables to be flushed and reinitialized.
++	 * This takes between 5 and 10 ms
++	 */
++
++	mdelay(10);
++}
++
++static int ipqess_axi_probe(struct platform_device *pdev)
++{
++	struct device_node *np = pdev->dev.of_node;
++	struct net_device *netdev;
++	phy_interface_t phy_mode;
++	struct ipqess *ess;
++	int i, err = 0;
++
++	netdev = devm_alloc_etherdev_mqs(&pdev->dev, sizeof(*ess),
++					 IPQESS_NETDEV_QUEUES,
++					 IPQESS_NETDEV_QUEUES);
++	if (!netdev)
++		return -ENOMEM;
++
++	ess = netdev_priv(netdev);
++	ess->netdev = netdev;
++	ess->pdev = pdev;
++	spin_lock_init(&ess->stats_lock);
++	SET_NETDEV_DEV(netdev, &pdev->dev);
++	platform_set_drvdata(pdev, netdev);
++
++	ess->hw_addr = devm_platform_get_and_ioremap_resource(pdev, 0, NULL);
++	if (IS_ERR(ess->hw_addr))
++		return PTR_ERR(ess->hw_addr);
++
++	err = of_get_phy_mode(np, &phy_mode);
++	if (err) {
++		dev_err(&pdev->dev, "incorrect phy-mode\n");
++		return err;
++	}
++
++	ess->ess_clk = devm_clk_get(&pdev->dev, NULL);
++	if (!IS_ERR(ess->ess_clk))
++		clk_prepare_enable(ess->ess_clk);
++
++	ess->ess_rst = devm_reset_control_get(&pdev->dev, NULL);
++	if (IS_ERR(ess->ess_rst))
++		goto err_clk;
++
++	ipqess_reset(ess);
++
++	ess->phylink_config.dev = &netdev->dev;
++	ess->phylink_config.type = PHYLINK_NETDEV;
++	ess->phylink_config.mac_capabilities = MAC_SYM_PAUSE | MAC_10 |
++					       MAC_100 | MAC_1000FD;
++
++	__set_bit(PHY_INTERFACE_MODE_INTERNAL,
++		  ess->phylink_config.supported_interfaces);
++
++	ess->phylink = phylink_create(&ess->phylink_config,
++				      of_fwnode_handle(np), phy_mode,
++				      &ipqess_phylink_mac_ops);
++	if (IS_ERR(ess->phylink)) {
++		err = PTR_ERR(ess->phylink);
++		goto err_clk;
++	}
++
++	for (i = 0; i < IPQESS_MAX_TX_QUEUE; i++) {
++		ess->tx_irq[i] = platform_get_irq(pdev, i);
++		scnprintf(ess->tx_irq_names[i], sizeof(ess->tx_irq_names[i]),
++			  "%s:txq%d", pdev->name, i);
++	}
++
++	for (i = 0; i < IPQESS_MAX_RX_QUEUE; i++) {
++		ess->rx_irq[i] = platform_get_irq(pdev, i + IPQESS_MAX_TX_QUEUE);
++		scnprintf(ess->rx_irq_names[i], sizeof(ess->rx_irq_names[i]),
++			  "%s:rxq%d", pdev->name, i);
++	}
++
++	netdev->netdev_ops = &ipqess_axi_netdev_ops;
++	netdev->features = NETIF_F_HW_CSUM | NETIF_F_RXCSUM |
++			   NETIF_F_HW_VLAN_CTAG_RX |
++			   NETIF_F_HW_VLAN_CTAG_TX |
++			   NETIF_F_TSO | NETIF_F_GRO | NETIF_F_SG;
++	/* feature change is not supported yet */
++	netdev->hw_features = 0;
++	netdev->vlan_features = NETIF_F_HW_CSUM | NETIF_F_SG | NETIF_F_RXCSUM |
++				NETIF_F_TSO |
++				NETIF_F_GRO;
++	netdev->watchdog_timeo = 5 * HZ;
++	netdev->base_addr = (u32)ess->hw_addr;
++	netdev->max_mtu = 9000;
++	netdev->gso_max_segs = IPQESS_TX_RING_SIZE / 2;
++
++	ipqess_set_ethtool_ops(netdev);
++
++	err = ipqess_hw_init(ess);
++	if (err)
++		goto err_phylink;
++
++	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		netif_napi_add_tx(netdev, &ess->tx_ring[i].napi_tx, ipqess_tx_napi);
++		netif_napi_add(netdev, &ess->rx_ring[i].napi_rx, ipqess_rx_napi);
++	}
++
++	err = register_netdev(netdev);
++	if (err)
++		goto err_hw_stop;
++
++	return 0;
++
++err_hw_stop:
++	ipqess_hw_stop(ess);
++
++	ipqess_tx_ring_free(ess);
++	ipqess_rx_ring_free(ess);
++err_phylink:
++	phylink_destroy(ess->phylink);
++
++err_clk:
++	clk_disable_unprepare(ess->ess_clk);
++
++	return err;
++}
++
++static int ipqess_axi_remove(struct platform_device *pdev)
++{
++	const struct net_device *netdev = platform_get_drvdata(pdev);
++	struct ipqess *ess = netdev_priv(netdev);
++
++	unregister_netdev(ess->netdev);
++	ipqess_hw_stop(ess);
++
++	ipqess_tx_ring_free(ess);
++	ipqess_rx_ring_free(ess);
++
++	phylink_destroy(ess->phylink);
++	clk_disable_unprepare(ess->ess_clk);
++
++	return 0;
++}
++
++static const struct of_device_id ipqess_of_mtable[] = {
++	{.compatible = "qcom,ipq4019-ess-edma" },
++	{}
++};
++MODULE_DEVICE_TABLE(of, ipqess_of_mtable);
++
++static struct platform_driver ipqess_axi_driver = {
++	.driver = {
++		.name    = "ipqess-edma",
++		.of_match_table = ipqess_of_mtable,
++	},
++	.probe    = ipqess_axi_probe,
++	.remove   = ipqess_axi_remove,
++};
++
++module_platform_driver(ipqess_axi_driver);
++
++MODULE_AUTHOR("Qualcomm Atheros Inc");
++MODULE_AUTHOR("John Crispin <john at phrozen.org>");
++MODULE_AUTHOR("Christian Lamparter <chunkeey at gmail.com>");
++MODULE_AUTHOR("Gabor Juhos <j4g8y7 at gmail.com>");
++MODULE_AUTHOR("Maxime Chevallier <maxime.chevallier at bootlin.com>");
++MODULE_LICENSE("GPL");
+--- /dev/null
++++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.h
+@@ -0,0 +1,518 @@
++/* SPDX-License-Identifier: (GPL-2.0 OR ISC) */
++/* Copyright (c) 2014 - 2016, The Linux Foundation. All rights reserved.
++ * Copyright (c) 2017 - 2018, John Crispin <john at phrozen.org>
++ * Copyright (c) 2018 - 2019, Christian Lamparter <chunkeey at gmail.com>
++ * Copyright (c) 2020 - 2021, Gabor Juhos <j4g8y7 at gmail.com>
++ * Copyright (c) 2021 - 2022, Maxime Chevallier <maxime.chevallier at bootlin.com>
++ *
++ */
++
++#ifndef _IPQESS_H_
++#define _IPQESS_H_
++
++#define IPQESS_NETDEV_QUEUES	4
++
++#define IPQESS_TPD_EOP_SHIFT 31
++
++#define IPQESS_PORT_ID_SHIFT 12
++#define IPQESS_PORT_ID_MASK 0x7
++
++/* tpd word 3 bit 18-28 */
++#define IPQESS_TPD_PORT_BITMAP_SHIFT 18
++
++#define IPQESS_TPD_FROM_CPU_SHIFT 25
++
++#define IPQESS_RX_RING_SIZE 128
++#define IPQESS_RX_HEAD_BUFF_SIZE 1540
++#define IPQESS_TX_RING_SIZE 128
++#define IPQESS_MAX_RX_QUEUE 8
++#define IPQESS_MAX_TX_QUEUE 16
++
++/* Configurations */
++#define IPQESS_INTR_CLEAR_TYPE 0
++#define IPQESS_INTR_SW_IDX_W_TYPE 0
++#define IPQESS_FIFO_THRESH_TYPE 0
++#define IPQESS_RSS_TYPE 0
++#define IPQESS_RX_IMT 0x0020
++#define IPQESS_TX_IMT 0x0050
++#define IPQESS_TPD_BURST 5
++#define IPQESS_TXF_BURST 0x100
++#define IPQESS_RFD_BURST 8
++#define IPQESS_RFD_THR 16
++#define IPQESS_RFD_LTHR 0
++
++/* Flags used in transmit direction */
++#define IPQESS_DESC_LAST 0x1
++#define IPQESS_DESC_SINGLE 0x2
++#define IPQESS_DESC_PAGE 0x4
++
++struct ipqess_statistics {
++	u32 tx_q0_pkt;
++	u32 tx_q1_pkt;
++	u32 tx_q2_pkt;
++	u32 tx_q3_pkt;
++	u32 tx_q4_pkt;
++	u32 tx_q5_pkt;
++	u32 tx_q6_pkt;
++	u32 tx_q7_pkt;
++	u32 tx_q8_pkt;
++	u32 tx_q9_pkt;
++	u32 tx_q10_pkt;
++	u32 tx_q11_pkt;
++	u32 tx_q12_pkt;
++	u32 tx_q13_pkt;
++	u32 tx_q14_pkt;
++	u32 tx_q15_pkt;
++	u32 tx_q0_byte;
++	u32 tx_q1_byte;
++	u32 tx_q2_byte;
++	u32 tx_q3_byte;
++	u32 tx_q4_byte;
++	u32 tx_q5_byte;
++	u32 tx_q6_byte;
++	u32 tx_q7_byte;
++	u32 tx_q8_byte;
++	u32 tx_q9_byte;
++	u32 tx_q10_byte;
++	u32 tx_q11_byte;
++	u32 tx_q12_byte;
++	u32 tx_q13_byte;
++	u32 tx_q14_byte;
++	u32 tx_q15_byte;
++	u32 rx_q0_pkt;
++	u32 rx_q1_pkt;
++	u32 rx_q2_pkt;
++	u32 rx_q3_pkt;
++	u32 rx_q4_pkt;
++	u32 rx_q5_pkt;
++	u32 rx_q6_pkt;
++	u32 rx_q7_pkt;
++	u32 rx_q0_byte;
++	u32 rx_q1_byte;
++	u32 rx_q2_byte;
++	u32 rx_q3_byte;
++	u32 rx_q4_byte;
++	u32 rx_q5_byte;
++	u32 rx_q6_byte;
++	u32 rx_q7_byte;
++	u32 tx_desc_error;
++};
++
++struct ipqess_tx_desc {
++	__le16  len;
++	__le16  svlan_tag;
++	__le32  word1;
++	__le32  addr;
++	__le32  word3;
++} __aligned(16) __packed;
++
++struct ipqess_rx_desc {
++	__le16 rrd0;
++	__le16 rrd1;
++	__le16 rrd2;
++	__le16 rrd3;
++	__le16 rrd4;
++	__le16 rrd5;
++	__le16 rrd6;
++	__le16 rrd7;
++} __aligned(16) __packed;
++
++struct ipqess_buf {
++	struct sk_buff *skb;
++	dma_addr_t dma;
++	u32 flags;
++	u16 length;
++};
++
++struct ipqess_tx_ring {
++	struct napi_struct napi_tx;
++	u32 idx;
++	int ring_id;
++	struct ipqess *ess;
++	struct netdev_queue *nq;
++	struct ipqess_tx_desc *hw_desc;
++	struct ipqess_buf *buf;
++	dma_addr_t dma;
++	u16 count;
++	u16 head;
++	u16 tail;
++};
++
++struct ipqess_rx_ring {
++	struct napi_struct napi_rx;
++	u32 idx;
++	int ring_id;
++	struct ipqess *ess;
++	struct device *ppdev;
++	struct ipqess_rx_desc **hw_desc;
++	struct ipqess_buf *buf;
++	dma_addr_t dma;
++	u16 head;
++	u16 tail;
++	atomic_t refill_count;
++};
++
++struct ipqess_rx_ring_refill {
++	struct ipqess_rx_ring *rx_ring;
++	struct work_struct refill_work;
++};
++
++#define IPQESS_IRQ_NAME_LEN	32
++
++struct ipqess {
++	struct net_device *netdev;
++	void __iomem *hw_addr;
++
++	struct clk *ess_clk;
++	struct reset_control *ess_rst;
++
++	struct ipqess_rx_ring rx_ring[IPQESS_NETDEV_QUEUES];
++
++	struct platform_device *pdev;
++	struct phylink *phylink;
++	struct phylink_config phylink_config;
++	struct ipqess_tx_ring tx_ring[IPQESS_NETDEV_QUEUES];
++
++	struct ipqess_statistics ipqess_stats;
++
++	/* Protects stats */
++	spinlock_t stats_lock;
++	struct net_device_stats stats;
++
++	struct ipqess_rx_ring_refill rx_refill[IPQESS_NETDEV_QUEUES];
++	u32 tx_irq[IPQESS_MAX_TX_QUEUE];
++	char tx_irq_names[IPQESS_MAX_TX_QUEUE][IPQESS_IRQ_NAME_LEN];
++	u32 rx_irq[IPQESS_MAX_RX_QUEUE];
++	char rx_irq_names[IPQESS_MAX_TX_QUEUE][IPQESS_IRQ_NAME_LEN];
++};
++
++void ipqess_set_ethtool_ops(struct net_device *netdev);
++void ipqess_update_hw_stats(struct ipqess *ess);
++
++/* register definition */
++#define IPQESS_REG_MAS_CTRL 0x0
++#define IPQESS_REG_TIMEOUT_CTRL 0x004
++#define IPQESS_REG_DBG0 0x008
++#define IPQESS_REG_DBG1 0x00C
++#define IPQESS_REG_SW_CTRL0 0x100
++#define IPQESS_REG_SW_CTRL1 0x104
++
++/* Interrupt Status Register */
++#define IPQESS_REG_RX_ISR 0x200
++#define IPQESS_REG_TX_ISR 0x208
++#define IPQESS_REG_MISC_ISR 0x210
++#define IPQESS_REG_WOL_ISR 0x218
++
++#define IPQESS_MISC_ISR_RX_URG_Q(x) (1 << (x))
++
++#define IPQESS_MISC_ISR_AXIR_TIMEOUT 0x00000100
++#define IPQESS_MISC_ISR_AXIR_ERR 0x00000200
++#define IPQESS_MISC_ISR_TXF_DEAD 0x00000400
++#define IPQESS_MISC_ISR_AXIW_ERR 0x00000800
++#define IPQESS_MISC_ISR_AXIW_TIMEOUT 0x00001000
++
++#define IPQESS_WOL_ISR 0x00000001
++
++/* Interrupt Mask Register */
++#define IPQESS_REG_MISC_IMR 0x214
++#define IPQESS_REG_WOL_IMR 0x218
++
++#define IPQESS_RX_IMR_NORMAL_MASK 0x1
++#define IPQESS_TX_IMR_NORMAL_MASK 0x1
++#define IPQESS_MISC_IMR_NORMAL_MASK 0x80001FFF
++#define IPQESS_WOL_IMR_NORMAL_MASK 0x1
++
++/* Edma receive consumer index */
++#define IPQESS_REG_RX_SW_CONS_IDX_Q(x) (0x220 + ((x) << 2)) /* x is the queue id */
++
++/* Edma transmit consumer index */
++#define IPQESS_REG_TX_SW_CONS_IDX_Q(x) (0x240 + ((x) << 2)) /* x is the queue id */
++
++/* IRQ Moderator Initial Timer Register */
++#define IPQESS_REG_IRQ_MODRT_TIMER_INIT 0x280
++#define IPQESS_IRQ_MODRT_TIMER_MASK 0xFFFF
++#define IPQESS_IRQ_MODRT_RX_TIMER_SHIFT 0
++#define IPQESS_IRQ_MODRT_TX_TIMER_SHIFT 16
++
++/* Interrupt Control Register */
++#define IPQESS_REG_INTR_CTRL 0x284
++#define IPQESS_INTR_CLR_TYP_SHIFT 0
++#define IPQESS_INTR_SW_IDX_W_TYP_SHIFT 1
++#define IPQESS_INTR_CLEAR_TYPE_W1 0
++#define IPQESS_INTR_CLEAR_TYPE_R 1
++
++/* RX Interrupt Mask Register */
++#define IPQESS_REG_RX_INT_MASK_Q(x) (0x300 + ((x) << 2)) /* x = queue id */
++
++/* TX Interrupt mask register */
++#define IPQESS_REG_TX_INT_MASK_Q(x) (0x340 + ((x) << 2)) /* x = queue id */
++
++/* Load Ptr Register
++ * Software sets this bit after the initialization of the head and tail
++ */
++#define IPQESS_REG_TX_SRAM_PART 0x400
++#define IPQESS_LOAD_PTR_SHIFT 16
++
++/* TXQ Control Register */
++#define IPQESS_REG_TXQ_CTRL 0x404
++#define IPQESS_TXQ_CTRL_IP_OPTION_EN 0x10
++#define IPQESS_TXQ_CTRL_TXQ_EN 0x20
++#define IPQESS_TXQ_CTRL_ENH_MODE 0x40
++#define IPQESS_TXQ_CTRL_LS_8023_EN 0x80
++#define IPQESS_TXQ_CTRL_TPD_BURST_EN 0x100
++#define IPQESS_TXQ_CTRL_LSO_BREAK_EN 0x200
++#define IPQESS_TXQ_NUM_TPD_BURST_MASK 0xF
++#define IPQESS_TXQ_TXF_BURST_NUM_MASK 0xFFFF
++#define IPQESS_TXQ_NUM_TPD_BURST_SHIFT 0
++#define IPQESS_TXQ_TXF_BURST_NUM_SHIFT 16
++
++#define	IPQESS_REG_TXF_WATER_MARK 0x408 /* In 8-bytes */
++#define IPQESS_TXF_WATER_MARK_MASK 0x0FFF
++#define IPQESS_TXF_LOW_WATER_MARK_SHIFT 0
++#define IPQESS_TXF_HIGH_WATER_MARK_SHIFT 16
++#define IPQESS_TXQ_CTRL_BURST_MODE_EN 0x80000000
++
++/* WRR Control Register */
++#define IPQESS_REG_WRR_CTRL_Q0_Q3 0x40c
++#define IPQESS_REG_WRR_CTRL_Q4_Q7 0x410
++#define IPQESS_REG_WRR_CTRL_Q8_Q11 0x414
++#define IPQESS_REG_WRR_CTRL_Q12_Q15 0x418
++
++/* Weight round robin(WRR), it takes queue as input, and computes
++ * starting bits where we need to write the weight for a particular
++ * queue
++ */
++#define IPQESS_WRR_SHIFT(x) (((x) * 5) % 20)
++
++/* Tx Descriptor Control Register */
++#define IPQESS_REG_TPD_RING_SIZE 0x41C
++#define IPQESS_TPD_RING_SIZE_SHIFT 0
++#define IPQESS_TPD_RING_SIZE_MASK 0xFFFF
++
++/* Transmit descriptor base address */
++#define IPQESS_REG_TPD_BASE_ADDR_Q(x) (0x420 + ((x) << 2)) /* x = queue id */
++
++/* TPD Index Register */
++#define IPQESS_REG_TPD_IDX_Q(x) (0x460 + ((x) << 2)) /* x = queue id */
++
++#define IPQESS_TPD_PROD_IDX_BITS 0x0000FFFF
++#define IPQESS_TPD_CONS_IDX_BITS 0xFFFF0000
++#define IPQESS_TPD_PROD_IDX_MASK 0xFFFF
++#define IPQESS_TPD_CONS_IDX_MASK 0xFFFF
++#define IPQESS_TPD_PROD_IDX_SHIFT 0
++#define IPQESS_TPD_CONS_IDX_SHIFT 16
++
++/* TX Virtual Queue Mapping Control Register */
++#define IPQESS_REG_VQ_CTRL0 0x4A0
++#define IPQESS_REG_VQ_CTRL1 0x4A4
++
++/* Virtual QID shift, it takes queue as input, and computes
++ * Virtual QID position in virtual qid control register
++ */
++#define IPQESS_VQ_ID_SHIFT(i) (((i) * 3) % 24)
++
++/* Virtual Queue Default Value */
++#define IPQESS_VQ_REG_VALUE 0x240240
++
++/* Tx side Port Interface Control Register */
++#define IPQESS_REG_PORT_CTRL 0x4A8
++#define IPQESS_PAD_EN_SHIFT 15
++
++/* Tx side VLAN Configuration Register */
++#define IPQESS_REG_VLAN_CFG 0x4AC
++
++#define IPQESS_VLAN_CFG_SVLAN_TPID_SHIFT 0
++#define IPQESS_VLAN_CFG_SVLAN_TPID_MASK 0xffff
++#define IPQESS_VLAN_CFG_CVLAN_TPID_SHIFT 16
++#define IPQESS_VLAN_CFG_CVLAN_TPID_MASK 0xffff
++
++#define IPQESS_TX_CVLAN 16
++#define IPQESS_TX_INS_CVLAN 17
++#define IPQESS_TX_CVLAN_TAG_SHIFT 0
++
++#define IPQESS_TX_SVLAN 14
++#define IPQESS_TX_INS_SVLAN 15
++#define IPQESS_TX_SVLAN_TAG_SHIFT 16
++
++/* Tx Queue Packet Statistic Register */
++#define IPQESS_REG_TX_STAT_PKT_Q(x) (0x700 + ((x) << 3)) /* x = queue id */
++
++#define IPQESS_TX_STAT_PKT_MASK 0xFFFFFF
++
++/* Tx Queue Byte Statistic Register */
++#define IPQESS_REG_TX_STAT_BYTE_Q(x) (0x704 + ((x) << 3)) /* x = queue id */
++
++/* Load Balance Based Ring Offset Register */
++#define IPQESS_REG_LB_RING 0x800
++#define IPQESS_LB_RING_ENTRY_MASK 0xff
++#define IPQESS_LB_RING_ID_MASK 0x7
++#define IPQESS_LB_RING_PROFILE_ID_MASK 0x3
++#define IPQESS_LB_RING_ENTRY_BIT_OFFSET 8
++#define IPQESS_LB_RING_ID_OFFSET 0
++#define IPQESS_LB_RING_PROFILE_ID_OFFSET 3
++#define IPQESS_LB_REG_VALUE 0x6040200
++
++/* Load Balance Priority Mapping Register */
++#define IPQESS_REG_LB_PRI_START 0x804
++#define IPQESS_REG_LB_PRI_END 0x810
++#define IPQESS_LB_PRI_REG_INC 4
++#define IPQESS_LB_PRI_ENTRY_BIT_OFFSET 4
++#define IPQESS_LB_PRI_ENTRY_MASK 0xf
++
++/* RSS Priority Mapping Register */
++#define IPQESS_REG_RSS_PRI 0x820
++#define IPQESS_RSS_PRI_ENTRY_MASK 0xf
++#define IPQESS_RSS_RING_ID_MASK 0x7
++#define IPQESS_RSS_PRI_ENTRY_BIT_OFFSET 4
++
++/* RSS Indirection Register */
++#define IPQESS_REG_RSS_IDT(x) (0x840 + ((x) << 2)) /* x = No. of indirection table */
++#define IPQESS_NUM_IDT 16
++#define IPQESS_RSS_IDT_VALUE 0x64206420
++
++/* Default RSS Ring Register */
++#define IPQESS_REG_DEF_RSS 0x890
++#define IPQESS_DEF_RSS_MASK 0x7
++
++/* RSS Hash Function Type Register */
++#define IPQESS_REG_RSS_TYPE 0x894
++#define IPQESS_RSS_TYPE_NONE 0x01
++#define IPQESS_RSS_TYPE_IPV4TCP 0x02
++#define IPQESS_RSS_TYPE_IPV6_TCP 0x04
++#define IPQESS_RSS_TYPE_IPV4_UDP 0x08
++#define IPQESS_RSS_TYPE_IPV6UDP 0x10
++#define IPQESS_RSS_TYPE_IPV4 0x20
++#define IPQESS_RSS_TYPE_IPV6 0x40
++#define IPQESS_RSS_HASH_MODE_MASK 0x7f
++
++#define IPQESS_REG_RSS_HASH_VALUE 0x8C0
++
++#define IPQESS_REG_RSS_TYPE_RESULT 0x8C4
++
++#define IPQESS_HASH_TYPE_START 0
++#define IPQESS_HASH_TYPE_END 5
++#define IPQESS_HASH_TYPE_SHIFT 12
++
++#define IPQESS_RFS_FLOW_ENTRIES 1024
++#define IPQESS_RFS_FLOW_ENTRIES_MASK (IPQESS_RFS_FLOW_ENTRIES - 1)
++#define IPQESS_RFS_EXPIRE_COUNT_PER_CALL 128
++
++/* RFD Base Address Register */
++#define IPQESS_REG_RFD_BASE_ADDR_Q(x) (0x950 + ((x) << 2)) /* x = queue id */
++
++/* RFD Index Register */
++#define IPQESS_REG_RFD_IDX_Q(x) (0x9B0 + ((x) << 2)) /* x = queue id */
++
++#define IPQESS_RFD_PROD_IDX_BITS 0x00000FFF
++#define IPQESS_RFD_CONS_IDX_BITS 0x0FFF0000
++#define IPQESS_RFD_PROD_IDX_MASK 0xFFF
++#define IPQESS_RFD_CONS_IDX_MASK 0xFFF
++#define IPQESS_RFD_PROD_IDX_SHIFT 0
++#define IPQESS_RFD_CONS_IDX_SHIFT 16
++
++/* Rx Descriptor Control Register */
++#define IPQESS_REG_RX_DESC0 0xA10
++#define IPQESS_RFD_RING_SIZE_MASK 0xFFF
++#define IPQESS_RX_BUF_SIZE_MASK 0xFFFF
++#define IPQESS_RFD_RING_SIZE_SHIFT 0
++#define IPQESS_RX_BUF_SIZE_SHIFT 16
++
++#define IPQESS_REG_RX_DESC1 0xA14
++#define IPQESS_RXQ_RFD_BURST_NUM_MASK 0x3F
++#define IPQESS_RXQ_RFD_PF_THRESH_MASK 0x1F
++#define IPQESS_RXQ_RFD_LOW_THRESH_MASK 0xFFF
++#define IPQESS_RXQ_RFD_BURST_NUM_SHIFT 0
++#define IPQESS_RXQ_RFD_PF_THRESH_SHIFT 8
++#define IPQESS_RXQ_RFD_LOW_THRESH_SHIFT 16
++
++/* RXQ Control Register */
++#define IPQESS_REG_RXQ_CTRL 0xA18
++#define IPQESS_FIFO_THRESH_TYPE_SHIF 0
++#define IPQESS_FIFO_THRESH_128_BYTE 0x0
++#define IPQESS_FIFO_THRESH_64_BYTE 0x1
++#define IPQESS_RXQ_CTRL_RMV_VLAN 0x00000002
++#define IPQESS_RXQ_CTRL_EN_MASK			GENMASK(15, 8)
++#define IPQESS_RXQ_CTRL_EN(__qid)		BIT(8 + (__qid))
++
++/* AXI Burst Size Config */
++#define IPQESS_REG_AXIW_CTRL_MAXWRSIZE 0xA1C
++#define IPQESS_AXIW_MAXWRSIZE_VALUE 0x0
++
++/* Rx Statistics Register */
++#define IPQESS_REG_RX_STAT_BYTE_Q(x) (0xA30 + ((x) << 2)) /* x = queue id */
++#define IPQESS_REG_RX_STAT_PKT_Q(x) (0xA50 + ((x) << 2)) /* x = queue id */
++
++/* WoL Pattern Length Register */
++#define IPQESS_REG_WOL_PATTERN_LEN0 0xC00
++#define IPQESS_WOL_PT_LEN_MASK 0xFF
++#define IPQESS_WOL_PT0_LEN_SHIFT 0
++#define IPQESS_WOL_PT1_LEN_SHIFT 8
++#define IPQESS_WOL_PT2_LEN_SHIFT 16
++#define IPQESS_WOL_PT3_LEN_SHIFT 24
++
++#define IPQESS_REG_WOL_PATTERN_LEN1 0xC04
++#define IPQESS_WOL_PT4_LEN_SHIFT 0
++#define IPQESS_WOL_PT5_LEN_SHIFT 8
++#define IPQESS_WOL_PT6_LEN_SHIFT 16
++
++/* WoL Control Register */
++#define IPQESS_REG_WOL_CTRL 0xC08
++#define IPQESS_WOL_WK_EN 0x00000001
++#define IPQESS_WOL_MG_EN 0x00000002
++#define IPQESS_WOL_PT0_EN 0x00000004
++#define IPQESS_WOL_PT1_EN 0x00000008
++#define IPQESS_WOL_PT2_EN 0x00000010
++#define IPQESS_WOL_PT3_EN 0x00000020
++#define IPQESS_WOL_PT4_EN 0x00000040
++#define IPQESS_WOL_PT5_EN 0x00000080
++#define IPQESS_WOL_PT6_EN 0x00000100
++
++/* MAC Control Register */
++#define IPQESS_REG_MAC_CTRL0 0xC20
++#define IPQESS_REG_MAC_CTRL1 0xC24
++
++/* WoL Pattern Register */
++#define IPQESS_REG_WOL_PATTERN_START 0x5000
++#define IPQESS_PATTERN_PART_REG_OFFSET 0x40
++
++/* TX descriptor fields */
++#define IPQESS_TPD_HDR_SHIFT 0
++#define IPQESS_TPD_PPPOE_EN 0x00000100
++#define IPQESS_TPD_IP_CSUM_EN 0x00000200
++#define IPQESS_TPD_TCP_CSUM_EN 0x0000400
++#define IPQESS_TPD_UDP_CSUM_EN 0x00000800
++#define IPQESS_TPD_CUSTOM_CSUM_EN 0x00000C00
++#define IPQESS_TPD_LSO_EN 0x00001000
++#define IPQESS_TPD_LSO_V2_EN 0x00002000
++/* The VLAN_TAGGED bit is not used in the publicly available
++ * drivers. The definition has been stolen from the Atheros
++ * 'alx' driver (drivers/net/ethernet/atheros/alx/hw.h). It
++ * seems that it has the same meaning in regard to the EDMA
++ * hardware.
++ */
++#define IPQESS_TPD_VLAN_TAGGED 0x00004000
++#define IPQESS_TPD_IPV4_EN 0x00010000
++#define IPQESS_TPD_MSS_MASK 0x1FFF
++#define IPQESS_TPD_MSS_SHIFT 18
++#define IPQESS_TPD_CUSTOM_CSUM_SHIFT 18
++
++/* RRD descriptor fields */
++#define IPQESS_RRD_NUM_RFD_MASK 0x000F
++#define IPQESS_RRD_PKT_SIZE_MASK 0x3FFF
++#define IPQESS_RRD_SRC_PORT_NUM_MASK 0x4000
++#define IPQESS_RRD_SVLAN 0x8000
++#define IPQESS_RRD_FLOW_COOKIE_MASK 0x07FF
++
++#define IPQESS_RRD_PKT_SIZE_MASK 0x3FFF
++#define IPQESS_RRD_CSUM_FAIL_MASK 0xC000
++#define IPQESS_RRD_CVLAN 0x0001
++#define IPQESS_RRD_DESC_VALID 0x8000
++
++#define IPQESS_RRD_PRIORITY_SHIFT 4
++#define IPQESS_RRD_PRIORITY_MASK 0x7
++#define IPQESS_RRD_PORT_TYPE_SHIFT 7
++#define IPQESS_RRD_PORT_TYPE_MASK 0x1F
++
++#define IPQESS_RRD_PORT_ID_MASK 0x7000
++
++#endif
+--- /dev/null
++++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess_ethtool.c
+@@ -0,0 +1,164 @@
++// SPDX-License-Identifier: GPL-2.0 OR ISC
++/* Copyright (c) 2015 - 2016, The Linux Foundation. All rights reserved.
++ * Copyright (c) 2017 - 2018, John Crispin <john at phrozen.org>
++ * Copyright (c) 2021 - 2022, Maxime Chevallier <maxime.chevallier at bootlin.com>
++ *
++ */
++
++#include <linux/ethtool.h>
++#include <linux/netdevice.h>
++#include <linux/string.h>
++#include <linux/phylink.h>
++
++#include "ipqess.h"
++
++struct ipqess_ethtool_stats {
++	u8 string[ETH_GSTRING_LEN];
++	u32 offset;
++};
++
++#define IPQESS_STAT(m)    offsetof(struct ipqess_statistics, m)
++#define DRVINFO_LEN	32
++
++static const struct ipqess_ethtool_stats ipqess_stats[] = {
++	{"tx_q0_pkt", IPQESS_STAT(tx_q0_pkt)},
++	{"tx_q1_pkt", IPQESS_STAT(tx_q1_pkt)},
++	{"tx_q2_pkt", IPQESS_STAT(tx_q2_pkt)},
++	{"tx_q3_pkt", IPQESS_STAT(tx_q3_pkt)},
++	{"tx_q4_pkt", IPQESS_STAT(tx_q4_pkt)},
++	{"tx_q5_pkt", IPQESS_STAT(tx_q5_pkt)},
++	{"tx_q6_pkt", IPQESS_STAT(tx_q6_pkt)},
++	{"tx_q7_pkt", IPQESS_STAT(tx_q7_pkt)},
++	{"tx_q8_pkt", IPQESS_STAT(tx_q8_pkt)},
++	{"tx_q9_pkt", IPQESS_STAT(tx_q9_pkt)},
++	{"tx_q10_pkt", IPQESS_STAT(tx_q10_pkt)},
++	{"tx_q11_pkt", IPQESS_STAT(tx_q11_pkt)},
++	{"tx_q12_pkt", IPQESS_STAT(tx_q12_pkt)},
++	{"tx_q13_pkt", IPQESS_STAT(tx_q13_pkt)},
++	{"tx_q14_pkt", IPQESS_STAT(tx_q14_pkt)},
++	{"tx_q15_pkt", IPQESS_STAT(tx_q15_pkt)},
++	{"tx_q0_byte", IPQESS_STAT(tx_q0_byte)},
++	{"tx_q1_byte", IPQESS_STAT(tx_q1_byte)},
++	{"tx_q2_byte", IPQESS_STAT(tx_q2_byte)},
++	{"tx_q3_byte", IPQESS_STAT(tx_q3_byte)},
++	{"tx_q4_byte", IPQESS_STAT(tx_q4_byte)},
++	{"tx_q5_byte", IPQESS_STAT(tx_q5_byte)},
++	{"tx_q6_byte", IPQESS_STAT(tx_q6_byte)},
++	{"tx_q7_byte", IPQESS_STAT(tx_q7_byte)},
++	{"tx_q8_byte", IPQESS_STAT(tx_q8_byte)},
++	{"tx_q9_byte", IPQESS_STAT(tx_q9_byte)},
++	{"tx_q10_byte", IPQESS_STAT(tx_q10_byte)},
++	{"tx_q11_byte", IPQESS_STAT(tx_q11_byte)},
++	{"tx_q12_byte", IPQESS_STAT(tx_q12_byte)},
++	{"tx_q13_byte", IPQESS_STAT(tx_q13_byte)},
++	{"tx_q14_byte", IPQESS_STAT(tx_q14_byte)},
++	{"tx_q15_byte", IPQESS_STAT(tx_q15_byte)},
++	{"rx_q0_pkt", IPQESS_STAT(rx_q0_pkt)},
++	{"rx_q1_pkt", IPQESS_STAT(rx_q1_pkt)},
++	{"rx_q2_pkt", IPQESS_STAT(rx_q2_pkt)},
++	{"rx_q3_pkt", IPQESS_STAT(rx_q3_pkt)},
++	{"rx_q4_pkt", IPQESS_STAT(rx_q4_pkt)},
++	{"rx_q5_pkt", IPQESS_STAT(rx_q5_pkt)},
++	{"rx_q6_pkt", IPQESS_STAT(rx_q6_pkt)},
++	{"rx_q7_pkt", IPQESS_STAT(rx_q7_pkt)},
++	{"rx_q0_byte", IPQESS_STAT(rx_q0_byte)},
++	{"rx_q1_byte", IPQESS_STAT(rx_q1_byte)},
++	{"rx_q2_byte", IPQESS_STAT(rx_q2_byte)},
++	{"rx_q3_byte", IPQESS_STAT(rx_q3_byte)},
++	{"rx_q4_byte", IPQESS_STAT(rx_q4_byte)},
++	{"rx_q5_byte", IPQESS_STAT(rx_q5_byte)},
++	{"rx_q6_byte", IPQESS_STAT(rx_q6_byte)},
++	{"rx_q7_byte", IPQESS_STAT(rx_q7_byte)},
++	{"tx_desc_error", IPQESS_STAT(tx_desc_error)},
++};
++
++static int ipqess_get_strset_count(struct net_device *netdev, int sset)
++{
++	switch (sset) {
++	case ETH_SS_STATS:
++		return ARRAY_SIZE(ipqess_stats);
++	default:
++		netdev_dbg(netdev, "%s: Unsupported string set", __func__);
++		return -EOPNOTSUPP;
++	}
++}
++
++static void ipqess_get_strings(struct net_device *netdev, u32 stringset,
++			       u8 *data)
++{
++	u8 *p = data;
++	u32 i;
++
++	switch (stringset) {
++	case ETH_SS_STATS:
++		for (i = 0; i < ARRAY_SIZE(ipqess_stats); i++)
++			ethtool_puts(&p, ipqess_stats[i].string);
++		break;
++	}
++}
++
++static void ipqess_get_ethtool_stats(struct net_device *netdev,
++				     struct ethtool_stats *stats,
++				     uint64_t *data)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++	u32 *essstats = (u32 *)&ess->ipqess_stats;
++	int i;
++
++	spin_lock(&ess->stats_lock);
++
++	ipqess_update_hw_stats(ess);
++
++	for (i = 0; i < ARRAY_SIZE(ipqess_stats); i++)
++		data[i] = *(u32 *)(essstats + (ipqess_stats[i].offset / sizeof(u32)));
++
++	spin_unlock(&ess->stats_lock);
++}
++
++static void ipqess_get_drvinfo(struct net_device *dev,
++			       struct ethtool_drvinfo *info)
++{
++	strscpy(info->driver, "qca_ipqess", DRVINFO_LEN);
++	strscpy(info->bus_info, "axi", ETHTOOL_BUSINFO_LEN);
++}
++
++static int ipqess_get_link_ksettings(struct net_device *netdev,
++				     struct ethtool_link_ksettings *cmd)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++
++	return phylink_ethtool_ksettings_get(ess->phylink, cmd);
++}
++
++static int ipqess_set_link_ksettings(struct net_device *netdev,
++				     const struct ethtool_link_ksettings *cmd)
++{
++	struct ipqess *ess = netdev_priv(netdev);
++
++	return phylink_ethtool_ksettings_set(ess->phylink, cmd);
++}
++
++static void ipqess_get_ringparam(struct net_device *netdev,
++				 struct ethtool_ringparam *ring,
++				 struct kernel_ethtool_ringparam *kernel_ering,
++				 struct netlink_ext_ack *extack)
++{
++	ring->tx_max_pending = IPQESS_TX_RING_SIZE;
++	ring->rx_max_pending = IPQESS_RX_RING_SIZE;
++}
++
++static const struct ethtool_ops ipqesstool_ops = {
++	.get_drvinfo = &ipqess_get_drvinfo,
++	.get_link = &ethtool_op_get_link,
++	.get_link_ksettings = &ipqess_get_link_ksettings,
++	.set_link_ksettings = &ipqess_set_link_ksettings,
++	.get_strings = &ipqess_get_strings,
++	.get_sset_count = &ipqess_get_strset_count,
++	.get_ethtool_stats = &ipqess_get_ethtool_stats,
++	.get_ringparam = ipqess_get_ringparam,
++};
++
++void ipqess_set_ethtool_ops(struct net_device *netdev)
++{
++	netdev->ethtool_ops = &ipqesstool_ops;
++}
diff --git a/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch
new file mode 100644
index 0000000000..68d1a2e23b
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -0,0 +1,238 @@
+From a32e16b3c2fc1954ad6e09737439f60e5890278e Mon Sep 17 00:00:00 2001
+From: Maxime Chevallier <maxime.chevallier at bootlin.com>
+Date: Fri, 4 Nov 2022 18:41:49 +0100
+Subject: [PATCH] net: dsa: add out-of-band tagging protocol
+
+This tagging protocol is designed for the situation where the link
+between the MAC and the Switch is designed such that the Destination
+Port, which is usually embedded in some part of the Ethernet Header, is
+sent out-of-band, and isn't present at all in the Ethernet frame.
+
+This can happen when the MAC and Switch are tightly integrated on an
+SoC, as is the case with the Qualcomm IPQ4019 for example, where the DSA
+tag is inserted directly into the DMA descriptors. In that case,
+the MAC driver is responsible for sending the tag to the switch using
+the out-of-band medium. To do so, the MAC driver needs to have the
+information of the destination port for that skb.
+
+Add a new tagging protocol based on SKB extensions to convey the
+information about the destination port to the MAC driver
+
+Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
+---
+ Documentation/networking/dsa/dsa.rst | 13 +++++++-
+ MAINTAINERS                          |  1 +
+ include/linux/dsa/oob.h              | 16 +++++++++
+ include/linux/skbuff.h               |  3 ++
+ include/net/dsa.h                    |  2 ++
+ net/core/skbuff.c                    | 10 ++++++
+ net/dsa/Kconfig                      |  9 +++++
+ net/dsa/Makefile                     |  1 +
+ net/dsa/tag_oob.c                    | 49 ++++++++++++++++++++++++++++
+ 9 files changed, 103 insertions(+), 1 deletion(-)
+ create mode 100644 include/linux/dsa/oob.h
+ create mode 100644 net/dsa/tag_oob.c
+
+--- a/Documentation/networking/dsa/dsa.rst
++++ b/Documentation/networking/dsa/dsa.rst
+@@ -66,7 +66,8 @@ Switch tagging protocols
+ ------------------------
+ 
+ DSA supports many vendor-specific tagging protocols, one software-defined
+-tagging protocol, and a tag-less mode as well (``DSA_TAG_PROTO_NONE``).
++tagging protocol, a tag-less mode as well (``DSA_TAG_PROTO_NONE``) and an
++out-of-band tagging protocol (``DSA_TAG_PROTO_OOB``).
+ 
+ The exact format of the tag protocol is vendor specific, but in general, they
+ all contain something which:
+@@ -217,6 +218,16 @@ receive all frames regardless of the val
+ setting the ``promisc_on_master`` property of the ``struct dsa_device_ops``.
+ Note that this assumes a DSA-unaware master driver, which is the norm.
+ 
++Some SoCs have a tight integration between the conduit network interface and the
++embedded switch, such that the DSA tag isn't transmitted in the packet data,
++but through another media, using so-called out-of-band tagging. In that case,
++the host MAC driver is in charge of transmitting the tag to the switch.
++An example is the IPQ4019 SoC, that transmits the tag between the ipqess
++ethernet controller and the qca8k switch using the DMA descriptor. In that
++configuration, tag-chaining is permitted, but the OOB tag will always be the
++top-most switch in the tree. The tagger (``DSA_TAG_PROTO_OOB``) uses skb
++extensions to transmit the tag to and from the MAC driver.
++
+ Master network devices
+ ----------------------
+ 
+--- a/MAINTAINERS
++++ b/MAINTAINERS
+@@ -17081,6 +17081,7 @@ L:	netdev at vger.kernel.org
+ S:	Maintained
+ F:	Documentation/devicetree/bindings/net/qcom,ipq4019-ess-edma.yaml
+ F:	drivers/net/ethernet/qualcomm/ipqess/
++F:	net/dsa/tag_oob.c
+ 
+ QUALCOMM ETHQOS ETHERNET DRIVER
+ M:	Vinod Koul <vkoul at kernel.org>
+--- /dev/null
++++ b/include/linux/dsa/oob.h
+@@ -0,0 +1,16 @@
++/* SPDX-License-Identifier: GPL-2.0-only
++ * Copyright (C) 2022 Maxime Chevallier <maxime.chevallier at bootlin.com>
++ */
++
++#ifndef _NET_DSA_OOB_H
++#define _NET_DSA_OOB_H
++
++#include <linux/skbuff.h>
++
++struct dsa_oob_tag_info {
++	u16 port;
++};
++
++int dsa_oob_tag_push(struct sk_buff *skb, struct dsa_oob_tag_info *ti);
++int dsa_oob_tag_pop(struct sk_buff *skb, struct dsa_oob_tag_info *ti);
++#endif
+--- a/include/linux/skbuff.h
++++ b/include/linux/skbuff.h
+@@ -4588,6 +4588,9 @@ enum skb_ext_id {
+ #if IS_ENABLED(CONFIG_MCTP_FLOWS)
+ 	SKB_EXT_MCTP,
+ #endif
++#if IS_ENABLED(CONFIG_NET_DSA_TAG_OOB)
++	SKB_EXT_DSA_OOB,
++#endif
+ 	SKB_EXT_NUM, /* must be last */
+ };
+ 
+--- a/include/net/dsa.h
++++ b/include/net/dsa.h
+@@ -55,6 +55,7 @@ struct phylink_link_state;
+ #define DSA_TAG_PROTO_RTL8_4T_VALUE		25
+ #define DSA_TAG_PROTO_RZN1_A5PSW_VALUE		26
+ #define DSA_TAG_PROTO_LAN937X_VALUE		27
++#define DSA_TAG_PROTO_OOB_VALUE			28
+ 
+ enum dsa_tag_protocol {
+ 	DSA_TAG_PROTO_NONE		= DSA_TAG_PROTO_NONE_VALUE,
+@@ -85,6 +86,7 @@ enum dsa_tag_protocol {
+ 	DSA_TAG_PROTO_RTL8_4T		= DSA_TAG_PROTO_RTL8_4T_VALUE,
+ 	DSA_TAG_PROTO_RZN1_A5PSW	= DSA_TAG_PROTO_RZN1_A5PSW_VALUE,
+ 	DSA_TAG_PROTO_LAN937X		= DSA_TAG_PROTO_LAN937X_VALUE,
++	DSA_TAG_PROTO_OOB		= DSA_TAG_PROTO_OOB_VALUE,
+ };
+ 
+ struct dsa_switch;
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -62,8 +62,12 @@
+ #include <linux/mpls.h>
+ #include <linux/kcov.h>
+ #include <linux/if.h>
++#ifdef CONFIG_NET_DSA_TAG_OOB
++#include <linux/dsa/oob.h>
++#endif
+ 
+ #include <net/protocol.h>
++#include <net/dsa.h>
+ #include <net/dst.h>
+ #include <net/sock.h>
+ #include <net/checksum.h>
+@@ -4517,6 +4521,9 @@ static const u8 skb_ext_type_len[] = {
+ #if IS_ENABLED(CONFIG_MCTP_FLOWS)
+ 	[SKB_EXT_MCTP] = SKB_EXT_CHUNKSIZEOF(struct mctp_flow),
+ #endif
++#if IS_ENABLED(CONFIG_NET_DSA_TAG_OOB)
++	[SKB_EXT_DSA_OOB] = SKB_EXT_CHUNKSIZEOF(struct dsa_oob_tag_info),
++#endif
+ };
+ 
+ static __always_inline unsigned int skb_ext_total_length(void)
+@@ -4537,6 +4544,9 @@ static __always_inline unsigned int skb_
+ #if IS_ENABLED(CONFIG_MCTP_FLOWS)
+ 		skb_ext_type_len[SKB_EXT_MCTP] +
+ #endif
++#if IS_ENABLED(CONFIG_NET_DSA_TAG_OOB)
++		skb_ext_type_len[SKB_EXT_DSA_OOB] +
++#endif
+ 		0;
+ }
+ 
+--- a/net/dsa/Kconfig
++++ b/net/dsa/Kconfig
+@@ -113,6 +113,15 @@ config NET_DSA_TAG_OCELOT_8021Q
+ 	  this mode, less TCAM resources (VCAP IS1, IS2, ES0) are available for
+ 	  use with tc-flower.
+ 
++config NET_DSA_TAG_OOB
++	select SKB_EXTENSIONS
++	tristate "Tag driver for Out-of-band tagging drivers"
++	help
++	  Say Y or M if you want to enable support for pairs of embedded
++	  switches and host MAC drivers which perform demultiplexing and
++	  packet steering to ports using out of band metadata processed
++	  by the DSA master, rather than tags present in the packets.
++
+ config NET_DSA_TAG_QCA
+ 	tristate "Tag driver for Qualcomm Atheros QCA8K switches"
+ 	help
+--- a/net/dsa/Makefile
++++ b/net/dsa/Makefile
+@@ -22,6 +22,7 @@ obj-$(CONFIG_NET_DSA_TAG_LAN9303) += tag
+ obj-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o
+ obj-$(CONFIG_NET_DSA_TAG_OCELOT) += tag_ocelot.o
+ obj-$(CONFIG_NET_DSA_TAG_OCELOT_8021Q) += tag_ocelot_8021q.o
++obj-$(CONFIG_NET_DSA_TAG_OOB) += tag_oob.o
+ obj-$(CONFIG_NET_DSA_TAG_QCA) += tag_qca.o
+ obj-$(CONFIG_NET_DSA_TAG_RTL4_A) += tag_rtl4_a.o
+ obj-$(CONFIG_NET_DSA_TAG_RTL8_4) += tag_rtl8_4.o
+--- /dev/null
++++ b/net/dsa/tag_oob.c
+@@ -0,0 +1,49 @@
++// SPDX-License-Identifier: GPL-2.0-only
++
++/* Copyright (c) 2022, Maxime Chevallier <maxime.chevallier at bootlin.com> */
++
++#include <linux/bitfield.h>
++#include <linux/dsa/oob.h>
++#include <linux/skbuff.h>
++
++#include "dsa_priv.h"
++
++static struct sk_buff *oob_tag_xmit(struct sk_buff *skb,
++				    struct net_device *dev)
++{
++	struct dsa_oob_tag_info *tag_info = skb_ext_add(skb, SKB_EXT_DSA_OOB);
++	struct dsa_port *dp = dsa_slave_to_port(dev);
++
++	tag_info->port = dp->index;
++
++	return skb;
++}
++
++static struct sk_buff *oob_tag_rcv(struct sk_buff *skb,
++				   struct net_device *dev)
++{
++	struct dsa_oob_tag_info *tag_info = skb_ext_find(skb, SKB_EXT_DSA_OOB);
++
++	if (!tag_info)
++		return NULL;
++
++	skb->dev = dsa_master_find_slave(dev, 0, tag_info->port);
++	if (!skb->dev)
++		return NULL;
++
++	return skb;
++}
++
++static const struct dsa_device_ops oob_tag_dsa_ops = {
++	.name	= "oob",
++	.proto	= DSA_TAG_PROTO_OOB,
++	.xmit	= oob_tag_xmit,
++	.rcv	= oob_tag_rcv,
++};
++
++MODULE_LICENSE("GPL");
++MODULE_DESCRIPTION("DSA tag driver for out-of-band tagging");
++MODULE_AUTHOR("Maxime Chevallier <maxime.chevallier at bootlin.com>");
++MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_OOB);
++
++module_dsa_tag_driver(oob_tag_dsa_ops);
diff --git a/target/linux/ipq40xx/patches-6.1/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch b/target/linux/ipq40xx/patches-6.1/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
new file mode 100644
index 0000000000..ac0718ba2c
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
@@ -0,0 +1,173 @@
+From 4975e2b3f1d37bba04f262784cef0d5b7e0a30a4 Mon Sep 17 00:00:00 2001
+From: Maxime Chevallier <maxime.chevallier at bootlin.com>
+Date: Fri, 4 Nov 2022 18:41:50 +0100
+Subject: [PATCH] net: ipqess: Add out-of-band DSA tagging support
+
+On the IPQ4019, there's an 5 ports switch connected to the CPU through
+the IPQESS Ethernet controller. The way the DSA tag is sent-out to that
+switch is through the DMA descriptor, due to how tightly it is
+integrated with the switch.
+
+We use the out-of-band tagging protocol by getting the source
+port from the descriptor, push it into the skb extensions, and have the
+tagger pull it to infer the destination netdev. The reverse process is
+done on the TX side, where the driver pulls the tag from the skb and
+builds the descriptor accordingly.
+
+Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
+---
+ drivers/net/ethernet/qualcomm/Kconfig         |  1 +
+ drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 64 ++++++++++++++++++-
+ drivers/net/ethernet/qualcomm/ipqess/ipqess.h |  4 ++
+ 3 files changed, 68 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/ethernet/qualcomm/Kconfig
++++ b/drivers/net/ethernet/qualcomm/Kconfig
+@@ -64,6 +64,7 @@ config QCOM_IPQ4019_ESS_EDMA
+ 	tristate "Qualcomm Atheros IPQ4019 ESS EDMA support"
+ 	depends on (OF && ARCH_QCOM) || COMPILE_TEST
+ 	select PHYLINK
++	select NET_DSA_TAG_OOB
+ 	help
+ 	  This driver supports the Qualcomm Atheros IPQ40xx built-in
+ 	  ESS EDMA ethernet controller.
+--- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
++++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
+@@ -9,6 +9,7 @@
+ 
+ #include <linux/bitfield.h>
+ #include <linux/clk.h>
++#include <linux/dsa/oob.h>
+ #include <linux/if_vlan.h>
+ #include <linux/interrupt.h>
+ #include <linux/module.h>
+@@ -22,6 +23,7 @@
+ #include <linux/skbuff.h>
+ #include <linux/vmalloc.h>
+ #include <net/checksum.h>
++#include <net/dsa.h>
+ #include <net/ip6_checksum.h>
+ 
+ #include "ipqess.h"
+@@ -327,6 +329,7 @@ static int ipqess_rx_poll(struct ipqess_
+ 	tail &= IPQESS_RFD_CONS_IDX_MASK;
+ 
+ 	while (done < budget) {
++		struct dsa_oob_tag_info *tag_info;
+ 		struct ipqess_rx_desc *rd;
+ 		struct sk_buff *skb;
+ 
+@@ -406,6 +409,12 @@ static int ipqess_rx_poll(struct ipqess_
+ 			__vlan_hwaccel_put_tag(skb, htons(ETH_P_8021AD),
+ 					       le16_to_cpu(rd->rrd4));
+ 
++		if (likely(rx_ring->ess->dsa_ports)) {
++			tag_info = skb_ext_add(skb, SKB_EXT_DSA_OOB);
++			tag_info->port = FIELD_GET(IPQESS_RRD_PORT_ID_MASK,
++						   le16_to_cpu(rd->rrd1));
++		}
++
+ 		napi_gro_receive(&rx_ring->napi_rx, skb);
+ 
+ 		rx_ring->ess->stats.rx_packets++;
+@@ -706,6 +715,23 @@ static void ipqess_rollback_tx(struct ip
+ 	tx_ring->head = start_index;
+ }
+ 
++static void ipqess_process_dsa_tag_sh(struct ipqess *ess, struct sk_buff *skb,
++				      u32 *word3)
++{
++	struct dsa_oob_tag_info *tag_info;
++
++	if (unlikely(!ess->dsa_ports))
++		return;
++
++	tag_info = skb_ext_find(skb, SKB_EXT_DSA_OOB);
++	if (!tag_info)
++		return;
++
++	*word3 |= tag_info->port << IPQESS_TPD_PORT_BITMAP_SHIFT;
++	*word3 |= BIT(IPQESS_TPD_FROM_CPU_SHIFT);
++	*word3 |= 0x3e << IPQESS_TPD_PORT_BITMAP_SHIFT;
++}
++
+ static int ipqess_tx_map_and_fill(struct ipqess_tx_ring *tx_ring,
+ 				  struct sk_buff *skb)
+ {
+@@ -716,6 +742,8 @@ static int ipqess_tx_map_and_fill(struct
+ 	u16 len;
+ 	int i;
+ 
++	ipqess_process_dsa_tag_sh(tx_ring->ess, skb, &word3);
++
+ 	if (skb_is_gso(skb)) {
+ 		if (skb_shinfo(skb)->gso_type & SKB_GSO_TCPV4) {
+ 			lso_word1 |= IPQESS_TPD_IPV4_EN;
+@@ -917,6 +945,33 @@ static const struct net_device_ops ipqes
+ 	.ndo_tx_timeout		= ipqess_tx_timeout,
+ };
+ 
++static int ipqess_netdevice_event(struct notifier_block *nb,
++				  unsigned long event, void *ptr)
++{
++	struct ipqess *ess = container_of(nb, struct ipqess, netdev_notifier);
++	struct net_device *dev = netdev_notifier_info_to_dev(ptr);
++	struct netdev_notifier_changeupper_info *info;
++
++	if (dev != ess->netdev)
++		return NOTIFY_DONE;
++
++	switch (event) {
++	case NETDEV_CHANGEUPPER:
++		info = ptr;
++
++		if (!dsa_slave_dev_check(info->upper_dev))
++			return NOTIFY_DONE;
++
++		if (info->linking)
++			ess->dsa_ports++;
++		else
++			ess->dsa_ports--;
++
++		return NOTIFY_DONE;
++	}
++	return NOTIFY_OK;
++}
++
+ static void ipqess_hw_stop(struct ipqess *ess)
+ {
+ 	int i;
+@@ -1184,12 +1239,19 @@ static int ipqess_axi_probe(struct platf
+ 		netif_napi_add(netdev, &ess->rx_ring[i].napi_rx, ipqess_rx_napi);
+ 	}
+ 
+-	err = register_netdev(netdev);
++	ess->netdev_notifier.notifier_call = ipqess_netdevice_event;
++	err = register_netdevice_notifier(&ess->netdev_notifier);
+ 	if (err)
+ 		goto err_hw_stop;
+ 
++	err = register_netdev(netdev);
++	if (err)
++		goto err_notifier_unregister;
++
+ 	return 0;
+ 
++err_notifier_unregister:
++	unregister_netdevice_notifier(&ess->netdev_notifier);
+ err_hw_stop:
+ 	ipqess_hw_stop(ess);
+ 
+--- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.h
++++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.h
+@@ -171,6 +171,10 @@ struct ipqess {
+ 	struct platform_device *pdev;
+ 	struct phylink *phylink;
+ 	struct phylink_config phylink_config;
++
++	struct notifier_block netdev_notifier;
++	int dsa_ports;
++
+ 	struct ipqess_tx_ring tx_ring[IPQESS_NETDEV_QUEUES];
+ 
+ 	struct ipqess_statistics ipqess_stats;
diff --git a/target/linux/ipq40xx/patches-6.1/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch b/target/linux/ipq40xx/patches-6.1/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch
new file mode 100644
index 0000000000..bd890e5c71
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch
@@ -0,0 +1,75 @@
+From 5f15f7f170c76220dfd36cb9037d7848d1fc4aaf Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko at gmail.com>
+Date: Tue, 15 Aug 2023 14:30:50 +0200
+Subject: [PATCH] net: qualcomm: ipqess: release IRQ-s on network device stop
+
+Currently, IPQESS driver is obtaining the IRQ-s during ndo_open, but they
+are never freed as they are device managed.
+
+However, it is not enough for them to be released when device is removed
+as the same network device can be stopped and started multiple times which
+on the second start would lead to IRQ request to fail with -EBUSY as they
+have already been requested before and are not of the shared type with:
+[   34.480769] ipqess-edma c080000.ethernet eth0: Link is Down
+[   34.488070] ipqess-edma c080000.ethernet eth0: ipqess_open
+[   34.488131] genirq: Flags mismatch irq 37. 00000001 (c080000.ethernet:txq0) vs. 00000001 (c080000.ethernet:txq0)
+[   34.494527] ipqess-edma c080000.ethernet eth0: ipqess_open
+[   34.502892] genirq: Flags mismatch irq 37. 00000001 (c080000.ethernet:txq0) vs. 00000001 (c080000.ethernet:txq0)
+[   34.508137] qca8k-ipq4019 c000000.switch lan1: failed to open master eth0
+[   34.518966] br-lan: port 1(lan1) entered blocking state
+[   34.525165] br-lan: port 1(lan1) entered disabled state
+[   34.530633] device lan1 entered promiscuous mode
+[   34.548598] ipqess-edma c080000.ethernet eth0: ipqess_open
+[   34.548660] genirq: Flags mismatch irq 37. 00000001 (c080000.ethernet:txq0) vs. 00000001 (c080000.ethernet:txq0)
+[   34.553111] qca8k-ipq4019 c000000.switch lan2: failed to open master eth0
+[   34.563841] br-lan: port 2(lan2) entered blocking state
+[   34.570083] br-lan: port 2(lan2) entered disabled state
+[   34.575530] device lan2 entered promiscuous mode
+[   34.587067] ipqess-edma c080000.ethernet eth0: ipqess_open
+[   34.587132] genirq: Flags mismatch irq 37. 00000001 (c080000.ethernet:txq0) vs. 00000001 (c080000.ethernet:txq0)
+[   34.591579] qca8k-ipq4019 c000000.switch lan3: failed to open master eth0
+[   34.602451] br-lan: port 3(lan3) entered blocking state
+[   34.608496] br-lan: port 3(lan3) entered disabled state
+[   34.614084] device lan3 entered promiscuous mode
+[   34.626405] ipqess-edma c080000.ethernet eth0: ipqess_open
+[   34.626468] genirq: Flags mismatch irq 37. 00000001 (c080000.ethernet:txq0) vs. 00000001 (c080000.ethernet:txq0)
+[   34.630871] qca8k-ipq4019 c000000.switch lan4: failed to open master eth0
+[   34.641689] br-lan: port 4(lan4) entered blocking state
+[   34.647834] br-lan: port 4(lan4) entered disabled state
+[   34.653455] device lan4 entered promiscuous mode
+[   34.667282] ipqess-edma c080000.ethernet eth0: ipqess_open
+[   34.667364] genirq: Flags mismatch irq 37. 00000001 (c080000.ethernet:txq0) vs. 00000001 (c080000.ethernet:txq0)
+[   34.671830] qca8k-ipq4019 c000000.switch wan: failed to open master eth0
+
+So, lets free the IRQ-s on ndo_stop after stopping NAPI and HW IRQ-s.
+
+Signed-off-by: Robert Marko <robimarko at gmail.com>
+---
+ drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
++++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
+@@ -636,9 +636,22 @@ static int ipqess_stop(struct net_device
+ 	netif_tx_stop_all_queues(netdev);
+ 	phylink_stop(ess->phylink);
+ 	ipqess_irq_disable(ess);
++
+ 	for (i = 0; i < IPQESS_NETDEV_QUEUES; i++) {
++		int qid;
++
+ 		napi_disable(&ess->tx_ring[i].napi_tx);
+ 		napi_disable(&ess->rx_ring[i].napi_rx);
++
++		qid = ess->tx_ring[i].idx;
++		devm_free_irq(&netdev->dev,
++			      ess->tx_irq[qid],
++			      &ess->tx_ring[i]);
++
++		qid = ess->rx_ring[i].idx;
++		devm_free_irq(&netdev->dev,
++			      ess->rx_irq[qid],
++			      &ess->rx_ring[i]);
+ 	}
+ 
+ 	return 0;
diff --git a/target/linux/ipq40xx/patches-6.1/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch b/target/linux/ipq40xx/patches-6.1/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch
new file mode 100644
index 0000000000..cd58677284
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch
@@ -0,0 +1,49 @@
+From 9fa4a57a65e270e4d579cace4de5c438f46c7d12 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko at gmail.com>
+Date: Tue, 15 Aug 2023 14:38:44 +0200
+Subject: [PATCH] net: qualcomm: ipqess: enable threaded NAPI by default
+
+Threaded NAPI provides a nice performance boost, so lets enable it by
+default.
+
+We do however need to move the __napi_schedule() after HW IRQ has been
+cleared in order to avoid concurency issues.
+
+Signed-off-by: Robert Marko <robimarko at gmail.com>
+---
+ drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 6 ++++--
+ 1 file changed, 4 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
++++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
+@@ -530,9 +530,9 @@ static irqreturn_t ipqess_interrupt_tx(i
+ 	struct ipqess_tx_ring *tx_ring = (struct ipqess_tx_ring *)priv;
+ 
+ 	if (likely(napi_schedule_prep(&tx_ring->napi_tx))) {
+-		__napi_schedule(&tx_ring->napi_tx);
+ 		ipqess_w32(tx_ring->ess, IPQESS_REG_TX_INT_MASK_Q(tx_ring->idx),
+ 			   0x0);
++		__napi_schedule(&tx_ring->napi_tx);
+ 	}
+ 
+ 	return IRQ_HANDLED;
+@@ -543,9 +543,9 @@ static irqreturn_t ipqess_interrupt_rx(i
+ 	struct ipqess_rx_ring *rx_ring = (struct ipqess_rx_ring *)priv;
+ 
+ 	if (likely(napi_schedule_prep(&rx_ring->napi_rx))) {
+-		__napi_schedule(&rx_ring->napi_rx);
+ 		ipqess_w32(rx_ring->ess, IPQESS_REG_RX_INT_MASK_Q(rx_ring->idx),
+ 			   0x0);
++		__napi_schedule(&rx_ring->napi_rx);
+ 	}
+ 
+ 	return IRQ_HANDLED;
+@@ -1261,6 +1261,8 @@ static int ipqess_axi_probe(struct platf
+ 	if (err)
+ 		goto err_notifier_unregister;
+ 
++	dev_set_threaded(netdev, true);
++
+ 	return 0;
+ 
+ err_notifier_unregister:
diff --git a/target/linux/ipq40xx/patches-6.1/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch b/target/linux/ipq40xx/patches-6.1/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
new file mode 100644
index 0000000000..27bdebdb93
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
@@ -0,0 +1,78 @@
+From 5b71dbb867680887d47954ce1cc145cb747cbce6 Mon Sep 17 00:00:00 2001
+From: Maxime Chevallier <maxime.chevallier at bootlin.com>
+Date: Fri, 4 Nov 2022 18:41:51 +0100
+Subject: [PATCH] ARM: dts: qcom: ipq4019: Add description for the IPQESS
+ Ethernet controller
+
+The Qualcomm IPQ4019 includes an internal 5 ports switch, which is
+connected to the CPU through the internal IPQESS Ethernet controller.
+
+Add support for this internal interface, which is internally connected to a
+modified version of the QCA8K Ethernet switch.
+
+This Ethernet controller only support a specific internal interface mode
+for connection to the switch.
+
+Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
+Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+---
+ arch/arm/boot/dts/qcom-ipq4019.dtsi | 48 +++++++++++++++++++++++++++++
+ 1 file changed, 48 insertions(+)
+
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+@@ -594,6 +594,54 @@
+ 			status = "disabled";
+ 		};
+ 
++		gmac: ethernet at c080000 {
++			compatible = "qcom,ipq4019-ess-edma";
++			reg = <0xc080000 0x8000>;
++			resets = <&gcc ESS_RESET>;
++			reset-names = "ess";
++			clocks = <&gcc GCC_ESS_CLK>;
++			clock-names = "ess";
++			interrupts = <GIC_SPI  65 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  66 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  67 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  68 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  69 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  70 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  71 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  72 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  73 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  74 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  75 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  76 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  77 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  78 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  79 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI  80 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 240 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 241 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 242 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 243 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 244 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 245 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 246 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 247 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 248 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 249 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 250 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 251 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 252 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 253 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 254 IRQ_TYPE_EDGE_RISING>,
++				     <GIC_SPI 255 IRQ_TYPE_EDGE_RISING>;
++			phy-mode = "internal";
++			status = "disabled";
++			fixed-link {
++				speed = <1000>;
++				full-duplex;
++				pause;
++			};
++		};
++
+ 		mdio: mdio at 90000 {
+ 			#address-cells = <1>;
+ 			#size-cells = <0>;
diff --git a/target/linux/ipq40xx/patches-6.1/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch b/target/linux/ipq40xx/patches-6.1/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
new file mode 100644
index 0000000000..992884cf31
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
@@ -0,0 +1,1132 @@
+From a38126870488398932e017dd9d76174b4aadbbbb Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko at sartura.hr>
+Date: Sat, 10 Sep 2022 15:46:09 +0200
+Subject: [PATCH] net: dsa: qca8k: add IPQ4019 built-in switch support
+
+Qualcomm IPQ40xx SoC-s have a variant of QCA8337N switch built-in.
+
+It shares most of the stuff with its external counterpart, however it is
+modified for the SoC.
+Namely, it doesn't have second CPU port (Port 6), so it has 6 ports
+instead of 7.
+It also has no built-in PHY-s but rather requires external PSGMII based
+companion PHY-s (QCA8072 and QCA8075) for which it first needs to carry
+out calibration before using them.
+PSGMII has a SoC built-in PHY that is used to connect to the PHY-s which
+unfortunately requires some magic values as the datasheet doesnt document
+the bits that are being set or the register at all.
+
+Since its built-in it is MMIO like other peripherals and doesn't have its
+own MDIO bus but depends on the SoC provided one.
+
+CPU connection is at Port 0 and it uses some kind of a internal connection
+and no traditional RGMII/SGMII.
+
+It also doesn't use in-band tagging like other qca8k switches so a out of
+band based tagger is used.
+
+Signed-off-by: Robert Marko <robert.marko at sartura.hr>
+---
+ drivers/net/dsa/qca/Kconfig         |   8 +
+ drivers/net/dsa/qca/Makefile        |   1 +
+ drivers/net/dsa/qca/qca8k-common.c  |   6 +-
+ drivers/net/dsa/qca/qca8k-ipq4019.c | 948 ++++++++++++++++++++++++++++
+ drivers/net/dsa/qca/qca8k.h         |  56 ++
+ 5 files changed, 1016 insertions(+), 3 deletions(-)
+ create mode 100644 drivers/net/dsa/qca/qca8k-ipq4019.c
+
+--- a/drivers/net/dsa/qca/Kconfig
++++ b/drivers/net/dsa/qca/Kconfig
+@@ -23,3 +23,11 @@ config NET_DSA_QCA8K_LEDS_SUPPORT
+ 	help
+ 	  This enabled support for LEDs present on the Qualcomm Atheros
+ 	  QCA8K Ethernet switch chips.
++
++config NET_DSA_QCA8K_IPQ4019
++	tristate "Qualcomm Atheros IPQ4019 Ethernet switch support"
++	select NET_DSA_TAG_OOB
++	select REGMAP_MMIO
++	help
++	  This enables support for the switch built-into Qualcomm Atheros
++	  IPQ4019 SoCs.
+--- a/drivers/net/dsa/qca/Makefile
++++ b/drivers/net/dsa/qca/Makefile
+@@ -5,3 +5,4 @@ qca8k-y 			+= qca8k-common.o qca8k-8xxx.
+ ifdef CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT
+ qca8k-y				+= qca8k-leds.o
+ endif
++obj-$(CONFIG_NET_DSA_QCA8K_IPQ4019)	+= qca8k-ipq4019.o qca8k-common.o
+--- a/drivers/net/dsa/qca/qca8k-common.c
++++ b/drivers/net/dsa/qca/qca8k-common.c
+@@ -412,7 +412,7 @@ static int qca8k_vlan_del(struct qca8k_p
+ 
+ 	/* Check if we're the last member to be removed */
+ 	del = true;
+-	for (i = 0; i < QCA8K_NUM_PORTS; i++) {
++	for (i = 0; i < priv->ds->num_ports; i++) {
+ 		mask = QCA8K_VTU_FUNC0_EG_MODE_PORT_NOT(i);
+ 
+ 		if ((reg & mask) != mask) {
+@@ -653,7 +653,7 @@ int qca8k_port_bridge_join(struct dsa_sw
+ 	cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
+ 	port_mask = BIT(cpu_port);
+ 
+-	for (i = 0; i < QCA8K_NUM_PORTS; i++) {
++	for (i = 0; i < ds->num_ports; i++) {
+ 		if (dsa_is_cpu_port(ds, i))
+ 			continue;
+ 		if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
+@@ -685,7 +685,7 @@ void qca8k_port_bridge_leave(struct dsa_
+ 
+ 	cpu_port = dsa_to_port(ds, port)->cpu_dp->index;
+ 
+-	for (i = 0; i < QCA8K_NUM_PORTS; i++) {
++	for (i = 0; i < ds->num_ports; i++) {
+ 		if (dsa_is_cpu_port(ds, i))
+ 			continue;
+ 		if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
+--- /dev/null
++++ b/drivers/net/dsa/qca/qca8k-ipq4019.c
+@@ -0,0 +1,948 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Copyright (C) 2009 Felix Fietkau <nbd at nbd.name>
++ * Copyright (C) 2011-2012, 2020-2021 Gabor Juhos <juhosg at openwrt.org>
++ * Copyright (c) 2015, 2019, The Linux Foundation. All rights reserved.
++ * Copyright (c) 2016 John Crispin <john at phrozen.org>
++ * Copyright (c) 2022 Robert Marko <robert.marko at sartura.hr>
++ */
++
++#include <linux/module.h>
++#include <linux/phy.h>
++#include <linux/netdevice.h>
++#include <linux/bitfield.h>
++#include <linux/regmap.h>
++#include <net/dsa.h>
++#include <linux/of_net.h>
++#include <linux/of_mdio.h>
++#include <linux/of_platform.h>
++#include <linux/mdio.h>
++#include <linux/phylink.h>
++
++#include "qca8k.h"
++
++static struct regmap_config qca8k_ipq4019_regmap_config = {
++	.reg_bits = 32,
++	.val_bits = 32,
++	.reg_stride = 4,
++	.max_register = 0x16ac, /* end MIB - Port6 range */
++	.rd_table = &qca8k_readable_table,
++};
++
++static struct regmap_config qca8k_ipq4019_psgmii_phy_regmap_config = {
++	.name = "psgmii-phy",
++	.reg_bits = 32,
++	.val_bits = 32,
++	.reg_stride = 4,
++	.max_register = 0x7fc,
++};
++
++static enum dsa_tag_protocol
++qca8k_ipq4019_get_tag_protocol(struct dsa_switch *ds, int port,
++			       enum dsa_tag_protocol mp)
++{
++	return DSA_TAG_PROTO_OOB;
++}
++
++static struct phylink_pcs *
++qca8k_ipq4019_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
++				     phy_interface_t interface)
++{
++	struct qca8k_priv *priv = ds->priv;
++	struct phylink_pcs *pcs = NULL;
++
++	switch (interface) {
++	case PHY_INTERFACE_MODE_PSGMII:
++		switch (port) {
++		case 0:
++			pcs = &priv->pcs_port_0.pcs;
++			break;
++		}
++		break;
++	default:
++		break;
++	}
++
++	return pcs;
++}
++
++static int qca8k_ipq4019_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
++				    phy_interface_t interface,
++				    const unsigned long *advertising,
++				    bool permit_pause_to_mac)
++{
++	return 0;
++}
++
++static void qca8k_ipq4019_pcs_an_restart(struct phylink_pcs *pcs)
++{
++}
++
++static struct qca8k_pcs *pcs_to_qca8k_pcs(struct phylink_pcs *pcs)
++{
++	return container_of(pcs, struct qca8k_pcs, pcs);
++}
++
++static void qca8k_ipq4019_pcs_get_state(struct phylink_pcs *pcs,
++					struct phylink_link_state *state)
++{
++	struct qca8k_priv *priv = pcs_to_qca8k_pcs(pcs)->priv;
++	int port = pcs_to_qca8k_pcs(pcs)->port;
++	u32 reg;
++	int ret;
++
++	ret = qca8k_read(priv, QCA8K_REG_PORT_STATUS(port), &reg);
++	if (ret < 0) {
++		state->link = false;
++		return;
++	}
++
++	state->link = !!(reg & QCA8K_PORT_STATUS_LINK_UP);
++	state->an_complete = state->link;
++	state->duplex = (reg & QCA8K_PORT_STATUS_DUPLEX) ? DUPLEX_FULL :
++							   DUPLEX_HALF;
++
++	switch (reg & QCA8K_PORT_STATUS_SPEED) {
++	case QCA8K_PORT_STATUS_SPEED_10:
++		state->speed = SPEED_10;
++		break;
++	case QCA8K_PORT_STATUS_SPEED_100:
++		state->speed = SPEED_100;
++		break;
++	case QCA8K_PORT_STATUS_SPEED_1000:
++		state->speed = SPEED_1000;
++		break;
++	default:
++		state->speed = SPEED_UNKNOWN;
++		break;
++	}
++
++	if (reg & QCA8K_PORT_STATUS_RXFLOW)
++		state->pause |= MLO_PAUSE_RX;
++	if (reg & QCA8K_PORT_STATUS_TXFLOW)
++		state->pause |= MLO_PAUSE_TX;
++}
++
++static const struct phylink_pcs_ops qca8k_pcs_ops = {
++	.pcs_get_state = qca8k_ipq4019_pcs_get_state,
++	.pcs_config = qca8k_ipq4019_pcs_config,
++	.pcs_an_restart = qca8k_ipq4019_pcs_an_restart,
++};
++
++static void qca8k_ipq4019_setup_pcs(struct qca8k_priv *priv,
++				    struct qca8k_pcs *qpcs,
++				    int port)
++{
++	qpcs->pcs.ops = &qca8k_pcs_ops;
++
++	/* We don't have interrupts for link changes, so we need to poll */
++	qpcs->pcs.poll = true;
++	qpcs->priv = priv;
++	qpcs->port = port;
++}
++
++static void qca8k_ipq4019_phylink_get_caps(struct dsa_switch *ds, int port,
++					   struct phylink_config *config)
++{
++	switch (port) {
++	case 0: /* CPU port */
++		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
++			  config->supported_interfaces);
++		break;
++
++	case 1:
++	case 2:
++	case 3:
++		__set_bit(PHY_INTERFACE_MODE_PSGMII,
++			  config->supported_interfaces);
++		break;
++	case 4:
++	case 5:
++		phy_interface_set_rgmii(config->supported_interfaces);
++		__set_bit(PHY_INTERFACE_MODE_PSGMII,
++			  config->supported_interfaces);
++		break;
++	}
++
++	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
++		MAC_10 | MAC_100 | MAC_1000FD;
++
++	config->legacy_pre_march2020 = false;
++}
++
++static void
++qca8k_phylink_ipq4019_mac_link_down(struct dsa_switch *ds, int port,
++				    unsigned int mode,
++				    phy_interface_t interface)
++{
++	struct qca8k_priv *priv = ds->priv;
++
++	qca8k_port_set_status(priv, port, 0);
++}
++
++static void
++qca8k_phylink_ipq4019_mac_link_up(struct dsa_switch *ds, int port,
++				  unsigned int mode, phy_interface_t interface,
++				  struct phy_device *phydev, int speed,
++				  int duplex, bool tx_pause, bool rx_pause)
++{
++	struct qca8k_priv *priv = ds->priv;
++	u32 reg;
++
++	if (phylink_autoneg_inband(mode)) {
++		reg = QCA8K_PORT_STATUS_LINK_AUTO;
++	} else {
++		switch (speed) {
++		case SPEED_10:
++			reg = QCA8K_PORT_STATUS_SPEED_10;
++			break;
++		case SPEED_100:
++			reg = QCA8K_PORT_STATUS_SPEED_100;
++			break;
++		case SPEED_1000:
++			reg = QCA8K_PORT_STATUS_SPEED_1000;
++			break;
++		default:
++			reg = QCA8K_PORT_STATUS_LINK_AUTO;
++			break;
++		}
++
++		if (duplex == DUPLEX_FULL)
++			reg |= QCA8K_PORT_STATUS_DUPLEX;
++
++		if (rx_pause || dsa_is_cpu_port(ds, port))
++			reg |= QCA8K_PORT_STATUS_RXFLOW;
++
++		if (tx_pause || dsa_is_cpu_port(ds, port))
++			reg |= QCA8K_PORT_STATUS_TXFLOW;
++	}
++
++	reg |= QCA8K_PORT_STATUS_TXMAC | QCA8K_PORT_STATUS_RXMAC;
++
++	qca8k_write(priv, QCA8K_REG_PORT_STATUS(port), reg);
++}
++
++static int psgmii_vco_calibrate(struct qca8k_priv *priv)
++{
++	int val, ret;
++
++	if (!priv->psgmii_ethphy) {
++		dev_err(priv->dev, "PSGMII eth PHY missing, calibration failed!\n");
++		return -ENODEV;
++	}
++
++	/* Fix PSGMII RX 20bit */
++	ret = phy_write(priv->psgmii_ethphy, MII_BMCR, 0x5b);
++	/* Reset PHY PSGMII */
++	ret = phy_write(priv->psgmii_ethphy, MII_BMCR, 0x1b);
++	/* Release PHY PSGMII reset */
++	ret = phy_write(priv->psgmii_ethphy, MII_BMCR, 0x5b);
++
++	/* Poll for VCO PLL calibration finish - Malibu(QCA8075) */
++	ret = phy_read_mmd_poll_timeout(priv->psgmii_ethphy,
++					MDIO_MMD_PMAPMD,
++					0x28, val,
++					(val & BIT(0)),
++					10000, 1000000,
++					false);
++	if (ret) {
++		dev_err(priv->dev, "QCA807x PSGMII VCO calibration PLL not ready\n");
++		return ret;
++	}
++	mdelay(50);
++
++	/* Freeze PSGMII RX CDR */
++	ret = phy_write(priv->psgmii_ethphy, MII_RESV2, 0x2230);
++
++	/* Start PSGMIIPHY VCO PLL calibration */
++	ret = regmap_set_bits(priv->psgmii,
++			PSGMIIPHY_VCO_CALIBRATION_CONTROL_REGISTER_1,
++			PSGMIIPHY_REG_PLL_VCO_CALIB_RESTART);
++
++	/* Poll for PSGMIIPHY PLL calibration finish - Dakota(IPQ40xx) */
++	ret = regmap_read_poll_timeout(priv->psgmii,
++				       PSGMIIPHY_VCO_CALIBRATION_CONTROL_REGISTER_2,
++				       val, val & PSGMIIPHY_REG_PLL_VCO_CALIB_READY,
++				       10000, 1000000);
++	if (ret) {
++		dev_err(priv->dev, "IPQ PSGMIIPHY VCO calibration PLL not ready\n");
++		return ret;
++	}
++	mdelay(50);
++
++	/* Release PSGMII RX CDR */
++	ret = phy_write(priv->psgmii_ethphy, MII_RESV2, 0x3230);
++	/* Release PSGMII RX 20bit */
++	ret = phy_write(priv->psgmii_ethphy, MII_BMCR, 0x5f);
++	mdelay(200);
++
++	return ret;
++}
++
++static void
++qca8k_switch_port_loopback_on_off(struct qca8k_priv *priv, int port, int on)
++{
++	u32 val = QCA8K_PORT_LOOKUP_LOOPBACK_EN;
++
++	if (on == 0)
++		val = 0;
++
++	qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
++		  QCA8K_PORT_LOOKUP_LOOPBACK_EN, val);
++}
++
++static int
++qca8k_wait_for_phy_link_state(struct phy_device *phy, int need_status)
++{
++	int a;
++	u16 status;
++
++	for (a = 0; a < 100; a++) {
++		status = phy_read(phy, MII_QCA8075_SSTATUS);
++		status &= QCA8075_PHY_SPEC_STATUS_LINK;
++		status = !!status;
++		if (status == need_status)
++			return 0;
++		mdelay(8);
++	}
++
++	return -1;
++}
++
++static void
++qca8k_phy_loopback_on_off(struct qca8k_priv *priv, struct phy_device *phy,
++			  int sw_port, int on)
++{
++	if (on) {
++		phy_write(phy, MII_BMCR, BMCR_ANENABLE | BMCR_RESET);
++		phy_modify(phy, MII_BMCR, BMCR_PDOWN, BMCR_PDOWN);
++		qca8k_wait_for_phy_link_state(phy, 0);
++		qca8k_write(priv, QCA8K_REG_PORT_STATUS(sw_port), 0);
++		phy_write(phy, MII_BMCR,
++			BMCR_SPEED1000 |
++			BMCR_FULLDPLX |
++			BMCR_LOOPBACK);
++		qca8k_wait_for_phy_link_state(phy, 1);
++		qca8k_write(priv, QCA8K_REG_PORT_STATUS(sw_port),
++			QCA8K_PORT_STATUS_SPEED_1000 |
++			QCA8K_PORT_STATUS_TXMAC |
++			QCA8K_PORT_STATUS_RXMAC |
++			QCA8K_PORT_STATUS_DUPLEX);
++		qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(sw_port),
++			QCA8K_PORT_LOOKUP_STATE_FORWARD,
++			QCA8K_PORT_LOOKUP_STATE_FORWARD);
++	} else { /* off */
++		qca8k_write(priv, QCA8K_REG_PORT_STATUS(sw_port), 0);
++		qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(sw_port),
++			QCA8K_PORT_LOOKUP_STATE_DISABLED,
++			QCA8K_PORT_LOOKUP_STATE_DISABLED);
++		phy_write(phy, MII_BMCR, BMCR_SPEED1000 | BMCR_ANENABLE | BMCR_RESET);
++		/* turn off the power of the phys - so that unused
++			 ports do not raise links */
++		phy_modify(phy, MII_BMCR, BMCR_PDOWN, BMCR_PDOWN);
++	}
++}
++
++static void
++qca8k_phy_pkt_gen_prep(struct qca8k_priv *priv, struct phy_device *phy,
++		       int pkts_num, int on)
++{
++	if (on) {
++		/* enable CRC checker and packets counters */
++		phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_CRC_AND_PKTS_COUNT, 0);
++		phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_CRC_AND_PKTS_COUNT,
++			QCA8075_MMD7_CNT_FRAME_CHK_EN | QCA8075_MMD7_CNT_SELFCLR);
++		qca8k_wait_for_phy_link_state(phy, 1);
++		/* packet number */
++		phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_PKT_GEN_PKT_NUMB, pkts_num);
++		/* pkt size - 1504 bytes + 20 bytes */
++		phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_PKT_GEN_PKT_SIZE, 1504);
++	} else { /* off */
++		/* packet number */
++		phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_PKT_GEN_PKT_NUMB, 0);
++		/* disable CRC checker and packet counter */
++		phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_CRC_AND_PKTS_COUNT, 0);
++		/* disable traffic gen */
++		phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_PKT_GEN_CTRL, 0);
++	}
++}
++
++static void
++qca8k_wait_for_phy_pkt_gen_fin(struct qca8k_priv *priv, struct phy_device *phy)
++{
++	int val;
++	/* wait for all traffic end: 4096(pkt num)*1524(size)*8ns(125MHz)=49938us */
++	phy_read_mmd_poll_timeout(phy, MDIO_MMD_AN, QCA8075_MMD7_PKT_GEN_CTRL,
++				  val, !(val & QCA8075_MMD7_PKT_GEN_INPROGR),
++				  50000, 1000000, true);
++}
++
++static void
++qca8k_start_phy_pkt_gen(struct phy_device *phy)
++{
++	/* start traffic gen */
++	phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_PKT_GEN_CTRL,
++		      QCA8075_MMD7_PKT_GEN_START | QCA8075_MMD7_PKT_GEN_INPROGR);
++}
++
++static int
++qca8k_start_all_phys_pkt_gens(struct qca8k_priv *priv)
++{
++	struct phy_device *phy;
++	phy = phy_device_create(priv->bus, QCA8075_MDIO_BRDCST_PHY_ADDR,
++		0, 0, NULL);
++	if (!phy) {
++		dev_err(priv->dev, "unable to create mdio broadcast PHY(0x%x)\n",
++			QCA8075_MDIO_BRDCST_PHY_ADDR);
++		return -ENODEV;
++	}
++
++	qca8k_start_phy_pkt_gen(phy);
++
++	phy_device_free(phy);
++	return 0;
++}
++
++static int
++qca8k_get_phy_pkt_gen_test_result(struct phy_device *phy, int pkts_num)
++{
++	u32 tx_ok, tx_error;
++	u32 rx_ok, rx_error;
++	u32 tx_ok_high16;
++	u32 rx_ok_high16;
++	u32 tx_all_ok, rx_all_ok;
++
++	/* check counters */
++	tx_ok = phy_read_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_EG_FRAME_RECV_CNT_LO);
++	tx_ok_high16 = phy_read_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_EG_FRAME_RECV_CNT_HI);
++	tx_error = phy_read_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_EG_FRAME_ERR_CNT);
++	rx_ok = phy_read_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_IG_FRAME_RECV_CNT_LO);
++	rx_ok_high16 = phy_read_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_IG_FRAME_RECV_CNT_HI);
++	rx_error = phy_read_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_IG_FRAME_ERR_CNT);
++	tx_all_ok = tx_ok + (tx_ok_high16 << 16);
++	rx_all_ok = rx_ok + (rx_ok_high16 << 16);
++
++	if (tx_all_ok < pkts_num)
++		return -1;
++	if(rx_all_ok < pkts_num)
++		return -2;
++	if(tx_error)
++		return -3;
++	if(rx_error)
++		return -4;
++	return 0; /* test is ok */
++}
++
++static
++void qca8k_phy_broadcast_write_on_off(struct qca8k_priv *priv,
++				      struct phy_device *phy, int on)
++{
++	u32 val;
++
++	val = phy_read_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_MDIO_BRDCST_WRITE);
++
++	if (on == 0)
++		val &= ~QCA8075_MMD7_MDIO_BRDCST_WRITE_EN;
++	else
++		val |= QCA8075_MMD7_MDIO_BRDCST_WRITE_EN;
++
++	phy_write_mmd(phy, MDIO_MMD_AN, QCA8075_MMD7_MDIO_BRDCST_WRITE, val);
++}
++
++static int
++qca8k_test_dsa_port_for_errors(struct qca8k_priv *priv, struct phy_device *phy,
++			       int port, int test_phase)
++{
++	int res = 0;
++	const int test_pkts_num = QCA8075_PKT_GEN_PKTS_COUNT;
++
++	if (test_phase == 1) { /* start test preps */
++		qca8k_phy_loopback_on_off(priv, phy, port, 1);
++		qca8k_switch_port_loopback_on_off(priv, port, 1);
++		qca8k_phy_broadcast_write_on_off(priv, phy, 1);
++		qca8k_phy_pkt_gen_prep(priv, phy, test_pkts_num, 1);
++	} else if (test_phase == 2) {
++		/* wait for test results, collect it and cleanup */
++		qca8k_wait_for_phy_pkt_gen_fin(priv, phy);
++		res = qca8k_get_phy_pkt_gen_test_result(phy, test_pkts_num);
++		qca8k_phy_pkt_gen_prep(priv, phy, test_pkts_num, 0);
++		qca8k_phy_broadcast_write_on_off(priv, phy, 0);
++		qca8k_switch_port_loopback_on_off(priv, port, 0);
++		qca8k_phy_loopback_on_off(priv, phy, port, 0);
++	}
++
++	return res;
++}
++
++static int
++qca8k_do_dsa_sw_ports_self_test(struct qca8k_priv *priv, int parallel_test)
++{
++	struct device_node *dn = priv->dev->of_node;
++	struct device_node *ports, *port;
++	struct device_node *phy_dn;
++	struct phy_device *phy;
++	int reg, err = 0, test_phase;
++	u32 tests_result = 0;
++
++	ports = of_get_child_by_name(dn, "ports");
++	if (!ports) {
++		dev_err(priv->dev, "no ports child node found\n");
++			return -EINVAL;
++	}
++
++	for (test_phase = 1; test_phase <= 2; test_phase++) {
++		if (parallel_test && test_phase == 2) {
++			err = qca8k_start_all_phys_pkt_gens(priv);
++			if (err)
++				goto error;
++		}
++		for_each_available_child_of_node(ports, port) {
++			err = of_property_read_u32(port, "reg", &reg);
++			if (err)
++				goto error;
++			if (reg >= QCA8K_NUM_PORTS) {
++				err = -EINVAL;
++				goto error;
++			}
++			phy_dn = of_parse_phandle(port, "phy-handle", 0);
++			if (phy_dn) {
++				phy = of_phy_find_device(phy_dn);
++				of_node_put(phy_dn);
++				if (phy) {
++					int result;
++					result = qca8k_test_dsa_port_for_errors(priv,
++						phy, reg, test_phase);
++					if (!parallel_test && test_phase == 1)
++						qca8k_start_phy_pkt_gen(phy);
++					put_device(&phy->mdio.dev);
++					if (test_phase == 2) {
++						tests_result <<= 1;
++						if (result)
++							tests_result |= 1;
++					}
++				}
++			}
++		}
++	}
++
++end:
++	of_node_put(ports);
++	qca8k_fdb_flush(priv);
++	return tests_result;
++error:
++	tests_result |= 0xf000;
++	goto end;
++}
++
++static int
++psgmii_vco_calibrate_and_test(struct dsa_switch *ds)
++{
++	int ret, a, test_result;
++	struct qca8k_priv *priv = ds->priv;
++
++	for (a = 0; a <= QCA8K_PSGMII_CALB_NUM; a++) {
++		ret = psgmii_vco_calibrate(priv);
++		if (ret)
++			return ret;
++		/* first we run serial test */
++		test_result = qca8k_do_dsa_sw_ports_self_test(priv, 0);
++		/* and if it is ok then we run the test in parallel */
++		if (!test_result)
++			test_result = qca8k_do_dsa_sw_ports_self_test(priv, 1);
++		if (!test_result) {
++			if (a > 0) {
++				dev_warn(priv->dev, "PSGMII work was stabilized after %d "
++					"calibration retries !\n", a);
++			}
++			return 0;
++		} else {
++			schedule();
++			if (a > 0 && a % 10 == 0) {
++				dev_err(priv->dev, "PSGMII work is unstable !!! "
++					"Let's try to wait a bit ... %d\n", a);
++				set_current_state(TASK_INTERRUPTIBLE);
++				schedule_timeout(msecs_to_jiffies(a * 100));
++			}
++		}
++	}
++
++	panic("PSGMII work is unstable !!! "
++		"Repeated recalibration attempts did not help(0x%x) !\n",
++		test_result);
++
++	return -EFAULT;
++}
++
++static int
++ipq4019_psgmii_configure(struct dsa_switch *ds)
++{
++	struct qca8k_priv *priv = ds->priv;
++	int ret;
++
++	if (!priv->psgmii_calibrated) {
++		dev_info(ds->dev, "PSGMII calibration!\n");
++		ret = psgmii_vco_calibrate_and_test(ds);
++
++		ret = regmap_clear_bits(priv->psgmii, PSGMIIPHY_MODE_CONTROL,
++					PSGMIIPHY_MODE_ATHR_CSCO_MODE_25M);
++		ret = regmap_write(priv->psgmii, PSGMIIPHY_TX_CONTROL,
++				   PSGMIIPHY_TX_CONTROL_MAGIC_VALUE);
++
++		priv->psgmii_calibrated = true;
++
++		return ret;
++	}
++
++	return 0;
++}
++
++static void
++qca8k_phylink_ipq4019_mac_config(struct dsa_switch *ds, int port,
++				 unsigned int mode,
++				 const struct phylink_link_state *state)
++{
++	struct qca8k_priv *priv = ds->priv;
++
++	switch (port) {
++	case 0:
++		/* CPU port, no configuration needed */
++		return;
++	case 1:
++	case 2:
++	case 3:
++		if (state->interface == PHY_INTERFACE_MODE_PSGMII)
++			if (ipq4019_psgmii_configure(ds))
++				dev_err(ds->dev, "PSGMII configuration failed!\n");
++		return;
++	case 4:
++	case 5:
++		if (state->interface == PHY_INTERFACE_MODE_RGMII ||
++		    state->interface == PHY_INTERFACE_MODE_RGMII_ID ||
++		    state->interface == PHY_INTERFACE_MODE_RGMII_RXID ||
++		    state->interface == PHY_INTERFACE_MODE_RGMII_TXID) {
++			regmap_set_bits(priv->regmap,
++					QCA8K_IPQ4019_REG_RGMII_CTRL,
++					QCA8K_IPQ4019_RGMII_CTRL_CLK);
++		}
++
++		if (state->interface == PHY_INTERFACE_MODE_PSGMII)
++			if (ipq4019_psgmii_configure(ds))
++				dev_err(ds->dev, "PSGMII configuration failed!\n");
++		return;
++	default:
++		dev_err(ds->dev, "%s: unsupported port: %i\n", __func__, port);
++		return;
++	}
++}
++
++static int
++qca8k_ipq4019_setup_port(struct dsa_switch *ds, int port)
++{
++	struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
++	int ret;
++
++	/* CPU port gets connected to all user ports of the switch */
++	if (dsa_is_cpu_port(ds, port)) {
++		ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
++				QCA8K_PORT_LOOKUP_MEMBER, dsa_user_ports(ds));
++		if (ret)
++			return ret;
++
++		/* Disable CPU ARP Auto-learning by default */
++		ret = regmap_clear_bits(priv->regmap,
++					QCA8K_PORT_LOOKUP_CTRL(port),
++					QCA8K_PORT_LOOKUP_LEARN);
++		if (ret)
++			return ret;
++	}
++
++	/* Individual user ports get connected to CPU port only */
++	if (dsa_is_user_port(ds, port)) {
++		ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(port),
++				QCA8K_PORT_LOOKUP_MEMBER,
++				BIT(QCA8K_IPQ4019_CPU_PORT));
++		if (ret)
++			return ret;
++
++		/* Enable ARP Auto-learning by default */
++		ret = regmap_set_bits(priv->regmap, QCA8K_PORT_LOOKUP_CTRL(port),
++				      QCA8K_PORT_LOOKUP_LEARN);
++		if (ret)
++			return ret;
++
++		/* For port based vlans to work we need to set the
++		 * default egress vid
++		 */
++		ret = qca8k_rmw(priv, QCA8K_EGRESS_VLAN(port),
++				QCA8K_EGREES_VLAN_PORT_MASK(port),
++				QCA8K_EGREES_VLAN_PORT(port, QCA8K_PORT_VID_DEF));
++		if (ret)
++			return ret;
++
++		ret = qca8k_write(priv, QCA8K_REG_PORT_VLAN_CTRL0(port),
++				  QCA8K_PORT_VLAN_CVID(QCA8K_PORT_VID_DEF) |
++				  QCA8K_PORT_VLAN_SVID(QCA8K_PORT_VID_DEF));
++		if (ret)
++			return ret;
++	}
++
++	return 0;
++}
++
++static int
++qca8k_ipq4019_setup(struct dsa_switch *ds)
++{
++	struct qca8k_priv *priv = (struct qca8k_priv *)ds->priv;
++	int ret, i;
++
++	/* Make sure that port 0 is the cpu port */
++	if (!dsa_is_cpu_port(ds, QCA8K_IPQ4019_CPU_PORT)) {
++		dev_err(priv->dev, "port %d is not the CPU port",
++			QCA8K_IPQ4019_CPU_PORT);
++		return -EINVAL;
++	}
++
++	qca8k_ipq4019_setup_pcs(priv, &priv->pcs_port_0, 0);
++
++	/* Enable CPU Port */
++	ret = regmap_set_bits(priv->regmap, QCA8K_REG_GLOBAL_FW_CTRL0,
++			      QCA8K_GLOBAL_FW_CTRL0_CPU_PORT_EN);
++	if (ret) {
++		dev_err(priv->dev, "failed enabling CPU port");
++		return ret;
++	}
++
++	/* Enable MIB counters */
++	ret = qca8k_mib_init(priv);
++	if (ret)
++		dev_warn(priv->dev, "MIB init failed");
++
++	/* Disable forwarding by default on all ports */
++	for (i = 0; i < QCA8K_IPQ4019_NUM_PORTS; i++) {
++		ret = qca8k_rmw(priv, QCA8K_PORT_LOOKUP_CTRL(i),
++				QCA8K_PORT_LOOKUP_MEMBER, 0);
++		if (ret)
++			return ret;
++	}
++
++	/* Enable QCA header mode on the CPU port */
++	ret = qca8k_write(priv, QCA8K_REG_PORT_HDR_CTRL(QCA8K_IPQ4019_CPU_PORT),
++			  FIELD_PREP(QCA8K_PORT_HDR_CTRL_TX_MASK, QCA8K_PORT_HDR_CTRL_ALL) |
++			  FIELD_PREP(QCA8K_PORT_HDR_CTRL_RX_MASK, QCA8K_PORT_HDR_CTRL_ALL));
++	if (ret) {
++		dev_err(priv->dev, "failed enabling QCA header mode");
++		return ret;
++	}
++
++	/* Disable MAC by default on all ports */
++	for (i = 0; i < QCA8K_IPQ4019_NUM_PORTS; i++) {
++		if (dsa_is_user_port(ds, i))
++			qca8k_port_set_status(priv, i, 0);
++	}
++
++	/* Forward all unknown frames to CPU port for Linux processing */
++	ret = qca8k_write(priv, QCA8K_REG_GLOBAL_FW_CTRL1,
++			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_IGMP_DP_MASK, BIT(QCA8K_IPQ4019_CPU_PORT)) |
++			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_BC_DP_MASK, BIT(QCA8K_IPQ4019_CPU_PORT)) |
++			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_MC_DP_MASK, BIT(QCA8K_IPQ4019_CPU_PORT)) |
++			  FIELD_PREP(QCA8K_GLOBAL_FW_CTRL1_UC_DP_MASK, BIT(QCA8K_IPQ4019_CPU_PORT)));
++	if (ret)
++		return ret;
++
++	/* Setup connection between CPU port & user ports */
++	for (i = 0; i < QCA8K_IPQ4019_NUM_PORTS; i++) {
++		ret = qca8k_ipq4019_setup_port(ds, i);
++		if (ret)
++			return ret;
++	}
++
++	/* Setup our port MTUs to match power on defaults */
++	ret = qca8k_write(priv, QCA8K_MAX_FRAME_SIZE, ETH_FRAME_LEN + ETH_FCS_LEN);
++	if (ret)
++		dev_warn(priv->dev, "failed setting MTU settings");
++
++	/* Flush the FDB table */
++	qca8k_fdb_flush(priv);
++
++	/* Set min a max ageing value supported */
++	ds->ageing_time_min = 7000;
++	ds->ageing_time_max = 458745000;
++
++	/* Set max number of LAGs supported */
++	ds->num_lag_ids = QCA8K_NUM_LAGS;
++
++	/* CPU port HW learning doesnt work correctly, so let DSA handle it */
++	ds->assisted_learning_on_cpu_port = true;
++
++	return 0;
++}
++
++static const struct dsa_switch_ops qca8k_ipq4019_switch_ops = {
++	.get_tag_protocol	= qca8k_ipq4019_get_tag_protocol,
++	.setup			= qca8k_ipq4019_setup,
++	.get_strings		= qca8k_get_strings,
++	.get_ethtool_stats	= qca8k_get_ethtool_stats,
++	.get_sset_count		= qca8k_get_sset_count,
++	.set_ageing_time	= qca8k_set_ageing_time,
++	.get_mac_eee		= qca8k_get_mac_eee,
++	.set_mac_eee		= qca8k_set_mac_eee,
++	.port_enable		= qca8k_port_enable,
++	.port_disable		= qca8k_port_disable,
++	.port_change_mtu	= qca8k_port_change_mtu,
++	.port_max_mtu		= qca8k_port_max_mtu,
++	.port_stp_state_set	= qca8k_port_stp_state_set,
++	.port_bridge_join	= qca8k_port_bridge_join,
++	.port_bridge_leave	= qca8k_port_bridge_leave,
++	.port_fast_age		= qca8k_port_fast_age,
++	.port_fdb_add		= qca8k_port_fdb_add,
++	.port_fdb_del		= qca8k_port_fdb_del,
++	.port_fdb_dump		= qca8k_port_fdb_dump,
++	.port_mdb_add		= qca8k_port_mdb_add,
++	.port_mdb_del		= qca8k_port_mdb_del,
++	.port_mirror_add	= qca8k_port_mirror_add,
++	.port_mirror_del	= qca8k_port_mirror_del,
++	.port_vlan_filtering	= qca8k_port_vlan_filtering,
++	.port_vlan_add		= qca8k_port_vlan_add,
++	.port_vlan_del		= qca8k_port_vlan_del,
++	.phylink_mac_select_pcs	= qca8k_ipq4019_phylink_mac_select_pcs,
++	.phylink_get_caps	= qca8k_ipq4019_phylink_get_caps,
++	.phylink_mac_config	= qca8k_phylink_ipq4019_mac_config,
++	.phylink_mac_link_down	= qca8k_phylink_ipq4019_mac_link_down,
++	.phylink_mac_link_up	= qca8k_phylink_ipq4019_mac_link_up,
++	.port_lag_join		= qca8k_port_lag_join,
++	.port_lag_leave		= qca8k_port_lag_leave,
++};
++
++static const struct qca8k_match_data ipq4019 = {
++	.id = QCA8K_ID_IPQ4019,
++	.mib_count = QCA8K_QCA833X_MIB_COUNT,
++};
++
++static int
++qca8k_ipq4019_probe(struct platform_device *pdev)
++{
++	struct device *dev = &pdev->dev;
++	struct qca8k_priv *priv;
++	void __iomem *base, *psgmii;
++	struct device_node *np = dev->of_node, *mdio_np, *psgmii_ethphy_np;
++	int ret;
++
++	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
++	if (!priv)
++		return -ENOMEM;
++
++	priv->dev = dev;
++	priv->info = &ipq4019;
++
++	/* Start by setting up the register mapping */
++	base = devm_platform_ioremap_resource_byname(pdev, "base");
++	if (IS_ERR(base))
++		return PTR_ERR(base);
++
++	priv->regmap = devm_regmap_init_mmio(dev, base,
++					     &qca8k_ipq4019_regmap_config);
++	if (IS_ERR(priv->regmap)) {
++		ret = PTR_ERR(priv->regmap);
++		dev_err(dev, "base regmap initialization failed, %d\n", ret);
++		return ret;
++	}
++
++	psgmii = devm_platform_ioremap_resource_byname(pdev, "psgmii_phy");
++	if (IS_ERR(psgmii))
++		return PTR_ERR(psgmii);
++
++	priv->psgmii = devm_regmap_init_mmio(dev, psgmii,
++					     &qca8k_ipq4019_psgmii_phy_regmap_config);
++	if (IS_ERR(priv->psgmii)) {
++		ret = PTR_ERR(priv->psgmii);
++		dev_err(dev, "PSGMII regmap initialization failed, %d\n", ret);
++		return ret;
++	}
++
++	mdio_np = of_parse_phandle(np, "mdio", 0);
++	if (!mdio_np) {
++		dev_err(dev, "unable to get MDIO bus phandle\n");
++		of_node_put(mdio_np);
++		return -EINVAL;
++	}
++
++	priv->bus = of_mdio_find_bus(mdio_np);
++	of_node_put(mdio_np);
++	if (!priv->bus) {
++		dev_err(dev, "unable to find MDIO bus\n");
++		return -EPROBE_DEFER;
++	}
++
++	psgmii_ethphy_np = of_parse_phandle(np, "psgmii-ethphy", 0);
++	if (!psgmii_ethphy_np) {
++		dev_dbg(dev, "unable to get PSGMII eth PHY phandle\n");
++		of_node_put(psgmii_ethphy_np);
++	}
++
++	if (psgmii_ethphy_np) {
++		priv->psgmii_ethphy = of_phy_find_device(psgmii_ethphy_np);
++		of_node_put(psgmii_ethphy_np);
++		if (!priv->psgmii_ethphy) {
++			dev_err(dev, "unable to get PSGMII eth PHY\n");
++			return -ENODEV;
++		}
++	}
++
++	/* Check the detected switch id */
++	ret = qca8k_read_switch_id(priv);
++	if (ret)
++		return ret;
++
++	priv->ds = devm_kzalloc(dev, sizeof(*priv->ds), GFP_KERNEL);
++	if (!priv->ds)
++		return -ENOMEM;
++
++	priv->ds->dev = dev;
++	priv->ds->num_ports = QCA8K_IPQ4019_NUM_PORTS;
++	priv->ds->priv = priv;
++	priv->ds->ops = &qca8k_ipq4019_switch_ops;
++	mutex_init(&priv->reg_mutex);
++	platform_set_drvdata(pdev, priv);
++
++	return dsa_register_switch(priv->ds);
++}
++
++static int
++qca8k_ipq4019_remove(struct platform_device *pdev)
++{
++	struct qca8k_priv *priv = dev_get_drvdata(&pdev->dev);
++	int i;
++
++	if (!priv)
++		return 0;
++
++	for (i = 0; i < QCA8K_IPQ4019_NUM_PORTS; i++)
++		qca8k_port_set_status(priv, i, 0);
++
++	dsa_unregister_switch(priv->ds);
++
++	platform_set_drvdata(pdev, NULL);
++
++	return 0;
++}
++
++static const struct of_device_id qca8k_ipq4019_of_match[] = {
++	{ .compatible = "qca,ipq4019-qca8337n", },
++	{ /* sentinel */ },
++};
++
++static struct platform_driver qca8k_ipq4019_driver = {
++	.probe = qca8k_ipq4019_probe,
++	.remove = qca8k_ipq4019_remove,
++	.driver = {
++		.name = "qca8k-ipq4019",
++		.of_match_table = qca8k_ipq4019_of_match,
++	},
++};
++
++module_platform_driver(qca8k_ipq4019_driver);
++
++MODULE_AUTHOR("Mathieu Olivari, John Crispin <john at phrozen.org>");
++MODULE_AUTHOR("Gabor Juhos <j4g8y7 at gmail.com>, Robert Marko <robert.marko at sartura.hr>");
++MODULE_DESCRIPTION("Qualcomm IPQ4019 built-in switch driver");
++MODULE_LICENSE("GPL");
+--- a/drivers/net/dsa/qca/qca8k.h
++++ b/drivers/net/dsa/qca/qca8k.h
+@@ -19,7 +19,10 @@
+ #define QCA8K_ETHERNET_TIMEOUT				5
+ 
+ #define QCA8K_NUM_PORTS					7
++#define QCA8K_IPQ4019_NUM_PORTS				6
+ #define QCA8K_NUM_CPU_PORTS				2
++#define QCA8K_IPQ4019_NUM_CPU_PORTS			1
++#define QCA8K_IPQ4019_CPU_PORT				0
+ #define QCA8K_MAX_MTU					9000
+ #define QCA8K_NUM_LAGS					4
+ #define QCA8K_NUM_PORTS_FOR_LAG				4
+@@ -28,6 +31,7 @@
+ #define QCA8K_ID_QCA8327				0x12
+ #define PHY_ID_QCA8337					0x004dd036
+ #define QCA8K_ID_QCA8337				0x13
++#define QCA8K_ID_IPQ4019				0x14
+ 
+ #define QCA8K_QCA832X_MIB_COUNT				39
+ #define QCA8K_QCA833X_MIB_COUNT				41
+@@ -265,6 +269,7 @@
+ #define   QCA8K_PORT_LOOKUP_STATE_LEARNING		QCA8K_PORT_LOOKUP_STATE(0x3)
+ #define   QCA8K_PORT_LOOKUP_STATE_FORWARD		QCA8K_PORT_LOOKUP_STATE(0x4)
+ #define   QCA8K_PORT_LOOKUP_LEARN			BIT(20)
++#define   QCA8K_PORT_LOOKUP_LOOPBACK_EN			BIT(21)
+ #define   QCA8K_PORT_LOOKUP_ING_MIRROR_EN		BIT(25)
+ 
+ #define QCA8K_REG_GOL_TRUNK_CTRL0			0x700
+@@ -341,6 +346,53 @@
+ #define MII_ATH_MMD_ADDR				0x0d
+ #define MII_ATH_MMD_DATA				0x0e
+ 
++/* IPQ4019 PSGMII PHY registers */
++#define QCA8K_IPQ4019_REG_RGMII_CTRL			0x004
++#define   QCA8K_IPQ4019_RGMII_CTRL_RGMII_RXC		GENMASK(1, 0)
++#define   QCA8K_IPQ4019_RGMII_CTRL_RGMII_TXC		GENMASK(9, 8)
++/* Some kind of CLK selection
++ * 0: gcc_ess_dly2ns
++ * 1: gcc_ess_clk
++ */
++#define   QCA8K_IPQ4019_RGMII_CTRL_CLK				BIT(10)
++#define   QCA8K_IPQ4019_RGMII_CTRL_DELAY_RMII0			GENMASK(17, 16)
++#define   QCA8K_IPQ4019_RGMII_CTRL_INVERT_RMII0_REF_CLK		BIT(18)
++#define   QCA8K_IPQ4019_RGMII_CTRL_DELAY_RMII1			GENMASK(20, 19)
++#define   QCA8K_IPQ4019_RGMII_CTRL_INVERT_RMII1_REF_CLK		BIT(21)
++#define   QCA8K_IPQ4019_RGMII_CTRL_INVERT_RMII0_MASTER_EN	BIT(24)
++#define   QCA8K_IPQ4019_RGMII_CTRL_INVERT_RMII1_MASTER_EN	BIT(25)
++
++#define PSGMIIPHY_MODE_CONTROL				0x1b4
++#define   PSGMIIPHY_MODE_ATHR_CSCO_MODE_25M		BIT(0)
++#define PSGMIIPHY_TX_CONTROL				0x288
++#define   PSGMIIPHY_TX_CONTROL_MAGIC_VALUE		0x8380
++#define PSGMIIPHY_VCO_CALIBRATION_CONTROL_REGISTER_1	0x9c
++#define   PSGMIIPHY_REG_PLL_VCO_CALIB_RESTART		BIT(14)
++#define PSGMIIPHY_VCO_CALIBRATION_CONTROL_REGISTER_2	0xa0
++#define   PSGMIIPHY_REG_PLL_VCO_CALIB_READY		BIT(0)
++
++#define   QCA8K_PSGMII_CALB_NUM				100
++#define   MII_QCA8075_SSTATUS				0x11
++#define   QCA8075_PHY_SPEC_STATUS_LINK			BIT(10)
++#define   QCA8075_MMD7_CRC_AND_PKTS_COUNT		0x8029
++#define   QCA8075_MMD7_PKT_GEN_PKT_NUMB			0x8021
++#define   QCA8075_MMD7_PKT_GEN_PKT_SIZE			0x8062
++#define   QCA8075_MMD7_PKT_GEN_CTRL			0x8020
++#define   QCA8075_MMD7_CNT_SELFCLR			BIT(1)
++#define   QCA8075_MMD7_CNT_FRAME_CHK_EN			BIT(0)
++#define   QCA8075_MMD7_PKT_GEN_START			BIT(13)
++#define   QCA8075_MMD7_PKT_GEN_INPROGR			BIT(15)
++#define   QCA8075_MMD7_IG_FRAME_RECV_CNT_HI		0x802a
++#define   QCA8075_MMD7_IG_FRAME_RECV_CNT_LO		0x802b
++#define   QCA8075_MMD7_IG_FRAME_ERR_CNT			0x802c
++#define   QCA8075_MMD7_EG_FRAME_RECV_CNT_HI		0x802d
++#define   QCA8075_MMD7_EG_FRAME_RECV_CNT_LO		0x802e
++#define   QCA8075_MMD7_EG_FRAME_ERR_CNT			0x802f
++#define   QCA8075_MMD7_MDIO_BRDCST_WRITE		0x8028
++#define   QCA8075_MMD7_MDIO_BRDCST_WRITE_EN 		BIT(15)
++#define   QCA8075_MDIO_BRDCST_PHY_ADDR			0x1f
++#define   QCA8075_PKT_GEN_PKTS_COUNT			4096
++
+ enum {
+ 	QCA8K_PORT_SPEED_10M = 0,
+ 	QCA8K_PORT_SPEED_100M = 1,
+@@ -466,6 +518,10 @@ struct qca8k_priv {
+ 	struct qca8k_pcs pcs_port_6;
+ 	const struct qca8k_match_data *info;
+ 	struct qca8k_led ports_led[QCA8K_LED_COUNT];
++	/* IPQ4019 specific */
++	struct regmap *psgmii;
++	struct phy_device *psgmii_ethphy;
++	bool psgmii_calibrated;
+ };
+ 
+ struct qca8k_mib_desc {
diff --git a/target/linux/ipq40xx/patches-6.1/707-arm-dts-ipq4019-add-switch-node.patch b/target/linux/ipq40xx/patches-6.1/707-arm-dts-ipq4019-add-switch-node.patch
new file mode 100644
index 0000000000..e7203a3ac9
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/707-arm-dts-ipq4019-add-switch-node.patch
@@ -0,0 +1,98 @@
+From 19c507c3fe4a6fc60317dcae2c55de452aecb7d5 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko at sartura.hr>
+Date: Mon, 1 Nov 2021 18:15:04 +0100
+Subject: [PATCH] arm: dts: ipq4019: add switch node
+
+Since the built-in IPQ40xx switch now has a driver, add the required node
+for it to work.
+
+Signed-off-by: Robert Marko <robert.marko at sartura.hr>
+---
+ arch/arm/boot/dts/qcom-ipq4019.dtsi | 76 +++++++++++++++++++++++++++++
+ 1 file changed, 76 insertions(+)
+
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+@@ -594,6 +594,82 @@
+ 			status = "disabled";
+ 		};
+ 
++		switch: switch at c000000 {
++			compatible = "qca,ipq4019-qca8337n";
++			reg = <0xc000000 0x80000>, <0x98000 0x800>;
++			reg-names = "base", "psgmii_phy";
++			resets = <&gcc ESS_PSGMII_ARES>;
++			reset-names = "psgmii_rst";
++			mdio = <&mdio>;
++			psgmii-ethphy = <&psgmiiphy>;
++
++			status = "disabled";
++
++			ports {
++				#address-cells = <1>;
++				#size-cells = <0>;
++
++				port at 0 { /* MAC0 */
++					reg = <0>;
++					label = "cpu";
++					ethernet = <&gmac>;
++					phy-mode = "internal";
++
++					fixed-link {
++						speed = <1000>;
++						full-duplex;
++						pause;
++						asym-pause;
++					};
++				};
++
++				swport1: port at 1 { /* MAC1 */
++					reg = <1>;
++					label = "lan1";
++					phy-handle = <&ethphy0>;
++					phy-mode = "psgmii";
++
++					status = "disabled";
++				};
++
++				swport2: port at 2 { /* MAC2 */
++					reg = <2>;
++					label = "lan2";
++					phy-handle = <&ethphy1>;
++					phy-mode = "psgmii";
++
++					status = "disabled";
++				};
++
++				swport3: port at 3 { /* MAC3 */
++					reg = <3>;
++					label = "lan3";
++					phy-handle = <&ethphy2>;
++					phy-mode = "psgmii";
++
++					status = "disabled";
++				};
++
++				swport4: port at 4 { /* MAC4 */
++					reg = <4>;
++					label = "lan4";
++					phy-handle = <&ethphy3>;
++					phy-mode = "psgmii";
++
++					status = "disabled";
++				};
++
++				swport5: port at 5 { /* MAC5 */
++					reg = <5>;
++					label = "wan";
++					phy-handle = <&ethphy4>;
++					phy-mode = "psgmii";
++
++					status = "disabled";
++				};
++			};
++		};
++
+ 		gmac: ethernet at c080000 {
+ 			compatible = "qcom,ipq4019-ess-edma";
+ 			reg = <0xc080000 0x8000>;
diff --git a/target/linux/ipq40xx/patches-6.1/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch b/target/linux/ipq40xx/patches-6.1/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
new file mode 100644
index 0000000000..e8b89647ce
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
@@ -0,0 +1,67 @@
+From 5ac078c8fe18f3e8318547b8ed0ed782730c5039 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sat, 10 Feb 2024 22:28:27 +0100
+Subject: [PATCH] ARM: dts: qcom: ipq4019: add QCA8075 PHY Package nodes
+
+Add QCA8075 PHY Package nodes. The PHY nodes that were previously
+defined never worked and actually never had a driver to correctly setup
+these PHY. Now that we have a correct driver, correctly add the PHY
+Package node and set the default value of 300mw for tx driver strength
+following specification of ipq4019 SoC.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ arch/arm/boot/dts//qcom-ipq4019.dtsi | 35 +++++++++++++++---------
+ 1 file changed, 22 insertions(+), 13 deletions(-)
+
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+@@ -725,24 +725,33 @@
+ 			reg = <0x90000 0x64>;
+ 			status = "disabled";
+ 
+-			ethphy0: ethernet-phy at 0 {
++			ethernet-phy-package at 0 {
++				#address-cells = <1>;
++				#size-cells = <0>;
++				compatible = "qcom,qca8075-package";
+ 				reg = <0>;
+-			};
+-
+-			ethphy1: ethernet-phy at 1 {
+-				reg = <1>;
+-			};
+ 
+-			ethphy2: ethernet-phy at 2 {
+-				reg = <2>;
+-			};
+-
+-			ethphy3: ethernet-phy at 3 {
+-				reg = <3>;
+-			};
++				qcom,tx-drive-strength-milliwatt = <300>;
+ 
+-			ethphy4: ethernet-phy at 4 {
+-				reg = <4>;
++				ethphy0: ethernet-phy at 0 {
++					reg = <0>;
++				};
++
++				ethphy1: ethernet-phy at 1 {
++					reg = <1>;
++				};
++
++				ethphy2: ethernet-phy at 2 {
++					reg = <2>;
++				};
++
++				ethphy3: ethernet-phy at 3 {
++					reg = <3>;
++				};
++
++				ethphy4: ethernet-phy at 4 {
++					reg = <4>;
++				};
+ 			};
+ 		};
+ 
diff --git a/target/linux/ipq40xx/patches-6.1/710-arm-dts-ipq4019-QCA807x-properties.patch b/target/linux/ipq40xx/patches-6.1/710-arm-dts-ipq4019-QCA807x-properties.patch
new file mode 100644
index 0000000000..a9ba70ff2f
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/710-arm-dts-ipq4019-QCA807x-properties.patch
@@ -0,0 +1,25 @@
+From 79b38b9f85da868ca59b66715c20aa55104b640b Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko at sartura.hr>
+Date: Fri, 2 Oct 2020 10:43:26 +0200
+Subject: [PATCH] arm: dts: ipq4019: QCA807x properties
+
+This adds necessary DT properties for QCA807x PHY-s to IPQ4019 DTSI.
+
+Signed-off-by: Robert Marko <robert.marko at sartura.hr>
+---
+ arch/arm/boot/dts/qcom-ipq4019.dtsi | 17 +++++++++++++++++
+ 1 file changed, 17 insertions(+)
+
+--- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+@@ -752,6 +752,10 @@
+ 				ethphy4: ethernet-phy at 4 {
+ 					reg = <4>;
+ 				};
++
++				psgmiiphy: psgmii-phy at 5 {
++					reg = <5>;
++				};
+ 			};
+ 		};
+ 
diff --git a/target/linux/ipq40xx/patches-6.1/711-net-qualcomm-ipqess-fix-TX-timeout-errors.patch b/target/linux/ipq40xx/patches-6.1/711-net-qualcomm-ipqess-fix-TX-timeout-errors.patch
new file mode 100644
index 0000000000..149208aa69
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/711-net-qualcomm-ipqess-fix-TX-timeout-errors.patch
@@ -0,0 +1,64 @@
+From d0055b03d9c8d48ad2b971821989b09ba95c39f8 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sun, 17 Sep 2023 20:18:31 +0200
+Subject: [PATCH] net: qualcomm: ipqess: fix TX timeout errors
+
+Currently logic to handle napi tx completion is flawed and on the long
+run on loaded condition cause TX timeout error with the queue not being
+able to handle any new packet.
+
+There are 2 main cause of this:
+- incrementing the packet done value wrongly
+- handling 2 times the tx_ring tail
+
+ipqess_tx_unmap_and_free may return 2 kind values:
+- 0: we are handling first and middle descriptor for the packet
+- packet len: we are at the last descriptor for the packet
+
+Done value was wrongly incremented also for first and intermediate
+descriptor for the packet resulting causing panic and TX timeouts by
+comunicating to the kernel an inconsistent value of packet handling not
+matching the expected ones.
+
+Tx_ring tail was handled twice for ipqess_tx_complete run resulting in
+again done value incremented wrongly and also problem with idx handling
+by actually skipping descriptor for some packets.
+
+Rework the loop logic to fix these 2 problem and also add some comments
+to make sure ipqess_tx_unmap_and_free ret value is better
+understandable.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/net/ethernet/qualcomm/ipqess/ipqess.c | 13 ++++++++++---
+ 1 file changed, 10 insertions(+), 3 deletions(-)
+
+--- a/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
++++ b/drivers/net/ethernet/qualcomm/ipqess/ipqess.c
+@@ -453,13 +453,22 @@ static int ipqess_tx_complete(struct ipq
+ 	tail >>= IPQESS_TPD_CONS_IDX_SHIFT;
+ 	tail &= IPQESS_TPD_CONS_IDX_MASK;
+ 
+-	do {
++	while ((tx_ring->tail != tail) && (done < budget)) {
+ 		ret = ipqess_tx_unmap_and_free(&tx_ring->ess->pdev->dev,
+ 					       &tx_ring->buf[tx_ring->tail]);
+-		tx_ring->tail = IPQESS_NEXT_IDX(tx_ring->tail, tx_ring->count);
++		/* ipqess_tx_unmap_and_free may return 2 kind values:
++		 * - 0: we are handling first and middle descriptor for the packet
++		 * - packet len: we are at the last descriptor for the packet
++		 * Increment total bytes handled and packet done only if we are
++		 * handling the last descriptor for the packet.
++		 */
++		if (ret) {
++			total += ret;
++			done++;
++		}
+ 
+-		total += ret;
+-	} while ((++done < budget) && (tx_ring->tail != tail));
++		tx_ring->tail = IPQESS_NEXT_IDX(tx_ring->tail, tx_ring->count);
++	};
+ 
+ 	ipqess_w32(tx_ring->ess, IPQESS_REG_TX_SW_CONS_IDX_Q(tx_ring->idx),
+ 		   tx_ring->tail);
diff --git a/target/linux/ipq40xx/patches-6.1/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq40xx/patches-6.1/850-soc-add-qualcomm-syscon.patch
new file mode 100644
index 0000000000..6afb27b178
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/850-soc-add-qualcomm-syscon.patch
@@ -0,0 +1,175 @@
+From: Christian Lamparter <chunkeey at googlemail.com>
+Subject: SoC: add qualcomm syscon
+--- a/drivers/soc/qcom/Kconfig
++++ b/drivers/soc/qcom/Kconfig
+@@ -248,4 +248,11 @@ config QCOM_ICC_BWMON
+ 	  the fixed bandwidth votes from cpufreq (CPU nodes) thus achieve high
+ 	  memory throughput even with lower CPU frequencies.
+ 
++config QCOM_TCSR
++	tristate "QCOM Top Control and Status Registers"
++	depends on ARCH_QCOM
++	help
++	  Say y here to enable TCSR support.  The TCSR provides control
++	  functions for various peripherals.
++
+ endmenu
+--- a/drivers/soc/qcom/Makefile
++++ b/drivers/soc/qcom/Makefile
+@@ -29,3 +29,4 @@ obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
+ obj-$(CONFIG_QCOM_RPMPD) += rpmpd.o
+ obj-$(CONFIG_QCOM_KRYO_L2_ACCESSORS) +=	kryo-l2-accessors.o
+ obj-$(CONFIG_QCOM_ICC_BWMON)	+= icc-bwmon.o
++obj-$(CONFIG_QCOM_TCSR)		+= qcom_tcsr.o
+--- /dev/null
++++ b/drivers/soc/qcom/qcom_tcsr.c
+@@ -0,0 +1,98 @@
++/*
++ * Copyright (c) 2014, The Linux foundation. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License rev 2 and
++ * only rev 2 as published by the free Software foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or fITNESS fOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ */
++
++#include <linux/clk.h>
++#include <linux/err.h>
++#include <linux/io.h>
++#include <linux/module.h>
++#include <linux/of.h>
++#include <linux/of_platform.h>
++#include <linux/platform_device.h>
++
++#define TCSR_USB_PORT_SEL	0xb0
++#define TCSR_USB_HSPHY_CONFIG	0xC
++
++#define TCSR_ESS_INTERFACE_SEL_OFFSET   0x0
++#define TCSR_ESS_INTERFACE_SEL_MASK     0xf
++
++#define TCSR_WIFI0_GLB_CFG_OFFSET	0x0
++#define TCSR_WIFI1_GLB_CFG_OFFSET	0x4
++#define TCSR_PNOC_SNOC_MEMTYPE_M0_M2	0x4
++
++static int tcsr_probe(struct platform_device *pdev)
++{
++	struct resource *res;
++	const struct device_node *node = pdev->dev.of_node;
++	void __iomem *base;
++	u32 val;
++
++	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	base = devm_ioremap_resource(&pdev->dev, res);
++	if (IS_ERR(base))
++		return PTR_ERR(base);
++
++	if (!of_property_read_u32(node, "qcom,usb-ctrl-select", &val)) {
++		dev_err(&pdev->dev, "setting usb port select = %d\n", val);
++		writel(val, base + TCSR_USB_PORT_SEL);
++	}
++
++	if (!of_property_read_u32(node, "qcom,usb-hsphy-mode-select", &val)) {
++		dev_info(&pdev->dev, "setting usb hs phy mode select = %x\n", val);
++		writel(val, base + TCSR_USB_HSPHY_CONFIG);
++	}
++
++	if (!of_property_read_u32(node, "qcom,ess-interface-select", &val)) {
++		u32 tmp = 0;
++		dev_info(&pdev->dev, "setting ess interface select = %x\n", val);
++		tmp = readl(base + TCSR_ESS_INTERFACE_SEL_OFFSET);
++		tmp = tmp & (~TCSR_ESS_INTERFACE_SEL_MASK);
++		tmp = tmp | (val&TCSR_ESS_INTERFACE_SEL_MASK);
++		writel(tmp, base + TCSR_ESS_INTERFACE_SEL_OFFSET);
++        }
++
++	if (!of_property_read_u32(node, "qcom,wifi_glb_cfg", &val)) {
++		dev_info(&pdev->dev, "setting wifi_glb_cfg = %x\n", val);
++		writel(val, base + TCSR_WIFI0_GLB_CFG_OFFSET);
++		writel(val, base + TCSR_WIFI1_GLB_CFG_OFFSET);
++	}
++
++	if (!of_property_read_u32(node, "qcom,wifi_noc_memtype_m0_m2", &val)) {
++		dev_info(&pdev->dev,
++			"setting wifi_noc_memtype_m0_m2 = %x\n", val);
++		writel(val, base + TCSR_PNOC_SNOC_MEMTYPE_M0_M2);
++	}
++
++	return 0;
++}
++
++static const struct of_device_id tcsr_dt_match[] = {
++	{ .compatible = "qcom,tcsr", },
++	{ },
++};
++
++MODULE_DEVICE_TABLE(of, tcsr_dt_match);
++
++static struct platform_driver tcsr_driver = {
++	.driver = {
++		.name		= "tcsr",
++		.owner		= THIS_MODULE,
++		.of_match_table	= tcsr_dt_match,
++	},
++	.probe = tcsr_probe,
++};
++
++module_platform_driver(tcsr_driver);
++
++MODULE_AUTHOR("Andy Gross <agross at codeaurora.org>");
++MODULE_DESCRIPTION("QCOM TCSR driver");
++MODULE_LICENSE("GPL v2");
+--- /dev/null
++++ b/include/dt-bindings/soc/qcom,tcsr.h
+@@ -0,0 +1,48 @@
++/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 and
++ * only version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ */
++#ifndef __DT_BINDINGS_QCOM_TCSR_H
++#define __DT_BINDINGS_QCOM_TCSR_H
++
++#define TCSR_USB_SELECT_USB3_P0		0x1
++#define TCSR_USB_SELECT_USB3_P1		0x2
++#define TCSR_USB_SELECT_USB3_DUAL	0x3
++
++/* IPQ40xx HS PHY Mode Select */
++#define TCSR_USB_HSPHY_HOST_MODE	0x00E700E7
++#define TCSR_USB_HSPHY_DEVICE_MODE	0x00C700E7
++
++/* IPQ40xx ess interface mode select */
++#define TCSR_ESS_PSGMII              0
++#define TCSR_ESS_PSGMII_RGMII5       1
++#define TCSR_ESS_PSGMII_RMII0        2
++#define TCSR_ESS_PSGMII_RMII1        4
++#define TCSR_ESS_PSGMII_RMII0_RMII1  6
++#define TCSR_ESS_PSGMII_RGMII4       9
++
++/*
++ * IPQ40xx WiFi Global Config
++ * Bit 30:AXID_EN
++ * Enable AXI master bus Axid translating to confirm all txn submitted by order
++ * Bit 24: Use locally generated socslv_wxi_bvalid
++ * 1:  use locally generate socslv_wxi_bvalid for performance.
++ * 0:  use SNOC socslv_wxi_bvalid.
++ */
++#define TCSR_WIFI_GLB_CFG		0x41000000
++
++/* IPQ40xx MEM_TYPE_SEL_M0_M2 Select Bit 26:24 - 2 NORMAL */
++#define TCSR_WIFI_NOC_MEMTYPE_M0_M2	0x02222222
++
++/* TCSR A/B REG */
++#define IPQ806X_TCSR_REG_A_ADM_CRCI_MUX_SEL     0
++#define IPQ806X_TCSR_REG_B_ADM_CRCI_MUX_SEL     1
++
++#endif
diff --git a/target/linux/ipq40xx/patches-6.1/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch b/target/linux/ipq40xx/patches-6.1/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch
new file mode 100644
index 0000000000..c73e40429c
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch
@@ -0,0 +1,27 @@
+From c668fd2c4d9ad4a510fd214a2da83bd9b67a2508 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robimarko at gmail.com>
+Date: Sun, 13 Aug 2023 18:13:08 +0200
+Subject: [PATCH] Revert "firmware: qcom_scm: Clear download bit during reboot"
+
+This reverts commit a3ea89b5978dbcd0fa55f675c5a1e04611093709.
+
+It is breaking reboot on IPQ4019 boards, so revert until a proper fix
+is found.
+
+Signed-off-by: Robert Marko <robimarko at gmail.com>
+---
+ drivers/firmware/qcom_scm.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/firmware/qcom_scm.c
++++ b/drivers/firmware/qcom_scm.c
+@@ -1466,7 +1466,8 @@ static int qcom_scm_probe(struct platfor
+ static void qcom_scm_shutdown(struct platform_device *pdev)
+ {
+ 	/* Clean shutdown, disable download mode to allow normal restart */
+-	qcom_scm_set_download_mode(false);
++	if (download_mode)
++		qcom_scm_set_download_mode(false);
+ }
+ 
+ static const struct of_device_id qcom_scm_dt_match[] = {
diff --git a/target/linux/ipq40xx/patches-6.1/998-lantiq-atm-hacks.patch b/target/linux/ipq40xx/patches-6.1/998-lantiq-atm-hacks.patch
new file mode 100644
index 0000000000..c15a4b3ae3
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/998-lantiq-atm-hacks.patch
@@ -0,0 +1,43 @@
+From: John Crispin <blogic at openwrt.org>
+Date: Fri, 3 Aug 2012 10:27:25 +0200
+Subject: [PATCH 04/36] MIPS: lantiq: add atm hack
+
+Signed-off-by: John Crispin <blogic at openwrt.org>
+--- a/include/uapi/linux/atm.h
++++ b/include/uapi/linux/atm.h
+@@ -131,8 +131,14 @@
+ #define ATM_ABR		4
+ #define ATM_ANYCLASS	5		/* compatible with everything */
+ 
++#define ATM_VBR_NRT     ATM_VBR
++#define ATM_VBR_RT      6
++#define ATM_UBR_PLUS    7
++#define ATM_GFR         8
++
+ #define ATM_MAX_PCR	-1		/* maximum available PCR */
+ 
++
+ struct atm_trafprm {
+ 	unsigned char	traffic_class;	/* traffic class (ATM_UBR, ...) */
+ 	int		max_pcr;	/* maximum PCR in cells per second */
+@@ -155,6 +161,9 @@ struct atm_trafprm {
+ 	unsigned int adtf      :10;     /* ACR Decrease Time Factor (10-bit) */
+ 	unsigned int cdf       :3;      /* Cutoff Decrease Factor (3-bit) */
+         unsigned int spare     :9;      /* spare bits */ 
++	int		scr;		/* sustained rate in cells per second */
++	int		mbs;		/* maximum burst size (MBS) in cells */
++	int		cdv;		/* Cell delay variation */
+ };
+ 
+ struct atm_qos {
+--- a/net/atm/proc.c
++++ b/net/atm/proc.c
+@@ -141,7 +141,7 @@ static void *vcc_seq_next(struct seq_fil
+ static void pvc_info(struct seq_file *seq, struct atm_vcc *vcc)
+ {
+ 	static const char *const class_name[] = {
+-		"off", "UBR", "CBR", "VBR", "ABR"};
++		"off","UBR","CBR","NTR-VBR","ABR","ANY","RT-VBR","UBR+","GFR"};
+ 	static const char *const aal_name[] = {
+ 		"---",	"1",	"2",	"3/4",	/*  0- 3 */
+ 		"???",	"5",	"???",	"???",	/*  4- 7 */
diff --git a/target/linux/ipq40xx/patches-6.1/999-atm-mpoa-intel-dsl-phy-support.patch b/target/linux/ipq40xx/patches-6.1/999-atm-mpoa-intel-dsl-phy-support.patch
new file mode 100644
index 0000000000..3d5b7afe8c
--- /dev/null
+++ b/target/linux/ipq40xx/patches-6.1/999-atm-mpoa-intel-dsl-phy-support.patch
@@ -0,0 +1,137 @@
+From: Subhra Banerjee <subhrax.banerjee at intel.com>
+Date: Fri, 31 Aug 2018 12:01:19 +0530
+Subject: [PATCH] UGW_SW-29163: ATM oam support
+
+--- a/drivers/net/ppp/ppp_generic.c
++++ b/drivers/net/ppp/ppp_generic.c
+@@ -2953,6 +2953,22 @@ char *ppp_dev_name(struct ppp_channel *c
+ 	return name;
+ }
+ 
++/*
++ * Return the PPP device interface pointer
++ */
++struct net_device *ppp_device(struct ppp_channel *chan)
++{
++	struct channel *pch = chan->ppp;
++	struct net_device *dev = NULL;
++
++	if (pch) {
++		read_lock_bh(&pch->upl);
++		if (pch->ppp && pch->ppp->dev)
++			dev = pch->ppp->dev;
++		read_unlock_bh(&pch->upl);
++	}
++	return dev;
++}
+ 
+ /*
+  * Disconnect a channel from the generic layer.
+@@ -3599,6 +3615,7 @@ EXPORT_SYMBOL(ppp_unregister_channel);
+ EXPORT_SYMBOL(ppp_channel_index);
+ EXPORT_SYMBOL(ppp_unit_number);
+ EXPORT_SYMBOL(ppp_dev_name);
++EXPORT_SYMBOL(ppp_device);
+ EXPORT_SYMBOL(ppp_input);
+ EXPORT_SYMBOL(ppp_input_error);
+ EXPORT_SYMBOL(ppp_output_wakeup);
+--- a/include/linux/ppp_channel.h
++++ b/include/linux/ppp_channel.h
+@@ -76,6 +76,9 @@ extern int ppp_unit_number(struct ppp_ch
+ /* Get the device name associated with a channel, or NULL if none */
+ extern char *ppp_dev_name(struct ppp_channel *);
+ 
++/* Get the device pointer associated with a channel, or NULL if none */
++extern struct net_device *ppp_device(struct ppp_channel *);
++
+ /*
+  * SMP locking notes:
+  * The channel code must ensure that when it calls ppp_unregister_channel,
+--- a/net/atm/Kconfig
++++ b/net/atm/Kconfig
+@@ -56,6 +56,12 @@ config ATM_MPOA
+ 	  subnetwork boundaries. These shortcut connections bypass routers
+ 	  enhancing overall network performance.
+ 
++config ATM_MPOA_INTEL_DSL_PHY_SUPPORT
++	bool "Intel DSL Phy MPOA support"
++	depends on ATM && INET && ATM_MPOA!=n
++	help
++	  Add support for Intel DSL Phy ATM MPOA
++
+ config ATM_BR2684
+ 	tristate "RFC1483/2684 Bridged protocols"
+ 	depends on ATM && INET
+--- a/net/atm/br2684.c
++++ b/net/atm/br2684.c
+@@ -598,6 +598,11 @@ static int br2684_regvcc(struct atm_vcc
+ 	atmvcc->push = br2684_push;
+ 	atmvcc->pop = br2684_pop;
+ 	atmvcc->release_cb = br2684_release_cb;
++#if IS_ENABLED(CONFIG_ATM_MPOA_INTEL_DSL_PHY_SUPPORT)
++	if (atm_hook_mpoa_setup) /* IPoA or EoA w/o FCS */
++		atm_hook_mpoa_setup(atmvcc, brdev->payload == p_routed ? 3 : 0,
++			brvcc->encaps == BR2684_ENCAPS_LLC ? 1 : 0, net_dev);
++#endif
+ 	atmvcc->owner = THIS_MODULE;
+ 
+ 	/* initialize netdev carrier state */
+--- a/net/atm/common.c
++++ b/net/atm/common.c
+@@ -137,6 +137,11 @@ static struct proto vcc_proto = {
+ 	.release_cb = vcc_release_cb,
+ };
+ 
++#if IS_ENABLED(CONFIG_ATM_MPOA_INTEL_DSL_PHY_SUPPORT)
++void (*atm_hook_mpoa_setup)(struct atm_vcc *, int, int, struct net_device *) = NULL;
++EXPORT_SYMBOL(atm_hook_mpoa_setup);
++#endif
++
+ int vcc_create(struct net *net, struct socket *sock, int protocol, int family, int kern)
+ {
+ 	struct sock *sk;
+--- a/net/atm/common.h
++++ b/net/atm/common.h
+@@ -53,4 +53,6 @@ int svc_change_qos(struct atm_vcc *vcc,s
+ 
+ void atm_dev_release_vccs(struct atm_dev *dev);
+ 
++extern void (*atm_hook_mpoa_setup)(struct atm_vcc *, int, int, struct net_device *);
++
+ #endif
+--- a/net/atm/mpc.c
++++ b/net/atm/mpc.c
+@@ -31,6 +31,7 @@
+ /* Modular too */
+ #include <linux/module.h>
+ 
++#include "common.h"
+ #include "lec.h"
+ #include "mpc.h"
+ #include "resources.h"
+@@ -645,6 +646,10 @@ static int atm_mpoa_vcc_attach(struct at
+ 	vcc->proto_data = mpc->dev;
+ 	vcc->push = mpc_push;
+ 
++#if IS_ENABLED(CONFIG_ATM_MPOA_INTEL_DSL_PHY_SUPPORT)
++	if (atm_hook_mpoa_setup) /* IPoA, LLC */
++		atm_hook_mpoa_setup(vcc, 3, 1, mpc->dev);
++#endif
+ 	return 0;
+ }
+ 
+--- a/net/atm/pppoatm.c
++++ b/net/atm/pppoatm.c
+@@ -422,6 +422,12 @@ static int pppoatm_assign_vcc(struct atm
+ 	atmvcc->user_back = pvcc;
+ 	atmvcc->push = pppoatm_push;
+ 	atmvcc->pop = pppoatm_pop;
++#if IS_ENABLED(CONFIG_ATM_MPOA_INTEL_DSL_PHY_SUPPORT)
++	if (atm_hook_mpoa_setup) /* PPPoA */
++		atm_hook_mpoa_setup(atmvcc, 2,
++			pvcc->encaps == e_llc ? 1 : 0,
++			ppp_device(&pvcc->chan));
++#endif
+ 	atmvcc->release_cb = pppoatm_release_cb;
+ 	__module_get(THIS_MODULE);
+ 	atmvcc->owner = THIS_MODULE;



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:01 -0400
Subject: [openwrt/openwrt]  kernel/ipq40xx: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22777.1712094671.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9309cfe37a06b86f8a8172e186b9c651a468bdb9

commit 9309cfe37a06b86f8a8172e186b9c651a468bdb9
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:09:03 2024 +0100

    kernel/ipq40xx: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/{config-6.1 => config-6.6}                           | 0
 .../001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch   | 0
 .../002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch     | 0
 .../004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch              | 0
 .../100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch                       | 0
 .../{patches-6.1 => patches-6.6}/104-clk-fix-apss-cpu-overclocking.patch  | 0
 .../301-arm-compressed-add-appended-DTB-section.patch                     | 0
 .../302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch           | 0
 .../400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch        | 0
 .../401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch            | 0
 .../422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch                 | 0
 .../444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch        | 0
 .../700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch             | 0
 .../701-net-dsa-add-out-of-band-tagging-protocol.patch                    | 0
 .../702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch              | 0
 .../703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch        | 0
 .../704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch         | 0
 .../705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch        | 0
 .../706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch           | 0
 .../707-arm-dts-ipq4019-add-switch-node.patch                             | 0
 .../709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch          | 0
 .../710-arm-dts-ipq4019-QCA807x-properties.patch                          | 0
 .../711-net-qualcomm-ipqess-fix-TX-timeout-errors.patch                   | 0
 .../{patches-6.1 => patches-6.6}/850-soc-add-qualcomm-syscon.patch        | 0
 .../910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch        | 0
 .../linux/ipq40xx/{patches-6.1 => patches-6.6}/998-lantiq-atm-hacks.patch | 0
 .../{patches-6.1 => patches-6.6}/999-atm-mpoa-intel-dsl-phy-support.patch | 0
 27 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/ipq40xx/config-6.1 b/target/linux/ipq40xx/config-6.6
similarity index 100%
rename from target/linux/ipq40xx/config-6.1
rename to target/linux/ipq40xx/config-6.6
diff --git a/target/linux/ipq40xx/patches-6.1/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch b/target/linux/ipq40xx/patches-6.6/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch
rename to target/linux/ipq40xx/patches-6.6/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch
diff --git a/target/linux/ipq40xx/patches-6.1/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch b/target/linux/ipq40xx/patches-6.6/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch
rename to target/linux/ipq40xx/patches-6.6/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch
diff --git a/target/linux/ipq40xx/patches-6.1/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch b/target/linux/ipq40xx/patches-6.6/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch
rename to target/linux/ipq40xx/patches-6.6/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch
diff --git a/target/linux/ipq40xx/patches-6.1/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch b/target/linux/ipq40xx/patches-6.6/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch
rename to target/linux/ipq40xx/patches-6.6/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch
diff --git a/target/linux/ipq40xx/patches-6.1/104-clk-fix-apss-cpu-overclocking.patch b/target/linux/ipq40xx/patches-6.6/104-clk-fix-apss-cpu-overclocking.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/104-clk-fix-apss-cpu-overclocking.patch
rename to target/linux/ipq40xx/patches-6.6/104-clk-fix-apss-cpu-overclocking.patch
diff --git a/target/linux/ipq40xx/patches-6.1/301-arm-compressed-add-appended-DTB-section.patch b/target/linux/ipq40xx/patches-6.6/301-arm-compressed-add-appended-DTB-section.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/301-arm-compressed-add-appended-DTB-section.patch
rename to target/linux/ipq40xx/patches-6.6/301-arm-compressed-add-appended-DTB-section.patch
diff --git a/target/linux/ipq40xx/patches-6.1/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch b/target/linux/ipq40xx/patches-6.6/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch
rename to target/linux/ipq40xx/patches-6.6/302-arm-compressed-set-ipq40xx-watchdog-to-allow-boot.patch
diff --git a/target/linux/ipq40xx/patches-6.1/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
rename to target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
diff --git a/target/linux/ipq40xx/patches-6.1/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch b/target/linux/ipq40xx/patches-6.6/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
rename to target/linux/ipq40xx/patches-6.6/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
diff --git a/target/linux/ipq40xx/patches-6.1/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch b/target/linux/ipq40xx/patches-6.6/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch
rename to target/linux/ipq40xx/patches-6.6/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch
diff --git a/target/linux/ipq40xx/patches-6.1/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch b/target/linux/ipq40xx/patches-6.6/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch
rename to target/linux/ipq40xx/patches-6.6/444-mtd-nand-rawnand-add-support-for-Toshiba-TC58NVG0S3H.patch
diff --git a/target/linux/ipq40xx/patches-6.1/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch b/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
rename to target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
diff --git a/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch
rename to target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
diff --git a/target/linux/ipq40xx/patches-6.1/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch b/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
rename to target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
diff --git a/target/linux/ipq40xx/patches-6.1/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch b/target/linux/ipq40xx/patches-6.6/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch
rename to target/linux/ipq40xx/patches-6.6/703-net-qualcomm-ipqess-release-IRQ-s-on-network-device-.patch
diff --git a/target/linux/ipq40xx/patches-6.1/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch b/target/linux/ipq40xx/patches-6.6/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch
rename to target/linux/ipq40xx/patches-6.6/704-net-qualcomm-ipqess-enable-threaded-NAPI-by-default.patch
diff --git a/target/linux/ipq40xx/patches-6.1/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch b/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
rename to target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
diff --git a/target/linux/ipq40xx/patches-6.1/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
rename to target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
diff --git a/target/linux/ipq40xx/patches-6.1/707-arm-dts-ipq4019-add-switch-node.patch b/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/707-arm-dts-ipq4019-add-switch-node.patch
rename to target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch
diff --git a/target/linux/ipq40xx/patches-6.1/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
rename to target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
diff --git a/target/linux/ipq40xx/patches-6.1/710-arm-dts-ipq4019-QCA807x-properties.patch b/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/710-arm-dts-ipq4019-QCA807x-properties.patch
rename to target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch
diff --git a/target/linux/ipq40xx/patches-6.1/711-net-qualcomm-ipqess-fix-TX-timeout-errors.patch b/target/linux/ipq40xx/patches-6.6/711-net-qualcomm-ipqess-fix-TX-timeout-errors.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/711-net-qualcomm-ipqess-fix-TX-timeout-errors.patch
rename to target/linux/ipq40xx/patches-6.6/711-net-qualcomm-ipqess-fix-TX-timeout-errors.patch
diff --git a/target/linux/ipq40xx/patches-6.1/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/850-soc-add-qualcomm-syscon.patch
rename to target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch
diff --git a/target/linux/ipq40xx/patches-6.1/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch b/target/linux/ipq40xx/patches-6.6/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch
rename to target/linux/ipq40xx/patches-6.6/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch
diff --git a/target/linux/ipq40xx/patches-6.1/998-lantiq-atm-hacks.patch b/target/linux/ipq40xx/patches-6.6/998-lantiq-atm-hacks.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/998-lantiq-atm-hacks.patch
rename to target/linux/ipq40xx/patches-6.6/998-lantiq-atm-hacks.patch
diff --git a/target/linux/ipq40xx/patches-6.1/999-atm-mpoa-intel-dsl-phy-support.patch b/target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch
similarity index 100%
rename from target/linux/ipq40xx/patches-6.1/999-atm-mpoa-intel-dsl-phy-support.patch
rename to target/linux/ipq40xx/patches-6.6/999-atm-mpoa-intel-dsl-phy-support.patch



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:10 -0400
Subject: [openwrt/openwrt]  generic: 6.6: add missing config symbol
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22778.1712094671.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dbd0bc7cf95c87a0c7b18a1724be82ff161eaf8d

commit dbd0bc7cf95c87a0c7b18a1724be82ff161eaf8d
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:37:23 2024 +0100

    generic: 6.6: add missing config symbol
    
    Add missing config symbol while adding support for kernel 6.6 for target
    ipq806x.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/generic/config-6.6 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6
index 28baaf518e..c52b4f682f 100644
--- a/target/linux/generic/config-6.6
+++ b/target/linux/generic/config-6.6
@@ -5356,6 +5356,7 @@ CONFIG_RCU_TORTURE_TEST_SLOW_INIT_DELAY=3
 # CONFIG_REGULATOR_PV88080 is not set
 # CONFIG_REGULATOR_PV88090 is not set
 # CONFIG_REGULATOR_PWM is not set
+# CONFIG_REGULATOR_QCOM_REFGEN is not set
 # CONFIG_REGULATOR_RAA215300 is not set
 # CONFIG_REGULATOR_RASPBERRYPI_TOUCHSCREEN_ATTINY is not set
 # CONFIG_REGULATOR_RT4801 is not set
@@ -7228,6 +7229,7 @@ CONFIG_TTY=y
 # CONFIG_TYPEC_TCPM is not set
 # CONFIG_TYPEC_UCSI is not set
 # CONFIG_TYPHOON is not set
+# CONFIG_UACCE is not set
 # CONFIG_UACCESS_WITH_MEMCPY is not set
 # CONFIG_UBIFS_ATIME_SUPPORT is not set
 # CONFIG_UBIFS_FS_ADVANCED_COMPR is not set



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:06 -0400
Subject: [openwrt/openwrt]  ipq40xx: 6.6: rework kernel patches for new kernel
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22779.1712094676.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/82531764fefc7b8d5f7ed1ef9d41be0b0304e86f

commit 82531764fefc7b8d5f7ed1ef9d41be0b0304e86f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:12:31 2024 +0100

    ipq40xx: 6.6: rework kernel patches for new kernel
    
    Rework kernel patches for new kernel. Mainly adaptation for patch
    related to DTS, OOB Tagger and SDHCI patch.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch  |  6 +++---
 ...-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch |  2 +-
 ...01-net-dsa-add-out-of-band-tagging-protocol.patch | 20 ++++++--------------
 ...com-ipq4019-Add-description-for-the-IPQESS-.patch |  6 +++---
 ...a-qca8k-add-IPQ4019-built-in-switch-support.patch |  4 +---
 .../707-arm-dts-ipq4019-add-switch-node.patch        |  6 +++---
 ...-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch |  4 ++--
 .../710-arm-dts-ipq4019-QCA807x-properties.patch     |  6 +++---
 .../patches-6.6/850-soc-add-qualcomm-syscon.patch    |  4 ++--
 9 files changed, 24 insertions(+), 34 deletions(-)

diff --git a/target/linux/ipq40xx/patches-6.6/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch b/target/linux/ipq40xx/patches-6.6/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch
index 8b9352e6f1..23d8745bde 100644
--- a/target/linux/ipq40xx/patches-6.6/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch
+++ b/target/linux/ipq40xx/patches-6.6/100-ARM-dts-qcom-ipq4019-add-label-to-SCM.patch
@@ -8,11 +8,11 @@ SCM node, so lets make that easy by adding a label to the SCM node.
 
 Signed-off-by: Robert Marko <robimarko at gmail.com>
 ---
- arch/arm/boot/dts/qcom-ipq4019.dtsi | 2 +-
+ arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 @@ -155,7 +155,7 @@
  	};
  
diff --git a/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
index bf36164aed..9ce68d40aa 100644
--- a/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
+++ b/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
@@ -16,7 +16,7 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 @@ -2451,7 +2451,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
  
  static const struct sdhci_ops sdhci_msm_ops = {
- 	.reset = sdhci_msm_reset,
+ 	.reset = sdhci_and_cqhci_reset,
 -	.set_clock = sdhci_msm_set_clock,
 +	.set_clock = sdhci_set_clock,
  	.get_min_clock = sdhci_msm_get_min_clock,
diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index 68d1a2e23b..6ed6fa7540 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -146,16 +146,6 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  };
  
  static __always_inline unsigned int skb_ext_total_length(void)
-@@ -4537,6 +4544,9 @@ static __always_inline unsigned int skb_
- #if IS_ENABLED(CONFIG_MCTP_FLOWS)
- 		skb_ext_type_len[SKB_EXT_MCTP] +
- #endif
-+#if IS_ENABLED(CONFIG_NET_DSA_TAG_OOB)
-+		skb_ext_type_len[SKB_EXT_DSA_OOB] +
-+#endif
- 		0;
- }
- 
 --- a/net/dsa/Kconfig
 +++ b/net/dsa/Kconfig
 @@ -113,6 +113,15 @@ config NET_DSA_TAG_OCELOT_8021Q
@@ -186,7 +176,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  obj-$(CONFIG_NET_DSA_TAG_RTL8_4) += tag_rtl8_4.o
 --- /dev/null
 +++ b/net/dsa/tag_oob.c
-@@ -0,0 +1,49 @@
+@@ -0,0 +1,51 @@
 +// SPDX-License-Identifier: GPL-2.0-only
 +
 +/* Copyright (c) 2022, Maxime Chevallier <maxime.chevallier at bootlin.com> */
@@ -195,7 +185,9 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#include <linux/dsa/oob.h>
 +#include <linux/skbuff.h>
 +
-+#include "dsa_priv.h"
++#include "tag.h"
++
++#define OOB_NAME "oob"
 +
 +static struct sk_buff *oob_tag_xmit(struct sk_buff *skb,
 +				    struct net_device *dev)
@@ -224,7 +216,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +}
 +
 +static const struct dsa_device_ops oob_tag_dsa_ops = {
-+	.name	= "oob",
++	.name	= OOB_NAME,
 +	.proto	= DSA_TAG_PROTO_OOB,
 +	.xmit	= oob_tag_xmit,
 +	.rcv	= oob_tag_rcv,
@@ -233,6 +225,6 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +MODULE_LICENSE("GPL");
 +MODULE_DESCRIPTION("DSA tag driver for out-of-band tagging");
 +MODULE_AUTHOR("Maxime Chevallier <maxime.chevallier at bootlin.com>");
-+MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_OOB);
++MODULE_ALIAS_DSA_TAG_DRIVER(DSA_TAG_PROTO_OOB, OOB_NAME);
 +
 +module_dsa_tag_driver(oob_tag_dsa_ops);
diff --git a/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch b/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
index 27bdebdb93..4f9e7f2f9a 100644
--- a/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
+++ b/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
@@ -16,11 +16,11 @@ for connection to the switch.
 Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
 ---
- arch/arm/boot/dts/qcom-ipq4019.dtsi | 48 +++++++++++++++++++++++++++++
+ arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi | 48 +++++++++++++++++++++++++++++
  1 file changed, 48 insertions(+)
 
---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 @@ -594,6 +594,54 @@
  			status = "disabled";
  		};
diff --git a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
index 992884cf31..c82626eefd 100644
--- a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
+++ b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
@@ -87,7 +87,7 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
  		if (!dsa_port_offloads_bridge(dsa_to_port(ds, i), &bridge))
 --- /dev/null
 +++ b/drivers/net/dsa/qca/qca8k-ipq4019.c
-@@ -0,0 +1,948 @@
+@@ -0,0 +1,946 @@
 +// SPDX-License-Identifier: GPL-2.0
 +/*
 + * Copyright (C) 2009 Felix Fietkau <nbd at nbd.name>
@@ -256,8 +256,6 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 +
 +	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
 +		MAC_10 | MAC_100 | MAC_1000FD;
-+
-+	config->legacy_pre_march2020 = false;
 +}
 +
 +static void
diff --git a/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch b/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch
index e7203a3ac9..b49f08650b 100644
--- a/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch
+++ b/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch
@@ -8,11 +8,11 @@ for it to work.
 
 Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 ---
- arch/arm/boot/dts/qcom-ipq4019.dtsi | 76 +++++++++++++++++++++++++++++
+ arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi | 76 +++++++++++++++++++++++++++++
  1 file changed, 76 insertions(+)
 
---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 @@ -594,6 +594,82 @@
  			status = "disabled";
  		};
diff --git a/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
index e8b89647ce..afc8d920d7 100644
--- a/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
+++ b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
@@ -14,8 +14,8 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  arch/arm/boot/dts//qcom-ipq4019.dtsi | 35 +++++++++++++++---------
  1 file changed, 22 insertions(+), 13 deletions(-)
 
---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 @@ -725,24 +725,33 @@
  			reg = <0x90000 0x64>;
  			status = "disabled";
diff --git a/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch b/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch
index a9ba70ff2f..2ea94d5c34 100644
--- a/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch
+++ b/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch
@@ -7,11 +7,11 @@ This adds necessary DT properties for QCA807x PHY-s to IPQ4019 DTSI.
 
 Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 ---
- arch/arm/boot/dts/qcom-ipq4019.dtsi | 17 +++++++++++++++++
+ arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi | 17 +++++++++++++++++
  1 file changed, 17 insertions(+)
 
---- a/arch/arm/boot/dts/qcom-ipq4019.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq4019.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 @@ -752,6 +752,10 @@
  				ethphy4: ethernet-phy at 4 {
  					reg = <4>;
diff --git a/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch
index 6afb27b178..80dba5d686 100644
--- a/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch
+++ b/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch
@@ -17,9 +17,9 @@ Subject: SoC: add qualcomm syscon
 --- a/drivers/soc/qcom/Makefile
 +++ b/drivers/soc/qcom/Makefile
 @@ -29,3 +29,4 @@ obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
- obj-$(CONFIG_QCOM_RPMPD) += rpmpd.o
- obj-$(CONFIG_QCOM_KRYO_L2_ACCESSORS) +=	kryo-l2-accessors.o
  obj-$(CONFIG_QCOM_ICC_BWMON)	+= icc-bwmon.o
+ qcom_ice-objs			+= ice.o
+ obj-$(CONFIG_QCOM_INLINE_CRYPTO_ENGINE)	+= qcom_ice.o
 +obj-$(CONFIG_QCOM_TCSR)		+= qcom_tcsr.o
 --- /dev/null
 +++ b/drivers/soc/qcom/qcom_tcsr.c



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:05 -0400
Subject: [openwrt/openwrt]  ipq40xx: 6.6: drop upstream kernel patches
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22782.1712094677.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5323c45d7866be4cf61aa963846e00c4f456e590

commit 5323c45d7866be4cf61aa963846e00c4f456e590
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:11:41 2024 +0100

    ipq40xx: 6.6: drop upstream kernel patches
    
    Drop upstream kernel patches that were straight backport.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...-clock-qcom-ipq4019-add-missing-networkin.patch | 30 ----------------------
 ...gcc-ipq4019-add-missing-networking-resets.patch | 30 ----------------------
 2 files changed, 60 deletions(-)

diff --git a/target/linux/ipq40xx/patches-6.6/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch b/target/linux/ipq40xx/patches-6.6/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch
deleted file mode 100644
index 87feaf79f8..0000000000
--- a/target/linux/ipq40xx/patches-6.6/001-v6.6-dt-bindings-clock-qcom-ipq4019-add-missing-networkin.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From be59072c6eeb7535bf9a339fb9d5a8bfae17ac22 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robert.marko at sartura.hr>
-Date: Mon, 14 Aug 2023 12:40:23 +0200
-Subject: [PATCH] dt-bindings: clock: qcom: ipq4019: add missing networking
- resets
-
-Add bindings for the missing networking resets found in IPQ4019 GCC.
-
-Signed-off-by: Robert Marko <robert.marko at sartura.hr>
-Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Link: https://lore.kernel.org/r/20230814104119.96858-1-robert.marko at sartura.hr
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
----
- include/dt-bindings/clock/qcom,gcc-ipq4019.h | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/include/dt-bindings/clock/qcom,gcc-ipq4019.h
-+++ b/include/dt-bindings/clock/qcom,gcc-ipq4019.h
-@@ -165,5 +165,11 @@
- #define GCC_QDSS_BCR					69
- #define GCC_MPM_BCR					70
- #define GCC_SPDM_BCR					71
-+#define ESS_MAC1_ARES					72
-+#define ESS_MAC2_ARES					73
-+#define ESS_MAC3_ARES					74
-+#define ESS_MAC4_ARES					75
-+#define ESS_MAC5_ARES					76
-+#define ESS_PSGMII_ARES					77
- 
- #endif
diff --git a/target/linux/ipq40xx/patches-6.6/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch b/target/linux/ipq40xx/patches-6.6/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch
deleted file mode 100644
index 70b278c803..0000000000
--- a/target/linux/ipq40xx/patches-6.6/002-v6.6-clk-qcom-gcc-ipq4019-add-missing-networking-resets.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 20014461691efc9e274c3870357152db7f091820 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robert.marko at sartura.hr>
-Date: Mon, 14 Aug 2023 12:40:24 +0200
-Subject: [PATCH] clk: qcom: gcc-ipq4019: add missing networking resets
-
-IPQ4019 has more networking related resets that will be required for future
-wired networking support, so lets add them.
-
-Signed-off-by: Robert Marko <robert.marko at sartura.hr>
-Link: https://lore.kernel.org/r/20230814104119.96858-2-robert.marko at sartura.hr
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
----
- drivers/clk/qcom/gcc-ipq4019.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/drivers/clk/qcom/gcc-ipq4019.c
-+++ b/drivers/clk/qcom/gcc-ipq4019.c
-@@ -1707,6 +1707,12 @@ static const struct qcom_reset_map gcc_i
- 	[GCC_TCSR_BCR] = {0x22000, 0},
- 	[GCC_MPM_BCR] = {0x24000, 0},
- 	[GCC_SPDM_BCR] = {0x25000, 0},
-+	[ESS_MAC1_ARES] = {0x1200C, 0},
-+	[ESS_MAC2_ARES] = {0x1200C, 1},
-+	[ESS_MAC3_ARES] = {0x1200C, 2},
-+	[ESS_MAC4_ARES] = {0x1200C, 3},
-+	[ESS_MAC5_ARES] = {0x1200C, 4},
-+	[ESS_PSGMII_ARES] = {0x1200C, 5},
- };
- 
- static const struct regmap_config gcc_ipq4019_regmap_config = {



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:04 -0400
Subject: [openwrt/openwrt]  ipq40xx: 6.6: fix DTS to use reference for usb
 node
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22783.1712094679.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6136ebabc5cb8e37e2c6543e48ffeb7177320c5a

commit 6136ebabc5cb8e37e2c6543e48ffeb7177320c5a
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:16:14 2024 +0100

    ipq40xx: 6.6: fix DTS to use reference for usb node
    
    Fix DTS to use reference for usb node instead of redefining
    them since upstream usb node names changed from usb2/3 to usb.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts    |  8 +--
 .../arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi   | 16 +++---
 .../arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts |  8 +--
 .../arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts    |  8 +--
 .../arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi    | 66 +++++++++++-----------
 .../boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts    | 16 +++---
 .../arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts     |  8 +--
 .../arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts | 16 +++---
 8 files changed, 73 insertions(+), 73 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
index f43c4b8000..8ce530dbd5 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
@@ -44,10 +44,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -191,6 +187,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
index bb293bb57e..581b939ae6 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
@@ -54,14 +54,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3: usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -266,6 +258,10 @@
 	qcom,ath10k-calibration-variant = "8devices-Jalapeno";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -274,6 +270,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
index f23b58a3f4..cb847e7558 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
@@ -44,10 +44,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -183,6 +179,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
index 39a52a7c48..463e1e171e 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
@@ -44,10 +44,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -202,6 +198,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
index d226611311..9216a7c9f8 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
@@ -57,20 +57,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-
-			dwc3 at 6000000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb2_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		serial at 78af000 {
 			pinctrl-0 = <&serial_0_pins>;
 			pinctrl-names = "default";
@@ -90,25 +76,6 @@
 			status = "okay";
 		};
 
-		usb3: usb3 at 8af8800 {
-			status = "okay";
-
-			dwc3 at 8a00000 {
-				#address-cells = <1>;
-				#size-cells = <0>;
-
-				usb3_port1: port at 1 {
-					reg = <1>;
-					#trigger-source-cells = <0>;
-				};
-
-				usb3_port2: port at 2 {
-					reg = <2>;
-					#trigger-source-cells = <0>;
-				};
-			};
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -233,6 +200,25 @@
 	};
 };
 
+&usb3 {
+	status = "okay";
+
+	dwc3 at 8a00000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usb3_port1: port at 1 {
+			reg = <1>;
+			#trigger-source-cells = <0>;
+		};
+
+		usb3_port2: port at 2 {
+			reg = <2>;
+			#trigger-source-cells = <0>;
+		};
+	};
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -241,6 +227,20 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+
+	dwc3 at 6000000 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+
+		usb2_port1: port at 1 {
+			reg = <1>;
+			#trigger-source-cells = <0>;
+		};
+	};
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
index 26e9941a9f..86daa58a3f 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
@@ -62,14 +62,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3: usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -379,6 +371,10 @@
 	qcom,ath10k-calibration-variant = "8devices-Habanero";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -387,6 +383,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
index 4e2b4574d3..836ad44210 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
@@ -63,10 +63,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -304,6 +300,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
index 4b61bbb5ac..88bcbb3101 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
@@ -73,14 +73,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2: usb2 at 60f8800 {
-			status = "okay";
-		};
-
-		usb3: usb3 at 8af8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -291,6 +283,10 @@
 	nvmem-cell-names = "mac-address";
 };
 
+&usb3 {
+	status = "okay";
+};
+
 &usb3_ss_phy {
 	status = "okay";
 };
@@ -299,6 +295,10 @@
 	status = "okay";
 };
 
+&usb2 {
+	status = "okay";
+};
+
 &usb2_hs_phy {
 	status = "okay";
 };



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:03 -0400
Subject: [openwrt/openwrt]  ipq40xx: split files in 6.1 and 6.6 dedicated
 directory
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22784.1712094679.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/68c46788717f2232cd7b9e9c49c15e9bb5a16b88

commit 68c46788717f2232cd7b9e9c49c15e9bb5a16b88
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:10:40 2024 +0100

    ipq40xx: split files in 6.1 and 6.6 dedicated directory
    
    Since with recent kernel version DTS moved to a dedicated directory,
    it's required to split files to per kernel version to follow kernel
    version directory structure.
    
    Also makes use of DEVICE_DTS_DIR to target the correct DTS directory
    based on the kernel version.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../ipq40xx/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-a42.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts       | 0
 .../arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts                 | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts      | 0
 .../ipq40xx/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-emd1.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-ex6100v2.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-ex6150v2.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi    | 0
 .../arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts                     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-gl-a1300.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi    | 0
 .../arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts                 | 0
 .../arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts                     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-mf287.dts        | 0
 .../arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi                     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-pa1200.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-wac510.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-wap-ac-lte.dts   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dtsi      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-wap-r-ac.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-whw01.dts        | 0
 .../ipq40xx/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts  | 0
 .../ipq40xx/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-a62.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts      | 0
 .../arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts                     | 0
 .../arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts                | 0
 .../arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts                | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts | 0
 .../arch/arm/boot/dts/qcom-ipq4019-hap-ac3-lte6-kit.dts                  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-lbr20.dts        | 0
 .../ipq40xx/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-le1.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-mf282plus.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts       | 0
 .../arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts                | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-oap100.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-pa2200.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-r619ac-64m.dts   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-srr60.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-srs60.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts      | 0
 .../ipq40xx/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-wifi.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-x1pro.dtsi       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts       | 0
 .../arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi               | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts     | 0
 .../arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi                    | 0
 .../ipq40xx/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-mr33.dts | 0
 .../ipq40xx/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-mr74.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq4029-ws-ap391x.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts       | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-a42.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-ap120c-ac.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-cap-ac.dts     | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4018-cs-w3-wd1200g-eup.dts           | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-dap-2610.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-ea6350v3.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-eap1300.dts    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-ecw5211.dts    | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-emd1.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-emr3500.dts    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-ens620ext.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-ex6100v2.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-ex6150v2.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-ex61x0v2.dtsi  | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4018-fritzbox-4040.dts               | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-gl-a1300.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-gl-ap1300.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-hap-ac2.dts    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-jalapeno.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-jalapeno.dtsi  | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4018-magic-2-wifi-next.dts           | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4018-meshpoint-one.dts               | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-mf287.dts | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4018-mf287_common.dtsi               | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-mf287plus.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-mf287pro.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-nbg6617.dts    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-pa1200.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-rt-ac58u.dts   | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-rutx.dtsi | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-rutx10.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-rutx50.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-sxtsq-5-ac.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-wac510.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-wap-ac-lte.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-wap-ac.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-wap-ac.dtsi    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-wap-r-ac.dts   | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-whw01.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-wr-1.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4018-wre6606.dts    | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4018-wrtq-329acn.dts                 | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-a62.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-cm520-79f.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-e2600ac-c1.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-e2600ac-c2.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-e2600ac.dtsi   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-ea8300.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-eap2200.dts    | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4019-fritzbox-7530.dts               | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4019-fritzrepeater-1200.dts          | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4019-fritzrepeater-3000.dts          | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-gl-b2200.dts   | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4019-habanero-dvk.dts                | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4019-hap-ac3-lte6-kit.dts            | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-hap-ac3.dts    | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-lbr20.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-le1.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-lhgg-60ad.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-map-ac2200.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-mf18a.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-mf282plus.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-mf286d.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-mf289f.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-mr8300.dts     | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4019-ncp-hg100-cellular.dts          | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-oap100.dts     | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-orbi.dtsi | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-pa2200.dts     | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4019-r619ac-128m.dts                 | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-r619ac-64m.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-r619ac.dtsi    | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-rbr40.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-rbr50.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-rbs40.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-rbs50.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-rt-ac42u.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-rtl30vw.dts    | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-srr60.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-srs60.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-u4019-32m.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-u4019.dtsi     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-whw03v2.dts    | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-wifi.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-wpj419.dts     | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4019-wtr-m2133hp.dts                 | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-x1pro.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-x1pro.dtsi     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4019-xx8300.dtsi    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4028-wpj428.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-ap-303.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-ap-303h.dts    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-ap-365.dts     | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4029-aruba-glenmorangie.dtsi         | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-gl-b1300.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-gl-s1300.dts   | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq4029-insect-common.dtsi              | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-mr33.dts  | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-mr74.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-ws-ap3915i.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq4029-ws-ap391x.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq40x9-dr40x9.dts     | 0
 target/linux/ipq40xx/image/Makefile                                      | 1 +
 205 files changed, 1 insertion(+)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-a42.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-a42.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-emd1.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-emd1.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6100v2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ex6100v2.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6100v2.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ex6100v2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6150v2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ex6150v2.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6150v2.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ex6150v2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-a1300.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-gl-a1300.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-a1300.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-gl-a1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-mf287.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-mf287.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-pa1200.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-pa1200.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-pa1200.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-pa1200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wac510.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wac510.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac-lte.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wap-ac-lte.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac-lte.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wap-ac-lte.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-r-ac.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wap-r-ac.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-r-ac.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wap-r-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-whw01.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-whw01.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-a62.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-a62.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3-lte6-kit.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-hap-ac3-lte6-kit.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3-lte6-kit.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-hap-ac3-lte6-kit.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lbr20.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-lbr20.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lbr20.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-lbr20.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-le1.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-le1.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-le1.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-le1.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf282plus.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mf282plus.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf282plus.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mf282plus.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-oap100.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-oap100.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-pa2200.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-pa2200.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-pa2200.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-pa2200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-64m.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-r619ac-64m.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-64m.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-r619ac-64m.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srr60.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-srr60.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srr60.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-srr60.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srs60.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-srs60.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srs60.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-srs60.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-x1pro.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-x1pro.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-mr33.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-mr33.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-mr33.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-mr33.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-mr74.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-mr74.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-mr74.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-mr74.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap391x.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ws-ap391x.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap391x.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4029-ws-ap391x.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts
similarity index 100%
copy from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts
copy to target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-a42.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-a42.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ap120c-ac.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ap120c-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cap-ac.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cap-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-cs-w3-wd1200g-eup.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-cs-w3-wd1200g-eup.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-dap-2610.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-dap-2610.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ea6350v3.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ea6350v3.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-eap1300.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-eap1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ecw5211.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ecw5211.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emd1.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emd1.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-emr3500.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-emr3500.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ens620ext.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ens620ext.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6100v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex6100v2.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6100v2.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex6100v2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6150v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex6150v2.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex6150v2.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex6150v2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-ex61x0v2.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-ex61x0v2.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-fritzbox-4040.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-fritzbox-4040.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-a1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-a1300.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-a1300.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-a1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-gl-ap1300.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-gl-ap1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-hap-ac2.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-hap-ac2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-jalapeno.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-jalapeno.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-magic-2-wifi-next.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-magic-2-wifi-next.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-meshpoint-one.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-meshpoint-one.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-meshpoint-one.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287_common.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287_common.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287_common.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287plus.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287plus.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287plus.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287pro.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-mf287pro.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-mf287pro.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-nbg6617.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-nbg6617.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-pa1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-pa1200.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-pa1200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rt-ac58u.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rt-ac58u.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rutx.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rutx.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rutx10.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx10.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rutx10.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rutx50.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-rutx50.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-rutx50.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-sxtsq-5-ac.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-sxtsq-5-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wac510.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wac510.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac-lte.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac-lte.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac-lte.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac-lte.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-ac.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-ac.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-r-ac.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-r-ac.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wap-r-ac.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wap-r-ac.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-whw01.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-whw01.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-whw01.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wr-1.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wr-1.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wr-1.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wre6606.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wre6606.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4018-wrtq-329acn.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4018-wrtq-329acn.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-a62.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-a62.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-cm520-79f.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-cm520-79f.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac-c1.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c1.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac-c1.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac-c2.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac-c2.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac-c2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-e2600ac.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-e2600ac.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ea8300.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ea8300.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ea8300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-eap2200.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-eap2200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzbox-7530.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzbox-7530.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-1200.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-1200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-fritzrepeater-3000.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-fritzrepeater-3000.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-gl-b2200.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-gl-b2200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-habanero-dvk.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-habanero-dvk.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3-lte6-kit.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3-lte6-kit.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3-lte6-kit.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3-lte6-kit.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-hap-ac3.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-hap-ac3.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lbr20.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lbr20.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lbr20.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lbr20.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-le1.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-le1.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-le1.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-le1.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-lhgg-60ad.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-lhgg-60ad.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-map-ac2200.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-map-ac2200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf18a.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf18a.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf282plus.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf282plus.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf282plus.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf286d.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf286d.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf289f.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mf289f.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mf289f.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mr8300.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-mr8300.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-mr8300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-ncp-hg100-cellular.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-ncp-hg100-cellular.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-oap100.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-oap100.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-orbi.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-orbi.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-pa2200.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-pa2200.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-pa2200.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac-128m.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-128m.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac-128m.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-64m.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac-64m.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac-64m.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac-64m.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-r619ac.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-r619ac.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbr40.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr40.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbr40.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbr50.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbr50.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbr50.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbs40.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs40.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbs40.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbs50.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rbs50.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rbs50.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rt-ac42u.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rt-ac42u.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-rtl30vw.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-rtl30vw.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srr60.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-srr60.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srr60.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-srr60.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srs60.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-srs60.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-srs60.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-srs60.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019-32m.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019-32m.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019-32m.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-u4019.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-u4019.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wifi.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wifi.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wifi.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wpj419.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wpj419.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-wtr-m2133hp.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-wtr-m2133hp.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-x1pro.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-x1pro.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-xx8300.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-xx8300.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4028-wpj428.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4028-wpj428.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-303h.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-365.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ap-365.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-365.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-aruba-glenmorangie.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-aruba-glenmorangie.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-b1300.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-b1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-gl-s1300.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-gl-s1300.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-insect-common.dtsi
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-insect-common.dtsi
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-mr33.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-mr33.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-mr33.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-mr33.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-mr74.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-mr74.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-mr74.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-mr74.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap3915i.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap3915i.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap391x.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap391x.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4029-ws-ap391x.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ws-ap391x.dts
diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq40x9-dr40x9.dts
similarity index 100%
rename from target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq40x9-dr40x9.dts
rename to target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq40x9-dr40x9.dts
diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index 2ba4c779a0..fe99d05ccb 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -5,6 +5,7 @@ define Device/Default
 	PROFILES := Default
 	KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
 	KERNEL_LOADADDR := 0x80208000
+	DEVICE_DTS_DIR = $(if $(CONFIG_TESTING_KERNEL),$$(DTS_DIR)/qcom,$$(DTS_DIR))
 	DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
 	DEVICE_DTS_CONFIG := config at 1
 	IMAGES := sysupgrade.bin



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:08 -0400
Subject: [openwrt/openwrt]  ipq40xx: 6.6: refresh kernel patches
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22787.1712094679.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/61d1eedc2d549f0cb9e81a028165c0f727f91ee3

commit 61d1eedc2d549f0cb9e81a028165c0f727f91ee3
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:27:10 2024 +0100

    ipq40xx: 6.6: refresh kernel patches
    
    Refresh kernel patches using make target/linux/refresh.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...6.7-firmware-qcom_scm-disable-SDI-if-required.patch |  8 ++++----
 .../104-clk-fix-apss-cpu-overclocking.patch            | 10 +++++-----
 .../110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch  |  7 +------
 ...ci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch |  2 +-
 ...-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch |  2 +-
 ...2-firmware-qcom-scm-fix-SCM-cold-boot-address.patch |  2 +-
 ...t-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch |  4 ++--
 .../701-net-dsa-add-out-of-band-tagging-protocol.patch | 18 +++++++++---------
 ...et-ipqess-Add-out-of-band-DSA-tagging-support.patch |  2 +-
 ...-qcom-ipq4019-Add-description-for-the-IPQESS-.patch |  2 +-
 ...dsa-qca8k-add-IPQ4019-built-in-switch-support.patch |  2 +-
 .../707-arm-dts-ipq4019-add-switch-node.patch          |  2 +-
 ...ts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch |  2 +-
 .../710-arm-dts-ipq4019-QCA807x-properties.patch       |  2 +-
 .../patches-6.6/850-soc-add-qualcomm-syscon.patch      |  8 ++++----
 ...firmware-qcom_scm-Clear-download-bit-during-r.patch |  2 +-
 16 files changed, 35 insertions(+), 40 deletions(-)

diff --git a/target/linux/ipq40xx/patches-6.6/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch b/target/linux/ipq40xx/patches-6.6/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch
index ae7e9f97c0..a296d8c9a2 100644
--- a/target/linux/ipq40xx/patches-6.6/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch
+++ b/target/linux/ipq40xx/patches-6.6/004-v6.7-firmware-qcom_scm-disable-SDI-if-required.patch
@@ -27,9 +27,9 @@ Signed-off-by: Bjorn Andersson <andersson at kernel.org>
 
 --- a/drivers/firmware/qcom_scm.c
 +++ b/drivers/firmware/qcom_scm.c
-@@ -407,6 +407,29 @@ int qcom_scm_set_remote_state(u32 state,
+@@ -410,6 +410,29 @@ int qcom_scm_set_remote_state(u32 state,
  }
- EXPORT_SYMBOL(qcom_scm_set_remote_state);
+ EXPORT_SYMBOL_GPL(qcom_scm_set_remote_state);
  
 +static int qcom_scm_disable_sdi(void)
 +{
@@ -57,7 +57,7 @@ Signed-off-by: Bjorn Andersson <andersson at kernel.org>
  static int __qcom_scm_set_dload_mode(struct device *dev, bool enable)
  {
  	struct qcom_scm_desc desc = {
-@@ -1411,6 +1434,13 @@ static int qcom_scm_probe(struct platfor
+@@ -1467,6 +1490,13 @@ static int qcom_scm_probe(struct platfor
  
  	__get_convention();
  
@@ -73,7 +73,7 @@ Signed-off-by: Bjorn Andersson <andersson at kernel.org>
  	 * will cause the boot stages to enter download mode, unless
 --- a/drivers/firmware/qcom_scm.h
 +++ b/drivers/firmware/qcom_scm.h
-@@ -77,6 +77,7 @@ extern int scm_legacy_call(struct device
+@@ -80,6 +80,7 @@ extern int scm_legacy_call(struct device
  #define QCOM_SCM_SVC_BOOT		0x01
  #define QCOM_SCM_BOOT_SET_ADDR		0x01
  #define QCOM_SCM_BOOT_TERMINATE_PC	0x02
diff --git a/target/linux/ipq40xx/patches-6.6/104-clk-fix-apss-cpu-overclocking.patch b/target/linux/ipq40xx/patches-6.6/104-clk-fix-apss-cpu-overclocking.patch
index 2de03f7ae0..a2d9fac1ec 100644
--- a/target/linux/ipq40xx/patches-6.6/104-clk-fix-apss-cpu-overclocking.patch
+++ b/target/linux/ipq40xx/patches-6.6/104-clk-fix-apss-cpu-overclocking.patch
@@ -44,7 +44,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/clk/qcom/gcc-ipq4019.c
 +++ b/drivers/clk/qcom/gcc-ipq4019.c
-@@ -1243,6 +1243,29 @@ static const struct clk_fepll_vco gcc_fe
+@@ -120,6 +120,29 @@ static const struct clk_fepll_vco gcc_fe
  	.reg = 0x2f020,
  };
  
@@ -74,7 +74,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
  /*
   * Round rate function for APSS CPU PLL Clock divider.
   * It looks up the frequency table and returns the next higher frequency
-@@ -1255,7 +1278,7 @@ static long clk_cpu_div_round_rate(struc
+@@ -132,7 +155,7 @@ static long clk_cpu_div_round_rate(struc
  	struct clk_hw *p_hw;
  	const struct freq_tbl *f;
  
@@ -83,7 +83,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
  	if (!f)
  		return -EINVAL;
  
-@@ -1277,7 +1300,7 @@ static int clk_cpu_div_set_rate(struct c
+@@ -154,7 +177,7 @@ static int clk_cpu_div_set_rate(struct c
  	const struct freq_tbl *f;
  	u32 mask;
  
@@ -92,7 +92,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
  	if (!f)
  		return -EINVAL;
  
-@@ -1304,6 +1327,7 @@ static unsigned long
+@@ -181,6 +204,7 @@ static unsigned long
  clk_cpu_div_recalc_rate(struct clk_hw *hw,
  			unsigned long parent_rate)
  {
@@ -100,7 +100,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
  	struct clk_fepll *pll = to_clk_fepll(hw);
  	u32 cdiv, pre_div;
  	u64 rate;
-@@ -1324,7 +1348,11 @@ clk_cpu_div_recalc_rate(struct clk_hw *h
+@@ -201,7 +225,11 @@ clk_cpu_div_recalc_rate(struct clk_hw *h
  	rate = clk_fepll_vco_calc_rate(pll, parent_rate) * 2;
  	do_div(rate, pre_div);
  
diff --git a/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch b/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch
index 80fd20318b..03f45d7a9a 100644
--- a/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch
+++ b/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch
@@ -45,11 +45,9 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  drivers/mtd/mtdcore.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
 
-diff --git a/drivers/mtd/mtdcore.c b/drivers/mtd/mtdcore.c
-index 5887feb347a4..6872477a5129 100644
 --- a/drivers/mtd/mtdcore.c
 +++ b/drivers/mtd/mtdcore.c
-@@ -900,7 +900,7 @@ static struct nvmem_device *mtd_otp_nvmem_register(struct mtd_info *mtd,
+@@ -933,7 +933,7 @@ static struct nvmem_device *mtd_otp_nvme
  	config.name = compatible;
  	config.id = NVMEM_DEVID_AUTO;
  	config.owner = THIS_MODULE;
@@ -58,6 +56,3 @@ index 5887feb347a4..6872477a5129 100644
  	config.type = NVMEM_TYPE_OTP;
  	config.root_only = true;
  	config.ignore_wp = true;
--- 
-2.43.0
-
diff --git a/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch b/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
index 9ce68d40aa..1c156d4398 100644
--- a/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
+++ b/target/linux/ipq40xx/patches-6.6/400-mmc-sdhci-sdhci-msm-use-sdhci_set_clock-instead-of-s.patch
@@ -13,7 +13,7 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 
 --- a/drivers/mmc/host/sdhci-msm.c
 +++ b/drivers/mmc/host/sdhci-msm.c
-@@ -2451,7 +2451,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
+@@ -2320,7 +2320,7 @@ MODULE_DEVICE_TABLE(of, sdhci_msm_dt_mat
  
  static const struct sdhci_ops sdhci_msm_ops = {
  	.reset = sdhci_and_cqhci_reset,
diff --git a/target/linux/ipq40xx/patches-6.6/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch b/target/linux/ipq40xx/patches-6.6/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
index b297600171..cfbb643974 100644
--- a/target/linux/ipq40xx/patches-6.6/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
+++ b/target/linux/ipq40xx/patches-6.6/401-mmc-sdhci-msm-comment-unused-sdhci_msm_set_clock.patch
@@ -13,7 +13,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/mmc/host/sdhci-msm.c
 +++ b/drivers/mmc/host/sdhci-msm.c
-@@ -1751,49 +1751,49 @@ static unsigned int sdhci_msm_get_min_cl
+@@ -1755,49 +1755,49 @@ static unsigned int sdhci_msm_get_min_cl
  	return SDHCI_MSM_MIN_CLOCK;
  }
  
diff --git a/target/linux/ipq40xx/patches-6.6/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch b/target/linux/ipq40xx/patches-6.6/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch
index cb06ff353c..1c8cfb2981 100644
--- a/target/linux/ipq40xx/patches-6.6/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch
+++ b/target/linux/ipq40xx/patches-6.6/422-firmware-qcom-scm-fix-SCM-cold-boot-address.patch
@@ -118,7 +118,7 @@ Signed-off-by: Brian Norris <computersforpeace at gmail.com>
  }
 --- a/drivers/firmware/qcom_scm.c
 +++ b/drivers/firmware/qcom_scm.c
-@@ -312,6 +312,17 @@ static int qcom_scm_set_boot_addr(void *
+@@ -315,6 +315,17 @@ static int qcom_scm_set_boot_addr(void *
  	desc.args[0] = flags;
  	desc.args[1] = virt_to_phys(entry);
  
diff --git a/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch b/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
index be12bfcd21..a15efe57d8 100644
--- a/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
+++ b/target/linux/ipq40xx/patches-6.6/700-net-ipqess-introduce-the-Qualcomm-IPQESS-driver.patch
@@ -32,7 +32,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -17075,6 +17075,13 @@ L:	netdev at vger.kernel.org
+@@ -17708,6 +17708,13 @@ L:	netdev at vger.kernel.org
  S:	Maintained
  F:	drivers/net/ethernet/qualcomm/emac/
  
@@ -48,7 +48,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  R:	Bhupesh Sharma <bhupesh.sharma at linaro.org>
 --- a/drivers/net/ethernet/qualcomm/Kconfig
 +++ b/drivers/net/ethernet/qualcomm/Kconfig
-@@ -60,6 +60,17 @@ config QCOM_EMAC
+@@ -61,6 +61,17 @@ config QCOM_EMAC
  	  low power, Receive-Side Scaling (RSS), and IEEE 1588-2008
  	  Precision Clock Synchronization Protocol.
  
diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index 6ed6fa7540..e07cee30c7 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -64,7 +64,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -17081,6 +17081,7 @@ L:	netdev at vger.kernel.org
+@@ -17714,6 +17714,7 @@ L:	netdev at vger.kernel.org
  S:	Maintained
  F:	Documentation/devicetree/bindings/net/qcom,ipq4019-ess-edma.yaml
  F:	drivers/net/ethernet/qualcomm/ipqess/
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4588,6 +4588,9 @@ enum skb_ext_id {
+@@ -4627,6 +4627,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif
@@ -105,7 +105,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  
 --- a/include/net/dsa.h
 +++ b/include/net/dsa.h
-@@ -55,6 +55,7 @@ struct phylink_link_state;
+@@ -56,6 +56,7 @@ struct phylink_link_state;
  #define DSA_TAG_PROTO_RTL8_4T_VALUE		25
  #define DSA_TAG_PROTO_RZN1_A5PSW_VALUE		26
  #define DSA_TAG_PROTO_LAN937X_VALUE		27
@@ -113,7 +113,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  
  enum dsa_tag_protocol {
  	DSA_TAG_PROTO_NONE		= DSA_TAG_PROTO_NONE_VALUE,
-@@ -85,6 +86,7 @@ enum dsa_tag_protocol {
+@@ -86,6 +87,7 @@ enum dsa_tag_protocol {
  	DSA_TAG_PROTO_RTL8_4T		= DSA_TAG_PROTO_RTL8_4T_VALUE,
  	DSA_TAG_PROTO_RZN1_A5PSW	= DSA_TAG_PROTO_RZN1_A5PSW_VALUE,
  	DSA_TAG_PROTO_LAN937X		= DSA_TAG_PROTO_LAN937X_VALUE,
@@ -123,7 +123,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  struct dsa_switch;
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
-@@ -62,8 +62,12 @@
+@@ -63,8 +63,12 @@
  #include <linux/mpls.h>
  #include <linux/kcov.h>
  #include <linux/if.h>
@@ -136,7 +136,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  #include <net/dst.h>
  #include <net/sock.h>
  #include <net/checksum.h>
-@@ -4517,6 +4521,9 @@ static const u8 skb_ext_type_len[] = {
+@@ -4812,6 +4816,9 @@ static const u8 skb_ext_type_len[] = {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	[SKB_EXT_MCTP] = SKB_EXT_CHUNKSIZEOF(struct mctp_flow),
  #endif
@@ -148,7 +148,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  static __always_inline unsigned int skb_ext_total_length(void)
 --- a/net/dsa/Kconfig
 +++ b/net/dsa/Kconfig
-@@ -113,6 +113,15 @@ config NET_DSA_TAG_OCELOT_8021Q
+@@ -119,6 +119,15 @@ config NET_DSA_TAG_OCELOT_8021Q
  	  this mode, less TCAM resources (VCAP IS1, IS2, ES0) are available for
  	  use with tc-flower.
  
@@ -166,8 +166,8 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  	help
 --- a/net/dsa/Makefile
 +++ b/net/dsa/Makefile
-@@ -22,6 +22,7 @@ obj-$(CONFIG_NET_DSA_TAG_LAN9303) += tag
- obj-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk.o
+@@ -31,6 +31,7 @@ obj-$(CONFIG_NET_DSA_TAG_MTK) += tag_mtk
+ obj-$(CONFIG_NET_DSA_TAG_NONE) += tag_none.o
  obj-$(CONFIG_NET_DSA_TAG_OCELOT) += tag_ocelot.o
  obj-$(CONFIG_NET_DSA_TAG_OCELOT_8021Q) += tag_ocelot_8021q.o
 +obj-$(CONFIG_NET_DSA_TAG_OOB) += tag_oob.o
diff --git a/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch b/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
index ac0718ba2c..fe6b59d18f 100644
--- a/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
+++ b/target/linux/ipq40xx/patches-6.6/702-net-ipqess-Add-out-of-band-DSA-tagging-support.patch
@@ -23,7 +23,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 
 --- a/drivers/net/ethernet/qualcomm/Kconfig
 +++ b/drivers/net/ethernet/qualcomm/Kconfig
-@@ -64,6 +64,7 @@ config QCOM_IPQ4019_ESS_EDMA
+@@ -65,6 +65,7 @@ config QCOM_IPQ4019_ESS_EDMA
  	tristate "Qualcomm Atheros IPQ4019 ESS EDMA support"
  	depends on (OF && ARCH_QCOM) || COMPILE_TEST
  	select PHYLINK
diff --git a/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch b/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
index 4f9e7f2f9a..6b66393d82 100644
--- a/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
+++ b/target/linux/ipq40xx/patches-6.6/705-ARM-dts-qcom-ipq4019-Add-description-for-the-IPQESS-.patch
@@ -21,7 +21,7 @@ Reviewed-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
 
 --- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
-@@ -594,6 +594,54 @@
+@@ -596,6 +596,54 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
index c82626eefd..e0331d28ab 100644
--- a/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
+++ b/target/linux/ipq40xx/patches-6.6/706-net-dsa-qca8k-add-IPQ4019-built-in-switch-support.patch
@@ -37,7 +37,7 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 
 --- a/drivers/net/dsa/qca/Kconfig
 +++ b/drivers/net/dsa/qca/Kconfig
-@@ -23,3 +23,11 @@ config NET_DSA_QCA8K_LEDS_SUPPORT
+@@ -24,3 +24,11 @@ config NET_DSA_QCA8K_LEDS_SUPPORT
  	help
  	  This enabled support for LEDs present on the Qualcomm Atheros
  	  QCA8K Ethernet switch chips.
diff --git a/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch b/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch
index b49f08650b..130cc52fbe 100644
--- a/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch
+++ b/target/linux/ipq40xx/patches-6.6/707-arm-dts-ipq4019-add-switch-node.patch
@@ -13,7 +13,7 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 
 --- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
-@@ -594,6 +594,82 @@
+@@ -596,6 +596,82 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
index afc8d920d7..6a37cc1f5e 100644
--- a/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
+++ b/target/linux/ipq40xx/patches-6.6/709-ARM-dts-qcom-ipq4019-add-QCA8075-PHY-Package-nodes.patch
@@ -16,7 +16,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
-@@ -725,24 +725,33 @@
+@@ -727,24 +727,33 @@
  			reg = <0x90000 0x64>;
  			status = "disabled";
  
diff --git a/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch b/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch
index 2ea94d5c34..9f4c9fa67e 100644
--- a/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch
+++ b/target/linux/ipq40xx/patches-6.6/710-arm-dts-ipq4019-QCA807x-properties.patch
@@ -12,7 +12,7 @@ Signed-off-by: Robert Marko <robert.marko at sartura.hr>
 
 --- a/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
 +++ b/arch/arm/boot/dts/qcom/qcom-ipq4019.dtsi
-@@ -752,6 +752,10 @@
+@@ -754,6 +754,10 @@
  				ethphy4: ethernet-phy at 4 {
  					reg = <4>;
  				};
diff --git a/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch
index 80dba5d686..778b9f5930 100644
--- a/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch
+++ b/target/linux/ipq40xx/patches-6.6/850-soc-add-qualcomm-syscon.patch
@@ -2,9 +2,9 @@ From: Christian Lamparter <chunkeey at googlemail.com>
 Subject: SoC: add qualcomm syscon
 --- a/drivers/soc/qcom/Kconfig
 +++ b/drivers/soc/qcom/Kconfig
-@@ -248,4 +248,11 @@ config QCOM_ICC_BWMON
- 	  the fixed bandwidth votes from cpufreq (CPU nodes) thus achieve high
- 	  memory throughput even with lower CPU frequencies.
+@@ -291,4 +291,11 @@ config QCOM_INLINE_CRYPTO_ENGINE
+ 	tristate
+ 	select QCOM_SCM
  
 +config QCOM_TCSR
 +	tristate "QCOM Top Control and Status Registers"
@@ -16,7 +16,7 @@ Subject: SoC: add qualcomm syscon
  endmenu
 --- a/drivers/soc/qcom/Makefile
 +++ b/drivers/soc/qcom/Makefile
-@@ -29,3 +29,4 @@ obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
+@@ -32,3 +32,4 @@ obj-$(CONFIG_QCOM_KRYO_L2_ACCESSORS) +=
  obj-$(CONFIG_QCOM_ICC_BWMON)	+= icc-bwmon.o
  qcom_ice-objs			+= ice.o
  obj-$(CONFIG_QCOM_INLINE_CRYPTO_ENGINE)	+= qcom_ice.o
diff --git a/target/linux/ipq40xx/patches-6.6/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch b/target/linux/ipq40xx/patches-6.6/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch
index c73e40429c..8cb424c050 100644
--- a/target/linux/ipq40xx/patches-6.6/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch
+++ b/target/linux/ipq40xx/patches-6.6/910-Revert-firmware-qcom_scm-Clear-download-bit-during-r.patch
@@ -15,7 +15,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 
 --- a/drivers/firmware/qcom_scm.c
 +++ b/drivers/firmware/qcom_scm.c
-@@ -1466,7 +1466,8 @@ static int qcom_scm_probe(struct platfor
+@@ -1522,7 +1522,8 @@ static int qcom_scm_probe(struct platfor
  static void qcom_scm_shutdown(struct platform_device *pdev)
  {
  	/* Clean shutdown, disable download mode to allow normal restart */



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:46 -0400
Subject: [openwrt/openwrt]  ipq806x: add kernel 6.6 as a testing kernel
 version
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22788.1712094705.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ac0e2194ab4ce4b5f72d804046949cc076b595d6

commit ac0e2194ab4ce4b5f72d804046949cc076b595d6
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:37:50 2024 +0100

    ipq806x: add kernel 6.6 as a testing kernel version
    
    Add and enable kernel 6.6 as a testing kernel version.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq806x/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile
index 74a0007a4e..cd6f3dc2d3 100644
--- a/target/linux/ipq806x/Makefile
+++ b/target/linux/ipq806x/Makefile
@@ -11,6 +11,7 @@ CPU_SUBTYPE:=neon-vfpv4
 SUBTARGETS:=generic chromium
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 KERNELNAME:=zImage Image dtbs
 



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:45 -0400
Subject: [openwrt/openwrt]  ipq806x: 6.6: update config file with missing
 symbol
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22789.1712094705.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/75acc621be921e8552b549eb5c04e9b019e289f5

commit 75acc621be921e8552b549eb5c04e9b019e289f5
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:30:59 2024 +0100

    ipq806x: 6.6: update config file with missing symbol
    
    Update config file with missing symbol added with kernel 6.6.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq806x/config-6.6 | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/target/linux/ipq806x/config-6.6 b/target/linux/ipq806x/config-6.6
index 18325c0346..d1e3eec4fe 100644
--- a/target/linux/ipq806x/config-6.6
+++ b/target/linux/ipq806x/config-6.6
@@ -212,11 +212,13 @@ CONFIG_INITRAMFS_SOURCE=""
 # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
 # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
 CONFIG_IOMMU_SUPPORT=y
+# CONFIG_IOMMUFD is not set
 # CONFIG_IPQ_APSS_PLL is not set
 # CONFIG_IPQ_GCC_4019 is not set
 # CONFIG_IPQ_GCC_6018 is not set
 CONFIG_IPQ_GCC_806X=y
 # CONFIG_IPQ_GCC_8074 is not set
+# CONFIG_IPQ_GCC_9574 is not set
 # CONFIG_IPQ_LCC_806X is not set
 CONFIG_IRQCHIP=y
 CONFIG_IRQSTACKS=y
@@ -355,15 +357,19 @@ CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 # CONFIG_PHY_QCOM_APQ8064_SATA is not set
 # CONFIG_PHY_QCOM_EDP is not set
+# CONFIG_PHY_QCOM_EUSB2_REPEATER is not set
 # CONFIG_PHY_QCOM_IPQ4019_USB is not set
 CONFIG_PHY_QCOM_IPQ806X_SATA=y
 # CONFIG_PHY_QCOM_IPQ806X_USB is not set
+# CONFIG_PHY_QCOM_M31_USB is not set
 # CONFIG_PHY_QCOM_PCIE2 is not set
 # CONFIG_PHY_QCOM_QMP is not set
 # CONFIG_PHY_QCOM_QUSB2 is not set
 # CONFIG_PHY_QCOM_USB_HS_28NM is not set
 # CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2 is not set
 # CONFIG_PHY_QCOM_USB_SS is not set
+# CONFIG_PHY_QCOM_SGMII_ETH is not set
+# CONFIG_PHY_QCOM_SNPS_EUSB2 is not set
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_APQ8064 is not set
 # CONFIG_PINCTRL_APQ8084 is not set
@@ -409,7 +415,9 @@ CONFIG_QCOM_HFPLL=y
 CONFIG_QCOM_NET_PHYLIB=y
 # CONFIG_QCOM_OCMEM is not set
 # CONFIG_QCOM_PDC is not set
+# CONFIG_QCOM_RAMP_CTRL is not set
 # CONFIG_QCOM_RMTFS_MEM is not set
+CONFIG_QCOM_RPM_MASTER_STATS=y
 CONFIG_QCOM_RPMCC=y
 # CONFIG_QCOM_RPMH is not set
 CONFIG_QCOM_SCM=y
@@ -425,6 +433,7 @@ CONFIG_QCOM_WDT=y
 # CONFIG_QCS_GCC_404 is not set
 # CONFIG_QCS_Q6SSTOP_404 is not set
 # CONFIG_QCS_TURING_404 is not set
+# CONFIG_QDU_GCC_1000 is not set
 CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
 CONFIG_RATIONAL=y
@@ -447,6 +456,8 @@ CONFIG_RTC_CLASS=y
 CONFIG_RTC_I2C_AND_SPI=y
 CONFIG_RTC_MC146818_LIB=y
 CONFIG_RWSEM_SPIN_ON_OWNER=y
+# CONFIG_SA_GCC_8775P is not set
+# CONFIG_SA_GPUCC_8775P is not set
 # CONFIG_SC_CAMCC_7280 is not set
 # CONFIG_SC_DISPCC_7180 is not set
 # CONFIG_SC_GCC_7180 is not set
@@ -465,6 +476,7 @@ CONFIG_RWSEM_SPIN_ON_OWNER=y
 # CONFIG_SDM_LPASSCC_845 is not set
 # CONFIG_SDM_VIDEOCC_845 is not set
 # CONFIG_SDX_GCC_65 is not set
+# CONFIG_SDX_GCC_75 is not set
 CONFIG_SERIAL_8250_FSL=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_MSM=y
@@ -473,6 +485,7 @@ CONFIG_SGL_ALLOC=y
 CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
 # CONFIG_SM_CAMCC_8450 is not set
+# CONFIG_SM_GCC_7150 is not set
 # CONFIG_SM_GCC_8150 is not set
 # CONFIG_SM_GCC_8250 is not set
 # CONFIG_SM_GCC_8450 is not set



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:43 -0400
Subject: [openwrt/openwrt]  ipq806x: 6.6: add pending patch fixing nandc with
 new kernel
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22792.1712094707.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4693100b3fe25ead1d41e96d2f8dd196c473a0c0

commit 4693100b3fe25ead1d41e96d2f8dd196c473a0c0
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:35:01 2024 +0100

    ipq806x: 6.6: add pending patch fixing nandc with new kernel
    
    Add pending patch fixing nandc with new kerenel due to broken convertion
    to new nand API. Patch has been sent upstream and will be backported to
    stable kernel if accepted.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch | 55 ++++++++++++++++++++++
 1 file changed, 55 insertions(+)

diff --git a/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch b/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch
new file mode 100644
index 0000000000..5fc2599522
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch
@@ -0,0 +1,55 @@
+From b25aac1f55c29048e5a6ab24ab0e2aea12cb4887 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 20 Mar 2024 00:47:58 +0100
+Subject: [PATCH] mtd: rawnand: qcom: Fix broken misc_cmd_type in exec_op
+
+misc_cmd_type in exec_op have multiple problems. With commit a82990c8a409
+("mtd: rawnand: qcom: Add read/read_start ops in exec_op path") it was
+reworked and generalized but actually dropped the handling of the
+RESET_DEVICE command.
+
+The rework itself was correct with supporting case where a single misc
+command is handled, but became problematic by the addition of exiting
+early if we didn't had an ERASE or an OP_PROGRAM_PAGE operation.
+
+Also additional logic was added without clear explaination causing the
+erase command to be broken on testing it on a ipq806x nandc.
+
+Add some additional logic to restore RESET_DEVICE command handling and
+fix erase command.
+
+Fixes: a82990c8a409 ("mtd: rawnand: qcom: Add read/read_start ops in exec_op path")
+Cc: stable at vger.kernel.org
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/mtd/nand/raw/qcom_nandc.c | 7 +++----
+ 1 file changed, 3 insertions(+), 4 deletions(-)
+
+diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
+index b079605c84d3..b8cff9240b28 100644
+--- a/drivers/mtd/nand/raw/qcom_nandc.c
++++ b/drivers/mtd/nand/raw/qcom_nandc.c
+@@ -2815,7 +2815,7 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub
+ 			      host->cfg0_raw & ~(7 << CW_PER_PAGE));
+ 		nandc_set_reg(chip, NAND_DEV0_CFG1, host->cfg1_raw);
+ 		instrs = 3;
+-	} else {
++	} else if (q_op.cmd_reg != OP_RESET_DEVICE) {
+ 		return 0;
+ 	}
+ 
+@@ -2830,9 +2830,8 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub
+ 	nandc_set_reg(chip, NAND_EXEC_CMD, 1);
+ 
+ 	write_reg_dma(nandc, NAND_FLASH_CMD, instrs, NAND_BAM_NEXT_SGL);
+-	(q_op.cmd_reg == OP_BLOCK_ERASE) ? write_reg_dma(nandc, NAND_DEV0_CFG0,
+-	2, NAND_BAM_NEXT_SGL) : read_reg_dma(nandc,
+-	NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);
++	if (q_op.cmd_reg == OP_BLOCK_ERASE)
++		write_reg_dma(nandc, NAND_DEV0_CFG0, 2, NAND_BAM_NEXT_SGL);
+ 
+ 	write_reg_dma(nandc, NAND_EXEC_CMD, 1, NAND_BAM_NEXT_SGL);
+ 	read_reg_dma(nandc, NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);
+-- 
+2.43.0
+



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:38 -0400
Subject: [openwrt/openwrt]  kernel/ipq806x: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22793.1712094707.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a2bd0a7ef077b8f498f1dda389bb683f9c4e12dd

commit a2bd0a7ef077b8f498f1dda389bb683f9c4e12dd
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:21:38 2024 +0100

    kernel/ipq806x: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq806x/{config-6.1 => config-6.6}                           | 0
 .../001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch          | 0
 ...002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch | 0
 ...002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch | 0
 ...002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch | 0
 ...002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch | 0
 .../002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch   | 0
 .../002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch        | 0
 .../003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch    | 0
 ...004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch | 0
 ...004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch | 0
 ...004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch | 0
 .../102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch             | 0
 .../107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch        | 0
 .../107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch        | 0
 .../107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch        | 0
 .../108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch     | 0
 .../108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch     | 0
 .../114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch     | 0
 .../114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch     | 0
 .../115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch                | 0
 .../115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch            | 0
 .../122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch        | 0
 .../122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch          | 0
 .../122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch          | 0
 .../122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch     | 0
 .../122-05-clk-qcom-clk-krait-generilize-div-functions.patch              | 0
 .../123-clk-qcom-gcc-ipq806x-remove-cc_register_board-for.patch           | 0
 .../{patches-6.1 => patches-6.6}/850-soc-add-qualcomm-syscon.patch        | 0
 .../{patches-6.1 => patches-6.6}/900-arm-add-cmdline-override.patch       | 0
 .../901-01-ARM-decompressor-support-memory-start-validation-.patch        | 0
 .../901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch          | 0
 .../902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch        | 0
 33 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/ipq806x/config-6.1 b/target/linux/ipq806x/config-6.6
similarity index 100%
rename from target/linux/ipq806x/config-6.1
rename to target/linux/ipq806x/config-6.6
diff --git a/target/linux/ipq806x/patches-6.1/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch b/target/linux/ipq806x/patches-6.6/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch
rename to target/linux/ipq806x/patches-6.6/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch
rename to target/linux/ipq806x/patches-6.6/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch
rename to target/linux/ipq806x/patches-6.6/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch
rename to target/linux/ipq806x/patches-6.6/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch
rename to target/linux/ipq806x/patches-6.6/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch
rename to target/linux/ipq806x/patches-6.6/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch
rename to target/linux/ipq806x/patches-6.6/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch
diff --git a/target/linux/ipq806x/patches-6.1/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch b/target/linux/ipq806x/patches-6.6/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch
rename to target/linux/ipq806x/patches-6.6/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch
diff --git a/target/linux/ipq806x/patches-6.1/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch b/target/linux/ipq806x/patches-6.6/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch
rename to target/linux/ipq806x/patches-6.6/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch
diff --git a/target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch b/target/linux/ipq806x/patches-6.6/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch
rename to target/linux/ipq806x/patches-6.6/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch
diff --git a/target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch b/target/linux/ipq806x/patches-6.6/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch
rename to target/linux/ipq806x/patches-6.6/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch
diff --git a/target/linux/ipq806x/patches-6.1/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch b/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
rename to target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
diff --git a/target/linux/ipq806x/patches-6.1/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch b/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
rename to target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
diff --git a/target/linux/ipq806x/patches-6.1/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch b/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
rename to target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
diff --git a/target/linux/ipq806x/patches-6.1/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch b/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
rename to target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
diff --git a/target/linux/ipq806x/patches-6.1/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch b/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
rename to target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
diff --git a/target/linux/ipq806x/patches-6.1/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch b/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
rename to target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
diff --git a/target/linux/ipq806x/patches-6.1/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch b/target/linux/ipq806x/patches-6.6/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
rename to target/linux/ipq806x/patches-6.6/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
diff --git a/target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch b/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
rename to target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
diff --git a/target/linux/ipq806x/patches-6.1/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch b/target/linux/ipq806x/patches-6.6/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
rename to target/linux/ipq806x/patches-6.6/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
diff --git a/target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch b/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
rename to target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
diff --git a/target/linux/ipq806x/patches-6.1/122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch b/target/linux/ipq806x/patches-6.6/122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch
rename to target/linux/ipq806x/patches-6.6/122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch
diff --git a/target/linux/ipq806x/patches-6.1/122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch b/target/linux/ipq806x/patches-6.6/122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch
rename to target/linux/ipq806x/patches-6.6/122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch
diff --git a/target/linux/ipq806x/patches-6.1/122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch b/target/linux/ipq806x/patches-6.6/122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch
rename to target/linux/ipq806x/patches-6.6/122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch
diff --git a/target/linux/ipq806x/patches-6.1/122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch b/target/linux/ipq806x/patches-6.6/122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch
rename to target/linux/ipq806x/patches-6.6/122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch
diff --git a/target/linux/ipq806x/patches-6.1/122-05-clk-qcom-clk-krait-generilize-div-functions.patch b/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
rename to target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
diff --git a/target/linux/ipq806x/patches-6.1/123-clk-qcom-gcc-ipq806x-remove-cc_register_board-for.patch b/target/linux/ipq806x/patches-6.6/123-clk-qcom-gcc-ipq806x-remove-cc_register_board-for.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/123-clk-qcom-gcc-ipq806x-remove-cc_register_board-for.patch
rename to target/linux/ipq806x/patches-6.6/123-clk-qcom-gcc-ipq806x-remove-cc_register_board-for.patch
diff --git a/target/linux/ipq806x/patches-6.1/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq806x/patches-6.6/850-soc-add-qualcomm-syscon.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/850-soc-add-qualcomm-syscon.patch
rename to target/linux/ipq806x/patches-6.6/850-soc-add-qualcomm-syscon.patch
diff --git a/target/linux/ipq806x/patches-6.1/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/900-arm-add-cmdline-override.patch
rename to target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch
diff --git a/target/linux/ipq806x/patches-6.1/901-01-ARM-decompressor-support-memory-start-validation-.patch b/target/linux/ipq806x/patches-6.6/901-01-ARM-decompressor-support-memory-start-validation-.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/901-01-ARM-decompressor-support-memory-start-validation-.patch
rename to target/linux/ipq806x/patches-6.6/901-01-ARM-decompressor-support-memory-start-validation-.patch
diff --git a/target/linux/ipq806x/patches-6.1/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch b/target/linux/ipq806x/patches-6.6/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch
rename to target/linux/ipq806x/patches-6.6/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch
diff --git a/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch b/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
similarity index 100%
rename from target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
rename to target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:42 -0400
Subject: [openwrt/openwrt]  ipq806x: 6.6: rework kernel patches for new kernel
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22794.1712094707.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a0cbf7f5d563b344dddd0cb66e7a8eef1bf3f15e

commit a0cbf7f5d563b344dddd0cb66e7a8eef1bf3f15e
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:33:05 2024 +0100

    ipq806x: 6.6: rework kernel patches for new kernel
    
    Rework kernel patches for new kernel. Mainly adaptation for patch
    related to DTS and changes for the downstream div generalize patch that
    now use determine_rate.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...qcom-add-saw-for-l2-cache-and-kraitcc-for.patch |  52 +++-----
 ...qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch |  14 +-
 ...qcom-add-multiple-missing-binding-for-cpu.patch |  25 ++--
 ...m-fix-wrong-nad_pins-definition-for-ipq80.patch |   6 +-
 ...m-add-MDIO-dedicated-controller-node-for-.patch | 148 ++++++++++++++++++---
 ...m-add-krait-cache-compatible-for-ipq806x-.patch |  12 +-
 ...dts-qcom-add-fab-scaling-node-for-ipq806x.patch |   6 +-
 ...k-qcom-clk-krait-generilize-div-functions.patch |  23 ++--
 8 files changed, 192 insertions(+), 94 deletions(-)

diff --git a/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch b/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
index 0a594b2688..228368b6cd 100644
--- a/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
+++ b/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
@@ -11,11 +11,11 @@ for the secondary mux.
 Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 Tested-by: Jonathan McDowell <noodles at earth.li>
 ---
- arch/arm/boot/dts/qcom-ipq8064.dtsi | 34 +++++++++++++++++++++++++++--
+ arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 34 +++++++++++++++++++++++++++--
  1 file changed, 32 insertions(+), 2 deletions(-)
 
---- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 @@ -301,6 +301,12 @@
  	};
  
@@ -29,30 +29,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  		cxo_board: cxo_board {
  			compatible = "fixed-clock";
  			#clock-cells = <0>;
-@@ -575,15 +581,30 @@
- 			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
- 			clock-names = "pll8_vote", "pxo";
- 			clock-output-names = "acpu_l2_aux";
-+			#clock-cells = <0>;
-+		};
-+
-+		kraitcc: clock-controller {
-+			compatible = "qcom,krait-cc-v1";
-+			clocks = <&gcc PLL9>, <&gcc PLL10>, <&gcc PLL12>,
-+				 <&acc0>, <&acc1>, <&l2cc>, <&qsb>, <&pxo_board>;
-+			clock-names = "hfpll0", "hfpll1", "hfpll_l2",
-+				      "acpu0_aux", "acpu1_aux", "acpu_l2_aux",
-+				      "qsb", "pxo";
-+			#clock-cells = <1>;
- 		};
- 
- 		acc0: clock-controller at 2088000 {
- 			compatible = "qcom,kpss-acc-v1";
- 			reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
-+			clock-output-names = "acpu0_aux";
-+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
-+			clock-names = "pll8_vote", "pxo";
-+			#clock-cells = <0>;
+@@ -575,7 +581,7 @@
  		};
  
  		saw0: regulator at 2089000 {
@@ -61,14 +38,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  			reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
  			regulator;
  		};
-@@ -591,14 +612,24 @@
- 		acc1: clock-controller at 2098000 {
- 			compatible = "qcom,kpss-acc-v1";
- 			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
-+			clock-output-names = "acpu1_aux";
-+			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
-+			clock-names = "pll8_vote", "pxo";
-+			#clock-cells = <0>;
+@@ -591,11 +612,27 @@
  		};
  
  		saw1: regulator at 2099000 {
@@ -84,6 +54,16 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
 +			regulator;
 +		};
 +
- 		nss_common: syscon at 03000000 {
++		kraitcc: clock-controller {
++			compatible = "qcom,krait-cc-v1";
++			clocks = <&gcc PLL9>, <&gcc PLL10>, <&gcc PLL12>,
++				 <&acc0>, <&acc1>, <&l2cc>, <&qsb>, <&pxo_board>;
++			clock-names = "hfpll0", "hfpll1", "hfpll_l2",
++				      "acpu0_aux", "acpu1_aux", "acpu_l2_aux",
++				      "qsb", "pxo";
++			#clock-cells = <1>;
++		};
++
+ 		nss_common: syscon at 3000000 {
  			compatible = "syscon";
  			reg = <0x03000000 0x0000FFFF>;
diff --git a/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch b/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
index 16e924b303..b6359a946e 100644
--- a/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
+++ b/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
@@ -18,11 +18,11 @@ Opp-level is set based on the logic of
 Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 Tested-by: Jonathan McDowell <noodles at earth.li>
 ---
- arch/arm/boot/dts/qcom-ipq8064.dtsi | 99 +++++++++++++++++++++++++++++
+ arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 99 +++++++++++++++++++++++++++++
  1 file changed, 99 insertions(+)
 
---- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 @@ -48,6 +48,105 @@
  		};
  	};
@@ -129,8 +129,8 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  	thermal-zones {
  		sensor0-thermal {
  			polling-delay-passive = <0>;
---- a/arch/arm/boot/dts/qcom-ipq8065.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8065.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8065.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8065.dtsi
 @@ -6,3 +6,92 @@
  	model = "Qualcomm Technologies, Inc. IPQ8065";
  	compatible = "qcom,ipq8065", "qcom,ipq8064";
@@ -224,8 +224,8 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
 +		opp-level = <2>;
 +	};
 +};
---- a/arch/arm/boot/dts/qcom-ipq8062.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8062.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8062.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8062.dtsi
 @@ -6,3 +6,39 @@
  	model = "Qualcomm Technologies, Inc. IPQ8062";
  	compatible = "qcom,ipq8062", "qcom,ipq8064";
diff --git a/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch b/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
index cf27aaa08b..55f02ac5aa 100644
--- a/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
+++ b/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
@@ -10,11 +10,11 @@ definition for ipq8064 dtsi.
 Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
 Tested-by: Jonathan McDowell <noodles at earth.li>
 ---
- arch/arm/boot/dts/qcom-ipq8064.dtsi | 36 +++++++++++++++++++++++++++++
+ arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 36 +++++++++++++++++++++++++++++
  1 file changed, 36 insertions(+)
 
---- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 @@ -30,6 +30,15 @@
  			next-level-cache = <&L2>;
  			qcom,acc = <&acc0>;
@@ -31,7 +31,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  		};
  
  		cpu1: cpu at 1 {
-@@ -40,11 +49,35 @@
+@@ -40,12 +49,36 @@
  			next-level-cache = <&L2>;
  			qcom,acc = <&acc1>;
  			qcom,saw = <&saw1>;
@@ -59,6 +59,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  		L2: l2-cache {
  			compatible = "cache";
  			cache-level = <2>;
+			cache-unified;
 +			qcom,saw = <&saw_l2>;
 +
 +			clocks = <&kraitcc 4>;
@@ -67,8 +68,8 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  		};
  	};
  
---- a/arch/arm/boot/dts/qcom-ipq8064-smb208.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064-smb208.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064-smb208.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064-smb208.dtsi
 @@ -2,6 +2,18 @@
  
  #include "qcom-ipq8064.dtsi"
@@ -88,8 +89,8 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  &rpm {
  	smb208_regulators: regulators {
  		compatible = "qcom,rpm-smb208-regulators";
---- a/arch/arm/boot/dts/qcom-ipq8064-v2.0-smb208.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064-v2.0-smb208.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064-v2.0-smb208.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064-v2.0-smb208.dtsi
 @@ -2,6 +2,18 @@
  
  #include "qcom-ipq8064-v2.0.dtsi"
@@ -109,8 +110,8 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  &rpm {
  	smb208_regulators: regulators {
  		compatible = "qcom,rpm-smb208-regulators";
---- a/arch/arm/boot/dts/qcom-ipq8062-smb208.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8062-smb208.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8062-smb208.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8062-smb208.dtsi
 @@ -2,6 +2,18 @@
  
  #include "qcom-ipq8062.dtsi"
@@ -130,8 +131,8 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  &rpm {
  	smb208_regulators: regulators {
  		compatible = "qcom,rpm-smb208-regulators";
---- a/arch/arm/boot/dts/qcom-ipq8065-smb208.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8065-smb208.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8065-smb208.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8065-smb208.dtsi
 @@ -2,6 +2,18 @@
  
  #include "qcom-ipq8065.dtsi"
diff --git a/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch b/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
index 6be9334e7d..a06dd00dfc 100644
--- a/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
+++ b/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
@@ -7,11 +7,11 @@ Fix wrong nand_pings definition for bias-disable pins.
 
 Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
 ---
- arch/arm/boot/dts/qcom-ipq8064.dtsi | 7 ++-----
+ arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 7 ++-----
  1 file changed, 2 insertions(+), 5 deletions(-)
 
---- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 @@ -599,12 +599,9 @@
  			};
  
diff --git a/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch b/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
index a35bb3874f..8f6f8a287a 100644
--- a/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
+++ b/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
@@ -9,13 +9,13 @@ correctly use the new tag.
 
 Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
 ---
- arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 134 +++++++++++-----------
- arch/arm/boot/dts/qcom-ipq8064.dtsi       |  14 +++
+ arch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts | 134 +++++++++++-----------
+ arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi       |  14 +++
  2 files changed, 81 insertions(+), 67 deletions(-)
 
---- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
-+++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
-@@ -25,73 +25,6 @@
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064-rb3011.dts
+@@ -25,131 +25,6 @@
  		device_type = "memory";
  	};
  
@@ -32,8 +32,6 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
 -
 -		switch0: switch at 10 {
 -			compatible = "qca,qca8337";
--			#address-cells = <1>;
--			#size-cells = <0>;
 -
 -			dsa,member = <0 0>;
 -
@@ -61,26 +59,86 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
 -				port at 1 {
 -					reg = <1>;
 -					label = "sw1";
+-
+-					leds {
+-						#address-cells = <1>;
+-						#size-cells = <0>;
+-
+-						led at 0 {
+-							reg = <0>;
+-							color = <LED_COLOR_ID_GREEN>;
+-							function = LED_FUNCTION_LAN;
+-							default-state = "keep";
+-						};
+-					};
 -				};
 -
 -				port at 2 {
 -					reg = <2>;
 -					label = "sw2";
+-
+-					leds {
+-						#address-cells = <1>;
+-						#size-cells = <0>;
+-
+-						led at 0 {
+-							reg = <0>;
+-							color = <LED_COLOR_ID_GREEN>;
+-							function = LED_FUNCTION_LAN;
+-							default-state = "keep";
+-						};
+-					};
 -				};
 -
 -				port at 3 {
 -					reg = <3>;
 -					label = "sw3";
+-
+-					leds {
+-						#address-cells = <1>;
+-						#size-cells = <0>;
+-
+-						led at 0 {
+-							reg = <0>;
+-							color = <LED_COLOR_ID_GREEN>;
+-							function = LED_FUNCTION_LAN;
+-							default-state = "keep";
+-						};
+-					};
 -				};
 -
 -				port at 4 {
 -					reg = <4>;
 -					label = "sw4";
+-
+-					leds {
+-						#address-cells = <1>;
+-						#size-cells = <0>;
+-
+-						led at 0 {
+-							reg = <0>;
+-							color = <LED_COLOR_ID_GREEN>;
+-							function = LED_FUNCTION_LAN;
+-							default-state = "keep";
+-						};
+-					};
 -				};
 -
 -				port at 5 {
 -					reg = <5>;
 -					label = "sw5";
+-
+-					leds {
+-						#address-cells = <1>;
+-						#size-cells = <0>;
+-
+-						led at 0 {
+-							reg = <0>;
+-							color = <LED_COLOR_ID_GREEN>;
+-							function = LED_FUNCTION_LAN;
+-							default-state = "keep";
+-						};
+-					};
 -				};
 -			};
 -		};
@@ -89,7 +147,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
  	mdio1: mdio-1 {
  		status = "okay";
  		compatible = "virtual,mdio-gpio";
-@@ -222,6 +155,73 @@
+@@ -222,6 +155,131 @@
  	status = "okay";
  };
  
@@ -106,8 +164,6 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
 +
 +	switch0: switch at 10 {
 +		compatible = "qca,qca8337";
-+		#address-cells = <1>;
-+		#size-cells = <0>;
 +
 +		dsa,member = <0 0>;
 +
@@ -135,26 +191,86 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
 +			port at 1 {
 +				reg = <1>;
 +				label = "sw1";
++
++				leds {
++					#address-cells = <1>;
++					#size-cells = <0>;
++
++					led at 0 {
++						reg = <0>;
++						color = <LED_COLOR_ID_GREEN>;
++						function = LED_FUNCTION_LAN;
++						default-state = "keep";
++					};
++				};
 +			};
 +
 +			port at 2 {
 +				reg = <2>;
 +				label = "sw2";
++
++				leds {
++					#address-cells = <1>;
++					#size-cells = <0>;
++
++					led at 0 {
++						reg = <0>;
++						color = <LED_COLOR_ID_GREEN>;
++						function = LED_FUNCTION_LAN;
++						default-state = "keep";
++					};
++				};
 +			};
 +
 +			port at 3 {
 +				reg = <3>;
 +				label = "sw3";
++
++				leds {
++					#address-cells = <1>;
++					#size-cells = <0>;
++
++					led at 0 {
++						reg = <0>;
++						color = <LED_COLOR_ID_GREEN>;
++						function = LED_FUNCTION_LAN;
++						default-state = "keep";
++					};
++				};
 +			};
 +
 +			port at 4 {
 +				reg = <4>;
 +				label = "sw4";
++
++				leds {
++					#address-cells = <1>;
++					#size-cells = <0>;
++
++					led at 0 {
++						reg = <0>;
++						color = <LED_COLOR_ID_GREEN>;
++						function = LED_FUNCTION_LAN;
++						default-state = "keep";
++					};
++				};
 +			};
 +
 +			port at 5 {
 +				reg = <5>;
 +				label = "sw5";
++
++				leds {
++					#address-cells = <1>;
++					#size-cells = <0>;
++
++					led at 0 {
++						reg = <0>;
++						color = <LED_COLOR_ID_GREEN>;
++						function = LED_FUNCTION_LAN;
++						default-state = "keep";
++					};
++				};
 +			};
 +		};
 +	};
@@ -163,10 +279,10 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
  &gmac0 {
  	status = "okay";
  
---- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 @@ -476,6 +476,20 @@
- 			snps,blen = <16 0 0 0 0 0 0>;
+ 			status = "disabled";
  		};
  
 +		mdio0: mdio at 37000000 {
@@ -183,6 +299,6 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
 +			status = "disabled";
 +		};
 +
- 		vsdcc_fixed: vsdcc-regulator {
- 			compatible = "regulator-fixed";
- 			regulator-name = "SDCC Power";
+ 		gmac0: ethernet at 37000000 {
+ 			device_type = "network";
+ 			compatible = "qcom,ipq806x-gmac", "snps,dwmac";
diff --git a/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch b/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
index 45f05dd423..77b6f926bd 100644
--- a/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
+++ b/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
@@ -9,12 +9,12 @@ driver correctly probe.
 
 Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 ---
- arch/arm/boot/dts/qcom-ipq8064.dtsi | 22 +++++++++++-----------
+ arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 22 +++++++++++-----------
  1 file changed, 11 insertions(+), 11 deletions(-)
 
---- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
-@@ -69,16 +69,6 @@
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
+@@ -69,17 +69,6 @@
  				min-residency-us = <3000>;
  			};
  		};
@@ -22,6 +22,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 -		L2: l2-cache {
 -			compatible = "cache";
 -			cache-level = <2>;
+-			cache-unified;
 -			qcom,saw = <&saw_l2>;
 -
 -			clocks = <&kraitcc 4>;
@@ -31,13 +32,14 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	};
  
  	opp_table_l2: opp_table_l2 {
-@@ -1409,6 +1399,16 @@
+@@ -1409,6 +1399,17 @@
  			#reset-cells = <1>;
  		};
  
 +		L2: l2-cache {
 +			compatible = "cache", "qcom,krait-cache";
 +			cache-level = <2>;
++			cache-unified;
 +			qcom,saw = <&saw_l2>;
 +
 +			clocks = <&kraitcc 4>;
diff --git a/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch b/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
index 24e0ecf619..418e3248ad 100644
--- a/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
+++ b/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
@@ -8,11 +8,11 @@ fabric clk.
 
 Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 ---
- arch/arm/boot/dts/qcom-ipq8064.dtsi | 19 +++++++++++++++++++
+ arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi | 19 +++++++++++++++++++
  1 file changed, 19 insertions(+)
 
---- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+--- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 @@ -170,6 +170,18 @@
  		};
  	};
diff --git a/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch b/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
index a7c0f046c8..356659d9c0 100644
--- a/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
+++ b/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
@@ -16,22 +16,21 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/clk/qcom/clk-krait.c
 +++ b/drivers/clk/qcom/clk-krait.c
-@@ -97,53 +97,58 @@ const struct clk_ops krait_mux_clk_ops =
+@@ -97,53 +97,57 @@ const struct clk_ops krait_mux_clk_ops =
  EXPORT_SYMBOL_GPL(krait_mux_clk_ops);
  
  /* The divider can divide by 2, 4, 6 and 8. But we only really need div-2. */
--static long krait_div2_round_rate(struct clk_hw *hw, unsigned long rate,
-+static long krait_div_round_rate(struct clk_hw *hw, unsigned long rate,
- 				  unsigned long *parent_rate)
+-static int krait_div2_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
++static int krait_div_determine_rate(struct clk_hw *hw, struct clk_rate_request *req)
  {
--	*parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), rate * 2);
--	return DIV_ROUND_UP(*parent_rate, 2);
+-	req->best_parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), req->rate * 2);
+-	req->rate = DIV_ROUND_UP(req->best_parent_rate, 2);
 +	struct krait_div_clk *d = to_krait_div_clk(hw);
 +
-+	*parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw),
-+					 rate * d->divisor);
-+
-+	return DIV_ROUND_UP(*parent_rate, d->divisor);
++	req->best_parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw),
++						  req->rate * d->divisor);
++	req->rate = DIV_ROUND_UP(req->best_parent_rate, d->divisor);
+	return 0;
  }
  
 -static int krait_div2_set_rate(struct clk_hw *hw, unsigned long rate,
@@ -91,11 +90,11 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  }
  
 -const struct clk_ops krait_div2_clk_ops = {
--	.round_rate = krait_div2_round_rate,
+-	.determine_rate = krait_div2_determine_rate,
 -	.set_rate = krait_div2_set_rate,
 -	.recalc_rate = krait_div2_recalc_rate,
 +const struct clk_ops krait_div_clk_ops = {
-+	.round_rate = krait_div_round_rate,
++	.determine_rate = krait_div_determine_rate,
 +	.set_rate = krait_div_set_rate,
 +	.recalc_rate = krait_div_recalc_rate,
  };



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:41 -0400
Subject: [openwrt/openwrt]  ipq806x: 6.6: drop upstream kernel patches
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22797.1712094707.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a705c8c681edd38fdecf25de4c8d5381278d31a2

commit a705c8c681edd38fdecf25de4c8d5381278d31a2
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:47:20 2024 +0100

    ipq806x: 6.6: drop upstream kernel patches
    
    Drop upstream kernel patches that were straight backport.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...qcom-kpss-xcc-register-it-as-clk-provider.patch |  60 ---
 ...ait-cc-use-devm-variant-for-clk-notifier-.patch |  27 --
 ...ait-cc-fix-wrong-parent-order-for-seconda.patch |  46 ---
 ...ait-cc-also-enable-secondary-mux-and-div-.patch |  68 ----
 ...ait-cc-handle-secondary-mux-sourcing-out-.patch |  48 ---
 ...-krait-cc-convert-to-devm_clk_hw_register.patch | 104 ------
 ...-qcom-krait-cc-convert-to-parent_data-API.patch | 414 ---------------------
 ...om-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch |  28 --
 ...vers-qcom-tsens-Init-debugfs-only-with-su.patch |  42 ---
 ...vers-qcom-tsens-Fix-wrong-version-id-dbg_.patch |  29 --
 ...vers-qcom-tsens-Rework-debugfs-file-struc.patch |  54 ---
 11 files changed, 920 deletions(-)

diff --git a/target/linux/ipq806x/patches-6.6/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch b/target/linux/ipq806x/patches-6.6/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch
deleted file mode 100644
index 9395f1b241..0000000000
--- a/target/linux/ipq806x/patches-6.6/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch
+++ /dev/null
@@ -1,60 +0,0 @@
-From 09be1a39e685d8c5edd471fd1cac9a8f8280d2de Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Tue, 8 Nov 2022 22:17:34 +0100
-Subject: [PATCH] clk: qcom: kpss-xcc: register it as clk provider
-
-krait-cc use this driver for the secondary mux. Register it as a clk
-provider to correctly use this clk in other drivers.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
-Link: https://lore.kernel.org/r/20221108211734.3707-1-ansuelsmth at gmail.com
----
- drivers/clk/qcom/kpss-xcc.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
---- a/drivers/clk/qcom/kpss-xcc.c
-+++ b/drivers/clk/qcom/kpss-xcc.c
-@@ -31,12 +31,13 @@ MODULE_DEVICE_TABLE(of, kpss_xcc_match_t
- 
- static int kpss_xcc_driver_probe(struct platform_device *pdev)
- {
-+	struct device *dev = &pdev->dev;
- 	const struct of_device_id *id;
- 	void __iomem *base;
- 	struct clk_hw *hw;
- 	const char *name;
- 
--	id = of_match_device(kpss_xcc_match_table, &pdev->dev);
-+	id = of_match_device(kpss_xcc_match_table, dev);
- 	if (!id)
- 		return -ENODEV;
- 
-@@ -45,7 +46,7 @@ static int kpss_xcc_driver_probe(struct
- 		return PTR_ERR(base);
- 
- 	if (id->data) {
--		if (of_property_read_string_index(pdev->dev.of_node,
-+		if (of_property_read_string_index(dev->of_node,
- 						  "clock-output-names",
- 						  0, &name))
- 			return -ENODEV;
-@@ -55,12 +56,16 @@ static int kpss_xcc_driver_probe(struct
- 		base += 0x28;
- 	}
- 
--	hw = devm_clk_hw_register_mux_parent_data_table(&pdev->dev, name, aux_parents,
-+	hw = devm_clk_hw_register_mux_parent_data_table(dev, name, aux_parents,
- 							ARRAY_SIZE(aux_parents), 0,
- 							base, 0, 0x3,
- 							0, aux_parent_map, NULL);
-+	if (IS_ERR(hw))
-+		return PTR_ERR(hw);
- 
--	return PTR_ERR_OR_ZERO(hw);
-+	of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, hw);
-+
-+	return 0;
- }
- 
- static struct platform_driver kpss_xcc_driver = {
diff --git a/target/linux/ipq806x/patches-6.6/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch
deleted file mode 100644
index 65c1fc17f2..0000000000
--- a/target/linux/ipq806x/patches-6.6/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 3198106a99e73dbc4c02bd5128cec0997c73af82 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Tue, 8 Nov 2022 22:58:27 +0100
-Subject: [PATCH 1/6] clk: qcom: krait-cc: use devm variant for clk notifier
- register
-
-Use devm variant for clk notifier register and correctly handle free
-resource on driver remove.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
-Link: https://lore.kernel.org/r/20221108215827.30475-1-ansuelsmth at gmail.com
----
- drivers/clk/qcom/krait-cc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/clk/qcom/krait-cc.c
-+++ b/drivers/clk/qcom/krait-cc.c
-@@ -62,7 +62,7 @@ static int krait_notifier_register(struc
- 	int ret = 0;
- 
- 	mux->clk_nb.notifier_call = krait_notifier_cb;
--	ret = clk_notifier_register(clk, &mux->clk_nb);
-+	ret = devm_clk_notifier_register(dev, clk, &mux->clk_nb);
- 	if (ret)
- 		dev_err(dev, "failed to register clock notifier: %d\n", ret);
- 
diff --git a/target/linux/ipq806x/patches-6.6/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch
deleted file mode 100644
index 2dcb69399c..0000000000
--- a/target/linux/ipq806x/patches-6.6/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 8e456411abcbf899c04740b9dbb3dcefcd61c946 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Wed, 9 Nov 2022 01:56:27 +0100
-Subject: [PATCH 2/6] clk: qcom: krait-cc: fix wrong parent order for secondary
- mux
-
-The secondary mux parent order is swapped.
-This currently doesn't cause problems as the secondary mux is used for idle
-clk and as a safe clk source while reprogramming the hfpll.
-
-Each mux have 2 or more output but he always have a safe source to
-switch while reprogramming the connected pll. We use a clk notifier to
-switch to the correct parent before clk core can apply the correct rate.
-The parent to switch is hardcoded in the mux struct.
-
-For the secondary mux the safe source to use is the qsb parent as it's
-the only fixed clk as the acpus_aux is a pll that can source from pxo or
-from pll8.
-
-The hardcoded safe parent for the secondary mux is set to index 0 that
-in the secondary mux map is set to 2.
-
-But the index 0 is actually acpu_aux in the parent list.
-
-Fix the swapped parents to correctly handle idle frequency and output a
-sane clk_summary report.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
-Link: https://lore.kernel.org/r/20221109005631.3189-1-ansuelsmth at gmail.com
----
- drivers/clk/qcom/krait-cc.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/clk/qcom/krait-cc.c
-+++ b/drivers/clk/qcom/krait-cc.c
-@@ -116,8 +116,8 @@ krait_add_sec_mux(struct device *dev, in
- 	int ret;
- 	struct krait_mux_clk *mux;
- 	static const char *sec_mux_list[] = {
--		"acpu_aux",
- 		"qsb",
-+		"acpu_aux",
- 	};
- 	struct clk_init_data init = {
- 		.parent_names = sec_mux_list,
diff --git a/target/linux/ipq806x/patches-6.6/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch
deleted file mode 100644
index 6261a940d7..0000000000
--- a/target/linux/ipq806x/patches-6.6/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From 18ae57b1e8abee6c453381470f6e18991d2901a8 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Wed, 9 Nov 2022 01:56:28 +0100
-Subject: [PATCH 3/6] clk: qcom: krait-cc: also enable secondary mux and div
- clk
-
-clk-krait ignore any rate change if clk is not flagged as enabled.
-Correctly enable the secondary mux and div clk to correctly change rate
-instead of silently ignoring the request.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
-Link: https://lore.kernel.org/r/20221109005631.3189-2-ansuelsmth at gmail.com
----
- drivers/clk/qcom/krait-cc.c | 21 ++++++++++++++++++++-
- 1 file changed, 20 insertions(+), 1 deletion(-)
-
---- a/drivers/clk/qcom/krait-cc.c
-+++ b/drivers/clk/qcom/krait-cc.c
-@@ -80,6 +80,7 @@ krait_add_div(struct device *dev, int id
- 	};
- 	const char *p_names[1];
- 	struct clk *clk;
-+	int cpu;
- 
- 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
- 	if (!div)
-@@ -103,6 +104,17 @@ krait_add_div(struct device *dev, int id
- 	}
- 
- 	clk = devm_clk_register(dev, &div->hw);
-+	if (IS_ERR(clk))
-+		goto err;
-+
-+	/* clk-krait ignore any rate change if mux is not flagged as enabled */
-+	if (id < 0)
-+		for_each_online_cpu(cpu)
-+			clk_prepare_enable(div->hw.clk);
-+	else
-+		clk_prepare_enable(div->hw.clk);
-+
-+err:
- 	kfree(p_names[0]);
- 	kfree(init.name);
- 
-@@ -113,7 +125,7 @@ static int
- krait_add_sec_mux(struct device *dev, int id, const char *s,
- 		  unsigned int offset, bool unique_aux)
- {
--	int ret;
-+	int cpu, ret;
- 	struct krait_mux_clk *mux;
- 	static const char *sec_mux_list[] = {
- 		"qsb",
-@@ -165,6 +177,13 @@ krait_add_sec_mux(struct device *dev, in
- 	if (ret)
- 		goto unique_aux;
- 
-+	/* clk-krait ignore any rate change if mux is not flagged as enabled */
-+	if (id < 0)
-+		for_each_online_cpu(cpu)
-+			clk_prepare_enable(mux->hw.clk);
-+	else
-+		clk_prepare_enable(mux->hw.clk);
-+
- unique_aux:
- 	if (unique_aux)
- 		kfree(sec_mux_list[0]);
diff --git a/target/linux/ipq806x/patches-6.6/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch
deleted file mode 100644
index fabb299f42..0000000000
--- a/target/linux/ipq806x/patches-6.6/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch
+++ /dev/null
@@ -1,48 +0,0 @@
-From e5dc1a4c01510da8438dddfdf4200b79d73990dc Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Wed, 9 Nov 2022 01:56:29 +0100
-Subject: [PATCH 4/6] clk: qcom: krait-cc: handle secondary mux sourcing out of
- acpu_aux
-
-Some bootloader may leave the system in an even more undefined state
-with the secondary mux of L2 or other cores sourcing out of the acpu_aux
-parent. This results in the clk set to the PXO rate or a PLL8 rate.
-
-The current logic to reset the mux and set them to a defined state only
-handle if the mux are configured to source out of QSB. Change this and
-force a new and defined state if the current clk is lower than the aux
-rate. This way we can handle any wrong configuration where the mux is
-sourcing out of QSB (rate 225MHz, currently set to a virtual rate of 1),
-PXO rate (rate 25MHz) or PLL8 (needs to be configured to run at 384Mhz).
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
-Link: https://lore.kernel.org/r/20221109005631.3189-3-ansuelsmth at gmail.com
----
- drivers/clk/qcom/krait-cc.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/drivers/clk/qcom/krait-cc.c
-+++ b/drivers/clk/qcom/krait-cc.c
-@@ -383,8 +383,8 @@ static int krait_cc_probe(struct platfor
- 	 */
- 	cur_rate = clk_get_rate(l2_pri_mux_clk);
- 	aux_rate = 384000000;
--	if (cur_rate == 1) {
--		pr_info("L2 @ QSB rate. Forcing new rate.\n");
-+	if (cur_rate < aux_rate) {
-+		pr_info("L2 @ Undefined rate. Forcing new rate.\n");
- 		cur_rate = aux_rate;
- 	}
- 	clk_set_rate(l2_pri_mux_clk, aux_rate);
-@@ -394,8 +394,8 @@ static int krait_cc_probe(struct platfor
- 	for_each_possible_cpu(cpu) {
- 		clk = clks[cpu];
- 		cur_rate = clk_get_rate(clk);
--		if (cur_rate == 1) {
--			pr_info("CPU%d @ QSB rate. Forcing new rate.\n", cpu);
-+		if (cur_rate < aux_rate) {
-+			pr_info("CPU%d @ Undefined rate. Forcing new rate.\n", cpu);
- 			cur_rate = aux_rate;
- 		}
- 
diff --git a/target/linux/ipq806x/patches-6.6/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch
deleted file mode 100644
index 049b1fa49f..0000000000
--- a/target/linux/ipq806x/patches-6.6/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From 8ea9fb841a7e528bc8ae79d726ce951dcf7b46e2 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Wed, 9 Nov 2022 01:56:30 +0100
-Subject: [PATCH 5/6] clk: qcom: krait-cc: convert to devm_clk_hw_register
-
-clk_register is now deprecated. Convert the driver to devm_clk_hw_register.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
-Link: https://lore.kernel.org/r/20221109005631.3189-4-ansuelsmth at gmail.com
----
- drivers/clk/qcom/krait-cc.c | 31 +++++++++++++++++++------------
- 1 file changed, 19 insertions(+), 12 deletions(-)
-
---- a/drivers/clk/qcom/krait-cc.c
-+++ b/drivers/clk/qcom/krait-cc.c
-@@ -79,8 +79,7 @@ krait_add_div(struct device *dev, int id
- 		.flags = CLK_SET_RATE_PARENT,
- 	};
- 	const char *p_names[1];
--	struct clk *clk;
--	int cpu;
-+	int cpu, ret;
- 
- 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
- 	if (!div)
-@@ -103,8 +102,8 @@ krait_add_div(struct device *dev, int id
- 		return -ENOMEM;
- 	}
- 
--	clk = devm_clk_register(dev, &div->hw);
--	if (IS_ERR(clk))
-+	ret = devm_clk_hw_register(dev, &div->hw);
-+	if (ret)
- 		goto err;
- 
- 	/* clk-krait ignore any rate change if mux is not flagged as enabled */
-@@ -118,7 +117,7 @@ err:
- 	kfree(p_names[0]);
- 	kfree(init.name);
- 
--	return PTR_ERR_OR_ZERO(clk);
-+	return ret;
- }
- 
- static int
-@@ -137,7 +136,6 @@ krait_add_sec_mux(struct device *dev, in
- 		.ops = &krait_mux_clk_ops,
- 		.flags = CLK_SET_RATE_PARENT,
- 	};
--	struct clk *clk;
- 
- 	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
- 	if (!mux)
-@@ -166,14 +164,16 @@ krait_add_sec_mux(struct device *dev, in
- 	if (unique_aux) {
- 		sec_mux_list[0] = kasprintf(GFP_KERNEL, "acpu%s_aux", s);
- 		if (!sec_mux_list[0]) {
--			clk = ERR_PTR(-ENOMEM);
-+			ret = -ENOMEM;
- 			goto err_aux;
- 		}
- 	}
- 
--	clk = devm_clk_register(dev, &mux->hw);
-+	ret = devm_clk_hw_register(dev, &mux->hw);
-+	if (ret)
-+		goto unique_aux;
- 
--	ret = krait_notifier_register(dev, clk, mux);
-+	ret = krait_notifier_register(dev, mux->hw.clk, mux);
- 	if (ret)
- 		goto unique_aux;
- 
-@@ -189,7 +189,7 @@ unique_aux:
- 		kfree(sec_mux_list[0]);
- err_aux:
- 	kfree(init.name);
--	return PTR_ERR_OR_ZERO(clk);
-+	return ret;
- }
- 
- static struct clk *
-@@ -241,11 +241,18 @@ krait_add_pri_mux(struct device *dev, in
- 		goto err_p2;
- 	}
- 
--	clk = devm_clk_register(dev, &mux->hw);
-+	ret = devm_clk_hw_register(dev, &mux->hw);
-+	if (ret) {
-+		clk = ERR_PTR(ret);
-+		goto err_p3;
-+	}
-+
-+	clk = mux->hw.clk;
- 
- 	ret = krait_notifier_register(dev, clk, mux);
- 	if (ret)
--		goto err_p3;
-+		clk = ERR_PTR(ret);
-+
- err_p3:
- 	kfree(p_names[2]);
- err_p2:
diff --git a/target/linux/ipq806x/patches-6.6/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch b/target/linux/ipq806x/patches-6.6/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch
deleted file mode 100644
index 453a37dfc0..0000000000
--- a/target/linux/ipq806x/patches-6.6/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch
+++ /dev/null
@@ -1,414 +0,0 @@
-From 56a655e1c41a86445cf2de656649ad93424b2a63 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Wed, 9 Nov 2022 01:56:31 +0100
-Subject: [PATCH 6/6] clk: qcom: krait-cc: convert to parent_data API
-
-Modernize the krait-cc driver to parent-data API and refactor to drop
-any use of parent_names. From Documentation all the required clocks should
-be declared in DTS so fw_name can be correctly used to get the parents
-for all the muxes. .name is also declared to save compatibility with old
-DT.
-
-While at it also drop some hardcoded index and introduce an enum to make
-index values more clear.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
-Link: https://lore.kernel.org/r/20221109005631.3189-5-ansuelsmth at gmail.com
----
- drivers/clk/qcom/krait-cc.c | 202 ++++++++++++++++++++----------------
- 1 file changed, 112 insertions(+), 90 deletions(-)
-
---- a/drivers/clk/qcom/krait-cc.c
-+++ b/drivers/clk/qcom/krait-cc.c
-@@ -15,6 +15,16 @@
- 
- #include "clk-krait.h"
- 
-+enum {
-+	cpu0_mux = 0,
-+	cpu1_mux,
-+	cpu2_mux,
-+	cpu3_mux,
-+	l2_mux,
-+
-+	clks_max,
-+};
-+
- static unsigned int sec_mux_map[] = {
- 	2,
- 	0,
-@@ -69,21 +79,23 @@ static int krait_notifier_register(struc
- 	return ret;
- }
- 
--static int
-+static struct clk_hw *
- krait_add_div(struct device *dev, int id, const char *s, unsigned int offset)
- {
- 	struct krait_div2_clk *div;
-+	static struct clk_parent_data p_data[1];
- 	struct clk_init_data init = {
--		.num_parents = 1,
-+		.num_parents = ARRAY_SIZE(p_data),
- 		.ops = &krait_div2_clk_ops,
- 		.flags = CLK_SET_RATE_PARENT,
- 	};
--	const char *p_names[1];
-+	struct clk_hw *clk;
-+	char *parent_name;
- 	int cpu, ret;
- 
- 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
- 	if (!div)
--		return -ENOMEM;
-+		return ERR_PTR(-ENOMEM);
- 
- 	div->width = 2;
- 	div->shift = 6;
-@@ -93,18 +105,25 @@ krait_add_div(struct device *dev, int id
- 
- 	init.name = kasprintf(GFP_KERNEL, "hfpll%s_div", s);
- 	if (!init.name)
--		return -ENOMEM;
-+		return ERR_PTR(-ENOMEM);
- 
--	init.parent_names = p_names;
--	p_names[0] = kasprintf(GFP_KERNEL, "hfpll%s", s);
--	if (!p_names[0]) {
--		kfree(init.name);
--		return -ENOMEM;
-+	init.parent_data = p_data;
-+	parent_name = kasprintf(GFP_KERNEL, "hfpll%s", s);
-+	if (!parent_name) {
-+		clk = ERR_PTR(-ENOMEM);
-+		goto err_parent_name;
- 	}
- 
-+	p_data[0].fw_name = parent_name;
-+	p_data[0].name = parent_name;
-+
- 	ret = devm_clk_hw_register(dev, &div->hw);
--	if (ret)
--		goto err;
-+	if (ret) {
-+		clk = ERR_PTR(ret);
-+		goto err_clk;
-+	}
-+
-+	clk = &div->hw;
- 
- 	/* clk-krait ignore any rate change if mux is not flagged as enabled */
- 	if (id < 0)
-@@ -113,33 +132,36 @@ krait_add_div(struct device *dev, int id
- 	else
- 		clk_prepare_enable(div->hw.clk);
- 
--err:
--	kfree(p_names[0]);
-+err_clk:
-+	kfree(parent_name);
-+err_parent_name:
- 	kfree(init.name);
- 
--	return ret;
-+	return clk;
- }
- 
--static int
-+static struct clk_hw *
- krait_add_sec_mux(struct device *dev, int id, const char *s,
- 		  unsigned int offset, bool unique_aux)
- {
- 	int cpu, ret;
- 	struct krait_mux_clk *mux;
--	static const char *sec_mux_list[] = {
--		"qsb",
--		"acpu_aux",
-+	static struct clk_parent_data sec_mux_list[2] = {
-+		{ .name = "qsb", .fw_name = "qsb" },
-+		{},
- 	};
- 	struct clk_init_data init = {
--		.parent_names = sec_mux_list,
-+		.parent_data = sec_mux_list,
- 		.num_parents = ARRAY_SIZE(sec_mux_list),
- 		.ops = &krait_mux_clk_ops,
- 		.flags = CLK_SET_RATE_PARENT,
- 	};
-+	struct clk_hw *clk;
-+	char *parent_name;
- 
- 	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
- 	if (!mux)
--		return -ENOMEM;
-+		return ERR_PTR(-ENOMEM);
- 
- 	mux->offset = offset;
- 	mux->lpl = id >= 0;
-@@ -159,23 +181,33 @@ krait_add_sec_mux(struct device *dev, in
- 
- 	init.name = kasprintf(GFP_KERNEL, "krait%s_sec_mux", s);
- 	if (!init.name)
--		return -ENOMEM;
-+		return ERR_PTR(-ENOMEM);
- 
- 	if (unique_aux) {
--		sec_mux_list[0] = kasprintf(GFP_KERNEL, "acpu%s_aux", s);
--		if (!sec_mux_list[0]) {
--			ret = -ENOMEM;
-+		parent_name = kasprintf(GFP_KERNEL, "acpu%s_aux", s);
-+		if (!parent_name) {
-+			clk = ERR_PTR(-ENOMEM);
- 			goto err_aux;
- 		}
-+		sec_mux_list[1].fw_name = parent_name;
-+		sec_mux_list[1].name = parent_name;
-+	} else {
-+		sec_mux_list[1].name = "apu_aux";
- 	}
- 
- 	ret = devm_clk_hw_register(dev, &mux->hw);
--	if (ret)
--		goto unique_aux;
-+	if (ret) {
-+		clk = ERR_PTR(ret);
-+		goto err_clk;
-+	}
-+
-+	clk = &mux->hw;
- 
- 	ret = krait_notifier_register(dev, mux->hw.clk, mux);
--	if (ret)
--		goto unique_aux;
-+	if (ret) {
-+		clk = ERR_PTR(ret);
-+		goto err_clk;
-+	}
- 
- 	/* clk-krait ignore any rate change if mux is not flagged as enabled */
- 	if (id < 0)
-@@ -184,28 +216,29 @@ krait_add_sec_mux(struct device *dev, in
- 	else
- 		clk_prepare_enable(mux->hw.clk);
- 
--unique_aux:
-+err_clk:
- 	if (unique_aux)
--		kfree(sec_mux_list[0]);
-+		kfree(parent_name);
- err_aux:
- 	kfree(init.name);
--	return ret;
-+	return clk;
- }
- 
--static struct clk *
--krait_add_pri_mux(struct device *dev, int id, const char *s,
--		  unsigned int offset)
-+static struct clk_hw *
-+krait_add_pri_mux(struct device *dev, struct clk_hw *hfpll_div, struct clk_hw *sec_mux,
-+		  int id, const char *s, unsigned int offset)
- {
- 	int ret;
- 	struct krait_mux_clk *mux;
--	const char *p_names[3];
-+	static struct clk_parent_data p_data[3];
- 	struct clk_init_data init = {
--		.parent_names = p_names,
--		.num_parents = ARRAY_SIZE(p_names),
-+		.parent_data = p_data,
-+		.num_parents = ARRAY_SIZE(p_data),
- 		.ops = &krait_mux_clk_ops,
- 		.flags = CLK_SET_RATE_PARENT,
- 	};
--	struct clk *clk;
-+	struct clk_hw *clk;
-+	char *hfpll_name;
- 
- 	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
- 	if (!mux)
-@@ -223,55 +256,44 @@ krait_add_pri_mux(struct device *dev, in
- 	if (!init.name)
- 		return ERR_PTR(-ENOMEM);
- 
--	p_names[0] = kasprintf(GFP_KERNEL, "hfpll%s", s);
--	if (!p_names[0]) {
-+	hfpll_name = kasprintf(GFP_KERNEL, "hfpll%s", s);
-+	if (!hfpll_name) {
- 		clk = ERR_PTR(-ENOMEM);
--		goto err_p0;
-+		goto err_hfpll;
- 	}
- 
--	p_names[1] = kasprintf(GFP_KERNEL, "hfpll%s_div", s);
--	if (!p_names[1]) {
--		clk = ERR_PTR(-ENOMEM);
--		goto err_p1;
--	}
-+	p_data[0].fw_name = hfpll_name;
-+	p_data[0].name = hfpll_name;
- 
--	p_names[2] = kasprintf(GFP_KERNEL, "krait%s_sec_mux", s);
--	if (!p_names[2]) {
--		clk = ERR_PTR(-ENOMEM);
--		goto err_p2;
--	}
-+	p_data[1].hw = hfpll_div;
-+	p_data[2].hw = sec_mux;
- 
- 	ret = devm_clk_hw_register(dev, &mux->hw);
- 	if (ret) {
- 		clk = ERR_PTR(ret);
--		goto err_p3;
-+		goto err_clk;
- 	}
- 
--	clk = mux->hw.clk;
-+	clk = &mux->hw;
- 
--	ret = krait_notifier_register(dev, clk, mux);
-+	ret = krait_notifier_register(dev, mux->hw.clk, mux);
- 	if (ret)
- 		clk = ERR_PTR(ret);
- 
--err_p3:
--	kfree(p_names[2]);
--err_p2:
--	kfree(p_names[1]);
--err_p1:
--	kfree(p_names[0]);
--err_p0:
-+err_clk:
-+	kfree(hfpll_name);
-+err_hfpll:
- 	kfree(init.name);
- 	return clk;
- }
- 
- /* id < 0 for L2, otherwise id == physical CPU number */
--static struct clk *krait_add_clks(struct device *dev, int id, bool unique_aux)
-+static struct clk_hw *krait_add_clks(struct device *dev, int id, bool unique_aux)
- {
--	int ret;
-+	struct clk_hw *hfpll_div, *sec_mux, *pri_mux;
- 	unsigned int offset;
- 	void *p = NULL;
- 	const char *s;
--	struct clk *clk;
- 
- 	if (id >= 0) {
- 		offset = 0x4501 + (0x1000 * id);
-@@ -283,22 +305,23 @@ static struct clk *krait_add_clks(struct
- 		s = "_l2";
- 	}
- 
--	ret = krait_add_div(dev, id, s, offset);
--	if (ret) {
--		clk = ERR_PTR(ret);
-+	hfpll_div = krait_add_div(dev, id, s, offset);
-+	if (IS_ERR(hfpll_div)) {
-+		pri_mux = hfpll_div;
- 		goto err;
- 	}
- 
--	ret = krait_add_sec_mux(dev, id, s, offset, unique_aux);
--	if (ret) {
--		clk = ERR_PTR(ret);
-+	sec_mux = krait_add_sec_mux(dev, id, s, offset, unique_aux);
-+	if (IS_ERR(sec_mux)) {
-+		pri_mux = sec_mux;
- 		goto err;
- 	}
- 
--	clk = krait_add_pri_mux(dev, id, s, offset);
-+	pri_mux = krait_add_pri_mux(dev, hfpll_div, sec_mux, id, s, offset);
-+
- err:
- 	kfree(p);
--	return clk;
-+	return pri_mux;
- }
- 
- static struct clk *krait_of_get(struct of_phandle_args *clkspec, void *data)
-@@ -306,7 +329,7 @@ static struct clk *krait_of_get(struct o
- 	unsigned int idx = clkspec->args[0];
- 	struct clk **clks = data;
- 
--	if (idx >= 5) {
-+	if (idx >= clks_max) {
- 		pr_err("%s: invalid clock index %d\n", __func__, idx);
- 		return ERR_PTR(-EINVAL);
- 	}
-@@ -327,9 +350,8 @@ static int krait_cc_probe(struct platfor
- 	const struct of_device_id *id;
- 	unsigned long cur_rate, aux_rate;
- 	int cpu;
--	struct clk *clk;
--	struct clk **clks;
--	struct clk *l2_pri_mux_clk;
-+	struct clk_hw *mux, *l2_pri_mux;
-+	struct clk *clk, **clks;
- 
- 	id = of_match_device(krait_cc_match_table, dev);
- 	if (!id)
-@@ -348,21 +370,21 @@ static int krait_cc_probe(struct platfor
- 	}
- 
- 	/* Krait configurations have at most 4 CPUs and one L2 */
--	clks = devm_kcalloc(dev, 5, sizeof(*clks), GFP_KERNEL);
-+	clks = devm_kcalloc(dev, clks_max, sizeof(*clks), GFP_KERNEL);
- 	if (!clks)
- 		return -ENOMEM;
- 
- 	for_each_possible_cpu(cpu) {
--		clk = krait_add_clks(dev, cpu, id->data);
-+		mux = krait_add_clks(dev, cpu, id->data);
- 		if (IS_ERR(clk))
- 			return PTR_ERR(clk);
--		clks[cpu] = clk;
-+		clks[cpu] = mux->clk;
- 	}
- 
--	l2_pri_mux_clk = krait_add_clks(dev, -1, id->data);
--	if (IS_ERR(l2_pri_mux_clk))
--		return PTR_ERR(l2_pri_mux_clk);
--	clks[4] = l2_pri_mux_clk;
-+	l2_pri_mux = krait_add_clks(dev, -1, id->data);
-+	if (IS_ERR(l2_pri_mux))
-+		return PTR_ERR(l2_pri_mux);
-+	clks[l2_mux] = l2_pri_mux->clk;
- 
- 	/*
- 	 * We don't want the CPU or L2 clocks to be turned off at late init
-@@ -372,7 +394,7 @@ static int krait_cc_probe(struct platfor
- 	 * they take over.
- 	 */
- 	for_each_online_cpu(cpu) {
--		clk_prepare_enable(l2_pri_mux_clk);
-+		clk_prepare_enable(clks[l2_mux]);
- 		WARN(clk_prepare_enable(clks[cpu]),
- 		     "Unable to turn on CPU%d clock", cpu);
- 	}
-@@ -388,16 +410,16 @@ static int krait_cc_probe(struct platfor
- 	 * two different rates to force a HFPLL reinit under all
- 	 * circumstances.
- 	 */
--	cur_rate = clk_get_rate(l2_pri_mux_clk);
-+	cur_rate = clk_get_rate(clks[l2_mux]);
- 	aux_rate = 384000000;
- 	if (cur_rate < aux_rate) {
- 		pr_info("L2 @ Undefined rate. Forcing new rate.\n");
- 		cur_rate = aux_rate;
- 	}
--	clk_set_rate(l2_pri_mux_clk, aux_rate);
--	clk_set_rate(l2_pri_mux_clk, 2);
--	clk_set_rate(l2_pri_mux_clk, cur_rate);
--	pr_info("L2 @ %lu KHz\n", clk_get_rate(l2_pri_mux_clk) / 1000);
-+	clk_set_rate(clks[l2_mux], aux_rate);
-+	clk_set_rate(clks[l2_mux], 2);
-+	clk_set_rate(clks[l2_mux], cur_rate);
-+	pr_info("L2 @ %lu KHz\n", clk_get_rate(clks[l2_mux]) / 1000);
- 	for_each_possible_cpu(cpu) {
- 		clk = clks[cpu];
- 		cur_rate = clk_get_rate(clk);
diff --git a/target/linux/ipq806x/patches-6.6/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch b/target/linux/ipq806x/patches-6.6/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch
deleted file mode 100644
index 7e65f4cdff..0000000000
--- a/target/linux/ipq806x/patches-6.6/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From c9713e4ede1e5d044b64fe4d3cbb84223625637f Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Tue, 25 Oct 2022 01:38:17 +0200
-Subject: [PATCH] ARM: dts: qcom: ipq8064: disable mmc-ddr-1_8v for sdcc1
-
-It was reported non working mmc with this option enabled.
-Both mmc for ipq8064 are supplied by a fixed 3.3v regulator so mmc can't
-be run at 1.8v.
-Disable it to restore correct functionality of this SoC feature.
-
-Tested-by: Hendrik Koerner <koerhen at web.de>
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Signed-off-by: Bjorn Andersson <andersson at kernel.org>
-Link: https://lore.kernel.org/r/20221024233817.27410-1-ansuelsmth at gmail.com
----
- arch/arm/boot/dts/qcom-ipq8064.dtsi | 1 -
- 1 file changed, 1 deletion(-)
-
---- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
-+++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
-@@ -756,7 +756,6 @@
- 				non-removable;
- 				cap-sd-highspeed;
- 				cap-mmc-highspeed;
--				mmc-ddr-1_8v;
- 				vmmc-supply = <&vsdcc_fixed>;
- 				dmas = <&sdcc1bam 2>, <&sdcc1bam 1>;
- 				dma-names = "tx", "rx";
diff --git a/target/linux/ipq806x/patches-6.6/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch b/target/linux/ipq806x/patches-6.6/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch
deleted file mode 100644
index 76df0f5681..0000000000
--- a/target/linux/ipq806x/patches-6.6/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch
+++ /dev/null
@@ -1,42 +0,0 @@
-From de48d8766afcd97d147699aaff78a338081c9973 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sat, 22 Oct 2022 14:56:55 +0200
-Subject: [PATCH 1/3] thermal/drivers/qcom/tsens: Init debugfs only with
- successful probe
-
-Calibrate and tsens_register can fail or PROBE_DEFER. This will cause a
-double or a wrong init of the debugfs information. Init debugfs only
-with successful probe fixing warning about directory already present.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Acked-by: Thara Gopinath <thara.gopinath at linaro.org>
-Link: https://lore.kernel.org/r/20221022125657.22530-2-ansuelsmth at gmail.com
-Signed-off-by: Daniel Lezcano <daniel.lezcano at kernel.org>
----
- drivers/thermal/qcom/tsens.c | 8 +++++---
- 1 file changed, 5 insertions(+), 3 deletions(-)
-
---- a/drivers/thermal/qcom/tsens.c
-+++ b/drivers/thermal/qcom/tsens.c
-@@ -918,8 +918,6 @@ int __init init_common(struct tsens_priv
- 	if (tsens_version(priv) >= VER_0_1)
- 		tsens_enable_irq(priv);
- 
--	tsens_debug_init(op);
--
- err_put_device:
- 	put_device(&op->dev);
- 	return ret;
-@@ -1156,7 +1154,11 @@ static int tsens_probe(struct platform_d
- 		}
- 	}
- 
--	return tsens_register(priv);
-+	ret = tsens_register(priv);
-+	if (!ret)
-+		tsens_debug_init(pdev);
-+
-+	return ret;
- }
- 
- static int tsens_remove(struct platform_device *pdev)
diff --git a/target/linux/ipq806x/patches-6.6/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch b/target/linux/ipq806x/patches-6.6/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch
deleted file mode 100644
index 10f1e36b58..0000000000
--- a/target/linux/ipq806x/patches-6.6/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch
+++ /dev/null
@@ -1,29 +0,0 @@
-From c7e077e921fa94e0c06c8d14af6c0504c8a5f4bd Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sat, 22 Oct 2022 14:56:56 +0200
-Subject: [PATCH 2/3] thermal/drivers/qcom/tsens: Fix wrong version id
- dbg_version_show
-
-For VER_0 the version was incorrectly reported as 0.1.0.
-
-Fix that and correctly report the major version for this old tsens
-revision.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Link: https://lore.kernel.org/r/20221022125657.22530-3-ansuelsmth at gmail.com
-Signed-off-by: Daniel Lezcano <daniel.lezcano at kernel.org>
----
- drivers/thermal/qcom/tsens.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/thermal/qcom/tsens.c
-+++ b/drivers/thermal/qcom/tsens.c
-@@ -692,7 +692,7 @@ static int dbg_version_show(struct seq_f
- 			return ret;
- 		seq_printf(s, "%d.%d.%d\n", maj_ver, min_ver, step_ver);
- 	} else {
--		seq_puts(s, "0.1.0\n");
-+		seq_printf(s, "0.%d.0\n", priv->feat->ver_major);
- 	}
- 
- 	return 0;
diff --git a/target/linux/ipq806x/patches-6.6/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch b/target/linux/ipq806x/patches-6.6/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch
deleted file mode 100644
index 63cce7974b..0000000000
--- a/target/linux/ipq806x/patches-6.6/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 89992d95ed1046338c7866ef7bbe6de543a2af91 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sat, 22 Oct 2022 14:56:57 +0200
-Subject: [PATCH 3/3] thermal/drivers/qcom/tsens: Rework debugfs file structure
-
-The current tsens debugfs structure is composed by:
-- a tsens dir in debugfs with a version file
-- a directory for each tsens istance with sensors file to dump all the
-  sensors value.
-
-This works on the assumption that we have the same version for each
-istance but this assumption seems fragile and with more than one tsens
-istance results in the version file not tracking each of them.
-
-A better approach is to just create a subdirectory for each tsens
-istance and put there version and sensors debugfs file.
-
-Using this new implementation results in less code since debugfs entry
-are created only on successful tsens probe.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Link: https://lore.kernel.org/r/20221022125657.22530-4-ansuelsmth at gmail.com
-Signed-off-by: Daniel Lezcano <daniel.lezcano at kernel.org>
----
- drivers/thermal/qcom/tsens.c | 13 +++----------
- 1 file changed, 3 insertions(+), 10 deletions(-)
-
---- a/drivers/thermal/qcom/tsens.c
-+++ b/drivers/thermal/qcom/tsens.c
-@@ -704,21 +704,14 @@ DEFINE_SHOW_ATTRIBUTE(dbg_sensors);
- static void tsens_debug_init(struct platform_device *pdev)
- {
- 	struct tsens_priv *priv = platform_get_drvdata(pdev);
--	struct dentry *root, *file;
- 
--	root = debugfs_lookup("tsens", NULL);
--	if (!root)
-+	priv->debug_root = debugfs_lookup("tsens", NULL);
-+	if (!priv->debug_root)
- 		priv->debug_root = debugfs_create_dir("tsens", NULL);
--	else
--		priv->debug_root = root;
--
--	file = debugfs_lookup("version", priv->debug_root);
--	if (!file)
--		debugfs_create_file("version", 0444, priv->debug_root,
--				    pdev, &dbg_version_fops);
- 
- 	/* A directory for each instance of the TSENS IP */
- 	priv->debug = debugfs_create_dir(dev_name(&pdev->dev), priv->debug_root);
-+	debugfs_create_file("version", 0444, priv->debug, pdev, &dbg_version_fops);
- 	debugfs_create_file("sensors", 0444, priv->debug, pdev, &dbg_sensors_fops);
- }
- #else



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:40 -0400
Subject: [openwrt/openwrt]  ipq806x: split files in 6.1 and 6.6 dedicated
 directory
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22800.1712094707.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d840d1fdf9ef7292ce8cfe8d91cde61535401a03

commit d840d1fdf9ef7292ce8cfe8d91cde61535401a03
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:27:52 2024 +0100

    ipq806x: split files in 6.1 and 6.6 dedicated directory
    
    Since with recent kernel version DTS moved to a dedicated directory,
    it's required to split files to per kernel version to follow kernel
    version directory structure.
    
    Also makes use of DEVICE_DTS_DIR to target the correct DTS directory
    based on the kernel version.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts    | 0
 .../arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi                     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-ad7200.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-ap148.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-ap161.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-asus-onhub.dts   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-c2600.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-d7800.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-db149.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-ea7500-v1.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-fap-421e.dts     | 0
 .../ipq806x/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-g10.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-r7500.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-tplink-onhub.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8065-ac400i.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts      | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8065-r7800.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8065-tr4400-v2.dts    | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8065-xr450.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8065-xr500.dts        | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8068-ap3935.dts       | 0
 .../arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi                   | 0
 .../{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts      | 0
 .../ipq806x/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8068-mr42.dts | 0
 .../ipq806x/{files => files-6.1}/arch/arm/boot/dts/qcom-ipq8068-mr52.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8062-wg2600hp3.dts  | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq8064-ad7200-c2600.dtsi               | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-ad7200.dts     | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-ap148.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-ap161.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-asus-onhub.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-c2600.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-d7800.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-db149.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-ea7500-v1.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-ea8500.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-eax500.dtsi    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-fap-421e.dts   | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-g10.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-onhub.dtsi     | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-r7500.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-r7500v2.dts    | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq8064-tplink-onhub.dts                | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq8064-unifi-ac-hd.dts                 | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-vr2600v.dts    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-wg2600hp.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8064-wpq864.dts     | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq8064-wxr-2533dhp.dts                 | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8065-ac400i.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8065-nbg6817.dts    | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8065-nighthawk.dtsi | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8065-r7800.dts | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq8065-rt4230w-rev6.dts                | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8065-tr4400-v2.dts  | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8065-xr450.dts | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8065-xr500.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8068-ap3935.dts     | 0
 .../arch/arm/boot/dts/qcom}/qcom-ipq8068-cryptid-common.dtsi             | 0
 .../dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8068-ecw5410.dts    | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8068-mr42.dts  | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/qcom}/qcom-ipq8068-mr52.dts  | 0
 target/linux/ipq806x/image/Makefile                                      | 1 +
 73 files changed, 1 insertion(+)

diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ad7200.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ad7200.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ap161.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ap161.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ap161.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ap161.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-asus-onhub.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-asus-onhub.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-asus-onhub.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-asus-onhub.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-db149.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-db149.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-db149.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea7500-v1.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ea7500-v1.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea7500-v1.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ea7500-v1.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-fap-421e.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-fap-421e.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-fap-421e.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-fap-421e.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-g10.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-g10.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-g10.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-g10.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-tplink-onhub.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-tplink-onhub.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-tplink-onhub.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-tplink-onhub.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-ac400i.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-ac400i.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-ac400i.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-ac400i.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-tr4400-v2.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-tr4400-v2.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-tr4400-v2.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-tr4400-v2.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr450.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-xr450.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr450.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-xr450.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr500.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-xr500.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr500.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8065-xr500.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ap3935.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-ap3935.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ap3935.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-ap3935.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-mr42.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-mr42.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-mr42.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-mr42.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-mr52.dts b/target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-mr52.dts
similarity index 100%
copy from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-mr52.dts
copy to target/linux/ipq806x/files-6.1/arch/arm/boot/dts/qcom-ipq8068-mr52.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8062-wg2600hp3.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8062-wg2600hp3.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8062-wg2600hp3.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200-c2600.dtsi
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200-c2600.dtsi
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200-c2600.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ad7200.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ad7200.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ap148.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ap148.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ap148.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ap148.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ap161.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ap161.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ap161.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ap161.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-asus-onhub.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-asus-onhub.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-asus-onhub.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-asus-onhub.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-c2600.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-c2600.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-c2600.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-c2600.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-d7800.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-d7800.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-d7800.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-db149.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-db149.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-db149.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-db149.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea7500-v1.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ea7500-v1.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea7500-v1.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ea7500-v1.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ea8500.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-ea8500.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-ea8500.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-eax500.dtsi
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-eax500.dtsi
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-eax500.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-fap-421e.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-fap-421e.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-fap-421e.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-fap-421e.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-g10.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-g10.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-g10.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-g10.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-onhub.dtsi
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-onhub.dtsi
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-onhub.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500v2.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-r7500v2.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-r7500v2.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-tplink-onhub.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-tplink-onhub.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-tplink-onhub.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-tplink-onhub.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-unifi-ac-hd.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-unifi-ac-hd.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-unifi-ac-hd.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-vr2600v.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-vr2600v.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-vr2600v.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wg2600hp.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wg2600hp.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wg2600hp.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wpq864.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wpq864.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wpq864.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wxr-2533dhp.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8064-wxr-2533dhp.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8064-wxr-2533dhp.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-ac400i.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-ac400i.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-ac400i.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-ac400i.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nbg6817.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nbg6817.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nbg6817.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nighthawk.dtsi
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-nighthawk.dtsi
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-nighthawk.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-r7800.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-r7800.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-r7800.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-rt4230w-rev6.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-rt4230w-rev6.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-tr4400-v2.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-tr4400-v2.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-tr4400-v2.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-tr4400-v2.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr450.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-xr450.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr450.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-xr450.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr500.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-xr500.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8065-xr500.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8065-xr500.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ap3935.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-ap3935.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ap3935.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-ap3935.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-cryptid-common.dtsi
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-cryptid-common.dtsi
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-cryptid-common.dtsi
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-ecw5410.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-ecw5410.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-ecw5410.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-mr42.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-mr42.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-mr42.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-mr42.dts
diff --git a/target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-mr52.dts b/target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-mr52.dts
similarity index 100%
rename from target/linux/ipq806x/files/arch/arm/boot/dts/qcom-ipq8068-mr52.dts
rename to target/linux/ipq806x/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq8068-mr52.dts
diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index 8c1fc88010..c6be9371e3 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -6,6 +6,7 @@ include $(INCLUDE_DIR)/image.mk
 define Device/Default
 	PROFILES := Default
 	KERNEL_LOADADDR = 0x42208000
+	DEVICE_DTS_DIR = $(if $(CONFIG_TESTING_KERNEL),$$(DTS_DIR)/qcom,$$(DTS_DIR))
 	DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
 	DEVICE_DTS_CONFIG := config at 1
 	IMAGES := sysupgrade.bin



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:44 -0400
Subject: [openwrt/openwrt]  ipq806x: 6.6: refresh kernel patches
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22803.1712094709.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/224f2fd5676f56d5be98d08dc2f041d5dece8ce1

commit 224f2fd5676f56d5be98d08dc2f041d5dece8ce1
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:48:41 2024 +0100

    ipq806x: 6.6: refresh kernel patches
    
    Refresh kernel patches using make target/linux/refresh.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch |  2 +-
 ...RM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch |  6 +++---
 ...RM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch |  2 +-
 ...RM-dts-qcom-add-multiple-missing-binding-for-cpu.patch |  2 +-
 ...dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch |  2 +-
 ...dts-qcom-add-MDIO-dedicated-controller-node-for-.patch |  4 ++--
 ...req-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch |  2 +-
 ...dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch |  2 +-
 ...115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch |  2 +-
 ...02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch |  2 +-
 ...2-05-clk-qcom-clk-krait-generilize-div-functions.patch |  2 +-
 ...rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch | 15 +++------------
 .../ipq806x/patches-6.6/850-soc-add-qualcomm-syscon.patch |  6 +++---
 .../patches-6.6/900-arm-add-cmdline-override.patch        |  4 ++--
 ...-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch |  4 ++--
 ...decompressor-support-for-ATAGs-rootblock-parsing.patch | 12 ++++++------
 16 files changed, 30 insertions(+), 39 deletions(-)

diff --git a/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch b/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
index e0c195f1ab..d70be98aca 100644
--- a/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
+++ b/target/linux/ipq806x/patches-6.6/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <john at phrozen.org>
 
 --- a/drivers/mtd/mtdpart.c
 +++ b/drivers/mtd/mtdpart.c
-@@ -51,7 +51,11 @@ static struct mtd_info *allocate_partiti
+@@ -57,7 +57,11 @@ static struct mtd_info *allocate_partiti
  
  	/* allocate the partition structure */
  	child = kzalloc(sizeof(*child), GFP_KERNEL);
diff --git a/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch b/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
index 228368b6cd..83eb6f38cd 100644
--- a/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
+++ b/target/linux/ipq806x/patches-6.6/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
@@ -16,7 +16,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
 
 --- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
-@@ -301,6 +301,12 @@
+@@ -302,6 +302,12 @@
  	};
  
  	clocks {
@@ -29,7 +29,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  		cxo_board: cxo_board {
  			compatible = "fixed-clock";
  			#clock-cells = <0>;
-@@ -575,7 +581,7 @@
+@@ -587,7 +593,7 @@
  		};
  
  		saw0: regulator at 2089000 {
@@ -38,7 +38,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  			reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
  			regulator;
  		};
-@@ -591,11 +612,27 @@
+@@ -602,11 +608,27 @@
  		};
  
  		saw1: regulator at 2099000 {
diff --git a/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch b/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
index b6359a946e..1cf57d018f 100644
--- a/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
+++ b/target/linux/ipq806x/patches-6.6/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
@@ -23,7 +23,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
 
 --- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
-@@ -48,6 +48,105 @@
+@@ -49,6 +49,105 @@
  		};
  	};
  
diff --git a/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch b/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
index 55f02ac5aa..e4c9f73c83 100644
--- a/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
+++ b/target/linux/ipq806x/patches-6.6/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
@@ -59,7 +59,7 @@ Tested-by: Jonathan McDowell <noodles at earth.li>
  		L2: l2-cache {
  			compatible = "cache";
  			cache-level = <2>;
-			cache-unified;
+ 			cache-unified;
 +			qcom,saw = <&saw_l2>;
 +
 +			clocks = <&kraitcc 4>;
diff --git a/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch b/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
index a06dd00dfc..a3ac606ae9 100644
--- a/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
+++ b/target/linux/ipq806x/patches-6.6/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
@@ -12,7 +12,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
 
 --- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
-@@ -599,12 +599,9 @@
+@@ -600,12 +600,9 @@
  			};
  
  			nand_pins: nand_pins {
diff --git a/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch b/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
index 8f6f8a287a..b4aa04d7d2 100644
--- a/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
+++ b/target/linux/ipq806x/patches-6.6/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
@@ -147,7 +147,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
  	mdio1: mdio-1 {
  		status = "okay";
  		compatible = "virtual,mdio-gpio";
-@@ -222,6 +155,131 @@
+@@ -337,6 +212,131 @@
  	status = "okay";
  };
  
@@ -281,7 +281,7 @@ Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
  
 --- a/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
 +++ b/arch/arm/boot/dts/qcom/qcom-ipq8064.dtsi
-@@ -476,6 +476,20 @@
+@@ -1429,6 +1429,20 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/ipq806x/patches-6.6/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch b/target/linux/ipq806x/patches-6.6/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
index 9de7328879..9780f6a30b 100644
--- a/target/linux/ipq806x/patches-6.6/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
+++ b/target/linux/ipq806x/patches-6.6/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
@@ -21,7 +21,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/devfreq/Kconfig
 +++ b/drivers/devfreq/Kconfig
-@@ -151,6 +151,17 @@ config ARM_SUN8I_A33_MBUS_DEVFREQ
+@@ -150,6 +150,17 @@ config ARM_SUN8I_A33_MBUS_DEVFREQ
  	  This adds the DEVFREQ driver for the MBUS controller in some
  	  Allwinner sun8i (A33 through H3) and sun50i (A64 and H5) SoCs.
  
diff --git a/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch b/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
index 77b6f926bd..92ff75afe6 100644
--- a/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
+++ b/target/linux/ipq806x/patches-6.6/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
@@ -32,7 +32,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	};
  
  	opp_table_l2: opp_table_l2 {
-@@ -1409,6 +1399,17 @@
+@@ -1392,6 +1381,17 @@
  			#reset-cells = <1>;
  		};
  
diff --git a/target/linux/ipq806x/patches-6.6/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch b/target/linux/ipq806x/patches-6.6/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
index c9cd3ebdf7..c359eda2a5 100644
--- a/target/linux/ipq806x/patches-6.6/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
+++ b/target/linux/ipq806x/patches-6.6/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
@@ -15,7 +15,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/devfreq/Kconfig
 +++ b/drivers/devfreq/Kconfig
-@@ -162,6 +162,17 @@ config ARM_KRAIT_CACHE_DEVFREQ
+@@ -161,6 +161,17 @@ config ARM_KRAIT_CACHE_DEVFREQ
  	  based on the max frequency across all core and the range set in the device
  	  dts. If provided this scale also the regulator attached to the l2 cache.
  
diff --git a/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch b/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
index 418e3248ad..bbdbedd6c2 100644
--- a/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
+++ b/target/linux/ipq806x/patches-6.6/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
@@ -32,7 +32,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	thermal-zones {
  		sensor0-thermal {
  			polling-delay-passive = <0>;
-@@ -1409,6 +1421,13 @@
+@@ -1392,6 +1404,13 @@
  			operating-points-v2 = <&opp_table_l2>;
  		};
  
diff --git a/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch b/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
index 356659d9c0..45b94ed649 100644
--- a/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
+++ b/target/linux/ipq806x/patches-6.6/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
@@ -30,7 +30,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 +	req->best_parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw),
 +						  req->rate * d->divisor);
 +	req->rate = DIV_ROUND_UP(req->best_parent_rate, d->divisor);
-	return 0;
+ 	return 0;
  }
  
 -static int krait_div2_set_rate(struct clk_hw *hw, unsigned long rate,
diff --git a/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch b/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch
index 5fc2599522..caa5b070e4 100644
--- a/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch
+++ b/target/linux/ipq806x/patches-6.6/130-mtd-rawnand-qcom-Fix-broken-misc_cmd_type-in-exec_op.patch
@@ -1,4 +1,4 @@
-From b25aac1f55c29048e5a6ab24ab0e2aea12cb4887 Mon Sep 17 00:00:00 2001
+From 9732c4f2d93a4a39ffc903c88ab7d531a8bb2e74 Mon Sep 17 00:00:00 2001
 From: Christian Marangi <ansuelsmth at gmail.com>
 Date: Wed, 20 Mar 2024 00:47:58 +0100
 Subject: [PATCH] mtd: rawnand: qcom: Fix broken misc_cmd_type in exec_op
@@ -8,10 +8,6 @@ misc_cmd_type in exec_op have multiple problems. With commit a82990c8a409
 reworked and generalized but actually dropped the handling of the
 RESET_DEVICE command.
 
-The rework itself was correct with supporting case where a single misc
-command is handled, but became problematic by the addition of exiting
-early if we didn't had an ERASE or an OP_PROGRAM_PAGE operation.
-
 Also additional logic was added without clear explaination causing the
 erase command to be broken on testing it on a ipq806x nandc.
 
@@ -25,11 +21,9 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  drivers/mtd/nand/raw/qcom_nandc.c | 7 +++----
  1 file changed, 3 insertions(+), 4 deletions(-)
 
-diff --git a/drivers/mtd/nand/raw/qcom_nandc.c b/drivers/mtd/nand/raw/qcom_nandc.c
-index b079605c84d3..b8cff9240b28 100644
 --- a/drivers/mtd/nand/raw/qcom_nandc.c
 +++ b/drivers/mtd/nand/raw/qcom_nandc.c
-@@ -2815,7 +2815,7 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub
+@@ -2815,7 +2815,7 @@ static int qcom_misc_cmd_type_exec(struc
  			      host->cfg0_raw & ~(7 << CW_PER_PAGE));
  		nandc_set_reg(chip, NAND_DEV0_CFG1, host->cfg1_raw);
  		instrs = 3;
@@ -38,7 +32,7 @@ index b079605c84d3..b8cff9240b28 100644
  		return 0;
  	}
  
-@@ -2830,9 +2830,8 @@ static int qcom_misc_cmd_type_exec(struct nand_chip *chip, const struct nand_sub
+@@ -2830,9 +2830,8 @@ static int qcom_misc_cmd_type_exec(struc
  	nandc_set_reg(chip, NAND_EXEC_CMD, 1);
  
  	write_reg_dma(nandc, NAND_FLASH_CMD, instrs, NAND_BAM_NEXT_SGL);
@@ -50,6 +44,3 @@ index b079605c84d3..b8cff9240b28 100644
  
  	write_reg_dma(nandc, NAND_EXEC_CMD, 1, NAND_BAM_NEXT_SGL);
  	read_reg_dma(nandc, NAND_FLASH_STATUS, 1, NAND_BAM_NEXT_SGL);
--- 
-2.43.0
-
diff --git a/target/linux/ipq806x/patches-6.6/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq806x/patches-6.6/850-soc-add-qualcomm-syscon.patch
index 397c4481ab..3fa60a6abc 100644
--- a/target/linux/ipq806x/patches-6.6/850-soc-add-qualcomm-syscon.patch
+++ b/target/linux/ipq806x/patches-6.6/850-soc-add-qualcomm-syscon.patch
@@ -2,17 +2,17 @@ From: Christian Lamparter <chunkeey at googlemail.com>
 Subject: SoC: add qualcomm syscon
 --- a/drivers/soc/qcom/Makefile
 +++ b/drivers/soc/qcom/Makefile
-@@ -23,6 +23,7 @@ obj-$(CONFIG_QCOM_SOCINFO)	+= socinfo.o
+@@ -26,6 +26,7 @@ obj-$(CONFIG_QCOM_SOCINFO)	+= socinfo.o
  obj-$(CONFIG_QCOM_SPM)		+= spm.o
  obj-$(CONFIG_QCOM_STATS)	+= qcom_stats.o
  obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o
 +obj-$(CONFIG_QCOM_TCSR)	 += qcom_tcsr.o
  obj-$(CONFIG_QCOM_APR) += apr.o
  obj-$(CONFIG_QCOM_LLCC) += llcc-qcom.o
- obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
+ obj-$(CONFIG_QCOM_KRYO_L2_ACCESSORS) +=	kryo-l2-accessors.o
 --- a/drivers/soc/qcom/Kconfig
 +++ b/drivers/soc/qcom/Kconfig
-@@ -213,6 +213,13 @@ config QCOM_STATS
+@@ -252,6 +252,13 @@ config QCOM_STATS
  	  various SoC level low power modes statistics and export to debugfs
  	  interface.
  
diff --git a/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch
index c9583549d0..f8bd1674b8 100644
--- a/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch
+++ b/target/linux/ipq806x/patches-6.6/900-arm-add-cmdline-override.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -1589,6 +1589,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+@@ -1568,6 +1568,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
  
  endchoice
  
@@ -17,7 +17,7 @@
  	default ""
 --- a/drivers/of/fdt.c
 +++ b/drivers/of/fdt.c
-@@ -1187,6 +1187,17 @@ int __init early_init_dt_scan_chosen(cha
+@@ -1189,6 +1189,17 @@ int __init early_init_dt_scan_chosen(cha
  	if (p != NULL && l > 0)
  		strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE));
  
diff --git a/target/linux/ipq806x/patches-6.6/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch b/target/linux/ipq806x/patches-6.6/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch
index 2e4c4de545..ce46f48fa5 100644
--- a/target/linux/ipq806x/patches-6.6/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch
+++ b/target/linux/ipq806x/patches-6.6/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch
@@ -20,7 +20,7 @@ Acked-by: Linus Walleij <linus.walleij at linaro.org>
 
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -1570,6 +1570,18 @@ config ARM_ATAG_DTB_COMPAT
+@@ -1549,6 +1549,18 @@ config ARM_ATAG_DTB_COMPAT
  	  bootloaders, this option allows zImage to extract the information
  	  from the ATAG list and store it at run time into the appended DTB.
  
@@ -41,7 +41,7 @@ Acked-by: Linus Walleij <linus.walleij at linaro.org>
  	default ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER
 --- a/arch/arm/boot/compressed/atags_to_fdt.c
 +++ b/arch/arm/boot/compressed/atags_to_fdt.c
-@@ -169,6 +169,10 @@ int atags_to_fdt(void *atag_list, void *
+@@ -170,6 +170,10 @@ int atags_to_fdt(void *atag_list, void *
  				setprop_string(fdt, "/chosen", "bootargs",
  					       atag->u.cmdline.cmdline);
  		} else if (atag->hdr.tag == ATAG_MEM) {
diff --git a/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch b/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
index 60b80fefe1..1832b6bead 100644
--- a/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
+++ b/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
@@ -24,7 +24,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -1599,6 +1599,16 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+@@ -1578,6 +1578,16 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
  	  The command-line arguments provided by the boot loader will be
  	  appended to the the device tree bootargs property.
  
@@ -43,9 +43,9 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  config CMDLINE_OVERRIDE
 --- a/arch/arm/boot/compressed/atags_to_fdt.c
 +++ b/arch/arm/boot/compressed/atags_to_fdt.c
-@@ -3,7 +3,8 @@
- #include <asm/setup.h>
+@@ -4,7 +4,8 @@
  #include <libfdt.h>
+ #include "misc.h"
  
 -#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND)
 +#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND) || \
@@ -53,7 +53,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  #define do_extend_cmdline 1
  #else
  #define do_extend_cmdline 0
-@@ -69,6 +70,83 @@ static uint32_t get_cell_size(const void
+@@ -70,6 +71,83 @@ static uint32_t get_cell_size(const void
  	return cell_size;
  }
  
@@ -137,7 +137,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
  {
  	char cmdline[COMMAND_LINE_SIZE];
-@@ -86,13 +164,23 @@ static void merge_fdt_bootargs(void *fdt
+@@ -87,13 +165,23 @@ static void merge_fdt_bootargs(void *fdt
  			ptr += len - 1;
  		}
  
@@ -177,7 +177,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  #include <linux/bootconfig.h>
  #include <linux/console.h>
  #include <linux/nmi.h>
-@@ -995,6 +996,17 @@ asmlinkage __visible void __init __no_sa
+@@ -929,6 +930,17 @@ void start_kernel(void)
  	pr_notice("Kernel command line: %s\n", saved_command_line);
  	/* parameters may set static keys */
  	jump_label_init();



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:39 -0400
Subject: [openwrt/openwrt]  kernel/ipq806x: Restore kernel files for v6.1
In-Reply-To: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
References: <171209469861.1115766.8080767467772638545@git-01.infra.openwrt.org>
Message-ID: <mailman.22804.1712094709.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3bf06ea9b3841688b5c3aa99a24f8ec0b4f5280f

commit 3bf06ea9b3841688b5c3aa99a24f8ec0b4f5280f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 01:21:39 2024 +0100

    kernel/ipq806x: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq806x/config-6.1                    | 538 +++++++++++++++++++++
 ...qcom-kpss-xcc-register-it-as-clk-provider.patch |  60 +++
 ...ait-cc-use-devm-variant-for-clk-notifier-.patch |  27 ++
 ...ait-cc-fix-wrong-parent-order-for-seconda.patch |  46 ++
 ...ait-cc-also-enable-secondary-mux-and-div-.patch |  68 +++
 ...ait-cc-handle-secondary-mux-sourcing-out-.patch |  48 ++
 ...-krait-cc-convert-to-devm_clk_hw_register.patch | 104 ++++
 ...-qcom-krait-cc-convert-to-parent_data-API.patch | 414 ++++++++++++++++
 ...om-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch |  28 ++
 ...vers-qcom-tsens-Init-debugfs-only-with-su.patch |  42 ++
 ...vers-qcom-tsens-Fix-wrong-version-id-dbg_.patch |  29 ++
 ...vers-qcom-tsens-Rework-debugfs-file-struc.patch |  54 +++
 ...otfs-conflicts-with-OpenWrt-auto-mounting.patch |  25 +
 ...qcom-add-saw-for-l2-cache-and-kraitcc-for.patch |  89 ++++
 ...qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch | 268 ++++++++++
 ...qcom-add-multiple-missing-binding-for-cpu.patch | 153 ++++++
 ...m-fix-wrong-nad_pins-definition-for-ipq80.patch |  29 ++
 ...m-add-MDIO-dedicated-controller-node-for-.patch | 188 +++++++
 ...m-Add-L2-Krait-Cache-devfreq-scaling-driv.patch | 235 +++++++++
 ...m-add-krait-cache-compatible-for-ipq806x-.patch |  50 ++
 ...devfreq-add-ipq806x-fabric-scaling-driver.patch | 203 ++++++++
 ...dts-qcom-add-fab-scaling-node-for-ipq806x.patch |  48 ++
 ...-krait-cc-handle-qsb-clock-defined-in-DTS.patch |  47 ++
 ...om-krait-cc-register-REAL-qsb-fixed-clock.patch |  36 ++
 ...om-krait-cc-drop-pr_info-and-use-dev_info.patch |  44 ++
 ...ait-cc-rework-mux-reset-logic-and-reset-h.patch |  88 ++++
 ...k-qcom-clk-krait-generilize-div-functions.patch | 156 ++++++
 ...-gcc-ipq806x-remove-cc_register_board-for.patch |  31 ++
 .../patches-6.1/850-soc-add-qualcomm-syscon.patch  | 121 +++++
 .../patches-6.1/900-arm-add-cmdline-override.patch |  37 ++
 ...mpressor-support-memory-start-validation-.patch |  75 +++
 ...compressor-add-option-to-ignore-MEM-ATAGs.patch |  54 +++
 ...essor-support-for-ATAGs-rootblock-parsing.patch | 197 ++++++++
 33 files changed, 3632 insertions(+)

diff --git a/target/linux/ipq806x/config-6.1 b/target/linux/ipq806x/config-6.1
new file mode 100644
index 0000000000..18325c0346
--- /dev/null
+++ b/target/linux/ipq806x/config-6.1
@@ -0,0 +1,538 @@
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_APQ_GCC_8084 is not set
+# CONFIG_APQ_MMCC_8084 is not set
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+# CONFIG_ARCH_IPQ40XX is not set
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+# CONFIG_ARCH_MDM9615 is not set
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+# CONFIG_ARCH_MSM8909 is not set
+# CONFIG_ARCH_MSM8916 is not set
+CONFIG_ARCH_MSM8960=y
+CONFIG_ARCH_MSM8974=y
+CONFIG_ARCH_MSM8X60=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_QCOM=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+# CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE=y
+CONFIG_ARM_ATAG_DTB_COMPAT_IGNORE_MEM=y
+CONFIG_ARM_CPUIDLE=y
+CONFIG_ARM_CPU_SUSPEND=y
+# CONFIG_ARM_CPU_TOPOLOGY is not set
+CONFIG_ARM_GIC=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
+CONFIG_ARM_IPQ806X_FAB_DEVFREQ=y
+CONFIG_ARM_KRAIT_CACHE_DEVFREQ=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_QCOM_CPUFREQ_HW is not set
+CONFIG_ARM_QCOM_CPUFREQ_NVMEM=y
+CONFIG_ARM_QCOM_SPM_CPUIDLE=y
+# CONFIG_ARM_SMMU is not set
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BOUNCE=y
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CLKSRC_QCOM=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE_OVERRIDE=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_QCOM=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_CPUFREQ_DT_PLATDEV=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+CONFIG_CPU_FREQ_GOV_COMMON=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_IDLE_MULTIPLE_DRIVERS=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THERMAL=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CRC8=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_DEV_QCOM_RNG=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_GPIO=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DEVFREQ_GOV_PASSIVE=y
+# CONFIG_DEVFREQ_GOV_PERFORMANCE is not set
+# CONFIG_DEVFREQ_GOV_POWERSAVE is not set
+# CONFIG_DEVFREQ_GOV_SIMPLE_ONDEMAND is not set
+# CONFIG_DEVFREQ_GOV_USERSPACE is not set
+# CONFIG_DEVFREQ_THERMAL is not set
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DTC=y
+CONFIG_DT_IDLE_STATES=y
+# CONFIG_DWMAC_GENERIC is not set
+CONFIG_DWMAC_IPQ806X=y
+# CONFIG_DWMAC_QCOM_ETHQOS is not set
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GRO_CELLS=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HAVE_SMP=y
+CONFIG_HIGHMEM=y
+# CONFIG_HIGHPTE is not set
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HWMON=y
+CONFIG_HWSPINLOCK=y
+CONFIG_HWSPINLOCK_QCOM=y
+CONFIG_HW_RANDOM=y
+CONFIG_HZ_FIXED=0
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_HELPER_AUTO=y
+# CONFIG_I2C_QCOM_CCI is not set
+CONFIG_I2C_QUP=y
+CONFIG_INITRAMFS_SOURCE=""
+# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
+# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
+CONFIG_IOMMU_SUPPORT=y
+# CONFIG_IPQ_APSS_PLL is not set
+# CONFIG_IPQ_GCC_4019 is not set
+# CONFIG_IPQ_GCC_6018 is not set
+CONFIG_IPQ_GCC_806X=y
+# CONFIG_IPQ_GCC_8074 is not set
+# CONFIG_IPQ_LCC_806X is not set
+CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_KMAP_LOCAL=y
+CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
+CONFIG_KPSS_XCC=y
+CONFIG_KRAITCC=y
+CONFIG_KRAIT_CLOCKS=y
+CONFIG_KRAIT_L2_ACCESSORS=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MDIO_GPIO=y
+CONFIG_MDIO_IPQ8064=y
+# CONFIG_MDM_GCC_9615 is not set
+# CONFIG_MDM_LCC_9615 is not set
+CONFIG_MEMFD_CREATE=y
+# CONFIG_MFD_HI6421_SPMI is not set
+CONFIG_MFD_QCOM_RPM=y
+# CONFIG_MFD_SPMI_PMIC is not set
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_ARMMMCI=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_BLOCK_MINORS=16
+CONFIG_MMC_CQHCI=y
+CONFIG_MMC_QCOM_DML=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_IO_ACCESSORS=y
+CONFIG_MMC_SDHCI_MSM=y
+# CONFIG_MMC_SDHCI_PCI is not set
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MSM_GCC_8660=y
+# CONFIG_MSM_GCC_8909 is not set
+# CONFIG_MSM_GCC_8916 is not set
+# CONFIG_MSM_GCC_8939 is not set
+# CONFIG_MSM_GCC_8960 is not set
+# CONFIG_MSM_GCC_8974 is not set
+# CONFIG_MSM_GCC_8976 is not set
+# CONFIG_MSM_GCC_8994 is not set
+# CONFIG_MSM_GCC_8996 is not set
+# CONFIG_MSM_GCC_8998 is not set
+# CONFIG_MSM_GPUCC_8998 is not set
+# CONFIG_MSM_IOMMU is not set
+# CONFIG_MSM_LCC_8960 is not set
+# CONFIG_MSM_MMCC_8960 is not set
+# CONFIG_MSM_MMCC_8974 is not set
+# CONFIG_MSM_MMCC_8996 is not set
+# CONFIG_MSM_MMCC_8998 is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+CONFIG_MTD_NAND_QCOM=y
+CONFIG_MTD_QCOMSMEM_PARTS=y
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEON=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_QCA8K=y
+CONFIG_NET_DSA_QCA8K_LEDS_SUPPORT=y
+CONFIG_NET_DSA_TAG_QCA=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NLS=y
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=2
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_NVMEM_QCOM_QFPROM=y
+# CONFIG_NVMEM_QCOM_SEC_QFPROM is not set
+# CONFIG_NVMEM_SPMI_SDAM is not set
+CONFIG_NVMEM_SYSFS=y
+CONFIG_NVMEM_U_BOOT_ENV=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_DW=y
+CONFIG_PCIE_DW_HOST=y
+CONFIG_PCIE_QCOM=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PCS_XPCS=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+CONFIG_PHYLINK=y
+# CONFIG_PHY_QCOM_APQ8064_SATA is not set
+# CONFIG_PHY_QCOM_EDP is not set
+# CONFIG_PHY_QCOM_IPQ4019_USB is not set
+CONFIG_PHY_QCOM_IPQ806X_SATA=y
+# CONFIG_PHY_QCOM_IPQ806X_USB is not set
+# CONFIG_PHY_QCOM_PCIE2 is not set
+# CONFIG_PHY_QCOM_QMP is not set
+# CONFIG_PHY_QCOM_QUSB2 is not set
+# CONFIG_PHY_QCOM_USB_HS_28NM is not set
+# CONFIG_PHY_QCOM_USB_SNPS_FEMTO_V2 is not set
+# CONFIG_PHY_QCOM_USB_SS is not set
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_APQ8064 is not set
+# CONFIG_PINCTRL_APQ8084 is not set
+# CONFIG_PINCTRL_IPQ4019 is not set
+CONFIG_PINCTRL_IPQ8064=y
+# CONFIG_PINCTRL_MDM9615 is not set
+CONFIG_PINCTRL_MSM=y
+# CONFIG_PINCTRL_MSM8226 is not set
+# CONFIG_PINCTRL_MSM8660 is not set
+# CONFIG_PINCTRL_MSM8909 is not set
+# CONFIG_PINCTRL_MSM8916 is not set
+# CONFIG_PINCTRL_MSM8960 is not set
+# CONFIG_PINCTRL_QCOM_SPMI_PMIC is not set
+# CONFIG_PINCTRL_QCOM_SSBI_PMIC is not set
+# CONFIG_PINCTRL_SDX65 is not set
+CONFIG_PM_DEVFREQ=y
+# CONFIG_PM_DEVFREQ_EVENT is not set
+CONFIG_PM_OPP=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_MSM=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PRINTK_TIME=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_QCA83XX_PHY=y
+# CONFIG_QCM_DISPCC_2290 is not set
+# CONFIG_QCM_GCC_2290 is not set
+# CONFIG_QCOM_A53PLL is not set
+CONFIG_QCOM_ADM=y
+CONFIG_QCOM_BAM_DMA=y
+CONFIG_QCOM_CLK_RPM=y
+# CONFIG_QCOM_COMMAND_DB is not set
+# CONFIG_QCOM_CPR is not set
+# CONFIG_QCOM_EBI2 is not set
+# CONFIG_QCOM_GENI_SE is not set
+CONFIG_QCOM_GSBI=y
+CONFIG_QCOM_HFPLL=y
+# CONFIG_QCOM_ICC_BWMON is not set
+# CONFIG_QCOM_IOMMU is not set
+# CONFIG_QCOM_LLCC is not set
+CONFIG_QCOM_NET_PHYLIB=y
+# CONFIG_QCOM_OCMEM is not set
+# CONFIG_QCOM_PDC is not set
+# CONFIG_QCOM_RMTFS_MEM is not set
+CONFIG_QCOM_RPMCC=y
+# CONFIG_QCOM_RPMH is not set
+CONFIG_QCOM_SCM=y
+# CONFIG_QCOM_SCM_DOWNLOAD_MODE_DEFAULT is not set
+CONFIG_QCOM_SMEM=y
+# CONFIG_QCOM_SMSM is not set
+CONFIG_QCOM_SOCINFO=y
+CONFIG_QCOM_SPM=y
+# CONFIG_QCOM_STATS is not set
+CONFIG_QCOM_TCSR=y
+CONFIG_QCOM_TSENS=y
+CONFIG_QCOM_WDT=y
+# CONFIG_QCS_GCC_404 is not set
+# CONFIG_QCS_Q6SSTOP_404 is not set
+# CONFIG_QCS_TURING_404 is not set
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+CONFIG_RCU_CPU_STALL_TIMEOUT=21
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+# CONFIG_REGULATOR_QCOM_LABIBB is not set
+CONFIG_REGULATOR_QCOM_RPM=y
+# CONFIG_REGULATOR_QCOM_SPMI is not set
+# CONFIG_REGULATOR_QCOM_USB_VBUS is not set
+# CONFIG_REGULATOR_VQMMC_IPQ4019 is not set
+CONFIG_RESET_CONTROLLER=y
+# CONFIG_RESET_QCOM_AOSS is not set
+# CONFIG_RESET_QCOM_PDC is not set
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+# CONFIG_SC_CAMCC_7280 is not set
+# CONFIG_SC_DISPCC_7180 is not set
+# CONFIG_SC_GCC_7180 is not set
+# CONFIG_SC_GCC_8280XP is not set
+# CONFIG_SC_GPUCC_7180 is not set
+# CONFIG_SC_LPASSCC_7280 is not set
+# CONFIG_SC_LPASS_CORECC_7180 is not set
+# CONFIG_SC_LPASS_CORECC_7280 is not set
+# CONFIG_SC_MSS_7180 is not set
+# CONFIG_SC_VIDEOCC_7180 is not set
+# CONFIG_SDM_CAMCC_845 is not set
+# CONFIG_SDM_DISPCC_845 is not set
+# CONFIG_SDM_GCC_660 is not set
+# CONFIG_SDM_GCC_845 is not set
+# CONFIG_SDM_GPUCC_845 is not set
+# CONFIG_SDM_LPASSCC_845 is not set
+# CONFIG_SDM_VIDEOCC_845 is not set
+# CONFIG_SDX_GCC_65 is not set
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_MSM=y
+CONFIG_SERIAL_MSM_CONSOLE=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+# CONFIG_SM_CAMCC_8450 is not set
+# CONFIG_SM_GCC_8150 is not set
+# CONFIG_SM_GCC_8250 is not set
+# CONFIG_SM_GCC_8450 is not set
+# CONFIG_SM_GPUCC_6350 is not set
+# CONFIG_SM_GPUCC_8150 is not set
+# CONFIG_SM_GPUCC_8250 is not set
+# CONFIG_SM_GPUCC_8350 is not set
+# CONFIG_SM_VIDEOCC_8150 is not set
+# CONFIG_SM_VIDEOCC_8250 is not set
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOC_BUS=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_QUP=y
+CONFIG_SPMI=y
+# CONFIG_SPMI_HISI3670 is not set
+CONFIG_SPMI_MSM_PMIC_ARB=y
+# CONFIG_SPMI_PMIC_CLKDIV is not set
+CONFIG_SRCU=y
+CONFIG_STMMAC_ETH=y
+CONFIG_STMMAC_PLATFORM=y
+CONFIG_SWPHY=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_UBIFS_FS=y
+CONFIG_UBIFS_FS_ADVANCED_COMPR=y
+# CONFIG_UCLAMP_TASK is not set
+CONFIG_UEVENT_HELPER_PATH=""
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_ZBOOT_ROM_TEXT=0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/ipq806x/patches-6.1/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch b/target/linux/ipq806x/patches-6.1/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch
new file mode 100644
index 0000000000..9395f1b241
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/001-v6.2-clk-qcom-kpss-xcc-register-it-as-clk-provider.patch
@@ -0,0 +1,60 @@
+From 09be1a39e685d8c5edd471fd1cac9a8f8280d2de Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 8 Nov 2022 22:17:34 +0100
+Subject: [PATCH] clk: qcom: kpss-xcc: register it as clk provider
+
+krait-cc use this driver for the secondary mux. Register it as a clk
+provider to correctly use this clk in other drivers.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+Link: https://lore.kernel.org/r/20221108211734.3707-1-ansuelsmth at gmail.com
+---
+ drivers/clk/qcom/kpss-xcc.c | 13 +++++++++----
+ 1 file changed, 9 insertions(+), 4 deletions(-)
+
+--- a/drivers/clk/qcom/kpss-xcc.c
++++ b/drivers/clk/qcom/kpss-xcc.c
+@@ -31,12 +31,13 @@ MODULE_DEVICE_TABLE(of, kpss_xcc_match_t
+ 
+ static int kpss_xcc_driver_probe(struct platform_device *pdev)
+ {
++	struct device *dev = &pdev->dev;
+ 	const struct of_device_id *id;
+ 	void __iomem *base;
+ 	struct clk_hw *hw;
+ 	const char *name;
+ 
+-	id = of_match_device(kpss_xcc_match_table, &pdev->dev);
++	id = of_match_device(kpss_xcc_match_table, dev);
+ 	if (!id)
+ 		return -ENODEV;
+ 
+@@ -45,7 +46,7 @@ static int kpss_xcc_driver_probe(struct
+ 		return PTR_ERR(base);
+ 
+ 	if (id->data) {
+-		if (of_property_read_string_index(pdev->dev.of_node,
++		if (of_property_read_string_index(dev->of_node,
+ 						  "clock-output-names",
+ 						  0, &name))
+ 			return -ENODEV;
+@@ -55,12 +56,16 @@ static int kpss_xcc_driver_probe(struct
+ 		base += 0x28;
+ 	}
+ 
+-	hw = devm_clk_hw_register_mux_parent_data_table(&pdev->dev, name, aux_parents,
++	hw = devm_clk_hw_register_mux_parent_data_table(dev, name, aux_parents,
+ 							ARRAY_SIZE(aux_parents), 0,
+ 							base, 0, 0x3,
+ 							0, aux_parent_map, NULL);
++	if (IS_ERR(hw))
++		return PTR_ERR(hw);
+ 
+-	return PTR_ERR_OR_ZERO(hw);
++	of_clk_add_hw_provider(dev->of_node, of_clk_hw_simple_get, hw);
++
++	return 0;
+ }
+ 
+ static struct platform_driver kpss_xcc_driver = {
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch
new file mode 100644
index 0000000000..65c1fc17f2
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/002-v6.2-01-clk-qcom-krait-cc-use-devm-variant-for-clk-notifier-.patch
@@ -0,0 +1,27 @@
+From 3198106a99e73dbc4c02bd5128cec0997c73af82 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 8 Nov 2022 22:58:27 +0100
+Subject: [PATCH 1/6] clk: qcom: krait-cc: use devm variant for clk notifier
+ register
+
+Use devm variant for clk notifier register and correctly handle free
+resource on driver remove.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+Link: https://lore.kernel.org/r/20221108215827.30475-1-ansuelsmth at gmail.com
+---
+ drivers/clk/qcom/krait-cc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -62,7 +62,7 @@ static int krait_notifier_register(struc
+ 	int ret = 0;
+ 
+ 	mux->clk_nb.notifier_call = krait_notifier_cb;
+-	ret = clk_notifier_register(clk, &mux->clk_nb);
++	ret = devm_clk_notifier_register(dev, clk, &mux->clk_nb);
+ 	if (ret)
+ 		dev_err(dev, "failed to register clock notifier: %d\n", ret);
+ 
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch
new file mode 100644
index 0000000000..2dcb69399c
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/002-v6.2-02-clk-qcom-krait-cc-fix-wrong-parent-order-for-seconda.patch
@@ -0,0 +1,46 @@
+From 8e456411abcbf899c04740b9dbb3dcefcd61c946 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 9 Nov 2022 01:56:27 +0100
+Subject: [PATCH 2/6] clk: qcom: krait-cc: fix wrong parent order for secondary
+ mux
+
+The secondary mux parent order is swapped.
+This currently doesn't cause problems as the secondary mux is used for idle
+clk and as a safe clk source while reprogramming the hfpll.
+
+Each mux have 2 or more output but he always have a safe source to
+switch while reprogramming the connected pll. We use a clk notifier to
+switch to the correct parent before clk core can apply the correct rate.
+The parent to switch is hardcoded in the mux struct.
+
+For the secondary mux the safe source to use is the qsb parent as it's
+the only fixed clk as the acpus_aux is a pll that can source from pxo or
+from pll8.
+
+The hardcoded safe parent for the secondary mux is set to index 0 that
+in the secondary mux map is set to 2.
+
+But the index 0 is actually acpu_aux in the parent list.
+
+Fix the swapped parents to correctly handle idle frequency and output a
+sane clk_summary report.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+Link: https://lore.kernel.org/r/20221109005631.3189-1-ansuelsmth at gmail.com
+---
+ drivers/clk/qcom/krait-cc.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -116,8 +116,8 @@ krait_add_sec_mux(struct device *dev, in
+ 	int ret;
+ 	struct krait_mux_clk *mux;
+ 	static const char *sec_mux_list[] = {
+-		"acpu_aux",
+ 		"qsb",
++		"acpu_aux",
+ 	};
+ 	struct clk_init_data init = {
+ 		.parent_names = sec_mux_list,
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch
new file mode 100644
index 0000000000..6261a940d7
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/002-v6.2-03-clk-qcom-krait-cc-also-enable-secondary-mux-and-div-.patch
@@ -0,0 +1,68 @@
+From 18ae57b1e8abee6c453381470f6e18991d2901a8 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 9 Nov 2022 01:56:28 +0100
+Subject: [PATCH 3/6] clk: qcom: krait-cc: also enable secondary mux and div
+ clk
+
+clk-krait ignore any rate change if clk is not flagged as enabled.
+Correctly enable the secondary mux and div clk to correctly change rate
+instead of silently ignoring the request.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+Link: https://lore.kernel.org/r/20221109005631.3189-2-ansuelsmth at gmail.com
+---
+ drivers/clk/qcom/krait-cc.c | 21 ++++++++++++++++++++-
+ 1 file changed, 20 insertions(+), 1 deletion(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -80,6 +80,7 @@ krait_add_div(struct device *dev, int id
+ 	};
+ 	const char *p_names[1];
+ 	struct clk *clk;
++	int cpu;
+ 
+ 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
+ 	if (!div)
+@@ -103,6 +104,17 @@ krait_add_div(struct device *dev, int id
+ 	}
+ 
+ 	clk = devm_clk_register(dev, &div->hw);
++	if (IS_ERR(clk))
++		goto err;
++
++	/* clk-krait ignore any rate change if mux is not flagged as enabled */
++	if (id < 0)
++		for_each_online_cpu(cpu)
++			clk_prepare_enable(div->hw.clk);
++	else
++		clk_prepare_enable(div->hw.clk);
++
++err:
+ 	kfree(p_names[0]);
+ 	kfree(init.name);
+ 
+@@ -113,7 +125,7 @@ static int
+ krait_add_sec_mux(struct device *dev, int id, const char *s,
+ 		  unsigned int offset, bool unique_aux)
+ {
+-	int ret;
++	int cpu, ret;
+ 	struct krait_mux_clk *mux;
+ 	static const char *sec_mux_list[] = {
+ 		"qsb",
+@@ -165,6 +177,13 @@ krait_add_sec_mux(struct device *dev, in
+ 	if (ret)
+ 		goto unique_aux;
+ 
++	/* clk-krait ignore any rate change if mux is not flagged as enabled */
++	if (id < 0)
++		for_each_online_cpu(cpu)
++			clk_prepare_enable(mux->hw.clk);
++	else
++		clk_prepare_enable(mux->hw.clk);
++
+ unique_aux:
+ 	if (unique_aux)
+ 		kfree(sec_mux_list[0]);
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch
new file mode 100644
index 0000000000..fabb299f42
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/002-v6.2-04-clk-qcom-krait-cc-handle-secondary-mux-sourcing-out-.patch
@@ -0,0 +1,48 @@
+From e5dc1a4c01510da8438dddfdf4200b79d73990dc Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 9 Nov 2022 01:56:29 +0100
+Subject: [PATCH 4/6] clk: qcom: krait-cc: handle secondary mux sourcing out of
+ acpu_aux
+
+Some bootloader may leave the system in an even more undefined state
+with the secondary mux of L2 or other cores sourcing out of the acpu_aux
+parent. This results in the clk set to the PXO rate or a PLL8 rate.
+
+The current logic to reset the mux and set them to a defined state only
+handle if the mux are configured to source out of QSB. Change this and
+force a new and defined state if the current clk is lower than the aux
+rate. This way we can handle any wrong configuration where the mux is
+sourcing out of QSB (rate 225MHz, currently set to a virtual rate of 1),
+PXO rate (rate 25MHz) or PLL8 (needs to be configured to run at 384Mhz).
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+Link: https://lore.kernel.org/r/20221109005631.3189-3-ansuelsmth at gmail.com
+---
+ drivers/clk/qcom/krait-cc.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -383,8 +383,8 @@ static int krait_cc_probe(struct platfor
+ 	 */
+ 	cur_rate = clk_get_rate(l2_pri_mux_clk);
+ 	aux_rate = 384000000;
+-	if (cur_rate == 1) {
+-		pr_info("L2 @ QSB rate. Forcing new rate.\n");
++	if (cur_rate < aux_rate) {
++		pr_info("L2 @ Undefined rate. Forcing new rate.\n");
+ 		cur_rate = aux_rate;
+ 	}
+ 	clk_set_rate(l2_pri_mux_clk, aux_rate);
+@@ -394,8 +394,8 @@ static int krait_cc_probe(struct platfor
+ 	for_each_possible_cpu(cpu) {
+ 		clk = clks[cpu];
+ 		cur_rate = clk_get_rate(clk);
+-		if (cur_rate == 1) {
+-			pr_info("CPU%d @ QSB rate. Forcing new rate.\n", cpu);
++		if (cur_rate < aux_rate) {
++			pr_info("CPU%d @ Undefined rate. Forcing new rate.\n", cpu);
+ 			cur_rate = aux_rate;
+ 		}
+ 
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch
new file mode 100644
index 0000000000..049b1fa49f
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/002-v6.2-05-clk-qcom-krait-cc-convert-to-devm_clk_hw_register.patch
@@ -0,0 +1,104 @@
+From 8ea9fb841a7e528bc8ae79d726ce951dcf7b46e2 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 9 Nov 2022 01:56:30 +0100
+Subject: [PATCH 5/6] clk: qcom: krait-cc: convert to devm_clk_hw_register
+
+clk_register is now deprecated. Convert the driver to devm_clk_hw_register.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+Link: https://lore.kernel.org/r/20221109005631.3189-4-ansuelsmth at gmail.com
+---
+ drivers/clk/qcom/krait-cc.c | 31 +++++++++++++++++++------------
+ 1 file changed, 19 insertions(+), 12 deletions(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -79,8 +79,7 @@ krait_add_div(struct device *dev, int id
+ 		.flags = CLK_SET_RATE_PARENT,
+ 	};
+ 	const char *p_names[1];
+-	struct clk *clk;
+-	int cpu;
++	int cpu, ret;
+ 
+ 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
+ 	if (!div)
+@@ -103,8 +102,8 @@ krait_add_div(struct device *dev, int id
+ 		return -ENOMEM;
+ 	}
+ 
+-	clk = devm_clk_register(dev, &div->hw);
+-	if (IS_ERR(clk))
++	ret = devm_clk_hw_register(dev, &div->hw);
++	if (ret)
+ 		goto err;
+ 
+ 	/* clk-krait ignore any rate change if mux is not flagged as enabled */
+@@ -118,7 +117,7 @@ err:
+ 	kfree(p_names[0]);
+ 	kfree(init.name);
+ 
+-	return PTR_ERR_OR_ZERO(clk);
++	return ret;
+ }
+ 
+ static int
+@@ -137,7 +136,6 @@ krait_add_sec_mux(struct device *dev, in
+ 		.ops = &krait_mux_clk_ops,
+ 		.flags = CLK_SET_RATE_PARENT,
+ 	};
+-	struct clk *clk;
+ 
+ 	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
+ 	if (!mux)
+@@ -166,14 +164,16 @@ krait_add_sec_mux(struct device *dev, in
+ 	if (unique_aux) {
+ 		sec_mux_list[0] = kasprintf(GFP_KERNEL, "acpu%s_aux", s);
+ 		if (!sec_mux_list[0]) {
+-			clk = ERR_PTR(-ENOMEM);
++			ret = -ENOMEM;
+ 			goto err_aux;
+ 		}
+ 	}
+ 
+-	clk = devm_clk_register(dev, &mux->hw);
++	ret = devm_clk_hw_register(dev, &mux->hw);
++	if (ret)
++		goto unique_aux;
+ 
+-	ret = krait_notifier_register(dev, clk, mux);
++	ret = krait_notifier_register(dev, mux->hw.clk, mux);
+ 	if (ret)
+ 		goto unique_aux;
+ 
+@@ -189,7 +189,7 @@ unique_aux:
+ 		kfree(sec_mux_list[0]);
+ err_aux:
+ 	kfree(init.name);
+-	return PTR_ERR_OR_ZERO(clk);
++	return ret;
+ }
+ 
+ static struct clk *
+@@ -241,11 +241,18 @@ krait_add_pri_mux(struct device *dev, in
+ 		goto err_p2;
+ 	}
+ 
+-	clk = devm_clk_register(dev, &mux->hw);
++	ret = devm_clk_hw_register(dev, &mux->hw);
++	if (ret) {
++		clk = ERR_PTR(ret);
++		goto err_p3;
++	}
++
++	clk = mux->hw.clk;
+ 
+ 	ret = krait_notifier_register(dev, clk, mux);
+ 	if (ret)
+-		goto err_p3;
++		clk = ERR_PTR(ret);
++
+ err_p3:
+ 	kfree(p_names[2]);
+ err_p2:
diff --git a/target/linux/ipq806x/patches-6.1/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch b/target/linux/ipq806x/patches-6.1/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch
new file mode 100644
index 0000000000..453a37dfc0
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/002-v6.2-06-clk-qcom-krait-cc-convert-to-parent_data-API.patch
@@ -0,0 +1,414 @@
+From 56a655e1c41a86445cf2de656649ad93424b2a63 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 9 Nov 2022 01:56:31 +0100
+Subject: [PATCH 6/6] clk: qcom: krait-cc: convert to parent_data API
+
+Modernize the krait-cc driver to parent-data API and refactor to drop
+any use of parent_names. From Documentation all the required clocks should
+be declared in DTS so fw_name can be correctly used to get the parents
+for all the muxes. .name is also declared to save compatibility with old
+DT.
+
+While at it also drop some hardcoded index and introduce an enum to make
+index values more clear.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+Link: https://lore.kernel.org/r/20221109005631.3189-5-ansuelsmth at gmail.com
+---
+ drivers/clk/qcom/krait-cc.c | 202 ++++++++++++++++++++----------------
+ 1 file changed, 112 insertions(+), 90 deletions(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -15,6 +15,16 @@
+ 
+ #include "clk-krait.h"
+ 
++enum {
++	cpu0_mux = 0,
++	cpu1_mux,
++	cpu2_mux,
++	cpu3_mux,
++	l2_mux,
++
++	clks_max,
++};
++
+ static unsigned int sec_mux_map[] = {
+ 	2,
+ 	0,
+@@ -69,21 +79,23 @@ static int krait_notifier_register(struc
+ 	return ret;
+ }
+ 
+-static int
++static struct clk_hw *
+ krait_add_div(struct device *dev, int id, const char *s, unsigned int offset)
+ {
+ 	struct krait_div2_clk *div;
++	static struct clk_parent_data p_data[1];
+ 	struct clk_init_data init = {
+-		.num_parents = 1,
++		.num_parents = ARRAY_SIZE(p_data),
+ 		.ops = &krait_div2_clk_ops,
+ 		.flags = CLK_SET_RATE_PARENT,
+ 	};
+-	const char *p_names[1];
++	struct clk_hw *clk;
++	char *parent_name;
+ 	int cpu, ret;
+ 
+ 	div = devm_kzalloc(dev, sizeof(*div), GFP_KERNEL);
+ 	if (!div)
+-		return -ENOMEM;
++		return ERR_PTR(-ENOMEM);
+ 
+ 	div->width = 2;
+ 	div->shift = 6;
+@@ -93,18 +105,25 @@ krait_add_div(struct device *dev, int id
+ 
+ 	init.name = kasprintf(GFP_KERNEL, "hfpll%s_div", s);
+ 	if (!init.name)
+-		return -ENOMEM;
++		return ERR_PTR(-ENOMEM);
+ 
+-	init.parent_names = p_names;
+-	p_names[0] = kasprintf(GFP_KERNEL, "hfpll%s", s);
+-	if (!p_names[0]) {
+-		kfree(init.name);
+-		return -ENOMEM;
++	init.parent_data = p_data;
++	parent_name = kasprintf(GFP_KERNEL, "hfpll%s", s);
++	if (!parent_name) {
++		clk = ERR_PTR(-ENOMEM);
++		goto err_parent_name;
+ 	}
+ 
++	p_data[0].fw_name = parent_name;
++	p_data[0].name = parent_name;
++
+ 	ret = devm_clk_hw_register(dev, &div->hw);
+-	if (ret)
+-		goto err;
++	if (ret) {
++		clk = ERR_PTR(ret);
++		goto err_clk;
++	}
++
++	clk = &div->hw;
+ 
+ 	/* clk-krait ignore any rate change if mux is not flagged as enabled */
+ 	if (id < 0)
+@@ -113,33 +132,36 @@ krait_add_div(struct device *dev, int id
+ 	else
+ 		clk_prepare_enable(div->hw.clk);
+ 
+-err:
+-	kfree(p_names[0]);
++err_clk:
++	kfree(parent_name);
++err_parent_name:
+ 	kfree(init.name);
+ 
+-	return ret;
++	return clk;
+ }
+ 
+-static int
++static struct clk_hw *
+ krait_add_sec_mux(struct device *dev, int id, const char *s,
+ 		  unsigned int offset, bool unique_aux)
+ {
+ 	int cpu, ret;
+ 	struct krait_mux_clk *mux;
+-	static const char *sec_mux_list[] = {
+-		"qsb",
+-		"acpu_aux",
++	static struct clk_parent_data sec_mux_list[2] = {
++		{ .name = "qsb", .fw_name = "qsb" },
++		{},
+ 	};
+ 	struct clk_init_data init = {
+-		.parent_names = sec_mux_list,
++		.parent_data = sec_mux_list,
+ 		.num_parents = ARRAY_SIZE(sec_mux_list),
+ 		.ops = &krait_mux_clk_ops,
+ 		.flags = CLK_SET_RATE_PARENT,
+ 	};
++	struct clk_hw *clk;
++	char *parent_name;
+ 
+ 	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
+ 	if (!mux)
+-		return -ENOMEM;
++		return ERR_PTR(-ENOMEM);
+ 
+ 	mux->offset = offset;
+ 	mux->lpl = id >= 0;
+@@ -159,23 +181,33 @@ krait_add_sec_mux(struct device *dev, in
+ 
+ 	init.name = kasprintf(GFP_KERNEL, "krait%s_sec_mux", s);
+ 	if (!init.name)
+-		return -ENOMEM;
++		return ERR_PTR(-ENOMEM);
+ 
+ 	if (unique_aux) {
+-		sec_mux_list[0] = kasprintf(GFP_KERNEL, "acpu%s_aux", s);
+-		if (!sec_mux_list[0]) {
+-			ret = -ENOMEM;
++		parent_name = kasprintf(GFP_KERNEL, "acpu%s_aux", s);
++		if (!parent_name) {
++			clk = ERR_PTR(-ENOMEM);
+ 			goto err_aux;
+ 		}
++		sec_mux_list[1].fw_name = parent_name;
++		sec_mux_list[1].name = parent_name;
++	} else {
++		sec_mux_list[1].name = "apu_aux";
+ 	}
+ 
+ 	ret = devm_clk_hw_register(dev, &mux->hw);
+-	if (ret)
+-		goto unique_aux;
++	if (ret) {
++		clk = ERR_PTR(ret);
++		goto err_clk;
++	}
++
++	clk = &mux->hw;
+ 
+ 	ret = krait_notifier_register(dev, mux->hw.clk, mux);
+-	if (ret)
+-		goto unique_aux;
++	if (ret) {
++		clk = ERR_PTR(ret);
++		goto err_clk;
++	}
+ 
+ 	/* clk-krait ignore any rate change if mux is not flagged as enabled */
+ 	if (id < 0)
+@@ -184,28 +216,29 @@ krait_add_sec_mux(struct device *dev, in
+ 	else
+ 		clk_prepare_enable(mux->hw.clk);
+ 
+-unique_aux:
++err_clk:
+ 	if (unique_aux)
+-		kfree(sec_mux_list[0]);
++		kfree(parent_name);
+ err_aux:
+ 	kfree(init.name);
+-	return ret;
++	return clk;
+ }
+ 
+-static struct clk *
+-krait_add_pri_mux(struct device *dev, int id, const char *s,
+-		  unsigned int offset)
++static struct clk_hw *
++krait_add_pri_mux(struct device *dev, struct clk_hw *hfpll_div, struct clk_hw *sec_mux,
++		  int id, const char *s, unsigned int offset)
+ {
+ 	int ret;
+ 	struct krait_mux_clk *mux;
+-	const char *p_names[3];
++	static struct clk_parent_data p_data[3];
+ 	struct clk_init_data init = {
+-		.parent_names = p_names,
+-		.num_parents = ARRAY_SIZE(p_names),
++		.parent_data = p_data,
++		.num_parents = ARRAY_SIZE(p_data),
+ 		.ops = &krait_mux_clk_ops,
+ 		.flags = CLK_SET_RATE_PARENT,
+ 	};
+-	struct clk *clk;
++	struct clk_hw *clk;
++	char *hfpll_name;
+ 
+ 	mux = devm_kzalloc(dev, sizeof(*mux), GFP_KERNEL);
+ 	if (!mux)
+@@ -223,55 +256,44 @@ krait_add_pri_mux(struct device *dev, in
+ 	if (!init.name)
+ 		return ERR_PTR(-ENOMEM);
+ 
+-	p_names[0] = kasprintf(GFP_KERNEL, "hfpll%s", s);
+-	if (!p_names[0]) {
++	hfpll_name = kasprintf(GFP_KERNEL, "hfpll%s", s);
++	if (!hfpll_name) {
+ 		clk = ERR_PTR(-ENOMEM);
+-		goto err_p0;
++		goto err_hfpll;
+ 	}
+ 
+-	p_names[1] = kasprintf(GFP_KERNEL, "hfpll%s_div", s);
+-	if (!p_names[1]) {
+-		clk = ERR_PTR(-ENOMEM);
+-		goto err_p1;
+-	}
++	p_data[0].fw_name = hfpll_name;
++	p_data[0].name = hfpll_name;
+ 
+-	p_names[2] = kasprintf(GFP_KERNEL, "krait%s_sec_mux", s);
+-	if (!p_names[2]) {
+-		clk = ERR_PTR(-ENOMEM);
+-		goto err_p2;
+-	}
++	p_data[1].hw = hfpll_div;
++	p_data[2].hw = sec_mux;
+ 
+ 	ret = devm_clk_hw_register(dev, &mux->hw);
+ 	if (ret) {
+ 		clk = ERR_PTR(ret);
+-		goto err_p3;
++		goto err_clk;
+ 	}
+ 
+-	clk = mux->hw.clk;
++	clk = &mux->hw;
+ 
+-	ret = krait_notifier_register(dev, clk, mux);
++	ret = krait_notifier_register(dev, mux->hw.clk, mux);
+ 	if (ret)
+ 		clk = ERR_PTR(ret);
+ 
+-err_p3:
+-	kfree(p_names[2]);
+-err_p2:
+-	kfree(p_names[1]);
+-err_p1:
+-	kfree(p_names[0]);
+-err_p0:
++err_clk:
++	kfree(hfpll_name);
++err_hfpll:
+ 	kfree(init.name);
+ 	return clk;
+ }
+ 
+ /* id < 0 for L2, otherwise id == physical CPU number */
+-static struct clk *krait_add_clks(struct device *dev, int id, bool unique_aux)
++static struct clk_hw *krait_add_clks(struct device *dev, int id, bool unique_aux)
+ {
+-	int ret;
++	struct clk_hw *hfpll_div, *sec_mux, *pri_mux;
+ 	unsigned int offset;
+ 	void *p = NULL;
+ 	const char *s;
+-	struct clk *clk;
+ 
+ 	if (id >= 0) {
+ 		offset = 0x4501 + (0x1000 * id);
+@@ -283,22 +305,23 @@ static struct clk *krait_add_clks(struct
+ 		s = "_l2";
+ 	}
+ 
+-	ret = krait_add_div(dev, id, s, offset);
+-	if (ret) {
+-		clk = ERR_PTR(ret);
++	hfpll_div = krait_add_div(dev, id, s, offset);
++	if (IS_ERR(hfpll_div)) {
++		pri_mux = hfpll_div;
+ 		goto err;
+ 	}
+ 
+-	ret = krait_add_sec_mux(dev, id, s, offset, unique_aux);
+-	if (ret) {
+-		clk = ERR_PTR(ret);
++	sec_mux = krait_add_sec_mux(dev, id, s, offset, unique_aux);
++	if (IS_ERR(sec_mux)) {
++		pri_mux = sec_mux;
+ 		goto err;
+ 	}
+ 
+-	clk = krait_add_pri_mux(dev, id, s, offset);
++	pri_mux = krait_add_pri_mux(dev, hfpll_div, sec_mux, id, s, offset);
++
+ err:
+ 	kfree(p);
+-	return clk;
++	return pri_mux;
+ }
+ 
+ static struct clk *krait_of_get(struct of_phandle_args *clkspec, void *data)
+@@ -306,7 +329,7 @@ static struct clk *krait_of_get(struct o
+ 	unsigned int idx = clkspec->args[0];
+ 	struct clk **clks = data;
+ 
+-	if (idx >= 5) {
++	if (idx >= clks_max) {
+ 		pr_err("%s: invalid clock index %d\n", __func__, idx);
+ 		return ERR_PTR(-EINVAL);
+ 	}
+@@ -327,9 +350,8 @@ static int krait_cc_probe(struct platfor
+ 	const struct of_device_id *id;
+ 	unsigned long cur_rate, aux_rate;
+ 	int cpu;
+-	struct clk *clk;
+-	struct clk **clks;
+-	struct clk *l2_pri_mux_clk;
++	struct clk_hw *mux, *l2_pri_mux;
++	struct clk *clk, **clks;
+ 
+ 	id = of_match_device(krait_cc_match_table, dev);
+ 	if (!id)
+@@ -348,21 +370,21 @@ static int krait_cc_probe(struct platfor
+ 	}
+ 
+ 	/* Krait configurations have at most 4 CPUs and one L2 */
+-	clks = devm_kcalloc(dev, 5, sizeof(*clks), GFP_KERNEL);
++	clks = devm_kcalloc(dev, clks_max, sizeof(*clks), GFP_KERNEL);
+ 	if (!clks)
+ 		return -ENOMEM;
+ 
+ 	for_each_possible_cpu(cpu) {
+-		clk = krait_add_clks(dev, cpu, id->data);
++		mux = krait_add_clks(dev, cpu, id->data);
+ 		if (IS_ERR(clk))
+ 			return PTR_ERR(clk);
+-		clks[cpu] = clk;
++		clks[cpu] = mux->clk;
+ 	}
+ 
+-	l2_pri_mux_clk = krait_add_clks(dev, -1, id->data);
+-	if (IS_ERR(l2_pri_mux_clk))
+-		return PTR_ERR(l2_pri_mux_clk);
+-	clks[4] = l2_pri_mux_clk;
++	l2_pri_mux = krait_add_clks(dev, -1, id->data);
++	if (IS_ERR(l2_pri_mux))
++		return PTR_ERR(l2_pri_mux);
++	clks[l2_mux] = l2_pri_mux->clk;
+ 
+ 	/*
+ 	 * We don't want the CPU or L2 clocks to be turned off at late init
+@@ -372,7 +394,7 @@ static int krait_cc_probe(struct platfor
+ 	 * they take over.
+ 	 */
+ 	for_each_online_cpu(cpu) {
+-		clk_prepare_enable(l2_pri_mux_clk);
++		clk_prepare_enable(clks[l2_mux]);
+ 		WARN(clk_prepare_enable(clks[cpu]),
+ 		     "Unable to turn on CPU%d clock", cpu);
+ 	}
+@@ -388,16 +410,16 @@ static int krait_cc_probe(struct platfor
+ 	 * two different rates to force a HFPLL reinit under all
+ 	 * circumstances.
+ 	 */
+-	cur_rate = clk_get_rate(l2_pri_mux_clk);
++	cur_rate = clk_get_rate(clks[l2_mux]);
+ 	aux_rate = 384000000;
+ 	if (cur_rate < aux_rate) {
+ 		pr_info("L2 @ Undefined rate. Forcing new rate.\n");
+ 		cur_rate = aux_rate;
+ 	}
+-	clk_set_rate(l2_pri_mux_clk, aux_rate);
+-	clk_set_rate(l2_pri_mux_clk, 2);
+-	clk_set_rate(l2_pri_mux_clk, cur_rate);
+-	pr_info("L2 @ %lu KHz\n", clk_get_rate(l2_pri_mux_clk) / 1000);
++	clk_set_rate(clks[l2_mux], aux_rate);
++	clk_set_rate(clks[l2_mux], 2);
++	clk_set_rate(clks[l2_mux], cur_rate);
++	pr_info("L2 @ %lu KHz\n", clk_get_rate(clks[l2_mux]) / 1000);
+ 	for_each_possible_cpu(cpu) {
+ 		clk = clks[cpu];
+ 		cur_rate = clk_get_rate(clk);
diff --git a/target/linux/ipq806x/patches-6.1/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch b/target/linux/ipq806x/patches-6.1/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch
new file mode 100644
index 0000000000..7e65f4cdff
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/003-v6.2-ARM-dts-qcom-ipq8064-disable-mmc-ddr-1_8v-for-sdcc1.patch
@@ -0,0 +1,28 @@
+From c9713e4ede1e5d044b64fe4d3cbb84223625637f Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 25 Oct 2022 01:38:17 +0200
+Subject: [PATCH] ARM: dts: qcom: ipq8064: disable mmc-ddr-1_8v for sdcc1
+
+It was reported non working mmc with this option enabled.
+Both mmc for ipq8064 are supplied by a fixed 3.3v regulator so mmc can't
+be run at 1.8v.
+Disable it to restore correct functionality of this SoC feature.
+
+Tested-by: Hendrik Koerner <koerhen at web.de>
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Bjorn Andersson <andersson at kernel.org>
+Link: https://lore.kernel.org/r/20221024233817.27410-1-ansuelsmth at gmail.com
+---
+ arch/arm/boot/dts/qcom-ipq8064.dtsi | 1 -
+ 1 file changed, 1 deletion(-)
+
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -756,7 +756,6 @@
+ 				non-removable;
+ 				cap-sd-highspeed;
+ 				cap-mmc-highspeed;
+-				mmc-ddr-1_8v;
+ 				vmmc-supply = <&vsdcc_fixed>;
+ 				dmas = <&sdcc1bam 2>, <&sdcc1bam 1>;
+ 				dma-names = "tx", "rx";
diff --git a/target/linux/ipq806x/patches-6.1/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch b/target/linux/ipq806x/patches-6.1/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch
new file mode 100644
index 0000000000..76df0f5681
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/004-v6.2-01-thermal-drivers-qcom-tsens-Init-debugfs-only-with-su.patch
@@ -0,0 +1,42 @@
+From de48d8766afcd97d147699aaff78a338081c9973 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sat, 22 Oct 2022 14:56:55 +0200
+Subject: [PATCH 1/3] thermal/drivers/qcom/tsens: Init debugfs only with
+ successful probe
+
+Calibrate and tsens_register can fail or PROBE_DEFER. This will cause a
+double or a wrong init of the debugfs information. Init debugfs only
+with successful probe fixing warning about directory already present.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Acked-by: Thara Gopinath <thara.gopinath at linaro.org>
+Link: https://lore.kernel.org/r/20221022125657.22530-2-ansuelsmth at gmail.com
+Signed-off-by: Daniel Lezcano <daniel.lezcano at kernel.org>
+---
+ drivers/thermal/qcom/tsens.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/thermal/qcom/tsens.c
++++ b/drivers/thermal/qcom/tsens.c
+@@ -918,8 +918,6 @@ int __init init_common(struct tsens_priv
+ 	if (tsens_version(priv) >= VER_0_1)
+ 		tsens_enable_irq(priv);
+ 
+-	tsens_debug_init(op);
+-
+ err_put_device:
+ 	put_device(&op->dev);
+ 	return ret;
+@@ -1156,7 +1154,11 @@ static int tsens_probe(struct platform_d
+ 		}
+ 	}
+ 
+-	return tsens_register(priv);
++	ret = tsens_register(priv);
++	if (!ret)
++		tsens_debug_init(pdev);
++
++	return ret;
+ }
+ 
+ static int tsens_remove(struct platform_device *pdev)
diff --git a/target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch b/target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch
new file mode 100644
index 0000000000..10f1e36b58
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/004-v6.2-02-thermal-drivers-qcom-tsens-Fix-wrong-version-id-dbg_.patch
@@ -0,0 +1,29 @@
+From c7e077e921fa94e0c06c8d14af6c0504c8a5f4bd Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sat, 22 Oct 2022 14:56:56 +0200
+Subject: [PATCH 2/3] thermal/drivers/qcom/tsens: Fix wrong version id
+ dbg_version_show
+
+For VER_0 the version was incorrectly reported as 0.1.0.
+
+Fix that and correctly report the major version for this old tsens
+revision.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Link: https://lore.kernel.org/r/20221022125657.22530-3-ansuelsmth at gmail.com
+Signed-off-by: Daniel Lezcano <daniel.lezcano at kernel.org>
+---
+ drivers/thermal/qcom/tsens.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/thermal/qcom/tsens.c
++++ b/drivers/thermal/qcom/tsens.c
+@@ -692,7 +692,7 @@ static int dbg_version_show(struct seq_f
+ 			return ret;
+ 		seq_printf(s, "%d.%d.%d\n", maj_ver, min_ver, step_ver);
+ 	} else {
+-		seq_puts(s, "0.1.0\n");
++		seq_printf(s, "0.%d.0\n", priv->feat->ver_major);
+ 	}
+ 
+ 	return 0;
diff --git a/target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch b/target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch
new file mode 100644
index 0000000000..63cce7974b
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/004-v6.2-03-thermal-drivers-qcom-tsens-Rework-debugfs-file-struc.patch
@@ -0,0 +1,54 @@
+From 89992d95ed1046338c7866ef7bbe6de543a2af91 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sat, 22 Oct 2022 14:56:57 +0200
+Subject: [PATCH 3/3] thermal/drivers/qcom/tsens: Rework debugfs file structure
+
+The current tsens debugfs structure is composed by:
+- a tsens dir in debugfs with a version file
+- a directory for each tsens istance with sensors file to dump all the
+  sensors value.
+
+This works on the assumption that we have the same version for each
+istance but this assumption seems fragile and with more than one tsens
+istance results in the version file not tracking each of them.
+
+A better approach is to just create a subdirectory for each tsens
+istance and put there version and sensors debugfs file.
+
+Using this new implementation results in less code since debugfs entry
+are created only on successful tsens probe.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Link: https://lore.kernel.org/r/20221022125657.22530-4-ansuelsmth at gmail.com
+Signed-off-by: Daniel Lezcano <daniel.lezcano at kernel.org>
+---
+ drivers/thermal/qcom/tsens.c | 13 +++----------
+ 1 file changed, 3 insertions(+), 10 deletions(-)
+
+--- a/drivers/thermal/qcom/tsens.c
++++ b/drivers/thermal/qcom/tsens.c
+@@ -704,21 +704,14 @@ DEFINE_SHOW_ATTRIBUTE(dbg_sensors);
+ static void tsens_debug_init(struct platform_device *pdev)
+ {
+ 	struct tsens_priv *priv = platform_get_drvdata(pdev);
+-	struct dentry *root, *file;
+ 
+-	root = debugfs_lookup("tsens", NULL);
+-	if (!root)
++	priv->debug_root = debugfs_lookup("tsens", NULL);
++	if (!priv->debug_root)
+ 		priv->debug_root = debugfs_create_dir("tsens", NULL);
+-	else
+-		priv->debug_root = root;
+-
+-	file = debugfs_lookup("version", priv->debug_root);
+-	if (!file)
+-		debugfs_create_file("version", 0444, priv->debug_root,
+-				    pdev, &dbg_version_fops);
+ 
+ 	/* A directory for each instance of the TSENS IP */
+ 	priv->debug = debugfs_create_dir(dev_name(&pdev->dev), priv->debug_root);
++	debugfs_create_file("version", 0444, priv->debug, pdev, &dbg_version_fops);
+ 	debugfs_create_file("sensors", 0444, priv->debug, pdev, &dbg_sensors_fops);
+ }
+ #else
diff --git a/target/linux/ipq806x/patches-6.1/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch b/target/linux/ipq806x/patches-6.1/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
new file mode 100644
index 0000000000..e0c195f1ab
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/102-mtd-rootfs-conflicts-with-OpenWrt-auto-mounting.patch
@@ -0,0 +1,25 @@
+From 5001f2e1a325b68dbf225bd17f69a4d3d975cca5 Mon Sep 17 00:00:00 2001
+From: John Crispin <john at phrozen.org>
+Date: Thu, 9 Mar 2017 09:31:44 +0100
+Subject: [PATCH 61/69] mtd: "rootfs" conflicts with OpenWrt auto mounting
+
+Signed-off-by: John Crispin <john at phrozen.org>
+---
+ drivers/mtd/mtdpart.c | 4 ++++
+ 1 file changed, 4 insertions(+)
+
+--- a/drivers/mtd/mtdpart.c
++++ b/drivers/mtd/mtdpart.c
+@@ -51,7 +51,11 @@ static struct mtd_info *allocate_partiti
+ 
+ 	/* allocate the partition structure */
+ 	child = kzalloc(sizeof(*child), GFP_KERNEL);
+-	name = kstrdup(part->name, GFP_KERNEL);
++	/* "rootfs" conflicts with OpenWrt auto mounting */
++	if (mtd_type_is_nand(parent) && !strcmp(part->name, "rootfs"))
++		name = "ubi";
++	else
++		name = kstrdup(part->name, GFP_KERNEL);
+ 	if (!name || !child) {
+ 		printk(KERN_ERR"memory allocation error while creating partitions for \"%s\"\n",
+ 		       parent->name);
diff --git a/target/linux/ipq806x/patches-6.1/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch b/target/linux/ipq806x/patches-6.1/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
new file mode 100644
index 0000000000..0a594b2688
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/107-10-ARM-dts-qcom-add-saw-for-l2-cache-and-kraitcc-for.patch
@@ -0,0 +1,89 @@
+From bef5018abb7cf94efafdc05087b4c998891ae4ec Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Mon, 17 Jan 2022 23:39:34 +0100
+Subject: [PATCH v3 10/18] ARM: dts: qcom: add saw for l2 cache and kraitcc for
+ ipq8064
+
+Add saw compatible for l2 cache and kraitcc node for ipq8064 dtsi.
+Also declare clock-output-names for acc0 and acc1 and qsb fixed clock
+for the secondary mux.
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+Tested-by: Jonathan McDowell <noodles at earth.li>
+---
+ arch/arm/boot/dts/qcom-ipq8064.dtsi | 34 +++++++++++++++++++++++++++--
+ 1 file changed, 32 insertions(+), 2 deletions(-)
+
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -301,6 +301,12 @@
+ 	};
+ 
+ 	clocks {
++		qsb: qsb {
++			compatible = "fixed-clock";
++			clock-frequency = <225000000>;
++			#clock-cells = <0>;
++		};
++
+ 		cxo_board: cxo_board {
+ 			compatible = "fixed-clock";
+ 			#clock-cells = <0>;
+@@ -575,15 +581,30 @@
+ 			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
+ 			clock-names = "pll8_vote", "pxo";
+ 			clock-output-names = "acpu_l2_aux";
++			#clock-cells = <0>;
++		};
++
++		kraitcc: clock-controller {
++			compatible = "qcom,krait-cc-v1";
++			clocks = <&gcc PLL9>, <&gcc PLL10>, <&gcc PLL12>,
++				 <&acc0>, <&acc1>, <&l2cc>, <&qsb>, <&pxo_board>;
++			clock-names = "hfpll0", "hfpll1", "hfpll_l2",
++				      "acpu0_aux", "acpu1_aux", "acpu_l2_aux",
++				      "qsb", "pxo";
++			#clock-cells = <1>;
+ 		};
+ 
+ 		acc0: clock-controller at 2088000 {
+ 			compatible = "qcom,kpss-acc-v1";
+ 			reg = <0x02088000 0x1000>, <0x02008000 0x1000>;
++			clock-output-names = "acpu0_aux";
++			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
++			clock-names = "pll8_vote", "pxo";
++			#clock-cells = <0>;
+ 		};
+ 
+ 		saw0: regulator at 2089000 {
+-			compatible = "qcom,saw2";
++			compatible = "qcom,saw2", "qcom,apq8064-saw2-v1.1-cpu", "syscon";
+ 			reg = <0x02089000 0x1000>, <0x02009000 0x1000>;
+ 			regulator;
+ 		};
+@@ -591,14 +612,24 @@
+ 		acc1: clock-controller at 2098000 {
+ 			compatible = "qcom,kpss-acc-v1";
+ 			reg = <0x02098000 0x1000>, <0x02008000 0x1000>;
++			clock-output-names = "acpu1_aux";
++			clocks = <&gcc PLL8_VOTE>, <&pxo_board>;
++			clock-names = "pll8_vote", "pxo";
++			#clock-cells = <0>;
+ 		};
+ 
+ 		saw1: regulator at 2099000 {
+-			compatible = "qcom,saw2";
++			compatible = "qcom,saw2", "qcom,apq8064-saw2-v1.1-cpu", "syscon";
+ 			reg = <0x02099000 0x1000>, <0x02009000 0x1000>;
+ 			regulator;
+ 		};
+ 
++		saw_l2: regulator at 02012000 {
++			compatible = "qcom,saw2", "syscon";
++			reg = <0x02012000 0x1000>;
++			regulator;
++		};
++
+ 		nss_common: syscon at 03000000 {
+ 			compatible = "syscon";
+ 			reg = <0x03000000 0x0000FFFF>;
diff --git a/target/linux/ipq806x/patches-6.1/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch b/target/linux/ipq806x/patches-6.1/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
new file mode 100644
index 0000000000..16e924b303
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/107-13-ARM-dts-qcom-add-opp-table-for-cpu-and-l2-for-ipq.patch
@@ -0,0 +1,268 @@
+From 076ebb6e1799c4c7a1d2e07510d88b9e9b57b551 Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Tue, 18 Jan 2022 00:03:47 +0100
+Subject: [PATCH v3 13/18] ARM: dts: qcom: add opp table for cpu and l2 for
+ ipq8064
+
+Add opp table for cpu and l2 cache. While the current cpufreq is
+the generic one that doesn't scale the L2 cache, we add the l2
+cache opp anyway for the sake of completeness. This will be handy in the
+future when a dedicated cpufreq driver is introduced for krait cores
+that will correctly scale l2 cache with the core freq.
+
+Opp-level is set based on the logic of
+0: idle level
+1: normal level
+2: turbo level
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+Tested-by: Jonathan McDowell <noodles at earth.li>
+---
+ arch/arm/boot/dts/qcom-ipq8064.dtsi | 99 +++++++++++++++++++++++++++++
+ 1 file changed, 99 insertions(+)
+
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -48,6 +48,105 @@
+ 		};
+ 	};
+ 
++	opp_table_l2: opp_table_l2 {
++		compatible = "operating-points-v2";
++
++		opp-384000000 {
++			opp-hz = /bits/ 64 <384000000>;
++			opp-microvolt = <1100000>;
++			clock-latency-ns = <100000>;
++			opp-level = <0>;
++		};
++
++		opp-1000000000 {
++			opp-hz = /bits/ 64 <1000000000>;
++			opp-microvolt = <1100000>;
++			clock-latency-ns = <100000>;
++			opp-level = <1>;
++		};
++
++		opp-1200000000 {
++			opp-hz = /bits/ 64 <1200000000>;
++			opp-microvolt = <1150000>;
++			clock-latency-ns = <100000>;
++			opp-level = <2>;
++		};
++	};
++
++	opp_table0: opp_table0 {
++		compatible = "operating-points-v2-kryo-cpu";
++		nvmem-cells = <&speedbin_efuse>;
++
++		/*
++		 * Voltage thresholds are <target min max>
++		 */
++		opp-384000000 {
++			opp-hz = /bits/ 64 <384000000>;
++			opp-microvolt-speed0-pvs0-v0 = <1000000 950000 1050000>;
++			opp-microvolt-speed0-pvs1-v0 = <925000 878750 971250>;
++			opp-microvolt-speed0-pvs2-v0 = <875000 831250 918750>;
++			opp-microvolt-speed0-pvs3-v0 = <800000 760000 840000>;
++			opp-supported-hw = <0x1>;
++			clock-latency-ns = <100000>;
++			opp-level = <0>;
++		};
++
++		opp-600000000 {
++			opp-hz = /bits/ 64 <600000000>;
++			opp-microvolt-speed0-pvs0-v0 = <1050000 997500 1102500>;
++			opp-microvolt-speed0-pvs1-v0 = <975000 926250 1023750>;
++			opp-microvolt-speed0-pvs2-v0 = <925000 878750 971250>;
++			opp-microvolt-speed0-pvs3-v0 = <850000 807500 892500>;
++			opp-supported-hw = <0x1>;
++			clock-latency-ns = <100000>;
++			opp-level = <1>;
++		};
++
++		opp-800000000 {
++			opp-hz = /bits/ 64 <800000000>;
++			opp-microvolt-speed0-pvs0-v0 = <1100000 1045000 1155000>;
++			opp-microvolt-speed0-pvs1-v0 = <1025000 973750 1076250>;
++			opp-microvolt-speed0-pvs2-v0 = <995000 945250 1044750>;
++			opp-microvolt-speed0-pvs3-v0 = <900000 855000 945000>;
++			opp-supported-hw = <0x1>;
++			clock-latency-ns = <100000>;
++			opp-level = <1>;
++		};
++
++		opp-1000000000 {
++			opp-hz = /bits/ 64 <1000000000>;
++			opp-microvolt-speed0-pvs0-v0 = <1150000 1092500 1207500>;
++			opp-microvolt-speed0-pvs1-v0 = <1075000 1021250 1128750>;
++			opp-microvolt-speed0-pvs2-v0 = <1025000 973750 1076250>;
++			opp-microvolt-speed0-pvs3-v0 = <950000 902500 997500>;
++			opp-supported-hw = <0x1>;
++			clock-latency-ns = <100000>;
++			opp-level = <1>;
++		};
++
++		opp-1200000000 {
++			opp-hz = /bits/ 64 <1200000000>;
++			opp-microvolt-speed0-pvs0-v0 = <1200000 1140000 1260000>;
++			opp-microvolt-speed0-pvs1-v0 = <1125000 1068750 1181250>;
++			opp-microvolt-speed0-pvs2-v0 = <1075000 1021250 1128750>;
++			opp-microvolt-speed0-pvs3-v0 = <1000000 950000 1050000>;
++			opp-supported-hw = <0x1>;
++			clock-latency-ns = <100000>;
++			opp-level = <2>;
++		};
++
++		opp-1400000000 {
++			opp-hz = /bits/ 64 <1400000000>;
++			opp-microvolt-speed0-pvs0-v0 = <1250000 1187500 1312500>;
++			opp-microvolt-speed0-pvs1-v0 = <1175000 1116250 1233750>;
++			opp-microvolt-speed0-pvs2-v0 = <1125000 1068750 1181250>;
++			opp-microvolt-speed0-pvs3-v0 = <1050000 997500 1102500>;
++			opp-supported-hw = <0x1>;
++			clock-latency-ns = <100000>;
++			opp-level = <2>;
++		};
++	};
++
+ 	thermal-zones {
+ 		sensor0-thermal {
+ 			polling-delay-passive = <0>;
+--- a/arch/arm/boot/dts/qcom-ipq8065.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8065.dtsi
+@@ -6,3 +6,92 @@
+ 	model = "Qualcomm Technologies, Inc. IPQ8065";
+ 	compatible = "qcom,ipq8065", "qcom,ipq8064";
+ };
++
++&opp_table_l2 {
++	/delete-node/opp-1200000000;
++
++	opp-1400000000 {
++		opp-hz = /bits/ 64 <1400000000>;
++		opp-microvolt = <1150000>;
++		clock-latency-ns = <100000>;
++		opp-level = <2>;
++	};
++};
++
++&opp_table0 {
++	/*
++	 * On ipq8065 1.2 ghz freq is not present
++	 * Remove it to make cpufreq work and not
++	 * complain for missing definition
++	 */
++
++	/delete-node/opp-1200000000;
++
++	/*
++	 * Voltage thresholds are <target min max>
++	 */
++	opp-384000000 {
++		opp-microvolt-speed0-pvs0-v0 = <975000 926250 1023750>;
++		opp-microvolt-speed0-pvs1-v0 = <950000 902500 997500>;
++		opp-microvolt-speed0-pvs2-v0 = <925000 878750 971250>;
++		opp-microvolt-speed0-pvs3-v0 = <900000 855000 945000>;
++		opp-microvolt-speed0-pvs4-v0 = <875000 831250 918750>;
++		opp-microvolt-speed0-pvs5-v0 = <825000 783750 866250>;
++		opp-microvolt-speed0-pvs6-v0 = <775000 736250 813750>;
++	};
++
++	opp-600000000 {
++		opp-microvolt-speed0-pvs0-v0 = <1000000 950000 1050000>;
++		opp-microvolt-speed0-pvs1-v0 = <975000 926250 1023750>;
++		opp-microvolt-speed0-pvs2-v0 = <950000 902500 997500>;
++		opp-microvolt-speed0-pvs3-v0 = <925000 878750 971250>;
++		opp-microvolt-speed0-pvs4-v0 = <900000 855000 945000>;
++		opp-microvolt-speed0-pvs5-v0 = <850000 807500 892500>;
++		opp-microvolt-speed0-pvs6-v0 = <800000 760000 840000>;
++	};
++
++	opp-800000000 {
++		opp-microvolt-speed0-pvs0-v0 = <1050000 997500 1102500>;
++		opp-microvolt-speed0-pvs1-v0 = <1025000 973750 1076250>;
++		opp-microvolt-speed0-pvs2-v0 = <1000000 950000 1050000>;
++		opp-microvolt-speed0-pvs3-v0 = <975000 926250 1023750>;
++		opp-microvolt-speed0-pvs4-v0 = <950000 902500 997500>;
++		opp-microvolt-speed0-pvs5-v0 = <900000 855000 945000>;
++		opp-microvolt-speed0-pvs6-v0 = <850000 807500 892500>;
++	};
++
++	opp-1000000000 {
++		opp-microvolt-speed0-pvs0-v0 = <1100000 1045000 1155000>;
++		opp-microvolt-speed0-pvs1-v0 = <1075000 1021250 1128750>;
++		opp-microvolt-speed0-pvs2-v0 = <1050000 997500 1102500>;
++		opp-microvolt-speed0-pvs3-v0 = <1025000 973750 1076250>;
++		opp-microvolt-speed0-pvs4-v0 = <1000000 950000 1050000>;
++		opp-microvolt-speed0-pvs5-v0 = <950000 902500 997500>;
++		opp-microvolt-speed0-pvs6-v0 = <900000 855000 945000>;
++	};
++
++	opp-1400000000 {
++		opp-microvolt-speed0-pvs0-v0 = <1175000 1116250 1233750>;
++		opp-microvolt-speed0-pvs1-v0 = <1150000 1092500 1207500>;
++		opp-microvolt-speed0-pvs2-v0 = <1125000 1068750 1181250>;
++		opp-microvolt-speed0-pvs3-v0 = <1100000 1045000 1155000>;
++		opp-microvolt-speed0-pvs4-v0 = <1075000 1021250 1128750>;
++		opp-microvolt-speed0-pvs5-v0 = <1025000 973750 1076250>;
++		opp-microvolt-speed0-pvs6-v0 = <975000 926250 1023750>;
++		opp-level = <1>;
++	};
++
++	opp-1725000000 {
++		opp-hz = /bits/ 64 <1725000000>;
++		opp-microvolt-speed0-pvs0-v0 = <1262500 1199375 1325625>;
++		opp-microvolt-speed0-pvs1-v0 = <1225000 1163750 1286250>;
++		opp-microvolt-speed0-pvs2-v0 = <1200000 1140000 1260000>;
++		opp-microvolt-speed0-pvs3-v0 = <1175000 1116250 1233750>;
++		opp-microvolt-speed0-pvs4-v0 = <1150000 1092500 1207500>;
++		opp-microvolt-speed0-pvs5-v0 = <1100000 1045000 1155000>;
++		opp-microvolt-speed0-pvs6-v0 = <1050000 997500 1102500>;
++		opp-supported-hw = <0x1>;
++		clock-latency-ns = <100000>;
++		opp-level = <2>;
++	};
++};
+--- a/arch/arm/boot/dts/qcom-ipq8062.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8062.dtsi
+@@ -6,3 +6,39 @@
+ 	model = "Qualcomm Technologies, Inc. IPQ8062";
+ 	compatible = "qcom,ipq8062", "qcom,ipq8064";
+ };
++
++&opp_table0 {
++	/delete-node/opp-1200000000;
++	/delete-node/opp-1400000000;
++
++	/*
++	 * Voltage thresholds are <target min max>
++	 */
++	opp-384000000 {
++		opp-microvolt-speed0-pvs0-v0 = <1000000 950000 1050000>;
++		opp-microvolt-speed0-pvs1-v0 = < 925000 878750  971250>;
++		opp-microvolt-speed0-pvs2-v0 = < 875000 831250  918750>;
++		opp-microvolt-speed0-pvs3-v0 = < 800000 760000  840000>;
++	};
++
++	opp-600000000 {
++		opp-microvolt-speed0-pvs0-v0 = <1050000 997500 1102500>;
++		opp-microvolt-speed0-pvs1-v0 = < 975000 926250 1023750>;
++		opp-microvolt-speed0-pvs2-v0 = < 925000 878750  971250>;
++		opp-microvolt-speed0-pvs3-v0 = < 850000 807500  892500>;
++	};
++
++	opp-800000000 {
++		opp-microvolt-speed0-pvs0-v0 = <1100000 1045000 1155000>;
++		opp-microvolt-speed0-pvs1-v0 = <1025000  973750 1076250>;
++		opp-microvolt-speed0-pvs2-v0 = < 995000  945250 1044750>;
++		opp-microvolt-speed0-pvs3-v0 = < 900000  855000  945000>;
++	};
++
++	opp-1000000000 {
++		opp-microvolt-speed0-pvs0-v0 = <1150000 1092500 1207500>;
++		opp-microvolt-speed0-pvs1-v0 = <1075000 1021250 1128750>;
++		opp-microvolt-speed0-pvs2-v0 = <1025000  973750 1076250>;
++		opp-microvolt-speed0-pvs3-v0 = < 950000  902500  997500>;
++	};
++};
diff --git a/target/linux/ipq806x/patches-6.1/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch b/target/linux/ipq806x/patches-6.1/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
new file mode 100644
index 0000000000..cf27aaa08b
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/107-15-ARM-dts-qcom-add-multiple-missing-binding-for-cpu.patch
@@ -0,0 +1,153 @@
+From 211fc0c0a63c99b68663a27182e643316c2d8cbe Mon Sep 17 00:00:00 2001
+From: Ansuel Smith <ansuelsmth at gmail.com>
+Date: Tue, 18 Jan 2022 00:07:57 +0100
+Subject: [PATCH v3 15/18] ARM: dts: qcom: add multiple missing binding for cpu
+ and l2 for ipq8064
+
+Add multiple binding for cpu node, l2 node and add idle-states
+definition for ipq8064 dtsi.
+
+Signed-off-by: Ansuel Smith <ansuelsmth at gmail.com>
+Tested-by: Jonathan McDowell <noodles at earth.li>
+---
+ arch/arm/boot/dts/qcom-ipq8064.dtsi | 36 +++++++++++++++++++++++++++++
+ 1 file changed, 36 insertions(+)
+
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -30,6 +30,15 @@
+ 			next-level-cache = <&L2>;
+ 			qcom,acc = <&acc0>;
+ 			qcom,saw = <&saw0>;
++			clocks = <&kraitcc 0>, <&kraitcc 4>;
++			clock-names = "cpu", "l2";
++			clock-latency = <100000>;
++			operating-points-v2 = <&opp_table0>;
++			voltage-tolerance = <5>;
++			cooling-min-state = <0>;
++			cooling-max-state = <10>;
++			#cooling-cells = <2>;
++			cpu-idle-states = <&CPU_SPC>;
+ 		};
+ 
+ 		cpu1: cpu at 1 {
+@@ -40,11 +49,35 @@
+ 			next-level-cache = <&L2>;
+ 			qcom,acc = <&acc1>;
+ 			qcom,saw = <&saw1>;
++			clocks = <&kraitcc 1>, <&kraitcc 4>;
++			clock-names = "cpu", "l2";
++			clock-latency = <100000>;
++			operating-points-v2 = <&opp_table0>;
++			voltage-tolerance = <5>;
++			cooling-min-state = <0>;
++			cooling-max-state = <10>;
++			#cooling-cells = <2>;
++			cpu-idle-states = <&CPU_SPC>;
++		};
++
++		idle-states {
++			CPU_SPC: spc {
++				compatible = "qcom,idle-state-spc";
++				status = "disabled";
++				entry-latency-us = <400>;
++				exit-latency-us = <900>;
++				min-residency-us = <3000>;
++			};
+ 		};
+ 
+ 		L2: l2-cache {
+ 			compatible = "cache";
+ 			cache-level = <2>;
++			qcom,saw = <&saw_l2>;
++
++			clocks = <&kraitcc 4>;
++			clock-names = "l2";
++			operating-points-v2 = <&opp_table_l2>;
+ 		};
+ 	};
+ 
+--- a/arch/arm/boot/dts/qcom-ipq8064-smb208.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064-smb208.dtsi
+@@ -2,6 +2,18 @@
+ 
+ #include "qcom-ipq8064.dtsi"
+ 
++&cpu0 {
++	cpu-supply = <&smb208_s2a>;
++};
++
++&cpu1 {
++	cpu-supply = <&smb208_s2b>;
++};
++
++&L2 {
++	l2-supply = <&smb208_s1a>;
++};
++
+ &rpm {
+ 	smb208_regulators: regulators {
+ 		compatible = "qcom,rpm-smb208-regulators";
+--- a/arch/arm/boot/dts/qcom-ipq8064-v2.0-smb208.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064-v2.0-smb208.dtsi
+@@ -2,6 +2,18 @@
+ 
+ #include "qcom-ipq8064-v2.0.dtsi"
+ 
++&cpu0 {
++	cpu-supply = <&smb208_s2a>;
++};
++
++&cpu1 {
++	cpu-supply = <&smb208_s2b>;
++};
++
++&L2 {
++	l2-supply = <&smb208_s1a>;
++};
++
+ &rpm {
+ 	smb208_regulators: regulators {
+ 		compatible = "qcom,rpm-smb208-regulators";
+--- a/arch/arm/boot/dts/qcom-ipq8062-smb208.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8062-smb208.dtsi
+@@ -2,6 +2,18 @@
+ 
+ #include "qcom-ipq8062.dtsi"
+ 
++&cpu0 {
++	cpu-supply = <&smb208_s2a>;
++};
++
++&cpu1 {
++	cpu-supply = <&smb208_s2b>;
++};
++
++&L2 {
++	l2-supply = <&smb208_s1a>;
++};
++
+ &rpm {
+ 	smb208_regulators: regulators {
+ 		compatible = "qcom,rpm-smb208-regulators";
+--- a/arch/arm/boot/dts/qcom-ipq8065-smb208.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8065-smb208.dtsi
+@@ -2,6 +2,18 @@
+ 
+ #include "qcom-ipq8065.dtsi"
+ 
++&cpu0 {
++	cpu-supply = <&smb208_s2a>;
++};
++
++&cpu1 {
++	cpu-supply = <&smb208_s2b>;
++};
++
++&L2 {
++	l2-supply = <&smb208_s1a>;
++};
++
+ &rpm {
+ 	smb208_regulators: regulators {
+ 		compatible = "qcom,rpm-smb208-regulators";
diff --git a/target/linux/ipq806x/patches-6.1/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch b/target/linux/ipq806x/patches-6.1/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
new file mode 100644
index 0000000000..6be9334e7d
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/108-01-ARM-dts-qcom-fix-wrong-nad_pins-definition-for-ipq80.patch
@@ -0,0 +1,29 @@
+From 6c94e0184e56f9e9f1f5d5f54b20758433e498d2 Mon Sep 17 00:00:00 2001
+From: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
+Date: Wed, 15 Jun 2022 16:47:09 +0200
+Subject: [PATCH 1/2] ARM: dts: qcom: fix wrong nad_pins definition for ipq806x
+
+Fix wrong nand_pings definition for bias-disable pins.
+
+Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
+---
+ arch/arm/boot/dts/qcom-ipq8064.dtsi | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -599,12 +599,9 @@
+ 			};
+ 
+ 			nand_pins: nand_pins {
+-				mux {
++				disable {
+ 					pins = "gpio34", "gpio35", "gpio36",
+-					       "gpio37", "gpio38", "gpio39",
+-					       "gpio40", "gpio41", "gpio42",
+-					       "gpio43", "gpio44", "gpio45",
+-					       "gpio46", "gpio47";
++					       "gpio37", "gpio38";
+ 					function = "nand";
+ 					drive-strength = <10>;
+ 					bias-disable;
diff --git a/target/linux/ipq806x/patches-6.1/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch b/target/linux/ipq806x/patches-6.1/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
new file mode 100644
index 0000000000..a35bb3874f
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/108-02-ARM-dts-qcom-add-MDIO-dedicated-controller-node-for-.patch
@@ -0,0 +1,188 @@
+From 504188183408fac0f61b59f5ed8ea1773fe43669 Mon Sep 17 00:00:00 2001
+From: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
+Date: Wed, 15 Jun 2022 16:59:30 +0200
+Subject: [PATCH 2/2] ARM: dts: qcom: add MDIO dedicated controller node for
+ ipq806x
+
+Add MDIO dedicated controller attached to gmac0 and fix rb3011 dts to
+correctly use the new tag.
+
+Signed-off-by: Christian 'Ansuel' Marangi <ansuelsmth at gmail.com>
+---
+ arch/arm/boot/dts/qcom-ipq8064-rb3011.dts | 134 +++++++++++-----------
+ arch/arm/boot/dts/qcom-ipq8064.dtsi       |  14 +++
+ 2 files changed, 81 insertions(+), 67 deletions(-)
+
+--- a/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
++++ b/arch/arm/boot/dts/qcom-ipq8064-rb3011.dts
+@@ -25,73 +25,6 @@
+ 		device_type = "memory";
+ 	};
+ 
+-	mdio0: mdio-0 {
+-		status = "okay";
+-		compatible = "virtual,mdio-gpio";
+-		gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
+-			<&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
+-		#address-cells = <1>;
+-		#size-cells = <0>;
+-
+-		pinctrl-0 = <&mdio0_pins>;
+-		pinctrl-names = "default";
+-
+-		switch0: switch at 10 {
+-			compatible = "qca,qca8337";
+-			#address-cells = <1>;
+-			#size-cells = <0>;
+-
+-			dsa,member = <0 0>;
+-
+-			pinctrl-0 = <&sw0_reset_pin>;
+-			pinctrl-names = "default";
+-
+-			reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
+-			reg = <0x10>;
+-
+-			ports {
+-				#address-cells = <1>;
+-				#size-cells = <0>;
+-
+-				switch0cpu: port at 0 {
+-					reg = <0>;
+-					label = "cpu";
+-					ethernet = <&gmac0>;
+-					phy-mode = "rgmii-id";
+-					fixed-link {
+-						speed = <1000>;
+-						full-duplex;
+-					};
+-				};
+-
+-				port at 1 {
+-					reg = <1>;
+-					label = "sw1";
+-				};
+-
+-				port at 2 {
+-					reg = <2>;
+-					label = "sw2";
+-				};
+-
+-				port at 3 {
+-					reg = <3>;
+-					label = "sw3";
+-				};
+-
+-				port at 4 {
+-					reg = <4>;
+-					label = "sw4";
+-				};
+-
+-				port at 5 {
+-					reg = <5>;
+-					label = "sw5";
+-				};
+-			};
+-		};
+-	};
+-
+ 	mdio1: mdio-1 {
+ 		status = "okay";
+ 		compatible = "virtual,mdio-gpio";
+@@ -222,6 +155,73 @@
+ 	status = "okay";
+ };
+ 
++&mdio0 {
++	status = "okay";
++	compatible = "virtual,mdio-gpio";
++	gpios = <&qcom_pinmux 1 GPIO_ACTIVE_HIGH>,
++		<&qcom_pinmux 0 GPIO_ACTIVE_HIGH>;
++	#address-cells = <1>;
++	#size-cells = <0>;
++
++	pinctrl-0 = <&mdio0_pins>;
++	pinctrl-names = "default";
++
++	switch0: switch at 10 {
++		compatible = "qca,qca8337";
++		#address-cells = <1>;
++		#size-cells = <0>;
++
++		dsa,member = <0 0>;
++
++		pinctrl-0 = <&sw0_reset_pin>;
++		pinctrl-names = "default";
++
++		reset-gpios = <&qcom_pinmux 16 GPIO_ACTIVE_LOW>;
++		reg = <0x10>;
++
++		ports {
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			switch0cpu: port at 0 {
++				reg = <0>;
++				label = "cpu";
++				ethernet = <&gmac0>;
++				phy-mode = "rgmii-id";
++				fixed-link {
++					speed = <1000>;
++					full-duplex;
++				};
++			};
++
++			port at 1 {
++				reg = <1>;
++				label = "sw1";
++			};
++
++			port at 2 {
++				reg = <2>;
++				label = "sw2";
++			};
++
++			port at 3 {
++				reg = <3>;
++				label = "sw3";
++			};
++
++			port at 4 {
++				reg = <4>;
++				label = "sw4";
++			};
++
++			port at 5 {
++				reg = <5>;
++				label = "sw5";
++			};
++		};
++	};
++};
++
+ &gmac0 {
+ 	status = "okay";
+ 
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -476,6 +476,20 @@
+ 			snps,blen = <16 0 0 0 0 0 0>;
+ 		};
+ 
++		mdio0: mdio at 37000000 {
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			compatible = "qcom,ipq8064-mdio", "syscon";
++			reg = <0x37000000 0x200000>;
++			resets = <&gcc GMAC_CORE1_RESET>;
++			reset-names = "stmmaceth";
++			clocks = <&gcc GMAC_CORE1_CLK>;
++			clock-names = "stmmaceth";
++
++			status = "disabled";
++		};
++
+ 		vsdcc_fixed: vsdcc-regulator {
+ 			compatible = "regulator-fixed";
+ 			regulator-name = "SDCC Power";
diff --git a/target/linux/ipq806x/patches-6.1/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch b/target/linux/ipq806x/patches-6.1/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
new file mode 100644
index 0000000000..9de7328879
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/114-01-devfreq-qcom-Add-L2-Krait-Cache-devfreq-scaling-driv.patch
@@ -0,0 +1,235 @@
+From b044ae89862132a86fb511648e9c52ea3cdf8c30 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Wed, 5 Aug 2020 14:19:23 +0200
+Subject: [PATCH 1/4] devfreq: qcom: Add L2 Krait Cache devfreq scaling driver
+
+Qcom L2 Krait CPUs use the generic cpufreq-dt driver and doesn't actually
+scale the Cache frequency when the CPU frequency is changed. This
+devfreq driver register with the cpu notifier and scale the Cache
+based on the max Freq across all core as the CPU cache is shared across
+all of them. If provided this also scale the voltage of the regulator
+attached to the CPU cache. The scaling logic is based on the CPU freq
+and the 3 scaling interval are set by the device dts.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/devfreq/Kconfig               |  11 ++
+ drivers/devfreq/Makefile              |   1 +
+ drivers/devfreq/krait-cache-devfreq.c | 188 ++++++++++++++++++++++++++
+ 3 files changed, 200 insertions(+)
+ create mode 100644 drivers/devfreq/krait-cache-devfreq.c
+
+--- a/drivers/devfreq/Kconfig
++++ b/drivers/devfreq/Kconfig
+@@ -151,6 +151,17 @@ config ARM_SUN8I_A33_MBUS_DEVFREQ
+ 	  This adds the DEVFREQ driver for the MBUS controller in some
+ 	  Allwinner sun8i (A33 through H3) and sun50i (A64 and H5) SoCs.
+ 
++config ARM_KRAIT_CACHE_DEVFREQ
++	tristate "Scaling support for Krait CPU Cache Devfreq"
++	depends on ARCH_QCOM || COMPILE_TEST
++	select DEVFREQ_GOV_PASSIVE
++	help
++	  This adds the DEVFREQ driver for the Krait CPU L2 Cache shared by all cores.
++
++	  The driver register with the cpufreq notifier and find the right frequency
++	  based on the max frequency across all core and the range set in the device
++	  dts. If provided this scale also the regulator attached to the l2 cache.
++
+ source "drivers/devfreq/event/Kconfig"
+ 
+ endif # PM_DEVFREQ
+--- a/drivers/devfreq/Makefile
++++ b/drivers/devfreq/Makefile
+@@ -15,6 +15,7 @@ obj-$(CONFIG_ARM_MEDIATEK_CCI_DEVFREQ)	+
+ obj-$(CONFIG_ARM_RK3399_DMC_DEVFREQ)	+= rk3399_dmc.o
+ obj-$(CONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ)	+= sun8i-a33-mbus.o
+ obj-$(CONFIG_ARM_TEGRA_DEVFREQ)		+= tegra30-devfreq.o
++obj-$(CONFIG_ARM_KRAIT_CACHE_DEVFREQ)	+= krait-cache-devfreq.o
+ 
+ # DEVFREQ Event Drivers
+ obj-$(CONFIG_PM_DEVFREQ_EVENT)		+= event/
+--- /dev/null
++++ b/drivers/devfreq/krait-cache-devfreq.c
+@@ -0,0 +1,181 @@
++// SPDX-License-Identifier: GPL-2.0
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/cpufreq.h>
++#include <linux/devfreq.h>
++#include <linux/of.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/slab.h>
++#include <linux/regulator/consumer.h>
++#include <linux/pm_opp.h>
++
++#include "governor.h"
++
++struct krait_cache_data {
++	struct clk *clk;
++	unsigned long idle_freq;
++	int token;
++};
++
++static int krait_cache_config_clk(struct device *dev, struct opp_table *opp_table,
++			struct dev_pm_opp *old_opp, struct dev_pm_opp *opp,
++			void *data, bool scaling_down)
++{
++	struct krait_cache_data *kdata;
++	unsigned long old_freq, freq;
++	unsigned long idle_freq;
++	struct clk *clk;
++	int ret;
++
++	kdata = dev_get_drvdata(dev);
++	idle_freq = kdata->idle_freq;
++	clk = kdata->clk;
++
++	old_freq = dev_pm_opp_get_freq(old_opp);
++	freq = dev_pm_opp_get_freq(opp);
++
++	/*
++	 * Set to idle bin if switching from normal to high bin
++	 * or vice versa. It has been notice that a bug is triggered
++	 * in cache scaling when more than one bin is scaled, to fix
++	 * this we first need to transition to the base rate and then
++	 * to target rate
++	 */
++	if (likely(freq != idle_freq && old_freq != idle_freq)) {
++		ret = clk_set_rate(clk, idle_freq);
++		if (ret)
++			return ret;
++	}
++
++	return clk_set_rate(clk, freq);
++};
++
++static int krait_cache_get_cur_freq(struct device *dev, unsigned long *freq)
++{
++	struct krait_cache_data *data = dev_get_drvdata(dev);
++
++	*freq = clk_get_rate(data->clk);
++
++	return 0;
++};
++
++static int krait_cache_target(struct device *dev, unsigned long *freq,
++			      u32 flags)
++{
++	struct dev_pm_opp *opp;
++
++	opp = dev_pm_opp_find_freq_ceil(dev, freq);
++	if (unlikely(IS_ERR(opp)))
++		return PTR_ERR(opp);
++
++	dev_pm_opp_put(opp);
++
++	return dev_pm_opp_set_rate(dev, *freq);
++};
++
++static int krait_cache_get_dev_status(struct device *dev,
++				      struct devfreq_dev_status *stat)
++{
++	struct krait_cache_data *data = dev_get_drvdata(dev);
++
++	stat->busy_time = 0;
++	stat->total_time = 0;
++	stat->current_frequency = clk_get_rate(data->clk);
++
++	return 0;
++};
++
++static struct devfreq_dev_profile krait_cache_devfreq_profile = {
++	.target = krait_cache_target,
++	.get_dev_status = krait_cache_get_dev_status,
++	.get_cur_freq = krait_cache_get_cur_freq
++};
++
++static struct devfreq_passive_data devfreq_gov_data = {
++	.parent_type = CPUFREQ_PARENT_DEV,
++};
++
++static int krait_cache_probe(struct platform_device *pdev)
++{
++	struct dev_pm_opp_config config = { };
++	struct device *dev = &pdev->dev;
++	struct krait_cache_data *data;
++	struct devfreq *devfreq;
++	struct dev_pm_opp *opp;
++	struct clk *clk;
++	int ret, token;
++
++	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
++	if (!data)
++		return -ENOMEM;
++
++	clk = devm_clk_get(dev, "l2");
++	if (IS_ERR(clk))
++		return PTR_ERR(clk);
++
++	config.regulator_names = (const char *[]){ "l2", NULL };
++	config.clk_names = (const char *[]){ "l2", NULL };
++	config.config_clks = krait_cache_config_clk;
++
++	token = dev_pm_opp_set_config(dev, &config);
++	if (token < 0)
++		return token;
++
++	ret = devm_pm_opp_of_add_table(dev);
++	if (ret)
++		goto free_opp;
++
++	opp = dev_pm_opp_find_freq_ceil(dev, &data->idle_freq);
++	if (IS_ERR(opp)) {
++		ret = PTR_ERR(opp);
++		goto free_opp;
++	}
++	dev_pm_opp_put(opp);
++
++	data->token = token;
++	data->clk = clk;
++	dev_set_drvdata(dev, data);
++	devfreq = devm_devfreq_add_device(dev, &krait_cache_devfreq_profile,
++					  DEVFREQ_GOV_PASSIVE, &devfreq_gov_data);
++	if (IS_ERR(devfreq)) {
++		ret = PTR_ERR(devfreq);
++		goto free_opp;
++	}
++
++	return 0;
++
++free_opp:
++	dev_pm_opp_clear_config(token);
++	return ret;
++};
++
++static int krait_cache_remove(struct platform_device *pdev)
++{
++	struct krait_cache_data *data = dev_get_drvdata(&pdev->dev);
++
++	dev_pm_opp_clear_config(data->token);
++
++	return 0;
++};
++
++static const struct of_device_id krait_cache_match_table[] = {
++	{ .compatible = "qcom,krait-cache" },
++	{}
++};
++
++static struct platform_driver krait_cache_driver = {
++	.probe		= krait_cache_probe,
++	.remove		= krait_cache_remove,
++	.driver		= {
++		.name   = "krait-cache-scaling",
++		.of_match_table = krait_cache_match_table,
++	},
++};
++module_platform_driver(krait_cache_driver);
++
++MODULE_DESCRIPTION("Krait CPU Cache Scaling driver");
++MODULE_AUTHOR("Christian Marangi <ansuelsmth at gmail.com>");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch b/target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
new file mode 100644
index 0000000000..45f05dd423
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/114-02-ARM-dts-qcom-add-krait-cache-compatible-for-ipq806x-.patch
@@ -0,0 +1,50 @@
+From ef124ad0ff8abfbf4ebe3fe6d7dcef4541dec13a Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Thu, 16 Jun 2022 18:39:21 +0200
+Subject: [PATCH] ARM: dts: qcom: add krait-cache compatible for ipq806x dtsi
+
+Add qcom,krait-cache compatible to enable cache devfreq driver for
+ipq806x SoC and move the L2 node to the soc node to make the devfreq
+driver correctly probe.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ arch/arm/boot/dts/qcom-ipq8064.dtsi | 22 +++++++++++-----------
+ 1 file changed, 11 insertions(+), 11 deletions(-)
+
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -69,16 +69,6 @@
+ 				min-residency-us = <3000>;
+ 			};
+ 		};
+-
+-		L2: l2-cache {
+-			compatible = "cache";
+-			cache-level = <2>;
+-			qcom,saw = <&saw_l2>;
+-
+-			clocks = <&kraitcc 4>;
+-			clock-names = "l2";
+-			operating-points-v2 = <&opp_table_l2>;
+-		};
+ 	};
+ 
+ 	opp_table_l2: opp_table_l2 {
+@@ -1409,6 +1399,16 @@
+ 			#reset-cells = <1>;
+ 		};
+ 
++		L2: l2-cache {
++			compatible = "cache", "qcom,krait-cache";
++			cache-level = <2>;
++			qcom,saw = <&saw_l2>;
++
++			clocks = <&kraitcc 4>;
++			clock-names = "l2";
++			operating-points-v2 = <&opp_table_l2>;
++		};
++
+ 		lpass at 28100000 {
+ 			compatible = "qcom,lpass-cpu";
+ 			status = "disabled";
diff --git a/target/linux/ipq806x/patches-6.1/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch b/target/linux/ipq806x/patches-6.1/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
new file mode 100644
index 0000000000..c9cd3ebdf7
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/115-01-devfreq-add-ipq806x-fabric-scaling-driver.patch
@@ -0,0 +1,203 @@
+From 13f075999935bb696dbab63243923179f06fa05e Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Thu, 16 Jun 2022 19:56:08 +0200
+Subject: [PATCH 3/4] devfreq: add ipq806x fabric scaling driver
+
+Add ipq806x fabric scaling driver using the devfreq passive governor.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/devfreq/Kconfig               |  11 ++
+ drivers/devfreq/Makefile              |   1 +
+ drivers/devfreq/ipq806x-fab-devfreq.c | 155 ++++++++++++++++++++++++++
+ 3 files changed, 167 insertions(+)
+ create mode 100644 drivers/devfreq/ipq806x-fab-devfreq.c
+
+--- a/drivers/devfreq/Kconfig
++++ b/drivers/devfreq/Kconfig
+@@ -162,6 +162,17 @@ config ARM_KRAIT_CACHE_DEVFREQ
+ 	  based on the max frequency across all core and the range set in the device
+ 	  dts. If provided this scale also the regulator attached to the l2 cache.
+ 
++config ARM_IPQ806X_FAB_DEVFREQ
++	tristate "Scaling support for ipq806x Soc Fabric"
++	depends on ARCH_QCOM || COMPILE_TEST
++	select DEVFREQ_GOV_PASSIVE
++	help
++	  This adds the DEVFREQ driver for the ipq806x Soc Fabric.
++
++	  The driver register with the cpufreq notifier and find the right frequency
++	  based on the max frequency across all core and the range set in the device
++	  dts.
++
+ source "drivers/devfreq/event/Kconfig"
+ 
+ endif # PM_DEVFREQ
+--- a/drivers/devfreq/Makefile
++++ b/drivers/devfreq/Makefile
+@@ -16,6 +16,7 @@ obj-$(CONFIG_ARM_RK3399_DMC_DEVFREQ)	+=
+ obj-$(CONFIG_ARM_SUN8I_A33_MBUS_DEVFREQ)	+= sun8i-a33-mbus.o
+ obj-$(CONFIG_ARM_TEGRA_DEVFREQ)		+= tegra30-devfreq.o
+ obj-$(CONFIG_ARM_KRAIT_CACHE_DEVFREQ)	+= krait-cache-devfreq.o
++obj-$(CONFIG_ARM_IPQ806X_FAB_DEVFREQ)	+= ipq806x-fab-devfreq.o
+ 
+ # DEVFREQ Event Drivers
+ obj-$(CONFIG_PM_DEVFREQ_EVENT)		+= event/
+--- /dev/null
++++ b/drivers/devfreq/ipq806x-fab-devfreq.c
+@@ -0,0 +1,155 @@
++// SPDX-License-Identifier: GPL-2.0
++
++#include <linux/kernel.h>
++#include <linux/init.h>
++#include <linux/module.h>
++#include <linux/cpufreq.h>
++#include <linux/devfreq.h>
++#include <linux/of.h>
++#include <linux/platform_device.h>
++#include <linux/clk.h>
++#include <linux/slab.h>
++#include <linux/pm_opp.h>
++
++#include "governor.h"
++
++struct ipq806x_fab_data {
++	struct clk *fab_clk;
++	struct clk *ddr_clk;
++};
++
++static int ipq806x_fab_get_cur_freq(struct device *dev, unsigned long *freq)
++{
++	struct ipq806x_fab_data *data = dev_get_drvdata(dev);
++
++	*freq = clk_get_rate(data->fab_clk);
++
++	return 0;
++};
++
++static int ipq806x_fab_target(struct device *dev, unsigned long *freq,
++			      u32 flags)
++{
++	struct ipq806x_fab_data *data = dev_get_drvdata(dev);
++	struct dev_pm_opp *opp;
++	int ret;
++
++	opp = dev_pm_opp_find_freq_ceil(dev, freq);
++	if (unlikely(IS_ERR(opp)))
++		return PTR_ERR(opp);
++
++	dev_pm_opp_put(opp);
++
++	ret = clk_set_rate(data->fab_clk, *freq);
++	if (ret)
++		return ret;
++
++	return clk_set_rate(data->ddr_clk, *freq);
++};
++
++static int ipq806x_fab_get_dev_status(struct device *dev,
++				      struct devfreq_dev_status *stat)
++{
++	struct ipq806x_fab_data *data = dev_get_drvdata(dev);
++
++	stat->busy_time = 0;
++	stat->total_time = 0;
++	stat->current_frequency = clk_get_rate(data->fab_clk);
++
++	return 0;
++};
++
++static struct devfreq_dev_profile ipq806x_fab_devfreq_profile = {
++	.target = ipq806x_fab_target,
++	.get_dev_status = ipq806x_fab_get_dev_status,
++	.get_cur_freq = ipq806x_fab_get_cur_freq
++};
++
++static struct devfreq_passive_data devfreq_gov_data = {
++	.parent_type = CPUFREQ_PARENT_DEV,
++};
++
++static int ipq806x_fab_probe(struct platform_device *pdev)
++{
++	struct device *dev = &pdev->dev;
++	struct ipq806x_fab_data *data;
++	struct devfreq *devfreq;
++	struct clk *clk;
++	int ret;
++
++	data = devm_kzalloc(dev, sizeof(*data), GFP_KERNEL);
++	if (!data)
++		return -ENOMEM;
++
++	clk = devm_clk_get(dev, "apps-fab-clk");
++	if (IS_ERR(clk)) {
++		dev_err_probe(dev, PTR_ERR(clk), "failed to get apps fab clk\n");
++		return PTR_ERR(clk);
++	}
++
++	clk_prepare_enable(clk);
++	data->fab_clk = clk;
++
++	clk = devm_clk_get(dev, "ddr-fab-clk");
++	if (IS_ERR(clk)) {
++		dev_err_probe(dev, PTR_ERR(clk), "failed to get ddr fab clk\n");
++		goto err_ddr;
++	}
++
++	clk_prepare_enable(clk);
++	data->ddr_clk = clk;
++
++	ret = dev_pm_opp_of_add_table(dev);
++	if (ret) {
++		dev_err(dev, "failed to parse fab freq thresholds\n");
++		return ret;
++	}
++
++	dev_set_drvdata(dev, data);
++
++	devfreq = devm_devfreq_add_device(&pdev->dev, &ipq806x_fab_devfreq_profile,
++					  DEVFREQ_GOV_PASSIVE, &devfreq_gov_data);
++	if (IS_ERR(devfreq))
++		dev_pm_opp_remove_table(dev);
++
++	return PTR_ERR_OR_ZERO(devfreq);
++
++err_ddr:
++	clk_unprepare(data->fab_clk);
++	clk_put(data->fab_clk);
++	return PTR_ERR(clk);
++};
++
++static int ipq806x_fab_remove(struct platform_device *pdev)
++{
++	struct ipq806x_fab_data *data = dev_get_drvdata(&pdev->dev);
++
++	clk_unprepare(data->fab_clk);
++	clk_put(data->fab_clk);
++
++	clk_unprepare(data->ddr_clk);
++	clk_put(data->ddr_clk);
++
++	dev_pm_opp_remove_table(&pdev->dev);
++
++	return 0;
++};
++
++static const struct of_device_id ipq806x_fab_match_table[] = {
++	{ .compatible = "qcom,fab-scaling" },
++	{}
++};
++
++static struct platform_driver ipq806x_fab_driver = {
++	.probe		= ipq806x_fab_probe,
++	.remove		= ipq806x_fab_remove,
++	.driver		= {
++		.name   = "ipq806x-fab-scaling",
++		.of_match_table = ipq806x_fab_match_table,
++	},
++};
++module_platform_driver(ipq806x_fab_driver);
++
++MODULE_DESCRIPTION("ipq806x Fab Scaling driver");
++MODULE_AUTHOR("Christian Marangi <ansuelsmth at gmail.com>");
++MODULE_LICENSE("GPL v2");
diff --git a/target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch b/target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
new file mode 100644
index 0000000000..24e0ecf619
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/115-02-ARM-dts-qcom-add-fab-scaling-node-for-ipq806x.patch
@@ -0,0 +1,48 @@
+From c3573f0907dadb0a6e9933aae2a46a489abcbd48 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Thu, 16 Jun 2022 20:03:05 +0200
+Subject: [PATCH 4/4] ARM: dts: qcom: add fab scaling node for ipq806x
+
+Add fabric scaling node for ipq806x to correctly scale apps and ddr
+fabric clk.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ arch/arm/boot/dts/qcom-ipq8064.dtsi | 19 +++++++++++++++++++
+ 1 file changed, 19 insertions(+)
+
+--- a/arch/arm/boot/dts/qcom-ipq8064.dtsi
++++ b/arch/arm/boot/dts/qcom-ipq8064.dtsi
+@@ -170,6 +170,18 @@
+ 		};
+ 	};
+ 
++	opp_table_fab: opp_table_fab {
++		compatible = "operating-points-v2";
++
++		opp-533000000 {
++			opp-hz = /bits/ 64 <533000000>;
++		};
++
++		opp-400000000 {
++			opp-hz = /bits/ 64 <400000000>;
++		};
++	};
++
+ 	thermal-zones {
+ 		sensor0-thermal {
+ 			polling-delay-passive = <0>;
+@@ -1409,6 +1421,13 @@
+ 			operating-points-v2 = <&opp_table_l2>;
+ 		};
+ 
++		fab-scaling {
++			compatible = "qcom,fab-scaling";
++			clocks = <&rpmcc RPM_APPS_FABRIC_A_CLK>, <&rpmcc RPM_EBI1_A_CLK>;
++			clock-names = "apps-fab-clk", "ddr-fab-clk";
++			operating-points-v2 = <&opp_table_fab>;
++		};
++
+ 		lpass at 28100000 {
+ 			compatible = "qcom,lpass-cpu";
+ 			status = "disabled";
diff --git a/target/linux/ipq806x/patches-6.1/122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch b/target/linux/ipq806x/patches-6.1/122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch
new file mode 100644
index 0000000000..c30c245d0a
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/122-01-clk-qcom-krait-cc-handle-qsb-clock-defined-in-DTS.patch
@@ -0,0 +1,47 @@
+From 666c1b745e93ccddde841d5057c33f97b29a316a Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Thu, 15 Sep 2022 02:19:28 +0200
+Subject: [PATCH 3/9] clk: qcom: krait-cc: handle qsb clock defined in DTS
+
+qsb fixed clk may be defined in DTS and correctly passed in the clocks
+list. Add related code to handle this and modify the logic to
+dynamically read qsb clock frequency.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/clk/qcom/krait-cc.c | 14 +++++++++++---
+ 1 file changed, 11 insertions(+), 3 deletions(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -348,7 +348,7 @@ static int krait_cc_probe(struct platfor
+ {
+ 	struct device *dev = &pdev->dev;
+ 	const struct of_device_id *id;
+-	unsigned long cur_rate, aux_rate;
++	unsigned long cur_rate, aux_rate, qsb_rate;
+ 	int cpu;
+ 	struct clk_hw *mux, *l2_pri_mux;
+ 	struct clk *clk, **clks;
+@@ -357,11 +357,19 @@ static int krait_cc_probe(struct platfor
+ 	if (!id)
+ 		return -ENODEV;
+ 
+-	/* Rate is 1 because 0 causes problems for __clk_mux_determine_rate */
+-	clk = clk_register_fixed_rate(dev, "qsb", NULL, 0, 1);
++	/*
++	 * Per Documentation qsb should be provided from DTS.
++	 * To address old implementation, register the fixed clock anyway.
++	 * Rate is 1 because 0 causes problems for __clk_mux_determine_rate
++	 */
++	clk = clk_get(dev, "qsb");
++	if (IS_ERR(clk))
++		clk = clk_register_fixed_rate(dev, "qsb", NULL, 0, 1);
+ 	if (IS_ERR(clk))
+ 		return PTR_ERR(clk);
+ 
++	qsb_rate = clk_get_rate(clk);
++
+ 	if (!id->data) {
+ 		clk = clk_register_fixed_factor(dev, "acpu_aux",
+ 						"gpll0_vote", 0, 1, 2);
diff --git a/target/linux/ipq806x/patches-6.1/122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch b/target/linux/ipq806x/patches-6.1/122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch
new file mode 100644
index 0000000000..e2f78f79fb
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/122-02-clk-qcom-krait-cc-register-REAL-qsb-fixed-clock.patch
@@ -0,0 +1,36 @@
+From fca6f185a9d9ef0892a719bc6da955b22d326ec7 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Thu, 15 Sep 2022 02:24:33 +0200
+Subject: [PATCH 4/9] clk: qcom: krait-cc: register REAL qsb fixed clock
+
+With some tools it was discovered the real frequency of the qsb fixed
+clock. While not 100% correct it's still better than using 1 as a dummy
+frequency.
+Correctly register the qsb fixed clock with the frequency of 225 MHz
+instead of 1.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/clk/qcom/krait-cc.c | 8 +++++---
+ 1 file changed, 5 insertions(+), 3 deletions(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -25,6 +25,8 @@ enum {
+ 	clks_max,
+ };
+ 
++#define QSB_RATE	2250000000
++
+ static unsigned int sec_mux_map[] = {
+ 	2,
+ 	0,
+@@ -364,7 +366,7 @@ static int krait_cc_probe(struct platfor
+ 	 */
+ 	clk = clk_get(dev, "qsb");
+ 	if (IS_ERR(clk))
+-		clk = clk_register_fixed_rate(dev, "qsb", NULL, 0, 1);
++		clk = clk_register_fixed_rate(dev, "qsb", NULL, 0, QSB_RATE);
+ 	if (IS_ERR(clk))
+ 		return PTR_ERR(clk);
+ 
diff --git a/target/linux/ipq806x/patches-6.1/122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch b/target/linux/ipq806x/patches-6.1/122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch
new file mode 100644
index 0000000000..d95a63fc44
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/122-03-clk-qcom-krait-cc-drop-pr_info-and-use-dev_info.patch
@@ -0,0 +1,44 @@
+From 2399d181557d94ae9a2686926cd25768f132e4b4 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Fri, 18 Mar 2022 16:12:14 +0100
+Subject: [PATCH 7/9] clk: qcom: krait-cc: drop pr_info and use dev_info
+
+Replace pr_info() with dev_info() to provide better diagnostics.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/clk/qcom/krait-cc.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -423,25 +423,25 @@ static int krait_cc_probe(struct platfor
+ 	cur_rate = clk_get_rate(clks[l2_mux]);
+ 	aux_rate = 384000000;
+ 	if (cur_rate < aux_rate) {
+-		pr_info("L2 @ Undefined rate. Forcing new rate.\n");
++		dev_info(dev, "L2 @ Undefined rate. Forcing new rate.\n");
+ 		cur_rate = aux_rate;
+ 	}
+ 	clk_set_rate(clks[l2_mux], aux_rate);
+ 	clk_set_rate(clks[l2_mux], 2);
+ 	clk_set_rate(clks[l2_mux], cur_rate);
+-	pr_info("L2 @ %lu KHz\n", clk_get_rate(clks[l2_mux]) / 1000);
++	dev_info(dev, "L2 @ %lu KHz\n", clk_get_rate(clks[l2_mux]) / 1000);
+ 	for_each_possible_cpu(cpu) {
+ 		clk = clks[cpu];
+ 		cur_rate = clk_get_rate(clk);
+ 		if (cur_rate < aux_rate) {
+-			pr_info("CPU%d @ Undefined rate. Forcing new rate.\n", cpu);
++			dev_info(dev, "CPU%d @ Undefined rate. Forcing new rate.\n", cpu);
+ 			cur_rate = aux_rate;
+ 		}
+ 
+ 		clk_set_rate(clk, aux_rate);
+ 		clk_set_rate(clk, 2);
+ 		clk_set_rate(clk, cur_rate);
+-		pr_info("CPU%d @ %lu KHz\n", cpu, clk_get_rate(clk) / 1000);
++		dev_info(dev, "CPU%d @ %lu KHz\n", cpu, clk_get_rate(clk) / 1000);
+ 	}
+ 
+ 	of_clk_add_provider(dev->of_node, krait_of_get, clks);
diff --git a/target/linux/ipq806x/patches-6.1/122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch b/target/linux/ipq806x/patches-6.1/122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch
new file mode 100644
index 0000000000..8f88e06991
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/122-04-clk-qcom-krait-cc-rework-mux-reset-logic-and-reset-h.patch
@@ -0,0 +1,88 @@
+From 6a77cf3f5f95ec0058e1b4d1ada018748cb0b83b Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Thu, 15 Sep 2022 03:33:13 +0200
+Subject: [PATCH 9/9] clk: qcom: krait-cc: rework mux reset logic and reset
+ hfpll
+
+Rework and clean mux reset logic.
+Compact it to a for loop to handle both CPU and L2 in one place.
+Move hardcoded aux_rate to define and add a new hfpll_rate value to
+reset hfpll settings.
+Change logic to now reset the hfpll to the lowest value of 600 Mhz and
+then restoring the previous frequency. This permits to reset the hfpll if
+the primary mux was set to source out of the secondary mux.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/clk/qcom/krait-cc.c | 50 +++++++++++++++++--------------------
+ 1 file changed, 23 insertions(+), 27 deletions(-)
+
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -25,7 +25,9 @@ enum {
+ 	clks_max,
+ };
+ 
+-#define QSB_RATE	2250000000
++#define QSB_RATE	225000000
++#define AUX_RATE	384000000
++#define HFPLL_RATE	600000000
+ 
+ static unsigned int sec_mux_map[] = {
+ 	2,
+@@ -350,7 +352,7 @@ static int krait_cc_probe(struct platfor
+ {
+ 	struct device *dev = &pdev->dev;
+ 	const struct of_device_id *id;
+-	unsigned long cur_rate, aux_rate, qsb_rate;
++	unsigned long cur_rate, qsb_rate;
+ 	int cpu;
+ 	struct clk_hw *mux, *l2_pri_mux;
+ 	struct clk *clk, **clks;
+@@ -420,28 +422,29 @@ static int krait_cc_probe(struct platfor
+ 	 * two different rates to force a HFPLL reinit under all
+ 	 * circumstances.
+ 	 */
+-	cur_rate = clk_get_rate(clks[l2_mux]);
+-	aux_rate = 384000000;
+-	if (cur_rate < aux_rate) {
+-		dev_info(dev, "L2 @ Undefined rate. Forcing new rate.\n");
+-		cur_rate = aux_rate;
+-	}
+-	clk_set_rate(clks[l2_mux], aux_rate);
+-	clk_set_rate(clks[l2_mux], 2);
+-	clk_set_rate(clks[l2_mux], cur_rate);
+-	dev_info(dev, "L2 @ %lu KHz\n", clk_get_rate(clks[l2_mux]) / 1000);
+-	for_each_possible_cpu(cpu) {
++	for (cpu = 0; cpu < 5; cpu++) {
++		const char *l2_s = "L2";
++		char cpu_s[5];
++
+ 		clk = clks[cpu];
++		if (!clk)
++			continue;
++
++		if (cpu < 4)
++			snprintf(cpu_s, 5, "CPU%d", cpu);
++
+ 		cur_rate = clk_get_rate(clk);
+-		if (cur_rate < aux_rate) {
+-			dev_info(dev, "CPU%d @ Undefined rate. Forcing new rate.\n", cpu);
+-			cur_rate = aux_rate;
++		if (cur_rate < AUX_RATE) {
++			dev_info(dev, "%s @ Undefined rate. Forcing new rate.\n",
++				 cpu < 4 ? cpu_s : l2_s);
++			cur_rate = AUX_RATE;
+ 		}
+ 
+-		clk_set_rate(clk, aux_rate);
+-		clk_set_rate(clk, 2);
++		clk_set_rate(clk, AUX_RATE);
++		clk_set_rate(clk, HFPLL_RATE);
+ 		clk_set_rate(clk, cur_rate);
+-		dev_info(dev, "CPU%d @ %lu KHz\n", cpu, clk_get_rate(clk) / 1000);
++		dev_info(dev, "%s @ %lu KHz\n", cpu < 4 ? cpu_s : l2_s,
++			 clk_get_rate(clk) / 1000);
+ 	}
+ 
+ 	of_clk_add_provider(dev->of_node, krait_of_get, clks);
diff --git a/target/linux/ipq806x/patches-6.1/122-05-clk-qcom-clk-krait-generilize-div-functions.patch b/target/linux/ipq806x/patches-6.1/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
new file mode 100644
index 0000000000..a7c0f046c8
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/122-05-clk-qcom-clk-krait-generilize-div-functions.patch
@@ -0,0 +1,156 @@
+From 908c361b3c3a139eb3e6a798cb620a6da7514d5c Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Fri, 23 Sep 2022 19:05:39 +0200
+Subject: [PATCH 2/4] clk: qcom: clk-krait: generilize div functions
+
+Generilize div functions and remove hardcode to a divisor of 2.
+This is just a cleanup and permit to make it more clear the settings of
+the devisor when used by the krait-cc driver.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/clk/qcom/clk-krait.c | 57 ++++++++++++++++++++----------------
+ drivers/clk/qcom/clk-krait.h | 11 ++++---
+ drivers/clk/qcom/krait-cc.c  |  7 +++--
+ 3 files changed, 42 insertions(+), 33 deletions(-)
+
+--- a/drivers/clk/qcom/clk-krait.c
++++ b/drivers/clk/qcom/clk-krait.c
+@@ -97,53 +97,58 @@ const struct clk_ops krait_mux_clk_ops =
+ EXPORT_SYMBOL_GPL(krait_mux_clk_ops);
+ 
+ /* The divider can divide by 2, 4, 6 and 8. But we only really need div-2. */
+-static long krait_div2_round_rate(struct clk_hw *hw, unsigned long rate,
++static long krait_div_round_rate(struct clk_hw *hw, unsigned long rate,
+ 				  unsigned long *parent_rate)
+ {
+-	*parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw), rate * 2);
+-	return DIV_ROUND_UP(*parent_rate, 2);
++	struct krait_div_clk *d = to_krait_div_clk(hw);
++
++	*parent_rate = clk_hw_round_rate(clk_hw_get_parent(hw),
++					 rate * d->divisor);
++
++	return DIV_ROUND_UP(*parent_rate, d->divisor);
+ }
+ 
+-static int krait_div2_set_rate(struct clk_hw *hw, unsigned long rate,
++static int krait_div_set_rate(struct clk_hw *hw, unsigned long rate,
+ 			       unsigned long parent_rate)
+ {
+-	struct krait_div2_clk *d = to_krait_div2_clk(hw);
++	struct krait_div_clk *d = to_krait_div_clk(hw);
++	u8 div_val = krait_div_to_val(d->divisor);
+ 	unsigned long flags;
+-	u32 val;
+-	u32 mask = BIT(d->width) - 1;
+-
+-	if (d->lpl)
+-		mask = mask << (d->shift + LPL_SHIFT) | mask << d->shift;
+-	else
+-		mask <<= d->shift;
++	u32 regval;
+ 
+ 	spin_lock_irqsave(&krait_clock_reg_lock, flags);
+-	val = krait_get_l2_indirect_reg(d->offset);
+-	val &= ~mask;
+-	krait_set_l2_indirect_reg(d->offset, val);
++	regval = krait_get_l2_indirect_reg(d->offset);
++
++	regval &= ~(d->mask << d->shift);
++	regval |= (div_val & d->mask) << d->shift;
++
++	if (d->lpl) {
++		regval &= ~(d->mask << (d->shift + LPL_SHIFT));
++		regval |= (div_val & d->mask) << (d->shift + LPL_SHIFT);
++	}
++
++	krait_set_l2_indirect_reg(d->offset, regval);
+ 	spin_unlock_irqrestore(&krait_clock_reg_lock, flags);
+ 
+ 	return 0;
+ }
+ 
+ static unsigned long
+-krait_div2_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
++krait_div_recalc_rate(struct clk_hw *hw, unsigned long parent_rate)
+ {
+-	struct krait_div2_clk *d = to_krait_div2_clk(hw);
+-	u32 mask = BIT(d->width) - 1;
++	struct krait_div_clk *d = to_krait_div_clk(hw);
+ 	u32 div;
+ 
+ 	div = krait_get_l2_indirect_reg(d->offset);
+ 	div >>= d->shift;
+-	div &= mask;
+-	div = (div + 1) * 2;
++	div &= d->mask;
+ 
+-	return DIV_ROUND_UP(parent_rate, div);
++	return DIV_ROUND_UP(parent_rate, krait_val_to_div(div));
+ }
+ 
+-const struct clk_ops krait_div2_clk_ops = {
+-	.round_rate = krait_div2_round_rate,
+-	.set_rate = krait_div2_set_rate,
+-	.recalc_rate = krait_div2_recalc_rate,
++const struct clk_ops krait_div_clk_ops = {
++	.round_rate = krait_div_round_rate,
++	.set_rate = krait_div_set_rate,
++	.recalc_rate = krait_div_recalc_rate,
+ };
+-EXPORT_SYMBOL_GPL(krait_div2_clk_ops);
++EXPORT_SYMBOL_GPL(krait_div_clk_ops);
+--- a/drivers/clk/qcom/clk-krait.h
++++ b/drivers/clk/qcom/clk-krait.h
+@@ -25,17 +25,20 @@ struct krait_mux_clk {
+ 
+ extern const struct clk_ops krait_mux_clk_ops;
+ 
+-struct krait_div2_clk {
++struct krait_div_clk {
+ 	u32		offset;
+-	u8		width;
++	u32		mask;
++	u8		divisor;
+ 	u32		shift;
+ 	bool		lpl;
+ 
+ 	struct clk_hw	hw;
+ };
+ 
+-#define to_krait_div2_clk(_hw) container_of(_hw, struct krait_div2_clk, hw)
++#define to_krait_div_clk(_hw) container_of(_hw, struct krait_div_clk, hw)
++#define krait_div_to_val(_div)		((_div) / 2) - 1
++#define krait_val_to_div(_val)		((_val) + 1) * 2
+ 
+-extern const struct clk_ops krait_div2_clk_ops;
++extern const struct clk_ops krait_div_clk_ops;
+ 
+ #endif
+--- a/drivers/clk/qcom/krait-cc.c
++++ b/drivers/clk/qcom/krait-cc.c
+@@ -86,11 +86,11 @@ static int krait_notifier_register(struc
+ static struct clk_hw *
+ krait_add_div(struct device *dev, int id, const char *s, unsigned int offset)
+ {
+-	struct krait_div2_clk *div;
++	struct krait_div_clk *div;
+ 	static struct clk_parent_data p_data[1];
+ 	struct clk_init_data init = {
+ 		.num_parents = ARRAY_SIZE(p_data),
+-		.ops = &krait_div2_clk_ops,
++		.ops = &krait_div_clk_ops,
+ 		.flags = CLK_SET_RATE_PARENT,
+ 	};
+ 	struct clk_hw *clk;
+@@ -101,7 +101,8 @@ krait_add_div(struct device *dev, int id
+ 	if (!div)
+ 		return ERR_PTR(-ENOMEM);
+ 
+-	div->width = 2;
++	div->mask = 0x3;
++	div->divisor = 2;
+ 	div->shift = 6;
+ 	div->lpl = id >= 0;
+ 	div->offset = offset;
diff --git a/target/linux/ipq806x/patches-6.1/123-clk-qcom-gcc-ipq806x-remove-cc_register_board-for.patch b/target/linux/ipq806x/patches-6.1/123-clk-qcom-gcc-ipq806x-remove-cc_register_board-for.patch
new file mode 100644
index 0000000000..0df29a0787
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/123-clk-qcom-gcc-ipq806x-remove-cc_register_board-for.patch
@@ -0,0 +1,31 @@
+From ac84ac819a2e8fd3d87122b452c502a386c54437 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 5 Jul 2022 18:30:18 +0200
+Subject: [PATCH v2 4/4] clk: qcom: gcc-ipq806x: remove cc_register_board for
+ pxo and cxo
+
+Now that these clock are defined as fixed clk in dts, we can drop the
+register_board_clk for cxo_board and pxo_board in gcc_ipq806x_probe.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ drivers/clk/qcom/gcc-ipq806x.c | 8 --------
+ 1 file changed, 8 deletions(-)
+
+--- a/drivers/clk/qcom/gcc-ipq806x.c
++++ b/drivers/clk/qcom/gcc-ipq806x.c
+@@ -3386,14 +3386,6 @@ static int gcc_ipq806x_probe(struct plat
+ 	struct regmap *regmap;
+ 	int ret;
+ 
+-	ret = qcom_cc_register_board_clk(dev, "cxo_board", "cxo", 25000000);
+-	if (ret)
+-		return ret;
+-
+-	ret = qcom_cc_register_board_clk(dev, "pxo_board", "pxo", 25000000);
+-	if (ret)
+-		return ret;
+-
+ 	if (of_machine_is_compatible("qcom,ipq8065")) {
+ 		ubi32_core1_src_clk.freq_tbl = clk_tbl_nss_ipq8065;
+ 		ubi32_core2_src_clk.freq_tbl = clk_tbl_nss_ipq8065;
diff --git a/target/linux/ipq806x/patches-6.1/850-soc-add-qualcomm-syscon.patch b/target/linux/ipq806x/patches-6.1/850-soc-add-qualcomm-syscon.patch
new file mode 100644
index 0000000000..397c4481ab
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/850-soc-add-qualcomm-syscon.patch
@@ -0,0 +1,121 @@
+From: Christian Lamparter <chunkeey at googlemail.com>
+Subject: SoC: add qualcomm syscon
+--- a/drivers/soc/qcom/Makefile
++++ b/drivers/soc/qcom/Makefile
+@@ -23,6 +23,7 @@ obj-$(CONFIG_QCOM_SOCINFO)	+= socinfo.o
+ obj-$(CONFIG_QCOM_SPM)		+= spm.o
+ obj-$(CONFIG_QCOM_STATS)	+= qcom_stats.o
+ obj-$(CONFIG_QCOM_WCNSS_CTRL) += wcnss_ctrl.o
++obj-$(CONFIG_QCOM_TCSR)	 += qcom_tcsr.o
+ obj-$(CONFIG_QCOM_APR) += apr.o
+ obj-$(CONFIG_QCOM_LLCC) += llcc-qcom.o
+ obj-$(CONFIG_QCOM_RPMHPD) += rpmhpd.o
+--- a/drivers/soc/qcom/Kconfig
++++ b/drivers/soc/qcom/Kconfig
+@@ -213,6 +213,13 @@ config QCOM_STATS
+ 	  various SoC level low power modes statistics and export to debugfs
+ 	  interface.
+ 
++config QCOM_TCSR
++	tristate "QCOM Top Control and Status Registers"
++	depends on ARCH_QCOM
++	help
++	  Say y here to enable TCSR support.  The TCSR provides control
++	  functions for various peripherals.
++
+ config QCOM_WCNSS_CTRL
+ 	tristate "Qualcomm WCNSS control driver"
+ 	depends on ARCH_QCOM || COMPILE_TEST
+--- /dev/null
++++ b/drivers/soc/qcom/qcom_tcsr.c
+@@ -0,0 +1,64 @@
++/*
++ * Copyright (c) 2014, The Linux foundation. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License rev 2 and
++ * only rev 2 as published by the free Software foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or fITNESS fOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ */
++
++#include <linux/clk.h>
++#include <linux/err.h>
++#include <linux/io.h>
++#include <linux/module.h>
++#include <linux/of.h>
++#include <linux/of_platform.h>
++#include <linux/platform_device.h>
++
++#define TCSR_USB_PORT_SEL	0xb0
++
++static int tcsr_probe(struct platform_device *pdev)
++{
++	struct resource *res;
++	const struct device_node *node = pdev->dev.of_node;
++	void __iomem *base;
++	u32 val;
++
++	res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
++	base = devm_ioremap_resource(&pdev->dev, res);
++	if (IS_ERR(base))
++		return PTR_ERR(base);
++
++	if (!of_property_read_u32(node, "qcom,usb-ctrl-select", &val)) {
++		dev_err(&pdev->dev, "setting usb port select = %d\n", val);
++		writel(val, base + TCSR_USB_PORT_SEL);
++	}
++
++	return 0;
++}
++
++static const struct of_device_id tcsr_dt_match[] = {
++	{ .compatible = "qcom,tcsr", },
++	{ },
++};
++
++MODULE_DEVICE_TABLE(of, tcsr_dt_match);
++
++static struct platform_driver tcsr_driver = {
++	.driver = {
++		.name		= "tcsr",
++		.owner		= THIS_MODULE,
++		.of_match_table	= tcsr_dt_match,
++	},
++	.probe = tcsr_probe,
++};
++
++module_platform_driver(tcsr_driver);
++
++MODULE_AUTHOR("Andy Gross <agross at codeaurora.org>");
++MODULE_DESCRIPTION("QCOM TCSR driver");
++MODULE_LICENSE("GPL v2");
+--- /dev/null
++++ b/include/dt-bindings/soc/qcom,tcsr.h
+@@ -0,0 +1,23 @@
++/* Copyright (c) 2014, The Linux Foundation. All rights reserved.
++ *
++ * This program is free software; you can redistribute it and/or modify
++ * it under the terms of the GNU General Public License version 2 and
++ * only version 2 as published by the Free Software Foundation.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ */
++#ifndef __DT_BINDINGS_QCOM_TCSR_H
++#define __DT_BINDINGS_QCOM_TCSR_H
++
++#define TCSR_USB_SELECT_USB3_P0		0x1
++#define TCSR_USB_SELECT_USB3_P1		0x2
++#define TCSR_USB_SELECT_USB3_DUAL	0x3
++
++/* TCSR A/B REG */
++#define IPQ806X_TCSR_REG_A_ADM_CRCI_MUX_SEL     0
++#define IPQ806X_TCSR_REG_B_ADM_CRCI_MUX_SEL     1
++
++#endif
diff --git a/target/linux/ipq806x/patches-6.1/900-arm-add-cmdline-override.patch b/target/linux/ipq806x/patches-6.1/900-arm-add-cmdline-override.patch
new file mode 100644
index 0000000000..c9583549d0
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/900-arm-add-cmdline-override.patch
@@ -0,0 +1,37 @@
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -1589,6 +1589,14 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+ 
+ endchoice
+ 
++config CMDLINE_OVERRIDE
++	bool "Use alternative cmdline from device tree"
++	help
++	  Some bootloaders may have uneditable bootargs. While CMDLINE_FORCE can
++	  be used, this is not a good option for kernels that are shared across
++	  devices. This setting enables using "chosen/cmdline-override" as the
++	  cmdline if it exists in the device tree.
++
+ config CMDLINE
+ 	string "Default kernel command string"
+ 	default ""
+--- a/drivers/of/fdt.c
++++ b/drivers/of/fdt.c
+@@ -1187,6 +1187,17 @@ int __init early_init_dt_scan_chosen(cha
+ 	if (p != NULL && l > 0)
+ 		strlcat(cmdline, p, min_t(int, strlen(cmdline) + (int)l, COMMAND_LINE_SIZE));
+ 
++    /* CONFIG_CMDLINE_OVERRIDE is used to fallback to a different
++     * device tree option of chosen/bootargs-override. This is
++     * helpful on boards where u-boot sets bootargs, and is unable
++     * to be modified.
++     */
++#ifdef CONFIG_CMDLINE_OVERRIDE
++	p = of_get_flat_dt_prop(node, "bootargs-override", &l);
++	if (p != NULL && l > 0)
++		strlcpy(cmdline, p, min((int)l, COMMAND_LINE_SIZE));
++#endif
++
+ handle_cmdline:
+ 	/*
+ 	 * CONFIG_CMDLINE is meant to be a default in case nothing else
diff --git a/target/linux/ipq806x/patches-6.1/901-01-ARM-decompressor-support-memory-start-validation-.patch b/target/linux/ipq806x/patches-6.1/901-01-ARM-decompressor-support-memory-start-validation-.patch
new file mode 100644
index 0000000000..04e2a0c57e
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/901-01-ARM-decompressor-support-memory-start-validation-.patch
@@ -0,0 +1,75 @@
+From 2f86b9b71a11f86e3d850214ab781ebb17d7260e Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Fri, 19 Jan 2024 19:48:30 +0100
+Subject: [PATCH v2 1/2] ARM: decompressor: support memory start validation for
+ appended DTB
+
+There is currently a problem with a very specific sets of kernel config
+and AUTO_ZRELADDR.
+
+For the most common case AUTO_ZRELADDR check the PC register and
+calculate the start of the physical memory. Then fdt_check_mem_start is
+called to make sure the detected value makes sense by comparing it with
+what is present in DTB in the memory nodes and if additional fixup are
+required with the use of linux,usable-memory-range in the chosen node to
+hardcode usable memory range in case some reserved space needs to be
+addressed. With the help of this function the right address is
+calculated and the kernel correctly decompress and loads.
+
+Things starts to become problematic when in the mix,
+CONFIG_ARM_APPENDED_DTB is used. This is a particular kernel config is
+used when legacy systems doesn't support passing a DTB directly and a
+DTB is appended at the end of the image.
+
+In such case, fdt_check_mem_start is skipped in AUTO_ZRELADDR iteration
+as the appended DTB can be augumented later with ATAGS passed from the
+bootloader (if CONFIG_ARM_ATAG_DTB_COMPAT is enabled).
+
+The main problem and what this patch address is the fact that
+fdt_check_mem_start is never called later when the appended DTB is
+augumented, hence any fixup and validation is not done making AUTO_ZRELADDR
+detection inconsistent and most of the time wrong.
+
+Add support in head.S for this by checking if AUTO_ZRELADDR is enabled
+and calling fdt_check_mem_start with the appended DTB and the augumented
+values permitting legacy device to provide info in DTB instead of
+disabling AUTO_ZRELADDR and hardcoding the physical address offsets.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Reviewed-by: Geert Uytterhoeven <geert+renesas at glider.be>
+Reviewed-by: Linus Walleij <linus.walleij at linaro.org>
+---
+ arch/arm/boot/compressed/head.S | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/arch/arm/boot/compressed/head.S
++++ b/arch/arm/boot/compressed/head.S
+@@ -443,6 +443,28 @@ restart:	adr	r0, LC1
+ 		add	r6, r6, r5
+ 		add	r10, r10, r5
+ 		add	sp, sp, r5
++
++#ifdef CONFIG_AUTO_ZRELADDR
++		/*
++		 * Validate calculated start of physical memory with appended DTB.
++		 * In the first iteration for physical memory start calculation,
++		 * we skipped validating it as it could have been augumented by
++		 * ATAGS stored at an offset from the same start of physical memory.
++		 *
++		 * We now have parsed them and augumented the appended DTB if asked
++		 * so we can finally validate the start of physical memory.
++		 *
++		 * This is needed to apply additional fixup with
++		 * linux,usable-memory-range or to make sure AUTO_ZRELADDR detected
++		 * the correct value.
++		 */
++		sub	r0, r4, #TEXT_OFFSET	@ revert to base address
++		mov	r1, r8			@ use appended DTB
++		bl	fdt_check_mem_start
++
++		/* Determine final kernel image address. */
++		add	r4, r0, #TEXT_OFFSET
++#endif
+ dtb_check_done:
+ #endif
+ 
diff --git a/target/linux/ipq806x/patches-6.1/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch b/target/linux/ipq806x/patches-6.1/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch
new file mode 100644
index 0000000000..2e4c4de545
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/901-02-ARM-decompressor-add-option-to-ignore-MEM-ATAGs.patch
@@ -0,0 +1,54 @@
+From 781d7cd4c3364e9d38fa12a342c5ad4c7e33a5ba Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Fri, 19 Jan 2024 20:33:10 +0100
+Subject: [PATCH v2 2/2] ARM: decompressor: add option to ignore MEM ATAGs
+
+Some bootloaders can pass broken MEM ATAGs that provide hardcoded
+information about mounted RAM size and physical location.
+Example booloader provide RAM of size 1.7Gb but actual mounted RAM
+size is 512Mb causing kernel panic.
+
+Add option CONFIG_ARM_ATAG_DTB_COMPAT_IGNORE_MEM to ignore these ATAG
+and not augument appended DTB memory node.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Acked-by: Linus Walleij <linus.walleij at linaro.org>
+---
+ arch/arm/Kconfig                        | 12 ++++++++++++
+ arch/arm/boot/compressed/atags_to_fdt.c |  4 ++++
+ 2 files changed, 16 insertions(+)
+
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -1570,6 +1570,18 @@ config ARM_ATAG_DTB_COMPAT
+ 	  bootloaders, this option allows zImage to extract the information
+ 	  from the ATAG list and store it at run time into the appended DTB.
+ 
++config ARM_ATAG_DTB_COMPAT_IGNORE_MEM
++	bool "Ignore MEM ATAG information from bootloader"
++	depends on ARM_ATAG_DTB_COMPAT
++	help
++	  Some bootloaders can pass broken MEM ATAGs that provide hardcoded
++	  information about mounted RAM size and physical location.
++	  Example booloader provide RAM of size 1.7Gb but actual mounted RAM
++	  size is 512Mb causing kernel panic.
++
++	  Enable this option if MEM ATAGs should be ignored and the memory
++	  node in the appended DTB should NOT be augumented.
++
+ choice
+ 	prompt "Kernel command line type" if ARM_ATAG_DTB_COMPAT
+ 	default ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER
+--- a/arch/arm/boot/compressed/atags_to_fdt.c
++++ b/arch/arm/boot/compressed/atags_to_fdt.c
+@@ -169,6 +169,10 @@ int atags_to_fdt(void *atag_list, void *
+ 				setprop_string(fdt, "/chosen", "bootargs",
+ 					       atag->u.cmdline.cmdline);
+ 		} else if (atag->hdr.tag == ATAG_MEM) {
++			/* Bootloader MEM ATAG are broken and should be ignored */
++			if (IS_ENABLED(CONFIG_ARM_ATAG_DTB_COMPAT_IGNORE_MEM))
++				continue;
++
+ 			if (memcount >= sizeof(mem_reg_property)/4)
+ 				continue;
+ 			if (!atag->u.mem.size)
diff --git a/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch b/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
new file mode 100644
index 0000000000..60b80fefe1
--- /dev/null
+++ b/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
@@ -0,0 +1,197 @@
+From 13bb6d8dd9138927950a520a288401db82871dc9 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sun, 21 Jan 2024 23:36:57 +0100
+Subject: [PATCH] ARM: decompressor: support for ATAGs rootblock parsing
+
+The command-line arguments provided by the boot loader will be
+appended to a new device tree property: bootloader-args.
+
+If there is a property "append-rootblock" in DT under /chosen
+and a root= option in bootloaders command line it will be parsed
+and added to DT bootargs with the form: <append-rootblock>XX.
+
+This is usefull in dual boot systems, to get the current root partition
+without afecting the rest of the system.
+
+Signed-off-by: Adrian Panella <ianchi74 at outlook.com>
+[ reworked to a cleaner patch ]
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ arch/arm/Kconfig                        |  10 +++
+ arch/arm/boot/compressed/atags_to_fdt.c | 102 ++++++++++++++++++++++--
+ init/main.c                             |  12 +++
+ 3 files changed, 117 insertions(+), 7 deletions(-)
+
+--- a/arch/arm/Kconfig
++++ b/arch/arm/Kconfig
+@@ -1599,6 +1599,16 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+ 	  The command-line arguments provided by the boot loader will be
+ 	  appended to the the device tree bootargs property.
+ 
++config ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE
++	bool "Append rootblock parsing bootloader's kernel arguments"
++	help
++	  The command-line arguments provided by the boot loader will be
++	  appended to a new device tree property: bootloader-args.
++
++	  If there is a property "append-rootblock" in DT under /chosen
++	  and a root= option in bootloaders command line it will be parsed
++	  and added to DT bootargs with the form: <append-rootblock>XX.
++
+ endchoice
+ 
+ config CMDLINE_OVERRIDE
+--- a/arch/arm/boot/compressed/atags_to_fdt.c
++++ b/arch/arm/boot/compressed/atags_to_fdt.c
+@@ -3,7 +3,8 @@
+ #include <asm/setup.h>
+ #include <libfdt.h>
+ 
+-#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND)
++#if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND) || \
++	defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE)
+ #define do_extend_cmdline 1
+ #else
+ #define do_extend_cmdline 0
+@@ -69,6 +70,83 @@ static uint32_t get_cell_size(const void
+ 	return cell_size;
+ }
+ 
++/**
++ * taken from arch/x86/boot/string.c
++ * local_strstr - Find the first substring in a %NUL terminated string
++ * @s1: The string to be searched
++ * @s2: The string to search for
++ */
++static char *local_strstr(const char *s1, const char *s2)
++{
++	size_t l1, l2;
++
++	l2 = strlen(s2);
++	if (!l2)
++		return (char *)s1;
++	l1 = strlen(s1);
++	while (l1 >= l2) {
++		l1--;
++		if (!memcmp(s1, s2, l2))
++			return (char *)s1;
++		s1++;
++	}
++	return NULL;
++}
++
++static char *append_rootblock(char *dest, const char *str, int len, void *fdt)
++{
++	char *ptr, *end, *tmp;
++	const char *root="root=";
++	const char *find_rootblock;
++	int i, l;
++	const char *rootblock;
++
++	find_rootblock = getprop(fdt, "/chosen", "find-rootblock", &l);
++	if (!find_rootblock)
++		find_rootblock = root;
++
++	/* ARM doesn't have __HAVE_ARCH_STRSTR, so it was copied from x86 */
++	ptr = local_strstr(str, find_rootblock);
++	if (!ptr)
++		return dest;
++
++	end = strchr(ptr, ' ');
++	end = end ? (end - 1) : (strchr(ptr, 0) - 1);
++
++	/* Some boards ubi.mtd=XX,ZZZZ, so let's check for '," too. */
++	tmp = strchr(ptr, ',');
++	if (tmp)
++		end = end < tmp ? end : tmp - 1;
++
++	/*
++	 * find partition number
++	 * (assumes format root=/dev/mtdXX | /dev/mtdblockXX | yy:XX | ubi.mtd=XX,ZZZZ )
++	 */
++	for (i = 0; end >= ptr && *end >= '0' && *end <= '9'; end--, i++);
++
++	ptr = end + 1;
++
++	/* if append-rootblock property is set use it to append to command line */
++	rootblock = getprop(fdt, "/chosen", "append-rootblock", &l);
++	if (rootblock != NULL) {
++		if (*dest != ' ') {
++			*dest = ' ';
++			dest++;
++			len++;
++		}
++
++		if (len + l + i <= COMMAND_LINE_SIZE) {
++			memcpy(dest, rootblock, l);
++			dest += l - 1;
++
++			memcpy(dest, ptr, i);
++			dest += i;
++		}
++	}
++
++	return dest;
++}
++
+ static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
+ {
+ 	char cmdline[COMMAND_LINE_SIZE];
+@@ -86,13 +164,23 @@ static void merge_fdt_bootargs(void *fdt
+ 			ptr += len - 1;
+ 		}
+ 
+-	/* and append the ATAG_CMDLINE */
+ 	if (fdt_cmdline) {
+-		len = strlen(fdt_cmdline);
+-		if (ptr - cmdline + len + 2 < COMMAND_LINE_SIZE) {
+-			*ptr++ = ' ';
+-			memcpy(ptr, fdt_cmdline, len);
+-			ptr += len;
++		if (IS_ENABLED(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE)) {
++			/*
++			* save original bootloader args
++			* and append ubi.mtd with root partition number
++			* to current cmdline
++			*/
++			setprop_string(fdt, "/chosen", "bootloader-args", fdt_cmdline);
++			ptr = append_rootblock(ptr, fdt_cmdline, len, fdt);
++		} else {
++			/* and append the ATAG_CMDLINE */
++			len = strlen(fdt_cmdline);
++			if (ptr - cmdline + len + 2 < COMMAND_LINE_SIZE) {
++				*ptr++ = ' ';
++				memcpy(ptr, fdt_cmdline, len);
++				ptr += len;
++			}
+ 		}
+ 	}
+ 	*ptr = '\0';
+--- a/init/main.c
++++ b/init/main.c
+@@ -28,6 +28,7 @@
+ #include <linux/initrd.h>
+ #include <linux/memblock.h>
+ #include <linux/acpi.h>
++#include <linux/of.h>
+ #include <linux/bootconfig.h>
+ #include <linux/console.h>
+ #include <linux/nmi.h>
+@@ -995,6 +996,17 @@ asmlinkage __visible void __init __no_sa
+ 	pr_notice("Kernel command line: %s\n", saved_command_line);
+ 	/* parameters may set static keys */
+ 	jump_label_init();
++
++	/* Show bootloader's original command line for reference */
++	if (IS_ENABLED(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_MANGLE) && of_chosen) {
++		const char *prop = of_get_property(of_chosen, "bootloader-args", NULL);
++
++		if(prop)
++			pr_notice("Bootloader command line (ignored): %s\n", prop);
++		else
++			pr_notice("Bootloader command line not present\n");
++	}
++
+ 	parse_early_param();
+ 	after_dashes = parse_args("Booting kernel",
+ 				  static_command_line, __start___param,



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:12 -0400
Subject: [openwrt/openwrt]  ltq-vdsl-vr11: add patch fixing compilation with
 kernel 6.6
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22807.1712095485.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3b7169f78606fd7818756912953a7df48df8a3d9

commit 3b7169f78606fd7818756912953a7df48df8a3d9
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 12:25:47 2024 +0100

    ltq-vdsl-vr11: add patch fixing compilation with kernel 6.6
    
    Add patch fixing compilation with kernel 6.6.
    
    class_create now require only the name instead of the module ownership
    reference.
    
    Also the kernel enabled checks for enum.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/kernel/lantiq/ltq-vdsl-vr11/Makefile       |  2 +-
 .../patches/130-support-kernel-6.6.patch           | 97 ++++++++++++++++++++++
 2 files changed, 98 insertions(+), 1 deletion(-)

diff --git a/package/kernel/lantiq/ltq-vdsl-vr11/Makefile b/package/kernel/lantiq/ltq-vdsl-vr11/Makefile
index 11f96d744a..0fa6011cfc 100644
--- a/package/kernel/lantiq/ltq-vdsl-vr11/Makefile
+++ b/package/kernel/lantiq/ltq-vdsl-vr11/Makefile
@@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ltq-vdsl-vr11
 PKG_VERSION:=4.23.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_BASE_NAME:=dsl_cpe_api
 
 UGW_VERSION=8.5.2.10
diff --git a/package/kernel/lantiq/ltq-vdsl-vr11/patches/130-support-kernel-6.6.patch b/package/kernel/lantiq/ltq-vdsl-vr11/patches/130-support-kernel-6.6.patch
new file mode 100644
index 0000000000..4e127cd907
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr11/patches/130-support-kernel-6.6.patch
@@ -0,0 +1,97 @@
+--- a/src/common/drv_dsl_cpe_os_linux.c
++++ b/src/common/drv_dsl_cpe_os_linux.c
+@@ -431,7 +431,11 @@ static int DSL_DRV_DevNodeInit(DSL_void_
+    }
+ 
+    /* create a device class used for createing /dev/ entries */
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+    dsl_class = class_create(THIS_MODULE, DRV_DSL_CPE_API_DEV_NAME);
++#else
++   dsl_class = class_create(DRV_DSL_CPE_API_DEV_NAME);
++#endif
+    if (IS_ERR(dsl_class)) {
+       DSL_DEBUG(DSL_DBG_ERR,
+          (DSL_NULL, SYS_DBG_ERR""DSL_DRV_CRLF DSL_DRV_CRLF
+--- a/src/common/drv_dsl_cpe_api.c
++++ b/src/common/drv_dsl_cpe_api.c
+@@ -1370,7 +1370,8 @@ DSL_boolean_t DSL_DRV_BondingEnableCheck
+       nDslMode = DSL_DRV_VRX_DslModeIndexGet(pContext);
+ 
+       DSL_CHECK_DSLMODE(nDslMode);
+-      DSL_CHECK_ERR_CODE();
++      if (nErrCode != DSL_SUCCESS)
++         return bPafEnable;
+ 
+       /* Bonding is always enabled for both lines/devices together so using the
+          configuration from the current line/device is ok. */
+@@ -3886,7 +3887,7 @@ DSL_Error_t DSL_DRV_RetxStatisticsGet(
+ 
+    DSL_CHECK_POINTER(pContext, pData);
+    DSL_CHECK_ERR_CODE();
+-   DSL_CHECK_DIRECTION(pData->nDirection);
++   DSL_CHECK_ATU_DIRECTION(pData->nDirection);
+    DSL_CHECK_ERR_CODE();
+ 
+    DSL_DEBUG(DSL_DBG_MSG,
+--- a/src/device/drv_dsl_cpe_device_vrx.c
++++ b/src/device/drv_dsl_cpe_device_vrx.c
+@@ -2760,7 +2760,7 @@ static DSL_Error_t DSL_DRV_VRX_ChannelSt
+    DSL_CHECK_CHANNEL_RANGE(nChannel);
+    DSL_CHECK_ERR_CODE();
+ 
+-   DSL_CHECK_ATU_DIRECTION(nDirection);
++   DSL_CHECK_DIRECTION(nDirection);
+    DSL_CHECK_ERR_CODE();
+ 
+    DSL_DEBUG(DSL_DBG_MSG,
+@@ -2807,8 +2807,8 @@ static DSL_Error_t DSL_DRV_VRX_ChannelSt
+       if (nVerCheck >= DSL_VERSION_EQUAL)
+       {
+          bRocEnable = nDirection == DSL_UPSTREAM ?
+-                     (DSL_boolean_t)sAckLs.FUS.ROCstatus_us :
+-                     (DSL_boolean_t)sAckLs.FDS.ROCstatus_ds;
++                     (DSL_FeatureSupport_t)sAckLs.FUS.ROCstatus_us :
++                     (DSL_FeatureSupport_t)sAckLs.FDS.ROCstatus_ds;
+ 
+          DSL_CTX_WRITE_SCALAR(
+             pContext, nErrCode, lineFeatureDataSts[nDirection].bRocEnable,
+@@ -4885,7 +4885,7 @@ DSL_Error_t DSL_DRV_DEV_FwDownload(
+ 
+          /* Set VRX device FW mode*/
+          fwModeSelect.firmwareFeatures.nPlatformId = nFwFeatures.nPlatformId;
+-         fwModeSelect.firmwareFeatures.eFirmwareXdslModes = nFwFeatures.nFirmwareXdslModes;
++         fwModeSelect.firmwareFeatures.eFirmwareXdslModes = (IOCTL_MEI_firmwareXdslMode_t)nFwFeatures.nFirmwareXdslModes;
+ 
+          if( DSL_DRV_VRX_InternalFwModeCtrlSet((MEI_DYN_CNTRL_T*)dev, &fwModeSelect) != 0 )
+          {
+@@ -7420,7 +7420,7 @@ DSL_Error_t DSL_DRV_VRX_ChannelStatusGet
+ {
+    DSL_Error_t nErrCode = DSL_SUCCESS;
+ 
+-   DSL_CHECK_ATU_DIRECTION(nDirection);
++   DSL_CHECK_DIRECTION(nDirection);
+    DSL_CHECK_ERR_CODE();
+ 
+    DSL_CTX_READ_SCALAR(pContext, nErrCode,
+--- a/src/bnd/drv_dsl_cpe_api_bnd_vrx.c
++++ b/src/bnd/drv_dsl_cpe_api_bnd_vrx.c
+@@ -480,7 +480,8 @@ DSL_Error_t DSL_DRV_BND_DEV_PafBndStatus
+    else
+    {
+       pData->nRemotePafSupported =
+-         pafHsStatus.bPafEnable ? DSL_BND_ENABLE_ON : DSL_BND_ENABLE_OFF;
++         pafHsStatus.bPafEnable ? (DSL_BND_Supported_t)DSL_BND_ENABLE_ON :
++                                  (DSL_BND_Supported_t)DSL_BND_ENABLE_OFF;
+    }
+ 
+    DSL_DEBUG(DSL_DBG_MSG, (pContext,
+@@ -517,7 +518,8 @@ DSL_Error_t DSL_DRV_BND_DEV_ImapBndStatu
+    else
+    {
+       pData->nRemoteImapSupported =
+-         imapHsStatus.bImapEnable ? DSL_BND_ENABLE_ON : DSL_BND_ENABLE_OFF;
++         imapHsStatus.bImapEnable ? (DSL_BND_Supported_t)DSL_BND_ENABLE_ON :
++                                    (DSL_BND_Supported_t)DSL_BND_ENABLE_OFF;
+    }
+ 
+    DSL_DEBUG(DSL_DBG_MSG, (pContext,



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:13 -0400
Subject: [openwrt/openwrt]  ltq-vdsl-vr11-mei: add patch fixing compilation
 with kernel 6.6
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22808.1712095731.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/844a41f7455ba3e2f4abfb2723ebfaf5a0f1815e

commit 844a41f7455ba3e2f4abfb2723ebfaf5a0f1815e
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 12:28:35 2024 +0100

    ltq-vdsl-vr11-mei: add patch fixing compilation with kernel 6.6
    
    Add patch fixing compilation with kernel 6.6.
    
    class_create now require only the name instead of the module ownership
    reference.
    
    Also the kernel enabled checks for enum.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/kernel/lantiq/ltq-vdsl-vr11-mei/Makefile   |  2 +-
 .../patches/130-support-kernel-6.6.patch           | 35 ++++++++++++++++++++++
 2 files changed, 36 insertions(+), 1 deletion(-)

diff --git a/package/kernel/lantiq/ltq-vdsl-vr11-mei/Makefile b/package/kernel/lantiq/ltq-vdsl-vr11-mei/Makefile
index 7b8a948179..3e01ee6373 100644
--- a/package/kernel/lantiq/ltq-vdsl-vr11-mei/Makefile
+++ b/package/kernel/lantiq/ltq-vdsl-vr11-mei/Makefile
@@ -9,7 +9,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ltq-vdsl-vr11-mei
 PKG_VERSION:=1.11.1
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 PKG_BASE_NAME:=dsl_cpe_mei
 
 UGW_VERSION=8.5.2.10
diff --git a/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/130-support-kernel-6.6.patch b/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/130-support-kernel-6.6.patch
new file mode 100644
index 0000000000..407afc9bf2
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vdsl-vr11-mei/patches/130-support-kernel-6.6.patch
@@ -0,0 +1,35 @@
+--- a/src/drv_mei_cpe_linux.c
++++ b/src/drv_mei_cpe_linux.c
+@@ -2779,7 +2779,11 @@ static int MEI_InitModuleRegCharDev(cons
+             ("Using major number %d" MEI_DRV_CRLF, MAJOR(mei_devt)));
+       }
+ 
++#if LINUX_VERSION_CODE < KERNEL_VERSION(6, 4, 0)
+       mei_class = class_create(THIS_MODULE, devName);
++#else
++      mei_class = class_create(devName);
++#endif
+       if (IS_ERR(mei_class))
+       {
+          PRN_DBG_USR_NL( MEI_DRV,MEI_DRV_PRN_LEVEL_HIGH,
+--- a/src/drv_mei_cpe_api_atm_ptm_intern.c
++++ b/src/drv_mei_cpe_api_atm_ptm_intern.c
+@@ -223,7 +223,7 @@ IFX_int32_t MEI_TcRequest(void *data)
+       pMeiDynCntrl->pDfeX        = NULL;
+       pMeiDynCntrl->pMeiDev      = pMeiDev;
+ 
+-      argsTcRequest.request_type = request_type;
++      argsTcRequest.request_type = (MEI_TC_RequestType_t)request_type;
+       argsTcRequest.is_bonding = MEI_BND_EnableGet(pMeiDynCntrl);
+ 
+       if (MEI_DFEX_ENTITIES == 1 && argsTcRequest.is_bonding == IFX_TRUE)
+@@ -398,7 +398,8 @@ IFX_int32_t MEI_InternalLineTCModeSwitch
+       pMeiDynCntrl->pDfeX        = NULL;
+       pMeiDynCntrl->pMeiDev      = MEIX_Cntrl[nEntity]->MeiDevice[nInstance];
+ 
+-      argsTcRequest.request_type = bPowerUp ? MEI_TC_REQUEST_PTM : MEI_TC_REQUEST_OFF;
++      argsTcRequest.request_type = bPowerUp ? (MEI_TC_RequestType_t)MEI_TC_REQUEST_PTM :
++                                              (MEI_TC_RequestType_t)MEI_TC_REQUEST_OFF;
+       argsTcRequest.is_bonding   = pMeiDynCntrl->pMeiDev->bLastBondingStatus;
+ 
+       retVal = MEI_InternalTcRequest(pMeiDynCntrl, &argsTcRequest);



From lede-commits at lists.infradead.org  Tue Apr  2 14:51:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 17:51:11 -0400
Subject: [openwrt/openwrt]  ipq40xx: add kernel 6.6 as a testing kernel
 version
In-Reply-To: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
References: <171209466173.1114439.14371887512549845351@git-01.infra.openwrt.org>
Message-ID: <mailman.22809.1712096008.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/032dad8818b3f4a61b24505c45b38c7706e6260a

commit 032dad8818b3f4a61b24505c45b38c7706e6260a
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Mar 20 11:19:49 2024 +0100

    ipq40xx: add kernel 6.6 as a testing kernel version
    
    Add and enable kernel 6.6 as a testing kernel version.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile
index b494e66e5d..be48e4be52 100644
--- a/target/linux/ipq40xx/Makefile
+++ b/target/linux/ipq40xx/Makefile
@@ -9,6 +9,7 @@ CPU_SUBTYPE:=neon-vfpv4
 SUBTARGETS:=generic chromium mikrotik
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 KERNELNAME:=zImage Image dtbs
 



From lede-commits at lists.infradead.org  Tue Apr  2 16:38:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 19:38:46 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.214
In-Reply-To: <171210112639.1239307.7187078258003455603@git-01.infra.openwrt.org>
References: <171210112639.1239307.7187078258003455603@git-01.infra.openwrt.org>
Message-ID: <mailman.22818.1712101131.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/ce37d2c690f762898de968fae6459a92dec01f37

commit ce37d2c690f762898de968fae6459a92dec01f37
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Fri Mar 29 17:34:32 2024 +0100

    kernel: bump 5.10 to 5.10.214
    
    Removed because similar version is upstream:
    x86/patches-5.10/020-x86-Fix-compile-problem.patch
    https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=linux-5.10.y&id=cc6ddd6fa93eb59ac6f63158a6466e45ad0ca94c
    
    Manually adapted the following patch:
    mediatek/patches-5.10/100-dts-update-mt7622-rfb1.patch
    
    Add new configuration symbols for tegra target.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-5.10                                |  4 +--
 ...-clk_core_get_rate_recalc-in-clk_rate_get.patch |  2 +-
 ...Pass-the-full-state-to-CRTC-atomic-enable.patch |  4 +--
 ...Pass-the-full-state-to-CRTC-atomic-begin-.patch |  2 +-
 ...50-0537-clk-Introduce-a-clock-request-API.patch | 20 +++++------
 ...lk-requests-Ignore-if-the-pointer-is-null.patch |  2 +-
 ...s-Dereference-the-request-pointer-after-t.patch |  2 +-
 ...50-0596-clk-Always-clamp-the-rounded-rate.patch |  2 +-
 ...0-0689-drm-automatic-legacy-gamma-support.patch |  2 +-
 target/linux/generic/config-5.10                   |  2 ++
 .../patches-5.10/100-dts-update-mt7622-rfb1.patch  |  8 ++---
 .../patches-5.10/112-dts-fix-bpi64-lan-names.patch |  2 +-
 .../patches-5.10/114-dts-bpi64-disable-rtc.patch   |  2 +-
 .../115-dts-bpi64-add-snand-support.patch          |  2 +-
 .../131-dts-mt7622-add-snand-support.patch         |  2 +-
 .../140-dts-fix-wmac-support-for-mt7622-rfb1.patch |  4 +--
 .../180-dts-mt7622-bpi-r64-add-mt7531-irq.patch    |  2 +-
 .../patches-5.10/331-mt7622-rfb1-enable-bmt.patch  |  2 +-
 ...ediatek-Split-PCIe-node-for-MT2712-MT7622.patch |  4 +--
 ...-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch |  2 +-
 .../910-dts-mt7622-bpi-r64-wifi-eeprom.patch       |  2 +-
 ...rk-for-Gateworks-PLX-PEX860x-switch-with-.patch |  2 +-
 .../patches-5.10/020-x86-Fix-compile-problem.patch | 40 ----------------------
 23 files changed, 39 insertions(+), 77 deletions(-)

diff --git a/include/kernel-5.10 b/include/kernel-5.10
index ee8bf19a0b..a6abd1e14e 100644
--- a/include/kernel-5.10
+++ b/include/kernel-5.10
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.10 = .213
-LINUX_KERNEL_HASH-5.10.213 = 84cf30223239ec3333a5f7b2a7fba2042bba70d1582a139f7543956af871ad80
+LINUX_VERSION-5.10 = .214
+LINUX_KERNEL_HASH-5.10.214 = 40f014d53e81f204f6d2a364aae4201ae07970dd1b70dc602d7c66c1a140f558
diff --git a/target/linux/at91/patches-5.10/247-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch b/target/linux/at91/patches-5.10/247-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
index 436fa18362..c88945ebce 100644
--- a/target/linux/at91/patches-5.10/247-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
+++ b/target/linux/at91/patches-5.10/247-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
@@ -18,7 +18,7 @@ Signed-off-by: Stephen Boyd <sboyd at kernel.org>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -3116,7 +3116,10 @@ static int clk_rate_get(void *data, u64
+@@ -3119,7 +3119,10 @@ static int clk_rate_get(void *data, u64
  {
  	struct clk_core *core = data;
  
diff --git a/target/linux/bcm27xx/patches-5.10/950-0408-drm-atomic-Pass-the-full-state-to-CRTC-atomic-enable.patch b/target/linux/bcm27xx/patches-5.10/950-0408-drm-atomic-Pass-the-full-state-to-CRTC-atomic-enable.patch
index 6a6d565968..e033a10dd9 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0408-drm-atomic-Pass-the-full-state-to-CRTC-atomic-enable.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0408-drm-atomic-Pass-the-full-state-to-CRTC-atomic-enable.patch
@@ -567,7 +567,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/845aa10ef171fc0ea060495efef1
  	unsigned int var;
 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
 +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
-@@ -520,7 +520,7 @@ void mtk_drm_crtc_async_update(struct dr
+@@ -522,7 +522,7 @@ void mtk_drm_crtc_async_update(struct dr
  }
  
  static void mtk_drm_crtc_atomic_enable(struct drm_crtc *crtc,
@@ -576,7 +576,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/845aa10ef171fc0ea060495efef1
  {
  	struct mtk_drm_crtc *mtk_crtc = to_mtk_crtc(crtc);
  	struct mtk_ddp_comp *comp = mtk_crtc->ddp_comp[0];
-@@ -545,7 +545,7 @@ static void mtk_drm_crtc_atomic_enable(s
+@@ -547,7 +547,7 @@ static void mtk_drm_crtc_atomic_enable(s
  }
  
  static void mtk_drm_crtc_atomic_disable(struct drm_crtc *crtc,
diff --git a/target/linux/bcm27xx/patches-5.10/950-0410-drm-atomic-Pass-the-full-state-to-CRTC-atomic-begin-.patch b/target/linux/bcm27xx/patches-5.10/950-0410-drm-atomic-Pass-the-full-state-to-CRTC-atomic-begin-.patch
index 72b8abb20a..888179c610 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0410-drm-atomic-Pass-the-full-state-to-CRTC-atomic-begin-.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0410-drm-atomic-Pass-the-full-state-to-CRTC-atomic-begin-.patch
@@ -574,7 +574,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20201028123222.1732139-2-max
  		if (drm_crtc_vblank_get(crtc) == 0)
 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
 +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
-@@ -578,29 +578,29 @@ static void mtk_drm_crtc_atomic_disable(
+@@ -580,29 +580,29 @@ static void mtk_drm_crtc_atomic_disable(
  }
  
  static void mtk_drm_crtc_atomic_begin(struct drm_crtc *crtc,
diff --git a/target/linux/bcm27xx/patches-5.10/950-0537-clk-Introduce-a-clock-request-API.patch b/target/linux/bcm27xx/patches-5.10/950-0537-clk-Introduce-a-clock-request-API.patch
index 9e07f72b49..bfbc762710 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0537-clk-Introduce-a-clock-request-API.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0537-clk-Introduce-a-clock-request-API.patch
@@ -75,7 +75,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  /***           runtime pm          ***/
  static int clk_pm_runtime_get(struct clk_core *core)
  {
-@@ -1441,10 +1449,14 @@ unsigned long clk_hw_round_rate(struct c
+@@ -1444,10 +1452,14 @@ unsigned long clk_hw_round_rate(struct c
  {
  	int ret;
  	struct clk_rate_request req;
@@ -90,7 +90,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	ret = clk_core_round_rate_nolock(hw->core, &req);
  	if (ret)
  		return 0;
-@@ -1465,6 +1477,7 @@ EXPORT_SYMBOL_GPL(clk_hw_round_rate);
+@@ -1468,6 +1480,7 @@ EXPORT_SYMBOL_GPL(clk_hw_round_rate);
  long clk_round_rate(struct clk *clk, unsigned long rate)
  {
  	struct clk_rate_request req;
@@ -98,7 +98,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	int ret;
  
  	if (!clk)
-@@ -1478,6 +1491,9 @@ long clk_round_rate(struct clk *clk, uns
+@@ -1481,6 +1494,9 @@ long clk_round_rate(struct clk *clk, uns
  	clk_core_get_boundaries(clk->core, &req.min_rate, &req.max_rate);
  	req.rate = rate;
  
@@ -108,7 +108,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	ret = clk_core_round_rate_nolock(clk->core, &req);
  
  	if (clk->exclusive_count)
-@@ -1945,6 +1961,7 @@ static struct clk_core *clk_calc_new_rat
+@@ -1948,6 +1964,7 @@ static struct clk_core *clk_calc_new_rat
  	unsigned long new_rate;
  	unsigned long min_rate;
  	unsigned long max_rate;
@@ -116,7 +116,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	int p_index = 0;
  	long ret;
  
-@@ -1959,6 +1976,9 @@ static struct clk_core *clk_calc_new_rat
+@@ -1962,6 +1979,9 @@ static struct clk_core *clk_calc_new_rat
  
  	clk_core_get_boundaries(core, &min_rate, &max_rate);
  
@@ -126,7 +126,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	/* find the closest rate and parent clk/rate */
  	if (clk_core_can_round(core)) {
  		struct clk_rate_request req;
-@@ -2163,6 +2183,7 @@ static unsigned long clk_core_req_round_
+@@ -2166,6 +2186,7 @@ static unsigned long clk_core_req_round_
  {
  	int ret, cnt;
  	struct clk_rate_request req;
@@ -134,7 +134,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  
  	lockdep_assert_held(&prepare_lock);
  
-@@ -2177,6 +2198,9 @@ static unsigned long clk_core_req_round_
+@@ -2180,6 +2201,9 @@ static unsigned long clk_core_req_round_
  	clk_core_get_boundaries(core, &req.min_rate, &req.max_rate);
  	req.rate = req_rate;
  
@@ -144,7 +144,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	ret = clk_core_round_rate_nolock(core, &req);
  
  	/* restore the protection */
-@@ -2270,6 +2294,9 @@ int clk_set_rate(struct clk *clk, unsign
+@@ -2273,6 +2297,9 @@ int clk_set_rate(struct clk *clk, unsign
  
  	ret = clk_core_set_rate_nolock(clk->core, rate);
  
@@ -154,7 +154,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	if (clk->exclusive_count)
  		clk_core_rate_protect(clk->core);
  
-@@ -2436,6 +2463,99 @@ int clk_set_max_rate(struct clk *clk, un
+@@ -2439,6 +2466,99 @@ int clk_set_max_rate(struct clk *clk, un
  EXPORT_SYMBOL_GPL(clk_set_max_rate);
  
  /**
@@ -254,7 +254,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
   * clk_get_parent - return the parent of a clk
   * @clk: the clk whose parent gets returned
   *
-@@ -3888,6 +4008,7 @@ __clk_register(struct device *dev, struc
+@@ -3891,6 +4011,7 @@ __clk_register(struct device *dev, struc
  		goto fail_parents;
  
  	INIT_HLIST_HEAD(&core->clks);
diff --git a/target/linux/bcm27xx/patches-5.10/950-0572-clk-requests-Ignore-if-the-pointer-is-null.patch b/target/linux/bcm27xx/patches-5.10/950-0572-clk-requests-Ignore-if-the-pointer-is-null.patch
index 2b70e3ccda..92b9bf8cdf 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0572-clk-requests-Ignore-if-the-pointer-is-null.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0572-clk-requests-Ignore-if-the-pointer-is-null.patch
@@ -10,7 +10,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2532,6 +2532,9 @@ void clk_request_done(struct clk_request
+@@ -2535,6 +2535,9 @@ void clk_request_done(struct clk_request
  {
  	struct clk_core *core = req->clk->core;
  
diff --git a/target/linux/bcm27xx/patches-5.10/950-0581-clk-requests-Dereference-the-request-pointer-after-t.patch b/target/linux/bcm27xx/patches-5.10/950-0581-clk-requests-Dereference-the-request-pointer-after-t.patch
index 4b81be57c3..b7a910a718 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0581-clk-requests-Dereference-the-request-pointer-after-t.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0581-clk-requests-Dereference-the-request-pointer-after-t.patch
@@ -15,7 +15,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -2530,10 +2530,11 @@ EXPORT_SYMBOL_GPL(clk_request_start);
+@@ -2533,10 +2533,11 @@ EXPORT_SYMBOL_GPL(clk_request_start);
   */
  void clk_request_done(struct clk_request *req)
  {
diff --git a/target/linux/bcm27xx/patches-5.10/950-0596-clk-Always-clamp-the-rounded-rate.patch b/target/linux/bcm27xx/patches-5.10/950-0596-clk-Always-clamp-the-rounded-rate.patch
index 2a9778401f..ef0b3729cd 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0596-clk-Always-clamp-the-rounded-rate.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0596-clk-Always-clamp-the-rounded-rate.patch
@@ -17,7 +17,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
 
 --- a/drivers/clk/clk.c
 +++ b/drivers/clk/clk.c
-@@ -1344,6 +1344,8 @@ static int clk_core_determine_round_nolo
+@@ -1347,6 +1347,8 @@ static int clk_core_determine_round_nolo
  	if (!core)
  		return 0;
  
diff --git a/target/linux/bcm27xx/patches-5.10/950-0689-drm-automatic-legacy-gamma-support.patch b/target/linux/bcm27xx/patches-5.10/950-0689-drm-automatic-legacy-gamma-support.patch
index a25fb8b72c..6a9e1a6ce3 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0689-drm-automatic-legacy-gamma-support.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0689-drm-automatic-legacy-gamma-support.patch
@@ -357,7 +357,7 @@ Link: https://patchwork.freedesktop.org/patch/msgid/20201211114237.213288-2-tomi
  static const struct drm_plane_helper_funcs ingenic_drm_plane_helper_funcs = {
 --- a/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
 +++ b/drivers/gpu/drm/mediatek/mtk_drm_crtc.c
-@@ -622,7 +622,6 @@ static const struct drm_crtc_funcs mtk_c
+@@ -624,7 +624,6 @@ static const struct drm_crtc_funcs mtk_c
  	.reset			= mtk_drm_crtc_reset,
  	.atomic_duplicate_state	= mtk_drm_crtc_duplicate_state,
  	.atomic_destroy_state	= mtk_drm_crtc_destroy_state,
diff --git a/target/linux/generic/config-5.10 b/target/linux/generic/config-5.10
index c9a49cd1e0..bc9fbbeaec 100644
--- a/target/linux/generic/config-5.10
+++ b/target/linux/generic/config-5.10
@@ -6098,6 +6098,8 @@ CONFIG_TCP_CONG_CUBIC=y
 # CONFIG_TCS3414 is not set
 # CONFIG_TCS3472 is not set
 # CONFIG_TEE is not set
+# CONFIG_TEGRA210_ADMA is not set
+# CONFIG_TEGRA_ACONNECT is not set
 # CONFIG_TEGRA_AHB is not set
 # CONFIG_TEGRA_HOST1X is not set
 # CONFIG_TEHUTI is not set
diff --git a/target/linux/mediatek/patches-5.10/100-dts-update-mt7622-rfb1.patch b/target/linux/mediatek/patches-5.10/100-dts-update-mt7622-rfb1.patch
index 95baa0019d..6a66bb7c5a 100644
--- a/target/linux/mediatek/patches-5.10/100-dts-update-mt7622-rfb1.patch
+++ b/target/linux/mediatek/patches-5.10/100-dts-update-mt7622-rfb1.patch
@@ -43,10 +43,10 @@
  	memory at 40000000 {
 -		reg = <0 0x40000000 0 0x20000000>;
 +		reg = <0 0x40000000 0 0x40000000>;
+ 		device_type = "memory";
  	};
  
- 	reg_1p8v: regulator-1p8v {
-@@ -132,22 +130,22 @@
+@@ -133,22 +131,22 @@
  
  				port at 0 {
  					reg = <0>;
@@ -73,7 +73,7 @@
  				};
  
  				port at 4 {
-@@ -236,15 +234,28 @@
+@@ -237,15 +235,28 @@
  
  &pcie {
  	pinctrl-names = "default";
@@ -103,7 +103,7 @@
  	/* eMMC is shared pin with parallel NAND */
  	emmc_pins_default: emmc-pins-default {
  		mux {
-@@ -511,11 +522,11 @@
+@@ -512,11 +523,11 @@
  };
  
  &sata {
diff --git a/target/linux/mediatek/patches-5.10/112-dts-fix-bpi64-lan-names.patch b/target/linux/mediatek/patches-5.10/112-dts-fix-bpi64-lan-names.patch
index 6ce85efde9..e88913c309 100644
--- a/target/linux/mediatek/patches-5.10/112-dts-fix-bpi64-lan-names.patch
+++ b/target/linux/mediatek/patches-5.10/112-dts-fix-bpi64-lan-names.patch
@@ -8,7 +8,7 @@
  	};
  
  	chosen {
-@@ -160,22 +161,22 @@
+@@ -161,22 +162,22 @@
  
  				port at 1 {
  					reg = <1>;
diff --git a/target/linux/mediatek/patches-5.10/114-dts-bpi64-disable-rtc.patch b/target/linux/mediatek/patches-5.10/114-dts-bpi64-disable-rtc.patch
index 261579bf37..ea112f7979 100644
--- a/target/linux/mediatek/patches-5.10/114-dts-bpi64-disable-rtc.patch
+++ b/target/linux/mediatek/patches-5.10/114-dts-bpi64-disable-rtc.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -559,12 +559,16 @@
+@@ -560,12 +560,16 @@
  	status = "okay";
  };
  
diff --git a/target/linux/mediatek/patches-5.10/115-dts-bpi64-add-snand-support.patch b/target/linux/mediatek/patches-5.10/115-dts-bpi64-add-snand-support.patch
index 39d81bd5d5..f66cdb7dc2 100644
--- a/target/linux/mediatek/patches-5.10/115-dts-bpi64-add-snand-support.patch
+++ b/target/linux/mediatek/patches-5.10/115-dts-bpi64-add-snand-support.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -259,14 +259,32 @@
+@@ -260,14 +260,32 @@
  	status = "disabled";
  };
  
diff --git a/target/linux/mediatek/patches-5.10/131-dts-mt7622-add-snand-support.patch b/target/linux/mediatek/patches-5.10/131-dts-mt7622-add-snand-support.patch
index b337c9edcb..a9433c378e 100644
--- a/target/linux/mediatek/patches-5.10/131-dts-mt7622-add-snand-support.patch
+++ b/target/linux/mediatek/patches-5.10/131-dts-mt7622-add-snand-support.patch
@@ -23,7 +23,7 @@
  			     "mediatek,mt8173-nor";
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -529,6 +529,55 @@
+@@ -530,6 +530,55 @@
  	status = "disabled";
  };
  
diff --git a/target/linux/mediatek/patches-5.10/140-dts-fix-wmac-support-for-mt7622-rfb1.patch b/target/linux/mediatek/patches-5.10/140-dts-fix-wmac-support-for-mt7622-rfb1.patch
index e1e43ce75d..90a20393d9 100644
--- a/target/linux/mediatek/patches-5.10/140-dts-fix-wmac-support-for-mt7622-rfb1.patch
+++ b/target/linux/mediatek/patches-5.10/140-dts-fix-wmac-support-for-mt7622-rfb1.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -561,7 +561,7 @@
+@@ -562,7 +562,7 @@
  			reg = <0x140000 0x0080000>;
  		};
  
@@ -9,7 +9,7 @@
  			label = "Factory";
  			reg = <0x1c0000 0x0100000>;
  		};
-@@ -619,5 +619,6 @@
+@@ -620,5 +620,6 @@
  };
  
  &wmac {
diff --git a/target/linux/mediatek/patches-5.10/180-dts-mt7622-bpi-r64-add-mt7531-irq.patch b/target/linux/mediatek/patches-5.10/180-dts-mt7622-bpi-r64-add-mt7531-irq.patch
index 80ceb490d4..fabee390c7 100644
--- a/target/linux/mediatek/patches-5.10/180-dts-mt7622-bpi-r64-add-mt7531-irq.patch
+++ b/target/linux/mediatek/patches-5.10/180-dts-mt7622-bpi-r64-add-mt7531-irq.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -160,6 +160,10 @@
+@@ -161,6 +161,10 @@
  		switch at 0 {
  			compatible = "mediatek,mt7531";
  			reg = <0>;
diff --git a/target/linux/mediatek/patches-5.10/331-mt7622-rfb1-enable-bmt.patch b/target/linux/mediatek/patches-5.10/331-mt7622-rfb1-enable-bmt.patch
index a79bd8fcdc..6b68ed47dd 100644
--- a/target/linux/mediatek/patches-5.10/331-mt7622-rfb1-enable-bmt.patch
+++ b/target/linux/mediatek/patches-5.10/331-mt7622-rfb1-enable-bmt.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -535,6 +535,8 @@
+@@ -536,6 +536,8 @@
  	pinctrl-0 = <&serial_nand_pins>;
  	status = "okay";
  
diff --git a/target/linux/mediatek/patches-5.10/602-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch b/target/linux/mediatek/patches-5.10/602-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch
index c7d5d4e691..7b6a9da45b 100644
--- a/target/linux/mediatek/patches-5.10/602-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch
+++ b/target/linux/mediatek/patches-5.10/602-arm64-dts-mediatek-Split-PCIe-node-for-MT2712-MT7622.patch
@@ -253,7 +253,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu at mediatek.com>
  				#interrupt-cells = <1>;
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -292,18 +292,16 @@
+@@ -293,18 +293,16 @@
  	};
  };
  
@@ -389,7 +389,7 @@ Signed-off-by: chuanjia.liu <Chuanjia.Liu at mediatek.com>
  					<0 0 0 2 &pcie_intc1 1>,
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -232,18 +232,16 @@
+@@ -233,18 +233,16 @@
  	};
  };
  
diff --git a/target/linux/mediatek/patches-5.10/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch b/target/linux/mediatek/patches-5.10/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch
index 987513eb45..239265b9d2 100644
--- a/target/linux/mediatek/patches-5.10/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch
+++ b/target/linux/mediatek/patches-5.10/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -308,7 +308,7 @@
+@@ -309,7 +309,7 @@
  	/* Attention: GPIO 90 is used to switch between PCIe at 1,0 and
  	 * SATA functions. i.e. output-high: PCIe, output-low: SATA
  	 */
diff --git a/target/linux/mediatek/patches-5.10/910-dts-mt7622-bpi-r64-wifi-eeprom.patch b/target/linux/mediatek/patches-5.10/910-dts-mt7622-bpi-r64-wifi-eeprom.patch
index 21fb98c19e..ad344ece8b 100644
--- a/target/linux/mediatek/patches-5.10/910-dts-mt7622-bpi-r64-wifi-eeprom.patch
+++ b/target/linux/mediatek/patches-5.10/910-dts-mt7622-bpi-r64-wifi-eeprom.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -632,5 +632,28 @@
+@@ -633,5 +633,28 @@
  };
  
  &wmac {
diff --git a/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
index 05eaa9aedf..3fffb38246 100644
--- a/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
+++ b/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
@@ -22,7 +22,7 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
  #include <linux/platform_data/x86/apple.h>
  #include <linux/pm_runtime.h>
  #include <linux/suspend.h>
-@@ -5858,3 +5859,34 @@ static void nvidia_ion_ahci_fixup(struct
+@@ -5859,3 +5860,34 @@ static void nvidia_ion_ahci_fixup(struct
  	pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING;
  }
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);
diff --git a/target/linux/x86/patches-5.10/020-x86-Fix-compile-problem.patch b/target/linux/x86/patches-5.10/020-x86-Fix-compile-problem.patch
deleted file mode 100644
index ad33085f98..0000000000
--- a/target/linux/x86/patches-5.10/020-x86-Fix-compile-problem.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke at hauke-m.de>
-Date: Sun, 3 Mar 2024 19:57:11 +0100
-Subject: x86: Fix compile problem
-
-This fixes the following compile problem:
-  CC      arch/x86/kernel/paravirt.o
-arch/x86/kernel/paravirt.c: In function 'paravirt_patch_call':
-arch/x86/kernel/paravirt.c:65:9: error: implicit declaration of function '__text_gen_insn' [-Werror=implicit-function-declaration]
-   65 |         __text_gen_insn(insn_buff, CALL_INSN_OPCODE,
-      |         ^~~~~~~~~~~~~~~
-arch/x86/kernel/paravirt.c:65:36: error: 'CALL_INSN_OPCODE' undeclared (first use in this function)
-   65 |         __text_gen_insn(insn_buff, CALL_INSN_OPCODE,
-      |                                    ^~~~~~~~~~~~~~~~
-arch/x86/kernel/paravirt.c:65:36: note: each undeclared identifier is reported only once for each function it appears in
-arch/x86/kernel/paravirt.c:66:47: error: 'CALL_INSN_SIZE' undeclared (first use in this function)
-   66 |                         (void *)addr, target, CALL_INSN_SIZE);
-      |                                               ^~~~~~~~~~~~~~
-arch/x86/kernel/paravirt.c:68:1: error: control reaches end of non-void function [-Werror=return-type]
-   68 | }
-      | ^
-cc1: some warnings being treated as errors
-make[7]: *** [scripts/Makefile.build:286: arch/x86/kernel/paravirt.o] Error 1
-
-Fixes: b253061d4b86 ("x86/ibt,paravirt: Use text_gen_insn() for paravirt_patch()")
-Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
----
- arch/x86/kernel/paravirt.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/arch/x86/kernel/paravirt.c
-+++ b/arch/x86/kernel/paravirt.c
-@@ -14,6 +14,7 @@
- #include <linux/highmem.h>
- #include <linux/kprobes.h>
- #include <linux/pgtable.h>
-+#include <linux/static_call.h>
- 
- #include <asm/bug.h>
- #include <asm/paravirt.h>



From lede-commits at lists.infradead.org  Tue Apr  2 17:57:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 02 Apr 2024 20:57:28 -0400
Subject: [openwrt/openwrt]  ath79: add support for Huawei AP5030DN
In-Reply-To: <171210584811.1318842.17238942874393553682@git-01.infra.openwrt.org>
References: <171210584811.1318842.17238942874393553682@git-01.infra.openwrt.org>
Message-ID: <mailman.22829.1712105853.1280.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/f314debd4f9fb19bc3e9111bba2a9659b46408c6

commit f314debd4f9fb19bc3e9111bba2a9659b46408c6
Author: Marco von Rosenberg <marcovr at selfnet.de>
AuthorDate: Sun Mar 31 17:07:39 2024 +0200

    ath79: add support for Huawei AP5030DN
    
    Huawei AP5030DN is a dual-band, dual-radio 802.11ac Wave 1 3x3 MIMO
    enterprise access point with two Gigabit Ethernet ports and PoE
    support.
    
    Hardware highlights:
    - CPU: QCA9550 SoC at 720MHz
    - RAM: 256MB DDR2
    - Flash: 32MB SPI-NOR
    - Wi-Fi 2.4GHz: QCA9550-internal radio
    - Wi-Fi 5GHz: QCA9880 PCIe WLAN SoC
    - Ethernet 1: 10/100/1000 Mbps Ethernet through Broadcom B50612E PHY
    - Ethernet 2: 10/100/1000 Mbps Ethernet through Marvell 88E1510 PHY
    - PoE: input through Ethernet 1 port
    - Standalone 12V/2A power input
    - Serial console externally available through RJ45 port
    - External watchdog: SGM706 (1.6s timeout)
    
    Serial console:
      9600n8 (9600 baud, no stop bits, no parity, 8 data bits)
    
    MAC addresses:
      Each device has 32 consecutive MAC addresses allocated by
      the vendor, which don't overlap between devices.
      This was confirmed with multiple devices with consecutive
      serial numbers.
      The MAC address range starts with the address on the label.
      To be able to distinguish between the interfaces,
      the following MAC address scheme is used:
        - eth0 = label MAC
        - eth1 = label MAC + 1
        - radio0 (Wi-Fi 5GHz) = label MAC + 2
        - radio1 (Wi-Fi 2.4GHz) = label MAC + 3
    
    Installation:
    0. Connect some sort of RJ45-to-USB adapter to "Console" port of the AP
    
    1. Power up the AP
    
    2. At prompt "Press f or F  to stop Auto-Boot in 3 seconds",
       do what they say.
       Log in with default admin password "admin at huawei.com".
    
    3. Boot the OpenWrt initramfs from TFTP using the hidden script
       "run ramboot". Replace IP address as needed:
    
       > setenv serverip 192.168.1.10
       > setenv ipaddr 192.168.1.1
       > setenv rambootfile
         openwrt-ath79-generic-huawei_ap5030dn-initramfs-kernel.bin
       > saveenv
       > run ramboot
    
    4. Optional but recommended as the factory firmware cannot
       be downloaded publicly:
       Back up contents of "firmware" partition using the web interface or ssh:
    
       $ ssh root at 192.168.1.1 cat /dev/mtd11 > huawei_ap5030dn_fw_backup.bin
    
    5. Run sysupgrade using sysupgrade image. OpenWrt
       shall boot from flash afterwards.
    
    Return to factory firmware (using firmware upgrade package downloaded from
    non-public Huawei website):
    1. Start a TFTP server in the directory where
       the firmware upgrade package is located
    
    2. Boot to u-boot as described above
    
    3. Install firmware upgrade package and format the config partitions:
    
       > update system FatAP5X30XN_SOMEVERSION.bin
       > format_fs
    
    Return to factory firmware (from previously created backup):
    1. Copy over the firmware partition backup to /tmp,
       for example using scp
    
    2. Use sysupgrade with force to restore the backup:
       sysupgrade -F huawei_ap5030dn_fw_backup.bin
    
    3. Boot AP to U-Boot as described above
    
    Quirks and known issues
    -----------------------
    
    - On initial power-up, the Huawei-modified bootloader suspends both
    ethernet PHYs (it sets the "Power Down" bit in the MII control
    register). Unfortunately, at the time of the initial port, the kernel
    driver for the B50612E/BCM54612E PHY behind eth0 doesn't have a resume
    callback defined which would clear this bit. This makes the PHY unusable
    since it remains suspended forever. This is why the backported kernel
    patches in this commit are required which add this callback and for
    completeness also a suspend callback.
    
    - The stock firmware has a semi dual boot concept where the primary
    kernel uses a squashfs as root partition and the secondary kernel uses
    an initramfs. This dual boot concept is circumvented on purpose to gain
    more flash space and since the stock firmware's flash layout isn't
    compatible with mtdsplit.
    
    - The external watchdog's timeout of 1.6s is very hard to satisfy
    during bootup. This is why the GPIO15 pin connected to the watchdog input
    is configured directly in the LZMA loader to output the CPU_CLK/4 signal
    which keeps the watchdog happy until the wdt-gpio kernel driver takes
    over. Because it would also take too long to read the whole kernel image
    from flash, the uImage header only includes the loader which then reads
    the kernel image from flash after GPIO15 is configured.
    
    Signed-off-by: Marco von Rosenberg <marcovr at selfnet.de>
    [fixed 6.6 backport patch naming]
    Signed-off-by: David Bauer <mail at david-bauer.net>
    (cherry picked from commit 06cdc07f8cc703ef7dcb3e7b329b9abff0806a6e)
---
 package/boot/uboot-envtools/files/ath79            |   3 +
 target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts | 257 +++++++++++++++++++++
 .../generic/base-files/etc/board.d/02_network      |   4 +
 .../generic/base-files/lib/upgrade/platform.sh     |   8 +
 target/linux/ath79/image/generic.mk                |  16 ++
 .../ath79/image/lzma-loader/src/ar71xx_regs.h      |   2 +
 target/linux/ath79/image/lzma-loader/src/board.c   |  26 +++
 ...v6.8-net-phy-bcm54612e-add-suspend-resume.patch |  27 +++
 8 files changed, 343 insertions(+)

diff --git a/package/boot/uboot-envtools/files/ath79 b/package/boot/uboot-envtools/files/ath79
index 5201b8b27a..bf9adc9e5d 100644
--- a/package/boot/uboot-envtools/files/ath79
+++ b/package/boot/uboot-envtools/files/ath79
@@ -119,6 +119,9 @@ domywifi,dw33d)
 glinet,gl-ar150)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x8000" "0x10000"
 	;;
+huawei,ap5030dn)
+	ubootenv_add_uci_config "/dev/mtd3" "0x0" "0x20000" "0x20000"
+	;;
 netgear,wndr3700|\
 netgear,wndr3700-v2|\
 netgear,wndrmac-v1)
diff --git a/target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts b/target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts
new file mode 100644
index 0000000000..1c2a75f1dd
--- /dev/null
+++ b/target/linux/ath79/dts/qca9550_huawei_ap5030dn.dts
@@ -0,0 +1,257 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca955x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	model = "Huawei AP5030DN";
+	compatible = "huawei,ap5030dn", "qca,qca9550", "qca,qca9558";
+
+	chosen {
+		bootargs = "console=ttyS0,9600n8";
+	};
+
+	aliases {
+		led-boot = &led_function_red;
+		led-failsafe = &led_function_red;
+		led-running = &led_function_green;
+		led-upgrade = &led_function_red;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_function_green: led-status-red {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio 18 GPIO_ACTIVE_HIGH>;
+		};
+
+		led_function_red: led-status-green {
+			function = LED_FUNCTION_STATUS;
+			color = <LED_COLOR_ID_RED>;
+			gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+		};
+
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		restart {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 21 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	watchdog {
+		pinctrl-names = "default";
+		pinctrl-0 = <&wdt_gpio15>;
+
+		compatible = "linux,wdt-gpio";
+		gpios = <&gpio 15 GPIO_ACTIVE_HIGH>;
+		hw_algo = "toggle";
+		hw_margin_ms = <100>;
+		always-running;
+	};
+
+	virtual_flash {
+		compatible = "mtd-concat";
+		devices = <&fwconcat0 &fwconcat1>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "firmware";
+				reg = <0x0 0x1e00000>;
+				compatible = "openwrt,uimage", "denx,uimage";
+			};
+		};
+	};
+};
+
+&spi {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot-a";
+				reg = <0x0 0x80000>;
+				read-only;
+			};
+
+			// The BootupA/B partitions store the addresses
+			// of the main and backup kernel in flash (which is the same here).
+			// During sysupgrade, these addresses are set to the start of the
+			// "firmware" partition.
+			partition at 80000 {
+				label = "BootupA";
+				reg = <0x80000 0x20000>;
+			};
+
+			partition at a0000 {
+				label = "BootupB";
+				reg = <0xa0000 0x20000>;
+			};
+
+			partition at c0000 {
+				label = "u-boot-env";
+				reg = <0xc0000 0x20000>;
+				read-only;
+			};
+
+			partition at e0000 {
+				label = "BoardData";
+				reg = <0xe0000 0x20000>;
+				read-only;
+			};
+
+			// In the vendor layout, there are the "SysImageA" (12 MiB)
+			// and the "ConfigA" (3 MiB) partitions here.
+			fwconcat0: partition at 100000 {
+				label = "fwconcat0";
+				reg = <0x100000 0xF00000>;
+			};
+
+			partition at 1000000 {
+				label = "u-boot-b";
+				reg = <0x1000000 0x80000>;
+				read-only;
+			};
+
+			partition at 1080000 {
+				label = "ResultA";
+				reg = <0x1080000 0x20000>;
+				read-only;
+			};
+
+			partition at 10a0000 {
+				label = "ResultB";
+				reg = <0x10a0000 0x20000>;
+				read-only;
+			};
+
+			// In the vendor layout, there are the "SysImageB" (12 MiB)
+			// and the "ConfigB" (3 MiB) partitions here.
+			fwconcat1: partition at 10c0000 {
+				label = "fwconcat1";
+				reg = <0x10c0000 0xF00000>;
+			};
+
+			art: partition at 1fc0000 {
+				label = "art";
+				reg = <0x1fc0000 0x40000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_art_2005b: macaddr at 2005b {
+						compatible = "mac-base";
+						reg = <0x2005b 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+
+					cal_art_1000: cal at 1000 {
+						reg = <0x1000 0x440>;
+					};
+
+					cal_art_5000: cal at 5000 {
+						reg = <0x5000 0x844>;
+					};
+				};
+			};
+		};
+	};
+};
+
+&wmac {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_art_2005b 3>, <&cal_art_1000>;
+	nvmem-cell-names = "mac-address", "calibration";
+};
+
+&pcie0 {
+	status = "okay";
+
+	wifi at 0,0 {
+		compatible = "qcom,ath10k";
+		reg = <0x0000 0 0 0 0>;
+		nvmem-cells = <&macaddr_art_2005b 2>, <&cal_art_5000>;
+		nvmem-cell-names = "mac-address", "calibration";
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_art_2005b 0>;
+	nvmem-cell-names = "mac-address";
+
+	pll-data = <0xa6000000 0xa0000101 0xa0001313>;
+	phy-handle = <&phy0>;
+
+	gmac-config {
+		device = <&gmac>;
+		rxdv-delay = <3>;
+		rxd-delay = <3>;
+		txen-delay = <0>;
+		txd-delay = <0>;
+	};
+};
+
+&eth1 {
+	status = "okay";
+
+	nvmem-cells = <&macaddr_art_2005b 1>;
+	nvmem-cell-names = "mac-address";
+
+	pll-data = <0x03000101 0x00000101 0x00001313>;
+	phy-handle = <&phy1>;
+};
+
+&mdio0 {
+	status = "okay";
+
+	phy0: ethernet-phy at 18 {
+		reg = <0x18>;
+	};
+};
+
+&mdio1 {
+	status = "okay";
+
+	phy1: ethernet-phy at 1 {
+		reg = <1>;
+	};
+};
+
+&pinmux {
+	wdt_gpio15: pinmux_wdt_gpio15 {
+		pinctrl-single,bits = <0xc 0x0 0xFF000000>;
+	};
+};
+
+&wdt {
+	status = "disabled";
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/02_network b/target/linux/ath79/generic/base-files/etc/board.d/02_network
index ca35bd3223..191138f521 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/02_network
+++ b/target/linux/ath79/generic/base-files/etc/board.d/02_network
@@ -143,6 +143,7 @@ ath79_setup_interfaces()
 	engenius,enstationac-v1|\
 	engenius,ews511ap|\
 	engenius,ews660ap|\
+	huawei,ap5030dn|\
 	ocedo,ursus|\
 	ruckus,zf7363|\
 	ruckus,zf7372|\
@@ -709,6 +710,9 @@ ath79_setup_macs()
 	hak5,packet-squirrel)
 		label_mac=$(mtd_get_mac_binary u-boot 0x1fc00)
 		;;
+	huawei,ap5030dn)
+		label_mac=$(mtd_get_mac_binary art 0x2005b)
+		;;
 	iodata,etg3-r)
 		lan_mac=$(mtd_get_mac_ascii u-boot-env ethaddr)
 		wan_mac=$(macaddr_add "$lan_mac" -1)
diff --git a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
index 67a3635075..e845057f42 100644
--- a/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ath79/generic/base-files/lib/upgrade/platform.sh
@@ -66,6 +66,14 @@ platform_do_upgrade() {
 		ROOTFS_FILE="root.squashfs"
 		platform_do_upgrade_failsafe_datachk "$1"
 		;;
+	huawei,ap5030dn)
+		# Store beginning address of the "firmware" partition
+		# as KernelA address and KernelB address, each to BootupA & BootupB
+		# This is the address from which the bootloader will try to load the kernel.
+		echo -n -e "\x9e\x10\x00\x00\x9e\x10\x00\x00" | dd of=$(find_mtd_part BootupA) bs=1 seek=$((0x254)) conv=notrunc
+		echo -n -e "\x9e\x10\x00\x00\x9e\x10\x00\x00" | dd of=$(find_mtd_part BootupB) bs=1 seek=$((0x254)) conv=notrunc
+		default_do_upgrade "$1"
+		;;
 	jjplus,ja76pf2)
 		platform_do_upgrade_redboot_fis "$1" linux
 		;;
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 1a558c30a0..f264c14314 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -1627,6 +1627,22 @@ define Device/hiwifi_hc6361
 endef
 TARGET_DEVICES += hiwifi_hc6361
 
+define Device/huawei_ap5030dn
+  SOC := qca9550
+  DEVICE_VENDOR := Huawei
+  DEVICE_MODEL := AP5030DN
+  DEVICE_PACKAGES := ath10k-firmware-qca988x-ct kmod-ath10k-ct
+  LOADER_TYPE := bin
+  LOADER_FLASH_OFFS := 0x111DC0
+  KERNEL_SIZE := 15360k
+  IMAGE_SIZE := 30720k
+  COMPILE := loader-$(1).bin
+  COMPILE/loader-$(1).bin := loader-okli-compile | pad-to 64k | uImage none
+  KERNEL := kernel-bin | append-dtb | lzma | uImage lzma -M 0x4f4b4c49 | loader-okli $(1) 8128
+  KERNEL_INITRAMFS := kernel-bin | append-dtb | lzma | loader-kernel | uImage none
+endef
+TARGET_DEVICES += huawei_ap5030dn
+
 define Device/iodata_etg3-r
   SOC := ar9342
   DEVICE_VENDOR := I-O DATA
diff --git a/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h b/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h
index 245042fdab..e7d7683973 100644
--- a/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h
+++ b/target/linux/ath79/image/lzma-loader/src/ar71xx_regs.h
@@ -671,6 +671,8 @@
 
 #define AR934X_GPIO_OUT_GPIO		0x00
 
+#define QCA955X_GPIO_OUTSEL_CLK_OBS5		0x54
+
 /*
  * MII_CTRL block
  */
diff --git a/target/linux/ath79/image/lzma-loader/src/board.c b/target/linux/ath79/image/lzma-loader/src/board.c
index 7b1e110ee2..13926e9b1e 100644
--- a/target/linux/ath79/image/lzma-loader/src/board.c
+++ b/target/linux/ath79/image/lzma-loader/src/board.c
@@ -182,8 +182,34 @@ static inline void mr18_init(void)
 static inline void mr18_init(void) { }
 #endif
 
+#ifdef CONFIG_BOARD_HUAWEI_AP5030DN
+static inline void ap5030dn_init(void)
+{
+	const unsigned int ap5030dn_watchdog_gpio = 15;
+	unsigned int gpiobase, reg;
+
+	gpiobase = KSEG1ADDR(AR71XX_GPIO_BASE);
+
+	printf("Huawei AP5030DN\n");
+
+	reg = READREG(gpiobase + AR71XX_GPIO_REG_OE);
+	WRITEREG(gpiobase + AR71XX_GPIO_REG_OE,
+			reg & ~(1 << ap5030dn_watchdog_gpio));
+
+	/* Set GPIO15 MUX to output CLK_OBS5 (= CPU_CLK/4)
+	 * to keep the watchdog happy until wdt-gpio takes over
+	 */
+	reg = READREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3);
+	WRITEREG(gpiobase + AR934X_GPIO_REG_OUT_FUNC3,
+			reg | (QCA955X_GPIO_OUTSEL_CLK_OBS5 << 24));
+}
+#else
+static inline void ap5030dn_init(void) { }
+#endif
+
 void board_init(void)
 {
 	tlwr1043nd_init();
 	mr18_init();
+	ap5030dn_init();
 }
diff --git a/target/linux/generic/backport-5.15/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch b/target/linux/generic/backport-5.15/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch
new file mode 100644
index 0000000000..4fc9571a33
--- /dev/null
+++ b/target/linux/generic/backport-5.15/734-v6.8-net-phy-bcm54612e-add-suspend-resume.patch
@@ -0,0 +1,27 @@
+From 380b50ae3a04222334a3779b3787eba844b1177f Mon Sep 17 00:00:00 2001
+From: Marco von Rosenberg <marcovr at selfnet.de>
+Date: Thu, 16 Nov 2023 20:32:31 +0100
+Subject: net: phy: broadcom: Wire suspend/resume for BCM54612E
+
+The BCM54612E ethernet PHY supports IDDQ-SR.
+Therefore wire-up the suspend and resume callbacks
+to point to bcm54xx_suspend() and bcm54xx_resume().
+
+Signed-off-by: Marco von Rosenberg <marcovr at selfnet.de>
+Acked-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/phy/broadcom.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/net/phy/broadcom.c
++++ b/drivers/net/phy/broadcom.c
+@@ -795,6 +795,8 @@ static struct phy_driver broadcom_driver
+ 	.config_init	= bcm54xx_config_init,
+ 	.config_intr	= bcm_phy_config_intr,
+ 	.handle_interrupt = bcm_phy_handle_interrupt,
++	.suspend	= genphy_suspend,
++	.resume		= bcm54xx_resume,
+ }, {
+ 	.phy_id		= PHY_ID_BCM54616S,
+ 	.phy_id_mask	= 0xfffffff0,



From lede-commits at lists.infradead.org  Wed Apr  3 02:47:22 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 05:47:22 -0400
Subject: [openwrt/openwrt]  bcm27xx: refresh patches
In-Reply-To: <171213764234.2206531.5813807829621988775@git-01.infra.openwrt.org>
References: <171213764234.2206531.5813807829621988775@git-01.infra.openwrt.org>
Message-ID: <mailman.23038.1712137650.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0b10e5a5dc1e8f45090e8db56718909bf292eb77

commit 0b10e5a5dc1e8f45090e8db56718909bf292eb77
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Tue Apr 2 13:51:02 2024 +0200

    bcm27xx: refresh patches
    
    Refresh patches for kernel 6.1.82 with make target/linux/refresh.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../950-0286-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/bcm27xx/patches-6.1/950-0286-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch b/target/linux/bcm27xx/patches-6.1/950-0286-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
index 55c881286e..2cf011fafc 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0286-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0286-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
@@ -49,7 +49,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	.phy_id		= PHY_ID_BCM5461,
  	.phy_id_mask	= 0xfffffff0,
  	.name		= "Broadcom BCM5461",
-@@ -1156,7 +1164,8 @@ module_phy_driver(broadcom_drivers);
+@@ -1158,7 +1166,8 @@ module_phy_driver(broadcom_drivers);
  static struct mdio_device_id __maybe_unused broadcom_tbl[] = {
  	{ PHY_ID_BCM5411, 0xfffffff0 },
  	{ PHY_ID_BCM5421, 0xfffffff0 },



From lede-commits at lists.infradead.org  Wed Apr  3 04:09:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 07:09:50 -0400
Subject: [openwrt/openwrt]  mt76: update to Git HEAD (2024-04-03)
In-Reply-To: <171214259050.2323374.10095417342878713834@git-01.infra.openwrt.org>
References: <171214259050.2323374.10095417342878713834@git-01.infra.openwrt.org>
Message-ID: <mailman.23121.1712142597.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a10a6fbac794b30885d65ec817ebdcfe9f94d78a

commit a10a6fbac794b30885d65ec817ebdcfe9f94d78a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Apr 3 13:07:28 2024 +0200

    mt76: update to Git HEAD (2024-04-03)
    
    605624a4e17b mt76: fix path to page_pool helper include
    e4de3592c4e3 wifi: mt76: mt7603: fix tx queue of loopback packets
    446f652c967c wifi: mt76: mt7603: add wpdma tx eof flag for PSE client reset
    669aba47a145 wifi: mt76: mt7915: fix HE PHY capability regression
    5914ea57a31f wifi: mt76: mt7915: workaround dubious x | !y warning
    e8b5991f7dac wifi: mt76: mt7915: workaround too long expansion sparse warnings
    e507b4e32ead wifi: mt76: mt7921: fix fw used for offload check for mt7922
    725f531c1459 wifi: mt76: connac: check for null before dereferencing
    b108dda7e201 wifi: mt76: mt7996: fix size of txpower MCU command
    5b7616491f07 wifi: mt76: mt7921: introduce mt7920 PCIe support
    0436995feca9 wifi: mt76: mt7921s: fix potential hung tasks during chip recovery
    75759dca73d5 wifi: mt76: mt7925: ensure 4-byte alignment for suspend & wow command
    b96ab5e62010 wifi: mt76: mt7996: fix uninitialized variable in mt7996_irq_tasklet()
    7ff11c7259a3 wifi: mt76: sdio: move mcu queue size check inside critical section
    02846a5d0f0f wifi: mt76: mt7915: Remove unused of_gpio.h
    cb8df32e0475 wifi: mt76: mt7996: disable rx header translation for BMC entry
    a4c4b550512e wifi: mt76: connac: use peer address for station BMC entry
    260c5b7c3ba0 wifi: mt76: mt7996: set RCPI value in rate control command
    0b7e645db9c2 wifi: mt76: connac: enable HW CSO module for mt7996
    f19035fe0b4d wifi: mt76: mt7996: fix non-main BSS no beacon issue for MBSS scenario
    424e9df466ce wifi: mt76: mt7996: fix potential memory leakage when reading chip temperature
    f70cb4f0508e wifi: mt76: connac: enable critical packet mode support for mt7992
    5f1bf8865247 wifi: mt76: mt7996: add sanity checks for background radar trigger
    1e336a8582dc wifi: mt76: connac: use muar idx 0xe for non-mt799x as well
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/kernel/mt76/Makefile                       |  8 +--
 .../100-fix-build-on-linux-kernel-6.6.patch        | 24 -------
 ...t7603-add-debugfs-attr-for-disabling-fram.patch | 81 ----------------------
 3 files changed, 4 insertions(+), 109 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index c44ed4d1da..3f48c76faa 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -1,16 +1,16 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mt76
-PKG_RELEASE=2
+PKG_RELEASE=1
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2024-03-18
-PKG_SOURCE_VERSION:=2135e201e7a9339e018d4e2d4a33c73266e674d7
-PKG_MIRROR_HASH:=530db8a70d18295677989aafc9c1757b151ef77e359985417f1d36e7d2415d33
+PKG_SOURCE_DATE:=2024-04-03
+PKG_SOURCE_VERSION:=1e336a8582dce2ef32ddd440d423e9afef961e71
+PKG_MIRROR_HASH:=f3801af80d5f9c1aa266c9401d4dfa2d501df0382c81fd249150e17dddc70936
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
diff --git a/package/kernel/mt76/patches/100-fix-build-on-linux-kernel-6.6.patch b/package/kernel/mt76/patches/100-fix-build-on-linux-kernel-6.6.patch
deleted file mode 100644
index 4fdba0c472..0000000000
--- a/package/kernel/mt76/patches/100-fix-build-on-linux-kernel-6.6.patch
+++ /dev/null
@@ -1,24 +0,0 @@
---- a/mac80211.c
-+++ b/mac80211.c
-@@ -4,7 +4,9 @@
-  */
- #include <linux/sched.h>
- #include <linux/of.h>
-+#if LINUX_VERSION_CODE < KERNEL_VERSION(6,6,0)
- #include <net/page_pool.h>
-+#endif
- #include "mt76.h"
- 
- #define CHAN2G(_idx, _freq) {			\
---- a/mt76.h
-+++ b/mt76.h
-@@ -13,6 +13,9 @@
- #include <linux/leds.h>
- #include <linux/usb.h>
- #include <linux/average.h>
-+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,6,0)
-+#include <net/page_pool/helpers.h>
-+#endif
- #include <linux/soc/mediatek/mtk_wed.h>
- #include <net/mac80211.h>
- #include "util.h"
diff --git a/package/kernel/mt76/patches/101-wifi-mt76-mt7603-add-debugfs-attr-for-disabling-fram.patch b/package/kernel/mt76/patches/101-wifi-mt76-mt7603-add-debugfs-attr-for-disabling-fram.patch
deleted file mode 100644
index 7d2b7eccbf..0000000000
--- a/package/kernel/mt76/patches/101-wifi-mt76-mt7603-add-debugfs-attr-for-disabling-fram.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 25 Mar 2024 18:54:02 +0100
-Subject: [PATCH] wifi: mt76: mt7603: add debugfs attr for disabling frames
- buffering
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-MT7603EN and MT7628AN were reported by multiple users to be unstable
-under high traffic. Transmission of packets could stop for seconds often
-leading to disconnections.
-
-Long research & debugging revelaed a close relation between MCU
-interrupts of type PKT_TYPE_TXS and slowdowns / stalls. That led to
-questioning frames buffering feature.
-
-It turns out that disabling SKBs loopback code makes mt7603 devices much
-more stable under load. There are still some traffic hiccups but those
-happen like once every an hour and end up in recovery in most cases.
-
-Add a debugfs option for disabling frames buffering so users can give it
-a try. If this solution yields a success we can make this feature
-disabled by default.
-
-This change was successfully tested using 2 GHz AP interface on:
-1. Netgear R6220 - MT7621ST (SoC) + MT7603EN (WiFi) + MT7612EN (WiFi)
-2. Xiaomi Mi Router 4C - MT7628AN (Wi-Fi SoC)
-
-Link: https://lore.kernel.org/linux-wireless/7c96d5ee-86c1-8068-1b58-40db6087a24f at gmail.com/
-Closes: https://github.com/openwrt/mt76/issues/865
-Fixes: c8846e101502 ("mt76: add driver for MT7603E and MT7628/7688")
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
----
- mt7603/debugfs.c | 2 ++
- mt7603/dma.c     | 3 +++
- mt7603/init.c    | 1 +
- mt7603/mt7603.h  | 2 ++
- 4 files changed, 8 insertions(+)
-
---- a/mt7603/debugfs.c
-+++ b/mt7603/debugfs.c
-@@ -115,4 +115,6 @@ void mt7603_init_debugfs(struct mt7603_d
- 			    &dev->sensitivity_limit);
- 	debugfs_create_bool("dynamic_sensitivity", 0600, dir,
- 			    &dev->dynamic_sensitivity);
-+	debugfs_create_bool("frames_buffering", 0600, dir,
-+			    &dev->frames_buffering);
- }
---- a/mt7603/dma.c
-+++ b/mt7603/dma.c
-@@ -27,6 +27,9 @@ mt7603_rx_loopback_skb(struct mt7603_dev
- 	u32 val;
- 	u8 tid = 0;
- 
-+	if (!dev->frames_buffering)
-+		goto free;
-+
- 	if (skb->len < MT_TXD_SIZE + sizeof(struct ieee80211_hdr))
- 		goto free;
- 
---- a/mt7603/init.c
-+++ b/mt7603/init.c
-@@ -517,6 +517,7 @@ int mt7603_register_device(struct mt7603
- 	dev->slottime = 9;
- 	dev->sensitivity_limit = 28;
- 	dev->dynamic_sensitivity = true;
-+	dev->frames_buffering = true;
- 
- 	ret = mt7603_init_hardware(dev);
- 	if (ret)
---- a/mt7603/mt7603.h
-+++ b/mt7603/mt7603.h
-@@ -155,6 +155,8 @@ struct mt7603_dev {
- 	u32 reset_test;
- 
- 	unsigned int reset_cause[__RESET_CAUSE_MAX];
-+
-+	bool frames_buffering;
- };
- 
- extern const struct mt76_driver_ops mt7603_drv_ops;



From lede-commits at lists.infradead.org  Wed Apr  3 04:29:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 07:29:21 -0400
Subject: [openwrt/openwrt]  unetd: fix PKG_MIRROR_HASH
In-Reply-To: <171214376110.2345412.10855232770695580918@git-01.infra.openwrt.org>
References: <171214376110.2345412.10855232770695580918@git-01.infra.openwrt.org>
Message-ID: <mailman.23134.1712143766.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2070049c1cafa52224c946a6c334bf9fea4f549b

commit 2070049c1cafa52224c946a6c334bf9fea4f549b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Wed Apr 3 13:04:36 2024 +0200

    unetd: fix PKG_MIRROR_HASH
    
    Our CI on GitHub as well as my local machine generates a different
    PKG_MIRROR_HASH from what Felix uploaded the other day.
    
    After receiving Felix file, both have indeed different hashes, however
    when unpackaged via `xz -d` both have the same tarball content.
    
    Below the checksums to compare:
    
    a62bef497078c7b825f11fc8358c1a43f5db3e6d4b97812044f7653d60747d5b  dl/unetd-2024.03.31~80645766.tar.xz
    fbdac59581742bf208c18995b1d69d9848c93bfce487e57ba780d959e0d62fc4  dl/unetd-2024.03.31~80645766_felix.tar.xz
    
    After unpacking:
    
    a7189cae90bc600abf3a3bff3620dc17a9143be8c27d27412de6eb66a1cf1b7d  dl/unetd-2024.03.31~80645766.tar
    a7189cae90bc600abf3a3bff3620dc17a9143be8c27d27412de6eb66a1cf1b7d  dl/unetd-2024.03.31~80645766_felix.tar
    
    The tarball with the wrong hash was accidentally generated without the xz
    revert to version 5.4.6
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/network/services/unetd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/unetd/Makefile b/package/network/services/unetd/Makefile
index 02814cb78c..680b8b7b3c 100644
--- a/package/network/services/unetd/Makefile
+++ b/package/network/services/unetd/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/unetd.git
 PKG_SOURCE_DATE:=2024-03-31
 PKG_SOURCE_VERSION:=806457664ab6e952a7f4febb82e891f596fe577c
-PKG_MIRROR_HASH:=fbdac59581742bf208c18995b1d69d9848c93bfce487e57ba780d959e0d62fc4
+PKG_MIRROR_HASH:=a62bef497078c7b825f11fc8358c1a43f5db3e6d4b97812044f7653d60747d5b
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>



From lede-commits at lists.infradead.org  Wed Apr  3 08:50:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 11:50:02 -0400
Subject: [openwrt/openwrt]  mvebu: cortexa9: set DTS dir for 6.6
In-Reply-To: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
References: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
Message-ID: <mailman.23287.1712159408.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ab2fe43163ed76bfa10b53043982bb6443e362e6

commit ab2fe43163ed76bfa10b53043982bb6443e362e6
Author: Stijn Segers <foss at volatilesystems.org>
AuthorDate: Tue Mar 19 22:55:11 2024 +0100

    mvebu: cortexa9: set DTS dir for 6.6
    
    With 6.6, all DTSes were moved to their vendor subdirectories. ARM64
    DTSes already used this scheme, but 32 bit Cortex A9 did not, prior
    to 6.6. Introduce a kernel version check to keep backward compatibility
    with 6.1.
    
    Suggested-by: Robert Marko <robimarko at gmail.com>
    Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 target/linux/mvebu/image/cortexa9.mk | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/linux/mvebu/image/cortexa9.mk b/target/linux/mvebu/image/cortexa9.mk
index d97509f4d6..270c631474 100644
--- a/target/linux/mvebu/image/cortexa9.mk
+++ b/target/linux/mvebu/image/cortexa9.mk
@@ -3,6 +3,10 @@
 # Copyright (C) 2012-2016 OpenWrt.org
 # Copyright (C) 2016 LEDE-project.org
 
+ifneq ($(KERNEL),6.1)
+DTS_DIR := $(DTS_DIR)/marvell
+endif
+
 define Build/fortigate-header
   ( \
     dd if=/dev/zero bs=384 count=1 2>/dev/null; \



From lede-commits at lists.infradead.org  Wed Apr  3 08:49:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 11:49:57 -0400
Subject: [openwrt/openwrt]  mvebu: move files to files-6.1
In-Reply-To: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
References: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
Message-ID: <mailman.23288.1712159413.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9abfdc3ada1c4de6dc71ae9b7972d813d91ae37e

commit 9abfdc3ada1c4de6dc71ae9b7972d813d91ae37e
Author: Stijn Segers <foss at volatilesystems.org>
AuthorDate: Fri Mar 22 08:31:00 2024 +0100

    mvebu: move files to files-6.1
    
    DTS paths for 32 bit ARM devices changed with 6.6, move files/ to
    files-6.1 to prep for kernel 6.6 introduction.
    
    Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 .../{files => files-6.1}/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts | 0
 .../mvebu/{files => files-6.1}/arch/arm/boot/dts/armada-370-c200-v2.dts   | 0
 .../mvebu/{files => files-6.1}/arch/arm/boot/dts/armada-380-iij-sa-w2.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts | 0
 .../{files => files-6.1}/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts | 0
 .../arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi                     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/armada-385-linksys-venom.dts   | 0
 .../mvebu/{files => files-6.1}/arch/arm/boot/dts/armada-385-nas1dual.dts  | 0
 .../{files => files-6.1}/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts | 0
 .../arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts         | 0
 .../arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts                 | 0
 .../{files => files-6.1}/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts | 0
 .../arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi                     | 0
 .../arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts                  | 0
 .../arch/arm64/boot/dts/marvell/cn9130-clearfog-pro.dts                   | 0
 .../arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts                    | 0
 .../arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts                    | 0
 .../{files => files-6.1}/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi  | 0
 19 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-370-c200-v2.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-370-c200-v2.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-370-c200-v2.dts
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-370-c200-v2.dts
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-380-iij-sa-w2.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-380-iij-sa-w2.dts
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-venom.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-linksys-venom.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-385-linksys-venom.dts
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-linksys-venom.dts
diff --git a/target/linux/mvebu/files/arch/arm/boot/dts/armada-385-nas1dual.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-nas1dual.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm/boot/dts/armada-385-nas1dual.dts
rename to target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-nas1dual.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-eDPU.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-espressobin-ultra.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-gl-mv1000.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-3720-uDPU.dtsi
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/armada-7040-mochabin.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9130-clearfog-pro.dts b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/cn9130-clearfog-pro.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9130-clearfog-pro.dts
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/cn9130-clearfog-pro.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/cn9131-puzzle-m901.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/cn9132-puzzle-m902.dts
diff --git a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi b/target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi
similarity index 100%
rename from target/linux/mvebu/files/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi
rename to target/linux/mvebu/files-6.1/arch/arm64/boot/dts/marvell/puzzle-thermal.dtsi



From lede-commits at lists.infradead.org  Wed Apr  3 08:50:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 11:50:03 -0400
Subject: [openwrt/openwrt]  mvebu: add 6.6 testing kernel
In-Reply-To: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
References: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
Message-ID: <mailman.23289.1712159413.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ed893a3cc19e528c32da5ea002308e6428cfa1fc

commit ed893a3cc19e528c32da5ea002308e6428cfa1fc
Author: Stijn Segers <foss at volatilesystems.org>
AuthorDate: Sun Mar 24 12:05:17 2024 +0100

    mvebu: add 6.6 testing kernel
    
    Add 6.6 testing kernel for mvebu target.
    
    Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 target/linux/mvebu/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/mvebu/Makefile b/target/linux/mvebu/Makefile
index 316bf1dfa0..26bd4d4240 100644
--- a/target/linux/mvebu/Makefile
+++ b/target/linux/mvebu/Makefile
@@ -10,6 +10,7 @@ FEATURES:=fpu usb pci pcie gpio nand squashfs ramdisk boot-part rootfs-part lega
 SUBTARGETS:=cortexa9 cortexa53 cortexa72
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Wed Apr  3 08:50:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 11:50:00 -0400
Subject: [openwrt/openwrt]  mvebu: 6.6: remove upstreamed patches
In-Reply-To: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
References: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
Message-ID: <mailman.23290.1712159413.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ad5e73fe0a1105180b9e2ba097124e5a477cbd20

commit ad5e73fe0a1105180b9e2ba097124e5a477cbd20
Author: Stijn Segers <foss at volatilesystems.org>
AuthorDate: Sat Mar 23 22:07:47 2024 +0100

    mvebu: 6.6: remove upstreamed patches
    
    000-cpufreq-armada-8k-add-ap807-support.patch was upstreamed.
    
    Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 .../000-cpufreq-armada-8k-add-ap807-support.patch  | 59 ----------------------
 1 file changed, 59 deletions(-)

diff --git a/target/linux/mvebu/patches-6.6/000-cpufreq-armada-8k-add-ap807-support.patch b/target/linux/mvebu/patches-6.6/000-cpufreq-armada-8k-add-ap807-support.patch
deleted file mode 100644
index 354d262015..0000000000
--- a/target/linux/mvebu/patches-6.6/000-cpufreq-armada-8k-add-ap807-support.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 8eec6e740b564ec5e1da59ab7070b89aa23c9973 Mon Sep 17 00:00:00 2001
-From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
-Date: Fri, 16 Jun 2023 12:41:30 +0100
-Subject: [PATCH] cpufreq: armada-8k: add ap807 support
-
-Add support for the Armada AP807 die to armada-8k. This uses a
-different compatible for the CPU clock which needs to be added to
-the cpufreq driver.
-
-This commit takes a different approach to the WindRiver patch
-"cpufreq: armada: enable ap807-cpu-clk" in that rather than calling
-of_find_compatible_node() for each compatible, we use a table of
-IDs instead.
-
-Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
-Signed-off-by: Viresh Kumar <viresh.kumar at linaro.org>
----
- drivers/cpufreq/armada-8k-cpufreq.c | 16 +++++++++-------
- 1 file changed, 9 insertions(+), 7 deletions(-)
-
---- a/drivers/cpufreq/armada-8k-cpufreq.c
-+++ b/drivers/cpufreq/armada-8k-cpufreq.c
-@@ -21,6 +21,13 @@
- #include <linux/pm_opp.h>
- #include <linux/slab.h>
- 
-+static const struct of_device_id __maybe_unused armada_8k_cpufreq_of_match[] = {
-+	{ .compatible = "marvell,ap806-cpu-clock" },
-+	{ .compatible = "marvell,ap807-cpu-clock" },
-+	{ },
-+};
-+MODULE_DEVICE_TABLE(of, armada_8k_cpufreq_of_match);
-+
- /*
-  * Setup the opps list with the divider for the max frequency, that
-  * will be filled at runtime.
-@@ -127,7 +134,8 @@ static int __init armada_8k_cpufreq_init
- 	struct device_node *node;
- 	struct cpumask cpus;
- 
--	node = of_find_compatible_node(NULL, NULL, "marvell,ap806-cpu-clock");
-+	node = of_find_matching_node_and_match(NULL, armada_8k_cpufreq_of_match,
-+					       NULL);
- 	if (!node || !of_device_is_available(node)) {
- 		of_node_put(node);
- 		return -ENODEV;
-@@ -204,12 +212,6 @@ static void __exit armada_8k_cpufreq_exi
- }
- module_exit(armada_8k_cpufreq_exit);
- 
--static const struct of_device_id __maybe_unused armada_8k_cpufreq_of_match[] = {
--	{ .compatible = "marvell,ap806-cpu-clock" },
--	{ },
--};
--MODULE_DEVICE_TABLE(of, armada_8k_cpufreq_of_match);
--
- MODULE_AUTHOR("Gregory Clement <gregory.clement at bootlin.com>");
- MODULE_DESCRIPTION("Armada 8K cpufreq driver");
- MODULE_LICENSE("GPL");



From lede-commits at lists.infradead.org  Wed Apr  3 08:49:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 11:49:59 -0400
Subject: [openwrt/openwrt]  mvebu: 6.6: adjust 32 bit ARM DTS path
In-Reply-To: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
References: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
Message-ID: <mailman.23291.1712159413.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/20024ab7c3df4da2d446e214c7b4a61fc896bdcd

commit 20024ab7c3df4da2d446e214c7b4a61fc896bdcd
Author: Stijn Segers <foss at volatilesystems.org>
AuthorDate: Sat Mar 23 22:02:56 2024 +0100

    mvebu: 6.6: adjust 32 bit ARM DTS path
    
    As of 6.6, all upstream DTSes are moved to their respective vendor subdir.
    OpenWrt already followed this practice for ARM64, but not yet for 32 bit
    ARM (Armada 37x/38x).
    
    Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 .../{ => marvell}/armada-370-buffalo-ls220de.dts   |  0
 .../{ => marvell}/armada-370-buffalo-ls421de.dts   |  0
 .../boot/dts/{ => marvell}/armada-370-c200-v2.dts  |  0
 .../dts/{ => marvell}/armada-380-iij-sa-w2.dts     |  0
 .../{ => marvell}/armada-385-fortinet-fg-30e.dts   |  0
 .../{ => marvell}/armada-385-fortinet-fg-50e.dts   |  0
 .../{ => marvell}/armada-385-fortinet-fg-x0e.dtsi  |  0
 .../dts/{ => marvell}/armada-385-linksys-venom.dts |  0
 .../boot/dts/{ => marvell}/armada-385-nas1dual.dts |  0
 .../mvebu/patches-6.6/302-add_powertables.patch    | 24 +++++++++++-----------
 .../mvebu/patches-6.6/304-revert_i2c_delay.patch   |  4 ++--
 .../305-armada-385-rd-mtd-partitions.patch         |  4 ++--
 .../306-ARM-mvebu-385-ap-Add-partitions.patch      |  6 +++---
 .../307-armada-xp-linksys-mamba-broken-idle.patch  |  4 ++--
 .../308-armada-xp-linksys-mamba-wan.patch          |  4 ++--
 .../mvebu/patches-6.6/309-linksys-status-led.patch |  8 ++++----
 .../310-linksys-use-eth0-as-cpu-port.patch         |  4 ++--
 .../311-adjust-compatible-for-linksys.patch        | 20 +++++++++---------
 ...-armada388-clearfog-emmc-on-clearfog-base.patch | 10 ++++-----
 .../313-helios4-dts-status-led-alias.patch         |  4 ++--
 ...315-armada-xp-linksys-mamba-resize-kernel.patch |  6 +++---
 .../316-armada-370-dts-fix-crypto-engine.patch     |  4 ++--
 ...-dts-armada-370-synology-ds213j-mtd-parts.patch |  4 ++--
 23 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-370-buffalo-ls220de.dts
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-370-buffalo-ls220de.dts
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-370-buffalo-ls220de.dts
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-370-buffalo-ls421de.dts
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-370-buffalo-ls421de.dts
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-370-buffalo-ls421de.dts
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-370-c200-v2.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-370-c200-v2.dts
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-370-c200-v2.dts
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-370-c200-v2.dts
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-380-iij-sa-w2.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-380-iij-sa-w2.dts
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-linksys-venom.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-linksys-venom.dts
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-linksys-venom.dts
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-linksys-venom.dts
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-nas1dual.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-nas1dual.dts
similarity index 100%
rename from target/linux/mvebu/files-6.6/arch/arm/boot/dts/armada-385-nas1dual.dts
rename to target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-nas1dual.dts
diff --git a/target/linux/mvebu/patches-6.6/302-add_powertables.patch b/target/linux/mvebu/patches-6.6/302-add_powertables.patch
index d0c0dbeb0c..36117d0cd1 100644
--- a/target/linux/mvebu/patches-6.6/302-add_powertables.patch
+++ b/target/linux/mvebu/patches-6.6/302-add_powertables.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-385-linksys.dtsi
-+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
 @@ -214,11 +214,19 @@
  &pcie1 {
  	/* Marvell 88W8864, 5GHz-only */
@@ -20,8 +20,8 @@
  };
  
  &pinctrl {
---- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts
-+++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys-caiman.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys-caiman.dts
 @@ -142,3 +142,205 @@
  		};
  	};
@@ -228,8 +228,8 @@
 +		};
 +	};
 +};
---- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts
-+++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys-cobra.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys-cobra.dts
 @@ -142,3 +142,205 @@
  		};
  	};
@@ -436,8 +436,8 @@
 +		};
 +	};
 +};
---- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts
-+++ b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys-shelby.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys-shelby.dts
 @@ -142,3 +142,205 @@
  		};
  	};
@@ -644,8 +644,8 @@
 +		};
 +	};
 +};
---- a/arch/arm/boot/dts/armada-385-linksys-rango.dts
-+++ b/arch/arm/boot/dts/armada-385-linksys-rango.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts
 @@ -157,6 +157,18 @@
  	};
  };
@@ -665,8 +665,8 @@
  &sdhci {
  	pinctrl-names = "default";
  	pinctrl-0 = <&sdhci_pins>;
---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
-+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+--- a/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
++++ b/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
 @@ -223,12 +223,100 @@
  	pcie at 2,0 {
  		/* Port 0, Lane 1 */
diff --git a/target/linux/mvebu/patches-6.6/304-revert_i2c_delay.patch b/target/linux/mvebu/patches-6.6/304-revert_i2c_delay.patch
index 930c0f9494..3802b0f16e 100644
--- a/target/linux/mvebu/patches-6.6/304-revert_i2c_delay.patch
+++ b/target/linux/mvebu/patches-6.6/304-revert_i2c_delay.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-xp.dtsi
-+++ b/arch/arm/boot/dts/armada-xp.dtsi
+--- a/arch/arm/boot/dts/marvell/armada-xp.dtsi
++++ b/arch/arm/boot/dts/marvell/armada-xp.dtsi
 @@ -237,12 +237,10 @@
  };
  
diff --git a/target/linux/mvebu/patches-6.6/305-armada-385-rd-mtd-partitions.patch b/target/linux/mvebu/patches-6.6/305-armada-385-rd-mtd-partitions.patch
index 31bd53b1f3..6fd4fa0e20 100644
--- a/target/linux/mvebu/patches-6.6/305-armada-385-rd-mtd-partitions.patch
+++ b/target/linux/mvebu/patches-6.6/305-armada-385-rd-mtd-partitions.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-388-rd.dts
-+++ b/arch/arm/boot/dts/armada-388-rd.dts
+--- a/arch/arm/boot/dts/marvell/armada-388-rd.dts
++++ b/arch/arm/boot/dts/marvell/armada-388-rd.dts
 @@ -103,6 +103,16 @@
  		compatible = "st,m25p128", "jedec,spi-nor";
  		reg = <0>; /* Chip select 0 */
diff --git a/target/linux/mvebu/patches-6.6/306-ARM-mvebu-385-ap-Add-partitions.patch b/target/linux/mvebu/patches-6.6/306-ARM-mvebu-385-ap-Add-partitions.patch
index aee033d21f..fbdab2fb94 100644
--- a/target/linux/mvebu/patches-6.6/306-ARM-mvebu-385-ap-Add-partitions.patch
+++ b/target/linux/mvebu/patches-6.6/306-ARM-mvebu-385-ap-Add-partitions.patch
@@ -5,11 +5,11 @@ Subject: [PATCH 2/2] ARM: mvebu: 385-ap: Add partitions
 
 Signed-off-by: Maxime Ripard <maxime.ripard at free-electrons.com>
 ---
- arch/arm/boot/dts/armada-385-db-ap.dts | 6 +++---
+ arch/arm/boot/dts/marvell/armada-385-db-ap.dts | 6 +++---
  1 file changed, 3 insertions(+), 3 deletions(-)
 
---- a/arch/arm/boot/dts/armada-385-db-ap.dts
-+++ b/arch/arm/boot/dts/armada-385-db-ap.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-db-ap.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-db-ap.dts
 @@ -218,19 +218,19 @@
  			#size-cells = <1>;
  
diff --git a/target/linux/mvebu/patches-6.6/307-armada-xp-linksys-mamba-broken-idle.patch b/target/linux/mvebu/patches-6.6/307-armada-xp-linksys-mamba-broken-idle.patch
index fc6d6239ca..b801b54435 100644
--- a/target/linux/mvebu/patches-6.6/307-armada-xp-linksys-mamba-broken-idle.patch
+++ b/target/linux/mvebu/patches-6.6/307-armada-xp-linksys-mamba-broken-idle.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
-+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+--- a/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
++++ b/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
 @@ -483,3 +483,7 @@
  		};
  	};
diff --git a/target/linux/mvebu/patches-6.6/308-armada-xp-linksys-mamba-wan.patch b/target/linux/mvebu/patches-6.6/308-armada-xp-linksys-mamba-wan.patch
index 389e03742e..5d8c5811b6 100644
--- a/target/linux/mvebu/patches-6.6/308-armada-xp-linksys-mamba-wan.patch
+++ b/target/linux/mvebu/patches-6.6/308-armada-xp-linksys-mamba-wan.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
-+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+--- a/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
++++ b/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
 @@ -385,7 +385,7 @@
  
  			port at 4 {
diff --git a/target/linux/mvebu/patches-6.6/309-linksys-status-led.patch b/target/linux/mvebu/patches-6.6/309-linksys-status-led.patch
index 0ef15f2943..4cbc2787b2 100644
--- a/target/linux/mvebu/patches-6.6/309-linksys-status-led.patch
+++ b/target/linux/mvebu/patches-6.6/309-linksys-status-led.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-385-linksys.dtsi
-+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
 @@ -14,6 +14,13 @@
  	compatible = "linksys,armada385", "marvell,armada385",
  		     "marvell,armada380";
@@ -23,8 +23,8 @@
  			gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
  			default-state = "on";
  		};
---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
-+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+--- a/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
++++ b/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
 @@ -26,6 +26,13 @@
  	compatible = "linksys,mamba", "marvell,armadaxp-mv78230",
  		     "marvell,armadaxp", "marvell,armada-370-xp";
diff --git a/target/linux/mvebu/patches-6.6/310-linksys-use-eth0-as-cpu-port.patch b/target/linux/mvebu/patches-6.6/310-linksys-use-eth0-as-cpu-port.patch
index 84d49a004b..8136646671 100644
--- a/target/linux/mvebu/patches-6.6/310-linksys-use-eth0-as-cpu-port.patch
+++ b/target/linux/mvebu/patches-6.6/310-linksys-use-eth0-as-cpu-port.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-385-linksys.dtsi
-+++ b/arch/arm/boot/dts/armada-385-linksys.dtsi
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys.dtsi
 @@ -116,7 +116,7 @@
  };
  
diff --git a/target/linux/mvebu/patches-6.6/311-adjust-compatible-for-linksys.patch b/target/linux/mvebu/patches-6.6/311-adjust-compatible-for-linksys.patch
index a5d3e63810..6722248df7 100644
--- a/target/linux/mvebu/patches-6.6/311-adjust-compatible-for-linksys.patch
+++ b/target/linux/mvebu/patches-6.6/311-adjust-compatible-for-linksys.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-385-linksys-rango.dts
-+++ b/arch/arm/boot/dts/armada-385-linksys-rango.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys-rango.dts
 @@ -12,8 +12,8 @@
  
  / {
@@ -11,8 +11,8 @@
  };
  
  &expander0 {
---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
-+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+--- a/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
++++ b/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
 @@ -22,9 +22,10 @@
  #include "armada-xp-mv78230.dtsi"
  
@@ -27,8 +27,8 @@
  
  	aliases {
  		led-boot = &led_power;
---- a/arch/arm/boot/dts/armada-385-linksys-cobra.dts
-+++ b/arch/arm/boot/dts/armada-385-linksys-cobra.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys-cobra.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys-cobra.dts
 @@ -9,8 +9,9 @@
  #include "armada-385-linksys.dtsi"
  
@@ -41,8 +41,8 @@
  		     "marvell,armada380";
  };
  
---- a/arch/arm/boot/dts/armada-385-linksys-caiman.dts
-+++ b/arch/arm/boot/dts/armada-385-linksys-caiman.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys-caiman.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys-caiman.dts
 @@ -10,8 +10,8 @@
  
  / {
@@ -54,8 +54,8 @@
  };
  
  &expander0 {
---- a/arch/arm/boot/dts/armada-385-linksys-shelby.dts
-+++ b/arch/arm/boot/dts/armada-385-linksys-shelby.dts
+--- a/arch/arm/boot/dts/marvell/armada-385-linksys-shelby.dts
++++ b/arch/arm/boot/dts/marvell/armada-385-linksys-shelby.dts
 @@ -10,7 +10,8 @@
  
  / {
diff --git a/target/linux/mvebu/patches-6.6/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch b/target/linux/mvebu/patches-6.6/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch
index f52417e83a..5f84a34769 100644
--- a/target/linux/mvebu/patches-6.6/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch
+++ b/target/linux/mvebu/patches-6.6/312-ARM-dts-armada388-clearfog-emmc-on-clearfog-base.patch
@@ -5,13 +5,13 @@ Subject: ARM: dts: armada388-clearfog: emmc on clearfog base
 
 Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 ---
- .../arm/boot/dts/armada-388-clearfog-base.dts |  1 +
+ .../arm/boot/dts/marvell/armada-388-clearfog-base.dts |  1 +
  .../armada-38x-solidrun-microsom-emmc.dtsi    | 62 +++++++++++++++++++
  2 files changed, 63 insertions(+)
- create mode 100644 arch/arm/boot/dts/armada-38x-solidrun-microsom-emmc.dtsi
+ create mode 100644 arch/arm/boot/dts/marvell/armada-38x-solidrun-microsom-emmc.dtsi
 
---- a/arch/arm/boot/dts/armada-388-clearfog-base.dts
-+++ b/arch/arm/boot/dts/armada-388-clearfog-base.dts
+--- a/arch/arm/boot/dts/marvell/armada-388-clearfog-base.dts
++++ b/arch/arm/boot/dts/marvell/armada-388-clearfog-base.dts
 @@ -7,6 +7,7 @@
  
  /dts-v1/;
@@ -21,7 +21,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  / {
  	model = "SolidRun Clearfog Base A1";
 --- /dev/null
-+++ b/arch/arm/boot/dts/armada-38x-solidrun-microsom-emmc.dtsi
++++ b/arch/arm/boot/dts/marvell/armada-38x-solidrun-microsom-emmc.dtsi
 @@ -0,0 +1,62 @@
 +/*
 + * Device Tree file for SolidRun Armada 38x Microsom add-on for eMMC
diff --git a/target/linux/mvebu/patches-6.6/313-helios4-dts-status-led-alias.patch b/target/linux/mvebu/patches-6.6/313-helios4-dts-status-led-alias.patch
index 607f436297..50b970aabb 100644
--- a/target/linux/mvebu/patches-6.6/313-helios4-dts-status-led-alias.patch
+++ b/target/linux/mvebu/patches-6.6/313-helios4-dts-status-led-alias.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-388-helios4.dts
-+++ b/arch/arm/boot/dts/armada-388-helios4.dts
+--- a/arch/arm/boot/dts/marvell/armada-388-helios4.dts
++++ b/arch/arm/boot/dts/marvell/armada-388-helios4.dts
 @@ -15,6 +15,13 @@
  	model = "Helios4";
  	compatible = "kobol,helios4", "marvell,armada388",
diff --git a/target/linux/mvebu/patches-6.6/315-armada-xp-linksys-mamba-resize-kernel.patch b/target/linux/mvebu/patches-6.6/315-armada-xp-linksys-mamba-resize-kernel.patch
index c333df2784..d36fe7441c 100644
--- a/target/linux/mvebu/patches-6.6/315-armada-xp-linksys-mamba-resize-kernel.patch
+++ b/target/linux/mvebu/patches-6.6/315-armada-xp-linksys-mamba-resize-kernel.patch
@@ -6,11 +6,11 @@ Subject: [PATCH] ARM: dts: armada-xp-linksys-mamba: Increase kernel
 
 Signed-off-by: Tad Davanzo <tad at spotco.us>
 ---
- arch/arm/boot/dts/armada-xp-linksys-mamba.dts | 8 ++++----
+ arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts | 8 ++++----
  1 file changed, 4 insertions(+), 4 deletions(-)
 
---- a/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
-+++ b/arch/arm/boot/dts/armada-xp-linksys-mamba.dts
+--- a/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
++++ b/arch/arm/boot/dts/marvell/armada-xp-linksys-mamba.dts
 @@ -454,9 +454,9 @@
  				reg = <0xa00000 0x2800000>;  /* 40MB */
  			};
diff --git a/target/linux/mvebu/patches-6.6/316-armada-370-dts-fix-crypto-engine.patch b/target/linux/mvebu/patches-6.6/316-armada-370-dts-fix-crypto-engine.patch
index b5ed5ece36..653c2b0a18 100644
--- a/target/linux/mvebu/patches-6.6/316-armada-370-dts-fix-crypto-engine.patch
+++ b/target/linux/mvebu/patches-6.6/316-armada-370-dts-fix-crypto-engine.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-370.dtsi
-+++ b/arch/arm/boot/dts/armada-370.dtsi
+--- a/arch/arm/boot/dts/marvell/armada-370.dtsi
++++ b/arch/arm/boot/dts/marvell/armada-370.dtsi
 @@ -254,7 +254,7 @@
  				clocks = <&gateclk 23>;
  				clock-names = "cesa0";
diff --git a/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch b/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
index 280fc5957e..0699a47765 100644
--- a/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
+++ b/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/armada-370-synology-ds213j.dts
-+++ b/arch/arm/boot/dts/armada-370-synology-ds213j.dts
+--- a/arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dts
++++ b/arch/arm/boot/dts/marvell/armada-370-synology-ds213j.dts
 @@ -31,6 +31,7 @@
  
  	chosen {



From lede-commits at lists.infradead.org  Wed Apr  3 08:50:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 11:50:01 -0400
Subject: [openwrt/openwrt]  mvebu: 6.6: refresh patches
In-Reply-To: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
References: <171215939796.2767975.15862462048966640933@git-01.infra.openwrt.org>
Message-ID: <mailman.23294.1712159413.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2260ec4fb7a4689482b6d55b1ffcb50dfe7c6fcb

commit 2260ec4fb7a4689482b6d55b1ffcb50dfe7c6fcb
Author: Stijn Segers <foss at volatilesystems.org>
AuthorDate: Thu Mar 28 19:05:32 2024 +0100

    mvebu: 6.6: refresh patches
    
    Manually refreshed:
     * 309-linksys-status-led.patch
     * 310-linksys-use-eth0-as-cpu-port.patch
     * 320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
     * 701-mvpp2-read-mac-address-from-nvmem.patch
     * 902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
    
    All other patches automatically refreshed.
    
    Signed-off-by: Stijn Segers <foss at volatilesystems.org>
---
 ...vebu-Mangle-bootloader-s-kernel-arguments.patch | 34 +++++++++++-----------
 .../mvebu/patches-6.6/309-linksys-status-led.patch |  4 +--
 .../310-linksys-use-eth0-as-cpu-port.patch         |  2 +-
 ...-dts-armada-370-synology-ds213j-mtd-parts.patch | 18 ++++++------
 .../700-mvneta-tx-queue-workaround.patch           |  4 +--
 .../701-mvpp2-read-mac-address-from-nvmem.patch    |  8 ++---
 ...bu-indicate-failure-to-enter-deeper-sleep.patch |  4 +--
 .../801-pci-mvebu-time-out-reset-on-link-up.patch  |  6 ++--
 ...-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch |  2 +-
 ...-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch |  8 ++---
 ...on-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch |  4 +--
 ...ds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch |  4 +--
 ...on-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch |  2 +-
 ...-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch |  6 ++--
 14 files changed, 53 insertions(+), 53 deletions(-)

diff --git a/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
index f3881a0d25..625f51a95d 100644
--- a/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
@@ -28,7 +28,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
 
 --- a/arch/arm/Kconfig
 +++ b/arch/arm/Kconfig
-@@ -1587,6 +1587,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
+@@ -1566,6 +1566,17 @@ config ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEN
  	  The command-line arguments provided by the boot loader will be
  	  appended to the the device tree bootargs property.
  
@@ -48,7 +48,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  config CMDLINE
 --- a/arch/arm/boot/compressed/atags_to_fdt.c
 +++ b/arch/arm/boot/compressed/atags_to_fdt.c
-@@ -5,6 +5,8 @@
+@@ -6,6 +6,8 @@
  
  #if defined(CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_EXTEND)
  #define do_extend_cmdline 1
@@ -57,7 +57,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  #else
  #define do_extend_cmdline 0
  #endif
-@@ -20,6 +22,7 @@ static int node_offset(void *fdt, const
+@@ -21,6 +23,7 @@ static int node_offset(void *fdt, const
  	return offset;
  }
  
@@ -65,7 +65,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static int setprop(void *fdt, const char *node_path, const char *property,
  		   void *val_array, int size)
  {
-@@ -28,6 +31,7 @@ static int setprop(void *fdt, const char
+@@ -29,6 +32,7 @@ static int setprop(void *fdt, const char
  		return offset;
  	return fdt_setprop(fdt, offset, property, val_array, size);
  }
@@ -73,7 +73,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  
  static int setprop_string(void *fdt, const char *node_path,
  			  const char *property, const char *string)
-@@ -38,6 +42,7 @@ static int setprop_string(void *fdt, con
+@@ -39,6 +43,7 @@ static int setprop_string(void *fdt, con
  	return fdt_setprop_string(fdt, offset, property, string);
  }
  
@@ -81,7 +81,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static int setprop_cell(void *fdt, const char *node_path,
  			const char *property, uint32_t val)
  {
-@@ -46,6 +51,7 @@ static int setprop_cell(void *fdt, const
+@@ -47,6 +52,7 @@ static int setprop_cell(void *fdt, const
  		return offset;
  	return fdt_setprop_cell(fdt, offset, property, val);
  }
@@ -89,7 +89,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  
  static const void *getprop(const void *fdt, const char *node_path,
  			   const char *property, int *len)
-@@ -58,6 +64,7 @@ static const void *getprop(const void *f
+@@ -59,6 +65,7 @@ static const void *getprop(const void *f
  	return fdt_getprop(fdt, offset, property, len);
  }
  
@@ -97,7 +97,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static uint32_t get_cell_size(const void *fdt)
  {
  	int len;
-@@ -69,6 +76,74 @@ static uint32_t get_cell_size(const void
+@@ -70,6 +77,74 @@ static uint32_t get_cell_size(const void
  	return cell_size;
  }
  
@@ -172,7 +172,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static void merge_fdt_bootargs(void *fdt, const char *fdt_cmdline)
  {
  	char cmdline[COMMAND_LINE_SIZE];
-@@ -88,18 +163,28 @@ static void merge_fdt_bootargs(void *fdt
+@@ -89,18 +164,28 @@ static void merge_fdt_bootargs(void *fdt
  
  	/* and append the ATAG_CMDLINE */
  	if (fdt_cmdline) {
@@ -201,7 +201,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static void hex_str(char *out, uint32_t value)
  {
  	uint32_t digit;
-@@ -117,6 +202,7 @@ static void hex_str(char *out, uint32_t
+@@ -118,6 +203,7 @@ static void hex_str(char *out, uint32_t
  	}
  	*out = '\0';
  }
@@ -209,7 +209,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  
  /*
   * Convert and fold provided ATAGs into the provided FDT.
-@@ -131,9 +217,11 @@ int atags_to_fdt(void *atag_list, void *
+@@ -132,9 +218,11 @@ int atags_to_fdt(void *atag_list, void *
  	struct tag *atag = atag_list;
  	/* In the case of 64 bits memory size, need to reserve 2 cells for
  	 * address and size for each bank */
@@ -223,7 +223,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  
  	/* make sure we've got an aligned pointer */
  	if ((u32)atag_list & 0x3)
-@@ -168,7 +256,9 @@ int atags_to_fdt(void *atag_list, void *
+@@ -169,7 +257,9 @@ int atags_to_fdt(void *atag_list, void *
  			else
  				setprop_string(fdt, "/chosen", "bootargs",
  					       atag->u.cmdline.cmdline);
@@ -234,7 +234,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  			if (memcount >= sizeof(mem_reg_property)/4)
  				continue;
  			if (!atag->u.mem.size)
-@@ -212,6 +302,10 @@ int atags_to_fdt(void *atag_list, void *
+@@ -213,6 +303,10 @@ int atags_to_fdt(void *atag_list, void *
  		setprop(fdt, "/memory", "reg", mem_reg_property,
  			4 * memcount * memsize);
  	}
@@ -247,7 +247,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  }
 --- a/init/main.c
 +++ b/init/main.c
-@@ -112,6 +112,10 @@
+@@ -111,6 +111,10 @@
  
  #include <kunit/test.h>
  
@@ -257,9 +257,9 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
 +
  static int kernel_init(void *);
  
- extern void init_IRQ(void);
-@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa
- 	page_alloc_init();
+ /*
+@@ -927,6 +931,18 @@ void start_kernel(void)
+ 	boot_cpu_hotplug_init();
  
  	pr_notice("Kernel command line: %s\n", saved_command_line);
 +
diff --git a/target/linux/mvebu/patches-6.6/309-linksys-status-led.patch b/target/linux/mvebu/patches-6.6/309-linksys-status-led.patch
index 4cbc2787b2..4ad9abc3a1 100644
--- a/target/linux/mvebu/patches-6.6/309-linksys-status-led.patch
+++ b/target/linux/mvebu/patches-6.6/309-linksys-status-led.patch
@@ -18,7 +18,7 @@
  		pinctrl-0 = <&gpio_leds_pins>;
  		pinctrl-names = "default";
  
--		power {
+-		led-power {
 +		led_power: power {
  			gpios = <&gpio1 23 GPIO_ACTIVE_HIGH>;
  			default-state = "on";
@@ -43,7 +43,7 @@
  		pinctrl-0 = <&power_led_pin>;
  		pinctrl-names = "default";
  
--		power {
+-		led-power {
 +		led_power: power {
  			label = "mamba:white:power";
  			gpios = <&gpio1 8 GPIO_ACTIVE_HIGH>;
diff --git a/target/linux/mvebu/patches-6.6/310-linksys-use-eth0-as-cpu-port.patch b/target/linux/mvebu/patches-6.6/310-linksys-use-eth0-as-cpu-port.patch
index 8136646671..683a5ebe51 100644
--- a/target/linux/mvebu/patches-6.6/310-linksys-use-eth0-as-cpu-port.patch
+++ b/target/linux/mvebu/patches-6.6/310-linksys-use-eth0-as-cpu-port.patch
@@ -17,7 +17,7 @@
 -				reg = <5>;
 +			port at 6 {
 +				reg = <6>;
- 				label = "cpu";
+ 				phy-mode = "sgmii";
 -				ethernet = <&eth2>;
 +				ethernet = <&eth0>;
  
diff --git a/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch b/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
index 0699a47765..1f02ff74b0 100644
--- a/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
+++ b/target/linux/mvebu/patches-6.6/320-arm-dts-armada-370-synology-ds213j-mtd-parts.patch
@@ -9,17 +9,17 @@
  
  	memory at 0 {
 @@ -94,6 +95,8 @@
- 			       status = "okay";
- 			       phy = <&phy1>;
- 			       phy-mode = "sgmii";
-+		               nvmem-cells = <&macaddr_vendor_0>;
-+        		       nvmem-cell-names = "mac-address";
+ 				status = "okay";
+ 				phy = <&phy1>;
+ 				phy-mode = "sgmii";
++				nvmem-cells = <&macaddr_vendor_0>;
++				nvmem-cell-names = "mac-address";
  			};
  
  			sata at a0000 {
 @@ -175,6 +178,24 @@
- 			gpio = <&gpio1 30 GPIO_ACTIVE_HIGH>;
- 		};
+ 	phy1: ethernet-phy at 1 { /* Marvell 88E1512 */
+ 		reg = <1>;
  	};
 +
 +	virtual_flash {
@@ -41,8 +41,8 @@
 +	};
  };
  
- &mdio {
-@@ -265,48 +286,52 @@
+ &pinctrl {
+@@ -259,48 +280,52 @@
  		reg = <0>; /* Chip select 0 */
  		spi-max-frequency = <20000000>;
  
diff --git a/target/linux/mvebu/patches-6.6/700-mvneta-tx-queue-workaround.patch b/target/linux/mvebu/patches-6.6/700-mvneta-tx-queue-workaround.patch
index 14f93592fe..099281e048 100644
--- a/target/linux/mvebu/patches-6.6/700-mvneta-tx-queue-workaround.patch
+++ b/target/linux/mvebu/patches-6.6/700-mvneta-tx-queue-workaround.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
 --- a/drivers/net/ethernet/marvell/mvneta.c
 +++ b/drivers/net/ethernet/marvell/mvneta.c
-@@ -5233,6 +5233,16 @@ static int mvneta_setup_tc(struct net_de
+@@ -5294,6 +5294,16 @@ static int mvneta_setup_tc(struct net_de
  	}
  }
  
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static const struct net_device_ops mvneta_netdev_ops = {
  	.ndo_open            = mvneta_open,
  	.ndo_stop            = mvneta_stop,
-@@ -5243,6 +5253,9 @@ static const struct net_device_ops mvnet
+@@ -5304,6 +5314,9 @@ static const struct net_device_ops mvnet
  	.ndo_fix_features    = mvneta_fix_features,
  	.ndo_get_stats64     = mvneta_get_stats64,
  	.ndo_eth_ioctl        = mvneta_ioctl,
diff --git a/target/linux/mvebu/patches-6.6/701-mvpp2-read-mac-address-from-nvmem.patch b/target/linux/mvebu/patches-6.6/701-mvpp2-read-mac-address-from-nvmem.patch
index 1c4194776a..c5bad1772f 100644
--- a/target/linux/mvebu/patches-6.6/701-mvpp2-read-mac-address-from-nvmem.patch
+++ b/target/linux/mvebu/patches-6.6/701-mvpp2-read-mac-address-from-nvmem.patch
@@ -12,16 +12,16 @@ Signed-off-by: Tobias Schramm <tobias at t-sys.eu>
 ---
 --- a/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
 +++ b/drivers/net/ethernet/marvell/mvpp2/mvpp2_main.c
-@@ -6134,6 +6134,12 @@ static void mvpp2_port_copy_mac_addr(str
- 		}
+@@ -6153,6 +6153,12 @@ static int mvpp2_port_copy_mac_addr(stru
+ 		return 0;
  	}
  
 +	if (!of_get_mac_address(to_of_node(fwnode), hw_mac_addr)) {
 +		*mac_from = "nvmem cell";
 +		eth_hw_addr_set(dev, hw_mac_addr);
-+		return;
++		return 0;
 +	}
 +
  	*mac_from = "random";
  	eth_hw_addr_random(dev);
- }
+ 
diff --git a/target/linux/mvebu/patches-6.6/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch b/target/linux/mvebu/patches-6.6/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch
index 29f36be460..5df5aca5dc 100644
--- a/target/linux/mvebu/patches-6.6/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch
+++ b/target/linux/mvebu/patches-6.6/800-cpuidle-mvebu-indicate-failure-to-enter-deeper-sleep.patch
@@ -24,8 +24,8 @@ Signed-off-by: Russell King <rmk+kernel at arm.linux.org.uk>
 
 --- a/drivers/cpuidle/cpuidle-mvebu-v7.c
 +++ b/drivers/cpuidle/cpuidle-mvebu-v7.c
-@@ -39,8 +39,12 @@ static int mvebu_v7_enter_idle(struct cp
- 	ret = mvebu_v7_cpu_suspend(deepidle);
+@@ -42,8 +42,12 @@ static __cpuidle int mvebu_v7_enter_idle
+ 
  	cpu_pm_exit();
  
 +	/*
diff --git a/target/linux/mvebu/patches-6.6/801-pci-mvebu-time-out-reset-on-link-up.patch b/target/linux/mvebu/patches-6.6/801-pci-mvebu-time-out-reset-on-link-up.patch
index d2995b375c..f1832c8940 100644
--- a/target/linux/mvebu/patches-6.6/801-pci-mvebu-time-out-reset-on-link-up.patch
+++ b/target/linux/mvebu/patches-6.6/801-pci-mvebu-time-out-reset-on-link-up.patch
@@ -13,7 +13,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
 
 --- a/drivers/pci/controller/pci-mvebu.c
 +++ b/drivers/pci/controller/pci-mvebu.c
-@@ -1414,6 +1414,7 @@ static int mvebu_pcie_powerup(struct mve
+@@ -1397,6 +1397,7 @@ static int mvebu_pcie_powerup(struct mve
  
  	if (port->reset_gpio) {
  		u32 reset_udelay = PCI_PM_D3COLD_WAIT * 1000;
@@ -21,7 +21,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  
  		of_property_read_u32(port->dn, "reset-delay-us",
  				     &reset_udelay);
-@@ -1421,7 +1422,13 @@ static int mvebu_pcie_powerup(struct mve
+@@ -1404,7 +1405,13 @@ static int mvebu_pcie_powerup(struct mve
  		udelay(100);
  
  		gpiod_set_value_cansleep(port->reset_gpio, 0);
@@ -36,7 +36,7 @@ Signed-off-by: Russell King <rmk+kernel at armlinux.org.uk>
  	}
  
  	return 0;
-@@ -1538,15 +1545,16 @@ static int mvebu_pcie_probe(struct platf
+@@ -1521,15 +1528,16 @@ static int mvebu_pcie_probe(struct platf
  		if (!child)
  			continue;
  
diff --git a/target/linux/mvebu/patches-6.6/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch b/target/linux/mvebu/patches-6.6/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch
index fc5c804582..e9c1d57d24 100644
--- a/target/linux/mvebu/patches-6.6/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch
+++ b/target/linux/mvebu/patches-6.6/901-dt-bindings-Add-IEI-vendor-prefix-and-IEI-WT61P803-P.patch
@@ -207,7 +207,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 +    };
 --- a/Documentation/devicetree/bindings/vendor-prefixes.yaml
 +++ b/Documentation/devicetree/bindings/vendor-prefixes.yaml
-@@ -579,6 +579,8 @@ patternProperties:
+@@ -609,6 +609,8 @@ patternProperties:
      description: IC Plus Corp.
    "^idt,.*":
      description: Integrated Device Technologies, Inc.
diff --git a/target/linux/mvebu/patches-6.6/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch b/target/linux/mvebu/patches-6.6/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
index 47d9e3a263..1046b15e4b 100644
--- a/target/linux/mvebu/patches-6.6/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
+++ b/target/linux/mvebu/patches-6.6/902-drivers-mfd-Add-a-driver-for-IEI-WT61P803-PUZZLE-MCU.patch
@@ -26,7 +26,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 
 --- a/drivers/mfd/Kconfig
 +++ b/drivers/mfd/Kconfig
-@@ -2222,6 +2222,15 @@ config SGI_MFD_IOC3
+@@ -2274,6 +2274,15 @@ config SGI_MFD_IOC3
  	  If you have an SGI Origin, Octane, or a PCI IOC3 card,
  	  then say Y. Otherwise say N.
  
@@ -39,9 +39,9 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 +	  used for fan control, temperature sensor reading, LED control
 +	  and system identification.
 +
- config MFD_INTEL_M10_BMC
- 	tristate "Intel MAX 10 Board Management Controller"
- 	depends on SPI_MASTER
+ config MFD_INTEL_M10_BMC_CORE
+         tristate
+         select MFD_CORE
 --- a/drivers/mfd/Makefile
 +++ b/drivers/mfd/Makefile
 @@ -244,6 +244,7 @@ obj-$(CONFIG_MFD_RT4831)	+= rt4831.o
diff --git a/target/linux/mvebu/patches-6.6/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch b/target/linux/mvebu/patches-6.6/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch
index a11b387d92..d4a533917b 100644
--- a/target/linux/mvebu/patches-6.6/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch
+++ b/target/linux/mvebu/patches-6.6/903-drivers-hwmon-Add-the-IEI-WT61P803-PUZZLE-HWMON-driv.patch
@@ -26,7 +26,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 
 --- a/drivers/hwmon/Kconfig
 +++ b/drivers/hwmon/Kconfig
-@@ -755,6 +755,14 @@ config SENSORS_IBMPOWERNV
+@@ -783,6 +783,14 @@ config SENSORS_IBMPOWERNV
  	  This driver can also be built as a module. If so, the module
  	  will be called ibmpowernv.
  
@@ -43,7 +43,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
  	depends on IIO
 --- a/drivers/hwmon/Makefile
 +++ b/drivers/hwmon/Makefile
-@@ -87,6 +87,7 @@ obj-$(CONFIG_SENSORS_HIH6130)	+= hih6130
+@@ -90,6 +90,7 @@ obj-$(CONFIG_SENSORS_HS3001)	+= hs3001.o
  obj-$(CONFIG_SENSORS_ULTRA45)	+= ultra45_env.o
  obj-$(CONFIG_SENSORS_I5500)	+= i5500_temp.o
  obj-$(CONFIG_SENSORS_I5K_AMB)	+= i5k_amb.o
diff --git a/target/linux/mvebu/patches-6.6/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch b/target/linux/mvebu/patches-6.6/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch
index 1abb1b9416..a9cb46bbd8 100644
--- a/target/linux/mvebu/patches-6.6/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch
+++ b/target/linux/mvebu/patches-6.6/904-drivers-leds-Add-the-IEI-WT61P803-PUZZLE-LED-driver.patch
@@ -30,7 +30,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 
 --- a/drivers/leds/Kconfig
 +++ b/drivers/leds/Kconfig
-@@ -300,6 +300,14 @@ config LEDS_IPAQ_MICRO
+@@ -316,6 +316,14 @@ config LEDS_IPAQ_MICRO
  	  Choose this option if you want to use the notification LED on
  	  Compaq/HP iPAQ h3100 and h3600.
  
@@ -47,7 +47,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
  	depends on LEDS_CLASS
 --- a/drivers/leds/Makefile
 +++ b/drivers/leds/Makefile
-@@ -32,6 +32,7 @@ obj-$(CONFIG_LEDS_HP6XX)		+= leds-hp6xx.
+@@ -34,6 +34,7 @@ obj-$(CONFIG_LEDS_HP6XX)		+= leds-hp6xx.
  obj-$(CONFIG_LEDS_INTEL_SS4200)		+= leds-ss4200.o
  obj-$(CONFIG_LEDS_IP30)			+= leds-ip30.o
  obj-$(CONFIG_LEDS_IPAQ_MICRO)		+= leds-ipaq-micro.o
diff --git a/target/linux/mvebu/patches-6.6/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch b/target/linux/mvebu/patches-6.6/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch
index 0f1a6f306b..77e9fa298e 100644
--- a/target/linux/mvebu/patches-6.6/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch
+++ b/target/linux/mvebu/patches-6.6/906-Documentation-hwmon-Add-iei-wt61p803-puzzle-hwmon-dr.patch
@@ -64,7 +64,7 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 +================= == =====================================================
 --- a/Documentation/hwmon/index.rst
 +++ b/Documentation/hwmon/index.rst
-@@ -77,6 +77,7 @@ Hardware Monitoring Kernel Drivers
+@@ -82,6 +82,7 @@ Hardware Monitoring Kernel Drivers
     ibmaem
     ibm-cffps
     ibmpowernv
diff --git a/target/linux/mvebu/patches-6.6/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch b/target/linux/mvebu/patches-6.6/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch
index e72df378ef..2a8397d0b5 100644
--- a/target/linux/mvebu/patches-6.6/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch
+++ b/target/linux/mvebu/patches-6.6/907-MAINTAINERS-Add-an-entry-for-the-IEI-WT61P803-PUZZLE.patch
@@ -16,9 +16,9 @@ Cc: Robert Marko <robert.marko at sartura.hr>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -9900,6 +9900,22 @@ F:	include/net/nl802154.h
- F:	net/ieee802154/
- F:	net/mac802154/
+@@ -10138,6 +10138,22 @@ IFCVF VIRTIO DATA PATH ACCELERATOR
+ R:	Zhu Lingshan <lingshan.zhu at intel.com>
+ F:	drivers/vdpa/ifcvf/
  
 +IEI WT61P803 M801 MFD DRIVER
 +M:	Luka Kovacic <luka.kovacic at sartura.hr>



From lede-commits at lists.infradead.org  Wed Apr  3 09:41:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 12:41:51 -0400
Subject: [openwrt/openwrt]  cryptodev: follow kernel.mk versioning
In-Reply-To: <171216251169.2870859.3455266826268680936@git-01.infra.openwrt.org>
References: <171216251169.2870859.3455266826268680936@git-01.infra.openwrt.org>
Message-ID: <mailman.23317.1712162516.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7bb9663dfe5a4bb108b0ca66bdb0af478520a9a0

commit 7bb9663dfe5a4bb108b0ca66bdb0af478520a9a0
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Tue Mar 26 11:36:24 2024 +0100

    cryptodev: follow kernel.mk versioning
    
    Instead of redefining the version schema in cryptodev, use the one
    automatically defined via `kernel.mk`.
    
    Specifically this changes the version from <kernel>+<package> to
    <kernel>.<package> and thereby making it compatible with APK.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/kernel/cryptodev-linux/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/kernel/cryptodev-linux/Makefile b/package/kernel/cryptodev-linux/Makefile
index 0b794a3cd9..ea1bd24161 100644
--- a/package/kernel/cryptodev-linux/Makefile
+++ b/package/kernel/cryptodev-linux/Makefile
@@ -29,7 +29,6 @@ define KernelPackage/cryptodev
   SUBMENU:=Cryptographic API modules
   TITLE:=Driver for cryptographic acceleration
   URL:=http://cryptodev-linux.org/
-  VERSION:=$(LINUX_VERSION)+$(PKG_VERSION)-$(BOARD)-$(PKG_RELEASE)
   DEPENDS:=+kmod-crypto-authenc +kmod-crypto-hash
   FILES:=$(PKG_BUILD_DIR)/cryptodev.$(LINUX_KMOD_SUFFIX)
   AUTOLOAD:=$(call AutoLoad,50,cryptodev)



From lede-commits at lists.infradead.org  Wed Apr  3 09:42:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 12:42:29 -0400
Subject: [openwrt/openwrt]  mvebu: 6.6: refresh patches
In-Reply-To: <171216254983.2872079.174217673562452147@git-01.infra.openwrt.org>
References: <171216254983.2872079.174217673562452147@git-01.infra.openwrt.org>
Message-ID: <mailman.23318.1712162553.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7a78b22dc8f3159f2a0dda498cd12ac27a026ea8

commit 7a78b22dc8f3159f2a0dda498cd12ac27a026ea8
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Wed Apr 3 18:37:34 2024 +0200

    mvebu: 6.6: refresh patches
    
    Well, it seems that we have a patch that was not refreshed and CI is
    complaining, so refresh it.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch  | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
index 625f51a95d..0cb1e75591 100644
--- a/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
@@ -247,7 +247,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  }
 --- a/init/main.c
 +++ b/init/main.c
-@@ -111,6 +111,10 @@
+@@ -112,6 +112,10 @@
  
  #include <kunit/test.h>
  
@@ -258,7 +258,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static int kernel_init(void *);
  
  /*
-@@ -927,6 +931,18 @@ void start_kernel(void)
+@@ -928,6 +932,18 @@ void start_kernel(void)
  	boot_cpu_hotplug_init();
  
  	pr_notice("Kernel command line: %s\n", saved_command_line);



From lede-commits at lists.infradead.org  Wed Apr  3 09:57:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 12:57:36 -0400
Subject: [openwrt/openwrt]  tools/bzip2: switch to cmake
In-Reply-To: <171216345601.2896607.18332380844415087213@git-01.infra.openwrt.org>
References: <171216345601.2896607.18332380844415087213@git-01.infra.openwrt.org>
Message-ID: <mailman.23333.1712163462.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1f3e0177d99ef68a5a837489413e9ed8753d2a69

commit 1f3e0177d99ef68a5a837489413e9ed8753d2a69
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Apr 3 18:52:57 2024 +0200

    tools/bzip2: switch to cmake
    
    Fixes portability issues on macOS.
    CMakeLists.txt is a stripped-down backport from bzip2 upstream
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 tools/bzip2/Makefile                               |  24 +-
 .../patches/021-merge-and-improve-makefiles.patch  | 401 ---------------------
 tools/bzip2/patches/100-cmake.patch                | 382 ++++++++++++++++++++
 3 files changed, 384 insertions(+), 423 deletions(-)

diff --git a/tools/bzip2/Makefile b/tools/bzip2/Makefile
index 0c5a92849a..86df143826 100644
--- a/tools/bzip2/Makefile
+++ b/tools/bzip2/Makefile
@@ -22,31 +22,11 @@ PKG_CPE_ID:=cpe:/a:bzip:bzip2
 HOST_BUILD_PARALLEL:=1
 
 include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/cmake.mk
 
 HOSTCC := $(HOSTCC_NOCACHE)
 HOST_CFLAGS += $(HOST_FPIC)
 
-HOST_MAKE_FLAGS+= \
-	CFLAGS="$(HOST_CFLAGS)" \
-	LDFLAGS="$(HOST_LDFLAGS)" \
-	ENABLE_BIN_SHARED=1 \
-	ENABLE_BIN_STATIC=0 \
-	ENABLE_LIB_SHARED=1 \
-	ENABLE_LIB_STATIC=1 \
-	ENABLE_DEV=1 \
-	ENABLE_DOCS=1 \
-	ENABLE_TESTS=0 \
-	PREFIX="$(HOST_BUILD_PREFIX)"
-
-define Host/Configure
-endef
-
-define Host/Uninstall
-	$(call Host/Compile/Default,uninstall)
-	$(call Host/Compile/Default,clean)
-endef
-
-define Host/Clean
-endef
+CMAKE_HOST_OPTIONS += -DENABLE_EXAMPLES=off
 
 $(eval $(call HostBuild))
diff --git a/tools/bzip2/patches/021-merge-and-improve-makefiles.patch b/tools/bzip2/patches/021-merge-and-improve-makefiles.patch
deleted file mode 100644
index 9d98c34bdb..0000000000
--- a/tools/bzip2/patches/021-merge-and-improve-makefiles.patch
+++ /dev/null
@@ -1,401 +0,0 @@
---- a/bzip2.c
-+++ b/bzip2.c
-@@ -54,7 +54,7 @@
- #include <math.h>
- #include <errno.h>
- #include <ctype.h>
--#include "bzlib.h"
-+#include <bzlib.h>
- 
- #define ERROR_IF_EOF(i)       { if ((i) == EOF)  ioError(); }
- #define ERROR_IF_NOT_ZERO(i)  { if ((i) != 0)    ioError(); }
---- a/bzlib_private.h
-+++ b/bzlib_private.h
-@@ -30,7 +30,7 @@
- #include <string.h>
- #endif
- 
--#include "bzlib.h"
-+#include <bzlib.h>
- 
- 
- 
---- a/Makefile
-+++ b/Makefile
-@@ -21,11 +21,38 @@
- LDFLAGS=
- 
- BIGFILES=-D_FILE_OFFSET_BITS=64
--CFLAGS=-Wall -Winline -O2 -g $(BIGFILES)
-+CFLAGS_COMMON=-Wall -Winline -O2 -g $(BIGFILES) -I.
-+CFLAGS_NOPIC=$(filter-out -O%,$(CFLAGS)) $(CFLAGS_COMMON)
-+CFLAGS_PIC=$(filter-out -O%,$(CFLAGS)) -fpic -fPIC $(CFLAGS_COMMON)
- 
- # Where you want it installed when you do 'make install'
--PREFIX=/usr/local
--
-+PREFIX?=/usr/local
-+ENABLE_BIN_STATIC?=1
-+ENABLE_BIN_SHARED?=1
-+ENABLE_LIB_STATIC?=1
-+ENABLE_LIB_SHARED?=1
-+ENABLE_DEV?=1
-+ENABLE_DOCS?=1
-+ENABLE_TESTS?=1
-+
-+ifeq ($(ENABLE_BIN_STATIC),1)
-+  ENABLE_BIN=1
-+  ifneq ($(ENABLE_LIB_STATIC),1)
-+    ENABLE_LIB_STATIC=1
-+  endif
-+endif
-+ifeq ($(ENABLE_BIN_SHARED),1)
-+  ENABLE_BIN=1
-+  ifneq ($(ENABLE_LIB_SHARED),1)
-+    ENABLE_LIB_STATIC=1
-+  endif
-+endif
-+ifeq ($(ENABLE_LIB_STATIC),1)
-+  ENABLE_LIB=1
-+endif
-+ifeq ($(ENABLE_LIB_SHARED),1)
-+  ENABLE_LIB=1
-+endif
- 
- OBJS= blocksort.o  \
-       huffman.o    \
-@@ -35,15 +62,38 @@
-       decompress.o \
-       bzlib.o
- 
--all: libbz2.a bzip2 bzip2recover test
--
--bzip2: libbz2.a bzip2.o
--	$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
-+TGTS_all:=
-+TGTS_bzip2:=bzip2.o
-+TGTS_check:=
-+TGTS_install:=
-+ifeq ($(ENABLE_LIB),1)
-+  TGTS_all+=libbz2
-+  TGTS_bzip2+=libbz2
-+endif
-+ifeq ($(ENABLE_BIN),1)
-+  TGTS_all+=bzip2 bzip2recover
-+  TGTS_install+=bzip2 bzip2recover
-+endif
-+ifeq ($(ENABLE_TESTS),1)
-+  TGTS_all+=test
-+  TGTS_check+=test
-+endif
-+ 
-+all: $(TGTS_all)
-+
-+bzip2: $(TGTS_bzip2)
-+ifeq ($(ENABLE_BIN_STATIC),1)
-+	$(CC) $(CFLAGS_NOPIC) $(LDFLAGS) -o bzip2 bzip2.o -L. -lbz2
-+endif
-+ifeq ($(ENABLE_BIN_SHARED),1)
-+	$(CC) $(CFLAGS_PIC) -o bzip2-shared bzip2.o libbz2.so.1.0
-+endif
- 
- bzip2recover: bzip2recover.o
--	$(CC) $(CFLAGS) $(LDFLAGS) -o bzip2recover bzip2recover.o
-+	$(CC) $(CFLAGS_NOPIC) $(LDFLAGS) -o bzip2recover bzip2recover.o
- 
--libbz2.a: $(OBJS)
-+libbz2: $(OBJS)
-+ifeq ($(ENABLE_LIB_STATIC),1)
- 	rm -f libbz2.a
- 	$(AR) cq libbz2.a $(OBJS)
- 	@if ( test -f $(RANLIB) -o -f /usr/bin/ranlib -o \
-@@ -51,8 +101,18 @@
- 		echo $(RANLIB) libbz2.a ; \
- 		$(RANLIB) libbz2.a ; \
- 	fi
-+endif
-+ifeq ($(ENABLE_LIB_SHARED),1)
-+	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 $(LDFLAGS) -o libbz2.so.1.0.8 $(OBJS)
-+	rm -f libbz2.so.1.0
-+	rm -f libbz2.so.1
-+	rm -f libbz2.so
-+	ln -s libbz2.so.1.0.8 libbz2.so.1.0
-+	ln -s libbz2.so.1.0 libbz2.so.1
-+	ln -s libbz2.so.1 libbz2.so
-+endif
- 
--check: test
-+check: $(TGTS_check)
- test: bzip2
- 	@cat words1
- 	./bzip2 -1  < sample1.ref > sample1.rb2
-@@ -69,69 +129,153 @@
- 	cmp sample3.tst sample3.ref
- 	@cat words3
- 
--install: bzip2 bzip2recover
-+install: $(TGTS_install)
-+ifeq ($(ENABLE_BIN),1)
- 	if ( test ! -d $(PREFIX)/bin ) ; then mkdir -p $(PREFIX)/bin ; fi
-+endif
-+ifeq ($(ENABLE_LIB),1)
- 	if ( test ! -d $(PREFIX)/lib ) ; then mkdir -p $(PREFIX)/lib ; fi
-+endif
-+ifeq ($(ENABLE_DEV),1)
-+	if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
-+endif
-+ifeq ($(ENABLE_DOCS),1)
- 	if ( test ! -d $(PREFIX)/man ) ; then mkdir -p $(PREFIX)/man ; fi
- 	if ( test ! -d $(PREFIX)/man/man1 ) ; then mkdir -p $(PREFIX)/man/man1 ; fi
--	if ( test ! -d $(PREFIX)/include ) ; then mkdir -p $(PREFIX)/include ; fi
-+endif
-+ifeq ($(ENABLE_BIN),1)
-+  ifeq ($(ENABLE_BIN_STATIC),1)
- 	cp -f bzip2 $(PREFIX)/bin/bzip2
--	cp -f bzip2 $(PREFIX)/bin/bunzip2
--	cp -f bzip2 $(PREFIX)/bin/bzcat
-+	chmod a+rx $(PREFIX)/bin/bzip2
-+  endif
-+  ifeq ($(ENABLE_BIN_SHARED),1)
-+    ifeq ($(ENABLE_BIN_STATIC),1)
-+	cp -f bzip2-shared $(PREFIX)/bin/bzip2-shared
-+	chmod a+rx $(PREFIX)/bin/bzip2-shared
-+    else
-+	cp -f bzip2-shared $(PREFIX)/bin/bzip2
-+    endif
-+  endif
-+	rm -f $(PREFIX)/bin/bunzip2
-+	rm -f $(PREFIX)/bin/bzcat
-+	( cd $(PREFIX)/bin && ln -s bzip2 bunzip2 )
-+	( cd $(PREFIX)/bin && ln -s bzip2 bzcat )
-+	rm -f $(PREFIX)/bin/bunzip2-shared
-+	rm -f $(PREFIX)/bin/bzcat-shared
-+  ifeq ($(ENABLE_BIN_SHARED),1)
-+    ifeq ($(ENABLE_BIN_STATIC),1)
-+	( cd $(PREFIX)/bin && ln -s bzip2-shared bunzip2-shared )
-+	( cd $(PREFIX)/bin && ln -s bzip2-shared bzcat-shared )
-+    endif
-+  endif
- 	cp -f bzip2recover $(PREFIX)/bin/bzip2recover
--	chmod a+x $(PREFIX)/bin/bzip2
--	chmod a+x $(PREFIX)/bin/bunzip2
--	chmod a+x $(PREFIX)/bin/bzcat
--	chmod a+x $(PREFIX)/bin/bzip2recover
--	cp -f bzip2.1 $(PREFIX)/man/man1
--	chmod a+r $(PREFIX)/man/man1/bzip2.1
--	cp -f bzlib.h $(PREFIX)/include
--	chmod a+r $(PREFIX)/include/bzlib.h
--	cp -f libbz2.a $(PREFIX)/lib
--	chmod a+r $(PREFIX)/lib/libbz2.a
-+	chmod a+rx $(PREFIX)/bin/bzip2recover
- 	cp -f bzgrep $(PREFIX)/bin/bzgrep
--	ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzegrep
--	ln -s -f $(PREFIX)/bin/bzgrep $(PREFIX)/bin/bzfgrep
--	chmod a+x $(PREFIX)/bin/bzgrep
-+	chmod a+rx $(PREFIX)/bin/bzgrep
-+	rm -f $(PREFIX)/bin/bzegrep
-+	rm -f $(PREFIX)/bin/bzfgrep
-+	( cd $(PREFIX)/bin && ln -s bzgrep bzegrep )
-+	( cd $(PREFIX)/bin && ln -s bzgrep bzfgrep )
- 	cp -f bzmore $(PREFIX)/bin/bzmore
--	ln -s -f $(PREFIX)/bin/bzmore $(PREFIX)/bin/bzless
--	chmod a+x $(PREFIX)/bin/bzmore
-+	chmod a+rx $(PREFIX)/bin/bzmore
-+	rm -f $(PREFIX)/bin/bzless
-+	( cd $(PREFIX)/bin && ln -s bzmore bzless )
-+	rm -f $(PREFIX)/bin/bzcmp
- 	cp -f bzdiff $(PREFIX)/bin/bzdiff
--	ln -s -f $(PREFIX)/bin/bzdiff $(PREFIX)/bin/bzcmp
--	chmod a+x $(PREFIX)/bin/bzdiff
--	cp -f bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
--	chmod a+r $(PREFIX)/man/man1/bzgrep.1
--	chmod a+r $(PREFIX)/man/man1/bzmore.1
--	chmod a+r $(PREFIX)/man/man1/bzdiff.1
-+	chmod a+rx $(PREFIX)/bin/bzdiff
-+	( cd $(PREFIX)/bin && ln -s bzdiff bzcmp )
-+endif
-+ifeq ($(ENABLE_DEV),1)
-+	cp -f bzlib.h $(PREFIX)/include
-+	chmod a+r $(PREFIX)/include/bzlib.h
-+endif
-+ifeq ($(ENABLE_DOCS),1)
-+	cp -f bzip2.1 bzgrep.1 bzmore.1 bzdiff.1 $(PREFIX)/man/man1
- 	echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzegrep.1
- 	echo ".so man1/bzgrep.1" > $(PREFIX)/man/man1/bzfgrep.1
- 	echo ".so man1/bzmore.1" > $(PREFIX)/man/man1/bzless.1
- 	echo ".so man1/bzdiff.1" > $(PREFIX)/man/man1/bzcmp.1
-+	chmod a+r $(PREFIX)/man/man1/bzip2.1
-+	chmod a+r $(PREFIX)/man/man1/bzgrep.1
-+	chmod a+r $(PREFIX)/man/man1/bzmore.1
-+	chmod a+r $(PREFIX)/man/man1/bzdiff.1
-+	chmod a+r $(PREFIX)/man/man1/bzegrep.1
-+	chmod a+r $(PREFIX)/man/man1/bzfgrep.1
-+	chmod a+r $(PREFIX)/man/man1/bzless.1
-+	chmod a+r $(PREFIX)/man/man1/bzcmp.1
-+endif
-+ifeq ($(ENABLE_LIB_SHARED),1)
-+	cp -f libbz2.so.1.0.8 $(PREFIX)/lib
-+	chmod a+r $(PREFIX)/lib/libbz2.so.1.0.8
-+	rm -f $(PREFIX)/lib/libbz2.so.1.0
-+	rm -f $(PREFIX)/lib/libbz2.so.1
-+	rm -f $(PREFIX)/lib/libbz2.so
-+	( cd $(PREFIX)/lib && ln -s libbz2.so.1.0.8 libbz2.so.1.0 )
-+	( cd $(PREFIX)/lib && ln -s libbz2.so.1.0 libbz2.so.1 )
-+	( cd $(PREFIX)/lib && ln -s libbz2.so.1 libbz2.so )
-+endif
-+ifeq ($(ENABLE_LIB_STATIC),1)
-+	cp -f libbz2.a $(PREFIX)/lib
-+	chmod a+r $(PREFIX)/lib/libbz2.a
-+endif
-+
-+uninstall:
-+	rm -f $(PREFIX)/bin/bzip2
-+	rm -f $(PREFIX)/bin/bzip2-shared
-+	rm -f $(PREFIX)/bin/bunzip2
-+	rm -f $(PREFIX)/bin/bzcat
-+	rm -f $(PREFIX)/bin/bunzip2-shared
-+	rm -f $(PREFIX)/bin/bzcat-shared
-+	rm -f $(PREFIX)/bin/bzip2recover
-+	rm -f $(PREFIX)/bin/bzgrep
-+	rm -f $(PREFIX)/bin/bzegrep
-+	rm -f $(PREFIX)/bin/bzfgrep
-+	rm -f $(PREFIX)/bin/bzmore
-+	rm -f $(PREFIX)/bin/bzless
-+	rm -f $(PREFIX)/bin/bzdiff
-+	rm -f $(PREFIX)/bin/bzcmp
-+	rm -f $(PREFIX)/include/bzlib.h
-+	rm -f $(PREFIX)/lib/libbz2.so.1.0.8
-+	rm -f $(PREFIX)/lib/libbz2.so.1.0
-+	rm -f $(PREFIX)/lib/libbz2.so.1
-+	rm -f $(PREFIX)/lib/libbz2.so
-+	rm -f $(PREFIX)/lib/libbz2.a
-+	rm -f $(PREFIX)/man/man1/bzip2.1
-+	rm -f $(PREFIX)/man/man1/bzgrep.1
-+	rm -f $(PREFIX)/man/man1/bzmore.1
-+	rm -f $(PREFIX)/man/man1/bzdiff.1
-+	rm -f $(PREFIX)/man/man1/bzegrep.1
-+	rm -f $(PREFIX)/man/man1/bzfgrep.1
-+	rm -f $(PREFIX)/man/man1/bzless.1
-+	rm -f $(PREFIX)/man/man1/bzcmp.1
-+	(rmdir $(PREFIX)/bin $(PREFIX)/include $(PREFIX)/lib $(PREFIX)/man/man1 $(PREFIX)/man || true ) 2> /dev/null
- 
- clean: 
--	rm -f *.o libbz2.a bzip2 bzip2recover \
-+	rm -f $(OBJS) bzip2.o \
-+	libbz2.so.1.0.8 libbz2.so.1.0 libbz2.so.1 libbz2.so \
-+	libbz2.a bzip2 bzip2-shared bzip2recover \
- 	sample1.rb2 sample2.rb2 sample3.rb2 \
- 	sample1.tst sample2.tst sample3.tst
- 
- blocksort.o: blocksort.c
- 	@cat words0
--	$(CC) $(CFLAGS) -c blocksort.c
-+	$(CC) $(CFLAGS_NOPIC) -c blocksort.c
- huffman.o: huffman.c
--	$(CC) $(CFLAGS) -c huffman.c
-+	$(CC) $(CFLAGS_NOPIC) -c huffman.c
- crctable.o: crctable.c
--	$(CC) $(CFLAGS) -c crctable.c
-+	$(CC) $(CFLAGS_NOPIC) -c crctable.c
- randtable.o: randtable.c
--	$(CC) $(CFLAGS) -c randtable.c
-+	$(CC) $(CFLAGS_NOPIC) -c randtable.c
- compress.o: compress.c
--	$(CC) $(CFLAGS) -c compress.c
-+	$(CC) $(CFLAGS_NOPIC) -c compress.c
- decompress.o: decompress.c
--	$(CC) $(CFLAGS) -c decompress.c
-+	$(CC) $(CFLAGS_NOPIC) -c decompress.c
- bzlib.o: bzlib.c
--	$(CC) $(CFLAGS) -c bzlib.c
-+	$(CC) $(CFLAGS_NOPIC) -c bzlib.c
- bzip2.o: bzip2.c
--	$(CC) $(CFLAGS) -c bzip2.c
-+	$(CC) $(CFLAGS_NOPIC) -c bzip2.c
- bzip2recover.o: bzip2recover.c
--	$(CC) $(CFLAGS) -c bzip2recover.c
-+	$(CC) $(CFLAGS_NOPIC) -c bzip2recover.c
- 
- 
- distclean: clean
-@@ -189,7 +333,6 @@
- 	   $(DISTNAME)/bzmore.1 \
- 	   $(DISTNAME)/bzgrep \
- 	   $(DISTNAME)/bzgrep.1 \
--	   $(DISTNAME)/Makefile-libbz2_so \
- 	   $(DISTNAME)/bz-common.xsl \
- 	   $(DISTNAME)/bz-fo.xsl \
- 	   $(DISTNAME)/bz-html.xsl \
---- a/Makefile-libbz2_so
-+++ b/Makefile-libbz2_so
-@@ -1,59 +0,0 @@
--
--# This Makefile builds a shared version of the library, 
--# libbz2.so.1.0.8, with soname libbz2.so.1.0,
--# at least on x86-Linux (RedHat 7.2), 
--# with gcc-2.96 20000731 (Red Hat Linux 7.1 2.96-98).  
--# Please see the README file for some important info 
--# about building the library like this.
--
--# ------------------------------------------------------------------
--# This file is part of bzip2/libbzip2, a program and library for
--# lossless, block-sorting data compression.
--#
--# bzip2/libbzip2 version 1.0.8 of 13 July 2019
--# Copyright (C) 1996-2019 Julian Seward <jseward at acm.org>
--#
--# Please read the WARNING, DISCLAIMER and PATENTS sections in the 
--# README file.
--#
--# This program is released under the terms of the license contained
--# in the file LICENSE.
--# ------------------------------------------------------------------
--
--
--SHELL=/bin/sh
--CC=gcc
--BIGFILES=-D_FILE_OFFSET_BITS=64
--CFLAGS=-fpic -fPIC -Wall -Winline -O2 -g $(BIGFILES)
--
--OBJS= blocksort.o  \
--      huffman.o    \
--      crctable.o   \
--      randtable.o  \
--      compress.o   \
--      decompress.o \
--      bzlib.o
--
--all: $(OBJS)
--	$(CC) -shared -Wl,-soname -Wl,libbz2.so.1.0 -o libbz2.so.1.0.8 $(OBJS)
--	$(CC) $(CFLAGS) -o bzip2-shared bzip2.c libbz2.so.1.0.8
--	rm -f libbz2.so.1.0
--	ln -s libbz2.so.1.0.8 libbz2.so.1.0
--
--clean: 
--	rm -f $(OBJS) bzip2.o libbz2.so.1.0.8 libbz2.so.1.0 bzip2-shared
--
--blocksort.o: blocksort.c
--	$(CC) $(CFLAGS) -c blocksort.c
--huffman.o: huffman.c
--	$(CC) $(CFLAGS) -c huffman.c
--crctable.o: crctable.c
--	$(CC) $(CFLAGS) -c crctable.c
--randtable.o: randtable.c
--	$(CC) $(CFLAGS) -c randtable.c
--compress.o: compress.c
--	$(CC) $(CFLAGS) -c compress.c
--decompress.o: decompress.c
--	$(CC) $(CFLAGS) -c decompress.c
--bzlib.o: bzlib.c
--	$(CC) $(CFLAGS) -c bzlib.c
---- a/unzcrash.c
-+++ b/unzcrash.c
-@@ -30,7 +30,7 @@
- 
- #include <stdio.h>
- #include <assert.h>
--#include "bzlib.h"
-+#include <bzlib.h>
- 
- #define M_BLOCK 1000000
- 
diff --git a/tools/bzip2/patches/100-cmake.patch b/tools/bzip2/patches/100-cmake.patch
new file mode 100644
index 0000000000..0ed37b2e44
--- /dev/null
+++ b/tools/bzip2/patches/100-cmake.patch
@@ -0,0 +1,382 @@
+--- /dev/null
++++ b/CMakeLists.txt
+@@ -0,0 +1,354 @@
++cmake_minimum_required(VERSION 3.12)
++
++project(bzip2
++        VERSION 1.0.8
++        DESCRIPTION "This Bzip2/libbz2 a program and library for lossless block-sorting data compression."
++        LANGUAGES C)
++
++# See versioning rule:
++#  http://www.gnu.org/software/libtool/manual/html_node/Updating-version-info.html
++#
++# KEEP THESE IN SYNC WITH meson.build OR STUFF WILL BREAK!
++set(LT_CURRENT  1)
++set(LT_REVISION 8)
++set(LT_AGE      0)
++
++set(CMAKE_MODULE_PATH ${CMAKE_CURRENT_SOURCE_DIR}/cmake ${CMAKE_MODULE_PATH})
++
++include_directories(${PROJECT_BINARY_DIR})
++
++math(EXPR LT_SOVERSION "${LT_CURRENT} - ${LT_AGE}")
++set(LT_VERSION "${LT_SOVERSION}.${LT_AGE}.${LT_REVISION}")
++set(PACKAGE_VERSION ${PROJECT_VERSION})
++
++set(ENABLE_APP_DEFAULT ON)
++set(ENABLE_EXAMPLES_DEFAULT OFF)
++set(ENABLE_DOCS_DEFAULT OFF)
++include(CMakeOptions.txt)
++
++if(ENABLE_LIB_ONLY AND (ENABLE_APP OR ENABLE_EXAMPLES))
++    # Remember when disabled options are disabled for later diagnostics.
++    set(ENABLE_LIB_ONLY_DISABLED_OTHERS 1)
++else()
++    set(ENABLE_LIB_ONLY_DISABLED_OTHERS 0)
++endif()
++if(ENABLE_LIB_ONLY)
++    set(ENABLE_APP      OFF)
++    set(ENABLE_EXAMPLES OFF)
++endif()
++
++# Do not disable assertions based on CMAKE_BUILD_TYPE.
++foreach(_build_type Release MinSizeRel RelWithDebInfo)
++    foreach(_lang C)
++        string(TOUPPER CMAKE_${_lang}_FLAGS_${_build_type} _var)
++        string(REGEX REPLACE "(^|)[/-]D *NDEBUG($|)" " " ${_var} "${${_var}}")
++    endforeach()
++endforeach()
++
++# Support the latest c++ standard available.
++include(CheckCCompilerFlag)
++include(CheckCXXCompilerFlag)
++
++function(extract_valid_c_flags varname)
++  set(valid_flags)
++  foreach(flag IN LISTS ARGN)
++    string(REGEX REPLACE "[^a-zA-Z0-9_]+" "_" flag_var ${flag})
++    set(flag_var "C_FLAG_${flag_var}")
++    check_c_compiler_flag("${flag}" "${flag_var}")
++    if(${flag_var})
++      set(valid_flags "${valid_flags} ${flag}")
++    endif()
++  endforeach()
++  set(${varname} "${valid_flags}" PARENT_SCOPE)
++endfunction()
++if(NOT CMAKE_BUILD_TYPE AND NOT CMAKE_CONFIGURATION_TYPES)
++    set(CMAKE_BUILD_TYPE RelWithDebInfo CACHE STRING "Choose the build type" FORCE)
++
++    # Include "None" as option to disable any additional (optimization) flags,
++    # relying on just CMAKE_C_FLAGS and CMAKE_CXX_FLAGS (which are empty by
++    # default). These strings are presented in cmake-gui.
++    set_property(CACHE CMAKE_BUILD_TYPE PROPERTY STRINGS
++        None Debug Release MinSizeRel RelWithDebInfo)
++endif()
++
++# Install a symlink of script to the "bin" directory.
++# Not intended for use on Windows.
++function(install_script_symlink original symlink)
++    add_custom_command(OUTPUT ${symlink}
++        COMMAND ${CMAKE_COMMAND} -E create_symlink ${original} ${symlink}
++        DEPENDS ${original}
++        COMMENT "Generating symbolic link ${symlink} of ${original}")
++    add_custom_target(${symlink}_tgt ALL DEPENDS ${CMAKE_CURRENT_BINARY_DIR}/${symlink})
++    install(PROGRAMS ${CMAKE_CURRENT_BINARY_DIR}/${symlink} DESTINATION ${CMAKE_INSTALL_BINDIR})
++endfunction()
++
++# Install a symlink of binary target to the "bin" directory.
++# On Windows, it will be a copy instead of a symlink.
++function(install_target_symlink original symlink)
++    if(WIN32)
++        set(op copy)
++        set(symlink "${symlink}.exe")
++    else()
++        set(op create_symlink)
++    endif()
++    add_custom_command(TARGET ${original} POST_BUILD
++        COMMAND ${CMAKE_COMMAND} -E ${op} $<TARGET_FILE_NAME:${original}> ${symlink}
++        WORKING_DIRECTORY $<TARGET_FILE_DIR:${original}>
++        COMMENT "Generating symbolic link (or copy) ${symlink} of ${original}")
++    install(PROGRAMS $<TARGET_FILE_DIR:${original}>/${symlink} DESTINATION ${CMAKE_INSTALL_BINDIR})
++endfunction()
++
++include(GNUInstallDirs)
++
++# Checks for header files.
++include(CheckIncludeFile)
++check_include_file(arpa/inet.h    HAVE_ARPA_INET_H)
++check_include_file(fcntl.h        HAVE_FCNTL_H)
++check_include_file(inttypes.h     HAVE_INTTYPES_H)
++check_include_file(limits.h       HAVE_LIMITS_H)
++check_include_file(netdb.h        HAVE_NETDB_H)
++check_include_file(netinet/in.h   HAVE_NETINET_IN_H)
++check_include_file(pwd.h          HAVE_PWD_H)
++check_include_file(sys/socket.h   HAVE_SYS_SOCKET_H)
++check_include_file(sys/time.h     HAVE_SYS_TIME_H)
++check_include_file(syslog.h       HAVE_SYSLOG_H)
++check_include_file(time.h         HAVE_TIME_H)
++check_include_file(unistd.h       HAVE_UNISTD_H)
++
++include(CheckTypeSize)
++# Checks for typedefs, structures, and compiler characteristics.
++# AC_TYPE_SIZE_T
++check_type_size("ssize_t" SIZEOF_SSIZE_T)
++if(NOT SIZEOF_SSIZE_T)
++    # ssize_t is a signed type in POSIX storing at least -1.
++    # Set it to "int" to match the behavior of AC_TYPE_SSIZE_T (autotools).
++    set(ssize_t int)
++endif()
++
++include(CheckStructHasMember)
++check_struct_has_member("struct tm" tm_gmtoff time.h HAVE_STRUCT_TM_TM_GMTOFF)
++
++include(CheckSymbolExists)
++# XXX does this correctly detect initgroups (un)availability on cygwin?
++check_symbol_exists(initgroups grp.h HAVE_DECL_INITGROUPS)
++if(NOT HAVE_DECL_INITGROUPS AND HAVE_UNISTD_H)
++    # FreeBSD declares initgroups() in unistd.h
++    check_symbol_exists(initgroups unistd.h HAVE_DECL_INITGROUPS2)
++    if(HAVE_DECL_INITGROUPS2)
++        set(HAVE_DECL_INITGROUPS 1)
++    endif()
++endif()
++
++set(WARNCFLAGS)
++if(CMAKE_C_COMPILER_ID MATCHES "MSVC")
++    if(ENABLE_WERROR)
++        set(WARNCFLAGS    /WX)
++    endif()
++else()
++    if(ENABLE_WERROR)
++        extract_valid_c_flags(WARNCFLAGS    -Werror)
++    endif()
++
++    # For C compiler
++    # Please keep this list in sync with meson.build
++    extract_valid_c_flags(WARNCFLAGS
++        -Wall
++        -Wextra
++        -Wmissing-prototypes
++        -Wstrict-prototypes
++        -Wmissing-declarations
++        -Wpointer-arith
++        -Wdeclaration-after-statement
++        -Wformat-security
++        -Wwrite-strings
++        -Wshadow
++        -Winline
++        -Wnested-externs
++        -Wfloat-equal
++        -Wundef
++        -Wendif-labels
++        -Wempty-body
++        -Wcast-align
++        -Wclobbered
++        -Wvla
++        -Wpragmas
++        -Wunreachable-code
++        -Waddress
++        -Wattributes
++        -Wdiv-by-zero
++        -Wshorten-64-to-32
++        -Wconversion
++        -Wextended-offsetof
++        -Wformat-nonliteral
++        -Wlanguage-extension-token
++        -Wmissing-field-initializers
++        -Wmissing-noreturn
++        -Wmissing-variable-declarations
++        # -Wpadded                          # Not used because we cannot change public structs
++        -Wsign-conversion
++        # -Wswitch-enum                     # Not used because this basically disallows default case
++        -Wunreachable-code-break
++        -Wunused-macros
++        -Wunused-parameter
++        -Wredundant-decls
++        -Wheader-guard
++        -Wno-format-nonliteral              # This is required because we pass format string as "const char*.
++    )
++endif()
++
++if(ENABLE_DEBUG)
++    set(DEBUGBUILD 1)
++endif()
++
++#add_definitions(-DHAVE_CONFIG_H)
++#configure_file(cmakeconfig.h.in config.h)
++
++# autotools-compatible names
++# Sphinx expects relative paths in the .rst files. Use the fact that the files
++# below are all one directory level deep.
++file(RELATIVE_PATH top_srcdir   ${CMAKE_CURRENT_BINARY_DIR}/dir ${CMAKE_CURRENT_SOURCE_DIR})
++file(RELATIVE_PATH top_builddir ${CMAKE_CURRENT_BINARY_DIR}/dir ${CMAKE_CURRENT_BINARY_DIR})
++set(abs_top_srcdir   ${CMAKE_CURRENT_SOURCE_DIR})
++set(abs_top_builddir ${CMAKE_CURRENT_BINARY_DIR})
++# bzip2.pc (pkg-config file)
++set(prefix      ${CMAKE_INSTALL_PREFIX})
++set(exec_prefix ${CMAKE_INSTALL_PREFIX})
++set(bindir      ${CMAKE_INSTALL_FULL_BINDIR})
++set(sbindir     ${CMAKE_INSTALL_FULL_SBINDIR})
++set(libdir      ${CMAKE_INSTALL_FULL_LIBDIR})
++set(includedir  ${CMAKE_INSTALL_FULL_INCLUDEDIR})
++set(VERSION     ${PACKAGE_VERSION})
++
++#
++# The build targets.
++#   In a larger project, the following would be in subdirectories and
++#   These targets would be included with `add_subdirectory()`
++#
++set(BZ2_SOURCES
++    blocksort.c
++    huffman.c
++    crctable.c
++    randtable.c
++    compress.c
++    decompress.c
++    bzlib.c)
++
++# The bz2 OBJECT-library, required for bzip2, bzip2recover.
++add_library(bz2_ObjLib OBJECT)
++target_sources(bz2_ObjLib
++    PRIVATE   ${BZ2_SOURCES}
++    PUBLIC    ${CMAKE_CURRENT_SOURCE_DIR}/bzlib_private.h
++    INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/bzlib.h)
++
++if(ENABLE_SHARED_LIB)
++    # The libbz2 shared library.
++    add_library(bz2 SHARED ${BZ2_RES})
++    target_sources(bz2
++        PRIVATE   ${BZ2_SOURCES}
++                  ${CMAKE_CURRENT_SOURCE_DIR}/libbz2.def
++        PUBLIC    ${CMAKE_CURRENT_SOURCE_DIR}/bzlib_private.h
++        INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/bzlib.h)
++    # Always use '-fPIC'/'-fPIE' option for shared libraries.
++    set_property(TARGET bz2 PROPERTY POSITION_INDEPENDENT_CODE ON)
++    set_target_properties(bz2 PROPERTIES
++        COMPILE_FLAGS "${WARNCFLAGS}"
++        VERSION ${LT_VERSION} SOVERSION ${LT_SOVERSION})
++    install(TARGETS bz2 DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    install(FILES bzlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++
++    if(USE_OLD_SONAME)
++        # Hack to support the old libbz2.so.1.0 version by including an extra copy.
++        # Technically the old SONAME is not libtool compatible.
++        # This hack is to support binary compatibility with libbz2 in some distro packages.
++        if(UNIX AND NOT APPLE)
++            add_library(bz2_old_soname SHARED ${BZ2_RES})
++            target_sources(bz2_old_soname
++                PRIVATE   ${BZ2_SOURCES}
++                        ${CMAKE_CURRENT_SOURCE_DIR}/libbz2.def
++                PUBLIC    ${CMAKE_CURRENT_SOURCE_DIR}/bzlib_private.h
++                INTERFACE ${CMAKE_CURRENT_SOURCE_DIR}/bzlib.h
++            )
++            set_target_properties(bz2_old_soname PROPERTIES
++                COMPILE_FLAGS "${WARNCFLAGS}"
++                VERSION ${LT_SOVERSION}.${LT_AGE} SOVERSION ${LT_SOVERSION}.${LT_AGE}
++                OUTPUT_NAME bz2
++            )
++            install(TARGETS bz2_old_soname DESTINATION ${CMAKE_INSTALL_LIBDIR})
++        endif()
++    endif()
++endif()
++
++if(ENABLE_STATIC_LIB)
++    # The libbz2 static library.
++    add_library(bz2_static STATIC)
++    target_sources(bz2_static
++        PRIVATE     ${BZ2_SOURCES}
++        PUBLIC      ${CMAKE_CURRENT_SOURCE_DIR}/bzlib_private.h
++        INTERFACE   ${CMAKE_CURRENT_SOURCE_DIR}/bzlib.h)
++    set_target_properties(bz2_static PROPERTIES
++        COMPILE_FLAGS       "${WARNCFLAGS}"
++        VERSION             ${LT_VERSION}
++        SOVERSION           ${LT_SOVERSION}
++        ARCHIVE_OUTPUT_NAME bz2_static)
++    target_compile_definitions(bz2_static PUBLIC BZ2_STATICLIB)
++    install(TARGETS bz2_static DESTINATION ${CMAKE_INSTALL_LIBDIR})
++    install(FILES bzlib.h DESTINATION ${CMAKE_INSTALL_INCLUDEDIR})
++endif()
++
++if(ENABLE_APP)
++    # The bzip2 executable.
++    add_executable(bzip2)
++    target_sources(bzip2
++        PRIVATE   bzip2.c)
++    target_link_libraries(bzip2
++        PRIVATE   bz2_ObjLib)
++    if(WIN32)
++        target_compile_definitions(bzip2 PUBLIC BZ_LCCWIN32 BZ_UNIX=0)
++    else()
++        target_compile_definitions(bzip2 PUBLIC BZ_LCCWIN32=0 BZ_UNIX)
++    endif()
++    install(TARGETS bzip2 DESTINATION ${CMAKE_INSTALL_BINDIR})
++
++    # Create bzip2 copies bzcat and bunzip.
++    # The default behavior is altered in bzip2.c code by checking the program name.
++    install_target_symlink(bzip2 bzcat)
++    install_target_symlink(bzip2 bunzip)
++
++    # The bzip2recover executable.
++    add_executable(bzip2recover)
++    target_sources(bzip2recover
++        PRIVATE   bzip2recover.c)
++    target_link_libraries(bzip2recover
++        PRIVATE bz2_ObjLib)
++    if(WIN32)
++        target_compile_definitions(bzip2recover PUBLIC BZ_LCCWIN32 BZ_UNIX=0)
++    else()
++        target_compile_definitions(bzip2recover PUBLIC BZ_LCCWIN32=0 BZ_UNIX)
++    endif()
++    install(TARGETS bzip2recover DESTINATION ${CMAKE_INSTALL_BINDIR})
++
++    if(ENABLE_EXAMPLES)
++        if(ENABLE_SHARED_LIB)
++            # The dlltest executable.
++            add_executable(dlltest)
++            target_sources(dlltest
++                PRIVATE   dlltest.c)
++            target_link_libraries(dlltest bz2)
++            install(TARGETS dlltest DESTINATION ${CMAKE_INSTALL_BINDIR})
++        endif()
++    endif()
++
++    if(NOT WIN32)
++        # Install shell scripts, and renamed copies.
++        install(PROGRAMS bzdiff bzgrep bzmore
++            DESTINATION ${CMAKE_INSTALL_BINDIR})
++
++        install_script_symlink(bzdiff bzcmp)
++
++        install_script_symlink(bzgrep bzegrep)
++        install_script_symlink(bzgrep bzfgrep)
++
++        install_script_symlink(bzmore bzless)
++    endif()
++
++endif()
+--- /dev/null
++++ b/CMakeOptions.txt
+@@ -0,0 +1,22 @@
++# Features that can be enabled for cmake (see CMakeLists.txt)
++
++option(ENABLE_WERROR     "Turn on compile time warnings")
++
++option(ENABLE_DEBUG      "Turn on debug output")
++
++option(ENABLE_APP        "Build applications (bzip2, and bzip2recover)"
++    ${ENABLE_APP_DEFAULT})
++
++option(ENABLE_DOCS       "Generate documentation"
++    ${ENABLE_DOCS_DEFAULT})
++
++option(ENABLE_EXAMPLES   "Build examples"
++    ${ENABLE_EXAMPLES_DEFAULT})
++
++option(ENABLE_LIB_ONLY   "Build libbz2 only.  This is a short hand for -DENABLE_APP=0 -DENABLE_EXAMPLES=0")
++
++option(ENABLE_STATIC_LIB "Build libbz2 in static mode also")
++
++option(ENABLE_SHARED_LIB "Build libbz2 as a shared library" ON)
++
++option(USE_OLD_SONAME "Use libbz2.so.1.0 for compatibility with old Makefiles" OFF)



From lede-commits at lists.infradead.org  Wed Apr  3 12:35:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 15:35:01 -0400
Subject: [openwrt/openwrt]  realtek: support common GPIOs on D-Link
 DGS-1210-16
In-Reply-To: <171217290167.3203262.15565095981957232247@git-01.infra.openwrt.org>
References: <171217290167.3203262.15565095981957232247@git-01.infra.openwrt.org>
Message-ID: <mailman.23363.1712172907.1280.lede-commits@lists.infradead.org>

svanheule pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/77b7c10884dfe6f1393fb4eefddfb87ece4a0e76

commit 77b7c10884dfe6f1393fb4eefddfb87ece4a0e76
Author: Richard Kunze <kunze at tivano.de>
AuthorDate: Wed Mar 20 19:26:27 2024 +0100

    realtek: support common GPIOs on D-Link DGS-1210-16
    
    D-Link DGS-1210-16 hangs when rebooting and has no support for the reset
    button.
    
    Fix both by enabling the same GPIOs for reboot and the reset button as
    already used for D-Link DGS-1210-20 and D-Link DGS-1210-28.
    
    Signed-off-by: Richard Kunze <kunze at tivano.de>
    (cherry picked from commit 92c21b2e18f0c53f45cca9731e131568cddcbbd5)
---
 target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-16.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-16.dts b/target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-16.dts
index 35f41b9e4d..c9a79fb607 100644
--- a/target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-16.dts
+++ b/target/linux/realtek/dts-5.15/rtl8382_d-link_dgs-1210-16.dts
@@ -2,6 +2,7 @@
 
 #include "rtl838x.dtsi"
 #include "rtl83xx_d-link_dgs-1210_common.dtsi"
+#include "rtl83xx_d-link_dgs-1210_gpio.dtsi"
 
 / {
 	compatible = "d-link,dgs-1210-16", "realtek,rtl838x-soc";



From lede-commits at lists.infradead.org  Wed Apr  3 13:43:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 03 Apr 2024 16:43:12 -0400
Subject: [openwrt/openwrt]  mbedtls: copy psa includes in InstallDev
In-Reply-To: <171217699254.3330314.18283752476975158041@git-01.infra.openwrt.org>
References: <171217699254.3330314.18283752476975158041@git-01.infra.openwrt.org>
Message-ID: <mailman.23366.1712176999.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/766ec5596679ed0ac6110e851ed0d9769052a9d1

commit 766ec5596679ed0ac6110e851ed0d9769052a9d1
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Apr 3 22:41:29 2024 +0200

    mbedtls: copy psa includes in InstallDev
    
    They are required for some of the crypto API
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/mbedtls/Makefile | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 502bf65ffc..3bfbe8758b 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -143,7 +143,10 @@ endef
 
 define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/include
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/mbedtls $(1)/usr/include/
+	$(CP) \
+		$(PKG_INSTALL_DIR)/usr/include/mbedtls \
+		$(PKG_INSTALL_DIR)/usr/include/psa \
+		$(1)/usr/include/
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:19 -0400
Subject: [openwrt/openwrt]  x86: 6.6: refresh patches
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23452.1712213780.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9e6fe7ddd29b4ae73faf7513f41e356b3e789985

commit 9e6fe7ddd29b4ae73faf7513f41e356b3e789985
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Wed Mar 13 01:31:24 2024 +0100

    x86: 6.6: refresh patches
    
    Refresh kernel patches.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../linux/x86/patches-6.6/103-pcengines_apu6_platform.patch   | 11 +++--------
 1 file changed, 3 insertions(+), 8 deletions(-)

diff --git a/target/linux/x86/patches-6.6/103-pcengines_apu6_platform.patch b/target/linux/x86/patches-6.6/103-pcengines_apu6_platform.patch
index 654bd88b7f..1fd6fc89c8 100644
--- a/target/linux/x86/patches-6.6/103-pcengines_apu6_platform.patch
+++ b/target/linux/x86/patches-6.6/103-pcengines_apu6_platform.patch
@@ -63,7 +63,7 @@ Sighed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
  
 --- a/drivers/platform/x86/Kconfig
 +++ b/drivers/platform/x86/Kconfig
-@@ -698,7 +698,7 @@ config XO1_RFKILL
+@@ -707,7 +707,7 @@ config XO1_RFKILL
  	  laptop.
  
  config PCENGINES_APU2
@@ -72,7 +72,7 @@ Sighed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
  	depends on INPUT && INPUT_KEYBOARD && GPIOLIB
  	depends on LEDS_CLASS
  	select GPIO_AMD_FCH
-@@ -706,7 +706,7 @@ config PCENGINES_APU2
+@@ -715,7 +715,7 @@ config PCENGINES_APU2
  	select LEDS_GPIO
  	help
  	  This driver provides support for the front button and LEDs on
@@ -264,7 +264,7 @@ Sighed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
  		return -ENODEV;
  	}
  
-@@ -288,8 +374,12 @@ module_init(apu_board_init);
+@@ -288,7 +374,7 @@ module_init(apu_board_init);
  module_exit(apu_board_exit);
  
  MODULE_AUTHOR("Enrico Weigelt, metux IT consult <info at metux.net>");
@@ -272,9 +272,4 @@ Sighed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
 +MODULE_DESCRIPTION("PC Engines APUv2-6 board GPIO/LEDs/keys driver");
  MODULE_LICENSE("GPL");
  MODULE_DEVICE_TABLE(dmi, apu_gpio_dmi_table);
- MODULE_ALIAS("platform:pcengines-apuv2");
-+MODULE_ALIAS("platform:pcengines-apuv3");
-+MODULE_ALIAS("platform:pcengines-apuv4");
-+MODULE_ALIAS("platform:pcengines-apuv5");
-+MODULE_ALIAS("platform:pcengines-apuv6");
  MODULE_SOFTDEP("pre: platform:" AMD_FCH_GPIO_DRIVER_NAME " platform:leds-gpio platform:gpio_keys_polled");



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:15 -0400
Subject: [openwrt/openwrt]  kernel/x86: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23453.1712213780.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6fce6e1560957059121405fc9868c04e7e6856c9

commit 6fce6e1560957059121405fc9868c04e7e6856c9
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu Mar 21 19:03:20 2024 +0100

    kernel/x86: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    During a `git bisect` session, `git bisect --skip` is recommended.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/x86/64/{config-6.1 => config-6.6}      | 0
 target/linux/x86/{config-6.1 => config-6.6}         | 0
 target/linux/x86/generic/{config-6.1 => config-6.6} | 0
 target/linux/x86/geode/{config-6.1 => config-6.6}   | 0
 target/linux/x86/legacy/{config-6.1 => config-6.6}  | 0
 5 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/x86/64/config-6.1 b/target/linux/x86/64/config-6.6
similarity index 100%
rename from target/linux/x86/64/config-6.1
rename to target/linux/x86/64/config-6.6
diff --git a/target/linux/x86/config-6.1 b/target/linux/x86/config-6.6
similarity index 100%
rename from target/linux/x86/config-6.1
rename to target/linux/x86/config-6.6
diff --git a/target/linux/x86/generic/config-6.1 b/target/linux/x86/generic/config-6.6
similarity index 100%
rename from target/linux/x86/generic/config-6.1
rename to target/linux/x86/generic/config-6.6
diff --git a/target/linux/x86/geode/config-6.1 b/target/linux/x86/geode/config-6.6
similarity index 100%
rename from target/linux/x86/geode/config-6.1
rename to target/linux/x86/geode/config-6.6
diff --git a/target/linux/x86/legacy/config-6.1 b/target/linux/x86/legacy/config-6.6
similarity index 100%
rename from target/linux/x86/legacy/config-6.1
rename to target/linux/x86/legacy/config-6.6



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:22 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:22 -0400
Subject: [openwrt/openwrt]  kernel: 6.6: modules: netdevices: lan743x: add
 missing dependency
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23454.1712213782.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7e5cf372a480e4eda419e8ffac38164bcd0d54ea

commit 7e5cf372a480e4eda419e8ffac38164bcd0d54ea
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Tue Apr 2 08:23:46 2024 +0200

    kernel: 6.6: modules: netdevices: lan743x: add missing dependency
    
    Fix error: Package kmod-lan743x is missing dependencies for the following libraries:
    fixed_phy.ko
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 package/kernel/linux/modules/netdevices.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/kernel/linux/modules/netdevices.mk b/package/kernel/linux/modules/netdevices.mk
index 9fdbdc9ec7..906f866a6b 100644
--- a/package/kernel/linux/modules/netdevices.mk
+++ b/package/kernel/linux/modules/netdevices.mk
@@ -1742,7 +1742,7 @@ $(eval $(call KernelPackage,atlantic))
 define KernelPackage/lan743x
   SUBMENU:=$(NETWORK_DEVICES_MENU)
   TITLE:=Microchip LAN743x PCI Express Gigabit Ethernet NIC
-  DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-mdio-devres
+  DEPENDS:=@PCI_SUPPORT +kmod-ptp +kmod-mdio-devres +!LINUX_6_1:kmod-fixed-phy
   KCONFIG:=CONFIG_LAN743X
   FILES:=$(LINUX_DIR)/drivers/net/ethernet/microchip/lan743x.ko
   AUTOLOAD:=$(call AutoProbe,lan743x)



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:17 -0400
Subject: [openwrt/openwrt]  kernel/x86: Create kernel patches for v6.6 (from
 v6.1)
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23455.1712213782.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e893ccb2b3db9453344546ed1db250435cdcfafc

commit e893ccb2b3db9453344546ed1db250435cdcfafc
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sat Mar 16 10:58:26 2024 +0100

    kernel/x86: Create kernel patches for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    During a `git bisect` session, `git bisect --skip` is recommended.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../linux/x86/{patches-6.1 => patches-6.6}/100-fix_cs5535_clockevt.patch  | 0
 .../x86/{patches-6.1 => patches-6.6}/103-pcengines_apu6_platform.patch    | 0
 2 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/x86/patches-6.1/100-fix_cs5535_clockevt.patch b/target/linux/x86/patches-6.6/100-fix_cs5535_clockevt.patch
similarity index 100%
rename from target/linux/x86/patches-6.1/100-fix_cs5535_clockevt.patch
rename to target/linux/x86/patches-6.6/100-fix_cs5535_clockevt.patch
diff --git a/target/linux/x86/patches-6.1/103-pcengines_apu6_platform.patch b/target/linux/x86/patches-6.6/103-pcengines_apu6_platform.patch
similarity index 100%
rename from target/linux/x86/patches-6.1/103-pcengines_apu6_platform.patch
rename to target/linux/x86/patches-6.6/103-pcengines_apu6_platform.patch



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:23 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:23 -0400
Subject: [openwrt/openwrt]  generic: 6.6: Removal of tools_portability.patch
 already included in kernel 6.6
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23456.1712213782.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/69b145188f1a3b203856b1f659b4cda6f52ff891

commit 69b145188f1a3b203856b1f659b4cda6f52ff891
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu Mar 21 17:03:02 2024 +0100

    generic: 6.6: Removal of tools_portability.patch already included in kernel 6.6
    
    Removal of tools_portability.patch already included in kernel 6.6
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../generic/hack-6.6/212-tools_portability.patch   | 342 ---------------------
 1 file changed, 342 deletions(-)

diff --git a/target/linux/generic/hack-6.6/212-tools_portability.patch b/target/linux/generic/hack-6.6/212-tools_portability.patch
deleted file mode 100644
index ec10f4b966..0000000000
--- a/target/linux/generic/hack-6.6/212-tools_portability.patch
+++ /dev/null
@@ -1,342 +0,0 @@
-From 48232d3d931c95953ce2ddfe7da7bb164aef6a73 Mon Sep 17 00:00:00 2001
-From: Felix Fietkau <nbd at nbd.name>
-Date: Fri, 7 Jul 2017 17:03:16 +0200
-Subject: fix portability of some includes files in tools/ used on the host
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- tools/include/tools/be_byteshift.h |  4 ++++
- tools/include/tools/le_byteshift.h |  4 ++++
- tools/include/tools/linux_types.h  | 22 ++++++++++++++++++++++
- 3 files changed, 30 insertions(+)
- create mode 100644 tools/include/tools/linux_types.h
-
---- a/tools/include/tools/be_byteshift.h
-+++ b/tools/include/tools/be_byteshift.h
-@@ -2,6 +2,10 @@
- #ifndef _TOOLS_BE_BYTESHIFT_H
- #define _TOOLS_BE_BYTESHIFT_H
- 
-+#ifndef __linux__
-+#include "linux_types.h"
-+#endif
-+
- #include <stdint.h>
- 
- static inline uint16_t __get_unaligned_be16(const uint8_t *p)
---- a/tools/include/tools/le_byteshift.h
-+++ b/tools/include/tools/le_byteshift.h
-@@ -2,6 +2,10 @@
- #ifndef _TOOLS_LE_BYTESHIFT_H
- #define _TOOLS_LE_BYTESHIFT_H
- 
-+#ifndef __linux__
-+#include "linux_types.h"
-+#endif
-+
- #include <stdint.h>
- 
- static inline uint16_t __get_unaligned_le16(const uint8_t *p)
---- /dev/null
-+++ b/tools/include/tools/linux_types.h
-@@ -0,0 +1,18 @@
-+#ifndef __LINUX_TYPES_H
-+#define __LINUX_TYPES_H
-+
-+#include <stdint.h>
-+
-+typedef int8_t __s8;
-+typedef uint8_t __u8;
-+
-+typedef int16_t __s16;
-+typedef uint16_t __u16;
-+
-+typedef int32_t __s32;
-+typedef uint32_t __u32;
-+
-+typedef int64_t __s64;
-+typedef uint64_t __u64;
-+
-+#endif
---- a/tools/include/linux/types.h
-+++ b/tools/include/linux/types.h
-@@ -10,8 +10,12 @@
- #define __SANE_USERSPACE_TYPES__	/* For PPC64, to get LL64 types */
- #endif
- 
-+#ifndef __linux__
-+#include <tools/linux_types.h>
-+#else
- #include <asm/types.h>
- #include <asm/posix_types.h>
-+#endif
- 
- struct page;
- struct kmem_cache;
-@@ -56,7 +60,9 @@ typedef __s8  s8;
- #define __user
- #endif
- #define __must_check
-+#ifndef __cold
- #define __cold
-+#endif
- 
- typedef __u16 __bitwise __le16;
- typedef __u16 __bitwise __be16;
---- a/tools/perf/pmu-events/jevents.py
-+++ b/tools/perf/pmu-events/jevents.py
-@@ -1197,6 +1197,7 @@ such as "arm/cortex-a34".''',
- #include "util/header.h"
- #include "util/pmu.h"
- #include <string.h>
-+#include <strings.h>
- #include <stddef.h>
- 
- struct compact_pmu_event {
---- a/tools/arch/x86/include/asm/insn.h
-+++ b/tools/arch/x86/include/asm/insn.h
-@@ -7,8 +7,8 @@
-  * Copyright (C) IBM Corporation, 2009
-  */
- 
--#include <asm/byteorder.h>
- /* insn_attr_t is defined in inat.h */
-+#include <linux/kernel.h>
- #include "inat.h" /* __ignore_sync_check__ */
- 
- #if defined(__BYTE_ORDER) ? __BYTE_ORDER == __LITTLE_ENDIAN : defined(__LITTLE_ENDIAN)
---- a/tools/arch/x86/include/asm/orc_types.h
-+++ b/tools/arch/x86/include/asm/orc_types.h
-@@ -46,7 +46,6 @@
- #define ORC_TYPE_REGS_PARTIAL		4
- 
- #ifndef __ASSEMBLY__
--#include <asm/byteorder.h>
- 
- /*
-  * This struct is more or less a vastly simplified version of the DWARF Call
-@@ -59,12 +58,12 @@
- struct orc_entry {
- 	s16		sp_offset;
- 	s16		bp_offset;
--#if defined(__LITTLE_ENDIAN_BITFIELD)
-+#if __BYTE_ORDER == __LITTLE_ENDIAN
- 	unsigned	sp_reg:4;
- 	unsigned	bp_reg:4;
- 	unsigned	type:3;
- 	unsigned	signal:1;
--#elif defined(__BIG_ENDIAN_BITFIELD)
-+#elif __BYTE_ORDER == __BIG_ENDIAN
- 	unsigned	bp_reg:4;
- 	unsigned	sp_reg:4;
- 	unsigned	unused:4;
---- a/tools/arch/x86/lib/insn.c
-+++ b/tools/arch/x86/lib/insn.c
-@@ -15,7 +15,11 @@
- #include "../include/asm/insn.h" /* __ignore_sync_check__ */
- #include "../include/asm-generic/unaligned.h" /* __ignore_sync_check__ */
- 
-+#ifdef __KERNEL__
- #include <linux/errno.h>
-+#else
-+#include <errno.h>
-+#endif
- #include <linux/kconfig.h>
- 
- #include "../include/asm/emulate_prefix.h" /* __ignore_sync_check__ */
---- a/tools/include/asm-generic/bitops/fls.h
-+++ b/tools/include/asm-generic/bitops/fls.h
-@@ -2,6 +2,8 @@
- #ifndef _ASM_GENERIC_BITOPS_FLS_H_
- #define _ASM_GENERIC_BITOPS_FLS_H_
- 
-+#include <string.h>
-+
- /**
-  * fls - find last (most-significant) bit set
-  * @x: the word to search
-@@ -10,7 +12,7 @@
-  * Note fls(0) = 0, fls(1) = 1, fls(0x80000000) = 32.
-  */
- 
--static __always_inline int fls(unsigned int x)
-+static __always_inline int __generic_fls(unsigned int x)
- {
- 	int r = 32;
- 
-@@ -38,5 +40,6 @@ static __always_inline int fls(unsigned
- 	}
- 	return r;
- }
-+#define fls __generic_fls
- 
- #endif /* _ASM_GENERIC_BITOPS_FLS_H_ */
---- a/tools/include/asm-generic/bitsperlong.h
-+++ b/tools/include/asm-generic/bitsperlong.h
-@@ -4,11 +4,13 @@
- 
- #include <uapi/asm-generic/bitsperlong.h>
- 
-+#ifndef BITS_PER_LONG
- #ifdef __SIZEOF_LONG__
- #define BITS_PER_LONG (__CHAR_BIT__ * __SIZEOF_LONG__)
- #else
- #define BITS_PER_LONG __WORDSIZE
- #endif
-+#endif
- 
- #if BITS_PER_LONG != __BITS_PER_LONG
- #error Inconsistent word size. Check asm/bitsperlong.h
---- a/tools/include/linux/rbtree.h
-+++ b/tools/include/linux/rbtree.h
-@@ -18,7 +18,6 @@
- #define __TOOLS_LINUX_PERF_RBTREE_H
- 
- #include <linux/kernel.h>
--#include <linux/stddef.h>
- 
- struct rb_node {
- 	unsigned long  __rb_parent_color;
---- a/tools/objtool/Makefile
-+++ b/tools/objtool/Makefile
-@@ -40,7 +40,7 @@ elfshdr := $(shell echo '$(pound)include
- OBJTOOL_CFLAGS += $(if $(elfshdr),,-DLIBELF_USE_DEPRECATED)
- 
- # Always want host compilation.
--HOST_OVERRIDES := CC="$(HOSTCC)" LD="$(HOSTLD)" AR="$(HOSTAR)"
-+HOST_OVERRIDES := CC="$(HOSTCC) $(HOST_EXTRACFLAGS)" LD="$(HOSTLD)" AR="$(HOSTAR)"
- 
- AWK = awk
- MKDIR = mkdir
-@@ -55,6 +55,7 @@ BUILD_ORC := n
- 
- ifeq ($(SRCARCH),x86)
- 	BUILD_ORC := y
-+	CFLAGS += -DBUILD_ORC
- endif
- 
- export BUILD_ORC
---- a/tools/objtool/check.c
-+++ b/tools/objtool/check.c
-@@ -1288,11 +1288,12 @@ static int add_ignore_alternatives(struc
- 	return 0;
- }
- 
-+#ifndef BUILD_ORC
- /*
-  * Symbols that replace INSN_CALL_DYNAMIC, every (tail) call to such a symbol
-  * will be added to the .retpoline_sites section.
-  */
--__weak bool arch_is_retpoline(struct symbol *sym)
-+bool arch_is_retpoline(struct symbol *sym)
- {
- 	return false;
- }
-@@ -1301,7 +1302,7 @@ __weak bool arch_is_retpoline(struct sym
-  * Symbols that replace INSN_RETURN, every (tail) call to such a symbol
-  * will be added to the .return_sites section.
-  */
--__weak bool arch_is_rethunk(struct symbol *sym)
-+bool arch_is_rethunk(struct symbol *sym)
- {
- 	return false;
- }
-@@ -1310,10 +1311,11 @@ __weak bool arch_is_rethunk(struct symbo
-  * Symbols that are embedded inside other instructions, because sometimes crazy
-  * code exists. These are mostly ignored for validation purposes.
-  */
--__weak bool arch_is_embedded_insn(struct symbol *sym)
-+bool arch_is_embedded_insn(struct symbol *sym)
- {
- 	return false;
- }
-+#endif
- 
- static struct reloc *insn_reloc(struct objtool_file *file, struct instruction *insn)
- {
---- a/tools/objtool/include/objtool/objtool.h
-+++ b/tools/objtool/include/objtool/objtool.h
-@@ -12,7 +12,9 @@
- 
- #include <objtool/elf.h>
- 
-+#ifndef __weak
- #define __weak __attribute__((weak))
-+#endif
- 
- struct pv_state {
- 	bool clean;
---- a/tools/objtool/orc_dump.c
-+++ b/tools/objtool/orc_dump.c
-@@ -4,10 +4,10 @@
-  */
- 
- #include <unistd.h>
--#include <asm/orc_types.h>
- #include <objtool/objtool.h>
- #include <objtool/warn.h>
- #include <objtool/endianness.h>
-+#include <asm/orc_types.h>
- 
- static const char *reg_name(unsigned int reg)
- {
---- a/tools/objtool/orc_gen.c
-+++ b/tools/objtool/orc_gen.c
-@@ -7,11 +7,11 @@
- #include <string.h>
- 
- #include <linux/objtool_types.h>
--#include <asm/orc_types.h>
- 
- #include <objtool/check.h>
- #include <objtool/warn.h>
- #include <objtool/endianness.h>
-+#include <asm/orc_types.h>
- 
- static int init_orc_entry(struct orc_entry *orc, struct cfi_state *cfi,
- 			  struct instruction *insn)
---- a/tools/objtool/special.c
-+++ b/tools/objtool/special.c
-@@ -54,9 +54,11 @@ static const struct special_entry entrie
- 	{},
- };
- 
--void __weak arch_handle_alternative(unsigned short feature, struct special_alt *alt)
-+#ifndef BUILD_ORC
-+void arch_handle_alternative(unsigned short feature, struct special_alt *alt)
- {
- }
-+#endif
- 
- static void reloc_to_sec_off(struct reloc *reloc, struct section **sec,
- 			     unsigned long *off)
---- a/tools/objtool/weak.c
-+++ b/tools/objtool/weak.c
-@@ -15,12 +15,14 @@
- 	return ENOSYS;							\
- })
- 
--int __weak orc_dump(const char *_objname)
-+#ifndef BUILD_ORC
-+int orc_dump(const char *_objname)
- {
- 	UNSUPPORTED("ORC");
- }
- 
--int __weak orc_create(struct objtool_file *file)
-+int orc_create(struct objtool_file *file)
- {
- 	UNSUPPORTED("ORC");
- }
-+#endif
---- a/tools/scripts/Makefile.include
-+++ b/tools/scripts/Makefile.include
-@@ -92,7 +92,7 @@ LLVM_OBJCOPY	?= llvm-objcopy
- LLVM_STRIP	?= llvm-strip
- 
- ifeq ($(CC_NO_CLANG), 1)
--EXTRA_WARNINGS += -Wstrict-aliasing=3
-+# EXTRA_WARNINGS += -Wstrict-aliasing=3
- 
- else ifneq ($(CROSS_COMPILE),)
- # Allow userspace to override CLANG_CROSS_FLAGS to specify their own



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:20 -0400
Subject: [openwrt/openwrt]  kernel/x86: remove legacy 5.15 kernel config
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23459.1712213782.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/01ff257dce5e844b2d0e93917a0cc0f498beab27

commit 01ff257dce5e844b2d0e93917a0cc0f498beab27
Author: Elliott Mitchell <ehem+openwrt at m5p.com>
AuthorDate: Fri Dec 29 15:35:35 2023 -0800

    kernel/x86: remove legacy 5.15 kernel config
    
    Missed when removing the other 5.15 kernel configurations.
    
    Fixes: b8ec063b38 ("x86: remove unused 5.15 kernel configs and patches")
    Signed-off-by: Elliott Mitchell <ehem+openwrt at m5p.com>
---
 target/linux/x86/legacy/config-5.15 | 229 ------------------------------------
 1 file changed, 229 deletions(-)

diff --git a/target/linux/x86/legacy/config-5.15 b/target/linux/x86/legacy/config-5.15
deleted file mode 100644
index 8e17703cbc..0000000000
--- a/target/linux/x86/legacy/config-5.15
+++ /dev/null
@@ -1,229 +0,0 @@
-# CONFIG_3C515 is not set
-CONFIG_ACPI=y
-CONFIG_ACPI_AC=y
-CONFIG_ACPI_BATTERY=y
-CONFIG_ACPI_BUTTON=y
-# CONFIG_ACPI_CMPC is not set
-# CONFIG_ACPI_CONTAINER is not set
-CONFIG_ACPI_CPU_FREQ_PSS=y
-# CONFIG_ACPI_DEBUG is not set
-# CONFIG_ACPI_DEBUGGER is not set
-# CONFIG_ACPI_DOCK is not set
-# CONFIG_ACPI_DPTF is not set
-# CONFIG_ACPI_EC_DEBUGFS is not set
-# CONFIG_ACPI_FAN is not set
-CONFIG_ACPI_HOTPLUG_IOAPIC=y
-# CONFIG_ACPI_I2C_OPREGION is not set
-CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
-# CONFIG_ACPI_PCI_SLOT is not set
-CONFIG_ACPI_PROCESSOR=y
-# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
-CONFIG_ACPI_PROCESSOR_CSTATE=y
-CONFIG_ACPI_PROCESSOR_IDLE=y
-CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
-# CONFIG_ACPI_SBS is not set
-CONFIG_ACPI_SPCR_TABLE=y
-CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
-CONFIG_ACPI_THERMAL=y
-CONFIG_ACPI_VIDEO=y
-# CONFIG_ACPI_WMI is not set
-# CONFIG_ADV_SWBUTTON is not set
-CONFIG_AGP=y
-# CONFIG_AGP_ALI is not set
-# CONFIG_AGP_AMD is not set
-# CONFIG_AGP_AMD64 is not set
-# CONFIG_AGP_ATI is not set
-# CONFIG_AGP_EFFICEON is not set
-CONFIG_AGP_INTEL=y
-# CONFIG_AGP_NVIDIA is not set
-# CONFIG_AGP_SIS is not set
-# CONFIG_AGP_SWORKS is not set
-# CONFIG_AGP_VIA is not set
-# CONFIG_AMD_PMC is not set
-CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BLK_DEV_SR=y
-CONFIG_CDROM=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-# CONFIG_CS89x0_ISA is not set
-CONFIG_DMA_ACPI=y
-CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_DRM=y
-CONFIG_DRM_AMDGPU=y
-# CONFIG_DRM_AMD_DC is not set
-CONFIG_DRM_BOCHS=y
-CONFIG_DRM_BRIDGE=y
-CONFIG_DRM_FBDEV_EMULATION=y
-CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_I915=y
-CONFIG_DRM_I915_CAPTURE_ERROR=y
-CONFIG_DRM_I915_COMPRESS_ERROR=y
-# CONFIG_DRM_I915_DEBUG is not set
-# CONFIG_DRM_I915_DEBUG_GUC is not set
-# CONFIG_DRM_I915_DEBUG_MMIO is not set
-# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
-# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
-CONFIG_DRM_I915_FENCE_TIMEOUT=10000
-CONFIG_DRM_I915_FORCE_PROBE=""
-CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
-# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
-CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
-CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
-CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
-# CONFIG_DRM_I915_SELFTEST is not set
-CONFIG_DRM_I915_STOP_TIMEOUT=100
-# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
-# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
-CONFIG_DRM_I915_TIMESLICE_DURATION=1
-CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
-CONFIG_DRM_I915_USERPTR=y
-# CONFIG_DRM_I915_WERROR is not set
-CONFIG_DRM_KMS_HELPER=y
-CONFIG_DRM_MIPI_DSI=y
-CONFIG_DRM_PANEL=y
-CONFIG_DRM_PANEL_BRIDGE=y
-CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
-CONFIG_DRM_RADEON=y
-CONFIG_DRM_SCHED=y
-CONFIG_DRM_TTM=y
-CONFIG_DRM_TTM_HELPER=y
-CONFIG_DRM_VRAM_HELPER=y
-# CONFIG_EL3 is not set
-CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
-CONFIG_FB_DEFERRED_IO=y
-# CONFIG_FB_I810 is not set
-CONFIG_FB_SYS_COPYAREA=y
-CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_FOPS=y
-CONFIG_FB_SYS_IMAGEBLIT=y
-# CONFIG_FB_VESA is not set
-CONFIG_FONT_8x16=y
-CONFIG_FONT_8x8=y
-CONFIG_FONT_SUPPORT=y
-CONFIG_FRAMEBUFFER_CONSOLE=y
-CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
-# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
-CONFIG_HDMI=y
-CONFIG_HID_BATTERY_STRENGTH=y
-# CONFIG_HIGHMEM4G is not set
-CONFIG_HPET=y
-CONFIG_HPET_MMAP=y
-# CONFIG_HP_ACCEL is not set
-CONFIG_HWMON=y
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-# CONFIG_I2C_AMD_MP2 is not set
-CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
-CONFIG_INPUT_MOUSE=y
-CONFIG_INPUT_MOUSEDEV=y
-CONFIG_INPUT_MOUSEDEV_PSAUX=y
-CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
-CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
-CONFIG_INTEL_GTT=y
-CONFIG_INTEL_IDLE=y
-# CONFIG_INTEL_IPS is not set
-# CONFIG_INTEL_MEI_HDCP is not set
-# CONFIG_INTEL_MENLOW is not set
-# CONFIG_INTEL_SAR_INT1092 is not set
-# CONFIG_INTEL_SCU_PLATFORM is not set
-# CONFIG_INTEL_SOC_DTS_THERMAL is not set
-CONFIG_INTERVAL_TREE=y
-CONFIG_IOSF_MBI=y
-# CONFIG_IOSF_MBI_DEBUG is not set
-CONFIG_ISA=y
-CONFIG_ISAPNP=y
-CONFIG_ISA_BUS_API=y
-# CONFIG_ISCSI_IBFT is not set
-CONFIG_ISO9660_FS=y
-# CONFIG_JOLIET is not set
-CONFIG_KCMP=y
-# CONFIG_LANCE is not set
-CONFIG_M586MMX=y
-# CONFIG_M686 is not set
-# CONFIG_MDA_CONSOLE is not set
-CONFIG_MFD_CORE=y
-CONFIG_MFD_INTEL_LPSS=y
-CONFIG_MFD_INTEL_LPSS_ACPI=y
-# CONFIG_MFD_INTEL_PMC_BXT is not set
-# CONFIG_MIXCOMWD is not set
-CONFIG_MMU_NOTIFIER=y
-# CONFIG_MOUSE_BCM5974 is not set
-# CONFIG_MOUSE_CYAPA is not set
-CONFIG_MOUSE_PS2=y
-CONFIG_MOUSE_PS2_ALPS=y
-# CONFIG_MOUSE_PS2_BYD is not set
-# CONFIG_MOUSE_PS2_CYPRESS is not set
-# CONFIG_MOUSE_PS2_ELANTECH is not set
-CONFIG_MOUSE_PS2_LIFEBOOK=y
-CONFIG_MOUSE_PS2_LOGIPS2PP=y
-CONFIG_MOUSE_PS2_SMBUS=y
-CONFIG_MOUSE_PS2_SYNAPTICS=y
-CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
-# CONFIG_MOUSE_PS2_TOUCHKIT is not set
-CONFIG_MOUSE_PS2_TRACKPOINT=y
-# CONFIG_MOUSE_SERIAL is not set
-# CONFIG_MOUSE_VSXXXAA is not set
-CONFIG_NOHIGHMEM=y
-CONFIG_NO_HZ=y
-CONFIG_PATA_AMD=y
-CONFIG_PATA_ATIIXP=y
-CONFIG_PATA_LEGACY=y
-CONFIG_PATA_MPIIX=y
-CONFIG_PATA_OLDPIIX=y
-CONFIG_PATA_PLATFORM=y
-CONFIG_PATA_SC1200=y
-CONFIG_PATA_SIS=y
-CONFIG_PATA_TIMINGS=y
-CONFIG_PATA_VIA=y
-CONFIG_PCIEAER=y
-CONFIG_PCIEASPM=y
-CONFIG_PCIEASPM_DEFAULT=y
-# CONFIG_PCIEASPM_PERFORMANCE is not set
-# CONFIG_PCIEASPM_POWERSAVE is not set
-# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCI_MMCONFIG=y
-# CONFIG_PCWATCHDOG is not set
-# CONFIG_PMIC_OPREGION is not set
-CONFIG_PNP=y
-CONFIG_PNPACPI=y
-# CONFIG_PNPBIOS is not set
-CONFIG_PNP_DEBUG_MESSAGES=y
-CONFIG_RAS=y
-CONFIG_RELAY=y
-CONFIG_RTC_I2C_AND_SPI=y
-# CONFIG_SAMSUNG_Q10 is not set
-CONFIG_SATA_AHCI=y
-# CONFIG_SCSI_FDOMAIN_ISA is not set
-CONFIG_SERIAL_8250_PNP=y
-# CONFIG_SURFACE_PLATFORMS is not set
-CONFIG_SYNC_FILE=y
-# CONFIG_SYSTEM76_ACPI is not set
-# CONFIG_TOSHIBA_BT_RFKILL is not set
-CONFIG_USB_STORAGE=y
-CONFIG_VMAP_PFN=y
-# CONFIG_WDT is not set
-# CONFIG_WIRELESS_HOTKEY is not set
-CONFIG_X86_ACPI_CPUFREQ=y
-# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
-CONFIG_X86_ALIGNMENT_16=y
-# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
-# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
-# CONFIG_X86_E_POWERSAVER is not set
-CONFIG_X86_F00F_BUG=y
-# CONFIG_X86_INTEL_LPSS is not set
-# CONFIG_X86_LONGHAUL is not set
-CONFIG_X86_MINIMUM_CPU_FAMILY=5
-# CONFIG_X86_PAE is not set
-# CONFIG_X86_PCC_CPUFREQ is not set
-CONFIG_X86_PM_TIMER=y
-# CONFIG_X86_POWERNOW_K8 is not set
-CONFIG_ZLIB_DEFLATE=y



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:21 -0400
Subject: [openwrt/openwrt]  kernel: vfio: flag vfio_virqfd as only kernel 6.2
 and earlier
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23460.1712213782.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/77e03f3c833a51858b16d923e1abcbd82de1e90c

commit 77e03f3c833a51858b16d923e1abcbd82de1e90c
Author: Mathew McBride <matt at traverse.com.au>
AuthorDate: Fri Mar 15 14:16:05 2024 +1100

    kernel: vfio: flag vfio_virqfd as only kernel 6.2 and earlier
    
    Kernel 6.2 folded virqfd (eventd interface for VFIO interrupts)
    into the base vfio module, it is no longer a tristate option.
    
    Change suggested by vincejv on GitHub:
    https://github.com/openwrt/openwrt/pull/14868#issuecomment-1998260124
    
    Signed-off-by: Mathew McBride <matt at traverse.com.au>
---
 package/kernel/linux/modules/virt.mk | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/kernel/linux/modules/virt.mk b/package/kernel/linux/modules/virt.mk
index f45cb17614..a408ac9b14 100644
--- a/package/kernel/linux/modules/virt.mk
+++ b/package/kernel/linux/modules/virt.mk
@@ -84,9 +84,9 @@ define KernelPackage/vfio
 	CONFIG_VFIO_MDEV=n
   FILES:= \
 	$(LINUX_DIR)/drivers/vfio/vfio.ko \
-	$(LINUX_DIR)/drivers/vfio/vfio_virqfd.ko \
+	$(LINUX_DIR)/drivers/vfio/vfio_virqfd.ko at lt6.2 \
 	$(LINUX_DIR)/drivers/vfio/vfio_iommu_type1.ko
-  AUTOLOAD:=$(call AutoProbe,vfio vfio_iommu_type1 vfio_virqfd)
+  AUTOLOAD:=$(call AutoProbe,vfio vfio_iommu_type1 +LINUX_6_1:vfio_virqfd)
 endef
 
 define KernelPackage/vfio/description



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:18 -0400
Subject: [openwrt/openwrt]  kernel/x86: Restore kernel patches for v6.1
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23461.1712213786.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/391c5089beb8348233b3e55cc2f676ab8354cce4

commit 391c5089beb8348233b3e55cc2f676ab8354cce4
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sat Mar 16 11:05:03 2024 +0100

    kernel/x86: Restore kernel patches for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../x86/patches-6.1/100-fix_cs5535_clockevt.patch  |  13 +
 .../patches-6.1/103-pcengines_apu6_platform.patch  | 280 +++++++++++++++++++++
 2 files changed, 293 insertions(+)

diff --git a/target/linux/x86/patches-6.1/100-fix_cs5535_clockevt.patch b/target/linux/x86/patches-6.1/100-fix_cs5535_clockevt.patch
new file mode 100644
index 0000000000..d4de2027ba
--- /dev/null
+++ b/target/linux/x86/patches-6.1/100-fix_cs5535_clockevt.patch
@@ -0,0 +1,13 @@
+--- a/drivers/clocksource/timer-cs5535.c
++++ b/drivers/clocksource/timer-cs5535.c
+@@ -127,7 +127,9 @@ static irqreturn_t mfgpt_tick(int irq, v
+ 		cs5535_mfgpt_write(cs5535_event_clock, MFGPT_REG_SETUP,
+ 				MFGPT_SETUP_CNTEN | MFGPT_SETUP_CMP2);
+ 
+-	cs5535_clockevent.event_handler(&cs5535_clockevent);
++	if (cs5535_clockevent.event_handler)
++		cs5535_clockevent.event_handler(&cs5535_clockevent);
++
+ 	return IRQ_HANDLED;
+ }
+ 
diff --git a/target/linux/x86/patches-6.1/103-pcengines_apu6_platform.patch b/target/linux/x86/patches-6.1/103-pcengines_apu6_platform.patch
new file mode 100644
index 0000000000..654bd88b7f
--- /dev/null
+++ b/target/linux/x86/patches-6.1/103-pcengines_apu6_platform.patch
@@ -0,0 +1,280 @@
+From 970d9af9015a387bb81841faf05dcc1a171eb97a Mon Sep 17 00:00:00 2001
+From: Philip Prindeville <philipp at redfish-solutions.com>
+Date: Sun, 1 Jan 2023 15:25:04 -0700
+Subject: [PATCH v3 1/1] x86: Support APU5 in PCEngines platform driver
+To: platform-driver-x86 at vger.kernel.org, linux-x86_64 at vger.kernel.org
+Cc: Ed Wildgoose <lists at wildgooses.com>, Andres Salomon <dilinger at queued.net>, Andreas Eberlein <foodeas at aeberlein.de>, Paul Spooren <paul at spooren.de>
+
+PCEngines make a number of SBC. APU5 has 5 mpcie slots + MSATA.
+It also has support for 3x LTE modems with 6x SIM slots (pairs with a
+SIM switch device). Each mpcie slot for modems has a reset GPIO
+
+To ensure that the naming is sane between APU2-6 the GPIOS are
+renamed to be modem1-reset, modem2-reset, etc. This is significant
+because the slots that can be reset change between APU2 and APU3/4
+
+GPIO for simswap is moved to the end of the list as it could be dropped
+for APU2 boards (but causes no harm to leave it in, hardware could be
+added to a future rev of the board).
+
+Structure of the GPIOs for APU5 is extremely similar to APU2-4, but
+many lines are moved around and there are simply more
+modems/resets/sim-swap lines to breakout.
+
+Also added APU6, which is essentially APU4 with a different ethernet
+interface and SFP cage on eth0.
+
+Revision history:
+
+v1: originally titled, "apu6: add apu6 variation to apu2 driver family"
+this dealt only with detecting the APUv6, which is otherwise identical
+to the v4 excepting the SFP cage on eth0.
+
+v2: at Ed's request, merged with his previous pull-request titled
+"x86: Support APU5 in PCEngines platform driver", and some cleanup
+to that changeset (including dropping the table "apu5_driver_data"
+which did not have a defined type "struct apu_driver_data"), but got
+mistitled when the Subject of that commit got accidentally dropped.
+
+v3: retitled to match Ed's previous pull-request.
+
+Cc: platform-driver-x86 at vger.kernel.org
+Cc: linux-x86_64 at vger.kernel.org
+Reviewed-by: Andreas Eberlein <foodeas at aeberlein.de>
+Reviewed-by: Paul Spooren <paul at spooren.de>
+Signed-off-by: Ed Wildgoose <lists at wildgooses.com>
+Sighed-off-by: Philip Prindeville <philipp at redfish-solutions.com>
+---
+ drivers/leds/leds-apu.c                |   2 +-
+ drivers/platform/x86/Kconfig           |   4 +-
+ drivers/platform/x86/pcengines-apuv2.c | 118 ++++++++++++++++++++++---
+ 3 files changed, 107 insertions(+), 17 deletions(-)
+
+--- a/drivers/leds/leds-apu.c
++++ b/drivers/leds/leds-apu.c
+@@ -183,7 +183,7 @@ static int __init apu_led_init(void)
+ 
+ 	if (!(dmi_match(DMI_SYS_VENDOR, "PC Engines") &&
+ 	      (dmi_match(DMI_PRODUCT_NAME, "APU") || dmi_match(DMI_PRODUCT_NAME, "apu1")))) {
+-		pr_err("No PC Engines APUv1 board detected. For APUv2,3 support, enable CONFIG_PCENGINES_APU2\n");
++		pr_err("No PC Engines APUv1 board detected. For APUv2,3,4,5,6 support, enable CONFIG_PCENGINES_APU2\n");
+ 		return -ENODEV;
+ 	}
+ 
+--- a/drivers/platform/x86/Kconfig
++++ b/drivers/platform/x86/Kconfig
+@@ -698,7 +698,7 @@ config XO1_RFKILL
+ 	  laptop.
+ 
+ config PCENGINES_APU2
+-	tristate "PC Engines APUv2/3 front button and LEDs driver"
++	tristate "PC Engines APUv2/3/4/5/6 front button and LEDs driver"
+ 	depends on INPUT && INPUT_KEYBOARD && GPIOLIB
+ 	depends on LEDS_CLASS
+ 	select GPIO_AMD_FCH
+@@ -706,7 +706,7 @@ config PCENGINES_APU2
+ 	select LEDS_GPIO
+ 	help
+ 	  This driver provides support for the front button and LEDs on
+-	  PC Engines APUv2/APUv3 board.
++	  PC Engines APUv2/APUv3/APUv4/APUv5/APUv6 board.
+ 
+ 	  To compile this driver as a module, choose M here: the module
+ 	  will be called pcengines-apuv2.
+--- a/drivers/platform/x86/pcengines-apuv2.c
++++ b/drivers/platform/x86/pcengines-apuv2.c
+@@ -1,10 +1,12 @@
+ // SPDX-License-Identifier: GPL-2.0+
+ 
+ /*
+- * PC-Engines APUv2/APUv3 board platform driver
++ * PC-Engines APUv2-6 board platform driver
+  * for GPIO buttons and LEDs
+  *
+  * Copyright (C) 2018 metux IT consult
++ * Copyright (C) 2022 Ed Wildgoose <lists at wildgooses.com>
++ * Copyright (C) 2022 Philip Prindeville <philipp at redfish-solutions.com>
+  * Author: Enrico Weigelt <info at metux.net>
+  */
+ 
+@@ -22,38 +24,70 @@
+ #include <linux/platform_data/gpio/gpio-amd-fch.h>
+ 
+ /*
+- * NOTE: this driver only supports APUv2/3 - not APUv1, as this one
++ * NOTE: this driver only supports APUv2-6 - not APUv1, as this one
+  * has completely different register layouts.
+  */
+ 
++/*
++ * There are a number of APU variants, with differing features
++ * APU2 has SIM slots 1/2 mapping to mPCIe sockets 1/2
++ * APU3/4 moved SIM slot 1 to mPCIe socket 3, ie logically reversed
++ * However, most APU3/4 have a SIM switch which we default on to reverse
++ * the order and keep physical SIM order matching physical modem order
++ * APU6 is approximately the same as APU4 with different ethernet layout
++ *
++ * APU5 has 3x SIM sockets, all with a SIM switch
++ * several GPIOs are shuffled (see schematic), including MODESW
++ */
++
+ /* Register mappings */
+ #define APU2_GPIO_REG_LED1		AMD_FCH_GPIO_REG_GPIO57
+ #define APU2_GPIO_REG_LED2		AMD_FCH_GPIO_REG_GPIO58
+ #define APU2_GPIO_REG_LED3		AMD_FCH_GPIO_REG_GPIO59_DEVSLP1
+ #define APU2_GPIO_REG_MODESW		AMD_FCH_GPIO_REG_GPIO32_GE1
+ #define APU2_GPIO_REG_SIMSWAP		AMD_FCH_GPIO_REG_GPIO33_GE2
+-#define APU2_GPIO_REG_MPCIE2		AMD_FCH_GPIO_REG_GPIO55_DEVSLP0
+-#define APU2_GPIO_REG_MPCIE3		AMD_FCH_GPIO_REG_GPIO51
++#define APU2_GPIO_REG_RESETM1		AMD_FCH_GPIO_REG_GPIO51
++#define APU2_GPIO_REG_RESETM2		AMD_FCH_GPIO_REG_GPIO55_DEVSLP0
++
++#define APU5_GPIO_REG_MODESW		AMT_FCH_GPIO_REG_GEVT22
++#define APU5_GPIO_REG_SIMSWAP1		AMD_FCH_GPIO_REG_GPIO68
++#define APU5_GPIO_REG_SIMSWAP2		AMD_FCH_GPIO_REG_GPIO32_GE1
++#define APU5_GPIO_REG_SIMSWAP3		AMD_FCH_GPIO_REG_GPIO33_GE2
++#define APU5_GPIO_REG_RESETM1		AMD_FCH_GPIO_REG_GPIO51
++#define APU5_GPIO_REG_RESETM2		AMD_FCH_GPIO_REG_GPIO55_DEVSLP0
++#define APU5_GPIO_REG_RESETM3		AMD_FCH_GPIO_REG_GPIO64
+ 
+ /* Order in which the GPIO lines are defined in the register list */
+ #define APU2_GPIO_LINE_LED1		0
+ #define APU2_GPIO_LINE_LED2		1
+ #define APU2_GPIO_LINE_LED3		2
+ #define APU2_GPIO_LINE_MODESW		3
+-#define APU2_GPIO_LINE_SIMSWAP		4
+-#define APU2_GPIO_LINE_MPCIE2		5
+-#define APU2_GPIO_LINE_MPCIE3		6
++#define APU2_GPIO_LINE_RESETM1		4
++#define APU2_GPIO_LINE_RESETM2		5
++#define APU2_GPIO_LINE_SIMSWAP		6
++
++#define APU5_GPIO_LINE_LED1		0
++#define APU5_GPIO_LINE_LED2		1
++#define APU5_GPIO_LINE_LED3		2
++#define APU5_GPIO_LINE_MODESW		3
++#define APU5_GPIO_LINE_RESETM1		4
++#define APU5_GPIO_LINE_RESETM2		5
++#define APU5_GPIO_LINE_RESETM3		6
++#define APU5_GPIO_LINE_SIMSWAP1		7
++#define APU5_GPIO_LINE_SIMSWAP2		8
++#define APU5_GPIO_LINE_SIMSWAP3		9
++
+ 
+-/* GPIO device */
++/* GPIO device - APU2/3/4/6 */
+ 
+ static int apu2_gpio_regs[] = {
+ 	[APU2_GPIO_LINE_LED1]		= APU2_GPIO_REG_LED1,
+ 	[APU2_GPIO_LINE_LED2]		= APU2_GPIO_REG_LED2,
+ 	[APU2_GPIO_LINE_LED3]		= APU2_GPIO_REG_LED3,
+ 	[APU2_GPIO_LINE_MODESW]		= APU2_GPIO_REG_MODESW,
++	[APU2_GPIO_LINE_RESETM1]	= APU2_GPIO_REG_RESETM1,
++	[APU2_GPIO_LINE_RESETM2]	= APU2_GPIO_REG_RESETM2,
+ 	[APU2_GPIO_LINE_SIMSWAP]	= APU2_GPIO_REG_SIMSWAP,
+-	[APU2_GPIO_LINE_MPCIE2]		= APU2_GPIO_REG_MPCIE2,
+-	[APU2_GPIO_LINE_MPCIE3]		= APU2_GPIO_REG_MPCIE3,
+ };
+ 
+ static const char * const apu2_gpio_names[] = {
+@@ -61,9 +95,9 @@ static const char * const apu2_gpio_name
+ 	[APU2_GPIO_LINE_LED2]		= "front-led2",
+ 	[APU2_GPIO_LINE_LED3]		= "front-led3",
+ 	[APU2_GPIO_LINE_MODESW]		= "front-button",
++	[APU2_GPIO_LINE_RESETM1]	= "modem1-reset",
++	[APU2_GPIO_LINE_RESETM2]	= "modem2-reset",
+ 	[APU2_GPIO_LINE_SIMSWAP]	= "simswap",
+-	[APU2_GPIO_LINE_MPCIE2]		= "mpcie2_reset",
+-	[APU2_GPIO_LINE_MPCIE3]		= "mpcie3_reset",
+ };
+ 
+ static const struct amd_fch_gpio_pdata board_apu2 = {
+@@ -72,6 +106,40 @@ static const struct amd_fch_gpio_pdata b
+ 	.gpio_names	= apu2_gpio_names,
+ };
+ 
++/* GPIO device - APU5 */
++
++static int apu5_gpio_regs[] = {
++	[APU5_GPIO_LINE_LED1]		= APU2_GPIO_REG_LED1,
++	[APU5_GPIO_LINE_LED2]		= APU2_GPIO_REG_LED2,
++	[APU5_GPIO_LINE_LED3]		= APU2_GPIO_REG_LED3,
++	[APU5_GPIO_LINE_MODESW]		= APU5_GPIO_REG_MODESW,
++	[APU5_GPIO_LINE_RESETM1]	= APU5_GPIO_REG_RESETM1,
++	[APU5_GPIO_LINE_RESETM2]	= APU5_GPIO_REG_RESETM2,
++	[APU5_GPIO_LINE_RESETM3]	= APU5_GPIO_REG_RESETM3,
++	[APU5_GPIO_LINE_SIMSWAP1]	= APU5_GPIO_REG_SIMSWAP1,
++	[APU5_GPIO_LINE_SIMSWAP2]	= APU5_GPIO_REG_SIMSWAP2,
++	[APU5_GPIO_LINE_SIMSWAP3]	= APU5_GPIO_REG_SIMSWAP3,
++};
++
++static const char * const apu5_gpio_names[] = {
++	[APU5_GPIO_LINE_LED1]		= "front-led1",
++	[APU5_GPIO_LINE_LED2]		= "front-led2",
++	[APU5_GPIO_LINE_LED3]		= "front-led3",
++	[APU5_GPIO_LINE_MODESW]		= "front-button",
++	[APU5_GPIO_LINE_RESETM1]	= "modem1-reset",
++	[APU5_GPIO_LINE_RESETM2]	= "modem2-reset",
++	[APU5_GPIO_LINE_RESETM3]	= "modem3-reset",
++	[APU5_GPIO_LINE_SIMSWAP1]	= "simswap1",
++	[APU5_GPIO_LINE_SIMSWAP2]	= "simswap2",
++	[APU5_GPIO_LINE_SIMSWAP3]	= "simswap3",
++};
++
++static const struct amd_fch_gpio_pdata board_apu5 = {
++	.gpio_num	= ARRAY_SIZE(apu5_gpio_regs),
++	.gpio_reg	= apu5_gpio_regs,
++	.gpio_names	= apu5_gpio_names,
++};
++
+ /* GPIO LEDs device */
+ 
+ static const struct gpio_led apu2_leds[] = {
+@@ -215,6 +283,24 @@ static const struct dmi_system_id apu_gp
+ 		},
+ 		.driver_data = (void *)&board_apu2,
+ 	},
++	/* APU5 w/ mainline BIOS */
++	{
++		.ident		= "apu5",
++		.matches	= {
++			DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
++			DMI_MATCH(DMI_BOARD_NAME, "apu5")
++		},
++		.driver_data	= (void *)&board_apu5,
++	},
++	/* APU6 w/ mainline BIOS */
++	{
++		.ident		= "apu6",
++		.matches	= {
++			DMI_MATCH(DMI_SYS_VENDOR, "PC Engines"),
++			DMI_MATCH(DMI_BOARD_NAME, "apu6")
++		},
++		.driver_data	= (void *)&board_apu2,
++	},
+ 	{}
+ };
+ 
+@@ -249,7 +335,7 @@ static int __init apu_board_init(void)
+ 
+ 	id = dmi_first_match(apu_gpio_dmi_table);
+ 	if (!id) {
+-		pr_err("failed to detect APU board via DMI\n");
++		pr_err("No APU board detected via DMI\n");
+ 		return -ENODEV;
+ 	}
+ 
+@@ -288,8 +374,12 @@ module_init(apu_board_init);
+ module_exit(apu_board_exit);
+ 
+ MODULE_AUTHOR("Enrico Weigelt, metux IT consult <info at metux.net>");
+-MODULE_DESCRIPTION("PC Engines APUv2/APUv3 board GPIO/LEDs/keys driver");
++MODULE_DESCRIPTION("PC Engines APUv2-6 board GPIO/LEDs/keys driver");
+ MODULE_LICENSE("GPL");
+ MODULE_DEVICE_TABLE(dmi, apu_gpio_dmi_table);
+ MODULE_ALIAS("platform:pcengines-apuv2");
++MODULE_ALIAS("platform:pcengines-apuv3");
++MODULE_ALIAS("platform:pcengines-apuv4");
++MODULE_ALIAS("platform:pcengines-apuv5");
++MODULE_ALIAS("platform:pcengines-apuv6");
+ MODULE_SOFTDEP("pre: platform:" AMD_FCH_GPIO_DRIVER_NAME " platform:leds-gpio platform:gpio_keys_polled");



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:24 -0400
Subject: [openwrt/openwrt]  x86: 6.6: enable System Management Mode emulation
 on KVM
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23462.1712213788.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/667baaf1d936160c40130ce2950c85908e5d676e

commit 667baaf1d936160c40130ce2950c85908e5d676e
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Tue Mar 26 18:39:01 2024 +0100

    x86: 6.6: enable System Management Mode emulation on KVM
    
    Include the CONFIG_KVM_SMM option in the kvm-x86 package to enable system management mode emulation on KVM.
    
    Co-authored-by: Stefan Hellermann <stefan at the2masters.de>
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 package/kernel/linux/modules/virt.mk | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/kernel/linux/modules/virt.mk b/package/kernel/linux/modules/virt.mk
index a408ac9b14..4a879f240e 100644
--- a/package/kernel/linux/modules/virt.mk
+++ b/package/kernel/linux/modules/virt.mk
@@ -22,6 +22,7 @@ define KernelPackage/kvm-x86
   KCONFIG:=\
 	  CONFIG_KVM \
 	  CONFIG_KVM_MMU_AUDIT=n \
+	  CONFIG_KVM_SMM=y at ge6.6 \
 	  CONFIG_VIRTUALIZATION=y
   FILES:= $(LINUX_DIR)/arch/$(LINUX_KARCH)/kvm/kvm.ko
   AUTOLOAD:=$(call AutoProbe,kvm.ko)



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:16 -0400
Subject: [openwrt/openwrt]  kernel/x86: Restore kernel files for v6.1
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23465.1712213788.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/19910da69d746caaf392bf5e9f96065056e0bb22

commit 19910da69d746caaf392bf5e9f96065056e0bb22
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu Mar 21 19:03:26 2024 +0100

    kernel/x86: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/x86/64/config-6.1      | 606 ++++++++++++++++++++++++++++++++++++
 target/linux/x86/config-6.1         | 463 +++++++++++++++++++++++++++
 target/linux/x86/generic/config-6.1 | 509 ++++++++++++++++++++++++++++++
 target/linux/x86/geode/config-6.1   | 176 +++++++++++
 target/linux/x86/legacy/config-6.1  | 262 ++++++++++++++++
 5 files changed, 2016 insertions(+)

diff --git a/target/linux/x86/64/config-6.1 b/target/linux/x86/64/config-6.1
new file mode 100644
index 0000000000..66ae3e35f0
--- /dev/null
+++ b/target/linux/x86/64/config-6.1
@@ -0,0 +1,606 @@
+CONFIG_64BIT=y
+# CONFIG_ACER_WMI is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_BATTERY=y
+# CONFIG_ACPI_BGRT is not set
+CONFIG_ACPI_BUTTON=y
+# CONFIG_ACPI_CMPC is not set
+CONFIG_ACPI_CONTAINER=y
+CONFIG_ACPI_CPPC_LIB=y
+CONFIG_ACPI_CPU_FREQ_PSS=y
+# CONFIG_ACPI_DEBUG is not set
+# CONFIG_ACPI_DEBUGGER is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_DPTF is not set
+# CONFIG_ACPI_EC_DEBUGFS is not set
+CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_FPDT is not set
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_HOTPLUG_IOAPIC=y
+# CONFIG_ACPI_I2C_OPREGION is not set
+CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
+CONFIG_ACPI_LPIT=y
+CONFIG_ACPI_PCC=y
+# CONFIG_ACPI_PCI_SLOT is not set
+# CONFIG_ACPI_PFRUT is not set
+CONFIG_ACPI_PRMT=y
+CONFIG_ACPI_PROCESSOR=y
+# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
+CONFIG_ACPI_PROCESSOR_CSTATE=y
+CONFIG_ACPI_PROCESSOR_IDLE=y
+CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
+# CONFIG_ACPI_SBS is not set
+CONFIG_ACPI_SPCR_TABLE=y
+CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
+# CONFIG_ACPI_TAD is not set
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_VIDEO=y
+# CONFIG_ACPI_WMI is not set
+# CONFIG_ACRN_GUEST is not set
+# CONFIG_ADV_SWBUTTON is not set
+CONFIG_AGP=y
+# CONFIG_AGP_AMD64 is not set
+CONFIG_AGP_INTEL=y
+# CONFIG_AGP_SIS is not set
+# CONFIG_AGP_VIA is not set
+# CONFIG_AMD_HSMP is not set
+CONFIG_AMD_IOMMU=y
+CONFIG_AMD_IOMMU_V2=y
+# CONFIG_AMD_PMC is not set
+# CONFIG_AMD_PMF is not set
+# CONFIG_AMD_PTDMA is not set
+# CONFIG_AMD_SFH_HID is not set
+CONFIG_ARCH_CPUIDLE_HALTPOLL=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
+CONFIG_ARCH_MMAP_RND_BITS=28
+CONFIG_ARCH_MMAP_RND_BITS_MAX=32
+CONFIG_ARCH_MMAP_RND_BITS_MIN=28
+CONFIG_ARCH_NR_GPIO=1024
+CONFIG_ARCH_SPARSEMEM_DEFAULT=y
+CONFIG_ARCH_WANTS_THP_SWAP=y
+# CONFIG_ASUS_TF103C_DOCK is not set
+# CONFIG_ASUS_WMI is not set
+CONFIG_AUDIT_ARCH=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BALLOON_COMPACTION=y
+CONFIG_BLK_DEV_BSGLIB=y
+CONFIG_BLK_DEV_BSG_COMMON=y
+CONFIG_BLK_DEV_INTEGRITY=y
+CONFIG_BLK_DEV_INTEGRITY_T10=y
+CONFIG_BLK_DEV_NVME=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_MQ_VIRTIO=y
+CONFIG_BLK_PM=y
+# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
+CONFIG_BTT=y
+CONFIG_CDROM=y
+CONFIG_CONNECTOR=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
+CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+CONFIG_CPU_IBPB_ENTRY=y
+CONFIG_CPU_IBRS_ENTRY=y
+# CONFIG_CPU_IDLE_GOV_HALTPOLL is not set
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SRSO=y
+CONFIG_CPU_UNRET_ENTRY=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRYPTO_AES_NI_INTEL=y
+# CONFIG_CRYPTO_ARIA_AESNI_AVX_X86_64 is not set
+CONFIG_CRYPTO_BLAKE2S_X86=y
+# CONFIG_CRYPTO_BLOWFISH_X86_64 is not set
+# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 is not set
+# CONFIG_CRYPTO_CAMELLIA_AESNI_AVX2_X86_64 is not set
+# CONFIG_CRYPTO_CAMELLIA_X86_64 is not set
+# CONFIG_CRYPTO_CAST5_AVX_X86_64 is not set
+# CONFIG_CRYPTO_CAST6_AVX_X86_64 is not set
+CONFIG_CRYPTO_CRCT10DIF=y
+# CONFIG_CRYPTO_CRCT10DIF_PCLMUL is not set
+CONFIG_CRYPTO_CRYPTD=y
+# CONFIG_CRYPTO_DES3_EDE_X86_64 is not set
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
+CONFIG_CRYPTO_LRW=y
+# CONFIG_CRYPTO_NHPOLY1305_AVX2 is not set
+# CONFIG_CRYPTO_NHPOLY1305_SSE2 is not set
+# CONFIG_CRYPTO_POLYVAL_CLMUL_NI is not set
+# CONFIG_CRYPTO_SERPENT_AVX_X86_64 is not set
+# CONFIG_CRYPTO_SERPENT_AVX2_X86_64 is not set
+# CONFIG_CRYPTO_SERPENT_SSE2_X86_64 is not set
+# CONFIG_CRYPTO_SHA1_SSSE3 is not set
+# CONFIG_CRYPTO_SHA256_SSSE3 is not set
+# CONFIG_CRYPTO_SHA512_SSSE3 is not set
+CONFIG_CRYPTO_SIMD=y
+# CONFIG_CRYPTO_SM3_AVX_X86_64 is not set
+# CONFIG_CRYPTO_SM4_AESNI_AVX_X86_64 is not set
+# CONFIG_CRYPTO_SM4_AESNI_AVX2_X86_64 is not set
+# CONFIG_CRYPTO_TWOFISH_AVX_X86_64 is not set
+# CONFIG_CRYPTO_TWOFISH_X86_64 is not set
+# CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set
+CONFIG_CRYPTO_XTS=y
+# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
+CONFIG_DMA_ACPI=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DRM=y
+CONFIG_DRM_BOCHS=y
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_FBDEV_EMULATION=y
+CONFIG_DRM_FBDEV_OVERALLOC=100
+CONFIG_DRM_GEM_SHMEM_HELPER=y
+# CONFIG_DRM_HYPERV is not set
+CONFIG_DRM_I915=y
+CONFIG_DRM_I915_CAPTURE_ERROR=y
+CONFIG_DRM_I915_COMPRESS_ERROR=y
+# CONFIG_DRM_I915_DEBUG is not set
+# CONFIG_DRM_I915_DEBUG_GUC is not set
+# CONFIG_DRM_I915_DEBUG_MMIO is not set
+# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
+# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
+CONFIG_DRM_I915_FENCE_TIMEOUT=10000
+CONFIG_DRM_I915_FORCE_PROBE=""
+CONFIG_DRM_I915_GVT=y
+CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
+# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
+CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
+CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
+CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
+# CONFIG_DRM_I915_SELFTEST is not set
+CONFIG_DRM_I915_STOP_TIMEOUT=100
+# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
+# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
+CONFIG_DRM_I915_TIMESLICE_DURATION=1
+CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
+CONFIG_DRM_I915_USERPTR=y
+# CONFIG_DRM_I915_WERROR is not set
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_MIPI_DSI=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DRM_TTM=y
+CONFIG_DRM_TTM_HELPER=y
+CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM_VRAM_HELPER=y
+CONFIG_EFI=y
+CONFIG_EFIVAR_FS=m
+# CONFIG_EFI_BOOTLOADER_CONTROL is not set
+# CONFIG_EFI_CAPSULE_LOADER is not set
+# CONFIG_EFI_COCO_SECRET is not set
+# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
+# CONFIG_EFI_DISABLE_PCI_DMA is not set
+# CONFIG_EFI_DISABLE_RUNTIME is not set
+CONFIG_EFI_DXE_MEM_ATTRIBUTES=y
+CONFIG_EFI_EARLYCON=y
+CONFIG_EFI_ESRT=y
+# CONFIG_EFI_FAKE_MEMMAP is not set
+CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
+# CONFIG_EFI_MIXED is not set
+# CONFIG_EFI_PGT_DUMP is not set
+# CONFIG_EFI_RCI2_TABLE is not set
+CONFIG_EFI_RUNTIME_MAP=y
+CONFIG_EFI_RUNTIME_WRAPPERS=y
+# CONFIG_EFI_SECRET is not set
+CONFIG_EFI_STUB=y
+# CONFIG_EFI_TEST is not set
+# CONFIG_EFI_VARS is not set
+CONFIG_FAILOVER=y
+CONFIG_FB=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CMDLINE=y
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_EFI=y
+CONFIG_FB_HYPERV=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_SIMPLE=y
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_FOPS=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+CONFIG_FB_TILEBLITTING=y
+# CONFIG_FB_VESA is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_SUPPORT=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FREEZER=y
+CONFIG_FUSION_SAS=y
+CONFIG_FW_CACHE=y
+CONFIG_GART_IOMMU=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CPU=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_PENDING_IRQ=y
+# CONFIG_GIGABYTE_WMI is not set
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_ACPI=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_ICH=y
+CONFIG_GPIO_SCH=y
+CONFIG_HALTPOLL_CPUIDLE=y
+CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
+CONFIG_HDMI=y
+CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_HID_BATTERY_STRENGTH=y
+CONFIG_HID_GENERIC=y
+CONFIG_HID_HYPERV_MOUSE=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_ACPI=y
+# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+# CONFIG_HOTPLUG_PCI_PCIE is not set
+# CONFIG_HOTPLUG_PCI_SHPC is not set
+CONFIG_HOTPLUG_SMT=y
+CONFIG_HPET=y
+CONFIG_HPET_MMAP=y
+# CONFIG_HP_ACCEL is not set
+# CONFIG_HUAWEI_WMI is not set
+CONFIG_HVC_DRIVER=y
+CONFIG_HVC_IRQ=y
+CONFIG_HVC_XEN=y
+CONFIG_HVC_XEN_FRONTEND=y
+CONFIG_HWMON=y
+CONFIG_HWMON_VID=y
+CONFIG_HW_RANDOM_AMD=y
+CONFIG_HW_RANDOM_INTEL=y
+CONFIG_HW_RANDOM_VIRTIO=y
+CONFIG_HYPERV=y
+CONFIG_HYPERVISOR_GUEST=y
+CONFIG_HYPERV_BALLOON=y
+CONFIG_HYPERV_IOMMU=y
+CONFIG_HYPERV_KEYBOARD=y
+CONFIG_HYPERV_NET=y
+CONFIG_HYPERV_STORAGE=y
+# CONFIG_HYPERV_TESTING is not set
+CONFIG_HYPERV_TIMER=y
+CONFIG_HYPERV_UTILS=y
+# CONFIG_HYPERV_VSOCKETS is not set
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_AMD_MP2 is not set
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_HID_ACPI is not set
+# CONFIG_I2C_MULTI_INSTANTIATE is not set
+# CONFIG_I8K is not set
+# CONFIG_IA32_EMULATION is not set
+CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
+# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
+CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
+CONFIG_INTEL_GTT=y
+CONFIG_INTEL_IDLE=y
+# CONFIG_INTEL_IDXD is not set
+# CONFIG_INTEL_IDXD_COMPAT is not set
+CONFIG_INTEL_IOMMU=y
+# CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
+CONFIG_INTEL_IOMMU_FLOPPY_WA=y
+# CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set
+# CONFIG_INTEL_IOMMU_SVM is not set
+# CONFIG_INTEL_IPS is not set
+# CONFIG_INTEL_MEI_HDCP is not set
+# CONFIG_INTEL_MEI_PXP is not set
+# CONFIG_INTEL_MENLOW is not set
+CONFIG_INTEL_PCH_THERMAL=y
+# CONFIG_INTEL_SAR_INT1092 is not set
+# CONFIG_INTEL_SCU_PLATFORM is not set
+CONFIG_INTEL_SOC_DTS_IOSF_CORE=y
+CONFIG_INTEL_SOC_DTS_THERMAL=y
+# CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set
+CONFIG_INTEL_TDX_GUEST=y
+# CONFIG_INTEL_TURBO_MAX_3 is not set
+# CONFIG_INTEL_TXT is not set
+# CONFIG_INTEL_UNCORE_FREQ_CONTROL is not set
+# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
+# CONFIG_INTEL_WMI_THUNDERBOLT is not set
+CONFIG_INTERVAL_TREE=y
+CONFIG_IOASID=y
+CONFIG_IOMMU_API=y
+# CONFIG_IOMMU_DEBUG is not set
+# CONFIG_IOMMU_DEBUGFS is not set
+CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
+# CONFIG_IOMMU_DEFAULT_DMA_STRICT is not set
+# CONFIG_IOMMU_DEFAULT_PASSTHROUGH is not set
+CONFIG_IOMMU_DMA=y
+CONFIG_IOMMU_HELPER=y
+CONFIG_IOMMU_IOVA=y
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_IOSF_MBI=y
+# CONFIG_IOSF_MBI_DEBUG is not set
+CONFIG_IRQ_MSI_IOMMU=y
+CONFIG_IRQ_REMAP=y
+# CONFIG_ISCSI_IBFT is not set
+CONFIG_ISO9660_FS=y
+CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y
+CONFIG_KCMP=y
+CONFIG_KVM_GUEST=y
+CONFIG_LEDS_GPIO=y
+# CONFIG_LEGACY_VSYSCALL_EMULATE is not set
+CONFIG_LEGACY_VSYSCALL_NONE=y
+# CONFIG_LEGACY_VSYSCALL_XONLY is not set
+# CONFIG_LG_LAPTOP is not set
+CONFIG_LIBNVDIMM=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LPC_ICH=y
+CONFIG_LPC_SCH=y
+CONFIG_MAILBOX=y
+# CONFIG_MAXSMP is not set
+CONFIG_MEMORY_BALLOON=y
+CONFIG_MEMREGION=y
+# CONFIG_MERAKI_MX100 is not set
+CONFIG_MFD_CORE=y
+# CONFIG_MFD_INTEL_LPSS_ACPI is not set
+# CONFIG_MFD_INTEL_PMC_BXT is not set
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_CQHCI=y
+CONFIG_MMC_RICOH_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_ACPI=y
+CONFIG_MMC_SDHCI_IO_ACCESSORS=y
+CONFIG_MMC_SDHCI_PCI=y
+# CONFIG_MMC_SDHCI_PLTFM is not set
+# CONFIG_MMC_WBSD is not set
+CONFIG_MMU_NOTIFIER=y
+CONFIG_MODULES_USE_ELF_RELA=y
+# CONFIG_MPSC is not set
+# CONFIG_MSI_WMI is not set
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+# CONFIG_MXM_WMI is not set
+CONFIG_ND_BLK=y
+CONFIG_ND_BTT=y
+CONFIG_ND_CLAIM=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_FAILOVER=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+# CONFIG_NITRO_ENCLAVES is not set
+CONFIG_NR_CPUS=512
+CONFIG_NR_CPUS_DEFAULT=64
+CONFIG_NR_CPUS_RANGE_BEGIN=2
+CONFIG_NR_CPUS_RANGE_END=512
+# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
+CONFIG_NVME_CORE=y
+CONFIG_NVME_HWMON=y
+CONFIG_NVME_MULTIPATH=y
+CONFIG_OUTPUT_FORMAT="elf64-x86-64"
+CONFIG_PADATA=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_REPORTING=y
+CONFIG_PAGE_TABLE_ISOLATION=y
+CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_CLOCK=y
+# CONFIG_PARAVIRT_DEBUG is not set
+CONFIG_PARAVIRT_SPINLOCKS=y
+CONFIG_PARAVIRT_XXL=y
+CONFIG_PATA_AMD=y
+CONFIG_PATA_ATIIXP=y
+CONFIG_PATA_MPIIX=y
+CONFIG_PATA_OLDPIIX=y
+CONFIG_PATA_PLATFORM=y
+CONFIG_PATA_TIMINGS=y
+CONFIG_PATA_VIA=y
+CONFIG_PCC=y
+# CONFIG_PCENGINES_APU2 is not set
+CONFIG_PCIEAER=y
+CONFIG_PCIEASPM=y
+CONFIG_PCIEASPM_DEFAULT=y
+# CONFIG_PCIEASPM_PERFORMANCE is not set
+# CONFIG_PCIEASPM_POWERSAVE is not set
+# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_PME=y
+CONFIG_PCI_HYPERV=y
+CONFIG_PCI_HYPERV_INTERFACE=y
+# CONFIG_PCI_MMCONFIG is not set
+CONFIG_PCI_XEN=y
+# CONFIG_PEAQ_WMI is not set
+CONFIG_PGTABLE_LEVELS=4
+CONFIG_PHYSICAL_ALIGN=0x1000000
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_ALDERLAKE=y
+CONFIG_PINCTRL_BAYTRAIL=y
+CONFIG_PINCTRL_BROXTON=y
+CONFIG_PINCTRL_CANNONLAKE=y
+CONFIG_PINCTRL_CHERRYVIEW=y
+CONFIG_PINCTRL_DENVERTON=y
+CONFIG_PINCTRL_ELKHARTLAKE=y
+CONFIG_PINCTRL_EMMITSBURG=y
+CONFIG_PINCTRL_GEMINILAKE=y
+CONFIG_PINCTRL_INTEL=y
+CONFIG_PINCTRL_JASPERLAKE=y
+CONFIG_PINCTRL_LAKEFIELD=y
+CONFIG_PINCTRL_LEWISBURG=y
+CONFIG_PINCTRL_LYNXPOINT=y
+CONFIG_PINCTRL_METEORLAKE=y
+CONFIG_PINCTRL_SUNRISEPOINT=y
+CONFIG_PINCTRL_TIGERLAKE=y
+CONFIG_PM=y
+# CONFIG_PMIC_OPREGION is not set
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PNP=y
+CONFIG_PNPACPI=y
+CONFIG_PNP_DEBUG_MESSAGES=y
+CONFIG_PPS=y
+CONFIG_PROC_EVENTS=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_KVM=y
+CONFIG_PTP_1588_CLOCK_VMW=y
+CONFIG_PVH=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_RAS=y
+CONFIG_RELAY=y
+CONFIG_RELOCATABLE=y
+CONFIG_RESET_ATTACK_MITIGATION=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+# CONFIG_SAMSUNG_Q10 is not set
+CONFIG_SATA_AHCI=y
+# CONFIG_SCHED_CORE is not set
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_MC_PRIO=y
+CONFIG_SCHED_SMT=y
+CONFIG_SCSI_SAS_ATTRS=y
+CONFIG_SCSI_VIRTIO=y
+# CONFIG_SENSORS_ASUS_EC is not set
+# CONFIG_SENSORS_ASUS_WMI is not set
+CONFIG_SENSORS_CORETEMP=y
+CONFIG_SENSORS_FAM15H_POWER=y
+CONFIG_SENSORS_I5500=y
+CONFIG_SENSORS_K8TEMP=y
+CONFIG_SENSORS_K10TEMP=y
+CONFIG_SENSORS_VIA_CPUTEMP=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
+CONFIG_SLS=y
+CONFIG_SMP=y
+# CONFIG_SND_HDA_CTL_DEV_ID is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_SOC_AMD_ACP6x is not set
+# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
+# CONFIG_SND_SOC_AMD_PS is not set
+# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
+# CONFIG_SND_SOC_INTEL_AVS is not set
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SPARSEMEM=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_MANUAL=y
+# CONFIG_SPARSEMEM_VMEMMAP is not set
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_STACK_VALIDATION=y
+# CONFIG_SURFACE_PLATFORMS is not set
+CONFIG_SWIOTLB=y
+CONFIG_SWIOTLB_XEN=y
+CONFIG_SYNC_FILE=y
+# CONFIG_SYSTEM76_ACPI is not set
+CONFIG_SYS_HYPERVISOR=y
+CONFIG_THERMAL_GOV_USER_SPACE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_WRITABLE_TRIPS=y
+# CONFIG_THINKPAD_LMI is not set
+# CONFIG_TOSHIBA_BT_RFKILL is not set
+# CONFIG_TOSHIBA_WMI is not set
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+# CONFIG_UACCE is not set
+# CONFIG_UCLAMP_TASK is not set
+CONFIG_UCS2_STRING=y
+# CONFIG_UNWINDER_ORC is not set
+CONFIG_USB_STORAGE=y
+# CONFIG_VIDEO_IPU3_CIO2 is not set
+CONFIG_VIRTIO=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
+CONFIG_VIRTIO_IOMMU=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTIO_MMIO_CMDLINE_DEVICES=y
+CONFIG_VIRTIO_NET=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_PCI_LEGACY=y
+CONFIG_VIRTIO_PCI_LIB=y
+# CONFIG_VIRTIO_PMEM is not set
+# CONFIG_VIRTIO_VSOCKETS is not set
+CONFIG_VIRTIO_VSOCKETS_COMMON=y
+CONFIG_VIRT_DRIVERS=y
+CONFIG_VMAP_PFN=y
+CONFIG_VMAP_STACK=y
+# CONFIG_VMD is not set
+CONFIG_VMGENID=y
+CONFIG_VMWARE_BALLOON=y
+CONFIG_VMWARE_PVSCSI=y
+CONFIG_VMWARE_VMCI=y
+CONFIG_VMWARE_VMCI_VSOCKETS=y
+CONFIG_VMXNET3=y
+CONFIG_VSOCKETS=y
+CONFIG_VSOCKETS_LOOPBACK=y
+CONFIG_VT_CONSOLE_SLEEP=y
+CONFIG_WATCHDOG_CORE=y
+# CONFIG_WIRELESS_HOTKEY is not set
+# CONFIG_WMI_BMOF is not set
+# CONFIG_X86_5LEVEL is not set
+CONFIG_X86_64=y
+CONFIG_X86_64_SMP=y
+CONFIG_X86_ACPI_CPUFREQ=y
+# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
+CONFIG_X86_AMD_FREQ_SENSITIVITY=y
+CONFIG_X86_AMD_PLATFORM_DEVICE=y
+CONFIG_X86_AMD_PSTATE=y
+# CONFIG_X86_AMD_PSTATE_UT is not set
+CONFIG_X86_CPUID=y
+CONFIG_X86_DIRECT_GBPAGES=y
+CONFIG_X86_HV_CALLBACK_VECTOR=y
+CONFIG_X86_INTEL_LPSS=y
+# CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set
+CONFIG_X86_INTEL_PSTATE=y
+# CONFIG_X86_KERNEL_IBT is not set
+CONFIG_X86_MINIMUM_CPU_FAMILY=64
+# CONFIG_X86_PCC_CPUFREQ is not set
+CONFIG_X86_PKG_TEMP_THERMAL=y
+# CONFIG_X86_PMEM_LEGACY is not set
+CONFIG_X86_PM_TIMER=y
+# CONFIG_X86_POWERNOW_K8 is not set
+# CONFIG_X86_VSYSCALL_EMULATION is not set
+CONFIG_X86_X2APIC=y
+# CONFIG_X86_X32 is not set
+# CONFIG_X86_X32_ABI is not set
+CONFIG_XEN=y
+CONFIG_XENFS=y
+CONFIG_XEN_512GB=y
+CONFIG_XEN_ACPI=y
+CONFIG_XEN_ACPI_PROCESSOR=y
+CONFIG_XEN_AUTO_XLATE=y
+# CONFIG_XEN_BACKEND is not set
+CONFIG_XEN_BALLOON=y
+CONFIG_XEN_BLKDEV_FRONTEND=y
+CONFIG_XEN_COMPAT_XENFS=y
+CONFIG_XEN_DEBUG_FS=y
+CONFIG_XEN_DEV_EVTCHN=y
+CONFIG_XEN_DOM0=y
+CONFIG_XEN_EFI=y
+CONFIG_XEN_FBDEV_FRONTEND=y
+CONFIG_XEN_GNTDEV=y
+CONFIG_XEN_GRANT_DEV_ALLOC=y
+CONFIG_XEN_HAVE_PVMMU=y
+CONFIG_XEN_HAVE_VPMU=y
+# CONFIG_XEN_MCE_LOG is not set
+CONFIG_XEN_NETDEV_FRONTEND=y
+CONFIG_XEN_PCIDEV_FRONTEND=y
+CONFIG_XEN_PRIVCMD=y
+CONFIG_XEN_PV=y
+CONFIG_XEN_PVH=y
+CONFIG_XEN_PVHVM=y
+CONFIG_XEN_PVHVM_GUEST=y
+CONFIG_XEN_PVHVM_SMP=y
+CONFIG_XEN_PV_DOM0=y
+CONFIG_XEN_PV_MSR_SAFE=y
+CONFIG_XEN_PV_SMP=y
+CONFIG_XEN_SAVE_RESTORE=y
+CONFIG_XEN_SCSI_FRONTEND=y
+CONFIG_XEN_SYMS=y
+CONFIG_XEN_SYS_HYPERVISOR=y
+CONFIG_XEN_VIRTIO=y
+# CONFIG_XEN_VIRTIO_FORCE_GRANT is not set
+CONFIG_XEN_WDT=y
+CONFIG_XEN_XENBUS_FRONTEND=y
+# CONFIG_XIAOMI_WMI is not set
+CONFIG_XPS=y
+# CONFIG_YOGABOOK_WMI is not set
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZONE_DMA32=y
diff --git a/target/linux/x86/config-6.1 b/target/linux/x86/config-6.1
new file mode 100644
index 0000000000..ab693448ad
--- /dev/null
+++ b/target/linux/x86/config-6.1
@@ -0,0 +1,463 @@
+# CONFIG_60XX_WDT is not set
+# CONFIG_64BIT is not set
+# CONFIG_ACPI is not set
+# CONFIG_ACQUIRE_WDT is not set
+# CONFIG_ADVANTECH_WDT is not set
+# CONFIG_ALIM1535_WDT is not set
+# CONFIG_ALIX is not set
+CONFIG_AMD_NB=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_CLOCKSOURCE_INIT=y
+CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
+CONFIG_ARCH_NR_GPIO=512
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SPLIT_ARG64=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_USES_PG_UNCACHED=y
+CONFIG_ARCH_WANTS_DYNAMIC_TASK_STRUCT=y
+CONFIG_ARCH_WANTS_NO_INSTR=y
+CONFIG_ATA=y
+CONFIG_ATA_GENERIC=y
+CONFIG_ATA_PIIX=y
+# CONFIG_BARCO_P50_GPIO is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BOUNCE=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CLKBLD_I8253=y
+CONFIG_CLKEVT_I8253=y
+CONFIG_CLKSRC_I8253=y
+CONFIG_CLOCKSOURCE_VALIDATE_LAST_CYCLE=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32=y
+CONFIG_COMPAT_32BIT_TIME=y
+# CONFIG_COMPAT_VDSO is not set
+CONFIG_CONSOLE_TRANSLATIONS=y
+# CONFIG_CPU5_WDT is not set
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_ONDEMAND=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+CONFIG_CPU_FREQ_GOV_COMMON=y
+# CONFIG_CPU_FREQ_GOV_CONSERVATIVE is not set
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+# CONFIG_CPU_FREQ_GOV_POWERSAVE is not set
+# CONFIG_CPU_FREQ_GOV_USERSPACE is not set
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_SUP_AMD=y
+CONFIG_CPU_SUP_CENTAUR=y
+CONFIG_CPU_SUP_CYRIX_32=y
+CONFIG_CPU_SUP_HYGON=y
+CONFIG_CPU_SUP_INTEL=y
+CONFIG_CPU_SUP_TRANSMETA_32=y
+CONFIG_CPU_SUP_UMC_32=y
+CONFIG_CPU_SUP_VORTEX_32=y
+CONFIG_CPU_SUP_ZHAOXIN=y
+CONFIG_CRASH_CORE=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+# CONFIG_CRYPTO_CRC32_PCLMUL is not set
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_RNG2=y
+# CONFIG_CRYPTO_SERPENT_SSE2_586 is not set
+# CONFIG_CX_ECAT is not set
+CONFIG_DCACHE_WORD_ACCESS=y
+# CONFIG_DEBUG_BOOT_PARAMS is not set
+# CONFIG_DEBUG_ENTRY is not set
+CONFIG_DEBUG_INFO=y
+# CONFIG_DEBUG_KMAP_LOCAL_FORCE_MAP is not set
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_MISC=y
+# CONFIG_DEBUG_NMI_SELFTEST is not set
+# CONFIG_DEBUG_TLBFLUSH is not set
+CONFIG_DECOMPRESS_BZIP2=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DMADEVICES=y
+CONFIG_DMI=y
+CONFIG_DMIID=y
+CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
+CONFIG_DMI_SYSFS=y
+# CONFIG_DM_AUDIT is not set
+CONFIG_DNOTIFY=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_DYNAMIC_SIGFRAME=y
+CONFIG_EARLY_PRINTK=y
+# CONFIG_EARLY_PRINTK_DBGP is not set
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+# CONFIG_EDD is not set
+CONFIG_EFI_HANDOVER_PROTOCOL=y
+# CONFIG_EISA is not set
+# CONFIG_EUROTECH_WDT is not set
+# CONFIG_EXAR_WDT is not set
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_EXT4_FS=y
+CONFIG_F2FS_FS=y
+# CONFIG_F71808E_WDT is not set
+CONFIG_FIRMWARE_MEMMAP=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FRAME_POINTER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FUSION=y
+# CONFIG_FUSION_CTL is not set
+# CONFIG_FUSION_LOGGING is not set
+CONFIG_FUSION_MAX_SGE=128
+CONFIG_FUSION_SPI=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+# CONFIG_GDS_FORCE_MITIGATION is not set
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CLOCKEVENTS_MIN_ADJUST=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_ENTRY=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_MATRIX_ALLOCATOR=y
+CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+# CONFIG_GEOS is not set
+CONFIG_GLOB=y
+CONFIG_GPIO_CDEV=y
+# CONFIG_HANGCHECK_TIMER is not set
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HID=y
+CONFIG_HIGHMEM=y
+CONFIG_HIGHMEM4G=y
+# CONFIG_HIGHMEM64G is not set
+CONFIG_HIGHPTE=y
+CONFIG_HPET_EMULATE_RTC=y
+CONFIG_HPET_TIMER=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_GEODE=y
+CONFIG_HW_RANDOM_VIA=y
+# CONFIG_HYPERVISOR_GUEST is not set
+CONFIG_HZ_PERIODIC=y
+CONFIG_I8253_LOCK=y
+CONFIG_IA32_FEAT_CTL=y
+# CONFIG_IB700_WDT is not set
+# CONFIG_IBMASR is not set
+# CONFIG_IBM_RTL is not set
+# CONFIG_IE6XX_WDT is not set
+CONFIG_ILLEGAL_POINTER_VALUE=0
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_VIVALDIFMAP=y
+CONFIG_INSTRUCTION_DECODER=y
+# CONFIG_INTEL_HFI_THERMAL is not set
+# CONFIG_INTEL_LDMA is not set
+# CONFIG_INTEL_PCH_THERMAL is not set
+# CONFIG_INTEL_POWERCLAMP is not set
+# CONFIG_INTEL_SCU_PCI is not set
+# CONFIG_INTEL_TCC_COOLING is not set
+# CONFIG_INTEL_VSEC is not set
+# CONFIG_IOSF_MBI is not set
+CONFIG_IO_DELAY_0X80=y
+# CONFIG_IO_DELAY_0XED is not set
+# CONFIG_IO_DELAY_NONE is not set
+# CONFIG_IO_DELAY_UDELAY is not set
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+# CONFIG_ISA is not set
+CONFIG_ISA_DMA_API=y
+# CONFIG_IT8712F_WDT is not set
+# CONFIG_IT87_WDT is not set
+# CONFIG_ITCO_WDT is not set
+CONFIG_JBD2=y
+CONFIG_KALLSYMS=y
+CONFIG_KEXEC=y
+CONFIG_KEXEC_CORE=y
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KMAP_LOCAL=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+# CONFIG_M486 is not set
+# CONFIG_M486SX is not set
+# CONFIG_M586 is not set
+# CONFIG_M586MMX is not set
+# CONFIG_M586TSC is not set
+CONFIG_M686=y
+# CONFIG_MACHZ_WDT is not set
+# CONFIG_MATOM is not set
+# CONFIG_MCORE2 is not set
+# CONFIG_MCRUSOE is not set
+# CONFIG_MCYRIXIII is not set
+# CONFIG_MEFFICEON is not set
+# CONFIG_MELAN is not set
+CONFIG_MEMFD_CREATE=y
+# CONFIG_MFD_INTEL_LPSS_PCI is not set
+# CONFIG_MGEODEGX1 is not set
+# CONFIG_MGEODE_LX is not set
+CONFIG_MICROCODE=y
+CONFIG_MICROCODE_AMD=y
+CONFIG_MICROCODE_INTEL=y
+CONFIG_MICROCODE_LATE_LOADING=y
+CONFIG_MIGRATION=y
+CONFIG_MITIGATION_RFDS=y
+# CONFIG_MK6 is not set
+# CONFIG_MK7 is not set
+# CONFIG_MK8 is not set
+CONFIG_MMU_GATHER_MERGE_VMAS=y
+# CONFIG_MODIFY_LDT_SYSCALL is not set
+CONFIG_MODULES_TREE_LOOKUP=y
+CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MPENTIUM4 is not set
+# CONFIG_MPENTIUMII is not set
+# CONFIG_MPENTIUMIII is not set
+# CONFIG_MPENTIUMM is not set
+# CONFIG_MTD is not set
+CONFIG_MTRR=y
+# CONFIG_MTRR_SANITIZER is not set
+# CONFIG_MVIAC3_2 is not set
+# CONFIG_MVIAC7 is not set
+# CONFIG_MWINCHIP3D is not set
+# CONFIG_MWINCHIPC6 is not set
+CONFIG_NAMESPACES=y
+CONFIG_NEED_PER_CPU_EMBED_FIRST_CHUNK=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
+CONFIG_NEED_SG_DMA_LENGTH=y
+# CONFIG_NET5501 is not set
+# CONFIG_NET_NS is not set
+CONFIG_NLS=y
+# CONFIG_NOHIGHMEM is not set
+CONFIG_NR_CPUS=1
+CONFIG_NR_CPUS_DEFAULT=1
+CONFIG_NR_CPUS_RANGE_BEGIN=1
+CONFIG_NR_CPUS_RANGE_END=1
+# CONFIG_NSC_GPIO is not set
+CONFIG_NVRAM=y
+# CONFIG_OF is not set
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+# CONFIG_OLPC is not set
+CONFIG_OUTPUT_FORMAT="elf32-i386"
+# CONFIG_P2SB is not set
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PC104=y
+# CONFIG_PC8736x_GPIO is not set
+# CONFIG_PC87413_WDT is not set
+# CONFIG_PCENGINES_APU2 is not set
+CONFIG_PCI=y
+CONFIG_PCI_ATS=y
+CONFIG_PCI_BIOS=y
+CONFIG_PCI_DIRECT=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_GOANY=y
+# CONFIG_PCI_GOBIOS is not set
+# CONFIG_PCI_GODIRECT is not set
+# CONFIG_PCI_GOMMCONFIG is not set
+CONFIG_PCI_IOV=y
+CONFIG_PCI_LABEL=y
+CONFIG_PCI_LOCKLESS_CONFIG=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_PERF_EVENTS=y
+# CONFIG_PERF_EVENTS_AMD_BRS is not set
+# CONFIG_PERF_EVENTS_AMD_UNCORE is not set
+CONFIG_PERF_EVENTS_INTEL_CSTATE=y
+CONFIG_PERF_EVENTS_INTEL_RAPL=y
+CONFIG_PERF_EVENTS_INTEL_UNCORE=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYSICAL_ALIGN=0x100000
+CONFIG_PHYSICAL_START=0x1000000
+# CONFIG_PHY_INTEL_LGM_EMMC is not set
+CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PREEMPT_NONE_BUILD=y
+# CONFIG_PROCESSOR_SELECT is not set
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_PROC_PID_ARCH_STATUS=y
+# CONFIG_PROVIDE_OHCI1394_DMA_INIT is not set
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+# CONFIG_PUNIT_ATOM_DEBUG is not set
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_RD_BZIP2=y
+CONFIG_RD_GZIP=y
+CONFIG_RETHUNK=y
+CONFIG_RETPOLINE=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_SATA_HOST=y
+# CONFIG_SBC7240_WDT is not set
+# CONFIG_SBC8360_WDT is not set
+# CONFIG_SBC_EPX_C3_WATCHDOG is not set
+# CONFIG_SC1200_WDT is not set
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SCSI_SPI_ATTRS=y
+CONFIG_SCx200=y
+CONFIG_SCx200HR_TIMER=y
+# CONFIG_SCx200_GPIO is not set
+# CONFIG_SCx200_WDT is not set
+CONFIG_SERIAL_8250_PCI=y
+# CONFIG_SERIAL_LANTIQ is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIO=y
+CONFIG_SERIO_I8042=y
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SG_POOL=y
+# CONFIG_SIEMENS_SIMATIC_IPC is not set
+# CONFIG_SMSC37B787_WDT is not set
+# CONFIG_SMSC_SCH311X_WDT is not set
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SPARSEMEM_STATIC=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPECULATION_MITIGATIONS=y
+CONFIG_SRCU=y
+# CONFIG_STATIC_CALL_SELFTEST is not set
+# CONFIG_STRICT_SIGALTSTACK_SIZE is not set
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+# CONFIG_SYSFB_SIMPLEFB is not set
+# CONFIG_TELCLOCK is not set
+# CONFIG_TEST_FPU is not set
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TINY_SRCU=y
+# CONFIG_TOSHIBA is not set
+# CONFIG_TQMX86_WDT is not set
+CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
+CONFIG_UNWINDER_FRAME_POINTER=y
+# CONFIG_UNWINDER_GUESS is not set
+CONFIG_UP_LATE_INIT=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_HID=y
+CONFIG_USB_HIDDEV=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PCI=y
+# CONFIG_USB_OHCI_HCD_PLATFORM is not set
+CONFIG_USB_PCI=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_UHCI_HCD=y
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PCI=y
+# CONFIG_USB_XHCI_PLATFORM is not set
+# CONFIG_USER_NS is not set
+CONFIG_USER_STACKTRACE_SUPPORT=y
+CONFIG_VGA_CONSOLE=y
+# CONFIG_VIA_WDT is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+# CONFIG_WAFER_WDT is not set
+# CONFIG_WINMATE_FM07_KEYS is not set
+CONFIG_X86=y
+CONFIG_X86_32=y
+# CONFIG_X86_32_IRIS is not set
+# CONFIG_X86_ANCIENT_MCE is not set
+# CONFIG_X86_CHECK_BIOS_CORRUPTION is not set
+CONFIG_X86_CMOV=y
+CONFIG_X86_CMPXCHG64=y
+# CONFIG_X86_CPA_STATISTICS is not set
+# CONFIG_X86_CPUFREQ_NFORCE2 is not set
+# CONFIG_X86_CPUID is not set
+# CONFIG_X86_CPU_RESCTRL is not set
+CONFIG_X86_DEBUGCTLMSR=y
+# CONFIG_X86_DEBUG_FPU is not set
+# CONFIG_X86_DECODER_SELFTEST is not set
+# CONFIG_X86_EXTENDED_PLATFORM is not set
+CONFIG_X86_FEATURE_NAMES=y
+CONFIG_X86_GENERIC=y
+# CONFIG_X86_GX_SUSPMOD is not set
+# CONFIG_X86_INTEL_PSTATE is not set
+# CONFIG_X86_INTEL_TSX_MODE_AUTO is not set
+CONFIG_X86_INTEL_TSX_MODE_OFF=y
+# CONFIG_X86_INTEL_TSX_MODE_ON is not set
+CONFIG_X86_INTEL_USERCOPY=y
+CONFIG_X86_INTERNODE_CACHE_SHIFT=6
+CONFIG_X86_IOPL_IOPERM=y
+CONFIG_X86_IO_APIC=y
+CONFIG_X86_L1_CACHE_SHIFT=6
+# CONFIG_X86_LEGACY_VM86 is not set
+CONFIG_X86_LOCAL_APIC=y
+# CONFIG_X86_LONGRUN is not set
+CONFIG_X86_MCE=y
+# CONFIG_X86_MCELOG_LEGACY is not set
+CONFIG_X86_MCE_AMD=y
+# CONFIG_X86_MCE_INJECT is not set
+CONFIG_X86_MCE_INTEL=y
+CONFIG_X86_MCE_THRESHOLD=y
+CONFIG_X86_MINIMUM_CPU_FAMILY=6
+CONFIG_X86_MPPARSE=y
+CONFIG_X86_MSR=y
+# CONFIG_X86_P4_CLOCKMOD is not set
+CONFIG_X86_PAT=y
+CONFIG_X86_PLATFORM_DEVICES=y
+# CONFIG_X86_PLATFORM_DRIVERS_DELL is not set
+# CONFIG_X86_PLATFORM_DRIVERS_HP is not set
+# CONFIG_X86_POWERNOW_K6 is not set
+# CONFIG_X86_POWERNOW_K7 is not set
+# CONFIG_X86_REBOOTFIXUPS is not set
+CONFIG_X86_REROUTE_FOR_BROKEN_BOOT_IRQS=y
+# CONFIG_X86_SPEEDSTEP_CENTRINO is not set
+# CONFIG_X86_SPEEDSTEP_ICH is not set
+# CONFIG_X86_SPEEDSTEP_SMI is not set
+CONFIG_X86_SUPPORTS_MEMORY_FAILURE=y
+CONFIG_X86_THERMAL_VECTOR=y
+CONFIG_X86_TSC=y
+CONFIG_X86_UMIP=y
+CONFIG_X86_UP_APIC=y
+CONFIG_X86_UP_IOAPIC=y
+CONFIG_X86_USE_PPRO_CHECKSUM=y
+CONFIG_X86_VERBOSE_BOOTUP=y
+CONFIG_X86_VMX_FEATURE_NAMES=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_XZ_DEC_X86=y
+CONFIG_ZLIB_INFLATE=y
diff --git a/target/linux/x86/generic/config-6.1 b/target/linux/x86/generic/config-6.1
new file mode 100644
index 0000000000..b7c79de273
--- /dev/null
+++ b/target/linux/x86/generic/config-6.1
@@ -0,0 +1,509 @@
+# CONFIG_3C515 is not set
+# CONFIG_ACER_WMI is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_BATTERY=y
+# CONFIG_ACPI_BGRT is not set
+CONFIG_ACPI_BUTTON=y
+# CONFIG_ACPI_CMPC is not set
+CONFIG_ACPI_CONTAINER=y
+CONFIG_ACPI_CPU_FREQ_PSS=y
+# CONFIG_ACPI_DEBUG is not set
+# CONFIG_ACPI_DEBUGGER is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_DPTF is not set
+# CONFIG_ACPI_EC_DEBUGFS is not set
+# CONFIG_ACPI_FAN is not set
+CONFIG_ACPI_HOTPLUG_CPU=y
+CONFIG_ACPI_HOTPLUG_IOAPIC=y
+# CONFIG_ACPI_I2C_OPREGION is not set
+CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
+# CONFIG_ACPI_PCI_SLOT is not set
+CONFIG_ACPI_PROCESSOR=y
+# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
+CONFIG_ACPI_PROCESSOR_CSTATE=y
+CONFIG_ACPI_PROCESSOR_IDLE=y
+CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
+# CONFIG_ACPI_SBS is not set
+CONFIG_ACPI_SPCR_TABLE=y
+CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
+CONFIG_ACPI_TAD=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_VIDEO=y
+# CONFIG_ACPI_WMI is not set
+# CONFIG_ADV_SWBUTTON is not set
+CONFIG_AGP=y
+# CONFIG_AGP_ALI is not set
+# CONFIG_AGP_AMD is not set
+# CONFIG_AGP_AMD64 is not set
+# CONFIG_AGP_ATI is not set
+# CONFIG_AGP_EFFICEON is not set
+CONFIG_AGP_INTEL=y
+# CONFIG_AGP_NVIDIA is not set
+# CONFIG_AGP_SIS is not set
+# CONFIG_AGP_SWORKS is not set
+# CONFIG_AGP_VIA is not set
+# CONFIG_AMD_PMC is not set
+# CONFIG_AMD_PMF is not set
+# CONFIG_APM is not set
+CONFIG_ARCH_CPUIDLE_HALTPOLL=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
+# CONFIG_ASUS_TF103C_DOCK is not set
+# CONFIG_ASUS_WMI is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BALLOON_COMPACTION=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_BLK_MQ_VIRTIO=y
+CONFIG_BLK_PM=y
+# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
+CONFIG_BTT=y
+CONFIG_CDROM=y
+CONFIG_CONNECTOR=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
+CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
+# CONFIG_CPU_IDLE_GOV_HALTPOLL is not set
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_RMAP=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+# CONFIG_CS89x0_ISA is not set
+# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
+CONFIG_DMA_ACPI=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DRM=y
+CONFIG_DRM_BOCHS=y
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_FBDEV_EMULATION=y
+CONFIG_DRM_FBDEV_OVERALLOC=100
+CONFIG_DRM_GEM_SHMEM_HELPER=y
+# CONFIG_DRM_HYPERV is not set
+CONFIG_DRM_I915=y
+CONFIG_DRM_I915_CAPTURE_ERROR=y
+CONFIG_DRM_I915_COMPRESS_ERROR=y
+# CONFIG_DRM_I915_DEBUG is not set
+# CONFIG_DRM_I915_DEBUG_GUC is not set
+# CONFIG_DRM_I915_DEBUG_MMIO is not set
+# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
+# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
+CONFIG_DRM_I915_FENCE_TIMEOUT=10000
+CONFIG_DRM_I915_FORCE_PROBE=""
+CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
+# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
+CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
+CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
+CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
+# CONFIG_DRM_I915_SELFTEST is not set
+CONFIG_DRM_I915_STOP_TIMEOUT=100
+# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
+# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
+CONFIG_DRM_I915_TIMESLICE_DURATION=1
+CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
+CONFIG_DRM_I915_USERPTR=y
+# CONFIG_DRM_I915_WERROR is not set
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_MIPI_DSI=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DRM_TTM=y
+CONFIG_DRM_TTM_HELPER=y
+CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM_VRAM_HELPER=y
+CONFIG_EFI=y
+CONFIG_EFIVAR_FS=m
+# CONFIG_EFI_BOOTLOADER_CONTROL is not set
+# CONFIG_EFI_CAPSULE_LOADER is not set
+# CONFIG_EFI_CAPSULE_QUIRK_QUARK_CSH is not set
+# CONFIG_EFI_COCO_SECRET is not set
+# CONFIG_EFI_CUSTOM_SSDT_OVERLAYS is not set
+# CONFIG_EFI_DISABLE_PCI_DMA is not set
+# CONFIG_EFI_DISABLE_RUNTIME is not set
+CONFIG_EFI_DXE_MEM_ATTRIBUTES=y
+CONFIG_EFI_EARLYCON=y
+CONFIG_EFI_ESRT=y
+# CONFIG_EFI_FAKE_MEMMAP is not set
+CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
+# CONFIG_EFI_PGT_DUMP is not set
+# CONFIG_EFI_RCI2_TABLE is not set
+CONFIG_EFI_RUNTIME_MAP=y
+CONFIG_EFI_RUNTIME_WRAPPERS=y
+CONFIG_EFI_STUB=y
+# CONFIG_EFI_TEST is not set
+# CONFIG_EFI_VARS is not set
+# CONFIG_EL3 is not set
+CONFIG_FAILOVER=y
+CONFIG_FB=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CMDLINE=y
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_EFI=y
+CONFIG_FB_HYPERV=y
+# CONFIG_FB_I810 is not set
+CONFIG_FB_SIMPLE=y
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_FOPS=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+# CONFIG_FB_VESA is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_SUPPORT=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FREEZER=y
+CONFIG_FW_CACHE=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_GENERIC_PINCONF=y
+# CONFIG_GIGABYTE_WMI is not set
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_ACPI=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GUP_GET_PTE_LOW_HIGH=y
+CONFIG_HALTPOLL_CPUIDLE=y
+CONFIG_HDMI=y
+CONFIG_HIBERNATE_CALLBACKS=y
+CONFIG_HID_BATTERY_STRENGTH=y
+CONFIG_HID_GENERIC=y
+CONFIG_HID_HYPERV_MOUSE=y
+# CONFIG_HIGHMEM4G is not set
+CONFIG_HIGHMEM64G=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HOTPLUG_PCI=y
+CONFIG_HOTPLUG_PCI_ACPI=y
+# CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
+# CONFIG_HOTPLUG_PCI_COMPAQ is not set
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+# CONFIG_HOTPLUG_PCI_IBM is not set
+CONFIG_HOTPLUG_PCI_PCIE=y
+# CONFIG_HOTPLUG_PCI_SHPC is not set
+CONFIG_HOTPLUG_SMT=y
+CONFIG_HPET=y
+CONFIG_HPET_MMAP=y
+# CONFIG_HP_ACCEL is not set
+# CONFIG_HUAWEI_WMI is not set
+CONFIG_HVC_DRIVER=y
+CONFIG_HVC_IRQ=y
+CONFIG_HVC_XEN=y
+CONFIG_HVC_XEN_FRONTEND=y
+CONFIG_HWMON=y
+CONFIG_HWMON_VID=y
+CONFIG_HW_RANDOM_VIRTIO=y
+CONFIG_HYPERV=y
+CONFIG_HYPERVISOR_GUEST=y
+CONFIG_HYPERV_BALLOON=y
+CONFIG_HYPERV_KEYBOARD=y
+CONFIG_HYPERV_NET=y
+CONFIG_HYPERV_STORAGE=y
+# CONFIG_HYPERV_TESTING is not set
+CONFIG_HYPERV_TIMER=y
+CONFIG_HYPERV_UTILS=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_AMD_MP2 is not set
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_HID_ACPI is not set
+# CONFIG_I2C_MULTI_INSTANTIATE is not set
+# CONFIG_I8K is not set
+# CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
+CONFIG_INTEL_GTT=y
+CONFIG_INTEL_IDLE=y
+# CONFIG_INTEL_IPS is not set
+# CONFIG_INTEL_MEI_HDCP is not set
+# CONFIG_INTEL_MEI_PXP is not set
+# CONFIG_INTEL_MENLOW is not set
+CONFIG_INTEL_PCH_THERMAL=y
+# CONFIG_INTEL_SAR_INT1092 is not set
+# CONFIG_INTEL_SCU_PLATFORM is not set
+CONFIG_INTEL_SOC_DTS_IOSF_CORE=y
+CONFIG_INTEL_SOC_DTS_THERMAL=y
+# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
+# CONFIG_INTEL_WMI_THUNDERBOLT is not set
+CONFIG_INTERVAL_TREE=y
+CONFIG_IOSF_MBI=y
+# CONFIG_IOSF_MBI_DEBUG is not set
+CONFIG_IRQ_BYPASS_MANAGER=y
+CONFIG_ISA=y
+CONFIG_ISAPNP=y
+CONFIG_ISA_BUS_API=y
+# CONFIG_ISCSI_IBFT is not set
+CONFIG_ISO9660_FS=y
+# CONFIG_JOLIET is not set
+CONFIG_KCMP=y
+CONFIG_KVM=y
+CONFIG_KVM_AMD=y
+CONFIG_KVM_ASYNC_PF=y
+CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
+CONFIG_KVM_GUEST=y
+CONFIG_KVM_INTEL=y
+CONFIG_KVM_MMIO=y
+CONFIG_KVM_VFIO=y
+# CONFIG_KVM_XEN is not set
+CONFIG_KVM_XFER_TO_GUEST_WORK=y
+# CONFIG_LANCE is not set
+# CONFIG_LG_LAPTOP is not set
+CONFIG_LIBNVDIMM=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+# CONFIG_M686 is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_MEMORY_BALLOON=y
+CONFIG_MEMREGION=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_INTEL_LPSS=y
+CONFIG_MFD_INTEL_LPSS_ACPI=y
+# CONFIG_MFD_INTEL_PMC_BXT is not set
+# CONFIG_MIXCOMWD is not set
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_CQHCI=y
+CONFIG_MMC_RICOH_MMC=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_IO_ACCESSORS=y
+CONFIG_MMC_SDHCI_PCI=y
+# CONFIG_MMC_SDHCI_PLTFM is not set
+# CONFIG_MMC_WBSD is not set
+CONFIG_MMU_NOTIFIER=y
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_CYAPA is not set
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+# CONFIG_MOUSE_PS2_BYD is not set
+# CONFIG_MOUSE_PS2_CYPRESS is not set
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SMBUS=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_PS2_VMMOUSE is not set
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+CONFIG_MPENTIUM4=y
+# CONFIG_MSI_WMI is not set
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+# CONFIG_MXM_WMI is not set
+CONFIG_ND_BLK=y
+CONFIG_ND_BTT=y
+CONFIG_ND_CLAIM=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_FAILOVER=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NO_HZ=y
+CONFIG_NR_CPUS=4
+CONFIG_NR_CPUS_DEFAULT=8
+CONFIG_NR_CPUS_RANGE_BEGIN=2
+CONFIG_NR_CPUS_RANGE_END=8
+# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
+CONFIG_PADATA=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_REPORTING=y
+CONFIG_PAGE_TABLE_ISOLATION=y
+CONFIG_PARAVIRT=y
+CONFIG_PARAVIRT_CLOCK=y
+# CONFIG_PARAVIRT_DEBUG is not set
+CONFIG_PARAVIRT_SPINLOCKS=y
+CONFIG_PATA_AMD=y
+CONFIG_PATA_ATIIXP=y
+CONFIG_PATA_MPIIX=y
+CONFIG_PATA_OLDPIIX=y
+CONFIG_PATA_PLATFORM=y
+CONFIG_PATA_SC1200=y
+CONFIG_PATA_TIMINGS=y
+CONFIG_PATA_VIA=y
+# CONFIG_PCENGINES_APU2 is not set
+CONFIG_PCIEAER=y
+CONFIG_PCIEASPM=y
+CONFIG_PCIEASPM_DEFAULT=y
+# CONFIG_PCIEASPM_PERFORMANCE is not set
+# CONFIG_PCIEASPM_POWERSAVE is not set
+# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_PME=y
+CONFIG_PCI_MMCONFIG=y
+CONFIG_PCI_XEN=y
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_PEAQ_WMI is not set
+CONFIG_PGTABLE_LEVELS=3
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_ALDERLAKE=y
+CONFIG_PINCTRL_BAYTRAIL=y
+CONFIG_PINCTRL_BROXTON=y
+CONFIG_PINCTRL_CANNONLAKE=y
+CONFIG_PINCTRL_CHERRYVIEW=y
+CONFIG_PINCTRL_DENVERTON=y
+CONFIG_PINCTRL_ELKHARTLAKE=y
+CONFIG_PINCTRL_EMMITSBURG=y
+CONFIG_PINCTRL_GEMINILAKE=y
+CONFIG_PINCTRL_INTEL=y
+CONFIG_PINCTRL_JASPERLAKE=y
+CONFIG_PINCTRL_LAKEFIELD=y
+CONFIG_PINCTRL_LEWISBURG=y
+CONFIG_PINCTRL_LYNXPOINT=y
+CONFIG_PINCTRL_METEORLAKE=y
+CONFIG_PINCTRL_SUNRISEPOINT=y
+CONFIG_PINCTRL_TIGERLAKE=y
+CONFIG_PM=y
+# CONFIG_PMIC_OPREGION is not set
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_PNP=y
+CONFIG_PNPACPI=y
+# CONFIG_PNPBIOS is not set
+CONFIG_PNP_DEBUG_MESSAGES=y
+CONFIG_PPS=y
+CONFIG_PREEMPT_NOTIFIERS=y
+CONFIG_PROC_EVENTS=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_KVM=y
+CONFIG_PTP_1588_CLOCK_VMW=y
+CONFIG_PVH=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_RAS=y
+CONFIG_RELAY=y
+CONFIG_RELOCATABLE=y
+CONFIG_RESET_ATTACK_MITIGATION=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+# CONFIG_SAMSUNG_Q10 is not set
+CONFIG_SATA_AHCI=y
+CONFIG_SATA_VIA=y
+# CONFIG_SCHED_CORE is not set
+CONFIG_SCHED_INFO=y
+CONFIG_SCHED_SMT=y
+# CONFIG_SCSI_FDOMAIN_ISA is not set
+CONFIG_SCSI_VIRTIO=y
+# CONFIG_SENSORS_ASUS_EC is not set
+# CONFIG_SENSORS_ASUS_WMI is not set
+CONFIG_SENSORS_CORETEMP=y
+CONFIG_SENSORS_FAM15H_POWER=y
+CONFIG_SENSORS_I5500=y
+CONFIG_SENSORS_K8TEMP=y
+CONFIG_SENSORS_K10TEMP=y
+CONFIG_SENSORS_VIA_CPUTEMP=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
+CONFIG_SMP=y
+# CONFIG_SND_HDA_CTL_DEV_ID is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_SOC_AMD_ACP6x is not set
+# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
+# CONFIG_SND_SOC_AMD_PS is not set
+# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
+# CONFIG_SND_SOC_INTEL_AVS is not set
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+# CONFIG_SURFACE_PLATFORMS is not set
+CONFIG_SWIOTLB=y
+CONFIG_SYNC_FILE=y
+# CONFIG_SYSTEM76_ACPI is not set
+CONFIG_SYS_HYPERVISOR=y
+CONFIG_TASKSTATS=y
+CONFIG_TASK_DELAY_ACCT=y
+CONFIG_THERMAL_GOV_USER_SPACE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_WRITABLE_TRIPS=y
+# CONFIG_THINKPAD_LMI is not set
+# CONFIG_TOSHIBA_BT_RFKILL is not set
+# CONFIG_TOSHIBA_WMI is not set
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+# CONFIG_UCLAMP_TASK is not set
+CONFIG_UCS2_STRING=y
+CONFIG_USB_STORAGE=y
+CONFIG_USER_RETURN_NOTIFIER=y
+CONFIG_VHOST=y
+CONFIG_VHOST_IOTLB=y
+CONFIG_VHOST_NET=y
+# CONFIG_VIDEO_IPU3_CIO2 is not set
+CONFIG_VIRTIO=y
+CONFIG_VIRTIO_BALLOON=y
+CONFIG_VIRTIO_BLK=y
+CONFIG_VIRTIO_CONSOLE=y
+CONFIG_VIRTIO_DMA_SHARED_BUFFER=y
+CONFIG_VIRTIO_INPUT=y
+CONFIG_VIRTIO_MMIO=y
+CONFIG_VIRTIO_NET=y
+CONFIG_VIRTIO_PCI=y
+CONFIG_VIRTIO_PCI_LEGACY=y
+CONFIG_VIRTIO_PCI_LIB=y
+# CONFIG_VIRTIO_PMEM is not set
+CONFIG_VIRTUALIZATION=y
+CONFIG_VMAP_PFN=y
+CONFIG_VT_CONSOLE_SLEEP=y
+CONFIG_WATCHDOG_CORE=y
+# CONFIG_WDT is not set
+# CONFIG_WIRELESS_HOTKEY is not set
+# CONFIG_WMI_BMOF is not set
+CONFIG_X86_32_SMP=y
+CONFIG_X86_ACPI_CPUFREQ=y
+# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
+CONFIG_X86_AMD_FREQ_SENSITIVITY=y
+CONFIG_X86_AMD_PLATFORM_DEVICE=y
+CONFIG_X86_AMD_PSTATE=y
+# CONFIG_X86_AMD_PSTATE_UT is not set
+# CONFIG_X86_BIGSMP is not set
+CONFIG_X86_CPUID=y
+# CONFIG_X86_E_POWERSAVER is not set
+CONFIG_X86_HV_CALLBACK_VECTOR=y
+CONFIG_X86_INTEL_LPSS=y
+CONFIG_X86_INTEL_PSTATE=y
+CONFIG_X86_INTERNODE_CACHE_SHIFT=7
+CONFIG_X86_L1_CACHE_SHIFT=7
+# CONFIG_X86_LONGHAUL is not set
+CONFIG_X86_NEED_RELOCS=y
+CONFIG_X86_PAE=y
+# CONFIG_X86_PCC_CPUFREQ is not set
+CONFIG_X86_PKG_TEMP_THERMAL=y
+# CONFIG_X86_PMEM_LEGACY is not set
+CONFIG_X86_PM_TIMER=y
+# CONFIG_X86_POWERNOW_K8 is not set
+CONFIG_XEN=y
+CONFIG_XENFS=y
+CONFIG_XEN_ACPI=y
+CONFIG_XEN_AUTO_XLATE=y
+# CONFIG_XEN_BACKEND is not set
+CONFIG_XEN_BALLOON=y
+CONFIG_XEN_BLKDEV_FRONTEND=y
+CONFIG_XEN_COMPAT_XENFS=y
+CONFIG_XEN_DEBUG_FS=y
+CONFIG_XEN_DEV_EVTCHN=y
+CONFIG_XEN_FBDEV_FRONTEND=y
+CONFIG_XEN_GNTDEV=y
+CONFIG_XEN_GRANT_DEV_ALLOC=y
+CONFIG_XEN_NETDEV_FRONTEND=y
+CONFIG_XEN_PRIVCMD=y
+CONFIG_XEN_PVH=y
+CONFIG_XEN_PVHVM=y
+CONFIG_XEN_PVHVM_GUEST=y
+CONFIG_XEN_PVHVM_SMP=y
+CONFIG_XEN_SAVE_RESTORE=y
+CONFIG_XEN_SCSI_FRONTEND=y
+CONFIG_XEN_SYS_HYPERVISOR=y
+CONFIG_XEN_VIRTIO=y
+# CONFIG_XEN_VIRTIO_FORCE_GRANT is not set
+CONFIG_XEN_WDT=y
+CONFIG_XEN_XENBUS_FRONTEND=y
+# CONFIG_XIAOMI_WMI is not set
+CONFIG_XPS=y
+# CONFIG_YOGABOOK_WMI is not set
+CONFIG_ZLIB_DEFLATE=y
diff --git a/target/linux/x86/geode/config-6.1 b/target/linux/x86/geode/config-6.1
new file mode 100644
index 0000000000..cf02d2b9b0
--- /dev/null
+++ b/target/linux/x86/geode/config-6.1
@@ -0,0 +1,176 @@
+# CONFIG_3C515 is not set
+CONFIG_8139CP=y
+CONFIG_8139TOO=y
+CONFIG_8139TOO_8129=y
+CONFIG_8139TOO_PIO=y
+# CONFIG_8139TOO_TUNE_TWISTER is not set
+# CONFIG_8139_OLD_RX_RESET is not set
+# CONFIG_ACER_WMI is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=y
+# CONFIG_ACPI_BATTERY is not set
+# CONFIG_ACPI_CMPC is not set
+# CONFIG_ACPI_CONTAINER is not set
+CONFIG_ACPI_CPU_FREQ_PSS=y
+# CONFIG_ACPI_DEBUG is not set
+# CONFIG_ACPI_DEBUGGER is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_DPTF is not set
+# CONFIG_ACPI_EC_DEBUGFS is not set
+CONFIG_ACPI_FAN=y
+CONFIG_ACPI_HOTPLUG_IOAPIC=y
+CONFIG_ACPI_I2C_OPREGION=y
+CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
+# CONFIG_ACPI_PCI_SLOT is not set
+CONFIG_ACPI_PROCESSOR=y
+# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
+CONFIG_ACPI_PROCESSOR_CSTATE=y
+CONFIG_ACPI_PROCESSOR_IDLE=y
+CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
+# CONFIG_ACPI_SBS is not set
+CONFIG_ACPI_SPCR_TABLE=y
+CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_TINY_POWER_BUTTON is not set
+# CONFIG_ACPI_WMI is not set
+# CONFIG_ADV_SWBUTTON is not set
+CONFIG_ALIX=y
+# CONFIG_AMD_PMC is not set
+# CONFIG_AMD_PMF is not set
+CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
+# CONFIG_ASUS_TF103C_DOCK is not set
+# CONFIG_ATA_PIIX is not set
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CS5535_CLOCK_EVENT_SRC=y
+CONFIG_CS5535_MFGPT=y
+CONFIG_CS5535_MFGPT_DEFAULT_IRQ=7
+# CONFIG_CS89x0_ISA is not set
+CONFIG_DMA_ACPI=y
+# CONFIG_EL3 is not set
+CONFIG_GEODE_WDT=y
+CONFIG_GEOS=y
+# CONFIG_GIGABYTE_WMI is not set
+CONFIG_GPIO_ACPI=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_CS5535=y
+# CONFIG_HPET is not set
+# CONFIG_HP_ACCEL is not set
+CONFIG_HWMON=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_ALGOPCA=y
+CONFIG_I2C_ALGOPCF=y
+# CONFIG_I2C_AMD_MP2 is not set
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_HID_ACPI is not set
+# CONFIG_I2C_MULTI_INSTANTIATE is not set
+# CONFIG_I8K is not set
+# CONFIG_INTEL_IPS is not set
+# CONFIG_INTEL_MENLOW is not set
+# CONFIG_INTEL_SAR_INT1092 is not set
+# CONFIG_INTEL_SCU_PLATFORM is not set
+# CONFIG_INTEL_SOC_DTS_THERMAL is not set
+# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
+# CONFIG_INTEL_WMI_THUNDERBOLT is not set
+CONFIG_IOSF_MBI=y
+# CONFIG_IOSF_MBI_DEBUG is not set
+CONFIG_ISA=y
+# CONFIG_ISAPNP is not set
+CONFIG_ISA_BUS_API=y
+# CONFIG_ISCSI_IBFT is not set
+# CONFIG_LANCE is not set
+CONFIG_LEDS_GPIO=y
+# CONFIG_M686 is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_MFD_CORE=y
+CONFIG_MFD_CS5535=y
+# CONFIG_MFD_INTEL_LPSS_ACPI is not set
+# CONFIG_MFD_INTEL_PMC_BXT is not set
+CONFIG_MGEODEGX1=y
+# CONFIG_MIXCOMWD is not set
+# CONFIG_MSI_WMI is not set
+# CONFIG_MXM_WMI is not set
+CONFIG_NATSEMI=y
+CONFIG_NET5501=y
+CONFIG_NSC_GPIO=y
+# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
+CONFIG_PATA_CS5520=y
+CONFIG_PATA_CS5530=y
+CONFIG_PATA_CS5535=y
+CONFIG_PATA_CS5536=y
+CONFIG_PATA_SC1200=y
+CONFIG_PC8736x_GPIO=y
+# CONFIG_PCENGINES_APU2 is not set
+CONFIG_PCI_MMCONFIG=y
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_PEAQ_WMI is not set
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_ALDERLAKE is not set
+# CONFIG_PINCTRL_BAYTRAIL is not set
+# CONFIG_PINCTRL_BROXTON is not set
+# CONFIG_PINCTRL_CANNONLAKE is not set
+# CONFIG_PINCTRL_CHERRYVIEW is not set
+# CONFIG_PINCTRL_DENVERTON is not set
+# CONFIG_PINCTRL_ELKHARTLAKE is not set
+# CONFIG_PINCTRL_EMMITSBURG is not set
+# CONFIG_PINCTRL_GEMINILAKE is not set
+# CONFIG_PINCTRL_JASPERLAKE is not set
+# CONFIG_PINCTRL_LAKEFIELD is not set
+# CONFIG_PINCTRL_LEWISBURG is not set
+# CONFIG_PINCTRL_LYNXPOINT is not set
+# CONFIG_PINCTRL_METEORLAKE is not set
+# CONFIG_PINCTRL_SUNRISEPOINT is not set
+# CONFIG_PINCTRL_TIGERLAKE is not set
+# CONFIG_PMIC_OPREGION is not set
+CONFIG_PNP=y
+CONFIG_PNPACPI=y
+# CONFIG_PNPBIOS is not set
+CONFIG_PNP_DEBUG_MESSAGES=y
+CONFIG_RTC_I2C_AND_SPI=y
+# CONFIG_SAMSUNG_Q10 is not set
+CONFIG_SC1200_WDT=y
+# CONFIG_SCSI_FDOMAIN_ISA is not set
+CONFIG_SCx200_ACB=y
+CONFIG_SCx200_WDT=y
+# CONFIG_SENSORS_ASUS_EC is not set
+# CONFIG_SENSORS_ASUS_WMI is not set
+CONFIG_SENSORS_LM90=y
+CONFIG_SERIAL_8250_PNP=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
+# CONFIG_SND_HDA_CTL_DEV_ID is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_SOC_AMD_ACP6x is not set
+# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
+# CONFIG_SND_SOC_AMD_PS is not set
+# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
+# CONFIG_SND_SOC_INTEL_AVS is not set
+# CONFIG_SURFACE_PLATFORMS is not set
+# CONFIG_SYSTEM76_ACPI is not set
+# CONFIG_THINKPAD_LMI is not set
+# CONFIG_TOSHIBA_BT_RFKILL is not set
+# CONFIG_TOSHIBA_WMI is not set
+# CONFIG_USB_UHCI_HCD is not set
+CONFIG_VIA_RHINE=y
+CONFIG_VIA_RHINE_MMIO=y
+CONFIG_WATCHDOG_CORE=y
+# CONFIG_WDT is not set
+# CONFIG_WIRELESS_HOTKEY is not set
+# CONFIG_WMI_BMOF is not set
+# CONFIG_X86_ACPI_CPUFREQ is not set
+CONFIG_X86_ALIGNMENT_16=y
+# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
+# CONFIG_X86_AMD_PSTATE is not set
+# CONFIG_X86_AMD_PSTATE_UT is not set
+CONFIG_X86_CPUID=y
+# CONFIG_X86_E_POWERSAVER is not set
+CONFIG_X86_INTEL_LPSS=y
+# CONFIG_X86_LONGHAUL is not set
+# CONFIG_X86_MCE is not set
+CONFIG_X86_MINIMUM_CPU_FAMILY=5
+# CONFIG_X86_PCC_CPUFREQ is not set
+CONFIG_X86_PM_TIMER=y
+CONFIG_X86_REBOOTFIXUPS=y
+# CONFIG_XIAOMI_WMI is not set
+# CONFIG_YOGABOOK_WMI is not set
diff --git a/target/linux/x86/legacy/config-6.1 b/target/linux/x86/legacy/config-6.1
new file mode 100644
index 0000000000..efa1eabe82
--- /dev/null
+++ b/target/linux/x86/legacy/config-6.1
@@ -0,0 +1,262 @@
+# CONFIG_3C515 is not set
+# CONFIG_ACER_WMI is not set
+CONFIG_ACPI=y
+CONFIG_ACPI_AC=y
+CONFIG_ACPI_BATTERY=y
+CONFIG_ACPI_BUTTON=y
+# CONFIG_ACPI_CMPC is not set
+# CONFIG_ACPI_CONTAINER is not set
+CONFIG_ACPI_CPU_FREQ_PSS=y
+# CONFIG_ACPI_DEBUG is not set
+# CONFIG_ACPI_DEBUGGER is not set
+# CONFIG_ACPI_DOCK is not set
+# CONFIG_ACPI_DPTF is not set
+# CONFIG_ACPI_EC_DEBUGFS is not set
+# CONFIG_ACPI_FAN is not set
+CONFIG_ACPI_HOTPLUG_IOAPIC=y
+# CONFIG_ACPI_I2C_OPREGION is not set
+CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
+# CONFIG_ACPI_PCI_SLOT is not set
+CONFIG_ACPI_PROCESSOR=y
+# CONFIG_ACPI_PROCESSOR_AGGREGATOR is not set
+CONFIG_ACPI_PROCESSOR_CSTATE=y
+CONFIG_ACPI_PROCESSOR_IDLE=y
+CONFIG_ACPI_REV_OVERRIDE_POSSIBLE=y
+# CONFIG_ACPI_SBS is not set
+CONFIG_ACPI_SPCR_TABLE=y
+CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
+CONFIG_ACPI_THERMAL=y
+# CONFIG_ACPI_TOSHIBA is not set
+CONFIG_ACPI_VIDEO=y
+# CONFIG_ACPI_WMI is not set
+# CONFIG_ADV_SWBUTTON is not set
+CONFIG_AGP=y
+# CONFIG_AGP_ALI is not set
+# CONFIG_AGP_AMD is not set
+# CONFIG_AGP_AMD64 is not set
+# CONFIG_AGP_ATI is not set
+# CONFIG_AGP_EFFICEON is not set
+CONFIG_AGP_INTEL=y
+# CONFIG_AGP_NVIDIA is not set
+# CONFIG_AGP_SIS is not set
+# CONFIG_AGP_SWORKS is not set
+# CONFIG_AGP_VIA is not set
+# CONFIG_AMD_PMC is not set
+# CONFIG_AMD_PMF is not set
+CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
+# CONFIG_ASUS_TF103C_DOCK is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BLK_DEV_SR=y
+CONFIG_CDROM=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+# CONFIG_CS89x0_ISA is not set
+CONFIG_DMA_ACPI=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DRM=y
+CONFIG_DRM_AMDGPU=y
+# CONFIG_DRM_AMD_DC is not set
+CONFIG_DRM_BOCHS=y
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_FBDEV_EMULATION=y
+CONFIG_DRM_FBDEV_OVERALLOC=100
+CONFIG_DRM_I915=y
+CONFIG_DRM_I915_CAPTURE_ERROR=y
+CONFIG_DRM_I915_COMPRESS_ERROR=y
+# CONFIG_DRM_I915_DEBUG is not set
+# CONFIG_DRM_I915_DEBUG_GUC is not set
+# CONFIG_DRM_I915_DEBUG_MMIO is not set
+# CONFIG_DRM_I915_DEBUG_RUNTIME_PM is not set
+# CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
+CONFIG_DRM_I915_FENCE_TIMEOUT=10000
+CONFIG_DRM_I915_FORCE_PROBE=""
+CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
+# CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
+CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
+CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
+CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
+# CONFIG_DRM_I915_SELFTEST is not set
+CONFIG_DRM_I915_STOP_TIMEOUT=100
+# CONFIG_DRM_I915_SW_FENCE_CHECK_DAG is not set
+# CONFIG_DRM_I915_SW_FENCE_DEBUG_OBJECTS is not set
+CONFIG_DRM_I915_TIMESLICE_DURATION=1
+CONFIG_DRM_I915_USERFAULT_AUTOSUSPEND=250
+CONFIG_DRM_I915_USERPTR=y
+# CONFIG_DRM_I915_WERROR is not set
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_MIPI_DSI=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DRM_RADEON=y
+CONFIG_DRM_SCHED=y
+CONFIG_DRM_TTM=y
+CONFIG_DRM_TTM_HELPER=y
+CONFIG_DRM_VRAM_HELPER=y
+# CONFIG_EL3 is not set
+CONFIG_FB=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CMDLINE=y
+CONFIG_FB_DEFERRED_IO=y
+# CONFIG_FB_I810 is not set
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_FOPS=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+# CONFIG_FB_VESA is not set
+CONFIG_FONT_8x8=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_SUPPORT=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+# CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+# CONFIG_GIGABYTE_WMI is not set
+CONFIG_HDMI=y
+CONFIG_HID_BATTERY_STRENGTH=y
+# CONFIG_HIGHMEM4G is not set
+CONFIG_HPET=y
+CONFIG_HPET_MMAP=y
+# CONFIG_HP_ACCEL is not set
+# CONFIG_HUAWEI_WMI is not set
+CONFIG_HWMON=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+# CONFIG_I2C_AMD_MP2 is not set
+CONFIG_I2C_BOARDINFO=y
+# CONFIG_I2C_HID_ACPI is not set
+# CONFIG_I2C_MULTI_INSTANTIATE is not set
+# CONFIG_I8K is not set
+CONFIG_INPUT_MOUSE=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INTEL_GTT=y
+CONFIG_INTEL_IDLE=y
+# CONFIG_INTEL_IPS is not set
+# CONFIG_INTEL_MEI_HDCP is not set
+# CONFIG_INTEL_MEI_PXP is not set
+# CONFIG_INTEL_MENLOW is not set
+# CONFIG_INTEL_SAR_INT1092 is not set
+# CONFIG_INTEL_SCU_PLATFORM is not set
+# CONFIG_INTEL_SOC_DTS_THERMAL is not set
+# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
+# CONFIG_INTEL_WMI_THUNDERBOLT is not set
+CONFIG_INTERVAL_TREE=y
+CONFIG_IOSF_MBI=y
+# CONFIG_IOSF_MBI_DEBUG is not set
+CONFIG_ISA=y
+CONFIG_ISAPNP=y
+CONFIG_ISA_BUS_API=y
+# CONFIG_ISCSI_IBFT is not set
+CONFIG_ISO9660_FS=y
+# CONFIG_JOLIET is not set
+CONFIG_KCMP=y
+# CONFIG_LANCE is not set
+# CONFIG_LG_LAPTOP is not set
+CONFIG_M586MMX=y
+# CONFIG_M686 is not set
+# CONFIG_MDA_CONSOLE is not set
+CONFIG_MFD_CORE=y
+CONFIG_MFD_INTEL_LPSS=y
+CONFIG_MFD_INTEL_LPSS_ACPI=y
+# CONFIG_MFD_INTEL_PMC_BXT is not set
+# CONFIG_MIXCOMWD is not set
+CONFIG_MMU_NOTIFIER=y
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_CYAPA is not set
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+# CONFIG_MOUSE_PS2_BYD is not set
+# CONFIG_MOUSE_PS2_CYPRESS is not set
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+CONFIG_MOUSE_PS2_LIFEBOOK=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SMBUS=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MSI_WMI is not set
+# CONFIG_MXM_WMI is not set
+CONFIG_NOHIGHMEM=y
+CONFIG_NO_HZ=y
+# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
+CONFIG_PATA_AMD=y
+CONFIG_PATA_ATIIXP=y
+CONFIG_PATA_LEGACY=y
+CONFIG_PATA_MPIIX=y
+CONFIG_PATA_OLDPIIX=y
+CONFIG_PATA_PLATFORM=y
+CONFIG_PATA_SC1200=y
+CONFIG_PATA_SIS=y
+CONFIG_PATA_TIMINGS=y
+CONFIG_PATA_VIA=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEASPM=y
+CONFIG_PCIEASPM_DEFAULT=y
+# CONFIG_PCIEASPM_PERFORMANCE is not set
+# CONFIG_PCIEASPM_POWERSAVE is not set
+# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_MMCONFIG=y
+# CONFIG_PCWATCHDOG is not set
+# CONFIG_PEAQ_WMI is not set
+# CONFIG_PMIC_OPREGION is not set
+CONFIG_PNP=y
+CONFIG_PNPACPI=y
+# CONFIG_PNPBIOS is not set
+CONFIG_PNP_DEBUG_MESSAGES=y
+CONFIG_RAS=y
+CONFIG_RELAY=y
+CONFIG_RTC_I2C_AND_SPI=y
+# CONFIG_SAMSUNG_Q10 is not set
+CONFIG_SATA_AHCI=y
+# CONFIG_SCSI_FDOMAIN_ISA is not set
+# CONFIG_SENSORS_ASUS_EC is not set
+# CONFIG_SENSORS_ASUS_WMI is not set
+CONFIG_SERIAL_8250_PNP=y
+# CONFIG_SERIAL_MULTI_INSTANTIATE is not set
+# CONFIG_SND_HDA_CTL_DEV_ID is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_SOC_AMD_ACP6x is not set
+# CONFIG_SND_SOC_AMD_ACP_COMMON is not set
+# CONFIG_SND_SOC_AMD_PS is not set
+# CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
+# CONFIG_SND_SOC_INTEL_AVS is not set
+# CONFIG_SURFACE_PLATFORMS is not set
+CONFIG_SYNC_FILE=y
+# CONFIG_SYSTEM76_ACPI is not set
+# CONFIG_THINKPAD_LMI is not set
+# CONFIG_TOSHIBA_BT_RFKILL is not set
+# CONFIG_TOSHIBA_WMI is not set
+CONFIG_USB_STORAGE=y
+# CONFIG_VIDEO_IPU3_CIO2 is not set
+CONFIG_VMAP_PFN=y
+# CONFIG_WDT is not set
+# CONFIG_WIRELESS_HOTKEY is not set
+# CONFIG_WMI_BMOF is not set
+CONFIG_X86_ACPI_CPUFREQ=y
+# CONFIG_X86_ACPI_CPUFREQ_CPB is not set
+CONFIG_X86_ALIGNMENT_16=y
+# CONFIG_X86_AMD_FREQ_SENSITIVITY is not set
+# CONFIG_X86_AMD_PLATFORM_DEVICE is not set
+# CONFIG_X86_AMD_PSTATE is not set
+# CONFIG_X86_AMD_PSTATE_UT is not set
+# CONFIG_X86_E_POWERSAVER is not set
+CONFIG_X86_F00F_BUG=y
+# CONFIG_X86_INTEL_LPSS is not set
+# CONFIG_X86_LONGHAUL is not set
+CONFIG_X86_MINIMUM_CPU_FAMILY=5
+# CONFIG_X86_PAE is not set
+# CONFIG_X86_PCC_CPUFREQ is not set
+CONFIG_X86_PM_TIMER=y
+# CONFIG_X86_POWERNOW_K8 is not set
+# CONFIG_XIAOMI_WMI is not set
+# CONFIG_YOGABOOK_WMI is not set
+CONFIG_ZLIB_DEFLATE=y



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:26 -0400
Subject: [openwrt/openwrt]  x86: 6.6: set testing kernel
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23471.1712214298.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1e7033d188217d0c45cdf58508588e55e0adf6ed

commit 1e7033d188217d0c45cdf58508588e55e0adf6ed
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Wed Mar 13 01:37:54 2024 +0100

    x86: 6.6: set testing kernel
    
    Allow selecting 6.6 as testing kernel on x86.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/x86/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/x86/Makefile b/target/linux/x86/Makefile
index 39f0a6e825..b4ac2a5ec8 100644
--- a/target/linux/x86/Makefile
+++ b/target/linux/x86/Makefile
@@ -11,6 +11,7 @@ FEATURES:=squashfs ext4 vdi vmdk vhdx pcmcia targz fpu boot-part rootfs-part
 SUBTARGETS:=generic legacy geode 64
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 KERNELNAME:=bzImage
 



From lede-commits at lists.infradead.org  Wed Apr  3 23:56:25 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 02:56:25 -0400
Subject: [openwrt/openwrt]  x86: 6.6: refresh kernel config
In-Reply-To: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
References: <171221377520.139818.2028046964889914044@git-01.infra.openwrt.org>
Message-ID: <mailman.23472.1712214317.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2a86425de1076ca014f6a9c57980ae3112d50008

commit 2a86425de1076ca014f6a9c57980ae3112d50008
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Tue Apr 2 10:42:08 2024 +0200

    x86: 6.6: refresh kernel config
    
    Refresh kernel config.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/x86/64/config-6.6      | 109 +++++++++++++++++++++++++-----------
 target/linux/x86/config-6.6         |  33 ++++++-----
 target/linux/x86/generic/config-6.6 |  80 +++++++++++++++++---------
 target/linux/x86/geode/config-6.6   |  37 ++++--------
 target/linux/x86/legacy/config-6.6  |  44 ++++++++++-----
 5 files changed, 189 insertions(+), 114 deletions(-)

diff --git a/target/linux/x86/64/config-6.6 b/target/linux/x86/64/config-6.6
index 66ae3e35f0..ce4eb644db 100644
--- a/target/linux/x86/64/config-6.6
+++ b/target/linux/x86/64/config-6.6
@@ -15,6 +15,7 @@ CONFIG_ACPI_CPU_FREQ_PSS=y
 # CONFIG_ACPI_DPTF is not set
 # CONFIG_ACPI_EC_DEBUGFS is not set
 CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_FFH is not set
 # CONFIG_ACPI_FPDT is not set
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_HOTPLUG_IOAPIC=y
@@ -37,8 +38,10 @@ CONFIG_ACPI_SYSTEM_POWER_STATES_SUPPORT=y
 CONFIG_ACPI_THERMAL=y
 # CONFIG_ACPI_TOSHIBA is not set
 CONFIG_ACPI_VIDEO=y
+CONFIG_ACPI_VIOT=y
 # CONFIG_ACPI_WMI is not set
 # CONFIG_ACRN_GUEST is not set
+# CONFIG_ADDRESS_MASKING is not set
 # CONFIG_ADV_SWBUTTON is not set
 CONFIG_AGP=y
 # CONFIG_AGP_AMD64 is not set
@@ -46,24 +49,24 @@ CONFIG_AGP_INTEL=y
 # CONFIG_AGP_SIS is not set
 # CONFIG_AGP_VIA is not set
 # CONFIG_AMD_HSMP is not set
+# CONFIG_AMD_SFH_HID is not set
 CONFIG_AMD_IOMMU=y
 CONFIG_AMD_IOMMU_V2=y
-# CONFIG_AMD_PMC is not set
 # CONFIG_AMD_PMF is not set
 # CONFIG_AMD_PTDMA is not set
-# CONFIG_AMD_SFH_HID is not set
+CONFIG_APERTURE_HELPERS=y
 CONFIG_ARCH_CPUIDLE_HALTPOLL=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
 CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
 CONFIG_ARCH_MMAP_RND_BITS=28
 CONFIG_ARCH_MMAP_RND_BITS_MAX=32
 CONFIG_ARCH_MMAP_RND_BITS_MIN=28
-CONFIG_ARCH_NR_GPIO=1024
 CONFIG_ARCH_SPARSEMEM_DEFAULT=y
 CONFIG_ARCH_WANTS_THP_SWAP=y
 # CONFIG_ASUS_TF103C_DOCK is not set
 # CONFIG_ASUS_WMI is not set
 CONFIG_AUDIT_ARCH=y
+CONFIG_AUXILIARY_BUS=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BALLOON_COMPACTION=y
 CONFIG_BLK_DEV_BSGLIB=y
@@ -74,10 +77,16 @@ CONFIG_BLK_DEV_NVME=y
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_MQ_VIRTIO=y
 CONFIG_BLK_PM=y
-# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
+CONFIG_BOOT_VESA_SUPPORT=y
 CONFIG_BTT=y
+CONFIG_CALL_DEPTH_TRACKING=y
+CONFIG_CALL_PADDING=y
+CONFIG_CALL_THUNKS=y
+# CONFIG_CALL_THUNKS_DEBUG is not set
 CONFIG_CDROM=y
 CONFIG_CONNECTOR=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
 CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
 CONFIG_CPU_IBPB_ENTRY=y
@@ -86,9 +95,14 @@ CONFIG_CPU_IBRS_ENTRY=y
 CONFIG_CPU_RMAP=y
 CONFIG_CPU_SRSO=y
 CONFIG_CPU_UNRET_ENTRY=y
+CONFIG_CRC64=y
+CONFIG_CRC64_ROCKSOFT=y
 CONFIG_CRC_T10DIF=y
 CONFIG_CRYPTO_AES_NI_INTEL=y
+CONFIG_CRYPTO_ARCH_HAVE_LIB_BLAKE2S=y
 # CONFIG_CRYPTO_ARIA_AESNI_AVX_X86_64 is not set
+# CONFIG_CRYPTO_ARIA_AESNI_AVX2_X86_64 is not set
+# CONFIG_CRYPTO_ARIA_GFNI_AVX512_X86_64 is not set
 CONFIG_CRYPTO_BLAKE2S_X86=y
 # CONFIG_CRYPTO_BLOWFISH_X86_64 is not set
 # CONFIG_CRYPTO_CAMELLIA_AESNI_AVX_X86_64 is not set
@@ -96,12 +110,12 @@ CONFIG_CRYPTO_BLAKE2S_X86=y
 # CONFIG_CRYPTO_CAMELLIA_X86_64 is not set
 # CONFIG_CRYPTO_CAST5_AVX_X86_64 is not set
 # CONFIG_CRYPTO_CAST6_AVX_X86_64 is not set
+CONFIG_CRYPTO_CRC64_ROCKSOFT=y
 CONFIG_CRYPTO_CRCT10DIF=y
 # CONFIG_CRYPTO_CRCT10DIF_PCLMUL is not set
 CONFIG_CRYPTO_CRYPTD=y
 # CONFIG_CRYPTO_DES3_EDE_X86_64 is not set
 CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=11
 CONFIG_CRYPTO_LRW=y
 # CONFIG_CRYPTO_NHPOLY1305_AVX2 is not set
@@ -121,13 +135,18 @@ CONFIG_CRYPTO_SIMD=y
 # CONFIG_CRYPTO_TWOFISH_X86_64 is not set
 # CONFIG_CRYPTO_TWOFISH_X86_64_3WAY is not set
 CONFIG_CRYPTO_XTS=y
-# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
+CONFIG_DMAR_TABLE=y
 CONFIG_DMA_ACPI=y
 CONFIG_DMA_OPS=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DRM=y
 CONFIG_DRM_BOCHS=y
 CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_BUDDY=y
+CONFIG_DRM_DISPLAY_DP_HELPER=y
+CONFIG_DRM_DISPLAY_HDCP_HELPER=y
+CONFIG_DRM_DISPLAY_HDMI_HELPER=y
+CONFIG_DRM_DISPLAY_HELPER=y
 CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
 CONFIG_DRM_GEM_SHMEM_HELPER=y
@@ -142,11 +161,11 @@ CONFIG_DRM_I915_COMPRESS_ERROR=y
 # CONFIG_DRM_I915_DEBUG_VBLANK_EVADE is not set
 CONFIG_DRM_I915_FENCE_TIMEOUT=10000
 CONFIG_DRM_I915_FORCE_PROBE=""
-CONFIG_DRM_I915_GVT=y
 CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
 # CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
 CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
 CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
+CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
 CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
 # CONFIG_DRM_I915_SELFTEST is not set
 CONFIG_DRM_I915_STOP_TIMEOUT=100
@@ -164,7 +183,9 @@ CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
 CONFIG_DRM_TTM=y
 CONFIG_DRM_TTM_HELPER=y
 CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM_VIRTIO_GPU_KMS=y
 CONFIG_DRM_VRAM_HELPER=y
+CONFIG_DYNAMIC_PHYSICAL_MASK=y
 CONFIG_EFI=y
 CONFIG_EFIVAR_FS=m
 # CONFIG_EFI_BOOTLOADER_CONTROL is not set
@@ -177,7 +198,7 @@ CONFIG_EFI_DXE_MEM_ATTRIBUTES=y
 CONFIG_EFI_EARLYCON=y
 CONFIG_EFI_ESRT=y
 # CONFIG_EFI_FAKE_MEMMAP is not set
-CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
+CONFIG_EFI_HANDOVER_PROTOCOL=y
 # CONFIG_EFI_MIXED is not set
 # CONFIG_EFI_PGT_DUMP is not set
 # CONFIG_EFI_RCI2_TABLE is not set
@@ -186,18 +207,20 @@ CONFIG_EFI_RUNTIME_WRAPPERS=y
 # CONFIG_EFI_SECRET is not set
 CONFIG_EFI_STUB=y
 # CONFIG_EFI_TEST is not set
-# CONFIG_EFI_VARS is not set
 CONFIG_FAILOVER=y
 CONFIG_FB=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
+CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
 CONFIG_FB_EFI=y
 CONFIG_FB_HYPERV=y
+CONFIG_FB_IOMEM_HELPERS=y
 CONFIG_FB_MODE_HELPERS=y
 CONFIG_FB_SIMPLE=y
+CONFIG_FB_SYSMEM_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
 CONFIG_FB_SYS_COPYAREA=y
 CONFIG_FB_SYS_FILLRECT=y
 CONFIG_FB_SYS_FOPS=y
@@ -219,20 +242,23 @@ CONFIG_GENERIC_CPU=y
 CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
 CONFIG_GENERIC_IRQ_MIGRATION=y
 CONFIG_GENERIC_PENDING_IRQ=y
+CONFIG_GENERIC_PINCONF=y
 # CONFIG_GIGABYTE_WMI is not set
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_ACPI=y
-CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_ICH=y
 CONFIG_GPIO_SCH=y
+CONFIG_GUEST_PERF_EVENTS=y
 CONFIG_HALTPOLL_CPUIDLE=y
 CONFIG_HARDLOCKUP_CHECK_TIMESTAMP=y
 CONFIG_HDMI=y
 CONFIG_HIBERNATE_CALLBACKS=y
-CONFIG_HID_BATTERY_STRENGTH=y
-CONFIG_HID_GENERIC=y
 CONFIG_HID_HYPERV_MOUSE=y
+CONFIG_HOTPLUG_CORE_SYNC=y
+CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
+CONFIG_HOTPLUG_CORE_SYNC_FULL=y
 CONFIG_HOTPLUG_CPU=y
+CONFIG_HOTPLUG_PARALLEL=y
 CONFIG_HOTPLUG_PCI=y
 CONFIG_HOTPLUG_PCI_ACPI=y
 # CONFIG_HOTPLUG_PCI_ACPI_IBM is not set
@@ -240,9 +266,9 @@ CONFIG_HOTPLUG_PCI_ACPI=y
 # CONFIG_HOTPLUG_PCI_PCIE is not set
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 CONFIG_HOTPLUG_SMT=y
+CONFIG_HOTPLUG_SPLIT_STARTUP=y
 CONFIG_HPET=y
 CONFIG_HPET_MMAP=y
-# CONFIG_HP_ACCEL is not set
 # CONFIG_HUAWEI_WMI is not set
 CONFIG_HVC_DRIVER=y
 CONFIG_HVC_IRQ=y
@@ -264,13 +290,11 @@ CONFIG_HYPERV_STORAGE=y
 CONFIG_HYPERV_TIMER=y
 CONFIG_HYPERV_UTILS=y
 # CONFIG_HYPERV_VSOCKETS is not set
+# CONFIG_HYPERV_VTL_MODE is not set
 CONFIG_I2C=y
 CONFIG_I2C_ALGOBIT=y
 # CONFIG_I2C_AMD_MP2 is not set
 CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
 # CONFIG_IA32_EMULATION is not set
 CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
 # CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
@@ -279,21 +303,24 @@ CONFIG_INTEL_GTT=y
 CONFIG_INTEL_IDLE=y
 # CONFIG_INTEL_IDXD is not set
 # CONFIG_INTEL_IDXD_COMPAT is not set
+# CONFIG_INTEL_IFS is not set
 CONFIG_INTEL_IOMMU=y
 # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
 CONFIG_INTEL_IOMMU_FLOPPY_WA=y
+CONFIG_INTEL_IOMMU_PERF_EVENTS=y
 # CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set
 # CONFIG_INTEL_IOMMU_SVM is not set
 # CONFIG_INTEL_IPS is not set
+# CONFIG_INTEL_MEI_GSC_PROXY is not set
 # CONFIG_INTEL_MEI_HDCP is not set
 # CONFIG_INTEL_MEI_PXP is not set
-# CONFIG_INTEL_MENLOW is not set
 CONFIG_INTEL_PCH_THERMAL=y
 # CONFIG_INTEL_SAR_INT1092 is not set
 # CONFIG_INTEL_SCU_PLATFORM is not set
 CONFIG_INTEL_SOC_DTS_IOSF_CORE=y
 CONFIG_INTEL_SOC_DTS_THERMAL=y
 # CONFIG_INTEL_SPEED_SELECT_INTERFACE is not set
+CONFIG_INTEL_TCC=y
 CONFIG_INTEL_TDX_GUEST=y
 # CONFIG_INTEL_TURBO_MAX_3 is not set
 # CONFIG_INTEL_TXT is not set
@@ -301,7 +328,7 @@ CONFIG_INTEL_TDX_GUEST=y
 # CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
 # CONFIG_INTEL_WMI_THUNDERBOLT is not set
 CONFIG_INTERVAL_TREE=y
-CONFIG_IOASID=y
+# CONFIG_IOMMUFD is not set
 CONFIG_IOMMU_API=y
 # CONFIG_IOMMU_DEBUG is not set
 # CONFIG_IOMMU_DEBUGFS is not set
@@ -311,6 +338,7 @@ CONFIG_IOMMU_DEFAULT_DMA_LAZY=y
 CONFIG_IOMMU_DMA=y
 CONFIG_IOMMU_HELPER=y
 CONFIG_IOMMU_IOVA=y
+CONFIG_IOMMU_IO_PGTABLE=y
 CONFIG_IOMMU_SUPPORT=y
 CONFIG_IOSF_MBI=y
 # CONFIG_IOSF_MBI_DEBUG is not set
@@ -322,9 +350,9 @@ CONFIG_KALLSYMS_ABSOLUTE_PERCPU=y
 CONFIG_KCMP=y
 CONFIG_KVM_GUEST=y
 CONFIG_LEDS_GPIO=y
-# CONFIG_LEGACY_VSYSCALL_EMULATE is not set
 CONFIG_LEGACY_VSYSCALL_NONE=y
 # CONFIG_LEGACY_VSYSCALL_XONLY is not set
+# CONFIG_LENOVO_YMC is not set
 # CONFIG_LG_LAPTOP is not set
 CONFIG_LIBNVDIMM=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
@@ -351,13 +379,13 @@ CONFIG_MMC_SDHCI_PCI=y
 CONFIG_MMU_NOTIFIER=y
 CONFIG_MODULES_USE_ELF_RELA=y
 # CONFIG_MPSC is not set
+# CONFIG_MSI_EC is not set
 # CONFIG_MSI_WMI is not set
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 # CONFIG_MXM_WMI is not set
-CONFIG_ND_BLK=y
-CONFIG_ND_BTT=y
 CONFIG_ND_CLAIM=y
 CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SG_DMA_FLAGS=y
 CONFIG_NET_FAILOVER=y
 CONFIG_NET_FLOW_LIMIT=y
 CONFIG_NET_PTP_CLASSIFY=y
@@ -370,9 +398,10 @@ CONFIG_NR_CPUS_RANGE_END=512
 CONFIG_NVME_CORE=y
 CONFIG_NVME_HWMON=y
 CONFIG_NVME_MULTIPATH=y
+CONFIG_OBJTOOL=y
 CONFIG_OUTPUT_FORMAT="elf64-x86-64"
+CONFIG_P2SB=y
 CONFIG_PADATA=y
-CONFIG_PAGE_POOL=y
 CONFIG_PAGE_REPORTING=y
 CONFIG_PAGE_TABLE_ISOLATION=y
 CONFIG_PARAVIRT=y
@@ -384,11 +413,9 @@ CONFIG_PATA_AMD=y
 CONFIG_PATA_ATIIXP=y
 CONFIG_PATA_MPIIX=y
 CONFIG_PATA_OLDPIIX=y
-CONFIG_PATA_PLATFORM=y
 CONFIG_PATA_TIMINGS=y
 CONFIG_PATA_VIA=y
 CONFIG_PCC=y
-# CONFIG_PCENGINES_APU2 is not set
 CONFIG_PCIEAER=y
 CONFIG_PCIEASPM=y
 CONFIG_PCIEASPM_DEFAULT=y
@@ -400,8 +427,10 @@ CONFIG_PCIE_PME=y
 CONFIG_PCI_HYPERV=y
 CONFIG_PCI_HYPERV_INTERFACE=y
 # CONFIG_PCI_MMCONFIG is not set
+CONFIG_PCI_PASID=y
+CONFIG_PCI_PRI=y
 CONFIG_PCI_XEN=y
-# CONFIG_PEAQ_WMI is not set
+CONFIG_PER_VMA_LOCK=y
 CONFIG_PGTABLE_LEVELS=4
 CONFIG_PHYSICAL_ALIGN=0x1000000
 CONFIG_PHYS_ADDR_T_64BIT=y
@@ -432,6 +461,7 @@ CONFIG_PNP=y
 CONFIG_PNPACPI=y
 CONFIG_PNP_DEBUG_MESSAGES=y
 CONFIG_PPS=y
+CONFIG_PREFIX_SYMBOLS=y
 CONFIG_PROC_EVENTS=y
 CONFIG_PTP_1588_CLOCK=y
 CONFIG_PTP_1588_CLOCK_KVM=y
@@ -455,22 +485,27 @@ CONFIG_SCHED_MC_PRIO=y
 CONFIG_SCHED_SMT=y
 CONFIG_SCSI_SAS_ATTRS=y
 CONFIG_SCSI_VIRTIO=y
+# CONFIG_SEL3350_PLATFORM is not set
 # CONFIG_SENSORS_ASUS_EC is not set
 # CONFIG_SENSORS_ASUS_WMI is not set
 CONFIG_SENSORS_CORETEMP=y
 CONFIG_SENSORS_FAM15H_POWER=y
+# CONFIG_SENSORS_HP_WMI is not set
 CONFIG_SENSORS_I5500=y
-CONFIG_SENSORS_K8TEMP=y
 CONFIG_SENSORS_K10TEMP=y
+CONFIG_SENSORS_K8TEMP=y
+# CONFIG_SENSORS_OXP is not set
 CONFIG_SENSORS_VIA_CPUTEMP=y
 CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_MCTRL_GPIO=y
 # CONFIG_SERIAL_MULTI_INSTANTIATE is not set
 CONFIG_SLS=y
 CONFIG_SMP=y
 # CONFIG_SND_HDA_CTL_DEV_ID is not set
 # CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
 # CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set
+# CONFIG_SND_HDA_SCODEC_TAS2781_I2C is not set
 # CONFIG_SND_SOC_AMD_ACP6x is not set
 # CONFIG_SND_SOC_AMD_ACP_COMMON is not set
 # CONFIG_SND_SOC_AMD_PS is not set
@@ -479,16 +514,17 @@ CONFIG_SMP=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
 CONFIG_SPARSEMEM=y
 CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_MANUAL=y
 # CONFIG_SPARSEMEM_VMEMMAP is not set
 CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
 CONFIG_STACK_VALIDATION=y
-# CONFIG_SURFACE_PLATFORMS is not set
 CONFIG_SWIOTLB=y
 CONFIG_SWIOTLB_XEN=y
 CONFIG_SYNC_FILE=y
+CONFIG_SYSFB=y
 # CONFIG_SYSTEM76_ACPI is not set
 CONFIG_SYS_HYPERVISOR=y
+# CONFIG_TDX_GUEST_DRIVER is not set
+CONFIG_THERMAL_ACPI=y
 CONFIG_THERMAL_GOV_USER_SPACE=y
 CONFIG_THERMAL_HWMON=y
 CONFIG_THERMAL_WRITABLE_TRIPS=y
@@ -500,10 +536,14 @@ CONFIG_TREE_SRCU=y
 # CONFIG_UACCE is not set
 # CONFIG_UCLAMP_TASK is not set
 CONFIG_UCS2_STRING=y
+CONFIG_UNACCEPTED_MEMORY=y
 # CONFIG_UNWINDER_ORC is not set
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_CMDLINE=y
 # CONFIG_VIDEO_IPU3_CIO2 is not set
+CONFIG_VIDEO_NOMODESET=y
 CONFIG_VIRTIO=y
+CONFIG_VIRTIO_ANCHOR=y
 CONFIG_VIRTIO_BALLOON=y
 CONFIG_VIRTIO_BLK=y
 CONFIG_VIRTIO_CONSOLE=y
@@ -515,6 +555,7 @@ CONFIG_VIRTIO_NET=y
 CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_PCI_LEGACY=y
 CONFIG_VIRTIO_PCI_LIB=y
+CONFIG_VIRTIO_PCI_LIB_LEGACY=y
 # CONFIG_VIRTIO_PMEM is not set
 # CONFIG_VIRTIO_VSOCKETS is not set
 CONFIG_VIRTIO_VSOCKETS_COMMON=y
@@ -542,6 +583,7 @@ CONFIG_X86_ACPI_CPUFREQ=y
 CONFIG_X86_AMD_FREQ_SENSITIVITY=y
 CONFIG_X86_AMD_PLATFORM_DEVICE=y
 CONFIG_X86_AMD_PSTATE=y
+CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3
 # CONFIG_X86_AMD_PSTATE_UT is not set
 CONFIG_X86_CPUID=y
 CONFIG_X86_DIRECT_GBPAGES=y
@@ -550,15 +592,16 @@ CONFIG_X86_INTEL_LPSS=y
 # CONFIG_X86_INTEL_MEMORY_PROTECTION_KEYS is not set
 CONFIG_X86_INTEL_PSTATE=y
 # CONFIG_X86_KERNEL_IBT is not set
+CONFIG_X86_MEM_ENCRYPT=y
 CONFIG_X86_MINIMUM_CPU_FAMILY=64
 # CONFIG_X86_PCC_CPUFREQ is not set
 CONFIG_X86_PKG_TEMP_THERMAL=y
 # CONFIG_X86_PMEM_LEGACY is not set
 CONFIG_X86_PM_TIMER=y
 # CONFIG_X86_POWERNOW_K8 is not set
+# CONFIG_X86_USER_SHADOW_STACK is not set
 # CONFIG_X86_VSYSCALL_EMULATION is not set
 CONFIG_X86_X2APIC=y
-# CONFIG_X86_X32 is not set
 # CONFIG_X86_X32_ABI is not set
 CONFIG_XEN=y
 CONFIG_XENFS=y
@@ -577,12 +620,14 @@ CONFIG_XEN_EFI=y
 CONFIG_XEN_FBDEV_FRONTEND=y
 CONFIG_XEN_GNTDEV=y
 CONFIG_XEN_GRANT_DEV_ALLOC=y
+CONFIG_XEN_GRANT_DMA_OPS=y
 CONFIG_XEN_HAVE_PVMMU=y
 CONFIG_XEN_HAVE_VPMU=y
 # CONFIG_XEN_MCE_LOG is not set
 CONFIG_XEN_NETDEV_FRONTEND=y
 CONFIG_XEN_PCIDEV_FRONTEND=y
 CONFIG_XEN_PRIVCMD=y
+# CONFIG_XEN_PRIVCMD_IRQFD is not set
 CONFIG_XEN_PV=y
 CONFIG_XEN_PVH=y
 CONFIG_XEN_PVHVM=y
@@ -601,6 +646,6 @@ CONFIG_XEN_WDT=y
 CONFIG_XEN_XENBUS_FRONTEND=y
 # CONFIG_XIAOMI_WMI is not set
 CONFIG_XPS=y
-# CONFIG_YOGABOOK_WMI is not set
+# CONFIG_YOGABOOK is not set
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZONE_DMA32=y
diff --git a/target/linux/x86/config-6.6 b/target/linux/x86/config-6.6
index ab693448ad..77d07482b3 100644
--- a/target/linux/x86/config-6.6
+++ b/target/linux/x86/config-6.6
@@ -2,6 +2,7 @@
 # CONFIG_64BIT is not set
 # CONFIG_ACPI is not set
 # CONFIG_ACQUIRE_WDT is not set
+# CONFIG_ADVANTECH_EC_WDT is not set
 # CONFIG_ADVANTECH_WDT is not set
 # CONFIG_ALIM1535_WDT is not set
 # CONFIG_ALIX is not set
@@ -14,7 +15,6 @@ CONFIG_ARCH_MAY_HAVE_PC_FDC=y
 CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
 CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
 CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
-CONFIG_ARCH_NR_GPIO=512
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SPLIT_ARG64=y
@@ -31,6 +31,7 @@ CONFIG_BLK_DEV_LOOP=y
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_BOUNCE=y
+CONFIG_BUFFER_HEAD=y
 CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
 CONFIG_CC_NO_ARRAY_BOUNDS=y
 CONFIG_CLKBLD_I8253=y
@@ -70,15 +71,16 @@ CONFIG_CPU_SUP_UMC_32=y
 CONFIG_CPU_SUP_VORTEX_32=y
 CONFIG_CPU_SUP_ZHAOXIN=y
 CONFIG_CRASH_CORE=y
+# CONFIG_CRASH_HOTPLUG is not set
 CONFIG_CRC16=y
 CONFIG_CRYPTO_CRC32=y
 CONFIG_CRYPTO_CRC32C=y
 # CONFIG_CRYPTO_CRC32_PCLMUL is not set
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG2=y
 # CONFIG_CRYPTO_SERPENT_SSE2_586 is not set
 # CONFIG_CX_ECAT is not set
 CONFIG_DCACHE_WORD_ACCESS=y
@@ -97,8 +99,8 @@ CONFIG_DMI=y
 CONFIG_DMIID=y
 CONFIG_DMI_SCAN_MACHINE_NON_EFI_FALLBACK=y
 CONFIG_DMI_SYSFS=y
-# CONFIG_DM_AUDIT is not set
 CONFIG_DNOTIFY=y
+# CONFIG_DRM_I915_GVT_KVMGT is not set
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_DYNAMIC_SIGFRAME=y
 CONFIG_EARLY_PRINTK=y
@@ -106,7 +108,6 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
 # CONFIG_EDD is not set
-CONFIG_EFI_HANDOVER_PROTOCOL=y
 # CONFIG_EISA is not set
 # CONFIG_EUROTECH_WDT is not set
 # CONFIG_EXAR_WDT is not set
@@ -119,6 +120,10 @@ CONFIG_FIX_EARLYCON_MEM=y
 CONFIG_FRAME_POINTER=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
+CONFIG_FUNCTION_ALIGNMENT=16
+CONFIG_FUNCTION_ALIGNMENT_16B=y
+CONFIG_FUNCTION_PADDING_BYTES=16
+CONFIG_FUNCTION_PADDING_CFI=11
 CONFIG_FUSION=y
 # CONFIG_FUSION_CTL is not set
 # CONFIG_FUSION_LOGGING is not set
@@ -127,6 +132,7 @@ CONFIG_FUSION_SPI=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 # CONFIG_GDS_FORCE_MITIGATION is not set
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
@@ -145,7 +151,6 @@ CONFIG_GENERIC_IRQ_RESERVATION_MODE=y
 CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_STRNCPY_FROM_USER=y
@@ -155,12 +160,13 @@ CONFIG_GENERIC_VDSO_32=y
 # CONFIG_GEOS is not set
 CONFIG_GLOB=y
 CONFIG_GPIO_CDEV=y
+# CONFIG_GPIO_ELKHARTLAKE is not set
 # CONFIG_HANGCHECK_TIMER is not set
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HID=y
 CONFIG_HIGHMEM=y
 CONFIG_HIGHMEM4G=y
 # CONFIG_HIGHMEM64G is not set
@@ -212,6 +218,7 @@ CONFIG_KEXEC=y
 CONFIG_KEXEC_CORE=y
 CONFIG_KEYBOARD_ATKBD=y
 CONFIG_KMAP_LOCAL=y
+# CONFIG_KVM_PROVE_MMU is not set
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 # CONFIG_M486 is not set
 # CONFIG_M486SX is not set
@@ -226,13 +233,10 @@ CONFIG_M686=y
 # CONFIG_MCYRIXIII is not set
 # CONFIG_MEFFICEON is not set
 # CONFIG_MELAN is not set
-CONFIG_MEMFD_CREATE=y
 # CONFIG_MFD_INTEL_LPSS_PCI is not set
 # CONFIG_MGEODEGX1 is not set
 # CONFIG_MGEODE_LX is not set
 CONFIG_MICROCODE=y
-CONFIG_MICROCODE_AMD=y
-CONFIG_MICROCODE_INTEL=y
 CONFIG_MICROCODE_LATE_LOADING=y
 CONFIG_MIGRATION=y
 CONFIG_MITIGATION_RFDS=y
@@ -240,6 +244,7 @@ CONFIG_MITIGATION_RFDS=y
 # CONFIG_MK7 is not set
 # CONFIG_MK8 is not set
 CONFIG_MMU_GATHER_MERGE_VMAS=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 # CONFIG_MODIFY_LDT_SYSCALL is not set
 CONFIG_MODULES_TREE_LOOKUP=y
 CONFIG_MODULES_USE_ELF_REL=y
@@ -262,6 +267,7 @@ CONFIG_NEED_SG_DMA_LENGTH=y
 # CONFIG_NET5501 is not set
 # CONFIG_NET_NS is not set
 CONFIG_NLS=y
+# CONFIG_NMI_CHECK_CPU is not set
 # CONFIG_NOHIGHMEM is not set
 CONFIG_NR_CPUS=1
 CONFIG_NR_CPUS_DEFAULT=1
@@ -274,7 +280,6 @@ CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 # CONFIG_OLPC is not set
 CONFIG_OUTPUT_FORMAT="elf32-i386"
-# CONFIG_P2SB is not set
 CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
@@ -296,7 +301,6 @@ CONFIG_PCI_IOV=y
 CONFIG_PCI_LABEL=y
 CONFIG_PCI_LOCKLESS_CONFIG=y
 CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PCSPKR_PLATFORM=y
 CONFIG_PERF_EVENTS=y
 # CONFIG_PERF_EVENTS_AMD_BRS is not set
@@ -338,6 +342,7 @@ CONFIG_SCx200HR_TIMER=y
 # CONFIG_SCx200_GPIO is not set
 # CONFIG_SCx200_WDT is not set
 CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_PCILIB=y
 # CONFIG_SERIAL_LANTIQ is not set
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIO=y
@@ -352,7 +357,7 @@ CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
 CONFIG_SPECULATION_MITIGATIONS=y
-CONFIG_SRCU=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set
 # CONFIG_STRICT_SIGALTSTACK_SIZE is not set
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
@@ -366,6 +371,7 @@ CONFIG_THERMAL_GOV_STEP_WISE=y
 CONFIG_THREAD_INFO_IN_TASK=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TINY_SRCU=y
+CONFIG_TOOLS_SUPPORT_RELR=y
 # CONFIG_TOSHIBA is not set
 # CONFIG_TQMX86_WDT is not set
 CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
@@ -377,8 +383,6 @@ CONFIG_USB_COMMON=y
 CONFIG_USB_EHCI_HCD=y
 # CONFIG_USB_EHCI_HCD_PLATFORM is not set
 CONFIG_USB_EHCI_PCI=y
-CONFIG_USB_HID=y
-CONFIG_USB_HIDDEV=y
 CONFIG_USB_OHCI_HCD=y
 CONFIG_USB_OHCI_HCD_PCI=y
 # CONFIG_USB_OHCI_HCD_PLATFORM is not set
@@ -413,7 +417,6 @@ CONFIG_X86_DEBUGCTLMSR=y
 # CONFIG_X86_DEBUG_FPU is not set
 # CONFIG_X86_DECODER_SELFTEST is not set
 # CONFIG_X86_EXTENDED_PLATFORM is not set
-CONFIG_X86_FEATURE_NAMES=y
 CONFIG_X86_GENERIC=y
 # CONFIG_X86_GX_SUSPMOD is not set
 # CONFIG_X86_INTEL_PSTATE is not set
diff --git a/target/linux/x86/generic/config-6.6 b/target/linux/x86/generic/config-6.6
index b7c79de273..698f3bbe4d 100644
--- a/target/linux/x86/generic/config-6.6
+++ b/target/linux/x86/generic/config-6.6
@@ -14,6 +14,7 @@ CONFIG_ACPI_CPU_FREQ_PSS=y
 # CONFIG_ACPI_DPTF is not set
 # CONFIG_ACPI_EC_DEBUGFS is not set
 # CONFIG_ACPI_FAN is not set
+# CONFIG_ACPI_FFH is not set
 CONFIG_ACPI_HOTPLUG_CPU=y
 CONFIG_ACPI_HOTPLUG_IOAPIC=y
 # CONFIG_ACPI_I2C_OPREGION is not set
@@ -44,36 +45,43 @@ CONFIG_AGP_INTEL=y
 # CONFIG_AGP_SIS is not set
 # CONFIG_AGP_SWORKS is not set
 # CONFIG_AGP_VIA is not set
-# CONFIG_AMD_PMC is not set
 # CONFIG_AMD_PMF is not set
+CONFIG_APERTURE_HELPERS=y
 # CONFIG_APM is not set
 CONFIG_ARCH_CPUIDLE_HALTPOLL=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
 CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
 # CONFIG_ASUS_TF103C_DOCK is not set
 # CONFIG_ASUS_WMI is not set
+CONFIG_AUXILIARY_BUS=y
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BALLOON_COMPACTION=y
 CONFIG_BLK_DEV_SR=y
 CONFIG_BLK_MQ_VIRTIO=y
 CONFIG_BLK_PM=y
-# CONFIG_BOOTPARAM_HOTPLUG_CPU0 is not set
+CONFIG_BOOT_VESA_SUPPORT=y
 CONFIG_BTT=y
 CONFIG_CDROM=y
 CONFIG_CONNECTOR=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
 CONFIG_CPU_FREQ_DEFAULT_GOV_SCHEDUTIL=y
 CONFIG_CPU_FREQ_GOV_SCHEDUTIL=y
 # CONFIG_CPU_IDLE_GOV_HALTPOLL is not set
 CONFIG_CPU_IDLE_GOV_MENU=y
 CONFIG_CPU_RMAP=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 # CONFIG_CS89x0_ISA is not set
-# CONFIG_DEBUG_HOTPLUG_CPU0 is not set
 CONFIG_DMA_ACPI=y
+CONFIG_DMA_OPS=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DRM=y
 CONFIG_DRM_BOCHS=y
 CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_BUDDY=y
+CONFIG_DRM_DISPLAY_DP_HELPER=y
+CONFIG_DRM_DISPLAY_HDCP_HELPER=y
+CONFIG_DRM_DISPLAY_HDMI_HELPER=y
+CONFIG_DRM_DISPLAY_HELPER=y
 CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
 CONFIG_DRM_GEM_SHMEM_HELPER=y
@@ -92,6 +100,7 @@ CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
 # CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
 CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
 CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
+CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
 CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
 # CONFIG_DRM_I915_SELFTEST is not set
 CONFIG_DRM_I915_STOP_TIMEOUT=100
@@ -109,6 +118,7 @@ CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
 CONFIG_DRM_TTM=y
 CONFIG_DRM_TTM_HELPER=y
 CONFIG_DRM_VIRTIO_GPU=y
+CONFIG_DRM_VIRTIO_GPU_KMS=y
 CONFIG_DRM_VRAM_HELPER=y
 CONFIG_EFI=y
 CONFIG_EFIVAR_FS=m
@@ -123,26 +133,28 @@ CONFIG_EFI_DXE_MEM_ATTRIBUTES=y
 CONFIG_EFI_EARLYCON=y
 CONFIG_EFI_ESRT=y
 # CONFIG_EFI_FAKE_MEMMAP is not set
-CONFIG_EFI_GENERIC_STUB_INITRD_CMDLINE_LOADER=y
+CONFIG_EFI_HANDOVER_PROTOCOL=y
 # CONFIG_EFI_PGT_DUMP is not set
 # CONFIG_EFI_RCI2_TABLE is not set
 CONFIG_EFI_RUNTIME_MAP=y
 CONFIG_EFI_RUNTIME_WRAPPERS=y
 CONFIG_EFI_STUB=y
 # CONFIG_EFI_TEST is not set
-# CONFIG_EFI_VARS is not set
 # CONFIG_EL3 is not set
 CONFIG_FAILOVER=y
 CONFIG_FB=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
+CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
 CONFIG_FB_EFI=y
 CONFIG_FB_HYPERV=y
 # CONFIG_FB_I810 is not set
+CONFIG_FB_IOMEM_HELPERS=y
 CONFIG_FB_SIMPLE=y
+CONFIG_FB_SYSMEM_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
 CONFIG_FB_SYS_COPYAREA=y
 CONFIG_FB_SYS_FILLRECT=y
 CONFIG_FB_SYS_FOPS=y
@@ -163,16 +175,17 @@ CONFIG_GENERIC_PINCONF=y
 # CONFIG_GIGABYTE_WMI is not set
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_ACPI=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GUP_GET_PTE_LOW_HIGH=y
+CONFIG_GUEST_PERF_EVENTS=y
+CONFIG_GUP_GET_PXX_LOW_HIGH=y
 CONFIG_HALTPOLL_CPUIDLE=y
 CONFIG_HDMI=y
 CONFIG_HIBERNATE_CALLBACKS=y
-CONFIG_HID_BATTERY_STRENGTH=y
-CONFIG_HID_GENERIC=y
 CONFIG_HID_HYPERV_MOUSE=y
 # CONFIG_HIGHMEM4G is not set
 CONFIG_HIGHMEM64G=y
+CONFIG_HOTPLUG_CORE_SYNC=y
+CONFIG_HOTPLUG_CORE_SYNC_DEAD=y
+CONFIG_HOTPLUG_CORE_SYNC_FULL=y
 CONFIG_HOTPLUG_CPU=y
 CONFIG_HOTPLUG_PCI=y
 CONFIG_HOTPLUG_PCI_ACPI=y
@@ -183,9 +196,9 @@ CONFIG_HOTPLUG_PCI_ACPI=y
 CONFIG_HOTPLUG_PCI_PCIE=y
 # CONFIG_HOTPLUG_PCI_SHPC is not set
 CONFIG_HOTPLUG_SMT=y
+CONFIG_HOTPLUG_SPLIT_STARTUP=y
 CONFIG_HPET=y
 CONFIG_HPET_MMAP=y
-# CONFIG_HP_ACCEL is not set
 # CONFIG_HUAWEI_WMI is not set
 CONFIG_HVC_DRIVER=y
 CONFIG_HVC_IRQ=y
@@ -207,9 +220,6 @@ CONFIG_I2C=y
 CONFIG_I2C_ALGOBIT=y
 # CONFIG_I2C_AMD_MP2 is not set
 CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
 # CONFIG_IMA_SECURE_AND_OR_TRUSTED_BOOT is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_INPUT_MOUSEDEV=y
@@ -220,14 +230,15 @@ CONFIG_INPUT_XEN_KBDDEV_FRONTEND=y
 CONFIG_INTEL_GTT=y
 CONFIG_INTEL_IDLE=y
 # CONFIG_INTEL_IPS is not set
+# CONFIG_INTEL_MEI_GSC_PROXY is not set
 # CONFIG_INTEL_MEI_HDCP is not set
 # CONFIG_INTEL_MEI_PXP is not set
-# CONFIG_INTEL_MENLOW is not set
 CONFIG_INTEL_PCH_THERMAL=y
 # CONFIG_INTEL_SAR_INT1092 is not set
 # CONFIG_INTEL_SCU_PLATFORM is not set
 CONFIG_INTEL_SOC_DTS_IOSF_CORE=y
 CONFIG_INTEL_SOC_DTS_THERMAL=y
+CONFIG_INTEL_TCC=y
 # CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
 # CONFIG_INTEL_WMI_THUNDERBOLT is not set
 CONFIG_INTERVAL_TREE=y
@@ -245,13 +256,16 @@ CONFIG_KVM=y
 CONFIG_KVM_AMD=y
 CONFIG_KVM_ASYNC_PF=y
 CONFIG_KVM_GENERIC_DIRTYLOG_READ_PROTECT=y
+CONFIG_KVM_GENERIC_HARDWARE_ENABLING=y
 CONFIG_KVM_GUEST=y
 CONFIG_KVM_INTEL=y
 CONFIG_KVM_MMIO=y
+# CONFIG_KVM_PROVE_MMU is not set
+CONFIG_KVM_SMM=y
 CONFIG_KVM_VFIO=y
-# CONFIG_KVM_XEN is not set
 CONFIG_KVM_XFER_TO_GUEST_WORK=y
 # CONFIG_LANCE is not set
+# CONFIG_LENOVO_YMC is not set
 # CONFIG_LG_LAPTOP is not set
 CONFIG_LIBNVDIMM=y
 CONFIG_LOCK_SPIN_ON_OWNER=y
@@ -292,16 +306,18 @@ CONFIG_MOUSE_PS2_TRACKPOINT=y
 # CONFIG_MOUSE_SERIAL is not set
 # CONFIG_MOUSE_VSXXXAA is not set
 CONFIG_MPENTIUM4=y
+# CONFIG_MSI_EC is not set
 # CONFIG_MSI_WMI is not set
 CONFIG_MUTEX_SPIN_ON_OWNER=y
 # CONFIG_MXM_WMI is not set
-CONFIG_ND_BLK=y
-CONFIG_ND_BTT=y
 CONFIG_ND_CLAIM=y
 CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_EGRESS=y
 CONFIG_NET_FAILOVER=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_XGRESS=y
 CONFIG_NO_HZ=y
 CONFIG_NR_CPUS=4
 CONFIG_NR_CPUS_DEFAULT=8
@@ -309,7 +325,6 @@ CONFIG_NR_CPUS_RANGE_BEGIN=2
 CONFIG_NR_CPUS_RANGE_END=8
 # CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
 CONFIG_PADATA=y
-CONFIG_PAGE_POOL=y
 CONFIG_PAGE_REPORTING=y
 CONFIG_PAGE_TABLE_ISOLATION=y
 CONFIG_PARAVIRT=y
@@ -320,11 +335,9 @@ CONFIG_PATA_AMD=y
 CONFIG_PATA_ATIIXP=y
 CONFIG_PATA_MPIIX=y
 CONFIG_PATA_OLDPIIX=y
-CONFIG_PATA_PLATFORM=y
 CONFIG_PATA_SC1200=y
 CONFIG_PATA_TIMINGS=y
 CONFIG_PATA_VIA=y
-# CONFIG_PCENGINES_APU2 is not set
 CONFIG_PCIEAER=y
 CONFIG_PCIEASPM=y
 CONFIG_PCIEASPM_DEFAULT=y
@@ -336,7 +349,6 @@ CONFIG_PCIE_PME=y
 CONFIG_PCI_MMCONFIG=y
 CONFIG_PCI_XEN=y
 # CONFIG_PCWATCHDOG is not set
-# CONFIG_PEAQ_WMI is not set
 CONFIG_PGTABLE_LEVELS=3
 CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_PINCTRL=y
@@ -391,34 +403,40 @@ CONFIG_SCHED_INFO=y
 CONFIG_SCHED_SMT=y
 # CONFIG_SCSI_FDOMAIN_ISA is not set
 CONFIG_SCSI_VIRTIO=y
+# CONFIG_SEL3350_PLATFORM is not set
 # CONFIG_SENSORS_ASUS_EC is not set
 # CONFIG_SENSORS_ASUS_WMI is not set
 CONFIG_SENSORS_CORETEMP=y
 CONFIG_SENSORS_FAM15H_POWER=y
+# CONFIG_SENSORS_HP_WMI is not set
 CONFIG_SENSORS_I5500=y
-CONFIG_SENSORS_K8TEMP=y
 CONFIG_SENSORS_K10TEMP=y
+CONFIG_SENSORS_K8TEMP=y
+# CONFIG_SENSORS_OXP is not set
 CONFIG_SENSORS_VIA_CPUTEMP=y
 CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_MCTRL_GPIO=y
 # CONFIG_SERIAL_MULTI_INSTANTIATE is not set
 CONFIG_SMP=y
 # CONFIG_SND_HDA_CTL_DEV_ID is not set
 # CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
 # CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set
+# CONFIG_SND_HDA_SCODEC_TAS2781_I2C is not set
 # CONFIG_SND_SOC_AMD_ACP6x is not set
 # CONFIG_SND_SOC_AMD_ACP_COMMON is not set
 # CONFIG_SND_SOC_AMD_PS is not set
 # CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
 # CONFIG_SND_SOC_INTEL_AVS is not set
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
-# CONFIG_SURFACE_PLATFORMS is not set
 CONFIG_SWIOTLB=y
 CONFIG_SYNC_FILE=y
+CONFIG_SYSFB=y
 # CONFIG_SYSTEM76_ACPI is not set
 CONFIG_SYS_HYPERVISOR=y
 CONFIG_TASKSTATS=y
 CONFIG_TASK_DELAY_ACCT=y
+CONFIG_THERMAL_ACPI=y
 CONFIG_THERMAL_GOV_USER_SPACE=y
 CONFIG_THERMAL_HWMON=y
 CONFIG_THERMAL_WRITABLE_TRIPS=y
@@ -434,8 +452,12 @@ CONFIG_USER_RETURN_NOTIFIER=y
 CONFIG_VHOST=y
 CONFIG_VHOST_IOTLB=y
 CONFIG_VHOST_NET=y
+CONFIG_VHOST_TASK=y
+CONFIG_VIDEO_CMDLINE=y
 # CONFIG_VIDEO_IPU3_CIO2 is not set
+CONFIG_VIDEO_NOMODESET=y
 CONFIG_VIRTIO=y
+CONFIG_VIRTIO_ANCHOR=y
 CONFIG_VIRTIO_BALLOON=y
 CONFIG_VIRTIO_BLK=y
 CONFIG_VIRTIO_CONSOLE=y
@@ -446,6 +468,7 @@ CONFIG_VIRTIO_NET=y
 CONFIG_VIRTIO_PCI=y
 CONFIG_VIRTIO_PCI_LEGACY=y
 CONFIG_VIRTIO_PCI_LIB=y
+CONFIG_VIRTIO_PCI_LIB_LEGACY=y
 # CONFIG_VIRTIO_PMEM is not set
 CONFIG_VIRTUALIZATION=y
 CONFIG_VMAP_PFN=y
@@ -460,6 +483,7 @@ CONFIG_X86_ACPI_CPUFREQ=y
 CONFIG_X86_AMD_FREQ_SENSITIVITY=y
 CONFIG_X86_AMD_PLATFORM_DEVICE=y
 CONFIG_X86_AMD_PSTATE=y
+CONFIG_X86_AMD_PSTATE_DEFAULT_MODE=3
 # CONFIG_X86_AMD_PSTATE_UT is not set
 # CONFIG_X86_BIGSMP is not set
 CONFIG_X86_CPUID=y
@@ -490,8 +514,10 @@ CONFIG_XEN_DEV_EVTCHN=y
 CONFIG_XEN_FBDEV_FRONTEND=y
 CONFIG_XEN_GNTDEV=y
 CONFIG_XEN_GRANT_DEV_ALLOC=y
+CONFIG_XEN_GRANT_DMA_OPS=y
 CONFIG_XEN_NETDEV_FRONTEND=y
 CONFIG_XEN_PRIVCMD=y
+# CONFIG_XEN_PRIVCMD_IRQFD is not set
 CONFIG_XEN_PVH=y
 CONFIG_XEN_PVHVM=y
 CONFIG_XEN_PVHVM_GUEST=y
@@ -505,5 +531,5 @@ CONFIG_XEN_WDT=y
 CONFIG_XEN_XENBUS_FRONTEND=y
 # CONFIG_XIAOMI_WMI is not set
 CONFIG_XPS=y
-# CONFIG_YOGABOOK_WMI is not set
+# CONFIG_YOGABOOK is not set
 CONFIG_ZLIB_DEFLATE=y
diff --git a/target/linux/x86/geode/config-6.6 b/target/linux/x86/geode/config-6.6
index cf02d2b9b0..1ab188af53 100644
--- a/target/linux/x86/geode/config-6.6
+++ b/target/linux/x86/geode/config-6.6
@@ -5,7 +5,6 @@ CONFIG_8139TOO_8129=y
 CONFIG_8139TOO_PIO=y
 # CONFIG_8139TOO_TUNE_TWISTER is not set
 # CONFIG_8139_OLD_RX_RESET is not set
-# CONFIG_ACER_WMI is not set
 CONFIG_ACPI=y
 CONFIG_ACPI_AC=y
 # CONFIG_ACPI_BATTERY is not set
@@ -18,6 +17,7 @@ CONFIG_ACPI_CPU_FREQ_PSS=y
 # CONFIG_ACPI_DPTF is not set
 # CONFIG_ACPI_EC_DEBUGFS is not set
 CONFIG_ACPI_FAN=y
+# CONFIG_ACPI_FFH is not set
 CONFIG_ACPI_HOTPLUG_IOAPIC=y
 CONFIG_ACPI_I2C_OPREGION=y
 CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
@@ -35,26 +35,25 @@ CONFIG_ACPI_THERMAL=y
 # CONFIG_ACPI_WMI is not set
 # CONFIG_ADV_SWBUTTON is not set
 CONFIG_ALIX=y
-# CONFIG_AMD_PMC is not set
 # CONFIG_AMD_PMF is not set
-CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
 # CONFIG_ASUS_TF103C_DOCK is not set
+CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
 # CONFIG_ATA_PIIX is not set
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CS5535_CLOCK_EVENT_SRC=y
 CONFIG_CS5535_MFGPT=y
 CONFIG_CS5535_MFGPT_DEFAULT_IRQ=7
 # CONFIG_CS89x0_ISA is not set
 CONFIG_DMA_ACPI=y
 # CONFIG_EL3 is not set
+CONFIG_FUNCTION_ALIGNMENT=4
+CONFIG_FUNCTION_ALIGNMENT_4B=y
+CONFIG_FUNCTION_PADDING_BYTES=4
+CONFIG_FUNCTION_PADDING_CFI=0
 CONFIG_GEODE_WDT=y
 CONFIG_GEOS=y
-# CONFIG_GIGABYTE_WMI is not set
 CONFIG_GPIO_ACPI=y
-CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_CS5535=y
 # CONFIG_HPET is not set
-# CONFIG_HP_ACCEL is not set
 CONFIG_HWMON=y
 CONFIG_I2C=y
 CONFIG_I2C_ALGOBIT=y
@@ -62,16 +61,10 @@ CONFIG_I2C_ALGOPCA=y
 CONFIG_I2C_ALGOPCF=y
 # CONFIG_I2C_AMD_MP2 is not set
 CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
 # CONFIG_INTEL_IPS is not set
-# CONFIG_INTEL_MENLOW is not set
 # CONFIG_INTEL_SAR_INT1092 is not set
 # CONFIG_INTEL_SCU_PLATFORM is not set
 # CONFIG_INTEL_SOC_DTS_THERMAL is not set
-# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
-# CONFIG_INTEL_WMI_THUNDERBOLT is not set
 CONFIG_IOSF_MBI=y
 # CONFIG_IOSF_MBI_DEBUG is not set
 CONFIG_ISA=y
@@ -88,22 +81,17 @@ CONFIG_MFD_CS5535=y
 # CONFIG_MFD_INTEL_PMC_BXT is not set
 CONFIG_MGEODEGX1=y
 # CONFIG_MIXCOMWD is not set
-# CONFIG_MSI_WMI is not set
-# CONFIG_MXM_WMI is not set
 CONFIG_NATSEMI=y
 CONFIG_NET5501=y
 CONFIG_NSC_GPIO=y
-# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
 CONFIG_PATA_CS5520=y
 CONFIG_PATA_CS5530=y
 CONFIG_PATA_CS5535=y
 CONFIG_PATA_CS5536=y
 CONFIG_PATA_SC1200=y
 CONFIG_PC8736x_GPIO=y
-# CONFIG_PCENGINES_APU2 is not set
 CONFIG_PCI_MMCONFIG=y
 # CONFIG_PCWATCHDOG is not set
-# CONFIG_PEAQ_WMI is not set
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_ALDERLAKE is not set
 # CONFIG_PINCTRL_BAYTRAIL is not set
@@ -133,31 +121,28 @@ CONFIG_SC1200_WDT=y
 CONFIG_SCx200_ACB=y
 CONFIG_SCx200_WDT=y
 # CONFIG_SENSORS_ASUS_EC is not set
-# CONFIG_SENSORS_ASUS_WMI is not set
 CONFIG_SENSORS_LM90=y
+# CONFIG_SENSORS_OXP is not set
 CONFIG_SERIAL_8250_PNP=y
-CONFIG_SERIAL_MCTRL_GPIO=y
 # CONFIG_SERIAL_MULTI_INSTANTIATE is not set
 # CONFIG_SND_HDA_CTL_DEV_ID is not set
 # CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
 # CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set
+# CONFIG_SND_HDA_SCODEC_TAS2781_I2C is not set
 # CONFIG_SND_SOC_AMD_ACP6x is not set
 # CONFIG_SND_SOC_AMD_ACP_COMMON is not set
 # CONFIG_SND_SOC_AMD_PS is not set
 # CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
 # CONFIG_SND_SOC_INTEL_AVS is not set
-# CONFIG_SURFACE_PLATFORMS is not set
-# CONFIG_SYSTEM76_ACPI is not set
-# CONFIG_THINKPAD_LMI is not set
 # CONFIG_TOSHIBA_BT_RFKILL is not set
-# CONFIG_TOSHIBA_WMI is not set
 # CONFIG_USB_UHCI_HCD is not set
 CONFIG_VIA_RHINE=y
 CONFIG_VIA_RHINE_MMIO=y
 CONFIG_WATCHDOG_CORE=y
 # CONFIG_WDT is not set
 # CONFIG_WIRELESS_HOTKEY is not set
-# CONFIG_WMI_BMOF is not set
 # CONFIG_X86_ACPI_CPUFREQ is not set
 CONFIG_X86_ALIGNMENT_16=y
 # CONFIG_X86_AMD_PLATFORM_DEVICE is not set
@@ -172,5 +157,3 @@ CONFIG_X86_MINIMUM_CPU_FAMILY=5
 # CONFIG_X86_PCC_CPUFREQ is not set
 CONFIG_X86_PM_TIMER=y
 CONFIG_X86_REBOOTFIXUPS=y
-# CONFIG_XIAOMI_WMI is not set
-# CONFIG_YOGABOOK_WMI is not set
diff --git a/target/linux/x86/legacy/config-6.6 b/target/linux/x86/legacy/config-6.6
index efa1eabe82..402ad89472 100644
--- a/target/linux/x86/legacy/config-6.6
+++ b/target/linux/x86/legacy/config-6.6
@@ -13,6 +13,7 @@ CONFIG_ACPI_CPU_FREQ_PSS=y
 # CONFIG_ACPI_DPTF is not set
 # CONFIG_ACPI_EC_DEBUGFS is not set
 # CONFIG_ACPI_FAN is not set
+# CONFIG_ACPI_FFH is not set
 CONFIG_ACPI_HOTPLUG_IOAPIC=y
 # CONFIG_ACPI_I2C_OPREGION is not set
 CONFIG_ACPI_LEGACY_TABLES_LOOKUP=y
@@ -41,15 +42,15 @@ CONFIG_AGP_INTEL=y
 # CONFIG_AGP_SIS is not set
 # CONFIG_AGP_SWORKS is not set
 # CONFIG_AGP_VIA is not set
-# CONFIG_AMD_PMC is not set
 # CONFIG_AMD_PMF is not set
+CONFIG_APERTURE_HELPERS=y
 CONFIG_ARCH_MIGHT_HAVE_ACPI_PDC=y
+CONFIG_AUXILIARY_BUS=y
 # CONFIG_ASUS_TF103C_DOCK is not set
 CONFIG_BACKLIGHT_CLASS_DEVICE=y
 CONFIG_BLK_DEV_SR=y
 CONFIG_CDROM=y
 CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 # CONFIG_CS89x0_ISA is not set
 CONFIG_DMA_ACPI=y
 CONFIG_DMA_SHARED_BUFFER=y
@@ -58,6 +59,12 @@ CONFIG_DRM_AMDGPU=y
 # CONFIG_DRM_AMD_DC is not set
 CONFIG_DRM_BOCHS=y
 CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_BUDDY=y
+CONFIG_DRM_DISPLAY_DP_HELPER=y
+CONFIG_DRM_DISPLAY_HDCP_HELPER=y
+CONFIG_DRM_DISPLAY_HDMI_HELPER=y
+CONFIG_DRM_DISPLAY_HELPER=y
+CONFIG_DRM_EXEC=y
 CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
 CONFIG_DRM_I915=y
@@ -74,6 +81,7 @@ CONFIG_DRM_I915_HEARTBEAT_INTERVAL=2500
 # CONFIG_DRM_I915_LOW_LEVEL_TRACEPOINTS is not set
 CONFIG_DRM_I915_MAX_REQUEST_BUSYWAIT=8000
 CONFIG_DRM_I915_PREEMPT_TIMEOUT=640
+CONFIG_DRM_I915_PREEMPT_TIMEOUT_COMPUTE=7500
 CONFIG_DRM_I915_REQUEST_TIMEOUT=20000
 # CONFIG_DRM_I915_SELFTEST is not set
 CONFIG_DRM_I915_STOP_TIMEOUT=100
@@ -90,6 +98,7 @@ CONFIG_DRM_PANEL_BRIDGE=y
 CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
 CONFIG_DRM_RADEON=y
 CONFIG_DRM_SCHED=y
+CONFIG_DRM_SUBALLOC_HELPER=y
 CONFIG_DRM_TTM=y
 CONFIG_DRM_TTM_HELPER=y
 CONFIG_DRM_VRAM_HELPER=y
@@ -98,9 +107,12 @@ CONFIG_FB=y
 CONFIG_FB_CFB_COPYAREA=y
 CONFIG_FB_CFB_FILLRECT=y
 CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
+CONFIG_FB_CORE=y
 CONFIG_FB_DEFERRED_IO=y
 # CONFIG_FB_I810 is not set
+CONFIG_FB_IOMEM_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS=y
+CONFIG_FB_SYSMEM_HELPERS_DEFERRED=y
 CONFIG_FB_SYS_COPYAREA=y
 CONFIG_FB_SYS_FILLRECT=y
 CONFIG_FB_SYS_FOPS=y
@@ -112,22 +124,22 @@ CONFIG_FONT_SUPPORT=y
 CONFIG_FRAMEBUFFER_CONSOLE=y
 CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
 # CONFIG_FRAMEBUFFER_CONSOLE_ROTATION is not set
+CONFIG_FUNCTION_ALIGNMENT=4
+CONFIG_FUNCTION_ALIGNMENT_4B=y
+CONFIG_FUNCTION_PADDING_BYTES=4
+CONFIG_FUNCTION_PADDING_CFI=0
 # CONFIG_GIGABYTE_WMI is not set
+CONFIG_GPIO_ACPI=y
 CONFIG_HDMI=y
-CONFIG_HID_BATTERY_STRENGTH=y
 # CONFIG_HIGHMEM4G is not set
 CONFIG_HPET=y
 CONFIG_HPET_MMAP=y
-# CONFIG_HP_ACCEL is not set
 # CONFIG_HUAWEI_WMI is not set
 CONFIG_HWMON=y
 CONFIG_I2C=y
 CONFIG_I2C_ALGOBIT=y
 # CONFIG_I2C_AMD_MP2 is not set
 CONFIG_I2C_BOARDINFO=y
-# CONFIG_I2C_HID_ACPI is not set
-# CONFIG_I2C_MULTI_INSTANTIATE is not set
-# CONFIG_I8K is not set
 CONFIG_INPUT_MOUSE=y
 CONFIG_INPUT_MOUSEDEV=y
 CONFIG_INPUT_MOUSEDEV_PSAUX=y
@@ -136,9 +148,9 @@ CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INTEL_GTT=y
 CONFIG_INTEL_IDLE=y
 # CONFIG_INTEL_IPS is not set
+# CONFIG_INTEL_MEI_GSC_PROXY is not set
 # CONFIG_INTEL_MEI_HDCP is not set
 # CONFIG_INTEL_MEI_PXP is not set
-# CONFIG_INTEL_MENLOW is not set
 # CONFIG_INTEL_SAR_INT1092 is not set
 # CONFIG_INTEL_SCU_PLATFORM is not set
 # CONFIG_INTEL_SOC_DTS_THERMAL is not set
@@ -155,6 +167,7 @@ CONFIG_ISO9660_FS=y
 # CONFIG_JOLIET is not set
 CONFIG_KCMP=y
 # CONFIG_LANCE is not set
+# CONFIG_LENOVO_YMC is not set
 # CONFIG_LG_LAPTOP is not set
 CONFIG_M586MMX=y
 # CONFIG_M686 is not set
@@ -181,6 +194,7 @@ CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
 CONFIG_MOUSE_PS2_TRACKPOINT=y
 # CONFIG_MOUSE_SERIAL is not set
 # CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MSI_EC is not set
 # CONFIG_MSI_WMI is not set
 # CONFIG_MXM_WMI is not set
 CONFIG_NOHIGHMEM=y
@@ -191,7 +205,6 @@ CONFIG_PATA_ATIIXP=y
 CONFIG_PATA_LEGACY=y
 CONFIG_PATA_MPIIX=y
 CONFIG_PATA_OLDPIIX=y
-CONFIG_PATA_PLATFORM=y
 CONFIG_PATA_SC1200=y
 CONFIG_PATA_SIS=y
 CONFIG_PATA_TIMINGS=y
@@ -205,7 +218,6 @@ CONFIG_PCIEASPM_DEFAULT=y
 CONFIG_PCIEPORTBUS=y
 CONFIG_PCI_MMCONFIG=y
 # CONFIG_PCWATCHDOG is not set
-# CONFIG_PEAQ_WMI is not set
 # CONFIG_PMIC_OPREGION is not set
 CONFIG_PNP=y
 CONFIG_PNPACPI=y
@@ -219,24 +231,30 @@ CONFIG_SATA_AHCI=y
 # CONFIG_SCSI_FDOMAIN_ISA is not set
 # CONFIG_SENSORS_ASUS_EC is not set
 # CONFIG_SENSORS_ASUS_WMI is not set
+# CONFIG_SENSORS_HP_WMI is not set
+# CONFIG_SENSORS_OXP is not set
 CONFIG_SERIAL_8250_PNP=y
 # CONFIG_SERIAL_MULTI_INSTANTIATE is not set
 # CONFIG_SND_HDA_CTL_DEV_ID is not set
 # CONFIG_SND_HDA_SCODEC_CS35L41_I2C is not set
 # CONFIG_SND_HDA_SCODEC_CS35L41_SPI is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_I2C is not set
+# CONFIG_SND_HDA_SCODEC_CS35L56_SPI is not set
+# CONFIG_SND_HDA_SCODEC_TAS2781_I2C is not set
 # CONFIG_SND_SOC_AMD_ACP6x is not set
 # CONFIG_SND_SOC_AMD_ACP_COMMON is not set
 # CONFIG_SND_SOC_AMD_PS is not set
 # CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
 # CONFIG_SND_SOC_INTEL_AVS is not set
-# CONFIG_SURFACE_PLATFORMS is not set
 CONFIG_SYNC_FILE=y
 # CONFIG_SYSTEM76_ACPI is not set
 # CONFIG_THINKPAD_LMI is not set
 # CONFIG_TOSHIBA_BT_RFKILL is not set
 # CONFIG_TOSHIBA_WMI is not set
 CONFIG_USB_STORAGE=y
+CONFIG_VIDEO_CMDLINE=y
 # CONFIG_VIDEO_IPU3_CIO2 is not set
+CONFIG_VIDEO_NOMODESET=y
 CONFIG_VMAP_PFN=y
 # CONFIG_WDT is not set
 # CONFIG_WIRELESS_HOTKEY is not set
@@ -258,5 +276,5 @@ CONFIG_X86_MINIMUM_CPU_FAMILY=5
 CONFIG_X86_PM_TIMER=y
 # CONFIG_X86_POWERNOW_K8 is not set
 # CONFIG_XIAOMI_WMI is not set
-# CONFIG_YOGABOOK_WMI is not set
+# CONFIG_YOGABOOK is not set
 CONFIG_ZLIB_DEFLATE=y



From lede-commits at lists.infradead.org  Thu Apr  4 00:29:25 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 03:29:25 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq60xx: add yuncore fap650 support
In-Reply-To: <171221576583.205467.9587728453251750544@git-01.infra.openwrt.org>
References: <171221576583.205467.9587728453251750544@git-01.infra.openwrt.org>
Message-ID: <mailman.23482.1712215771.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9ef4f7f9194c68a587336d7661c4a5124a5e86fd

commit 9ef4f7f9194c68a587336d7661c4a5124a5e86fd
Author: Isaev Ruslan <legale.legale at gmail.com>
AuthorDate: Wed Feb 28 10:53:54 2024 +0300

    qualcommax: ipq60xx: add yuncore fap650 support
    
    This commit adds support for the Yuncore FAP650 device.
    
    Specifications:
    - Qualcomm IPQ6018+QCA8075+QCN5022+QCN5052
    - 512 MB of RAM (DDR3)
    - 8 MB of serial flash (SPI NOR)
    - 128 MB of parallel flash (NAND)
    - 2x2 2.4 GHz WiFi (IPQ6010)
    - 2x2 5 GHz WiFi (IPQ6010)
    - 2x 2dBi 2.4G MIMO antenna
    - 2x 3dBi 5.8G MIMO antenna
    - 5x 1 Gbps Ethernet (QCA8075)
    - POE: 48V (IEEE 802.3af)
    - power: 12V (~1.5A)
    - 1x passthru port (rj45 - rj45)
    - 1x cisco rj45 console port
    - size: 160mm*86mm*29mm
    
    BACKUP YOUR STOCK FIRMWARE:
    ```
    export device=fap650
    mkdir -p /tmp/fw_dump_$device
    cd /tmp/fw_dump_$device
    dmesg > dmesg_$device.log
    dtc -I fs /sys/firmware/devicetree/base > $device.dts
    cat /proc/device-tree/model > model
    cat /proc/mtd > proc_mtd
    while read p; do
    mtd_dev=$(echo $p | cut -d: -f1)
    echo $mtd_dev
    dd if=/dev/$mtd_dev of=$mtd_dev
    done < proc_mtd
    md5sum * > md5sum.log
    tar -cvzf ../$device.tar.gz .
    export sum=$(md5sum /tmp/$device.tar.gz | cut -d' ' -f1)
    mv ../$device.tar.gz /tmp/${device}_${sum}.tar.gz
    echo fw backup saved to: /tmp/${device}_${sum}.tar.gz
    ```
    Upload your backup via tftp to the safe place.
    
    INSTALLATION:
    1. stock firmware web ui
    Rename factory.bin fw image file to factory.ubin. Flash this image
    like ordinary stock fw upgrade.
    
    2. stock firmware telnet method
    Enter telnet cli (login: root, password: 476t*_f0%g09y) and upload
     factory.bin fw image and rename it to factory.ubin
    `cd /tmp && wget <your_web_server_ip>/factory.ubin`
    `sysupgrade factory.ubin
    
    3. initramfs method
        Put imitramfs image to your TFTP server and rename it for example to fap650.initram
        Enable serial console and enter to the u-boot cli.
        Exec these commands:
        `tftpboot <your_tftp_server_ip>:fap650.initram`
        `dhcp`
    
        When downloading is finished:
        `bootm`
        After booting the device, you need to upload to the device factory.ubi fw image.
        ```
        cd /tmp && wget <your_web_server_ip>/factory.ubi`
        export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
        export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
        ubiformat /dev/${rootfs} -y -f factory.ubi
        ubiformat /dev/${rootfs_1} -y -f factory.ubi
        reboot
        ```
    
    4. u-boot factory.ubi image method
        Put factory.ubi to your TFTP server
        Enter u-boot cli and exec these commands:
        `tftpboot <your_tftp_server_ip>:factory.ubi`
        `dhcp`
        After downloading is finished:
        `flash rootfs`
        `flash rootfs_1`
        `reset`
    
    STOCK FIRMWARE RECOVERY:
    Boot initramfs image.
    Upload your rootfs mtd partition to the device using scp or download
    it from the device using wget.
    Enter device ssh cli and exec:
    ```
    cd /tmp && wget <your_web_server_ip>/rootfs_mtd`
    export rootfs=$(cat /proc/mtd | grep rootfs | cut -d: -f1)
    export rootfs_1=$(cat /proc/mtd | grep rootfs_1 | cut -d: -f1)
    ubiformat /dev/${rootfs} -y -f /tmp/rootfs_mtd
    ubiformat /dev/${rootfs_1} -y -f /tmp/rootfs_mtd
    reboot
    ```
    
    Signed-off-by: Isaev Ruslan <legale.legale at gmail.com>
---
 .../boot/uboot-envtools/files/qualcommax_ipq60xx   |   5 +
 package/firmware/ipq-wifi/Makefile                 |   9 +-
 .../arch/arm64/boot/dts/qcom/ipq6018-512m.dtsi     |  23 ++
 .../arch/arm64/boot/dts/qcom/ipq6018-fap650.dts    | 365 +++++++++++++++++++++
 target/linux/qualcommax/image/ipq60xx.mk           |  16 +
 .../ipq60xx/base-files/etc/board.d/01_leds         |  18 +
 .../ipq60xx/base-files/etc/board.d/02_network      |   3 +
 .../etc/hotplug.d/firmware/11-ath11-caldata        |   3 +
 .../ipq60xx/base-files/etc/init.d/bootcount        |  14 +
 .../ipq60xx/base-files/lib/upgrade/platform.sh     |  35 ++
 10 files changed, 487 insertions(+), 4 deletions(-)

diff --git a/package/boot/uboot-envtools/files/qualcommax_ipq60xx b/package/boot/uboot-envtools/files/qualcommax_ipq60xx
index 33cb94f99d..749b053aab 100644
--- a/package/boot/uboot-envtools/files/qualcommax_ipq60xx
+++ b/package/boot/uboot-envtools/files/qualcommax_ipq60xx
@@ -19,6 +19,11 @@ netgear,wax214)
 	[ -n "$idx" ] && \
 		ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x40000" "0x20000" "2"
 	;;
+yuncore,fap650)
+	idx="$(find_mtd_index 0:appsblenv)"
+	[ -n "$idx" ] && \
+		ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x10000" "0x10000"
+	;;
 esac
 
 config_load ubootenv
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index a34e368a5d..3a339267ab 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,10 +6,9 @@ PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2024-03-04
-PKG_SOURCE_VERSION:=38c02ae4302f9cb73f6914574239fe84799caa84
-PKG_MIRROR_HASH:=1e84f576d4161ea932b45a651abebdc05ff3c261ef25fc13d3d68cf9b624abb3
-
+PKG_SOURCE_DATE:=2024-03-20
+PKG_SOURCE_VERSION:=87717baa8a7c922942f4202a0ec3de3cb5643941
+PKG_MIRROR_HASH:=75f05f922780b55c0069c4ee9725f2b1aa857f3bc841bec71a44e997ece9cea15
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk
@@ -52,6 +51,7 @@ ALLWIFIBOARDS:= \
 	xiaomi_ax9000 \
 	yyets_le1 \
 	yuncore_ax880 \
+	yuncore_fap650 \
 	zte_mf269 \
 	zte_mf287 \
 	zte_mf287plus \
@@ -169,6 +169,7 @@ $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
 $(eval $(call generate-ipq-wifi-package,yyets_le1,YYeTs LE1))
 $(eval $(call generate-ipq-wifi-package,yuncore_ax880,Yuncore AX880))
+$(eval $(call generate-ipq-wifi-package,yuncore_fap650,Yuncore FAP650))
 $(eval $(call generate-ipq-wifi-package,zte_mf269,ZTE MF269))
 $(eval $(call generate-ipq-wifi-package,zte_mf287,ZTE MF287))
 $(eval $(call generate-ipq-wifi-package,zte_mf287plus,ZTE MF287Plus))
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-512m.dtsi b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-512m.dtsi
new file mode 100644
index 0000000000..d46a852404
--- /dev/null
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-512m.dtsi
@@ -0,0 +1,23 @@
+// SPDX-License-Identifier: GPL-2.0-only
+
+#include "ipq6018.dtsi"
+
+&rpm_msg_ram {
+	reg = <0x0 0x00060000 0x0 0x6000>;
+	no-map;
+};
+
+&tz {
+	reg = <0x0 0x4a600000 0x0 0x00400000>;
+	no-map;
+};
+
+&smem_region {
+	reg = <0x0 0x4aa00000 0x0 0x00100000>;
+	no-map;
+};
+
+&q6_region {
+	reg = <0x0 0x4ab00000 0x0 0x03700000>;
+	no-map;
+};
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-fap650.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-fap650.dts
new file mode 100644
index 0000000000..e9ebcc9063
--- /dev/null
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq6018-fap650.dts
@@ -0,0 +1,365 @@
+// SPDX-License-Identifier: MIT, GPL-2.0 or later
+/* Copyright (c) 2023, Ruslan Isaev <legale.legale at gmail.com> */
+
+/dts-v1/;
+
+#include "ipq6018-512m.dtsi"
+#include "ipq6018-cp-cpu.dtsi"
+#include "ipq6018-ess.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	model = "Yuncore FAP650";
+	compatible = "yuncore,fap650", "qcom,ipq6018";
+	
+	aliases {
+		ethernet0 = &dp5;
+		ethernet1 = &dp4;
+		ethernet2 = &dp3;
+		ethernet3 = &dp2;
+		ethernet4 = &dp1;
+		label-mac-device = &dp5;
+		serial0 = &blsp1_uart3;
+		led-boot = &led_system;
+		led-failsafe = &led_system;
+		led-running = &led_system;
+		led-upgrade = &led_system;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs-append = " root=/dev/ubiblock0_1";
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&tlmm 19 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_system: system {
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+			gpios = <&tlmm 32 GPIO_ACTIVE_HIGH>;
+		};
+
+		wlan2g {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+			gpios = <&tlmm 37 GPIO_ACTIVE_HIGH>;
+		};
+
+		wlan5g {
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_WLAN_5GHZ;
+			gpios = <&tlmm 35 GPIO_ACTIVE_HIGH>;
+		};
+	};
+};
+
+&blsp1_uart3 {
+	pinctrl-0 = <&serial_3_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+};
+
+&tlmm {
+	mdio_pins: mdio-pins {
+		mdc {
+			pins = "gpio64";
+			function = "mdc";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+
+		mdio {
+			pins = "gpio65";
+			function = "mdio";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+	};
+};
+
+&mdio {
+	status = "okay";
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 75 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <10000>;
+	reset-post-delay-us = <50000>;
+
+	ethernet-phy-package at 0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "qcom,qca8075-package";
+		reg = <0>;
+
+		qcom,package-mode = "psgmii";
+
+		qca8075_0: ethernet-phy at 0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <0>;
+		};
+
+		qca8075_1: ethernet-phy at 1 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <1>;
+		};
+
+		qca8075_2: ethernet-phy at 2 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <2>;
+		};
+
+		qca8075_3: ethernet-phy at 3 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <3>;
+		};
+
+		qca8075_4: ethernet-phy at 4 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <4>;
+		};
+	};
+};
+
+&switch {
+	status = "okay";
+	switch_lan_bmp = <(ESS_PORT1|ESS_PORT2|ESS_PORT3|ESS_PORT4)>; /* lan port bitmap */
+	switch_wan_bmp = <ESS_PORT5>; /* wan port bitmap */
+	switch_mac_mode = <MAC_MODE_PSGMII>; /* mac mode for uniphy instance0*/
+
+	qcom,port_phyinfo {
+		port at 1 {
+			port_id = <1>;
+			phy_address = <0>;
+		};
+
+		port at 2 {
+			port_id = <2>;
+			phy_address = <1>;
+		};
+
+		port at 3 {
+			port_id = <3>;
+			phy_address = <2>;
+		};
+
+		port at 4 {
+			port_id = <4>;
+			phy_address = <3>;
+		};
+
+		port at 5 {
+			port_id = <5>;
+			phy_address = <4>;
+		};
+	};
+};
+
+&usb2 {
+	status = "okay";
+};
+
+&usb3 {
+	status = "okay";
+};
+
+&edma {
+	status = "okay";
+};
+
+&dp1 {
+	status = "okay";
+	phy-handle = <&qca8075_0>;
+	label = "lan1";
+};
+
+&dp2 {
+	status = "okay";
+	phy-handle = <&qca8075_1>;
+	label = "lan2";
+};
+
+&dp3 {
+	status = "okay";
+	phy-handle = <&qca8075_2>;
+	label = "lan3";
+};
+
+&dp4 {
+	status = "okay";
+	phy-handle = <&qca8075_3>;
+	label = "lan4";
+};
+
+&dp5 {
+	status = "okay";
+	phy-handle = <&qca8075_4>;
+	phy-mode = "psgmii";
+	label = "wan";
+};
+
+&qpic_bam {
+	status = "okay";
+};
+
+&blsp1_spi1 {
+	status = "okay";
+	
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+		compatible = "jedec,spi-nor";
+		spi-max-frequency = <50000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+
+			partition at 0 {
+				reg = <0x00000000 0x000c0000>;
+				label = "0:sbl1";
+			};
+
+			partition at c0000 {
+				reg = <0x000c0000 0x00010000>;
+				label = "0:mibib";
+			};
+
+			partition at d0000 {
+				reg = <0x000d0000 0x00020000>;
+				label = "0:bootconfig";
+			};
+
+			partition at f0000 {
+				reg = <0x000f0000 0x00020000>;
+				label = "0:bootconfig1";
+			};
+
+			partition at 110000 {
+				reg = <0x00110000 0x001a0000>;
+				label = "0:qsee";
+			};
+
+			partition at 2b0000 {
+				reg = <0x002b0000 0x001a0000>;
+				label = "0:qsee_1";
+			};
+
+			partition at 450000 {
+				reg = <0x00450000 0x00010000>;
+				label = "0:devcfg";
+			};
+
+			partition at 460000 {
+				reg = <0x00460000 0x00010000>;
+				label = "0:devcfg_1";
+			};
+
+			partition at 470000 {
+				reg = <0x00470000 0x00040000>;
+				label = "0:rpm";
+			};
+
+			partition at 4b0000 {
+				reg = <0x004b0000 0x00040000>;
+				label = "0:rpm_1";
+			};
+
+			partition at 4f0000 {
+				reg = <0x004f0000 0x00010000>;
+				label = "0:cdt";
+			};
+
+			partition at 500000 {
+				reg = <0x00500000 0x00010000>;
+				label = "0:cdt_1";
+			};
+
+			partition at 510000 {
+				reg = <0x00510000 0x00010000>;
+				label = "0:appsblenv";
+			};
+
+			partition at 520000 {
+				reg = <0x00520000 0x000a0000>;
+				label = "0:appsbl";
+			};
+
+			partition at 5c0000 {
+				reg = <0x005c0000 0x000a0000>;
+				label = "0:appsbl_1";
+			};
+
+			partition at 660000 {
+				reg = <0x00660000 0x00040000>;
+				label = "0:art";
+			};
+		};
+	};
+};
+
+&qpic_nand {
+	status = "okay";
+
+	nand at 0 {
+		reg = <0>;
+
+		nand-ecc-strength = <4>;
+		nand-ecc-step-size = <512>;
+		nand-bus-width = <8>;
+	
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "rootfs";
+				reg = <0x00000000 0x03c00000>;
+			};
+
+			partition at 3c00000 {
+				label = "rootfs_1";
+				reg = <0x03c00000 0x03c00000>;
+			};
+		};
+	};
+};
+
+&wifi {
+ 	qcom,ath11k-calibration-variant = "Yuncore-FAP650";
+	qcom,ath11k-fw-memory-mode = <1>;
+	status = "okay";
+};
+
+&qusb_phy_0 {
+	status = "okay";
+};
+
+&qusb_phy_1 {
+	status = "okay";
+};
+
+&ssphy_0 {
+	status = "okay";
+};
+
+&usb3 {
+	status = "okay";
+};
+
+&usb2 {
+	status = "okay";
+};
diff --git a/target/linux/qualcommax/image/ipq60xx.mk b/target/linux/qualcommax/image/ipq60xx.mk
index a7851e3dc5..79822ceb01 100644
--- a/target/linux/qualcommax/image/ipq60xx.mk
+++ b/target/linux/qualcommax/image/ipq60xx.mk
@@ -23,3 +23,19 @@ define Device/netgear_wax214
        DEVICE_PACKAGES := ipq-wifi-netgear_wax214
 endef
 TARGET_DEVICES += netgear_wax214
+
+define Device/yuncore_fap650
+    $(call Device/FitImage)
+    $(call Device/UbiFit)
+    DEVICE_VENDOR := Yuncore
+    DEVICE_MODEL := FAP650
+    BLOCKSIZE := 128k
+    PAGESIZE := 2048
+    DEVICE_DTS_CONFIG := config at cp03-c1
+    SOC := ipq6018
+    DEVICE_PACKAGES := ipq-wifi-yuncore_fap650
+    IMAGES := factory.ubi factory.ubin sysupgrade.bin
+    IMAGE/factory.ubin := append-ubi | qsdk-ipq-factory-nand
+endef
+TARGET_DEVICES += yuncore_fap650
+
diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds
new file mode 100644
index 0000000000..189822157f
--- /dev/null
+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/01_leds
@@ -0,0 +1,18 @@
+
+. /lib/functions/leds.sh
+. /lib/functions/uci-defaults.sh
+
+board_config_update
+
+board=$(board_name)
+
+case "$board" in
+yuncore,fap650)
+	ucidef_set_led_netdev "wlan5ghz" "WLAN 5GHz LED" "blue:wlan-5ghz" "wlan0" "tx rx"
+	ucidef_set_led_netdev "wlan2ghz" "WLAN 2.4GHz LED" "green:wlan-2ghz" "wlan1" "tx rx"
+	;;
+esac
+
+board_config_flush
+
+exit 0
diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network
index aaa2522c92..f5fd35cf44 100644
--- a/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network
+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/board.d/02_network
@@ -17,6 +17,9 @@ ipq60xx_setup_interfaces()
 	netgear,wax214)
 		ucidef_set_interfaces_lan_wan "lan"
 		;;
+	yuncore,fap650)
+		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
+		;;
 	*)
 		echo "Unsupported hardware. Network interfaces not initialized"
 		;;
diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata
index 89d4c265ab..23a3da0b4b 100644
--- a/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata
+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/hotplug.d/firmware/11-ath11-caldata
@@ -15,6 +15,9 @@ case "$FIRMWARE" in
 	netgear,wax214)
 		caldata_extract "0:art" 0x1000 0x10000
 		;;
+	yuncore,fap650)
+		caldata_extract "0:art" 0x1000 0x20000
+		;;
 	esac
 	;;
 *)
diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount b/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount
new file mode 100755
index 0000000000..6347976372
--- /dev/null
+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount
@@ -0,0 +1,14 @@
+#!/bin/sh /etc/rc.common
+
+START=99
+
+. /lib/functions.sh
+
+boot() {
+	case $(board_name) in
+		yuncore,fap650)
+			fw_setenv owrt_bootcount 0
+		;;
+		esac
+}
+
diff --git a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh
index 4008cb0224..a8e4872cdd 100644
--- a/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh
+++ b/target/linux/qualcommax/ipq60xx/base-files/lib/upgrade/platform.sh
@@ -8,11 +8,46 @@ platform_check_image() {
 	return 0;
 }
 
+
+yuncore_fap650_env_setup() {
+	local ubifile=$(board_name)
+	local active=$(fw_printenv -n owrt_slotactive)
+	[ -z "$active" ] && active=$(hexdump -s 0x94 -n 4 -e '4 "%d"' /dev/mtd$(find_mtd_index 0:bootconfig))
+	cat > /tmp/env_tmp << EOF
+owrt_slotactive=${active}
+owrt_bootcount=0
+bootfile=${ubifile}.ubi
+owrt_bootcountcheck=if test \$owrt_bootcount > 4; then run owrt_tftprecover; fi; if test \$owrt_bootcount = 3; then run owrt_slotswap; else echo bootcountcheck successfull; fi
+owrt_bootinc=if test \$owrt_bootcount < 5; then echo save env part; setexpr owrt_bootcount \${owrt_bootcount} + 1 && saveenv; else echo save env skipped; fi; echo current bootcount: \$owrt_bootcount
+bootcmd=run owrt_bootinc && run owrt_bootcountcheck && run owrt_slotselect && run owrt_bootlinux
+owrt_bootlinux=echo booting linux... && ubi part fs && ubi read 0x44000000 kernel && bootm; reset
+owrt_setslot0=setenv bootargs console=ttyMSM0,115200n8 ubi.mtd=rootfs root=mtd:rootfs rootfstype=squashfs rootwait swiotlb=1 && setenv mtdparts mtdparts=nand0:0x3c00000 at 0(fs)
+owrt_setslot1=setenv bootargs console=ttyMSM0,115200n8 ubi.mtd=rootfs_1 root=mtd:rootfs rootfstype=squashfs rootwait swiotlb=1 && setenv mtdparts mtdparts=nand0:0x3c00000 at 0x3c00000(fs)
+owrt_slotswap=setexpr owrt_slotactive 1 - \${owrt_slotactive} && saveenv && echo slot swapped. new active slot: \$owrt_slotactive
+owrt_slotselect=setenv mtdids nand0=nand0,nand1=spi0.0; if test \$owrt_slotactive = 0; then run owrt_setslot0; else run owrt_setslot1; fi
+owrt_tftprecover=echo trying to recover firmware with tftp... && sleep 10 && dhcp && flash rootfs && flash rootfs_1 && setenv owrt_bootcount 0 && setenv owrt_slotactive 0 && saveenv && reset
+owrt_env_ver=7
+EOF
+	fw_setenv --script /tmp/env_tmp
+}
+
 platform_do_upgrade() {
 	case "$(board_name)" in
 	netgear,wax214)
 		nand_do_upgrade "$1"
 		;;
+	yuncore,fap650)
+		[ "$(fw_printenv -n owrt_env_ver 2>/dev/null)" != "7" ] && yuncore_fap650_env_setup
+		local active="$(fw_printenv -n owrt_slotactive 2>/dev/null)"
+		if [ "$active" = "1" ]; then
+			CI_UBIPART="rootfs"
+		else
+			CI_UBIPART="rootfs_1"
+		fi
+		fw_setenv owrt_bootcount 0
+		fw_setenv owrt_slotactive $((1 - active))
+		nand_do_upgrade "$1"
+		;;
 	*)
 		default_do_upgrade "$1"
 		;;



From lede-commits at lists.infradead.org  Thu Apr  4 01:15:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 04:15:27 -0400
Subject: [openwrt/openwrt]  ipq-wifi: fixup hash
In-Reply-To: <171221852768.289369.15893091577092282058@git-01.infra.openwrt.org>
References: <171221852768.289369.15893091577092282058@git-01.infra.openwrt.org>
Message-ID: <mailman.23504.1712218534.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b01d9bcc9dd6b68b37e4d78dae0b51b4cecbef15

commit b01d9bcc9dd6b68b37e4d78dae0b51b4cecbef15
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Thu Apr 4 10:00:57 2024 +0200

    ipq-wifi: fixup hash
    
    It seems that somehow a wrong hash has slipped past PR CI again.
    
    Fixes: 9ef4f7f9194c ("qualcommax: ipq60xx: add yuncore fap650 support")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/firmware/ipq-wifi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 3a339267ab..86e2337e00 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -8,7 +8,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
 PKG_SOURCE_DATE:=2024-03-20
 PKG_SOURCE_VERSION:=87717baa8a7c922942f4202a0ec3de3cb5643941
-PKG_MIRROR_HASH:=75f05f922780b55c0069c4ee9725f2b1aa857f3bc841bec71a44e997ece9cea15
+PKG_MIRROR_HASH:=5f05f922780b55c0069c4ee9725f2b1aa857f3bc841bec71a44e997ece9cea15
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Thu Apr  4 02:15:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 05:15:40 -0400
Subject: [openwrt/openwrt]  libubox: update to Git HEAD (2024-03-29)
In-Reply-To: <171222214040.415306.13648248655469205334@git-01.infra.openwrt.org>
References: <171222214040.415306.13648248655469205334@git-01.infra.openwrt.org>
Message-ID: <mailman.23550.1712222156.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/89c594e8b295dbbcf32144d725f06cf1b90599c1

commit 89c594e8b295dbbcf32144d725f06cf1b90599c1
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Mar 29 18:44:22 2024 +0100

    libubox: update to Git HEAD (2024-03-29)
    
    a2fce001819e CI: add build test run
    12bda4bdb197 CI: add CodeQL workflow tests
    eb9bcb64185a ustream: prevent recursive calls to the read callback
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/libubox/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index 67bc100b60..34cf442ed4 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
-PKG_MIRROR_HASH:=e07d0c8b92a9ef18d2459ebbbca38de20eeee657704320d4705578f895b78257
-PKG_SOURCE_DATE:=2024-01-26
-PKG_SOURCE_VERSION:=c1be505732e6d254464973bdeacb955214c76c46
+PKG_MIRROR_HASH:=bbf074296f9fe1dd1f42c0733ca294f93f3b7848549cbfb51dff6a3e9f682395
+PKG_SOURCE_DATE:=2024-03-29
+PKG_SOURCE_VERSION:=eb9bcb64185ac155c02cc1a604692c4b00368324
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 CMAKE_INSTALL:=1
 



From lede-commits at lists.infradead.org  Thu Apr  4 03:14:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 06:14:00 -0400
Subject: [openwrt/openwrt]  hostapd: remove unused fix
In-Reply-To: <171222563932.553712.17923813221826780552@git-01.infra.openwrt.org>
References: <171222563932.553712.17923813221826780552@git-01.infra.openwrt.org>
Message-ID: <mailman.23563.1712225648.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3f5a9e80da4a0edae4c45cf370b2846ca6785fae

commit 3f5a9e80da4a0edae4c45cf370b2846ca6785fae
Author: Eneas U de Queiroz <cotequeiroz at gmail.com>
AuthorDate: Tue Feb 13 21:58:42 2024 -0300

    hostapd: remove unused fix
    
    Patch 050-build_fix.patch fixes the abscence of sha384-kdf.o from the
    list of needed objetct files when FILS is selected without any other
    option that will select the .o file.
    
    While it is a bug waiting to be fixes upstream, it is not needed for
    OpenWrt use case, because OWE already selects sha384-kdf.o, and FILS is
    selected along with OWE.
    
    Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
---
 .../services/hostapd/patches/050-build_fix.patch   | 20 ------------
 ...10-mbedtls-TLS-crypto-option-initial-port.patch | 38 +++++++++++-----------
 .../patches/120-mbedtls-fips186_2_prf.patch        |  4 +--
 ...s-Makefile-make-run-tests-with-CONFIG_TLS.patch | 24 +++++++-------
 .../services/hostapd/patches/200-multicall.patch   | 20 ++++++------
 .../patches/380-disable_ctrl_iface_mib.patch       |  2 +-
 .../patches/500-lto-jobserver-support.patch        |  6 ++--
 .../hostapd/patches/600-ubus_support.patch         |  2 +-
 .../hostapd/patches/601-ucode_support.patch        |  2 +-
 9 files changed, 49 insertions(+), 69 deletions(-)

diff --git a/package/network/services/hostapd/patches/050-build_fix.patch b/package/network/services/hostapd/patches/050-build_fix.patch
deleted file mode 100644
index 005cc726c6..0000000000
--- a/package/network/services/hostapd/patches/050-build_fix.patch
+++ /dev/null
@@ -1,20 +0,0 @@
---- a/hostapd/Makefile
-+++ b/hostapd/Makefile
-@@ -326,6 +326,7 @@ ifdef CONFIG_FILS
- CFLAGS += -DCONFIG_FILS
- OBJS += ../src/ap/fils_hlp.o
- NEED_SHA384=y
-+NEED_HMAC_SHA384_KDF=y
- NEED_AES_SIV=y
- ifdef CONFIG_FILS_SK_PFS
- CFLAGS += -DCONFIG_FILS_SK_PFS
---- a/wpa_supplicant/Makefile
-+++ b/wpa_supplicant/Makefile
-@@ -334,6 +334,7 @@ endif
- ifdef CONFIG_FILS
- CFLAGS += -DCONFIG_FILS
- NEED_SHA384=y
-+NEED_HMAC_SHA384_KDF=y
- NEED_AES_SIV=y
- ifdef CONFIG_FILS_SK_PFS
- CFLAGS += -DCONFIG_FILS_SK_PFS
diff --git a/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch b/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
index 7c82c469aa..b786d3bccb 100644
--- a/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
+++ b/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
@@ -21,7 +21,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -758,6 +758,40 @@ endif
+@@ -757,6 +757,40 @@ endif
  CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
  endif
  
@@ -62,7 +62,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifeq ($(CONFIG_TLS), gnutls)
  ifndef CONFIG_CRYPTO
  # default to libgcrypt
-@@ -937,9 +971,11 @@ endif
+@@ -936,9 +970,11 @@ endif
  
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -74,7 +74,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_AES_EAX
  AESOBJS += ../src/crypto/aes-eax.o
  NEED_AES_CTR=y
-@@ -949,38 +985,48 @@ AESOBJS += ../src/crypto/aes-siv.o
+@@ -948,38 +984,48 @@ AESOBJS += ../src/crypto/aes-siv.o
  NEED_AES_CTR=y
  endif
  ifdef NEED_AES_CTR
@@ -123,7 +123,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_AES_DEC
  ifdef CONFIG_INTERNAL_AES
  AESOBJS += ../src/crypto/aes-internal-dec.o
-@@ -995,12 +1041,16 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -994,12 +1040,16 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -140,7 +140,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_INTERNAL_SHA1
  SHA1OBJS += ../src/crypto/sha1-internal.o
  ifdef NEED_FIPS186_2_PRF
-@@ -1009,16 +1059,22 @@ endif
+@@ -1008,16 +1058,22 @@ endif
  endif
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -163,7 +163,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef NEED_SHA1
  OBJS += $(SHA1OBJS)
-@@ -1028,11 +1084,13 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -1027,11 +1083,13 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -177,7 +177,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef NEED_MD5
  ifdef CONFIG_INTERNAL_MD5
-@@ -1071,56 +1129,81 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -1070,56 +1128,81 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -259,7 +259,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef CONFIG_INTERNAL_SHA384
  CFLAGS += -DCONFIG_INTERNAL_SHA384
-@@ -1165,11 +1248,13 @@ HOBJS += $(SHA1OBJS)
+@@ -1164,11 +1247,13 @@ HOBJS += $(SHA1OBJS)
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -273,7 +273,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef CONFIG_RADIUS_SERVER
  CFLAGS += -DRADIUS_SERVER
-@@ -1342,7 +1427,9 @@ NOBJS += ../src/utils/trace.o
+@@ -1341,7 +1426,9 @@ NOBJS += ../src/utils/trace.o
  endif
  
  HOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o
@@ -283,7 +283,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_INTERNAL_AES
  HOBJS += ../src/crypto/aes-internal.o
  HOBJS += ../src/crypto/aes-internal-enc.o
-@@ -1365,13 +1452,17 @@ SOBJS += ../src/common/sae.o
+@@ -1364,13 +1451,17 @@ SOBJS += ../src/common/sae.o
  SOBJS += ../src/common/sae_pk.o
  SOBJS += ../src/common/dragonfly.o
  SOBJS += $(AESOBJS)
@@ -7765,7 +7765,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CONFIG_SIM_SIMULATOR=y
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -1230,6 +1230,29 @@ endif
+@@ -1229,6 +1229,29 @@ endif
  CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
  endif
  
@@ -7795,7 +7795,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifeq ($(CONFIG_TLS), gnutls)
  ifndef CONFIG_CRYPTO
  # default to libgcrypt
-@@ -1422,9 +1445,11 @@ endif
+@@ -1421,9 +1444,11 @@ endif
  
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -7807,7 +7807,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP
  # Seems to be needed at least with BoringSSL
  NEED_INTERNAL_AES_WRAP=y
-@@ -1438,9 +1463,11 @@ endif
+@@ -1437,9 +1462,11 @@ endif
  
  ifdef NEED_INTERNAL_AES_WRAP
  ifneq ($(CONFIG_TLS), linux)
@@ -7819,7 +7819,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_AES_EAX
  AESOBJS += ../src/crypto/aes-eax.o
  NEED_AES_CTR=y
-@@ -1450,35 +1477,45 @@ AESOBJS += ../src/crypto/aes-siv.o
+@@ -1449,35 +1476,45 @@ AESOBJS += ../src/crypto/aes-siv.o
  NEED_AES_CTR=y
  endif
  ifdef NEED_AES_CTR
@@ -7865,7 +7865,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_AES_ENC
  ifdef CONFIG_INTERNAL_AES
  AESOBJS += ../src/crypto/aes-internal-enc.o
-@@ -1493,12 +1530,16 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -1492,12 +1529,16 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -7882,7 +7882,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_INTERNAL_SHA1
  SHA1OBJS += ../src/crypto/sha1-internal.o
  ifdef NEED_FIPS186_2_PRF
-@@ -1510,29 +1551,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2
+@@ -1509,29 +1550,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2
  else
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -7920,7 +7920,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_MD5
  ifdef CONFIG_INTERNAL_MD5
  MD5OBJS += ../src/crypto/md5-internal.o
-@@ -1587,12 +1636,17 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -1586,12 +1635,17 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -7938,7 +7938,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_INTERNAL_SHA256
  SHA256OBJS += ../src/crypto/sha256-internal.o
  endif
-@@ -1605,50 +1659,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512
+@@ -1604,50 +1658,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512
  SHA256OBJS += ../src/crypto/sha512-internal.o
  endif
  ifdef NEED_TLS_PRF_SHA256
@@ -8007,7 +8007,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef NEED_ASN1
  OBJS += ../src/tls/asn1.o
-@@ -1823,10 +1895,12 @@ ifdef CONFIG_FIPS
+@@ -1822,10 +1894,12 @@ ifdef CONFIG_FIPS
  CFLAGS += -DCONFIG_FIPS
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
diff --git a/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch b/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch
index 8c11eeb01d..c101fbf75f 100644
--- a/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch
+++ b/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch
@@ -12,7 +12,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -772,10 +772,6 @@ endif
+@@ -771,10 +771,6 @@ endif
  OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
  HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
  SOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
@@ -101,7 +101,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -1241,10 +1241,6 @@ endif
+@@ -1240,10 +1240,6 @@ endif
  OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
  OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
  OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
diff --git a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
index fa2a1332a8..32e8ec3a89 100644
--- a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
+++ b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
@@ -61,7 +61,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -709,6 +709,7 @@ CFLAGS += -DCONFIG_TLSV12
+@@ -708,6 +708,7 @@ CFLAGS += -DCONFIG_TLSV12
  endif
  
  ifeq ($(CONFIG_TLS), wolfssl)
@@ -69,7 +69,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CONFIG_CRYPTO=wolfssl
  ifdef TLS_FUNCS
  OBJS += ../src/crypto/tls_wolfssl.o
-@@ -729,6 +730,7 @@ endif
+@@ -728,6 +729,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), openssl)
@@ -77,7 +77,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
  CONFIG_CRYPTO=openssl
  ifdef TLS_FUNCS
-@@ -759,6 +761,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
+@@ -758,6 +760,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
  endif
  
  ifeq ($(CONFIG_TLS), mbedtls)
@@ -85,7 +85,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  CONFIG_CRYPTO=mbedtls
  endif
-@@ -789,6 +792,7 @@ endif
+@@ -788,6 +791,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), gnutls)
@@ -93,7 +93,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  # default to libgcrypt
  CONFIG_CRYPTO=gnutls
-@@ -819,6 +823,7 @@ endif
+@@ -818,6 +822,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), internal)
@@ -101,7 +101,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  CONFIG_CRYPTO=internal
  endif
-@@ -897,6 +902,7 @@ endif
+@@ -896,6 +901,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), linux)
@@ -1294,7 +1294,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  		if (need_more_data) {
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -1189,6 +1189,7 @@ TLS_FUNCS=y
+@@ -1188,6 +1188,7 @@ TLS_FUNCS=y
  endif
  
  ifeq ($(CONFIG_TLS), wolfssl)
@@ -1302,7 +1302,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef TLS_FUNCS
  CFLAGS += -DWOLFSSL_DER_LOAD
  OBJS += ../src/crypto/tls_wolfssl.o
-@@ -1204,6 +1205,7 @@ LIBS_p += -lwolfssl -lm
+@@ -1203,6 +1204,7 @@ LIBS_p += -lwolfssl -lm
  endif
  
  ifeq ($(CONFIG_TLS), openssl)
@@ -1310,7 +1310,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
  ifdef TLS_FUNCS
  CFLAGS += -DEAP_TLS_OPENSSL
-@@ -1231,6 +1233,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
+@@ -1230,6 +1232,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
  endif
  
  ifeq ($(CONFIG_TLS), mbedtls)
@@ -1318,7 +1318,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  CONFIG_CRYPTO=mbedtls
  endif
-@@ -1250,6 +1253,7 @@ endif
+@@ -1249,6 +1252,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), gnutls)
@@ -1326,7 +1326,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  # default to libgcrypt
  CONFIG_CRYPTO=gnutls
-@@ -1280,6 +1284,7 @@ endif
+@@ -1279,6 +1283,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), internal)
@@ -1334,7 +1334,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  CONFIG_CRYPTO=internal
  endif
-@@ -1360,6 +1365,7 @@ endif
+@@ -1359,6 +1364,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), linux)
diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch
index 5693e203d8..ae027f7a95 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -18,7 +18,7 @@
  OBJS += ../src/ap/vlan_init.o
  OBJS += ../src/ap/vlan_ifconfig.o
  OBJS += ../src/ap/vlan.o
-@@ -359,10 +361,14 @@ CFLAGS += -DCONFIG_MBO
+@@ -358,10 +360,14 @@ CFLAGS += -DCONFIG_MBO
  OBJS += ../src/ap/mbo_ap.o
  endif
  
@@ -36,7 +36,7 @@
  LIBS += $(DRV_AP_LIBS)
  
  ifdef CONFIG_L2_PACKET
-@@ -1393,6 +1399,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
+@@ -1392,6 +1398,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
  _OBJS_VAR := OBJS
  include ../src/objs.mk
  
@@ -49,7 +49,7 @@
  hostapd: $(OBJS)
  	$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
  	@$(E) "  LD " $@
-@@ -1473,6 +1485,12 @@ include ../src/objs.mk
+@@ -1472,6 +1484,12 @@ include ../src/objs.mk
  _OBJS_VAR := SOBJS
  include ../src/objs.mk
  
@@ -72,7 +72,7 @@
  include ../src/build.rules
  
  ifdef CONFIG_BUILD_PASN_SO
-@@ -389,7 +390,9 @@ endif
+@@ -388,7 +389,9 @@ endif
  ifdef CONFIG_IBSS_RSN
  NEED_RSN_AUTHENTICATOR=y
  CFLAGS += -DCONFIG_IBSS_RSN
@@ -82,7 +82,7 @@
  OBJS += ibss_rsn.o
  endif
  
-@@ -981,6 +984,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
+@@ -980,6 +983,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
  CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
  LIBS += -ldl -rdynamic
  endif
@@ -93,7 +93,7 @@
  endif
  
  ifdef CONFIG_AP
-@@ -988,9 +995,11 @@ NEED_EAP_COMMON=y
+@@ -987,9 +994,11 @@ NEED_EAP_COMMON=y
  NEED_RSN_AUTHENTICATOR=y
  CFLAGS += -DCONFIG_AP
  OBJS += ap.o
@@ -105,7 +105,7 @@
  OBJS += ../src/ap/hostapd.o
  OBJS += ../src/ap/wpa_auth_glue.o
  OBJS += ../src/ap/utils.o
-@@ -1081,6 +1090,12 @@ endif
+@@ -1080,6 +1089,12 @@ endif
  ifdef CONFIG_HS20
  OBJS += ../src/ap/hs20.o
  endif
@@ -118,7 +118,7 @@
  endif
  
  ifdef CONFIG_MBO
-@@ -1090,7 +1105,9 @@ NEED_GAS=y
+@@ -1089,7 +1104,9 @@ NEED_GAS=y
  endif
  
  ifdef NEED_RSN_AUTHENTICATOR
@@ -128,7 +128,7 @@
  NEED_AES_WRAP=y
  OBJS += ../src/ap/wpa_auth.o
  OBJS += ../src/ap/wpa_auth_ie.o
-@@ -2080,6 +2097,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
+@@ -2079,6 +2096,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
  
  _OBJS_VAR := OBJS
  include ../src/objs.mk
@@ -141,7 +141,7 @@
  wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
  	$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
  	@$(E) "  LD " $@
-@@ -2212,6 +2235,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
+@@ -2211,6 +2234,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
  	$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
  	@$(E) "  sed" $<
  
diff --git a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
index 32699e4bc4..061f447e05 100644
--- a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
+++ b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
@@ -30,7 +30,7 @@
  			reply_len = -1;
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -1039,6 +1039,9 @@ ifdef CONFIG_FILS
+@@ -1038,6 +1038,9 @@ ifdef CONFIG_FILS
  OBJS += ../src/ap/fils_hlp.o
  endif
  ifdef CONFIG_CTRL_IFACE
diff --git a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch b/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
index 98ded1f009..e1f568a55c 100644
--- a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
+++ b/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -1409,7 +1409,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
+@@ -1408,7 +1408,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
  	@$(AR) cr $@ hostapd_multi.o $(OBJS)
  
  hostapd: $(OBJS)
@@ -9,7 +9,7 @@
  	@$(E) "  LD " $@
  
  ifdef CONFIG_WPA_TRACE
-@@ -1420,7 +1420,7 @@ _OBJS_VAR := OBJS_c
+@@ -1419,7 +1419,7 @@ _OBJS_VAR := OBJS_c
  include ../src/objs.mk
  
  hostapd_cli: $(OBJS_c)
@@ -20,7 +20,7 @@
  NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -2107,31 +2107,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
+@@ -2106,31 +2106,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
  	@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
  
  wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index 00f577caba..412cc0a032 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -336,7 +336,7 @@
  ifdef CONFIG_CODE_COVERAGE
  CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE
  LIBS += -lgcov
-@@ -1043,6 +1050,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
+@@ -1042,6 +1049,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
  CFLAGS += -DCONFIG_CTRL_IFACE_MIB
  endif
  OBJS += ../src/ap/ctrl_iface_ap.o
diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch
index e459721b89..9704389fdb 100644
--- a/package/network/services/hostapd/patches/601-ucode_support.patch
+++ b/package/network/services/hostapd/patches/601-ucode_support.patch
@@ -176,7 +176,7 @@
  endif
  
  ifdef CONFIG_CODE_COVERAGE
-@@ -1053,6 +1065,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o
+@@ -1052,6 +1064,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o
  ifdef CONFIG_UBUS
  OBJS += ../src/ap/ubus.o
  endif



From lede-commits at lists.infradead.org  Thu Apr  4 03:13:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 06:13:59 -0400
Subject: [openwrt/openwrt]  hostapd: bump to 2024-03-09
In-Reply-To: <171222563932.553712.17923813221826780552@git-01.infra.openwrt.org>
References: <171222563932.553712.17923813221826780552@git-01.infra.openwrt.org>
Message-ID: <mailman.23566.1712225650.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/24d0e74627bb12305a8b0058af6261f3fd4012bf

commit 24d0e74627bb12305a8b0058af6261f3fd4012bf
Author: Eneas U de Queiroz <cotequeiroz at gmail.com>
AuthorDate: Sat Feb 10 18:10:08 2024 -0300

    hostapd: bump to 2024-03-09
    
    This brings many changes, including fixes for a couple of memory leaks,
    and improved interoperability with 802.11r.  There are also many changes
    related to 802.11be, which is not enabled at this time.
    
    Fixed upstream:
     - 022-hostapd-fix-use-of-uninitialized-stack-variables.patch
     - 180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch
     - 993-2023-10-28-ACS-Fix-typo-in-bw_40-frequency-array.patch
    
    Switch PKG_SOURCE_URL to https, since http is not currently working.
    
    Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
    Tested-by: Ilya Katsnelson <me at 0upti.me>
    Tested by: Andrew Sim <andrewsimz at gmail.com>
---
 package/network/services/hostapd/Makefile          |  10 +-
 .../001-wolfssl-init-RNG-with-ECC-key.patch        |  43 ------
 ...DFS-channels-to-be-selected-if-dfs-is-ena.patch |  28 ++--
 ...e-deterministic-channel-on-channel-switch.patch |   6 +-
 ...021-fix-sta-add-after-previous-connection.patch |   4 +-
 ...-fix-use-of-uninitialized-stack-variables.patch |  25 ----
 ...211-rewrite-neigh-code-to-not-depend-on-l.patch |  18 +--
 ...processing-authentication-frames-in-block.patch |   2 +-
 .../services/hostapd/patches/050-build_fix.patch   |   4 +-
 ...10-mbedtls-TLS-crypto-option-initial-port.patch |  42 +++---
 .../patches/120-mbedtls-fips186_2_prf.patch        |   4 +-
 ...s-Makefile-make-run-tests-with-CONFIG_TLS.patch | 166 ++++++++++-----------
 ...0-hostapd-update-cfs0-and-cfs1-for-160MHz.patch |  24 +--
 ...211-fix-setting-QoS-map-on-secondary-BSSs.patch |  20 ---
 ...211-update-drv-ifindex-on-removing-the-fi.patch |   2 +-
 ...e-nl80211_put_freq_params-call-outside-of.patch |   8 +-
 ...cel-channel_list_update_timeout-in-hostap.patch |   4 +-
 .../services/hostapd/patches/200-multicall.patch   |  48 +++---
 .../services/hostapd/patches/300-noscan.patch      |   6 +-
 .../services/hostapd/patches/301-mesh-noscan.patch |  18 +--
 .../hostapd/patches/310-rescan_immediately.patch   |   2 +-
 .../hostapd/patches/330-nl80211_fix_set_freq.patch |   2 +-
 .../341-mesh-ctrl-iface-channel-switch.patch       |  14 +-
 .../patches/350-nl80211_del_beacon_bss.patch       |   9 +-
 .../patches/380-disable_ctrl_iface_mib.patch       |  34 ++---
 .../patches/390-wpa_ie_cap_workaround.patch        |   4 +-
 .../hostapd/patches/420-indicate-features.patch    |   4 +-
 .../hostapd/patches/430-hostapd_cli_ifdef.patch    |   4 +-
 ...ant-add-new-config-params-to-be-used-with.patch |   8 +-
 ...finition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch |  76 ++++++++++
 .../patches/463-add-mcast_rate-to-11s.patch        |   6 +-
 .../hostapd/patches/464-fix-mesh-obss-check.patch  |   2 +-
 ...5-hostapd-config-support-random-BSS-color.patch |   2 +-
 .../hostapd/patches/470-survey_data_fallback.patch |   4 +-
 .../patches/500-lto-jobserver-support.patch        |   6 +-
 .../hostapd/patches/590-rrm-wnm-statistics.patch   |  14 +-
 .../hostapd/patches/600-ubus_support.patch         |  96 ++++++------
 .../hostapd/patches/601-ucode_support.patch        | 107 ++++++-------
 .../hostapd/patches/701-reload_config_inline.patch |   2 +-
 .../hostapd/patches/710-vlan_no_bridge.patch       |   2 +-
 .../hostapd/patches/711-wds_bridge_force.patch     |   4 +-
 .../hostapd/patches/720-iface_max_num_sta.patch    |  10 +-
 .../services/hostapd/patches/730-ft_iface.patch    |   4 +-
 .../services/hostapd/patches/740-snoop_iface.patch |   8 +-
 .../750-qos_map_set_without_interworking.patch     |  18 +--
 .../751-qos_map_ignore_when_unsupported.patch      |   2 +-
 .../hostapd/patches/760-dynamic_own_ip.patch       |  14 +-
 .../hostapd/patches/761-shared_das_port.patch      |   2 +-
 .../hostapd/patches/770-radius_server.patch        |   2 +-
 ...e-WNM_AP-functions-dependant-on-CONFIG_AP.patch |   4 +-
 .../hostapd/patches/991-Fix-OpenWrt-13156.patch    |  10 +-
 ...1-add-extra-ies-only-if-allowed-by-driver.patch |   6 +-
 ...-28-ACS-Fix-typo-in-bw_40-frequency-array.patch |  25 ----
 package/network/services/hostapd/src/src/ap/ubus.c |   3 +-
 package/network/services/hostapd/src/src/ap/ubus.h |   3 +
 55 files changed, 477 insertions(+), 518 deletions(-)

diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 2b072bd599..780acc47c4 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -5,13 +5,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=hostapd
-PKG_RELEASE:=6
+PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=http://w1.fi/hostap.git
+PKG_SOURCE_URL:=https://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-09-08
-PKG_SOURCE_VERSION:=e5ccbfc69ecf297590341ae8b461edba9d8e964c
-PKG_MIRROR_HASH:=8be806f6c88e736fff920e0d3e2cde7188fbf640fef47e9aeaad504674bfc0f3
+PKG_SOURCE_DATE:=2024-03-09
+PKG_SOURCE_VERSION:=695277a5b3da08b9a8a4e7117b933deb8b4950a7
+PKG_MIRROR_HASH:=8d6cb89be101bb3dcd84e7eb29484111dfeeeadf49eae85594b08011ba0ed62e
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=BSD-3-Clause
diff --git a/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch b/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch
deleted file mode 100644
index 269dcaac75..0000000000
--- a/package/network/services/hostapd/patches/001-wolfssl-init-RNG-with-ECC-key.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 21ce83b4ae2b9563175fdb4fc4312096cc399cf8 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Wed, 5 May 2021 00:44:34 +0200
-Subject: [PATCH] wolfssl: add RNG to EC key
-
-Since upstream commit 6467de5a8840 ("Randomize z ordinates in
-scalar mult when timing resistant") WolfSSL requires a RNG for
-the EC key when built hardened which is the default.
-
-Set the RNG for the EC key to fix connections for OWE clients.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
----
- src/crypto/crypto_wolfssl.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/src/crypto/crypto_wolfssl.c
-+++ b/src/crypto/crypto_wolfssl.c
-@@ -1340,6 +1340,7 @@ int ecc_projective_add_point(ecc_point *
- 
- struct crypto_ec {
- 	ecc_key key;
-+	WC_RNG rng;
- 	mp_int a;
- 	mp_int prime;
- 	mp_int order;
-@@ -1394,6 +1395,8 @@ struct crypto_ec * crypto_ec_init(int gr
- 		return NULL;
- 
- 	if (wc_ecc_init(&e->key) != 0 ||
-+	    wc_InitRng(&e->rng) != 0 ||
-+	    wc_ecc_set_rng(&e->key, &e->rng) != 0 ||
- 	    wc_ecc_set_curve(&e->key, 0, curve_id) != 0 ||
- 	    mp_init(&e->a) != MP_OKAY ||
- 	    mp_init(&e->prime) != MP_OKAY ||
-@@ -1425,6 +1428,7 @@ void crypto_ec_deinit(struct crypto_ec*
- 	mp_clear(&e->order);
- 	mp_clear(&e->prime);
- 	mp_clear(&e->a);
-+	wc_FreeRng(&e->rng);
- 	wc_ecc_free(&e->key);
- 	os_free(e);
- }
diff --git a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
index 0a51c84d21..4291f01518 100644
--- a/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
+++ b/package/network/services/hostapd/patches/010-mesh-Allow-DFS-channels-to-be-selected-if-dfs-is-ena.patch
@@ -9,12 +9,12 @@ Note: DFS is assumed to be usable if a country code has been set
 Signed-off-by: Benjamin Berg <benjamin at sipsolutions.net>
 Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
 ---
- wpa_supplicant/wpa_supplicant.c | 25 +++++++++++++++++++------
- 1 file changed, 19 insertions(+), 6 deletions(-)
+ wpa_supplicant/wpa_supplicant.c | 38 ++++++++++++++++++++++-----------
+ 1 file changed, 25 insertions(+), 13 deletions(-)
 
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2638,7 +2638,7 @@ static int drv_supports_vht(struct wpa_s
+@@ -2698,7 +2698,7 @@ static int drv_supports_vht(struct wpa_s
  }
  
  
@@ -23,7 +23,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  {
  	int i;
  
-@@ -2647,7 +2647,10 @@ static bool ibss_mesh_is_80mhz_avail(int
+@@ -2707,7 +2707,10 @@ static bool ibss_mesh_is_80mhz_avail(int
  
  		chan = hw_get_channel_chan(mode, i, NULL);
  		if (!chan ||
@@ -35,7 +35,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  			return false;
  	}
  
-@@ -2774,7 +2777,7 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2834,7 +2837,7 @@ static void ibss_mesh_select_40mhz(struc
  				   const struct wpa_ssid *ssid,
  				   struct hostapd_hw_modes *mode,
  				   struct hostapd_freq_params *freq,
@@ -44,7 +44,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  	int chan_idx;
  	struct hostapd_channel_data *pri_chan = NULL, *sec_chan = NULL;
  	int i, res;
-@@ -2798,8 +2801,11 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2858,8 +2861,11 @@ static void ibss_mesh_select_40mhz(struc
  		return;
  
  	/* Check primary channel flags */
@@ -57,7 +57,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  
  #ifdef CONFIG_HT_OVERRIDES
  	if (ssid->disable_ht40)
-@@ -2825,8 +2831,11 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2885,8 +2891,11 @@ static void ibss_mesh_select_40mhz(struc
  		return;
  
  	/* Check secondary channel flags */
@@ -70,7 +70,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  
  	if (ht40 == -1) {
  		if (!(pri_chan->flag & HOSTAPD_CHAN_HT40MINUS))
-@@ -2880,7 +2889,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2940,7 +2949,7 @@ static bool ibss_mesh_select_80_160mhz(s
  				       const struct wpa_ssid *ssid,
  				       struct hostapd_hw_modes *mode,
  				       struct hostapd_freq_params *freq,
@@ -79,7 +79,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  	static const int bw80[] = {
  		5180, 5260, 5500, 5580, 5660, 5745, 5825,
  		5955, 6035, 6115, 6195, 6275, 6355, 6435,
-@@ -2925,7 +2934,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2985,7 +2994,7 @@ static bool ibss_mesh_select_80_160mhz(s
  		goto skip_80mhz;
  
  	/* Use 40 MHz if channel not usable */
@@ -88,7 +88,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  		goto skip_80mhz;
  
  	chwidth = CONF_OPER_CHWIDTH_80MHZ;
-@@ -2939,7 +2948,7 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -2999,7 +3008,7 @@ static bool ibss_mesh_select_80_160mhz(s
  	if ((mode->he_capab[ieee80211_mode].phy_cap[
  		     HE_PHYCAP_CHANNEL_WIDTH_SET_IDX] &
  	     HE_PHYCAP_CHANNEL_WIDTH_SET_160MHZ_IN_5G) && is_6ghz &&
@@ -97,7 +97,7 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  		for (j = 0; j < ARRAY_SIZE(bw160); j++) {
  			if (freq->freq == bw160[j]) {
  				chwidth = CONF_OPER_CHWIDTH_160MHZ;
-@@ -2967,10 +2976,12 @@ static bool ibss_mesh_select_80_160mhz(s
+@@ -3027,10 +3036,12 @@ static bool ibss_mesh_select_80_160mhz(s
  				if (!chan)
  					continue;
  
@@ -113,15 +113,15 @@ Signed-off-by: Peter Oh <peter.oh at bowerswilkins.com>
  
  				/* Found a suitable second segment for 80+80 */
  				chwidth = CONF_OPER_CHWIDTH_80P80MHZ;
-@@ -3025,6 +3036,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3085,6 +3096,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
  	int i, obss_scan = 1;
  	u8 channel;
- 	bool is_6ghz;
+ 	bool is_6ghz, is_24ghz;
 +	bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
  
  	freq->freq = ssid->frequency;
  
-@@ -3070,9 +3082,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3133,9 +3145,9 @@ void ibss_mesh_setup_freq(struct wpa_sup
  	freq->channel = channel;
  	/* Setup higher BW only for 5 GHz */
  	if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
diff --git a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch
index 07b7a5971d..a53fcc480c 100644
--- a/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch
+++ b/package/network/services/hostapd/patches/011-mesh-use-deterministic-channel-on-channel-switch.patch
@@ -64,11 +64,11 @@ Signed-off-by: Markus Theil <markus.theil at tu-ilmenau.de>
  		return NULL;
 +
  	chan_idx = _rand % num_available_chandefs;
- 	dfs_find_channel(iface, &chan, chan_idx, type);
- 	if (!chan) {
+ 	wpa_printf(MSG_DEBUG, "DFS: Picked random entry from the list: %d/%d",
+ 		   chan_idx, num_available_chandefs);
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -11017,6 +11017,10 @@ static int nl80211_switch_channel(void *
+@@ -11195,6 +11195,10 @@ static int nl80211_switch_channel(void *
  	if (ret)
  		goto error;
  
diff --git a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
index edf599e3e2..b1eba69c55 100644
--- a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
+++ b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
@@ -1,6 +1,6 @@
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -4621,6 +4621,13 @@ static int add_associated_sta(struct hos
+@@ -4659,6 +4659,13 @@ static int add_associated_sta(struct hos
  	 * drivers to accept the STA parameter configuration. Since this is
  	 * after a new FT-over-DS exchange, a new TK has been derived, so key
  	 * reinstallation is not a concern for this case.
@@ -14,7 +14,7 @@
  	 */
  	wpa_printf(MSG_DEBUG, "Add associated STA " MACSTR
  		   " (added_unassoc=%d auth_alg=%u ft_over_ds=%u reassoc=%d authorized=%d ft_tk=%d fils_tk=%d)",
-@@ -4634,7 +4641,8 @@ static int add_associated_sta(struct hos
+@@ -4672,7 +4679,8 @@ static int add_associated_sta(struct hos
  	    (!(sta->flags & WLAN_STA_AUTHORIZED) ||
  	     (reassoc && sta->ft_over_ds && sta->auth_alg == WLAN_AUTH_FT) ||
  	     (!wpa_auth_sta_ft_tk_already_set(sta->wpa_sm) &&
diff --git a/package/network/services/hostapd/patches/022-hostapd-fix-use-of-uninitialized-stack-variables.patch b/package/network/services/hostapd/patches/022-hostapd-fix-use-of-uninitialized-stack-variables.patch
deleted file mode 100644
index 8dec325c98..0000000000
--- a/package/network/services/hostapd/patches/022-hostapd-fix-use-of-uninitialized-stack-variables.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Thu, 8 Jul 2021 16:33:03 +0200
-Subject: [PATCH] hostapd: fix use of uninitialized stack variables
-
-When a CSA is performed on an 80 MHz channel, hostapd_change_config_freq
-unconditionally calls hostapd_set_oper_centr_freq_seg0/1_idx with seg0/1
-filled by ieee80211_freq_to_chan.
-However, if ieee80211_freq_to_chan fails (because the freq is 0 or invalid),
-seg0/1 remains uninitialized and filled with stack garbage, causing errors
-such as "hostapd: 80 MHz: center segment 1 configured"
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/src/ap/hostapd.c
-+++ b/src/ap/hostapd.c
-@@ -3764,7 +3764,7 @@ static int hostapd_change_config_freq(st
- 				      struct hostapd_freq_params *old_params)
- {
- 	int channel;
--	u8 seg0, seg1;
-+	u8 seg0 = 0, seg1 = 0;
- 	struct hostapd_hw_modes *mode;
- 
- 	if (!params->channel) {
diff --git a/package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch b/package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
index ef2bb408fb..c5cf8b1b79 100644
--- a/package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
+++ b/package/network/services/hostapd/patches/030-driver_nl80211-rewrite-neigh-code-to-not-depend-on-l.patch
@@ -10,17 +10,17 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -16,9 +16,6 @@
- #include <net/if.h>
+@@ -18,9 +18,6 @@
  #include <netlink/genl/genl.h>
  #include <netlink/genl/ctrl.h>
+ #include <netlink/genl/family.h>
 -#ifdef CONFIG_LIBNL3_ROUTE
 -#include <netlink/route/neighbour.h>
 -#endif /* CONFIG_LIBNL3_ROUTE */
  #include <linux/rtnetlink.h>
  #include <netpacket/packet.h>
  #include <linux/errqueue.h>
-@@ -5783,26 +5780,29 @@ fail:
+@@ -5859,26 +5856,29 @@ fail:
  
  static void rtnl_neigh_delete_fdb_entry(struct i802_bss *bss, const u8 *addr)
  {
@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (err < 0) {
  		wpa_printf(MSG_DEBUG, "nl80211: bridge FDB entry delete for "
  			   MACSTR " ifindex=%d failed: %s", MAC2STR(addr),
-@@ -5812,9 +5812,8 @@ static void rtnl_neigh_delete_fdb_entry(
+@@ -5888,9 +5888,8 @@ static void rtnl_neigh_delete_fdb_entry(
  			   MACSTR, MAC2STR(addr));
  	}
  
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  
-@@ -8492,7 +8491,6 @@ static void *i802_init(struct hostapd_da
+@@ -8615,7 +8614,6 @@ static void *i802_init(struct hostapd_da
  	    (params->num_bridge == 0 || !params->bridge[0]))
  		add_ifidx(drv, br_ifindex, drv->ifindex);
  
@@ -84,7 +84,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (bss->added_if_into_bridge || bss->already_in_bridge) {
  		int err;
  
-@@ -8509,7 +8507,6 @@ static void *i802_init(struct hostapd_da
+@@ -8632,7 +8630,6 @@ static void *i802_init(struct hostapd_da
  			goto failed;
  		}
  	}
@@ -92,7 +92,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
  		wpa_printf(MSG_DEBUG,
-@@ -11883,13 +11880,14 @@ static int wpa_driver_br_add_ip_neigh(vo
+@@ -12071,13 +12068,14 @@ static int wpa_driver_br_add_ip_neigh(vo
  				      const u8 *ipaddr, int prefixlen,
  				      const u8 *addr)
  {
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	int res;
  
  	if (!ipaddr || prefixlen == 0 || !addr)
-@@ -11908,85 +11906,66 @@ static int wpa_driver_br_add_ip_neigh(vo
+@@ -12096,85 +12094,66 @@ static int wpa_driver_br_add_ip_neigh(vo
  	}
  
  	if (version == 4) {
@@ -220,7 +220,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		addrsize = 16;
  	} else {
  		return -EINVAL;
-@@ -12004,41 +11983,30 @@ static int wpa_driver_br_delete_ip_neigh
+@@ -12192,41 +12171,30 @@ static int wpa_driver_br_delete_ip_neigh
  		return -1;
  	}
  
diff --git a/package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch b/package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch
index b7bf9e351e..636ec2d9c8 100644
--- a/package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch
+++ b/package/network/services/hostapd/patches/040-mesh-allow-processing-authentication-frames-in-block.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -3020,15 +3020,6 @@ static void handle_auth(struct hostapd_d
+@@ -3032,15 +3032,6 @@ static void handle_auth(struct hostapd_d
  				       seq_ctrl);
  			return;
  		}
diff --git a/package/network/services/hostapd/patches/050-build_fix.patch b/package/network/services/hostapd/patches/050-build_fix.patch
index 8680b07c66..005cc726c6 100644
--- a/package/network/services/hostapd/patches/050-build_fix.patch
+++ b/package/network/services/hostapd/patches/050-build_fix.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -324,6 +324,7 @@ ifdef CONFIG_FILS
+@@ -326,6 +326,7 @@ ifdef CONFIG_FILS
  CFLAGS += -DCONFIG_FILS
  OBJS += ../src/ap/fils_hlp.o
  NEED_SHA384=y
@@ -10,7 +10,7 @@
  CFLAGS += -DCONFIG_FILS_SK_PFS
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -331,6 +331,7 @@ endif
+@@ -334,6 +334,7 @@ endif
  ifdef CONFIG_FILS
  CFLAGS += -DCONFIG_FILS
  NEED_SHA384=y
diff --git a/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch b/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
index 22107944dc..7c82c469aa 100644
--- a/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
+++ b/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
@@ -21,7 +21,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -745,6 +745,40 @@ endif
+@@ -758,6 +758,40 @@ endif
  CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
  endif
  
@@ -62,7 +62,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifeq ($(CONFIG_TLS), gnutls)
  ifndef CONFIG_CRYPTO
  # default to libgcrypt
-@@ -924,9 +958,11 @@ endif
+@@ -937,9 +971,11 @@ endif
  
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -74,7 +74,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_AES_EAX
  AESOBJS += ../src/crypto/aes-eax.o
  NEED_AES_CTR=y
-@@ -936,38 +972,48 @@ AESOBJS += ../src/crypto/aes-siv.o
+@@ -949,38 +985,48 @@ AESOBJS += ../src/crypto/aes-siv.o
  NEED_AES_CTR=y
  endif
  ifdef NEED_AES_CTR
@@ -123,7 +123,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_AES_DEC
  ifdef CONFIG_INTERNAL_AES
  AESOBJS += ../src/crypto/aes-internal-dec.o
-@@ -982,12 +1028,16 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -995,12 +1041,16 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -140,7 +140,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_INTERNAL_SHA1
  SHA1OBJS += ../src/crypto/sha1-internal.o
  ifdef NEED_FIPS186_2_PRF
-@@ -996,16 +1046,22 @@ endif
+@@ -1009,16 +1059,22 @@ endif
  endif
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -163,7 +163,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef NEED_SHA1
  OBJS += $(SHA1OBJS)
-@@ -1015,11 +1071,13 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -1028,11 +1084,13 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -177,7 +177,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef NEED_MD5
  ifdef CONFIG_INTERNAL_MD5
-@@ -1058,56 +1116,81 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -1071,56 +1129,81 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -259,7 +259,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef CONFIG_INTERNAL_SHA384
  CFLAGS += -DCONFIG_INTERNAL_SHA384
-@@ -1152,11 +1235,13 @@ HOBJS += $(SHA1OBJS)
+@@ -1165,11 +1248,13 @@ HOBJS += $(SHA1OBJS)
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -273,7 +273,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef CONFIG_RADIUS_SERVER
  CFLAGS += -DRADIUS_SERVER
-@@ -1329,7 +1414,9 @@ NOBJS += ../src/utils/trace.o
+@@ -1342,7 +1427,9 @@ NOBJS += ../src/utils/trace.o
  endif
  
  HOBJS += hlr_auc_gw.o ../src/utils/common.o ../src/utils/wpa_debug.o ../src/utils/os_$(CONFIG_OS).o ../src/utils/wpabuf.o ../src/crypto/milenage.o
@@ -283,7 +283,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_INTERNAL_AES
  HOBJS += ../src/crypto/aes-internal.o
  HOBJS += ../src/crypto/aes-internal-enc.o
-@@ -1352,13 +1439,17 @@ SOBJS += ../src/common/sae.o
+@@ -1365,13 +1452,17 @@ SOBJS += ../src/common/sae.o
  SOBJS += ../src/common/sae_pk.o
  SOBJS += ../src/common/dragonfly.o
  SOBJS += $(AESOBJS)
@@ -326,7 +326,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  # Driver interface for Host AP driver
  CONFIG_DRIVER_HOSTAP=y
  
-@@ -278,6 +290,7 @@ CONFIG_IPV6=y
+@@ -281,6 +293,7 @@ CONFIG_IPV6=y
  # openssl = OpenSSL (default)
  # gnutls = GnuTLS
  # internal = Internal TLSv1 implementation (experimental)
@@ -7765,7 +7765,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CONFIG_SIM_SIMULATOR=y
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -1163,6 +1163,29 @@ endif
+@@ -1230,6 +1230,29 @@ endif
  CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONFIG_TLS_DEFAULT_CIPHERS)\"
  endif
  
@@ -7795,7 +7795,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifeq ($(CONFIG_TLS), gnutls)
  ifndef CONFIG_CRYPTO
  # default to libgcrypt
-@@ -1355,9 +1378,11 @@ endif
+@@ -1422,9 +1445,11 @@ endif
  
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -7807,7 +7807,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_OPENSSL_INTERNAL_AES_WRAP
  # Seems to be needed at least with BoringSSL
  NEED_INTERNAL_AES_WRAP=y
-@@ -1371,9 +1396,11 @@ endif
+@@ -1438,9 +1463,11 @@ endif
  
  ifdef NEED_INTERNAL_AES_WRAP
  ifneq ($(CONFIG_TLS), linux)
@@ -7819,7 +7819,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_AES_EAX
  AESOBJS += ../src/crypto/aes-eax.o
  NEED_AES_CTR=y
-@@ -1383,35 +1410,45 @@ AESOBJS += ../src/crypto/aes-siv.o
+@@ -1450,35 +1477,45 @@ AESOBJS += ../src/crypto/aes-siv.o
  NEED_AES_CTR=y
  endif
  ifdef NEED_AES_CTR
@@ -7865,7 +7865,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_AES_ENC
  ifdef CONFIG_INTERNAL_AES
  AESOBJS += ../src/crypto/aes-internal-enc.o
-@@ -1426,12 +1463,16 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -1493,12 +1530,16 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -7882,7 +7882,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_INTERNAL_SHA1
  SHA1OBJS += ../src/crypto/sha1-internal.o
  ifdef NEED_FIPS186_2_PRF
-@@ -1443,29 +1484,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2
+@@ -1510,29 +1551,37 @@ CFLAGS += -DCONFIG_NO_PBKDF2
  else
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -7920,7 +7920,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef NEED_MD5
  ifdef CONFIG_INTERNAL_MD5
  MD5OBJS += ../src/crypto/md5-internal.o
-@@ -1520,12 +1569,17 @@ ifneq ($(CONFIG_TLS), openssl)
+@@ -1587,12 +1636,17 @@ ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), linux)
  ifneq ($(CONFIG_TLS), gnutls)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -7938,7 +7938,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef CONFIG_INTERNAL_SHA256
  SHA256OBJS += ../src/crypto/sha256-internal.o
  endif
-@@ -1538,50 +1592,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512
+@@ -1605,50 +1659,68 @@ CFLAGS += -DCONFIG_INTERNAL_SHA512
  SHA256OBJS += ../src/crypto/sha512-internal.o
  endif
  ifdef NEED_TLS_PRF_SHA256
@@ -8007,7 +8007,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  ifdef NEED_ASN1
  OBJS += ../src/tls/asn1.o
-@@ -1756,10 +1828,12 @@ ifdef CONFIG_FIPS
+@@ -1823,10 +1895,12 @@ ifdef CONFIG_FIPS
  CFLAGS += -DCONFIG_FIPS
  ifneq ($(CONFIG_TLS), openssl)
  ifneq ($(CONFIG_TLS), wolfssl)
@@ -8041,7 +8041,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  # Driver interface for generic Linux wireless extensions
  # Note: WEXT is deprecated in the current Linux kernel version and no new
  # functionality is added to it. nl80211-based interface is the new
-@@ -326,6 +327,7 @@ CONFIG_BACKEND=file
+@@ -329,6 +330,7 @@ CONFIG_BACKEND=file
  # openssl = OpenSSL (default)
  # gnutls = GnuTLS
  # internal = Internal TLSv1 implementation (experimental)
diff --git a/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch b/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch
index a48725264f..8c11eeb01d 100644
--- a/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch
+++ b/package/network/services/hostapd/patches/120-mbedtls-fips186_2_prf.patch
@@ -12,7 +12,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -759,10 +759,6 @@ endif
+@@ -772,10 +772,6 @@ endif
  OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
  HOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
  SOBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
@@ -101,7 +101,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -1174,10 +1174,6 @@ endif
+@@ -1241,10 +1241,6 @@ endif
  OBJS += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
  OBJS_p += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
  OBJS_priv += ../src/crypto/crypto_$(CONFIG_CRYPTO).o
diff --git a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
index e967cff427..fa2a1332a8 100644
--- a/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
+++ b/package/network/services/hostapd/patches/140-tests-Makefile-make-run-tests-with-CONFIG_TLS.patch
@@ -38,15 +38,15 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  src/crypto/Makefile                       | 129 ++++++++++++++++++++-
  src/crypto/crypto_module_tests.c          | 134 ++++++++++++++++++++++
  src/tls/Makefile                          |  11 ++
- tests/Makefile                            |  75 +++++++++---
- tests/hwsim/example-hostapd.config        |  11 +-
- tests/hwsim/example-wpa_supplicant.config |  12 +-
+ tests/Makefile                            |  76 +++++++++---
+ tests/hwsim/example-hostapd.config        |  10 +-
+ tests/hwsim/example-wpa_supplicant.config |  11 +-
  tests/hwsim/test_ap_eap.py                | 114 +++++++++++++-----
  tests/hwsim/test_ap_ft.py                 |   4 +-
  tests/hwsim/test_authsrv.py               |   9 +-
  tests/hwsim/test_dpp.py                   |  19 ++-
  tests/hwsim/test_erp.py                   |  16 +--
- tests/hwsim/test_fils.py                  |   5 +-
+ tests/hwsim/test_fils.py                  |   4 +
  tests/hwsim/test_pmksa_cache.py           |   4 +-
  tests/hwsim/test_sae.py                   |   7 ++
  tests/hwsim/test_suite_b.py               |   3 +
@@ -56,12 +56,12 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  tests/test-https.c                        |  12 +-
  tests/test-https_server.c                 |  12 +-
  wpa_supplicant/Makefile                   |   6 +
- 22 files changed, 524 insertions(+), 91 deletions(-)
+ 22 files changed, 522 insertions(+), 91 deletions(-)
  create mode 100644 tests/test-crypto_module.c
 
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -696,6 +696,7 @@ CFLAGS += -DCONFIG_TLSV12
+@@ -709,6 +709,7 @@ CFLAGS += -DCONFIG_TLSV12
  endif
  
  ifeq ($(CONFIG_TLS), wolfssl)
@@ -69,7 +69,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CONFIG_CRYPTO=wolfssl
  ifdef TLS_FUNCS
  OBJS += ../src/crypto/tls_wolfssl.o
-@@ -716,6 +717,7 @@ endif
+@@ -729,6 +730,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), openssl)
@@ -77,7 +77,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
  CONFIG_CRYPTO=openssl
  ifdef TLS_FUNCS
-@@ -746,6 +748,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
+@@ -759,6 +761,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
  endif
  
  ifeq ($(CONFIG_TLS), mbedtls)
@@ -85,7 +85,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  CONFIG_CRYPTO=mbedtls
  endif
-@@ -776,6 +779,7 @@ endif
+@@ -789,6 +792,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), gnutls)
@@ -93,7 +93,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  # default to libgcrypt
  CONFIG_CRYPTO=gnutls
-@@ -806,6 +810,7 @@ endif
+@@ -819,6 +823,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), internal)
@@ -101,7 +101,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  CONFIG_CRYPTO=internal
  endif
-@@ -884,6 +889,7 @@ endif
+@@ -897,6 +902,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), linux)
@@ -271,7 +271,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  endif
 --- a/src/crypto/crypto_module_tests.c
 +++ b/src/crypto/crypto_module_tests.c
-@@ -2469,6 +2469,139 @@ static int test_hpke(void)
+@@ -2470,6 +2470,139 @@ static int test_hpke(void)
  }
  
  
@@ -411,7 +411,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  static int test_ms_funcs(void)
  {
  #ifndef CONFIG_FIPS
-@@ -2590,6 +2723,7 @@ int crypto_module_tests(void)
+@@ -2591,6 +2724,7 @@ int crypto_module_tests(void)
  	    test_fips186_2_prf() ||
  	    test_extract_expand_hkdf() ||
  	    test_hpke() ||
@@ -444,23 +444,25 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  include ../lib.rules
 --- a/tests/Makefile
 +++ b/tests/Makefile
-@@ -1,8 +1,10 @@
+@@ -1,10 +1,12 @@
 -ALL=test-base64 test-md4 test-milenage \
 -	test-rsa-sig-ver \
 -	test-sha1 \
 -	test-https test-https_server \
--	test-sha256 test-aes test-x509v3 test-list test-rc4
+-	test-sha256 test-aes test-x509v3 test-list test-rc4 \
 +RUN_TESTS= \
 +	test-list \
 +	test-md4 test-rc4 test-sha1 test-sha256 \
 +	test-milenage test-aes \
-+	test-crypto_module
-+
-+ALL=$(RUN_TESTS) test-base64 test-https test-https_server
++	test-crypto_module \
+ 	test-bss
  
++ALL=$(RUN_TESTS) test-base64 test-https test-https_server
++
  include ../src/build.rules
  
-@@ -24,13 +26,27 @@ CFLAGS += -DCONFIG_IEEE80211R_AP
+ ifdef LIBFUZZER
+@@ -25,13 +27,27 @@ CFLAGS += -DCONFIG_IEEE80211R_AP
  CFLAGS += -DCONFIG_IEEE80211R
  CFLAGS += -DCONFIG_TDLS
  
@@ -490,7 +492,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  _OBJS_VAR := LLIBS
  include ../src/objs.mk
-@@ -42,12 +58,43 @@ include ../src/objs.mk
+@@ -43,12 +59,43 @@ include ../src/objs.mk
  LIBS = $(SLIBS) $(DLIBS)
  LLIBS = -Wl,--start-group $(DLIBS) -Wl,--end-group $(SLIBS)
  
@@ -534,8 +536,8 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  test-base64: $(call BUILDOBJ,test-base64.o) $(LIBS)
  	$(LDO) $(LDFLAGS) -o $@ $^ $(LLIBS)
  
-@@ -83,17 +130,11 @@ test-x509v3: $(call BUILDOBJ,test-x509v3
- 
+@@ -141,18 +188,11 @@ test-bss: $(call BUILDOBJ,test-bss.o) $(
+ 	$(LDO) $(LDFLAGS) -o $@ $< $(LLIBS) $(WPA_CFLAGS) $(WPA_OBJS) $(LIBS)
  
  run-tests: $(ALL)
 -	./test-aes
@@ -545,6 +547,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 -	./test-rsa-sig-ver
 -	./test-sha1
 -	./test-sha256
+-	./test-bss
 +	@set -ex; for i in $(RUN_TESTS); do ./$$i; done
  	@echo
  	@echo All tests completed successfully.
@@ -575,14 +578,6 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CONFIG_EAP_EKE=y
  CONFIG_PKCS12=y
  CONFIG_RADIUS_SERVER=y
-@@ -89,6 +81,7 @@ CFLAGS += -DCONFIG_RADIUS_TEST
- CONFIG_MODULE_TESTS=y
- 
- CONFIG_SUITEB=y
-+CONFIG_SUITEB192=$(if $(filter openssl mbedtls,$(CONFIG_TLS)),y,)
- 
- # AddressSanitizer (ASan) can be enabled by uncommenting the following lines.
- # This can be used as a more efficient memory error detector than valgrind
 --- a/tests/hwsim/example-wpa_supplicant.config
 +++ b/tests/hwsim/example-wpa_supplicant.config
 @@ -35,16 +35,7 @@ LIBS += -rdynamic
@@ -603,14 +598,6 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  CONFIG_USIM_SIMULATOR=y
  CONFIG_SIM_SIMULATOR=y
-@@ -137,6 +128,7 @@ CONFIG_TESTING_OPTIONS=y
- CONFIG_MODULE_TESTS=y
- 
- CONFIG_SUITEB=y
-+CONFIG_SUITEB192=$(if $(filter openssl mbedtls,$(CONFIG_TLS)),y,)
- 
- # AddressSanitizer (ASan) can be enabled by uncommenting the following lines.
- # This can be used as a more efficient memory error detector than valgrind
 --- a/tests/hwsim/test_ap_eap.py
 +++ b/tests/hwsim/test_ap_eap.py
 @@ -42,20 +42,42 @@ def check_eap_capa(dev, method):
@@ -708,10 +695,10 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      tls = dev.request("GET tls_library")
 +    if tls.startswith("mbed TLS"):
 +        raise HwsimSkip("TLS v1.3 not supported")
-     if "run=OpenSSL 1.1.1" not in tls and "run=OpenSSL 3.0" not in tls and "wolfSSL" not in tls:
-         raise HwsimSkip("TLS v1.3 not supported")
- 
-@@ -118,11 +157,15 @@ def check_pkcs12_support(dev):
+     ok = ['run=OpenSSL 1.1.1', 'run=OpenSSL 3.0', 'run=OpenSSL 3.1',
+           'run=OpenSSL 3.2', 'wolfSSL']
+     for s in ok:
+@@ -122,11 +161,15 @@ def check_pkcs12_support(dev):
      #    raise HwsimSkip("PKCS#12 not supported with this TLS library: " + tls)
      if tls.startswith("wolfSSL"):
          raise HwsimSkip("PKCS#12 not supported with this TLS library: " + tls)
@@ -727,7 +714,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  def check_ec_support(dev):
      tls = dev.request("GET tls_library")
-@@ -1595,7 +1638,7 @@ def test_ap_wpa2_eap_ttls_pap_subject_ma
+@@ -1741,7 +1784,7 @@ def test_ap_wpa2_eap_ttls_pap_subject_ma
      eap_connect(dev[0], hapd, "TTLS", "pap user",
                  anonymous_identity="ttls", password="password",
                  ca_cert="auth_serv/ca.pem", phase2="auth=PAP",
@@ -736,7 +723,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
                  altsubject_match="EMAIL:noone at example.com;DNS:server.w1.fi;URI:http://example.com/")
      eap_reauth(dev[0], "TTLS")
  
-@@ -2830,6 +2873,7 @@ def test_ap_wpa2_eap_tls_neg_domain_matc
+@@ -2976,6 +3019,7 @@ def test_ap_wpa2_eap_tls_neg_domain_matc
  
  def test_ap_wpa2_eap_tls_neg_subject_match(dev, apdev):
      """WPA2-Enterprise negative test - subject mismatch"""
@@ -744,7 +731,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
      hostapd.add_ap(apdev[0], params)
      dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
-@@ -2890,6 +2934,7 @@ def test_ap_wpa2_eap_tls_neg_subject_mat
+@@ -3036,6 +3080,7 @@ def test_ap_wpa2_eap_tls_neg_subject_mat
  
  def test_ap_wpa2_eap_tls_neg_altsubject_match(dev, apdev):
      """WPA2-Enterprise negative test - altsubject mismatch"""
@@ -752,7 +739,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
      hostapd.add_ap(apdev[0], params)
  
-@@ -3430,7 +3475,7 @@ def test_ap_wpa2_eap_ikev2_oom(dev, apde
+@@ -3582,7 +3627,7 @@ def test_ap_wpa2_eap_ikev2_oom(dev, apde
              dev[0].request("REMOVE_NETWORK all")
  
      tls = dev[0].request("GET tls_library")
@@ -761,7 +748,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
          tests = [(1, "os_get_random;dh_init")]
      else:
          tests = [(1, "crypto_dh_init;dh_init")]
-@@ -4744,7 +4789,7 @@ def test_ap_wpa2_eap_tls_intermediate_ca
+@@ -4896,7 +4941,7 @@ def test_ap_wpa2_eap_tls_intermediate_ca
      params["private_key"] = "auth_serv/iCA-server/server.key"
      hostapd.add_ap(apdev[0], params)
      tls = dev[0].request("GET tls_library")
@@ -770,7 +757,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
          ca_cert = "auth_serv/iCA-user/ca-and-root.pem"
          client_cert = "auth_serv/iCA-user/user_and_ica.pem"
      else:
-@@ -4810,6 +4855,7 @@ def test_ap_wpa2_eap_tls_intermediate_ca
+@@ -4962,6 +5007,7 @@ def test_ap_wpa2_eap_tls_intermediate_ca
      run_ap_wpa2_eap_tls_intermediate_ca_ocsp(dev, apdev, params, "-sha1")
  
  def run_ap_wpa2_eap_tls_intermediate_ca_ocsp(dev, apdev, params, md):
@@ -778,7 +765,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      params = int_eap_server_params()
      params["ca_cert"] = "auth_serv/iCA-server/ca-and-root.pem"
      params["server_cert"] = "auth_serv/iCA-server/server.pem"
-@@ -4819,7 +4865,7 @@ def run_ap_wpa2_eap_tls_intermediate_ca_
+@@ -4971,7 +5017,7 @@ def run_ap_wpa2_eap_tls_intermediate_ca_
      try:
          hostapd.add_ap(apdev[0], params)
          tls = dev[0].request("GET tls_library")
@@ -787,7 +774,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
              ca_cert = "auth_serv/iCA-user/ca-and-root.pem"
              client_cert = "auth_serv/iCA-user/user_and_ica.pem"
          else:
-@@ -4855,7 +4901,7 @@ def run_ap_wpa2_eap_tls_intermediate_ca_
+@@ -5007,7 +5053,7 @@ def run_ap_wpa2_eap_tls_intermediate_ca_
      try:
          hostapd.add_ap(apdev[0], params)
          tls = dev[0].request("GET tls_library")
@@ -796,7 +783,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
              ca_cert = "auth_serv/iCA-user/ca-and-root.pem"
              client_cert = "auth_serv/iCA-user/user_and_ica.pem"
          else:
-@@ -4905,7 +4951,7 @@ def test_ap_wpa2_eap_tls_intermediate_ca
+@@ -5057,7 +5103,7 @@ def test_ap_wpa2_eap_tls_intermediate_ca
      try:
          hostapd.add_ap(apdev[0], params)
          tls = dev[0].request("GET tls_library")
@@ -805,7 +792,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
              ca_cert = "auth_serv/iCA-user/ca-and-root.pem"
              client_cert = "auth_serv/iCA-user/user_and_ica.pem"
          else:
-@@ -4972,7 +5018,7 @@ def test_ap_wpa2_eap_tls_intermediate_ca
+@@ -5124,7 +5170,7 @@ def test_ap_wpa2_eap_tls_intermediate_ca
  
          hostapd.add_ap(apdev[0], params)
          tls = dev[0].request("GET tls_library")
@@ -814,7 +801,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
              ca_cert = "auth_serv/iCA-user/ca-and-root.pem"
              client_cert = "auth_serv/iCA-user/user_and_ica.pem"
          else:
-@@ -5230,6 +5276,7 @@ def test_ap_wpa2_eap_ttls_server_cert_ek
+@@ -5382,6 +5428,7 @@ def test_ap_wpa2_eap_ttls_server_cert_ek
  
  def test_ap_wpa2_eap_ttls_server_pkcs12(dev, apdev):
      """WPA2-Enterprise using EAP-TTLS and server PKCS#12 file"""
@@ -822,7 +809,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      skip_with_fips(dev[0])
      params = int_eap_server_params()
      del params["server_cert"]
-@@ -5242,6 +5289,7 @@ def test_ap_wpa2_eap_ttls_server_pkcs12(
+@@ -5394,6 +5441,7 @@ def test_ap_wpa2_eap_ttls_server_pkcs12(
  
  def test_ap_wpa2_eap_ttls_server_pkcs12_extra(dev, apdev):
      """EAP-TTLS and server PKCS#12 file with extra certs"""
@@ -830,7 +817,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      skip_with_fips(dev[0])
      params = int_eap_server_params()
      del params["server_cert"]
-@@ -5264,6 +5312,7 @@ def test_ap_wpa2_eap_ttls_dh_params_serv
+@@ -5416,6 +5464,7 @@ def test_ap_wpa2_eap_ttls_dh_params_serv
  
  def test_ap_wpa2_eap_ttls_dh_params_dsa_server(dev, apdev):
      """WPA2-Enterprise using EAP-TTLS and alternative server dhparams (DSA)"""
@@ -838,7 +825,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      params = int_eap_server_params()
      params["dh_file"] = "auth_serv/dsaparam.pem"
      hapd = hostapd.add_ap(apdev[0], params)
-@@ -5575,8 +5624,8 @@ def test_ap_wpa2_eap_non_ascii_identity2
+@@ -5727,8 +5776,8 @@ def test_ap_wpa2_eap_non_ascii_identity2
  def test_openssl_cipher_suite_config_wpas(dev, apdev):
      """OpenSSL cipher suite configuration on wpa_supplicant"""
      tls = dev[0].request("GET tls_library")
@@ -849,7 +836,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      params = hostapd.wpa2_eap_params(ssid="test-wpa2-eap")
      hapd = hostapd.add_ap(apdev[0], params)
      eap_connect(dev[0], hapd, "TTLS", "pap user",
-@@ -5602,14 +5651,14 @@ def test_openssl_cipher_suite_config_wpa
+@@ -5754,14 +5803,14 @@ def test_openssl_cipher_suite_config_wpa
  def test_openssl_cipher_suite_config_hapd(dev, apdev):
      """OpenSSL cipher suite configuration on hostapd"""
      tls = dev[0].request("GET tls_library")
@@ -868,7 +855,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      eap_connect(dev[0], hapd, "TTLS", "pap user",
                  anonymous_identity="ttls", password="password",
                  ca_cert="auth_serv/ca.pem", phase2="auth=PAP")
-@@ -6051,13 +6100,17 @@ def test_ap_wpa2_eap_tls_versions(dev, a
+@@ -6207,13 +6256,17 @@ def test_ap_wpa2_eap_tls_versions(dev, a
              check_tls_ver(dev[0], hapd,
                            "tls_disable_tlsv1_0=1 tls_disable_tlsv1_1=1",
                            "TLSv1.2")
@@ -888,10 +875,10 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 +                      "tls_disable_tlsv1_0=1 tls_disable_tlsv1_1=0 tls_disable_tlsv1_2=1", "TLSv1.1")
 +        check_tls_ver(dev[2], hapd,
 +                      "tls_disable_tlsv1_0=0 tls_disable_tlsv1_1=1 tls_disable_tlsv1_2=1", "TLSv1")
-     if "run=OpenSSL 1.1.1" in tls or "run=OpenSSL 3.0" in tls:
+     if "run=OpenSSL 1.1.1" in tls or "run=OpenSSL 3." in tls:
          check_tls_ver(dev[0], hapd,
                        "tls_disable_tlsv1_0=1 tls_disable_tlsv1_1=1 tls_disable_tlsv1_2=1 tls_disable_tlsv1_3=0", "TLSv1.3")
-@@ -6079,6 +6132,11 @@ def test_ap_wpa2_eap_tls_versions_server
+@@ -6235,6 +6288,11 @@ def test_ap_wpa2_eap_tls_versions_server
      tests = [("TLSv1", "[ENABLE-TLSv1.0][DISABLE-TLSv1.1][DISABLE-TLSv1.2][DISABLE-TLSv1.3]"),
               ("TLSv1.1", "[ENABLE-TLSv1.0][ENABLE-TLSv1.1][DISABLE-TLSv1.2][DISABLE-TLSv1.3]"),
               ("TLSv1.2", "[ENABLE-TLSv1.0][ENABLE-TLSv1.1][ENABLE-TLSv1.2][DISABLE-TLSv1.3]")]
@@ -903,7 +890,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      for exp, flags in tests:
          hapd.disable()
          hapd.set("tls_flags", flags)
-@@ -7138,6 +7196,7 @@ def test_ap_wpa2_eap_assoc_rsn(dev, apde
+@@ -7305,6 +7363,7 @@ def test_ap_wpa2_eap_assoc_rsn(dev, apde
  def test_eap_tls_ext_cert_check(dev, apdev):
      """EAP-TLS and external server certification validation"""
      # With internal server certificate chain validation
@@ -911,7 +898,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      id = dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TLS",
                          identity="tls user",
                          ca_cert="auth_serv/ca.pem",
-@@ -7150,6 +7209,7 @@ def test_eap_tls_ext_cert_check(dev, apd
+@@ -7317,6 +7376,7 @@ def test_eap_tls_ext_cert_check(dev, apd
  def test_eap_ttls_ext_cert_check(dev, apdev):
      """EAP-TTLS and external server certification validation"""
      # Without internal server certificate chain validation
@@ -919,7 +906,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      id = dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
                          identity="pap user", anonymous_identity="ttls",
                          password="password", phase2="auth=PAP",
-@@ -7160,6 +7220,7 @@ def test_eap_ttls_ext_cert_check(dev, ap
+@@ -7327,6 +7387,7 @@ def test_eap_ttls_ext_cert_check(dev, ap
  def test_eap_peap_ext_cert_check(dev, apdev):
      """EAP-PEAP and external server certification validation"""
      # With internal server certificate chain validation
@@ -927,7 +914,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      id = dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="PEAP",
                          identity="user", anonymous_identity="peap",
                          ca_cert="auth_serv/ca.pem",
-@@ -7170,6 +7231,7 @@ def test_eap_peap_ext_cert_check(dev, ap
+@@ -7337,6 +7398,7 @@ def test_eap_peap_ext_cert_check(dev, ap
  
  def test_eap_fast_ext_cert_check(dev, apdev):
      """EAP-FAST and external server certification validation"""
@@ -935,7 +922,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      check_eap_capa(dev[0], "FAST")
      # With internal server certificate chain validation
      dev[0].request("SET blob fast_pac_auth_ext ")
-@@ -7184,10 +7246,6 @@ def test_eap_fast_ext_cert_check(dev, ap
+@@ -7351,10 +7413,6 @@ def test_eap_fast_ext_cert_check(dev, ap
      run_ext_cert_check(dev, apdev, id)
  
  def run_ext_cert_check(dev, apdev, net_id):
@@ -948,7 +935,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
 --- a/tests/hwsim/test_ap_ft.py
 +++ b/tests/hwsim/test_ap_ft.py
-@@ -2474,11 +2474,11 @@ def test_ap_ft_ap_oom5(dev, apdev):
+@@ -2486,11 +2486,11 @@ def test_ap_ft_ap_oom5(dev, apdev):
          # This will fail to roam
          dev[0].roam(bssid1, check_bssid=False)
  
@@ -992,7 +979,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
              raise HwsimSkip("Crypto library does not support Brainpool curves: " + tls)
      capa = dev.request("GET_CAPABILITY dpp")
      ver = 1
-@@ -3892,6 +3893,9 @@ def test_dpp_proto_auth_req_no_i_proto_k
+@@ -3902,6 +3903,9 @@ def test_dpp_proto_auth_req_no_i_proto_k
  
  def test_dpp_proto_auth_req_invalid_i_proto_key(dev, apdev):
      """DPP protocol testing - invalid I-proto key in Auth Req"""
@@ -1002,7 +989,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      run_dpp_proto_auth_req_missing(dev, 66, "Invalid Initiator Protocol Key")
  
  def test_dpp_proto_auth_req_no_i_nonce(dev, apdev):
-@@ -3987,7 +3991,12 @@ def test_dpp_proto_auth_resp_no_r_proto_
+@@ -3997,7 +4001,12 @@ def test_dpp_proto_auth_resp_no_r_proto_
  
  def test_dpp_proto_auth_resp_invalid_r_proto_key(dev, apdev):
      """DPP protocol testing - invalid R-Proto Key in Auth Resp"""
@@ -1016,7 +1003,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  
  def test_dpp_proto_auth_resp_no_r_nonce(dev, apdev):
      """DPP protocol testing - no R-nonce in Auth Resp"""
-@@ -4349,11 +4358,17 @@ def test_dpp_proto_pkex_exchange_resp_in
+@@ -4359,11 +4368,17 @@ def test_dpp_proto_pkex_exchange_resp_in
  
  def test_dpp_proto_pkex_cr_req_invalid_bootstrap_key(dev, apdev):
      """DPP protocol testing - invalid Bootstrap Key in PKEX Commit-Reveal Request"""
@@ -1092,21 +1079,20 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
              dev[0].connect("test-wpa2-eap", key_mgmt="WPA-EAP", eap="TTLS",
 --- a/tests/hwsim/test_fils.py
 +++ b/tests/hwsim/test_fils.py
-@@ -1422,7 +1422,10 @@ def run_fils_sk_pfs(dev, apdev, group, p
-     check_erp_capa(dev[0])
- 
-     tls = dev[0].request("GET tls_library")
--    if not tls.startswith("wolfSSL"):
-+    if tls.startswith("mbed TLS"):
+@@ -1472,6 +1472,10 @@ def check_ec_group(dev, group):
+     tls = dev.request("GET tls_library")
+     if tls.startswith("wolfSSL"):
+         return
++    elif tls.startswith("mbed TLS"):
 +        if int(group) == 27:
 +            raise HwsimSkip("Brainpool EC group 27 not supported by mbed TLS")
-+    elif not tls.startswith("wolfSSL"):
-         if int(group) in [25]:
-             if not (tls.startswith("OpenSSL") and ("build=OpenSSL 1.0.2" in tls or "build=OpenSSL 1.1" in tls or "build=OpenSSL 3.0" in tls) and ("run=OpenSSL 1.0.2" in tls or "run=OpenSSL 1.1" in tls or "run=OpenSSL 3.0" in tls)):
-                 raise HwsimSkip("EC group not supported")
++        return
+     if int(group) in [25]:
+         if not (tls.startswith("OpenSSL") and ("build=OpenSSL 1.0.2" in tls or "build=OpenSSL 1.1" in tls or "build=OpenSSL 3." in tls) and ("run=OpenSSL 1.0.2" in tls or "run=OpenSSL 1.1" in tls or "run=OpenSSL 3." in tls)):
+             raise HwsimSkip("EC group not supported")
 --- a/tests/hwsim/test_pmksa_cache.py
 +++ b/tests/hwsim/test_pmksa_cache.py
-@@ -955,7 +955,7 @@ def test_pmksa_cache_preauth_wpas_oom(de
+@@ -958,7 +958,7 @@ def test_pmksa_cache_preauth_wpas_oom(de
      eap_connect(dev[0], hapd, "PAX", "pax.user at example.com",
                  password_hex="0123456789abcdef0123456789abcdef",
                  bssid=apdev[0]['bssid'])
@@ -1115,7 +1101,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
          with alloc_fail(dev[0], i, "rsn_preauth_init"):
              res = dev[0].request("PREAUTH f2:11:22:33:44:55").strip()
              logger.info("Iteration %d - PREAUTH command results: %s" % (i, res))
-@@ -963,7 +963,7 @@ def test_pmksa_cache_preauth_wpas_oom(de
+@@ -966,7 +966,7 @@ def test_pmksa_cache_preauth_wpas_oom(de
                  state = dev[0].request('GET_ALLOC_FAIL')
                  if state.startswith('0:'):
                      break
@@ -1126,7 +1112,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      """PMKSA cache control interface operations"""
 --- a/tests/hwsim/test_sae.py
 +++ b/tests/hwsim/test_sae.py
-@@ -177,6 +177,11 @@ def test_sae_groups(dev, apdev):
+@@ -178,6 +178,11 @@ def test_sae_groups(dev, apdev):
      if tls.startswith("OpenSSL") and "run=OpenSSL 1." in tls:
          logger.info("Add Brainpool EC groups since OpenSSL is new enough")
          sae_groups += [27, 28, 29, 30]
@@ -1138,7 +1124,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
      heavy_groups = [14, 15, 16]
      suitable_groups = [15, 16, 17, 18, 19, 20, 21]
      groups = [str(g) for g in sae_groups]
-@@ -2193,6 +2198,8 @@ def run_sae_pwe_group(dev, apdev, group)
+@@ -2194,6 +2199,8 @@ def run_sae_pwe_group(dev, apdev, group)
              logger.info("Add Brainpool EC groups since OpenSSL is new enough")
          elif tls.startswith("wolfSSL"):
              logger.info("Make sure Brainpool EC groups were enabled when compiling wolfSSL")
@@ -1179,7 +1165,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
              res = dev[0].request(cmd)
 --- a/tests/hwsim/utils.py
 +++ b/tests/hwsim/utils.py
-@@ -141,7 +141,13 @@ def check_imsi_privacy_support(dev):
+@@ -145,7 +145,13 @@ def check_imsi_privacy_support(dev):
  
  def check_tls_tod(dev):
      tls = dev.request("GET tls_library")
@@ -1308,7 +1294,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  		if (need_more_data) {
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -1122,6 +1122,7 @@ CFLAGS += -DCONFIG_TLSV12
+@@ -1189,6 +1189,7 @@ TLS_FUNCS=y
  endif
  
  ifeq ($(CONFIG_TLS), wolfssl)
@@ -1316,7 +1302,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifdef TLS_FUNCS
  CFLAGS += -DWOLFSSL_DER_LOAD
  OBJS += ../src/crypto/tls_wolfssl.o
-@@ -1137,6 +1138,7 @@ LIBS_p += -lwolfssl -lm
+@@ -1204,6 +1205,7 @@ LIBS_p += -lwolfssl -lm
  endif
  
  ifeq ($(CONFIG_TLS), openssl)
@@ -1324,7 +1310,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  CFLAGS += -DCRYPTO_RSA_OAEP_SHA256
  ifdef TLS_FUNCS
  CFLAGS += -DEAP_TLS_OPENSSL
-@@ -1164,6 +1166,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
+@@ -1231,6 +1233,7 @@ CFLAGS += -DTLS_DEFAULT_CIPHERS=\"$(CONF
  endif
  
  ifeq ($(CONFIG_TLS), mbedtls)
@@ -1332,7 +1318,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  CONFIG_CRYPTO=mbedtls
  endif
-@@ -1183,6 +1186,7 @@ endif
+@@ -1250,6 +1253,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), gnutls)
@@ -1340,7 +1326,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  # default to libgcrypt
  CONFIG_CRYPTO=gnutls
-@@ -1213,6 +1217,7 @@ endif
+@@ -1280,6 +1284,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), internal)
@@ -1348,7 +1334,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  ifndef CONFIG_CRYPTO
  CONFIG_CRYPTO=internal
  endif
-@@ -1293,6 +1298,7 @@ endif
+@@ -1360,6 +1365,7 @@ endif
  endif
  
  ifeq ($(CONFIG_TLS), linux)
diff --git a/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch b/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch
index b0151b071f..96f674a77d 100644
--- a/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch
+++ b/package/network/services/hostapd/patches/170-hostapd-update-cfs0-and-cfs1-for-160MHz.patch
@@ -21,15 +21,15 @@ operation information element instead.
 Signed-off-by: P Praneesh <ppranees at codeaurora.org>
 ---
  hostapd/config_file.c           |  2 ++
- src/ap/ieee802_11_ht.c          |  7 +++++++
- src/ap/ieee802_11_vht.c         | 16 ++++++++++++++++
+ src/ap/ieee802_11_ht.c          |  9 +++++++++
+ src/ap/ieee802_11_vht.c         | 17 +++++++++++++++++
  src/common/hw_features_common.c |  1 +
- src/common/ieee802_11_defs.h    |  1 +
- 5 files changed, 27 insertions(+)
+ src/common/ieee802_11_defs.h    |  2 ++
+ 5 files changed, 31 insertions(+)
 
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -1153,6 +1153,8 @@ static int hostapd_config_vht_capab(stru
+@@ -1229,6 +1229,8 @@ static int hostapd_config_vht_capab(stru
  		conf->vht_capab |= VHT_CAP_RX_ANTENNA_PATTERN;
  	if (os_strstr(capab, "[TX-ANTENNA-PATTERN]"))
  		conf->vht_capab |= VHT_CAP_TX_ANTENNA_PATTERN;
@@ -66,7 +66,7 @@ Signed-off-by: P Praneesh <ppranees at codeaurora.org>
  	return pos;
 --- a/src/ap/ieee802_11_vht.c
 +++ b/src/ap/ieee802_11_vht.c
-@@ -25,6 +25,7 @@ u8 * hostapd_eid_vht_capabilities(struct
+@@ -26,6 +26,7 @@ u8 * hostapd_eid_vht_capabilities(struct
  	struct ieee80211_vht_capabilities *cap;
  	struct hostapd_hw_modes *mode = hapd->iface->current_mode;
  	u8 *pos = eid;
@@ -74,7 +74,7 @@ Signed-off-by: P Praneesh <ppranees at codeaurora.org>
  
  	if (!mode || is_6ghz_op_class(hapd->iconf->op_class))
  		return eid;
-@@ -62,6 +63,17 @@ u8 * hostapd_eid_vht_capabilities(struct
+@@ -63,6 +64,17 @@ u8 * hostapd_eid_vht_capabilities(struct
  			host_to_le32(nsts << VHT_CAP_BEAMFORMEE_STS_OFFSET);
  	}
  
@@ -92,7 +92,7 @@ Signed-off-by: P Praneesh <ppranees at codeaurora.org>
  	/* Supported MCS set comes from hw */
  	os_memcpy(&cap->vht_supported_mcs_set, mode->vht_mcs_set, 8);
  
-@@ -74,6 +86,7 @@ u8 * hostapd_eid_vht_capabilities(struct
+@@ -75,6 +87,7 @@ u8 * hostapd_eid_vht_capabilities(struct
  u8 * hostapd_eid_vht_operation(struct hostapd_data *hapd, u8 *eid)
  {
  	struct ieee80211_vht_operation *oper;
@@ -100,7 +100,7 @@ Signed-off-by: P Praneesh <ppranees at codeaurora.org>
  	u8 *pos = eid;
  	enum oper_chan_width oper_chwidth =
  		hostapd_get_oper_chwidth(hapd->iconf);
-@@ -106,6 +119,7 @@ u8 * hostapd_eid_vht_operation(struct ho
+@@ -110,6 +123,7 @@ u8 * hostapd_eid_vht_operation(struct ho
  	oper->vht_op_info_chan_center_freq_seg1_idx = seg1;
  
  	oper->vht_op_info_chwidth = oper_chwidth;
@@ -108,7 +108,7 @@ Signed-off-by: P Praneesh <ppranees at codeaurora.org>
  	if (oper_chwidth == CONF_OPER_CHWIDTH_160MHZ) {
  		/*
  		 * Convert 160 MHz channel width to new style as interop
-@@ -119,6 +133,9 @@ u8 * hostapd_eid_vht_operation(struct ho
+@@ -123,6 +137,9 @@ u8 * hostapd_eid_vht_operation(struct ho
  			oper->vht_op_info_chan_center_freq_seg0_idx -= 8;
  		else
  			oper->vht_op_info_chan_center_freq_seg0_idx += 8;
@@ -120,7 +120,7 @@ Signed-off-by: P Praneesh <ppranees at codeaurora.org>
  		 * Convert 80+80 MHz channel width to new style as interop
 --- a/src/common/hw_features_common.c
 +++ b/src/common/hw_features_common.c
-@@ -811,6 +811,7 @@ int ieee80211ac_cap_check(u32 hw, u32 co
+@@ -898,6 +898,7 @@ int ieee80211ac_cap_check(u32 hw, u32 co
  	VHT_CAP_CHECK(VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB);
  	VHT_CAP_CHECK(VHT_CAP_RX_ANTENNA_PATTERN);
  	VHT_CAP_CHECK(VHT_CAP_TX_ANTENNA_PATTERN);
@@ -130,7 +130,7 @@ Signed-off-by: P Praneesh <ppranees at codeaurora.org>
  #undef VHT_CAP_CHECK_MAX
 --- a/src/common/ieee802_11_defs.h
 +++ b/src/common/ieee802_11_defs.h
-@@ -1349,6 +1349,8 @@ struct ieee80211_ampe_ie {
+@@ -1397,6 +1397,8 @@ struct ieee80211_ampe_ie {
  #define VHT_CAP_VHT_LINK_ADAPTATION_VHT_MRQ_MFB     ((u32) BIT(26) | BIT(27))
  #define VHT_CAP_RX_ANTENNA_PATTERN                  ((u32) BIT(28))
  #define VHT_CAP_TX_ANTENNA_PATTERN                  ((u32) BIT(29))
diff --git a/package/network/services/hostapd/patches/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch b/package/network/services/hostapd/patches/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch
deleted file mode 100644
index 4929c581ce..0000000000
--- a/package/network/services/hostapd/patches/180-driver_nl80211-fix-setting-QoS-map-on-secondary-BSSs.patch
+++ /dev/null
@@ -1,20 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Thu, 14 Sep 2023 10:53:50 +0200
-Subject: [PATCH] driver_nl80211: fix setting QoS map on secondary BSSs
-
-The setting is per-BSS, not per PHY
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/src/drivers/driver_nl80211.c
-+++ b/src/drivers/driver_nl80211.c
-@@ -11341,7 +11341,7 @@ static int nl80211_set_qos_map(void *pri
- 	wpa_hexdump(MSG_DEBUG, "nl80211: Setting QoS Map",
- 		    qos_map_set, qos_map_set_len);
- 
--	if (!(msg = nl80211_drv_msg(drv, 0, NL80211_CMD_SET_QOS_MAP)) ||
-+	if (!(msg = nl80211_bss_msg(bss, 0, NL80211_CMD_SET_QOS_MAP)) ||
- 	    nla_put(msg, NL80211_ATTR_QOS_MAP, qos_map_set_len, qos_map_set)) {
- 		nlmsg_free(msg);
- 		return -ENOBUFS;
diff --git a/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch b/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch
index adfb21fb47..b54abecc4f 100644
--- a/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch
+++ b/package/network/services/hostapd/patches/181-driver_nl80211-update-drv-ifindex-on-removing-the-fi.patch
@@ -8,7 +8,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -8867,6 +8867,7 @@ static int wpa_driver_nl80211_if_remove(
+@@ -8985,6 +8985,7 @@ static int wpa_driver_nl80211_if_remove(
  		if (drv->first_bss->next) {
  			drv->first_bss = drv->first_bss->next;
  			drv->ctx = drv->first_bss->ctx;
diff --git a/package/network/services/hostapd/patches/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch b/package/network/services/hostapd/patches/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch
index 395c645954..e875a82aea 100644
--- a/package/network/services/hostapd/patches/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch
+++ b/package/network/services/hostapd/patches/182-nl80211-move-nl80211_put_freq_params-call-outside-of.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -5226,6 +5226,9 @@ static int wpa_driver_nl80211_set_ap(voi
+@@ -5315,6 +5315,9 @@ static int wpa_driver_nl80211_set_ap(voi
  		nla_nest_end(msg, ftm);
  	}
  
@@ -22,13 +22,13 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #ifdef CONFIG_IEEE80211AX
  	if (params->he_spr_ctrl) {
  		struct nlattr *spr;
-@@ -5260,9 +5263,6 @@ static int wpa_driver_nl80211_set_ap(voi
+@@ -5349,9 +5352,6 @@ static int wpa_driver_nl80211_set_ap(voi
  		nla_nest_end(msg, spr);
  	}
  
 -	if (params->freq && nl80211_put_freq_params(msg, params->freq) < 0)
 -		goto fail;
 -
- 	if (params->freq && params->freq->he_enabled) {
+ 	if (params->freq && params->freq->he_enabled &&
+ 	    nl80211_attr_supported(drv, NL80211_ATTR_HE_BSS_COLOR)) {
  		struct nlattr *bss_color;
- 
diff --git a/package/network/services/hostapd/patches/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch b/package/network/services/hostapd/patches/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch
index fe81318385..4d1af1f5c0 100644
--- a/package/network/services/hostapd/patches/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch
+++ b/package/network/services/hostapd/patches/183-hostapd-cancel-channel_list_update_timeout-in-hostap.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -569,6 +569,7 @@ static void sta_track_deinit(struct host
+@@ -656,6 +656,7 @@ static void sta_track_deinit(struct host
  void hostapd_cleanup_iface_partial(struct hostapd_iface *iface)
  {
  	wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #ifdef NEED_AP_MLME
  	hostapd_stop_setup_timers(iface);
  #endif /* NEED_AP_MLME */
-@@ -598,7 +599,6 @@ void hostapd_cleanup_iface_partial(struc
+@@ -685,7 +686,6 @@ void hostapd_cleanup_iface_partial(struc
  static void hostapd_cleanup_iface(struct hostapd_iface *iface)
  {
  	wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch
index e3ed00f2de..5693e203d8 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -18,7 +18,7 @@
  OBJS += ../src/ap/vlan_init.o
  OBJS += ../src/ap/vlan_ifconfig.o
  OBJS += ../src/ap/vlan.o
-@@ -357,10 +359,14 @@ CFLAGS += -DCONFIG_MBO
+@@ -359,10 +361,14 @@ CFLAGS += -DCONFIG_MBO
  OBJS += ../src/ap/mbo_ap.o
  endif
  
@@ -36,7 +36,7 @@
  LIBS += $(DRV_AP_LIBS)
  
  ifdef CONFIG_L2_PACKET
-@@ -1380,6 +1386,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
+@@ -1393,6 +1399,12 @@ install: $(addprefix $(DESTDIR)$(BINDIR)
  _OBJS_VAR := OBJS
  include ../src/objs.mk
  
@@ -49,7 +49,7 @@
  hostapd: $(OBJS)
  	$(Q)$(CC) $(LDFLAGS) -o hostapd $(OBJS) $(LIBS)
  	@$(E) "  LD " $@
-@@ -1460,6 +1472,12 @@ include ../src/objs.mk
+@@ -1473,6 +1485,12 @@ include ../src/objs.mk
  _OBJS_VAR := SOBJS
  include ../src/objs.mk
  
@@ -72,7 +72,7 @@
  include ../src/build.rules
  
  ifdef CONFIG_BUILD_PASN_SO
-@@ -382,7 +383,9 @@ endif
+@@ -389,7 +390,9 @@ endif
  ifdef CONFIG_IBSS_RSN
  NEED_RSN_AUTHENTICATOR=y
  CFLAGS += -DCONFIG_IBSS_RSN
@@ -82,7 +82,7 @@
  OBJS += ibss_rsn.o
  endif
  
-@@ -924,6 +927,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
+@@ -981,6 +984,10 @@ ifdef CONFIG_DYNAMIC_EAP_METHODS
  CFLAGS += -DCONFIG_DYNAMIC_EAP_METHODS
  LIBS += -ldl -rdynamic
  endif
@@ -93,7 +93,7 @@
  endif
  
  ifdef CONFIG_AP
-@@ -931,9 +938,11 @@ NEED_EAP_COMMON=y
+@@ -988,9 +995,11 @@ NEED_EAP_COMMON=y
  NEED_RSN_AUTHENTICATOR=y
  CFLAGS += -DCONFIG_AP
  OBJS += ap.o
@@ -105,7 +105,7 @@
  OBJS += ../src/ap/hostapd.o
  OBJS += ../src/ap/wpa_auth_glue.o
  OBJS += ../src/ap/utils.o
-@@ -1022,6 +1031,12 @@ endif
+@@ -1081,6 +1090,12 @@ endif
  ifdef CONFIG_HS20
  OBJS += ../src/ap/hs20.o
  endif
@@ -118,7 +118,7 @@
  endif
  
  ifdef CONFIG_MBO
-@@ -1030,7 +1045,9 @@ CFLAGS += -DCONFIG_MBO
+@@ -1090,7 +1105,9 @@ NEED_GAS=y
  endif
  
  ifdef NEED_RSN_AUTHENTICATOR
@@ -128,7 +128,7 @@
  NEED_AES_WRAP=y
  OBJS += ../src/ap/wpa_auth.o
  OBJS += ../src/ap/wpa_auth_ie.o
-@@ -2010,6 +2027,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
+@@ -2080,6 +2097,12 @@ wpa_priv: $(BCHECK) $(OBJS_priv)
  
  _OBJS_VAR := OBJS
  include ../src/objs.mk
@@ -141,7 +141,7 @@
  wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
  	$(Q)$(LDO) $(LDFLAGS) -o wpa_supplicant $(OBJS) $(LIBS) $(EXTRALIBS)
  	@$(E) "  LD " $@
-@@ -2142,6 +2165,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
+@@ -2212,6 +2235,12 @@ eap_gpsk.so: $(SRC_EAP_GPSK)
  	$(Q)sed -e 's|\@BINDIR\@|$(BINDIR)|g' $< >$@
  	@$(E) "  sed" $<
  
@@ -156,7 +156,7 @@
  wpa_cli.exe: wpa_cli
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -6667,8 +6667,8 @@ union wpa_event_data {
+@@ -6760,8 +6760,8 @@ union wpa_event_data {
   * Driver wrapper code should call this function whenever an event is received
   * from the driver.
   */
@@ -167,7 +167,7 @@
  
  /**
   * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
-@@ -6680,7 +6680,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6773,7 +6773,7 @@ void wpa_supplicant_event(void *ctx, enu
   * Same as wpa_supplicant_event(), but we search for the interface in
   * wpa_global.
   */
@@ -178,7 +178,7 @@
  /*
 --- a/src/ap/drv_callbacks.c
 +++ b/src/ap/drv_callbacks.c
-@@ -2184,8 +2184,8 @@ err:
+@@ -2341,8 +2341,8 @@ err:
  #endif /* CONFIG_OWE */
  
  
@@ -188,8 +188,8 @@
 +		       union wpa_event_data *data)
  {
  	struct hostapd_data *hapd = ctx;
- #ifndef CONFIG_NO_STDOUT_DEBUG
-@@ -2489,7 +2489,7 @@ void wpa_supplicant_event(void *ctx, enu
+ 	struct sta_info *sta;
+@@ -2674,7 +2674,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
@@ -231,7 +231,7 @@
  	os_memset(&global, 0, sizeof(global));
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -5353,8 +5353,8 @@ static void wpas_link_reconfig(struct wp
+@@ -5919,8 +5919,8 @@ static void wpas_link_reconfig(struct wp
  }
  
  
@@ -242,7 +242,7 @@
  {
  	struct wpa_supplicant *wpa_s = ctx;
  	int resched;
-@@ -6272,7 +6272,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6872,7 +6872,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
@@ -253,7 +253,7 @@
  	struct wpa_supplicant *wpa_s;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7462,7 +7462,6 @@ struct wpa_interface * wpa_supplicant_ma
+@@ -7583,7 +7583,6 @@ struct wpa_interface * wpa_supplicant_ma
  	return NULL;
  }
  
@@ -261,7 +261,7 @@
  /**
   * wpa_supplicant_match_existing - Match existing interfaces
   * @global: Pointer to global data from wpa_supplicant_init()
-@@ -7497,6 +7496,11 @@ static int wpa_supplicant_match_existing
+@@ -7618,6 +7617,11 @@ static int wpa_supplicant_match_existing
  
  #endif /* CONFIG_MATCH_IFACE */
  
@@ -273,7 +273,7 @@
  
  /**
   * wpa_supplicant_add_iface - Add a new network interface
-@@ -7753,6 +7757,8 @@ struct wpa_global * wpa_supplicant_init(
+@@ -7874,6 +7878,8 @@ struct wpa_global * wpa_supplicant_init(
  #ifndef CONFIG_NO_WPA_MSG
  	wpa_msg_register_ifname_cb(wpa_supplicant_msg_ifname_cb);
  #endif /* CONFIG_NO_WPA_MSG */
@@ -284,7 +284,7 @@
  		wpa_debug_open_file(params->wpa_debug_file_path);
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
-@@ -698,6 +698,11 @@ fail:
+@@ -705,6 +705,11 @@ fail:
  	return -1;
  }
  
@@ -296,7 +296,7 @@
  
  #ifdef CONFIG_WPS
  static int gen_uuid(const char *txt_addr)
-@@ -791,6 +796,8 @@ int main(int argc, char *argv[])
+@@ -798,6 +803,8 @@ int main(int argc, char *argv[])
  		return -1;
  #endif /* CONFIG_DPP */
  
@@ -333,7 +333,7 @@
  
  const struct wpa_driver_ops *const wpa_drivers[] = { NULL };
  
-@@ -1303,6 +1308,10 @@ static void usage(void)
+@@ -1325,6 +1330,10 @@ static void usage(void)
  	       "option several times.\n");
  }
  
@@ -344,7 +344,7 @@
  
  int main(int argc, char *argv[])
  {
-@@ -1323,6 +1332,8 @@ int main(int argc, char *argv[])
+@@ -1348,6 +1357,8 @@ int main(int argc, char *argv[])
  	if (os_program_init())
  		return -1;
  
diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch
index 3b5f4325de..fa69362847 100644
--- a/package/network/services/hostapd/patches/300-noscan.patch
+++ b/package/network/services/hostapd/patches/300-noscan.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -3448,6 +3448,10 @@ static int hostapd_config_fill(struct ho
+@@ -3656,6 +3656,10 @@ static int hostapd_config_fill(struct ho
  		if (bss->ocv && !bss->ieee80211w)
  			bss->ieee80211w = 1;
  #endif /* CONFIG_OCV */
@@ -13,7 +13,7 @@
  	} else if (os_strcmp(buf, "ht_capab") == 0) {
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1075,6 +1075,8 @@ struct hostapd_config {
+@@ -1093,6 +1093,8 @@ struct hostapd_config {
  
  	int ht_op_mode_fixed;
  	u16 ht_capab;
@@ -24,7 +24,7 @@
  	int no_pri_sec_switch;
 --- a/src/ap/hw_features.c
 +++ b/src/ap/hw_features.c
-@@ -546,7 +546,8 @@ static int ieee80211n_check_40mhz(struct
+@@ -544,7 +544,8 @@ static int ieee80211n_check_40mhz(struct
  	int ret;
  
  	/* Check that HT40 is used and PRI / SEC switch is allowed */
diff --git a/package/network/services/hostapd/patches/301-mesh-noscan.patch b/package/network/services/hostapd/patches/301-mesh-noscan.patch
index ceb6d0c161..a2200c8e9a 100644
--- a/package/network/services/hostapd/patches/301-mesh-noscan.patch
+++ b/package/network/services/hostapd/patches/301-mesh-noscan.patch
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/config.c
 +++ b/wpa_supplicant/config.c
-@@ -2600,6 +2600,7 @@ static const struct parse_data ssid_fiel
+@@ -2639,6 +2639,7 @@ static const struct parse_data ssid_fiel
  #else /* CONFIG_MESH */
  	{ INT_RANGE(mode, 0, 4) },
  #endif /* CONFIG_MESH */
@@ -31,7 +31,7 @@
  		/*
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -2710,7 +2710,7 @@ static bool ibss_mesh_can_use_vht(struct
+@@ -2770,7 +2770,7 @@ static bool ibss_mesh_can_use_vht(struct
  				  const struct wpa_ssid *ssid,
  				  struct hostapd_hw_modes *mode)
  {
@@ -40,25 +40,25 @@
  		return false;
  
  	if (!drv_supports_vht(wpa_s, ssid))
-@@ -2783,7 +2783,7 @@ static void ibss_mesh_select_40mhz(struc
+@@ -2843,7 +2843,7 @@ static void ibss_mesh_select_40mhz(struc
  	int i, res;
  	unsigned int j;
  	static const int ht40plus[] = {
--		36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
-+		1, 2, 3, 4, 5, 6, 7, 36, 44, 52, 60, 100, 108, 116, 124, 132, 149, 157, 165, 173,
- 		184, 192
+-		36, 44, 52, 60, 100, 108, 116, 124, 132, 140,
++		1, 2, 3, 4, 5, 6, 7, 36, 44, 52, 60, 100, 108, 116, 124, 132, 140,
+ 		149, 157, 165, 173, 184, 192
  	};
  	int ht40 = -1;
-@@ -3033,7 +3033,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3093,7 +3093,7 @@ void ibss_mesh_setup_freq(struct wpa_sup
  	int ieee80211_mode = wpas_mode_to_ieee80211_mode(ssid->mode);
  	enum hostapd_hw_mode hw_mode;
  	struct hostapd_hw_modes *mode = NULL;
 -	int i, obss_scan = 1;
 +	int i, obss_scan = !(ssid->noscan);
  	u8 channel;
- 	bool is_6ghz;
+ 	bool is_6ghz, is_24ghz;
  	bool dfs_enabled = wpa_s->conf->country[0] && (wpa_s->drv_flags & WPA_DRIVER_FLAGS_RADAR);
-@@ -3080,6 +3080,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3143,6 +3143,8 @@ void ibss_mesh_setup_freq(struct wpa_sup
  		freq->he_enabled = ibss_mesh_can_use_he(wpa_s, ssid, mode,
  							ieee80211_mode);
  	freq->channel = channel;
diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch
index 6e0244bca2..1315f0c30e 100644
--- a/package/network/services/hostapd/patches/310-rescan_immediately.patch
+++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -5769,7 +5769,7 @@ wpa_supplicant_alloc(struct wpa_supplica
+@@ -5870,7 +5870,7 @@ wpa_supplicant_alloc(struct wpa_supplica
  	if (wpa_s == NULL)
  		return NULL;
  	wpa_s->scan_req = INITIAL_SCAN_REQ;
diff --git a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch
index c11c957216..dc9ccff12c 100644
--- a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch
+++ b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -5407,7 +5407,7 @@ static int nl80211_set_channel(struct i8
+@@ -5483,7 +5483,7 @@ static int nl80211_set_channel(struct i8
  		   freq->he_enabled, freq->eht_enabled, freq->bandwidth,
  		   freq->center_freq1, freq->center_freq2);
  
diff --git a/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch b/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
index 8784452876..9853c10c13 100644
--- a/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
+++ b/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/ap.c
 +++ b/wpa_supplicant/ap.c
-@@ -1825,15 +1825,35 @@ int ap_switch_channel(struct wpa_supplic
+@@ -1846,17 +1846,37 @@ int ap_switch_channel(struct wpa_supplic
  
  
  #ifdef CONFIG_CTRL_IFACE
@@ -24,15 +24,19 @@
  	struct csa_settings settings;
  	int ret = hostapd_parse_csa_settings(pos, &settings);
  
+-	if (ret)
+-		return ret;
 +	if (!(wpa_s->ap_iface && wpa_s->ap_iface->bss[0]) &&
 +	    !(wpa_s->ifmsh && wpa_s->ifmsh->bss[0]))
 +		return -1;
-+
-+	ret = __ap_ctrl_iface_chanswitch(wpa_s->ap_iface, &settings);
- 	if (ret)
- 		return ret;
+ 
+ 	settings.link_id = -1;
  
 -	return ap_switch_channel(wpa_s, &settings);
++	ret = __ap_ctrl_iface_chanswitch(wpa_s->ap_iface, &settings);
++	if (ret)
++		return ret;
++
 +	return __ap_ctrl_iface_chanswitch(wpa_s->ifmsh, &settings);
  }
  #endif /* CONFIG_CTRL_IFACE */
diff --git a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch
index 647ca2cbf9..630e030935 100644
--- a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch
+++ b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch
@@ -1,6 +1,6 @@
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -3008,12 +3008,12 @@ static int wpa_driver_nl80211_del_beacon
+@@ -3075,12 +3075,12 @@ static int wpa_driver_nl80211_del_beacon
  		return 0;
  
  	wpa_printf(MSG_DEBUG, "nl80211: Remove beacon (ifindex=%d)",
@@ -15,16 +15,17 @@
  	if (!msg)
  		return -ENOBUFS;
  
-@@ -6100,7 +6100,7 @@ static void nl80211_teardown_ap(struct i
+@@ -6176,8 +6176,7 @@ static void nl80211_teardown_ap(struct i
  		nl80211_mgmt_unsubscribe(bss, "AP teardown");
  
  	nl80211_put_wiphy_data_ap(bss);
--	bss->flink->beacon_set = 0;
+-	if (bss->flink)
+-		bss->flink->beacon_set = 0;
 +	wpa_driver_nl80211_del_beacon_all(bss);
  }
  
  
-@@ -8859,8 +8859,6 @@ static int wpa_driver_nl80211_if_remove(
+@@ -8977,8 +8976,6 @@ static int wpa_driver_nl80211_if_remove(
  	} else {
  		wpa_printf(MSG_DEBUG, "nl80211: First BSS - reassign context");
  		nl80211_teardown_ap(bss);
diff --git a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
index f7720fce2f..32699e4bc4 100644
--- a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
+++ b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
@@ -12,7 +12,7 @@
  else
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -3314,6 +3314,7 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -3897,6 +3897,7 @@ static int hostapd_ctrl_iface_receive_pr
  						      reply_size);
  	} else if (os_strcmp(buf, "STATUS-DRIVER") == 0) {
  		reply_len = hostapd_drv_status(hapd, reply, reply_size);
@@ -20,7 +20,7 @@
  	} else if (os_strcmp(buf, "MIB") == 0) {
  		reply_len = ieee802_11_get_mib(hapd, reply, reply_size);
  		if (reply_len >= 0) {
-@@ -3355,6 +3356,7 @@ static int hostapd_ctrl_iface_receive_pr
+@@ -3938,6 +3939,7 @@ static int hostapd_ctrl_iface_receive_pr
  	} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
  		reply_len = hostapd_ctrl_iface_sta_next(hapd, buf + 9, reply,
  							reply_size);
@@ -30,7 +30,7 @@
  			reply_len = -1;
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -983,6 +983,9 @@ ifdef CONFIG_FILS
+@@ -1039,6 +1039,9 @@ ifdef CONFIG_FILS
  OBJS += ../src/ap/fils_hlp.o
  endif
  ifdef CONFIG_CTRL_IFACE
@@ -42,7 +42,7 @@
  
 --- a/wpa_supplicant/ctrl_iface.c
 +++ b/wpa_supplicant/ctrl_iface.c
-@@ -2326,7 +2326,7 @@ static int wpa_supplicant_ctrl_iface_sta
+@@ -2355,7 +2355,7 @@ static int wpa_supplicant_ctrl_iface_sta
  			pos += ret;
  		}
  
@@ -51,7 +51,7 @@
  		if (wpa_s->ap_iface) {
  			pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
  							    end - pos,
-@@ -12087,6 +12087,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -12542,6 +12542,7 @@ char * wpa_supplicant_ctrl_iface_process
  			reply_len = -1;
  	} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
  		wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
@@ -59,7 +59,7 @@
  	} else if (os_strcmp(buf, "MIB") == 0) {
  		reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
  		if (reply_len >= 0) {
-@@ -12099,6 +12100,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -12554,6 +12555,7 @@ char * wpa_supplicant_ctrl_iface_process
  				reply_size - reply_len);
  #endif /* CONFIG_MACSEC */
  		}
@@ -67,7 +67,7 @@
  	} else if (os_strncmp(buf, "STATUS", 6) == 0) {
  		reply_len = wpa_supplicant_ctrl_iface_status(
  			wpa_s, buf + 6, reply, reply_size);
-@@ -12587,6 +12589,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13042,6 +13044,7 @@ char * wpa_supplicant_ctrl_iface_process
  		reply_len = wpa_supplicant_ctrl_iface_bss(
  			wpa_s, buf + 4, reply, reply_size);
  #ifdef CONFIG_AP
@@ -75,7 +75,7 @@
  	} else if (os_strcmp(buf, "STA-FIRST") == 0) {
  		reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
  	} else if (os_strncmp(buf, "STA ", 4) == 0) {
-@@ -12595,12 +12598,15 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13050,12 +13053,15 @@ char * wpa_supplicant_ctrl_iface_process
  	} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
  		reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
  						   reply_size);
@@ -147,7 +147,7 @@
  static int hostapd_ctrl_iface_sta_mib(struct hostapd_data *hapd,
  				      struct sta_info *sta,
  				      char *buf, size_t buflen)
-@@ -493,6 +493,7 @@ int hostapd_ctrl_iface_sta_next(struct h
+@@ -539,6 +539,7 @@ int hostapd_ctrl_iface_sta_next(struct h
  	return hostapd_ctrl_iface_sta_mib(hapd, sta->next, buf, buflen);
  }
  
@@ -155,7 +155,7 @@
  
  #ifdef CONFIG_P2P_MANAGER
  static int p2p_manager_disconnect(struct hostapd_data *hapd, u16 stype,
-@@ -884,12 +885,12 @@ int hostapd_ctrl_iface_status(struct hos
+@@ -951,12 +952,12 @@ int hostapd_ctrl_iface_status(struct hos
  			return len;
  		len += ret;
  	}
@@ -172,7 +172,7 @@
  		if (os_snprintf_error(buflen - len, ret))
 --- a/src/ap/ieee802_1x.c
 +++ b/src/ap/ieee802_1x.c
-@@ -2834,6 +2834,7 @@ static const char * bool_txt(bool val)
+@@ -2837,6 +2837,7 @@ static const char * bool_txt(bool val)
  	return val ? "TRUE" : "FALSE";
  }
  
@@ -180,7 +180,7 @@
  
  int ieee802_1x_get_mib(struct hostapd_data *hapd, char *buf, size_t buflen)
  {
-@@ -3020,6 +3021,7 @@ int ieee802_1x_get_mib_sta(struct hostap
+@@ -3023,6 +3024,7 @@ int ieee802_1x_get_mib_sta(struct hostap
  	return len;
  }
  
@@ -190,7 +190,7 @@
  static void ieee802_1x_wnm_notif_send(void *eloop_ctx, void *timeout_ctx)
 --- a/src/ap/wpa_auth.c
 +++ b/src/ap/wpa_auth.c
-@@ -5328,6 +5328,7 @@ static const char * wpa_bool_txt(int val
+@@ -5583,6 +5583,7 @@ static const char * wpa_bool_txt(int val
  	return val ? "TRUE" : "FALSE";
  }
  
@@ -198,7 +198,7 @@
  
  #define RSN_SUITE "%02x-%02x-%02x-%d"
  #define RSN_SUITE_ARG(s) \
-@@ -5480,7 +5481,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
+@@ -5735,7 +5736,7 @@ int wpa_get_mib_sta(struct wpa_state_mac
  
  	return len;
  }
@@ -209,7 +209,7 @@
  {
 --- a/src/rsn_supp/wpa.c
 +++ b/src/rsn_supp/wpa.c
-@@ -3834,6 +3834,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
+@@ -3943,6 +3943,8 @@ static u32 wpa_key_mgmt_suite(struct wpa
  }
  
  
@@ -218,7 +218,7 @@
  #define RSN_SUITE "%02x-%02x-%02x-%d"
  #define RSN_SUITE_ARG(s) \
  ((s) >> 24) & 0xff, ((s) >> 16) & 0xff, ((s) >> 8) & 0xff, (s) & 0xff
-@@ -3915,6 +3917,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
+@@ -4024,6 +4026,7 @@ int wpa_sm_get_mib(struct wpa_sm *sm, ch
  
  	return (int) len;
  }
@@ -228,7 +228,7 @@
  
 --- a/wpa_supplicant/ap.c
 +++ b/wpa_supplicant/ap.c
-@@ -1499,7 +1499,7 @@ int wpas_ap_wps_nfc_report_handover(stru
+@@ -1520,7 +1520,7 @@ int wpas_ap_wps_nfc_report_handover(stru
  #endif /* CONFIG_WPS */
  
  
diff --git a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch
index 4592c34127..de72738a2f 100644
--- a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch
+++ b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch
@@ -1,6 +1,6 @@
 --- a/src/common/wpa_common.c
 +++ b/src/common/wpa_common.c
-@@ -2841,6 +2841,31 @@ u32 wpa_akm_to_suite(int akm)
+@@ -2856,6 +2856,31 @@ u32 wpa_akm_to_suite(int akm)
  }
  
  
@@ -32,7 +32,7 @@
  int wpa_compare_rsn_ie(int ft_initial_assoc,
  		       const u8 *ie1, size_t ie1len,
  		       const u8 *ie2, size_t ie2len)
-@@ -2848,8 +2873,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
+@@ -2863,8 +2888,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
  	if (ie1 == NULL || ie2 == NULL)
  		return -1;
  
diff --git a/package/network/services/hostapd/patches/420-indicate-features.patch b/package/network/services/hostapd/patches/420-indicate-features.patch
index 07df8e5a9a..0a457c6905 100644
--- a/package/network/services/hostapd/patches/420-indicate-features.patch
+++ b/package/network/services/hostapd/patches/420-indicate-features.patch
@@ -9,7 +9,7 @@
  
  struct hapd_global {
  	void **drv_priv;
-@@ -799,7 +799,7 @@ int main(int argc, char *argv[])
+@@ -806,7 +806,7 @@ int main(int argc, char *argv[])
  	wpa_supplicant_event = hostapd_wpa_event;
  	wpa_supplicant_event_global = hostapd_wpa_event_global;
  	for (;;) {
@@ -18,7 +18,7 @@
  		if (c < 0)
  			break;
  		switch (c) {
-@@ -836,6 +836,8 @@ int main(int argc, char *argv[])
+@@ -843,6 +843,8 @@ int main(int argc, char *argv[])
  			break;
  #endif /* CONFIG_DEBUG_LINUX_TRACING */
  		case 'v':
diff --git a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch b/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch
index a21f0bf7ce..6183c1f941 100644
--- a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch
+++ b/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch
@@ -32,7 +32,7 @@
  
  
  static int hostapd_cli_cmd_disassoc_imminent(struct wpa_ctrl *ctrl, int argc,
-@@ -1610,13 +1606,10 @@ static const struct hostapd_cli_cmd host
+@@ -1670,13 +1666,10 @@ static const struct hostapd_cli_cmd host
  	{ "disassociate", hostapd_cli_cmd_disassociate,
  	  hostapd_complete_stations,
  	  "<addr> = disassociate a station" },
@@ -46,7 +46,7 @@
  	{ "wps_pin", hostapd_cli_cmd_wps_pin, NULL,
  	  "<uuid> <pin> [timeout] [addr] = add WPS Enrollee PIN" },
  	{ "wps_check_pin", hostapd_cli_cmd_wps_check_pin, NULL,
-@@ -1641,7 +1634,6 @@ static const struct hostapd_cli_cmd host
+@@ -1701,7 +1694,6 @@ static const struct hostapd_cli_cmd host
  	  "<SSID> <auth> <encr> <key> = configure AP" },
  	{ "wps_get_status", hostapd_cli_cmd_wps_get_status, NULL,
  	  "= show current WPS status" },
diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
index dc19553e26..db561b8c20 100644
--- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
@@ -22,7 +22,7 @@ Signed-hostap: Antonio Quartulli <ordex at autistici.org>
  #include "common/defs.h"
  #include "common/ieee802_11_defs.h"
  #include "common/wpa_common.h"
-@@ -953,6 +954,9 @@ struct wpa_driver_associate_params {
+@@ -971,6 +972,9 @@ struct wpa_driver_associate_params {
  	 * responsible for selecting with which BSS to associate. */
  	const u8 *bssid;
  
@@ -42,7 +42,7 @@ Signed-hostap: Antonio Quartulli <ordex at autistici.org>
  #include "config.h"
  
  
-@@ -2389,6 +2390,97 @@ static char * wpa_config_write_mac_value
+@@ -2421,6 +2422,97 @@ static char * wpa_config_write_mac_value
  #endif /* NO_CONFIG_WRITE */
  
  
@@ -140,7 +140,7 @@ Signed-hostap: Antonio Quartulli <ordex at autistici.org>
  /* Helper macros for network block parser */
  
  #ifdef OFFSET
-@@ -2674,6 +2766,8 @@ static const struct parse_data ssid_fiel
+@@ -2713,6 +2805,8 @@ static const struct parse_data ssid_fiel
  	{ INT(ap_max_inactivity) },
  	{ INT(dtim_period) },
  	{ INT(beacon_int) },
@@ -174,7 +174,7 @@ Signed-hostap: Antonio Quartulli <ordex at autistici.org>
  	 * macsec_policy - Determines the policy for MACsec secure session
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -4177,6 +4177,12 @@ static void wpas_start_assoc_cb(struct w
+@@ -4249,6 +4249,12 @@ static void wpas_start_assoc_cb(struct w
  			params.beacon_int = ssid->beacon_int;
  		else
  			params.beacon_int = wpa_s->conf->beacon_int;
diff --git a/package/network/services/hostapd/patches/461-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch b/package/network/services/hostapd/patches/461-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch
new file mode 100644
index 0000000000..daff60a8ad
--- /dev/null
+++ b/package/network/services/hostapd/patches/461-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch
@@ -0,0 +1,76 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: Eneas U de Queiroz <cotequeiroz at gmail.com>
+Date: Mon, 12 Feb 2024 14:18:24 -0300
+Subject: [PATCH] Move definition of WLAN_SUPP_RATES_MAX to defs.h
+
+Patch 460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+("wpa_supplicant: add new config params to be used with the ibss join
+command") adds the definition of unsigned char
+rates[WLAN_SUPP_RATES_MAX] to driver.h, which needs to have
+WLAN_SUPP_RATES_MAX defined.  So it includes sta_info.h to get the
+definition.
+
+Commit c74739250a ("AP MLD: Use a helper function to check if a STA is a
+non-AP MLD") makes sta_info.h include driver.h before
+it defines WLAN_SUPP_RATES_MAX, causing an error:
+
+src/drivers/driver.h:969:29: error: 'WLAN_SUPP_RATES_MAX' undeclared here (not in a function)
+
+Move the definition of WLAN_SUPP_RATES_MAX to defs.h to ensure it gets
+defined before other headers are included.  The inclusion of sta_info.h
+in driver.h can be reverted as well.
+
+Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
+---
+ src/ap/sta_info.h            | 4 ----
+ src/common/defs.h            | 4 ++++
+ src/drivers/driver.h         | 1 -
+ wpa_supplicant/config_ssid.h | 1 -
+ 4 files changed, 4 insertions(+), 6 deletions(-)
+
+--- a/src/ap/sta_info.h
++++ b/src/ap/sta_info.h
+@@ -49,10 +49,6 @@
+ #define WLAN_STA_PENDING_DEAUTH_CB BIT(30)
+ #define WLAN_STA_NONERP BIT(31)
+ 
+-/* Maximum number of supported rates (from both Supported Rates and Extended
+- * Supported Rates IEs). */
+-#define WLAN_SUPP_RATES_MAX 32
+-
+ struct hostapd_data;
+ 
+ struct mbo_non_pref_chan_info {
+--- a/src/common/defs.h
++++ b/src/common/defs.h
+@@ -63,6 +63,10 @@
+ 			 WPA_KEY_MGMT_FT_FILS_SHA256 | \
+ 			 WPA_KEY_MGMT_FT_FILS_SHA384)
+ 
++/* Maximum number of supported rates (from both Supported Rates and Extended
++ * Supported Rates IEs). */
++#define WLAN_SUPP_RATES_MAX 32
++
+ static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)
+ {
+ 	return !!(akm & (WPA_KEY_MGMT_IEEE8021X |
+--- a/src/drivers/driver.h
++++ b/src/drivers/driver.h
+@@ -19,7 +19,6 @@
+ 
+ #define WPA_SUPPLICANT_DRIVER_VERSION 4
+ 
+-#include "ap/sta_info.h"
+ #include "common/defs.h"
+ #include "common/ieee802_11_defs.h"
+ #include "common/wpa_common.h"
+--- a/wpa_supplicant/config_ssid.h
++++ b/wpa_supplicant/config_ssid.h
+@@ -10,7 +10,6 @@
+ #define CONFIG_SSID_H
+ 
+ #include "common/defs.h"
+-#include "ap/sta_info.h"
+ #include "utils/list.h"
+ #include "eap_peer/eap_config.h"
+ #include "drivers/nl80211_copy.h"
diff --git a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch
index daa36c2f35..c24ca46e96 100644
--- a/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch
+++ b/package/network/services/hostapd/patches/463-add-mcast_rate-to-11s.patch
@@ -19,7 +19,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich at openmesh.com>
 
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -1827,6 +1827,7 @@ struct wpa_driver_mesh_join_params {
+@@ -1876,6 +1876,7 @@ struct wpa_driver_mesh_join_params {
  #define WPA_DRIVER_MESH_FLAG_AMPE	0x00000008
  	unsigned int flags;
  	bool handle_dfs;
@@ -29,7 +29,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich at openmesh.com>
  struct wpa_driver_set_key_params {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -11667,6 +11667,18 @@ static int nl80211_put_mesh_id(struct nl
+@@ -11850,6 +11850,18 @@ static int nl80211_put_mesh_id(struct nl
  }
  
  
@@ -48,7 +48,7 @@ Tested-by: Simon Wunderlich <simon.wunderlich at openmesh.com>
  static int nl80211_put_mesh_config(struct nl_msg *msg,
  				   struct wpa_driver_mesh_bss_params *params)
  {
-@@ -11728,6 +11740,7 @@ static int nl80211_join_mesh(struct i802
+@@ -11911,6 +11923,7 @@ static int nl80211_join_mesh(struct i802
  	    nl80211_put_basic_rates(msg, params->basic_rates) ||
  	    nl80211_put_mesh_id(msg, params->meshid, params->meshid_len) ||
  	    nl80211_put_beacon_int(msg, params->beacon_int) ||
diff --git a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
index 4d7d85f4ab..2d7ca0191d 100644
--- a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
+++ b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
@@ -1,6 +1,6 @@
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -3040,6 +3040,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
+@@ -3100,6 +3100,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
  
  	freq->freq = ssid->frequency;
  
diff --git a/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch b/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch
index 7d3d94648e..8da7a2948e 100644
--- a/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch
+++ b/package/network/services/hostapd/patches/465-hostapd-config-support-random-BSS-color.patch
@@ -13,7 +13,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -3500,6 +3500,8 @@ static int hostapd_config_fill(struct ho
+@@ -3708,6 +3708,8 @@ static int hostapd_config_fill(struct ho
  	} else if (os_strcmp(buf, "he_bss_color") == 0) {
  		conf->he_op.he_bss_color = atoi(pos) & 0x3f;
  		conf->he_op.he_bss_color_disabled = 0;
diff --git a/package/network/services/hostapd/patches/470-survey_data_fallback.patch b/package/network/services/hostapd/patches/470-survey_data_fallback.patch
index 79ab48c5c2..20877345df 100644
--- a/package/network/services/hostapd/patches/470-survey_data_fallback.patch
+++ b/package/network/services/hostapd/patches/470-survey_data_fallback.patch
@@ -1,6 +1,6 @@
 --- a/src/ap/acs.c
 +++ b/src/ap/acs.c
-@@ -455,17 +455,17 @@ static int acs_get_bw_center_chan(int fr
+@@ -467,17 +467,17 @@ static int acs_get_bw_center_chan(int fr
  static int acs_survey_is_sufficient(struct freq_survey *survey)
  {
  	if (!(survey->filled & SURVEY_HAS_NF)) {
@@ -20,7 +20,7 @@
  	}
  
  	if (!(survey->filled & SURVEY_HAS_CHAN_TIME_BUSY) &&
-@@ -473,7 +473,6 @@ static int acs_survey_is_sufficient(stru
+@@ -485,7 +485,6 @@ static int acs_survey_is_sufficient(stru
  		wpa_printf(MSG_INFO,
  			   "ACS: Survey for freq %d is missing RX and busy time (at least one is required)",
  			   survey->freq);
diff --git a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch b/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
index 67312c5004..98ded1f009 100644
--- a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
+++ b/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -1396,7 +1396,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
+@@ -1409,7 +1409,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
  	@$(AR) cr $@ hostapd_multi.o $(OBJS)
  
  hostapd: $(OBJS)
@@ -9,7 +9,7 @@
  	@$(E) "  LD " $@
  
  ifdef CONFIG_WPA_TRACE
-@@ -1407,7 +1407,7 @@ _OBJS_VAR := OBJS_c
+@@ -1420,7 +1420,7 @@ _OBJS_VAR := OBJS_c
  include ../src/objs.mk
  
  hostapd_cli: $(OBJS_c)
@@ -20,7 +20,7 @@
  NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -2037,31 +2037,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
+@@ -2107,31 +2107,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
  	@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
  
  wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
diff --git a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch
index 0efa6db908..8f97e54d08 100644
--- a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch
+++ b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch
@@ -34,7 +34,7 @@
  #define STA_HASH_SIZE 256
 --- a/src/ap/wnm_ap.c
 +++ b/src/ap/wnm_ap.c
-@@ -386,6 +386,7 @@ static int ieee802_11_send_bss_trans_mgm
+@@ -410,6 +410,7 @@ static int ieee802_11_send_bss_trans_mgm
  	mgmt->u.action.u.bss_tm_req.validity_interval = 1;
  	pos = mgmt->u.action.u.bss_tm_req.variable;
  
@@ -42,7 +42,7 @@
  	wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request to "
  		   MACSTR " dialog_token=%u req_mode=0x%x disassoc_timer=%u "
  		   "validity_interval=%u",
-@@ -790,10 +791,12 @@ int ieee802_11_rx_wnm_action_ap(struct h
+@@ -814,10 +815,12 @@ int ieee802_11_rx_wnm_action_ap(struct h
  					       plen);
  		return 0;
  	case WNM_BSS_TRANS_MGMT_QUERY:
@@ -55,7 +55,7 @@
  		ieee802_11_rx_bss_trans_mgmt_resp(hapd, mgmt->sa, payload,
  						  plen);
  		return 0;
-@@ -840,6 +843,7 @@ int wnm_send_disassoc_imminent(struct ho
+@@ -865,6 +868,7 @@ int wnm_send_disassoc_imminent(struct ho
  
  	pos = mgmt->u.action.u.bss_tm_req.variable;
  
@@ -63,7 +63,7 @@
  	wpa_printf(MSG_DEBUG, "WNM: Send BSS Transition Management Request frame to indicate imminent disassociation (disassoc_timer=%d) to "
  		   MACSTR, disassoc_timer, MAC2STR(sta->addr));
  	if (hostapd_drv_send_mlme(hapd, buf, pos - buf, 0, NULL, 0, 0) < 0) {
-@@ -921,6 +925,7 @@ int wnm_send_ess_disassoc_imminent(struc
+@@ -947,6 +951,7 @@ int wnm_send_ess_disassoc_imminent(struc
  		return -1;
  	}
  
@@ -71,14 +71,14 @@
  	if (disassoc_timer) {
  		/* send disassociation frame after time-out */
  		set_disassoc_timer(hapd, sta, disassoc_timer);
-@@ -1001,6 +1006,7 @@ int wnm_send_bss_tm_req(struct hostapd_d
+@@ -1028,6 +1033,7 @@ int wnm_send_bss_tm_req(struct hostapd_d
  	}
  	os_free(buf);
  
 +	hapd->openwrt_stats.wnm.bss_transition_request_tx++;
  	if (disassoc_timer) {
- 		/* send disassociation frame after time-out */
- 		set_disassoc_timer(hapd, sta, disassoc_timer);
+ #ifdef CONFIG_IEEE80211BE
+ 		if (ap_sta_is_mld(hapd, sta)) {
 --- a/src/ap/rrm.c
 +++ b/src/ap/rrm.c
 @@ -269,6 +269,8 @@ static void hostapd_send_nei_report_resp
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index a6ccf83331..00f577caba 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -12,7 +12,7 @@
 +endif
  
  ifdef CONFIG_CODE_COVERAGE
- CFLAGS += -O0 -fprofile-arcs -ftest-coverage
+ CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE
 --- a/src/ap/hostapd.h
 +++ b/src/ap/hostapd.h
 @@ -18,6 +18,7 @@
@@ -31,7 +31,7 @@
  	int interface_added; /* virtual interface added for this BSS */
  	unsigned int started:1;
  	unsigned int disabled:1;
-@@ -695,6 +697,7 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -707,6 +709,7 @@ hostapd_alloc_bss_data(struct hostapd_if
  		       struct hostapd_bss_config *bss);
  int hostapd_setup_interface(struct hostapd_iface *iface);
  int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
@@ -41,7 +41,7 @@
  struct hostapd_iface * hostapd_alloc_iface(void);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -435,6 +435,7 @@ void hostapd_free_hapd_data(struct hosta
+@@ -493,6 +493,7 @@ void hostapd_free_hapd_data(struct hosta
  	hapd->beacon_set_done = 0;
  
  	wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
@@ -49,7 +49,7 @@
  	accounting_deinit(hapd);
  	hostapd_deinit_wpa(hapd);
  	vlan_deinit(hapd);
-@@ -1187,6 +1188,8 @@ static int hostapd_start_beacon(struct h
+@@ -1274,6 +1275,8 @@ static int hostapd_start_beacon(struct h
  	if (hapd->driver && hapd->driver->set_operstate)
  		hapd->driver->set_operstate(hapd->drv_priv, 1);
  
@@ -58,7 +58,7 @@
  	return 0;
  }
  
-@@ -2275,6 +2278,7 @@ static int hostapd_setup_interface_compl
+@@ -2367,6 +2370,7 @@ static int hostapd_setup_interface_compl
  	if (err)
  		goto fail;
  
@@ -66,7 +66,7 @@
  	wpa_printf(MSG_DEBUG, "Completing interface initialization");
  	if (iface->freq) {
  #ifdef NEED_AP_MLME
-@@ -2494,6 +2498,7 @@ dfs_offload:
+@@ -2586,6 +2590,7 @@ dfs_offload:
  
  fail:
  	wpa_printf(MSG_ERROR, "Interface initialization failed");
@@ -74,7 +74,7 @@
  
  	if (iface->is_no_ir) {
  		hostapd_set_state(iface, HAPD_IFACE_NO_IR);
-@@ -2984,6 +2989,7 @@ void hostapd_interface_deinit_free(struc
+@@ -3076,6 +3081,7 @@ void hostapd_interface_deinit_free(struc
  		   (unsigned int) iface->conf->num_bss);
  	driver = iface->bss[0]->driver;
  	drv_priv = iface->bss[0]->drv_priv;
@@ -84,7 +84,7 @@
  		   __func__, driver, drv_priv);
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
-@@ -2786,7 +2786,7 @@ static void handle_auth(struct hostapd_d
+@@ -2798,7 +2798,7 @@ static void handle_auth(struct hostapd_d
  	u16 auth_alg, auth_transaction, status_code;
  	u16 resp = WLAN_STATUS_SUCCESS;
  	struct sta_info *sta = NULL;
@@ -93,7 +93,7 @@
  	u16 fc;
  	const u8 *challenge = NULL;
  	u8 resp_ies[2 + WLAN_AUTH_CHALLENGE_LEN];
-@@ -2795,6 +2795,11 @@ static void handle_auth(struct hostapd_d
+@@ -2807,6 +2807,11 @@ static void handle_auth(struct hostapd_d
  	struct radius_sta rad_info;
  	const u8 *dst, *sa, *bssid;
  	bool mld_sta = false;
@@ -105,7 +105,7 @@
  
  	if (len < IEEE80211_HDRLEN + sizeof(mgmt->u.auth)) {
  		wpa_printf(MSG_INFO, "handle_auth - too short payload (len=%lu)",
-@@ -2986,6 +2991,13 @@ static void handle_auth(struct hostapd_d
+@@ -2998,6 +3003,13 @@ static void handle_auth(struct hostapd_d
  		resp = WLAN_STATUS_UNSPECIFIED_FAILURE;
  		goto fail;
  	}
@@ -119,7 +119,7 @@
  	if (res == HOSTAPD_ACL_PENDING)
  		return;
  
-@@ -5161,7 +5173,7 @@ static void handle_assoc(struct hostapd_
+@@ -5242,7 +5254,7 @@ static void handle_assoc(struct hostapd_
  	int resp = WLAN_STATUS_SUCCESS;
  	u16 reply_res = WLAN_STATUS_UNSPECIFIED_FAILURE;
  	const u8 *pos;
@@ -128,7 +128,7 @@
  	struct sta_info *sta;
  	u8 *tmp = NULL;
  #ifdef CONFIG_FILS
-@@ -5374,6 +5386,11 @@ static void handle_assoc(struct hostapd_
+@@ -5484,6 +5496,11 @@ static void handle_assoc(struct hostapd_
  		left = res;
  	}
  #endif /* CONFIG_FILS */
@@ -140,9 +140,9 @@
  
  	/* followed by SSID and Supported rates; and HT capabilities if 802.11n
  	 * is used */
-@@ -5472,6 +5489,13 @@ static void handle_assoc(struct hostapd_
- 	}
- #endif /* CONFIG_FILS */
+@@ -5586,6 +5603,13 @@ static void handle_assoc(struct hostapd_
+ 	if (set_beacon)
+ 		ieee802_11_set_beacons(hapd->iface);
  
 +	ubus_resp = hostapd_ubus_handle_event(hapd, &req);
 +	if (ubus_resp) {
@@ -154,7 +154,7 @@
   fail:
  
  	/*
-@@ -5753,6 +5777,7 @@ static void handle_disassoc(struct hosta
+@@ -5836,6 +5860,7 @@ static void handle_disassoc(struct hosta
  			   (unsigned long) len);
  		return;
  	}
@@ -162,7 +162,7 @@
  
  	sta = ap_get_sta(hapd, mgmt->sa);
  	if (!sta) {
-@@ -5784,6 +5809,8 @@ static void handle_deauth(struct hostapd
+@@ -5867,6 +5892,8 @@ static void handle_deauth(struct hostapd
  	/* Clear the PTKSA cache entries for PASN */
  	ptksa_cache_flush(hapd->ptksa, mgmt->sa, WPA_CIPHER_NONE);
  
@@ -173,10 +173,10 @@
  		wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR
 --- a/src/ap/beacon.c
 +++ b/src/ap/beacon.c
-@@ -1036,6 +1036,12 @@ void handle_probe_req(struct hostapd_dat
- 	u16 csa_offs[2];
- 	size_t csa_offs_len;
- 	struct radius_sta rad_info;
+@@ -1351,6 +1351,12 @@ void handle_probe_req(struct hostapd_dat
+ 	int mld_id;
+ 	u16 links;
+ #endif /* CONFIG_IEEE80211BE */
 +	struct hostapd_ubus_request req = {
 +		.type = HOSTAPD_UBUS_PROBE_REQ,
 +		.mgmt_frame = mgmt,
@@ -186,7 +186,7 @@
  
  	if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
  	    ssi_signal < hapd->iconf->rssi_ignore_probe_request)
-@@ -1222,6 +1228,12 @@ void handle_probe_req(struct hostapd_dat
+@@ -1537,6 +1543,12 @@ void handle_probe_req(struct hostapd_dat
  	}
  #endif /* CONFIG_P2P */
  
@@ -201,10 +201,10 @@
  
 --- a/src/ap/drv_callbacks.c
 +++ b/src/ap/drv_callbacks.c
-@@ -260,6 +260,10 @@ int hostapd_notif_assoc(struct hostapd_d
- 	u16 reason = WLAN_REASON_UNSPECIFIED;
- 	int status = WLAN_STATUS_SUCCESS;
- 	const u8 *p2p_dev_addr = NULL;
+@@ -268,6 +268,10 @@ int hostapd_notif_assoc(struct hostapd_d
+ 	struct hostapd_iface *iface = hapd->iface;
+ #endif /* CONFIG_OWE */
+ 	bool updated = false;
 +	struct hostapd_ubus_request req = {
 +		.type = HOSTAPD_UBUS_ASSOC_REQ,
 +		.addr = addr,
@@ -212,7 +212,7 @@
  
  	if (addr == NULL) {
  		/*
-@@ -396,6 +400,12 @@ int hostapd_notif_assoc(struct hostapd_d
+@@ -412,6 +416,12 @@ int hostapd_notif_assoc(struct hostapd_d
  		goto fail;
  	}
  
@@ -227,7 +227,7 @@
  		wpabuf_free(sta->p2p_ie);
 --- a/src/ap/sta_info.c
 +++ b/src/ap/sta_info.c
-@@ -471,6 +471,7 @@ void ap_handle_timer(void *eloop_ctx, vo
+@@ -476,6 +476,7 @@ void ap_handle_timer(void *eloop_ctx, vo
  		hostapd_logger(hapd, sta->addr, HOSTAPD_MODULE_IEEE80211,
  			       HOSTAPD_LEVEL_INFO, "deauthenticated due to "
  			       "local deauth request");
@@ -235,7 +235,7 @@
  		ap_free_sta(hapd, sta);
  		return;
  	}
-@@ -626,6 +627,7 @@ skip_poll:
+@@ -631,6 +632,7 @@ skip_poll:
  		mlme_deauthenticate_indication(
  			hapd, sta,
  			WLAN_REASON_PREV_AUTH_NOT_VALID);
@@ -243,8 +243,8 @@
  		ap_free_sta(hapd, sta);
  		break;
  	}
-@@ -1344,15 +1346,28 @@ void ap_sta_set_authorized(struct hostap
- 					sta->addr, authorized, dev_addr);
+@@ -1451,15 +1453,28 @@ void ap_sta_set_authorized_event(struct
+ 		os_snprintf(buf, sizeof(buf), MACSTR, MAC2STR(sta->addr));
  
  	if (authorized) {
 +		static const char * const auth_algs[] = {
@@ -272,7 +272,7 @@
  #ifdef CONFIG_P2P
  		if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
  			os_snprintf(ip_addr, sizeof(ip_addr),
-@@ -1362,6 +1377,13 @@ void ap_sta_set_authorized(struct hostap
+@@ -1470,6 +1485,13 @@ void ap_sta_set_authorized_event(struct
  		}
  #endif /* CONFIG_P2P */
  
@@ -286,7 +286,7 @@
  		keyid = ap_sta_wpa_get_keyid(hapd, sta);
  		if (keyid) {
  			os_snprintf(keyid_buf, sizeof(keyid_buf),
-@@ -1380,17 +1402,19 @@ void ap_sta_set_authorized(struct hostap
+@@ -1488,17 +1510,19 @@ void ap_sta_set_authorized_event(struct
  					 dpp_pkhash, SHA256_MAC_LEN);
  		}
  
@@ -312,7 +312,7 @@
  		    hapd->msg_ctx_parent != hapd->msg_ctx)
 --- a/src/ap/wpa_auth_glue.c
 +++ b/src/ap/wpa_auth_glue.c
-@@ -269,6 +269,7 @@ static void hostapd_wpa_auth_psk_failure
+@@ -275,6 +275,7 @@ static void hostapd_wpa_auth_psk_failure
  	struct hostapd_data *hapd = ctx;
  	wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR,
  		MAC2STR(addr));
@@ -322,7 +322,7 @@
  
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -192,6 +192,13 @@ ifdef CONFIG_EAPOL_TEST
+@@ -189,6 +189,13 @@ ifdef CONFIG_EAPOL_TEST
  CFLAGS += -Werror -DEAPOL_TEST
  endif
  
@@ -334,9 +334,9 @@
 +endif
 +
  ifdef CONFIG_CODE_COVERAGE
- CFLAGS += -O0 -fprofile-arcs -ftest-coverage
+ CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE
  LIBS += -lgcov
-@@ -987,6 +994,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
+@@ -1043,6 +1050,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
  CFLAGS += -DCONFIG_CTRL_IFACE_MIB
  endif
  OBJS += ../src/ap/ctrl_iface_ap.o
@@ -348,7 +348,7 @@
  CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7595,6 +7595,8 @@ struct wpa_supplicant * wpa_supplicant_a
+@@ -7716,6 +7716,8 @@ struct wpa_supplicant * wpa_supplicant_a
  	}
  #endif /* CONFIG_P2P */
  
@@ -357,7 +357,7 @@
  	return wpa_s;
  }
  
-@@ -7621,6 +7623,8 @@ int wpa_supplicant_remove_iface(struct w
+@@ -7742,6 +7744,8 @@ int wpa_supplicant_remove_iface(struct w
  	struct wpa_supplicant *parent = wpa_s->parent;
  #endif /* CONFIG_MESH */
  
@@ -366,7 +366,7 @@
  	/* Remove interface from the global list of interfaces */
  	prev = global->ifaces;
  	if (prev == wpa_s) {
-@@ -7967,8 +7971,12 @@ int wpa_supplicant_run(struct wpa_global
+@@ -8088,8 +8092,12 @@ int wpa_supplicant_run(struct wpa_global
  	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
  	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
  
@@ -398,7 +398,7 @@
  };
  
  
-@@ -685,6 +688,7 @@ struct wpa_supplicant {
+@@ -693,6 +696,7 @@ struct wpa_supplicant {
  	unsigned char own_addr[ETH_ALEN];
  	unsigned char perm_addr[ETH_ALEN];
  	char ifname[100];
@@ -416,7 +416,7 @@
  
  
  #ifndef WPS_PIN_SCAN_IGNORE_SEL_REG
-@@ -402,6 +403,8 @@ static int wpa_supplicant_wps_cred(void
+@@ -401,6 +402,8 @@ static int wpa_supplicant_wps_cred(void
  	wpa_hexdump_key(MSG_DEBUG, "WPS: Received Credential attribute",
  			cred->cred_attr, cred->cred_attr_len);
  
@@ -508,7 +508,7 @@
  
 --- a/src/ap/dfs.c
 +++ b/src/ap/dfs.c
-@@ -1216,6 +1216,8 @@ int hostapd_dfs_pre_cac_expired(struct h
+@@ -1225,6 +1225,8 @@ int hostapd_dfs_pre_cac_expired(struct h
  		"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
  		freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
  
@@ -550,7 +550,7 @@
  	}
 --- a/src/ap/sta_info.h
 +++ b/src/ap/sta_info.h
-@@ -322,6 +322,7 @@ struct sta_info {
+@@ -319,6 +319,7 @@ struct sta_info {
  #endif /* CONFIG_TESTING_OPTIONS */
  #ifdef CONFIG_AIRTIME_POLICY
  	unsigned int airtime_weight;
@@ -560,7 +560,7 @@
  
 --- a/src/ap/wnm_ap.c
 +++ b/src/ap/wnm_ap.c
-@@ -455,7 +455,8 @@ static void ieee802_11_rx_bss_trans_mgmt
+@@ -479,7 +479,8 @@ static void ieee802_11_rx_bss_trans_mgmt
  		MAC2STR(addr), reason, hex ? " neighbor=" : "", hex);
  	os_free(hex);
  
@@ -570,7 +570,7 @@
  }
  
  
-@@ -477,7 +478,7 @@ static void ieee802_11_rx_bss_trans_mgmt
+@@ -501,7 +502,7 @@ static void ieee802_11_rx_bss_trans_mgmt
  					      size_t len)
  {
  	u8 dialog_token, status_code, bss_termination_delay;
@@ -579,7 +579,7 @@
  	int enabled = hapd->conf->bss_transition;
  	struct sta_info *sta;
  
-@@ -524,6 +525,7 @@ static void ieee802_11_rx_bss_trans_mgmt
+@@ -548,6 +549,7 @@ static void ieee802_11_rx_bss_trans_mgmt
  			wpa_printf(MSG_DEBUG, "WNM: not enough room for Target BSSID field");
  			return;
  		}
@@ -587,7 +587,7 @@
  		sta->agreed_to_steer = 1;
  		eloop_cancel_timeout(ap_sta_reset_steer_flag_timer, hapd, sta);
  		eloop_register_timeout(2, 0, ap_sta_reset_steer_flag_timer,
-@@ -543,6 +545,10 @@ static void ieee802_11_rx_bss_trans_mgmt
+@@ -567,6 +569,10 @@ static void ieee802_11_rx_bss_trans_mgmt
  			MAC2STR(addr), status_code, bss_termination_delay);
  	}
  
diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch
index cfdb51f356..e459721b89 100644
--- a/package/network/services/hostapd/patches/601-ucode_support.patch
+++ b/package/network/services/hostapd/patches/601-ucode_support.patch
@@ -26,7 +26,7 @@
  ifdef CONFIG_CODE_COVERAGE
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
-@@ -1007,6 +1007,7 @@ int main(int argc, char *argv[])
+@@ -1014,6 +1014,7 @@ int main(int argc, char *argv[])
  	}
  
  	hostapd_global_ctrl_iface_init(&interfaces);
@@ -34,7 +34,7 @@
  
  	if (hostapd_global_run(&interfaces, daemonize, pid_file)) {
  		wpa_printf(MSG_ERROR, "Failed to start eloop");
-@@ -1016,6 +1017,7 @@ int main(int argc, char *argv[])
+@@ -1023,6 +1024,7 @@ int main(int argc, char *argv[])
  	ret = 0;
  
   out:
@@ -71,7 +71,7 @@
  	int interface_added; /* virtual interface added for this BSS */
  	unsigned int started:1;
  	unsigned int disabled:1;
-@@ -506,6 +512,7 @@ struct hostapd_sta_info {
+@@ -518,6 +524,7 @@ struct hostapd_sta_info {
   */
  struct hostapd_iface {
  	struct hapd_interfaces *interfaces;
@@ -79,7 +79,7 @@
  	void *owner;
  	char *config_fname;
  	struct hostapd_config *conf;
-@@ -706,6 +713,8 @@ struct hostapd_iface * hostapd_init(stru
+@@ -718,6 +725,8 @@ struct hostapd_iface * hostapd_init(stru
  struct hostapd_iface *
  hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy,
  			   const char *config_fname, int debug);
@@ -90,7 +90,7 @@
  void hostapd_interface_deinit_free(struct hostapd_iface *iface);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -252,6 +252,8 @@ int hostapd_reload_config(struct hostapd
+@@ -255,6 +255,8 @@ int hostapd_reload_config(struct hostapd
  	struct hostapd_config *newconf, *oldconf;
  	size_t j;
  
@@ -99,7 +99,7 @@
  	if (iface->config_fname == NULL) {
  		/* Only in-memory config in use - assume it has been updated */
  		hostapd_clear_old(iface);
-@@ -435,6 +437,7 @@ void hostapd_free_hapd_data(struct hosta
+@@ -493,6 +495,7 @@ void hostapd_free_hapd_data(struct hosta
  	hapd->beacon_set_done = 0;
  
  	wpa_printf(MSG_DEBUG, "%s(%s)", __func__, hapd->conf->iface);
@@ -107,7 +107,7 @@
  	hostapd_ubus_free_bss(hapd);
  	accounting_deinit(hapd);
  	hostapd_deinit_wpa(hapd);
-@@ -600,6 +603,7 @@ void hostapd_cleanup_iface_partial(struc
+@@ -687,6 +690,7 @@ void hostapd_cleanup_iface_partial(struc
  static void hostapd_cleanup_iface(struct hostapd_iface *iface)
  {
  	wpa_printf(MSG_DEBUG, "%s(%p)", __func__, iface);
@@ -115,7 +115,7 @@
  	eloop_cancel_timeout(hostapd_interface_setup_failure_handler, iface,
  			     NULL);
  
-@@ -1189,6 +1193,7 @@ static int hostapd_start_beacon(struct h
+@@ -1276,6 +1280,7 @@ static int hostapd_start_beacon(struct h
  		hapd->driver->set_operstate(hapd->drv_priv, 1);
  
  	hostapd_ubus_add_bss(hapd);
@@ -123,7 +123,7 @@
  
  	return 0;
  }
-@@ -1211,8 +1216,7 @@ static int hostapd_start_beacon(struct h
+@@ -1298,8 +1303,7 @@ static int hostapd_start_beacon(struct h
   * initialized. Most of the modules that are initialized here will be
   * deinitialized in hostapd_cleanup().
   */
@@ -133,7 +133,7 @@
  {
  	struct hostapd_bss_config *conf = hapd->conf;
  	u8 ssid[SSID_MAX_LEN + 1];
-@@ -2698,7 +2702,7 @@ hostapd_alloc_bss_data(struct hostapd_if
+@@ -2790,7 +2794,7 @@ hostapd_alloc_bss_data(struct hostapd_if
  }
  
  
@@ -142,7 +142,7 @@
  {
  	if (!hapd)
  		return;
-@@ -3491,7 +3495,8 @@ int hostapd_remove_iface(struct hapd_int
+@@ -3608,7 +3612,8 @@ int hostapd_remove_iface(struct hapd_int
  		hapd_iface = interfaces->iface[i];
  		if (hapd_iface == NULL)
  			return -1;
@@ -154,7 +154,7 @@
  				!!(hapd_iface->drv_flags &
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -195,8 +195,20 @@ endif
+@@ -192,8 +192,20 @@ endif
  ifdef CONFIG_UBUS
  CFLAGS += -DUBUS_SUPPORT
  OBJS += ubus.o
@@ -176,7 +176,7 @@
  endif
  
  ifdef CONFIG_CODE_COVERAGE
-@@ -997,6 +1009,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o
+@@ -1053,6 +1065,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o
  ifdef CONFIG_UBUS
  OBJS += ../src/ap/ubus.o
  endif
@@ -188,7 +188,7 @@
  CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
-@@ -1044,6 +1044,7 @@ void wpa_supplicant_set_state(struct wpa
+@@ -1060,6 +1060,7 @@ void wpa_supplicant_set_state(struct wpa
  		sme_sched_obss_scan(wpa_s, 0);
  	}
  	wpa_s->wpa_state = state;
@@ -196,7 +196,7 @@
  
  #ifdef CONFIG_BGSCAN
  	if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid)
-@@ -7594,6 +7595,7 @@ struct wpa_supplicant * wpa_supplicant_a
+@@ -7717,6 +7718,7 @@ struct wpa_supplicant * wpa_supplicant_a
  #endif /* CONFIG_P2P */
  
  	wpas_ubus_add_bss(wpa_s);
@@ -204,7 +204,7 @@
  
  	return wpa_s;
  }
-@@ -7621,6 +7623,7 @@ int wpa_supplicant_remove_iface(struct w
+@@ -7744,6 +7746,7 @@ int wpa_supplicant_remove_iface(struct w
  	struct wpa_supplicant *parent = wpa_s->parent;
  #endif /* CONFIG_MESH */
  
@@ -212,7 +212,7 @@
  	wpas_ubus_free_bss(wpa_s);
  
  	/* Remove interface from the global list of interfaces */
-@@ -7931,6 +7934,7 @@ struct wpa_global * wpa_supplicant_init(
+@@ -8054,6 +8057,7 @@ struct wpa_global * wpa_supplicant_init(
  
  	eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0,
  			       wpas_periodic, global, NULL);
@@ -220,7 +220,7 @@
  
  	return global;
  }
-@@ -7969,12 +7973,8 @@ int wpa_supplicant_run(struct wpa_global
+@@ -8092,12 +8096,8 @@ int wpa_supplicant_run(struct wpa_global
  	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
  	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
  
@@ -233,7 +233,7 @@
  	return 0;
  }
  
-@@ -8007,6 +8007,8 @@ void wpa_supplicant_deinit(struct wpa_gl
+@@ -8130,6 +8130,8 @@ void wpa_supplicant_deinit(struct wpa_gl
  
  	wpas_notify_supplicant_deinitialized(global);
  
@@ -252,7 +252,7 @@
  
  extern const char *const wpa_supplicant_version;
  extern const char *const wpa_supplicant_license;
-@@ -689,6 +690,7 @@ struct wpa_supplicant {
+@@ -697,6 +698,7 @@ struct wpa_supplicant {
  	unsigned char perm_addr[ETH_ALEN];
  	char ifname[100];
  	struct wpas_ubus_bss ubus;
@@ -262,7 +262,7 @@
  #endif /* CONFIG_MATCH_IFACE */
 --- a/hostapd/ctrl_iface.c
 +++ b/hostapd/ctrl_iface.c
-@@ -4856,6 +4856,7 @@ try_again:
+@@ -5487,6 +5487,7 @@ try_again:
  		return -1;
  	}
  
@@ -270,7 +270,7 @@
  	wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb);
  
  	return 0;
-@@ -4957,6 +4958,7 @@ fail:
+@@ -5588,6 +5589,7 @@ fail:
  	os_free(fname);
  
  	interface->global_ctrl_sock = s;
@@ -280,7 +280,7 @@
  
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -3787,6 +3787,25 @@ struct wpa_driver_ops {
+@@ -3853,6 +3853,25 @@ struct wpa_driver_ops {
  			 const char *ifname);
  
  	/**
@@ -306,7 +306,7 @@
  	 * set_sta_vlan - Bind a station into a specific interface (AP only)
  	 * @priv: Private driver interface data
  	 * @ifname: Interface (main or virtual BSS or VLAN)
-@@ -6440,6 +6459,7 @@ union wpa_event_data {
+@@ -6507,6 +6526,7 @@ union wpa_event_data {
  
  	/**
  	 * struct ch_switch
@@ -314,7 +314,7 @@
  	 * @freq: Frequency of new channel in MHz
  	 * @ht_enabled: Whether this is an HT channel
  	 * @ch_offset: Secondary channel offset
-@@ -6450,6 +6470,7 @@ union wpa_event_data {
+@@ -6517,6 +6537,7 @@ union wpa_event_data {
  	 * @punct_bitmap: Puncturing bitmap
  	 */
  	struct ch_switch {
@@ -324,7 +324,7 @@
  		int ch_offset;
 --- a/src/drivers/driver_nl80211_event.c
 +++ b/src/drivers/driver_nl80211_event.c
-@@ -1202,6 +1202,7 @@ static void mlme_event_ch_switch(struct
+@@ -1196,6 +1196,7 @@ static void mlme_event_ch_switch(struct
  				 struct nlattr *bw, struct nlattr *cf1,
  				 struct nlattr *cf2,
  				 struct nlattr *punct_bitmap,
@@ -332,7 +332,7 @@
  				 int finished)
  {
  	struct i802_bss *bss;
-@@ -1265,6 +1266,8 @@ static void mlme_event_ch_switch(struct
+@@ -1259,6 +1260,8 @@ static void mlme_event_ch_switch(struct
  		data.ch_switch.cf1 = nla_get_u32(cf1);
  	if (cf2)
  		data.ch_switch.cf2 = nla_get_u32(cf2);
@@ -341,7 +341,7 @@
  
  	if (finished)
  		bss->flink->freq = data.ch_switch.freq;
-@@ -3912,6 +3915,7 @@ static void do_process_drv_event(struct
+@@ -3961,6 +3964,7 @@ static void do_process_drv_event(struct
  				     tb[NL80211_ATTR_CENTER_FREQ1],
  				     tb[NL80211_ATTR_CENTER_FREQ2],
  				     tb[NL80211_ATTR_PUNCT_BITMAP],
@@ -349,7 +349,7 @@
  				     0);
  		break;
  	case NL80211_CMD_CH_SWITCH_NOTIFY:
-@@ -3924,6 +3928,7 @@ static void do_process_drv_event(struct
+@@ -3973,6 +3977,7 @@ static void do_process_drv_event(struct
  				     tb[NL80211_ATTR_CENTER_FREQ1],
  				     tb[NL80211_ATTR_CENTER_FREQ2],
  				     tb[NL80211_ATTR_PUNCT_BITMAP],
@@ -359,7 +359,7 @@
  	case NL80211_CMD_DISCONNECT:
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -5389,6 +5389,7 @@ void supplicant_event(void *ctx, enum wp
+@@ -5955,6 +5955,7 @@ void supplicant_event(void *ctx, enum wp
  		event_to_string(event), event);
  #endif /* CONFIG_NO_STDOUT_DEBUG */
  
@@ -369,8 +369,8 @@
  #ifdef CONFIG_FST
 --- a/src/ap/ap_drv_ops.h
 +++ b/src/ap/ap_drv_ops.h
-@@ -393,6 +393,23 @@ static inline int hostapd_drv_stop_ap(st
- 	return hapd->driver->stop_ap(hapd->drv_priv);
+@@ -399,6 +399,23 @@ static inline int hostapd_drv_stop_ap(st
+ 	return hapd->driver->stop_ap(hapd->drv_priv, link_id);
  }
  
 +static inline int hostapd_drv_if_rename(struct hostapd_data *hapd,
@@ -395,7 +395,7 @@
  {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -73,6 +73,16 @@ enum nlmsgerr_attrs {
+@@ -75,6 +75,16 @@ enum nlmsgerr_attrs {
  
  #endif /* ANDROID */
  
@@ -412,7 +412,7 @@
  
  static struct nl_sock * nl_create_handle(struct nl_cb *cb, const char *dbg)
  {
-@@ -379,6 +389,11 @@ static int no_seq_check(struct nl_msg *m
+@@ -429,6 +439,11 @@ static int no_seq_check(struct nl_msg *m
  	return NL_OK;
  }
  
@@ -424,23 +424,24 @@
  
  static void nl80211_nlmsg_clear(struct nl_msg *msg)
  {
-@@ -415,6 +430,7 @@ static int send_and_recv(struct nl80211_
+@@ -502,6 +517,8 @@ int send_and_recv(struct nl80211_global
  	if (!msg)
  		return -ENOMEM;
  
 +	handle_nl_debug_hook(msg, 1);
- 	cb = nl_cb_clone(global->nl_cb);
- 	if (!cb)
- 		goto out;
-@@ -443,6 +459,7 @@ static int send_and_recv(struct nl80211_
++
+ 	err.err = -ENOMEM;
  
- 	err = 1;
+ 	s_nl_cb = nl_socket_get_cb(nl_handle);
+@@ -536,6 +553,7 @@ int send_and_recv(struct nl80211_global
+ 	err.orig_msg = msg;
+ 	err.err_info = err_info;
  
 +	nl_cb_set(cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
  	nl_cb_err(cb, NL_CB_CUSTOM, error_handler, &err);
- 	nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err);
+ 	nl_cb_set(cb, NL_CB_FINISH, NL_CB_CUSTOM, finish_handler, &err.err);
  	if (ack_handler_custom) {
-@@ -919,6 +936,7 @@ nl80211_get_wiphy_data_ap(struct i802_bs
+@@ -939,6 +957,7 @@ nl80211_get_wiphy_data_ap(struct i802_bs
  			os_free(w);
  			return NULL;
  		}
@@ -448,7 +449,7 @@
  		nl_cb_set(w->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
  			  no_seq_check, NULL);
  		nl_cb_set(w->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
-@@ -1333,7 +1351,7 @@ static void wpa_driver_nl80211_event_rtm
+@@ -1353,7 +1372,7 @@ static void wpa_driver_nl80211_event_rtm
  		}
  		wpa_printf(MSG_DEBUG, "nl80211: Interface down (%s/%s)",
  			   namebuf, ifname);
@@ -457,7 +458,7 @@
  			wpa_printf(MSG_DEBUG,
  				   "nl80211: Not the main interface (%s) - do not indicate interface down",
  				   drv->first_bss->ifname);
-@@ -1369,7 +1387,7 @@ static void wpa_driver_nl80211_event_rtm
+@@ -1389,7 +1408,7 @@ static void wpa_driver_nl80211_event_rtm
  		}
  		wpa_printf(MSG_DEBUG, "nl80211: Interface up (%s/%s)",
  			   namebuf, ifname);
@@ -466,15 +467,15 @@
  			wpa_printf(MSG_DEBUG,
  				   "nl80211: Not the main interface (%s) - do not indicate interface up",
  				   drv->first_bss->ifname);
-@@ -1992,6 +2010,7 @@ static int wpa_driver_nl80211_init_nl_gl
- 		/* Continue without vendor events */
- 	}
+@@ -2035,6 +2054,7 @@ static int wpa_driver_nl80211_init_nl_gl
+ 	genl_family_put(family);
+ 	nl_cache_free(cache);
  
 +	nl_cb_set(global->nl_cb, NL_CB_MSG_IN, NL_CB_CUSTOM, debug_handler, NULL);
  	nl_cb_set(global->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
  		  no_seq_check, NULL);
  	nl_cb_set(global->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
-@@ -2160,6 +2179,7 @@ static int nl80211_init_bss(struct i802_
+@@ -2205,6 +2225,7 @@ static int nl80211_init_bss(struct i802_
  	if (!bss->nl_cb)
  		return -1;
  
@@ -482,7 +483,7 @@
  	nl_cb_set(bss->nl_cb, NL_CB_SEQ_CHECK, NL_CB_CUSTOM,
  		  no_seq_check, NULL);
  	nl_cb_set(bss->nl_cb, NL_CB_VALID, NL_CB_CUSTOM,
-@@ -8432,6 +8452,7 @@ static void *i802_init(struct hostapd_da
+@@ -8554,6 +8575,7 @@ static void *i802_init(struct hostapd_da
  	char master_ifname[IFNAMSIZ];
  	int ifindex, br_ifindex = 0;
  	int br_added = 0;
@@ -490,7 +491,7 @@
  
  	bss = wpa_driver_nl80211_drv_init(hapd, params->ifname,
  					  params->global_priv, 1,
-@@ -8491,21 +8512,17 @@ static void *i802_init(struct hostapd_da
+@@ -8613,21 +8635,17 @@ static void *i802_init(struct hostapd_da
  	    (params->num_bridge == 0 || !params->bridge[0]))
  		add_ifidx(drv, br_ifindex, drv->ifindex);
  
@@ -522,7 +523,7 @@
  	}
  
  	if (drv->capa.flags2 & WPA_DRIVER_FLAGS2_CONTROL_PORT_RX) {
-@@ -8875,6 +8892,50 @@ static int wpa_driver_nl80211_if_remove(
+@@ -8992,6 +9010,50 @@ static int wpa_driver_nl80211_if_remove(
  	return 0;
  }
  
@@ -573,7 +574,7 @@
  
  static int cookie_handler(struct nl_msg *msg, void *arg)
  {
-@@ -10513,6 +10574,37 @@ static int driver_nl80211_if_remove(void
+@@ -10688,6 +10750,37 @@ static int driver_nl80211_if_remove(void
  }
  
  
@@ -611,7 +612,7 @@
  static int driver_nl80211_send_mlme(void *priv, const u8 *data,
  				    size_t data_len, int noack,
  				    unsigned int freq,
-@@ -13697,6 +13789,8 @@ const struct wpa_driver_ops wpa_driver_n
+@@ -13881,6 +13974,8 @@ const struct wpa_driver_ops wpa_driver_n
  	.set_acl = wpa_driver_nl80211_set_acl,
  	.if_add = wpa_driver_nl80211_if_add,
  	.if_remove = driver_nl80211_if_remove,
diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch
index 3c62bf670f..7d159a23c5 100644
--- a/package/network/services/hostapd/patches/701-reload_config_inline.patch
+++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -4816,7 +4816,12 @@ struct hostapd_config * hostapd_config_r
+@@ -5065,7 +5065,12 @@ struct hostapd_config * hostapd_config_r
  	int errors = 0;
  	size_t i;
  
diff --git a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
index 63d1b8a3b8..1be3f89242 100644
--- a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
+++ b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
@@ -30,7 +30,7 @@
  
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -3351,6 +3351,8 @@ static int hostapd_config_fill(struct ho
+@@ -3559,6 +3559,8 @@ static int hostapd_config_fill(struct ho
  #ifndef CONFIG_NO_VLAN
  	} else if (os_strcmp(buf, "dynamic_vlan") == 0) {
  		bss->ssid.dynamic_vlan = atoi(pos);
diff --git a/package/network/services/hostapd/patches/711-wds_bridge_force.patch b/package/network/services/hostapd/patches/711-wds_bridge_force.patch
index c0f2c31c44..32f4eb5b02 100644
--- a/package/network/services/hostapd/patches/711-wds_bridge_force.patch
+++ b/package/network/services/hostapd/patches/711-wds_bridge_force.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -2318,6 +2318,8 @@ static int hostapd_config_fill(struct ho
+@@ -2447,6 +2447,8 @@ static int hostapd_config_fill(struct ho
  			   sizeof(conf->bss[0]->iface));
  	} else if (os_strcmp(buf, "bridge") == 0) {
  		os_strlcpy(bss->bridge, pos, sizeof(bss->bridge));
@@ -11,7 +11,7 @@
  	} else if (os_strcmp(buf, "vlan_bridge") == 0) {
 --- a/src/ap/ap_drv_ops.c
 +++ b/src/ap/ap_drv_ops.c
-@@ -348,8 +348,6 @@ int hostapd_set_wds_sta(struct hostapd_d
+@@ -387,8 +387,6 @@ int hostapd_set_wds_sta(struct hostapd_d
  		return -1;
  	if (hapd->conf->wds_bridge[0])
  		bridge = hapd->conf->wds_bridge;
diff --git a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
index 089c1ddc24..85dcd9f37a 100644
--- a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
+++ b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -2848,6 +2848,14 @@ static int hostapd_config_fill(struct ho
+@@ -3041,6 +3041,14 @@ static int hostapd_config_fill(struct ho
  				   line, bss->max_num_sta, MAX_STA_COUNT);
  			return 1;
  		}
@@ -17,7 +17,7 @@
  	} else if (os_strcmp(buf, "extended_key_id") == 0) {
 --- a/src/ap/hostapd.h
 +++ b/src/ap/hostapd.h
-@@ -742,6 +742,7 @@ void hostapd_cleanup_cs_params(struct ho
+@@ -754,6 +754,7 @@ void hostapd_cleanup_cs_params(struct ho
  void hostapd_periodic_iface(struct hostapd_iface *iface);
  int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
  void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
@@ -27,7 +27,7 @@
  void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -244,6 +244,29 @@ static int hostapd_iface_conf_changed(st
+@@ -247,6 +247,29 @@ static int hostapd_iface_conf_changed(st
  	return 0;
  }
  
@@ -59,7 +59,7 @@
  {
 --- a/src/ap/beacon.c
 +++ b/src/ap/beacon.c
-@@ -1252,7 +1252,7 @@ void handle_probe_req(struct hostapd_dat
+@@ -1567,7 +1567,7 @@ void handle_probe_req(struct hostapd_dat
  	if (hapd->conf->no_probe_resp_if_max_sta &&
  	    is_multicast_ether_addr(mgmt->da) &&
  	    is_multicast_ether_addr(mgmt->bssid) &&
@@ -70,7 +70,7 @@
  			   " since no room for additional STA",
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
-@@ -1039,6 +1039,8 @@ struct hostapd_config {
+@@ -1057,6 +1057,8 @@ struct hostapd_config {
  	unsigned int track_sta_max_num;
  	unsigned int track_sta_max_age;
  
diff --git a/package/network/services/hostapd/patches/730-ft_iface.patch b/package/network/services/hostapd/patches/730-ft_iface.patch
index 0795ed15a1..1d10756343 100644
--- a/package/network/services/hostapd/patches/730-ft_iface.patch
+++ b/package/network/services/hostapd/patches/730-ft_iface.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -3007,6 +3007,8 @@ static int hostapd_config_fill(struct ho
+@@ -3200,6 +3200,8 @@ static int hostapd_config_fill(struct ho
  		wpa_printf(MSG_INFO,
  			   "Line %d: Obsolete peerkey parameter ignored", line);
  #ifdef CONFIG_IEEE80211R_AP
@@ -21,7 +21,7 @@
  	int bridge_hairpin; /* hairpin_mode on bridge members */
 --- a/src/ap/wpa_auth_glue.c
 +++ b/src/ap/wpa_auth_glue.c
-@@ -1727,8 +1727,12 @@ int hostapd_setup_wpa(struct hostapd_dat
+@@ -1777,8 +1777,12 @@ int hostapd_setup_wpa(struct hostapd_dat
  	    wpa_key_mgmt_ft(hapd->conf->wpa_key_mgmt)) {
  		const char *ft_iface;
  
diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
index ce64513a42..b704f2eb25 100644
--- a/package/network/services/hostapd/patches/740-snoop_iface.patch
+++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
@@ -76,7 +76,7 @@
  	hapd->x_snoop_initialized = false;
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -2322,6 +2322,8 @@ static int hostapd_config_fill(struct ho
+@@ -2451,6 +2451,8 @@ static int hostapd_config_fill(struct ho
  			os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
  	} else if (os_strcmp(buf, "bridge_hairpin") == 0) {
  		bss->bridge_hairpin = atoi(pos);
@@ -104,7 +104,7 @@
  static inline int hostapd_drv_vendor_cmd(struct hostapd_data *hapd,
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -4209,7 +4209,7 @@ struct wpa_driver_ops {
+@@ -4275,7 +4275,7 @@ struct wpa_driver_ops {
  	 * Returns: 0 on success, negative (<0) on failure
  	 */
  	int (*br_set_net_param)(void *priv, enum drv_br_net_param param,
@@ -115,7 +115,7 @@
  	 * get_wowlan - Get wake-on-wireless status
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
-@@ -12168,7 +12168,7 @@ static const char * drv_br_net_param_str
+@@ -12376,7 +12376,7 @@ static const char * drv_br_net_param_str
  
  
  static int wpa_driver_br_set_net_param(void *priv, enum drv_br_net_param param,
@@ -124,7 +124,7 @@
  {
  	struct i802_bss *bss = priv;
  	char path[128];
-@@ -12194,8 +12194,11 @@ static int wpa_driver_br_set_net_param(v
+@@ -12402,8 +12402,11 @@ static int wpa_driver_br_set_net_param(v
  			return -EINVAL;
  	}
  
diff --git a/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch b/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
index 97c32df704..c30d6a485d 100644
--- a/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
+++ b/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
@@ -1,6 +1,6 @@
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -1604,6 +1604,8 @@ static int parse_anqp_elem(struct hostap
+@@ -1680,6 +1680,8 @@ static int parse_anqp_elem(struct hostap
  	return 0;
  }
  
@@ -9,7 +9,7 @@
  
  static int parse_qos_map_set(struct hostapd_bss_config *bss,
  			     char *buf, int line)
-@@ -1645,8 +1647,6 @@ static int parse_qos_map_set(struct host
+@@ -1721,8 +1723,6 @@ static int parse_qos_map_set(struct host
  	return 0;
  }
  
@@ -18,7 +18,7 @@
  
  #ifdef CONFIG_HS20
  static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf,
-@@ -4062,10 +4062,10 @@ static int hostapd_config_fill(struct ho
+@@ -4282,10 +4282,10 @@ static int hostapd_config_fill(struct ho
  		bss->gas_frag_limit = val;
  	} else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
  		bss->gas_comeback_delay = atoi(pos);
@@ -32,7 +32,7 @@
  		os_free(bss->dump_msk_file);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -1486,6 +1486,7 @@ int hostapd_setup_bss(struct hostapd_dat
+@@ -1578,6 +1578,7 @@ int hostapd_setup_bss(struct hostapd_dat
  		wpa_printf(MSG_ERROR, "GAS server initialization failed");
  		return -1;
  	}
@@ -40,7 +40,7 @@
  
  	if (conf->qos_map_set_len &&
  	    hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
-@@ -1493,7 +1494,6 @@ int hostapd_setup_bss(struct hostapd_dat
+@@ -1585,7 +1586,6 @@ int hostapd_setup_bss(struct hostapd_dat
  		wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
  		return -1;
  	}
@@ -50,7 +50,7 @@
  		wpa_printf(MSG_ERROR, "BSS Load initialization failed");
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -2683,8 +2683,6 @@ void wnm_bss_keep_alive_deinit(struct wp
+@@ -2935,8 +2935,6 @@ void wnm_bss_keep_alive_deinit(struct wp
  }
  
  
@@ -59,7 +59,7 @@
  static int wpas_qos_map_set(struct wpa_supplicant *wpa_s, const u8 *qos_map,
  			    size_t len)
  {
-@@ -2717,8 +2715,6 @@ static void interworking_process_assoc_r
+@@ -2969,8 +2967,6 @@ static void interworking_process_assoc_r
  	}
  }
  
@@ -68,7 +68,7 @@
  
  static void wpa_supplicant_set_4addr_mode(struct wpa_supplicant *wpa_s)
  {
-@@ -3098,10 +3094,8 @@ static int wpa_supplicant_event_associnf
+@@ -3350,10 +3346,8 @@ static int wpa_supplicant_event_associnf
  		wnm_process_assoc_resp(wpa_s, data->assoc_info.resp_ies,
  				       data->assoc_info.resp_ies_len);
  #endif /* CONFIG_WNM */
@@ -81,7 +81,7 @@
  			   data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP))
 --- a/src/ap/ieee802_11_shared.c
 +++ b/src/ap/ieee802_11_shared.c
-@@ -1116,13 +1116,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_da
+@@ -1138,13 +1138,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_da
  u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta,
  		    const u8 *ext_capab_ie, size_t ext_capab_ie_len)
  {
diff --git a/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch b/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch
index f5ebab70d1..5428476b09 100644
--- a/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch
+++ b/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch
@@ -1,6 +1,6 @@
 --- a/src/ap/ap_drv_ops.c
 +++ b/src/ap/ap_drv_ops.c
-@@ -927,7 +927,8 @@ int hostapd_start_dfs_cac(struct hostapd
+@@ -998,7 +998,8 @@ int hostapd_start_dfs_cac(struct hostapd
  int hostapd_drv_set_qos_map(struct hostapd_data *hapd,
  			    const u8 *qos_map_set, u8 qos_map_set_len)
  {
diff --git a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
index 2c705a68cf..7f1b5fc826 100644
--- a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
+++ b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
@@ -10,7 +10,7 @@
  	int acct_interim_interval;
 --- a/src/radius/radius_client.c
 +++ b/src/radius/radius_client.c
-@@ -163,6 +163,8 @@ struct radius_client_data {
+@@ -165,6 +165,8 @@ struct radius_client_data {
  	 */
  	void *ctx;
  
@@ -19,7 +19,7 @@
  	/**
  	 * conf - RADIUS client configuration (list of RADIUS servers to use)
  	 */
-@@ -720,6 +722,30 @@ static void radius_client_list_add(struc
+@@ -819,6 +821,30 @@ static void radius_close_acct_socket(str
  
  
  /**
@@ -50,7 +50,7 @@
   * radius_client_send - Send a RADIUS request
   * @radius: RADIUS client context from radius_client_init()
   * @msg: RADIUS message to be sent
-@@ -1238,6 +1264,10 @@ radius_change_server(struct radius_clien
+@@ -1711,6 +1737,10 @@ radius_change_server(struct radius_clien
  			wpa_printf(MSG_DEBUG, "RADIUS local address: %s:%u",
  				   inet_ntoa(claddr.sin_addr),
  				   ntohs(claddr.sin_port));
@@ -61,7 +61,7 @@
  		}
  		break;
  #ifdef CONFIG_IPV6
-@@ -1249,6 +1279,10 @@ radius_change_server(struct radius_clien
+@@ -1722,6 +1752,10 @@ radius_change_server(struct radius_clien
  				   inet_ntop(AF_INET6, &claddr6.sin6_addr,
  					     abuf, sizeof(abuf)),
  				   ntohs(claddr6.sin6_port));
@@ -74,7 +74,7 @@
  	}
 --- a/src/radius/radius_client.h
 +++ b/src/radius/radius_client.h
-@@ -249,6 +249,8 @@ int radius_client_register(struct radius
+@@ -274,6 +274,8 @@ int radius_client_register(struct radius
  void radius_client_set_interim_error_cb(struct radius_client_data *radius,
  					void (*cb)(const u8 *addr, void *ctx),
  					void *ctx);
@@ -85,7 +85,7 @@
  		       RadiusType msg_type, const u8 *addr);
 --- a/src/ap/ieee802_1x.c
 +++ b/src/ap/ieee802_1x.c
-@@ -598,6 +598,10 @@ int add_common_radius_attr(struct hostap
+@@ -601,6 +601,10 @@ int add_common_radius_attr(struct hostap
  	struct hostapd_radius_attr *attr;
  	int len;
  
@@ -98,7 +98,7 @@
  	    hapd->conf->own_ip_addr.af == AF_INET &&
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
-@@ -2688,6 +2688,8 @@ static int hostapd_config_fill(struct ho
+@@ -2819,6 +2819,8 @@ static int hostapd_config_fill(struct ho
  	} else if (os_strcmp(buf, "iapp_interface") == 0) {
  		wpa_printf(MSG_INFO, "DEPRECATED: iapp_interface not used");
  #endif /* CONFIG_IAPP */
diff --git a/package/network/services/hostapd/patches/761-shared_das_port.patch b/package/network/services/hostapd/patches/761-shared_das_port.patch
index cbb2a1be3c..333295bf22 100644
--- a/package/network/services/hostapd/patches/761-shared_das_port.patch
+++ b/package/network/services/hostapd/patches/761-shared_das_port.patch
@@ -10,7 +10,7 @@
  	unsigned int time_window;
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -1423,6 +1423,7 @@ int hostapd_setup_bss(struct hostapd_dat
+@@ -1510,6 +1510,7 @@ int hostapd_setup_bss(struct hostapd_dat
  
  			os_memset(&das_conf, 0, sizeof(das_conf));
  			das_conf.port = conf->radius_das_port;
diff --git a/package/network/services/hostapd/patches/770-radius_server.patch b/package/network/services/hostapd/patches/770-radius_server.patch
index 8837a26257..488347eb63 100644
--- a/package/network/services/hostapd/patches/770-radius_server.patch
+++ b/package/network/services/hostapd/patches/770-radius_server.patch
@@ -21,7 +21,7 @@
  
  #ifndef CONFIG_NO_HOSTAPD_LOGGER
  static void hostapd_logger_cb(void *ctx, const u8 *addr, unsigned int module,
-@@ -771,6 +772,11 @@ int main(int argc, char *argv[])
+@@ -778,6 +779,11 @@ int main(int argc, char *argv[])
  	if (os_program_init())
  		return -1;
  
diff --git a/package/network/services/hostapd/patches/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch b/package/network/services/hostapd/patches/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
index 5809a3b7e8..b57550ac8b 100644
--- a/package/network/services/hostapd/patches/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
+++ b/package/network/services/hostapd/patches/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
@@ -13,7 +13,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/wpa_supplicant/ctrl_iface.c
 +++ b/wpa_supplicant/ctrl_iface.c
-@@ -12763,7 +12763,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13220,7 +13220,7 @@ char * wpa_supplicant_ctrl_iface_process
  		if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
  			reply_len = -1;
  #endif /* CONFIG_WNM */
@@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	} else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
  		if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
  			reply_len = -1;
-@@ -12773,7 +12773,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13230,7 +13230,7 @@ char * wpa_supplicant_ctrl_iface_process
  	} else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
  		if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
  			reply_len = -1;
diff --git a/package/network/services/hostapd/patches/991-Fix-OpenWrt-13156.patch b/package/network/services/hostapd/patches/991-Fix-OpenWrt-13156.patch
index 097d62abc0..4cd8eaa4d9 100644
--- a/package/network/services/hostapd/patches/991-Fix-OpenWrt-13156.patch
+++ b/package/network/services/hostapd/patches/991-Fix-OpenWrt-13156.patch
@@ -20,7 +20,7 @@ Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
 
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -3564,6 +3564,8 @@ int hostapd_remove_iface(struct hapd_int
+@@ -3681,6 +3681,8 @@ int hostapd_remove_iface(struct hapd_int
  void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
  			   int reassoc)
  {
@@ -29,14 +29,14 @@ Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
  	if (hapd->tkip_countermeasures) {
  		hostapd_drv_sta_deauth(hapd, sta->addr,
  				       WLAN_REASON_MICHAEL_MIC_FAILURE);
-@@ -3571,10 +3573,16 @@ void hostapd_new_assoc_sta(struct hostap
+@@ -3688,10 +3690,16 @@ void hostapd_new_assoc_sta(struct hostap
  	}
  
  #ifdef CONFIG_IEEE80211BE
--	if (hapd->conf->mld_ap && sta->mld_info.mld_sta &&
+-	if (ap_sta_is_mld(hapd, sta) &&
 -	    sta->mld_assoc_link_id != hapd->mld_link_id)
 -		return;
-+	if (hapd->conf->mld_ap && sta->mld_info.mld_sta) {
++	if (ap_sta_is_mld(hapd, sta)) {
 +		if (sta->mld_assoc_link_id == hapd->mld_link_id) {
 +			mld_assoc_link_id = sta->mld_assoc_link_id;
 +		} else {
@@ -51,7 +51,7 @@ Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
  	sta->post_csa_sa_query = 0;
 --- a/src/ap/sta_info.c
 +++ b/src/ap/sta_info.c
-@@ -1318,9 +1318,6 @@ void ap_sta_set_authorized(struct hostap
+@@ -1414,9 +1414,6 @@ bool ap_sta_set_authorized_flag(struct h
  				mld_assoc_link_id = -2;
  		}
  #endif /* CONFIG_IEEE80211BE */
diff --git a/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch b/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
index c7b595da57..ca17791d84 100644
--- a/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
+++ b/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
@@ -26,7 +26,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -2283,6 +2283,9 @@ struct wpa_driver_capa {
+@@ -2344,6 +2344,9 @@ struct wpa_driver_capa {
  	/** Maximum number of iterations in a single scan plan */
  	u32 max_sched_scan_plan_iterations;
  
@@ -38,7 +38,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  
 --- a/src/drivers/driver_nl80211_capa.c
 +++ b/src/drivers/driver_nl80211_capa.c
-@@ -949,6 +949,10 @@ static int wiphy_info_handler(struct nl_
+@@ -972,6 +972,10 @@ static int wiphy_info_handler(struct nl_
  			nla_get_u32(tb[NL80211_ATTR_MAX_SCAN_PLAN_ITERATIONS]);
  	}
  
@@ -51,7 +51,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  			nla_get_u8(tb[NL80211_ATTR_MAX_MATCH_SETS]);
 --- a/src/drivers/driver_nl80211_scan.c
 +++ b/src/drivers/driver_nl80211_scan.c
-@@ -222,7 +222,7 @@ nl80211_scan_common(struct i802_bss *bss
+@@ -221,7 +221,7 @@ nl80211_scan_common(struct i802_bss *bss
  		wpa_printf(MSG_DEBUG, "nl80211: Passive scan requested");
  	}
  
diff --git a/package/network/services/hostapd/patches/993-2023-10-28-ACS-Fix-typo-in-bw_40-frequency-array.patch b/package/network/services/hostapd/patches/993-2023-10-28-ACS-Fix-typo-in-bw_40-frequency-array.patch
deleted file mode 100644
index 948c51b196..0000000000
--- a/package/network/services/hostapd/patches/993-2023-10-28-ACS-Fix-typo-in-bw_40-frequency-array.patch
+++ /dev/null
@@ -1,25 +0,0 @@
-From 7a733993211ad46cf3032038c1e7e6bdc2322336 Mon Sep 17 00:00:00 2001
-From: Michael-CY Lee <michael-cy.lee at mediatek.com>
-Date: Tue, 5 Sep 2023 09:43:25 +0800
-Subject: [PATCH] ACS: Fix typo in bw_40 frequency array
-
-The range for the 5 GHz channel 118 was encoded with an incorrect
-channel number.
-
-Fixes: ed8e13decc71 (ACS: Extract bw40/80/160 freqs out of acs_usable_bwXXX_chan())
-Signed-off-by: Michael Lee <michael-cy.lee at mediatek.com>
----
- src/ap/acs.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/src/ap/acs.c
-+++ b/src/ap/acs.c
-@@ -256,7 +256,7 @@ struct bw_item {
- static const struct bw_item bw_40[] = {
- 	{ 5180, 5200, 38 }, { 5220, 5240, 46 }, { 5260, 5280, 54 },
- 	{ 5300, 5320, 62 }, { 5500, 5520, 102 }, { 5540, 5560, 110 },
--	{ 5580, 5600, 110 }, { 5620, 5640, 126}, { 5660, 5680, 134 },
-+	{ 5580, 5600, 118 }, { 5620, 5640, 126 }, { 5660, 5680, 134 },
- 	{ 5700, 5720, 142 }, { 5745, 5765, 151 }, { 5785, 5805, 159 },
- 	{ 5825, 5845, 167 }, { 5865, 5885, 175 },
- 	{ 5955, 5975, 3 }, { 5995, 6015, 11 }, { 6035, 6055, 19 },
diff --git a/package/network/services/hostapd/src/src/ap/ubus.c b/package/network/services/hostapd/src/src/ap/ubus.c
index 66eba99901..8689494bcf 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.c
+++ b/package/network/services/hostapd/src/src/ap/ubus.c
@@ -774,7 +774,8 @@ hostapd_switch_chan(struct ubus_context *ctx, struct ubus_object *obj,
 				mode ? &mode->he_capab[IEEE80211_MODE_AP] :
 				NULL,
 				mode ? &mode->eht_capab[IEEE80211_MODE_AP] :
-				NULL);
+				NULL,
+				hostapd_get_punct_bitmap(hapd));
 
 	for (i = 0; i < hapd->iface->num_bss; i++) {
 		struct hostapd_data *bss = hapd->iface->bss[i];
diff --git a/package/network/services/hostapd/src/src/ap/ubus.h b/package/network/services/hostapd/src/src/ap/ubus.h
index b0f7c44ab5..22767d67ee 100644
--- a/package/network/services/hostapd/src/src/ap/ubus.h
+++ b/package/network/services/hostapd/src/src/ap/ubus.h
@@ -8,6 +8,8 @@
 #ifndef __HOSTAPD_UBUS_H
 #define __HOSTAPD_UBUS_H
 
+#include "sta_info.h"
+
 enum hostapd_ubus_event_type {
 	HOSTAPD_UBUS_PROBE_REQ,
 	HOSTAPD_UBUS_AUTH_REQ,
@@ -27,6 +29,7 @@ struct hostapd_iface;
 struct hostapd_data;
 struct hapd_interfaces;
 struct rrm_measurement_beacon_report;
+struct sta_info;
 
 #ifdef UBUS_SUPPORT
 



From lede-commits at lists.infradead.org  Thu Apr  4 03:14:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 06:14:01 -0400
Subject: [openwrt/openwrt]  hostapd: adjust patches to work with git am
In-Reply-To: <171222563932.553712.17923813221826780552@git-01.infra.openwrt.org>
References: <171222563932.553712.17923813221826780552@git-01.infra.openwrt.org>
Message-ID: <mailman.23569.1712225651.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/92379080ead2b0bd70f0afe25c68547dbc17f768

commit 92379080ead2b0bd70f0afe25c68547dbc17f768
Author: Eneas U de Queiroz <cotequeiroz at gmail.com>
AuthorDate: Tue Feb 13 18:26:31 2024 -0300

    hostapd: adjust patches to work with git am
    
    This adds From:, Date: and Subject: to patches, allowing one to run 'git
    am' to import the patches to a hostapd git repository.
    
    From: and Date: fields were taken from the OpenWrt commit where the
    patches were first introduced.
    
    Most of the Subject: also followed suit, except for:
     - 300-noscan.patch: Took the description from the LuCI web interface
     - 350-nl80211_del_beacon_bss.patch: Used the file name
    
    The order of the files in the patch was changed to match what git
    format-patch does.
    
    Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
---
 ...021-fix-sta-add-after-previous-connection.patch |   4 +
 .../patches/135-mbedtls-fix-owe-association.patch  |  14 +-
 .../services/hostapd/patches/200-multicall.patch   | 255 ++++----
 .../services/hostapd/patches/300-noscan.patch      |   5 +
 .../services/hostapd/patches/301-mesh-noscan.patch |  27 +-
 .../hostapd/patches/310-rescan_immediately.patch   |   5 +
 .../hostapd/patches/320-optional_rfkill.patch      |   4 +
 .../hostapd/patches/330-nl80211_fix_set_freq.patch |   5 +
 .../341-mesh-ctrl-iface-channel-switch.patch       |   5 +
 .../patches/350-nl80211_del_beacon_bss.patch       |   4 +
 .../patches/380-disable_ctrl_iface_mib.patch       | 130 +++--
 .../patches/381-hostapd_cli_UNKNOWN-COMMAND.patch  |  11 +
 .../patches/390-wpa_ie_cap_workaround.patch        |   5 +
 .../patches/400-wps_single_auth_enc_type.patch     |   7 +
 .../hostapd/patches/410-limit_debug_messages.patch |   5 +
 .../hostapd/patches/420-indicate-features.patch    |   6 +
 .../hostapd/patches/430-hostapd_cli_ifdef.patch    |   5 +
 .../hostapd/patches/431-wpa_cli_ifdef.patch        |   4 +
 .../hostapd/patches/464-fix-mesh-obss-check.patch  |   5 +
 .../hostapd/patches/470-survey_data_fallback.patch |   4 +
 .../patches/500-lto-jobserver-support.patch        |   5 +
 .../hostapd/patches/590-rrm-wnm-statistics.patch   |  32 +-
 .../patches/599-wpa_supplicant-fix-warnings.patch  |  13 +
 .../hostapd/patches/600-ubus_support.patch         | 643 +++++++++++----------
 .../hostapd/patches/601-ucode_support.patch        | 486 ++++++++--------
 .../patches/610-hostapd_cli_ujail_permission.patch |  40 ++
 .../hostapd/patches/701-reload_config_inline.patch |   8 +
 .../hostapd/patches/710-vlan_no_bridge.patch       |  30 +-
 .../hostapd/patches/711-wds_bridge_force.patch     |  11 +
 .../hostapd/patches/720-iface_max_num_sta.patch    |  68 ++-
 .../services/hostapd/patches/730-ft_iface.patch    |   8 +
 .../services/hostapd/patches/740-snoop_iface.patch |  64 +-
 .../750-qos_map_set_without_interworking.patch     |  38 +-
 .../751-qos_map_ignore_when_unsupported.patch      |   7 +
 .../hostapd/patches/760-dynamic_own_ip.patch       |  55 +-
 .../hostapd/patches/761-shared_das_port.patch      |  27 +-
 .../hostapd/patches/770-radius_server.patch        |   8 +
 37 files changed, 1165 insertions(+), 888 deletions(-)

diff --git a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
index b1eba69c55..a4a90933b1 100644
--- a/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
+++ b/package/network/services/hostapd/patches/021-fix-sta-add-after-previous-connection.patch
@@ -1,3 +1,7 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 25 May 2021 10:50:16 +0200
+Subject: [PATCH] fix adding back stations after a missed deauth/disassoc
+
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
 @@ -4659,6 +4659,13 @@ static int add_associated_sta(struct hos
diff --git a/package/network/services/hostapd/patches/135-mbedtls-fix-owe-association.patch b/package/network/services/hostapd/patches/135-mbedtls-fix-owe-association.patch
index 0c29432d3f..3733f91505 100644
--- a/package/network/services/hostapd/patches/135-mbedtls-fix-owe-association.patch
+++ b/package/network/services/hostapd/patches/135-mbedtls-fix-owe-association.patch
@@ -1,10 +1,18 @@
+From: David Bauer <mail at david-bauer.net>
+Date: Tue, 24 Oct 2023 03:07:48 +0200
+Subject: [PATCH] hostapd: fix OWE association with mbedtls
+
 The code for hostapd-mbedtls did not work when used for OWE association.
 
-When handling association requests, the buffer offsets and length assumptions were incorrect, leading to never calculating the y point, thus denying association.
+When handling association requests, the buffer offsets and length
+assumptions were incorrect, leading to never calculating the y point,
+thus denying association.
 
-Also when crafting the association response, the buffer contained the trailing key-type.
+Also when crafting the association response, the buffer contained the
+trailing key-type.
 
-Fix up both issues to adhere to the specification and make hostapd-mbedtls work with the OWE security type.
+Fix up both issues to adhere to the specification and make
+hostapd-mbedtls work with the OWE security type.
 
 --- a/src/crypto/crypto_mbedtls.c
 +++ b/src/crypto/crypto_mbedtls.c
diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch
index ae027f7a95..65c1e5d838 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -1,3 +1,10 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Sat, 23 Jan 2010 08:28:26 +0000
+Subject: [PATCH] Add option to build a multicall binary
+
+This allows building both hostapd and wpa_supplicant as a single binary
+(wpad).
+
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
 @@ -1,6 +1,7 @@
@@ -62,6 +69,86 @@
  nt_password_hash: $(NOBJS)
  	$(Q)$(CC) $(LDFLAGS) -o nt_password_hash $(NOBJS) $(LIBS_n)
  	@$(E) "  LD " $@
+--- a/hostapd/main.c
++++ b/hostapd/main.c
+@@ -705,6 +705,11 @@ fail:
+ 	return -1;
+ }
+ 
++void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
++                       union wpa_event_data *data);
++
++void hostapd_wpa_event_global(void *ctx, enum wpa_event_type event,
++ 				 union wpa_event_data *data);
+ 
+ #ifdef CONFIG_WPS
+ static int gen_uuid(const char *txt_addr)
+@@ -798,6 +803,8 @@ int main(int argc, char *argv[])
+ 		return -1;
+ #endif /* CONFIG_DPP */
+ 
++	wpa_supplicant_event = hostapd_wpa_event;
++	wpa_supplicant_event_global = hostapd_wpa_event_global;
+ 	for (;;) {
+ 		c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:q");
+ 		if (c < 0)
+--- a/src/ap/drv_callbacks.c
++++ b/src/ap/drv_callbacks.c
+@@ -2341,8 +2341,8 @@ err:
+ #endif /* CONFIG_OWE */
+ 
+ 
+-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
+-			  union wpa_event_data *data)
++void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
++		       union wpa_event_data *data)
+ {
+ 	struct hostapd_data *hapd = ctx;
+ 	struct sta_info *sta;
+@@ -2674,7 +2674,7 @@ void wpa_supplicant_event(void *ctx, enu
+ }
+ 
+ 
+-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
++void hostapd_wpa_event_global(void *ctx, enum wpa_event_type event,
+ 				 union wpa_event_data *data)
+ {
+ 	struct hapd_interfaces *interfaces = ctx;
+--- a/src/drivers/driver.h
++++ b/src/drivers/driver.h
+@@ -6760,8 +6760,8 @@ union wpa_event_data {
+  * Driver wrapper code should call this function whenever an event is received
+  * from the driver.
+  */
+-void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
+-			  union wpa_event_data *data);
++extern void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
++				    union wpa_event_data *data);
+ 
+ /**
+  * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
+@@ -6773,7 +6773,7 @@ void wpa_supplicant_event(void *ctx, enu
+  * Same as wpa_supplicant_event(), but we search for the interface in
+  * wpa_global.
+  */
+-void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
++extern void (*wpa_supplicant_event_global)(void *ctx, enum wpa_event_type event,
+ 				 union wpa_event_data *data);
+ 
+ /*
+--- a/src/drivers/drivers.c
++++ b/src/drivers/drivers.c
+@@ -10,6 +10,10 @@
+ #include "utils/common.h"
+ #include "driver.h"
+ 
++void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
++			     union wpa_event_data *data);
++void (*wpa_supplicant_event_global)(void *ctx, enum wpa_event_type event,
++			     union wpa_event_data *data);
+ 
+ const struct wpa_driver_ops *const wpa_drivers[] =
+ {
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
 @@ -10,6 +10,7 @@ ALL += dbus/fi.w1.wpa_supplicant1.servic
@@ -154,50 +241,63 @@
  wpa_supplicant.exe: wpa_supplicant
  	mv -f $< $@
  wpa_cli.exe: wpa_cli
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -6760,8 +6760,8 @@ union wpa_event_data {
-  * Driver wrapper code should call this function whenever an event is received
-  * from the driver.
-  */
--void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
--			  union wpa_event_data *data);
-+extern void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
-+				    union wpa_event_data *data);
+--- a/wpa_supplicant/eapol_test.c
++++ b/wpa_supplicant/eapol_test.c
+@@ -31,7 +31,12 @@
+ #include "ctrl_iface.h"
+ #include "pcsc_funcs.h"
+ #include "wpas_glue.h"
++#include "drivers/driver.h"
  
- /**
-  * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
-@@ -6773,7 +6773,7 @@ void wpa_supplicant_event(void *ctx, enu
-  * Same as wpa_supplicant_event(), but we search for the interface in
-  * wpa_global.
-  */
--void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
-+extern void (*wpa_supplicant_event_global)(void *ctx, enum wpa_event_type event,
- 				 union wpa_event_data *data);
++void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
++			     union wpa_event_data *data);
++void (*wpa_supplicant_event_global)(void *ctx, enum wpa_event_type event,
++			     union wpa_event_data *data);
  
- /*
---- a/src/ap/drv_callbacks.c
-+++ b/src/ap/drv_callbacks.c
-@@ -2341,8 +2341,8 @@ err:
- #endif /* CONFIG_OWE */
+ const struct wpa_driver_ops *const wpa_drivers[] = { NULL };
+ 
+@@ -1325,6 +1330,10 @@ static void usage(void)
+ 	       "option several times.\n");
+ }
+ 
++extern void supplicant_event(void *ctx, enum wpa_event_type event,
++			     union wpa_event_data *data);
++extern void supplicant_event_global(void *ctx, enum wpa_event_type event,
++			     union wpa_event_data *data);
+ 
+ int main(int argc, char *argv[])
+ {
+@@ -1348,6 +1357,8 @@ int main(int argc, char *argv[])
+ 	if (os_program_init())
+ 		return -1;
+ 
++	wpa_supplicant_event = supplicant_event;
++	wpa_supplicant_event_global = supplicant_event_global;
+ 	hostapd_logger_register_cb(hostapd_logger_cb);
+ 
+ 	os_memset(&eapol_test, 0, sizeof(eapol_test));
+--- a/wpa_supplicant/events.c
++++ b/wpa_supplicant/events.c
+@@ -5919,8 +5919,8 @@ static void wpas_link_reconfig(struct wp
+ }
  
  
 -void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
 -			  union wpa_event_data *data)
-+void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
-+		       union wpa_event_data *data)
++void supplicant_event(void *ctx, enum wpa_event_type event,
++		      union wpa_event_data *data)
  {
- 	struct hostapd_data *hapd = ctx;
- 	struct sta_info *sta;
-@@ -2674,7 +2674,7 @@ void wpa_supplicant_event(void *ctx, enu
+ 	struct wpa_supplicant *wpa_s = ctx;
+ 	int resched;
+@@ -6872,7 +6872,7 @@ void wpa_supplicant_event(void *ctx, enu
  }
  
  
 -void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
-+void hostapd_wpa_event_global(void *ctx, enum wpa_event_type event,
++void supplicant_event_global(void *ctx, enum wpa_event_type event,
  				 union wpa_event_data *data)
  {
- 	struct hapd_interfaces *interfaces = ctx;
+ 	struct wpa_supplicant *wpa_s;
 --- a/wpa_supplicant/wpa_priv.c
 +++ b/wpa_supplicant/wpa_priv.c
 @@ -1039,8 +1039,8 @@ static void wpa_priv_send_ft_response(st
@@ -229,28 +329,6 @@
  	wpa_priv_fd_workaround();
  
  	os_memset(&global, 0, sizeof(global));
---- a/wpa_supplicant/events.c
-+++ b/wpa_supplicant/events.c
-@@ -5919,8 +5919,8 @@ static void wpas_link_reconfig(struct wp
- }
- 
- 
--void wpa_supplicant_event(void *ctx, enum wpa_event_type event,
--			  union wpa_event_data *data)
-+void supplicant_event(void *ctx, enum wpa_event_type event,
-+		      union wpa_event_data *data)
- {
- 	struct wpa_supplicant *wpa_s = ctx;
- 	int resched;
-@@ -6872,7 +6872,7 @@ void wpa_supplicant_event(void *ctx, enu
- }
- 
- 
--void wpa_supplicant_event_global(void *ctx, enum wpa_event_type event,
-+void supplicant_event_global(void *ctx, enum wpa_event_type event,
- 				 union wpa_event_data *data)
- {
- 	struct wpa_supplicant *wpa_s;
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
 @@ -7583,7 +7583,6 @@ struct wpa_interface * wpa_supplicant_ma
@@ -282,74 +360,3 @@
  
  	if (params->wpa_debug_file_path)
  		wpa_debug_open_file(params->wpa_debug_file_path);
---- a/hostapd/main.c
-+++ b/hostapd/main.c
-@@ -705,6 +705,11 @@ fail:
- 	return -1;
- }
- 
-+void hostapd_wpa_event(void *ctx, enum wpa_event_type event,
-+                       union wpa_event_data *data);
-+
-+void hostapd_wpa_event_global(void *ctx, enum wpa_event_type event,
-+ 				 union wpa_event_data *data);
- 
- #ifdef CONFIG_WPS
- static int gen_uuid(const char *txt_addr)
-@@ -798,6 +803,8 @@ int main(int argc, char *argv[])
- 		return -1;
- #endif /* CONFIG_DPP */
- 
-+	wpa_supplicant_event = hostapd_wpa_event;
-+	wpa_supplicant_event_global = hostapd_wpa_event_global;
- 	for (;;) {
- 		c = getopt(argc, argv, "b:Bde:f:hi:KP:sSTtu:vg:G:q");
- 		if (c < 0)
---- a/src/drivers/drivers.c
-+++ b/src/drivers/drivers.c
-@@ -10,6 +10,10 @@
- #include "utils/common.h"
- #include "driver.h"
- 
-+void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
-+			     union wpa_event_data *data);
-+void (*wpa_supplicant_event_global)(void *ctx, enum wpa_event_type event,
-+			     union wpa_event_data *data);
- 
- const struct wpa_driver_ops *const wpa_drivers[] =
- {
---- a/wpa_supplicant/eapol_test.c
-+++ b/wpa_supplicant/eapol_test.c
-@@ -31,7 +31,12 @@
- #include "ctrl_iface.h"
- #include "pcsc_funcs.h"
- #include "wpas_glue.h"
-+#include "drivers/driver.h"
- 
-+void (*wpa_supplicant_event)(void *ctx, enum wpa_event_type event,
-+			     union wpa_event_data *data);
-+void (*wpa_supplicant_event_global)(void *ctx, enum wpa_event_type event,
-+			     union wpa_event_data *data);
- 
- const struct wpa_driver_ops *const wpa_drivers[] = { NULL };
- 
-@@ -1325,6 +1330,10 @@ static void usage(void)
- 	       "option several times.\n");
- }
- 
-+extern void supplicant_event(void *ctx, enum wpa_event_type event,
-+			     union wpa_event_data *data);
-+extern void supplicant_event_global(void *ctx, enum wpa_event_type event,
-+			     union wpa_event_data *data);
- 
- int main(int argc, char *argv[])
- {
-@@ -1348,6 +1357,8 @@ int main(int argc, char *argv[])
- 	if (os_program_init())
- 		return -1;
- 
-+	wpa_supplicant_event = supplicant_event;
-+	wpa_supplicant_event_global = supplicant_event_global;
- 	hostapd_logger_register_cb(hostapd_logger_cb);
- 
- 	os_memset(&eapol_test, 0, sizeof(eapol_test));
diff --git a/package/network/services/hostapd/patches/300-noscan.patch b/package/network/services/hostapd/patches/300-noscan.patch
index fa69362847..9b3f401b03 100644
--- a/package/network/services/hostapd/patches/300-noscan.patch
+++ b/package/network/services/hostapd/patches/300-noscan.patch
@@ -1,3 +1,8 @@
+From c61daab867671af884a7bb707f9bc0f086241bcd Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Wed, 20 Jan 2010 02:26:00 +0000
+Subject: [PATCH] Add noscan, no_ht_coex config options
+
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -3656,6 +3656,10 @@ static int hostapd_config_fill(struct ho
diff --git a/package/network/services/hostapd/patches/301-mesh-noscan.patch b/package/network/services/hostapd/patches/301-mesh-noscan.patch
index a2200c8e9a..64a2eed30e 100644
--- a/package/network/services/hostapd/patches/301-mesh-noscan.patch
+++ b/package/network/services/hostapd/patches/301-mesh-noscan.patch
@@ -1,3 +1,8 @@
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Fri, 20 Apr 2018 07:41:03 +0200
+Subject: [PATCH] Allow HT40 also on 2.4GHz if noscan option is set, which also
+ skips secondary channel scan just like noscan works in AP mode.
+
 --- a/wpa_supplicant/config.c
 +++ b/wpa_supplicant/config.c
 @@ -2639,6 +2639,7 @@ static const struct parse_data ssid_fiel
@@ -18,6 +23,17 @@
  	INT(mesh_fwding);
  	INT(frequency);
  	INT(enable_edmg);
+--- a/wpa_supplicant/config_ssid.h
++++ b/wpa_supplicant/config_ssid.h
+@@ -1035,6 +1035,8 @@ struct wpa_ssid {
+ 	 */
+ 	int no_auto_peer;
+ 
++	int noscan;
++
+ 	/**
+ 	 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
+ 	 *
 --- a/wpa_supplicant/mesh.c
 +++ b/wpa_supplicant/mesh.c
 @@ -506,6 +506,8 @@ static int wpa_supplicant_mesh_init(stru
@@ -67,14 +83,3 @@
  	/* Setup higher BW only for 5 GHz */
  	if (mode->mode == HOSTAPD_MODE_IEEE80211A) {
  		ibss_mesh_select_40mhz(wpa_s, ssid, mode, freq, obss_scan, dfs_enabled);
---- a/wpa_supplicant/config_ssid.h
-+++ b/wpa_supplicant/config_ssid.h
-@@ -1035,6 +1035,8 @@ struct wpa_ssid {
- 	 */
- 	int no_auto_peer;
- 
-+	int noscan;
-+
- 	/**
- 	 * mesh_rssi_threshold - Set mesh parameter mesh_rssi_threshold (dBm)
- 	 *
diff --git a/package/network/services/hostapd/patches/310-rescan_immediately.patch b/package/network/services/hostapd/patches/310-rescan_immediately.patch
index 1315f0c30e..57e13dec8b 100644
--- a/package/network/services/hostapd/patches/310-rescan_immediately.patch
+++ b/package/network/services/hostapd/patches/310-rescan_immediately.patch
@@ -1,3 +1,8 @@
+From 64268c716596edbad395cfa82ff30eb84a2f8488 Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Sat, 23 Jan 2010 08:28:26 +0000
+Subject: [PATCH] rescan_immediately.patch
+
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
 @@ -5870,7 +5870,7 @@ wpa_supplicant_alloc(struct wpa_supplica
diff --git a/package/network/services/hostapd/patches/320-optional_rfkill.patch b/package/network/services/hostapd/patches/320-optional_rfkill.patch
index 01537790e0..dd6fa1d053 100644
--- a/package/network/services/hostapd/patches/320-optional_rfkill.patch
+++ b/package/network/services/hostapd/patches/320-optional_rfkill.patch
@@ -1,3 +1,7 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Thu, 8 Jul 2010 18:36:22 +0000
+Subject: [PATCH] hostapd: make rfkill support optional
+
 --- a/src/drivers/drivers.mak
 +++ b/src/drivers/drivers.mak
 @@ -54,7 +54,6 @@ NEED_SME=y
diff --git a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch
index dc9ccff12c..70ec6dc63b 100644
--- a/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch
+++ b/package/network/services/hostapd/patches/330-nl80211_fix_set_freq.patch
@@ -1,3 +1,8 @@
+From ee68734929edb30f90a95bc3150038333b345476 Mon Sep 17 00:00:00 2001
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Sun, 30 Jun 2013 21:01:13 +0000
+Subject: [PATCH] nl80211_fix_set_freq.patch
+
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
 @@ -5483,7 +5483,7 @@ static int nl80211_set_channel(struct i8
diff --git a/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch b/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
index 9853c10c13..4a5852af2e 100644
--- a/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
+++ b/package/network/services/hostapd/patches/341-mesh-ctrl-iface-channel-switch.patch
@@ -1,3 +1,8 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Mon, 28 Jan 2019 21:36:44 +0100
+Subject: [PATCH] wpa_supplicant: fix calling channel switch via wpa_cli on
+ mesh interfaces
+
 --- a/wpa_supplicant/ap.c
 +++ b/wpa_supplicant/ap.c
 @@ -1846,17 +1846,37 @@ int ap_switch_channel(struct wpa_supplic
diff --git a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch
index 630e030935..5ad4d6387f 100644
--- a/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch
+++ b/package/network/services/hostapd/patches/350-nl80211_del_beacon_bss.patch
@@ -1,3 +1,7 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Sat, 23 Oct 2010 23:39:54 +0000
+Subject: [PATCH] nl80211_del_beacon_bss.patch
+
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
 @@ -3075,12 +3075,12 @@ static int wpa_driver_nl80211_del_beacon
diff --git a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
index 061f447e05..c65b2b181e 100644
--- a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
+++ b/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
@@ -1,3 +1,7 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Fri, 18 Mar 2011 02:15:52 +0000
+Subject: [PATCH] Remove some unnecessary control interface functionality
+
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
 @@ -221,6 +221,9 @@ endif
@@ -28,69 +32,6 @@
  	} else if (os_strcmp(buf, "ATTACH") == 0) {
  		if (hostapd_ctrl_iface_attach(hapd, from, fromlen, NULL))
  			reply_len = -1;
---- a/wpa_supplicant/Makefile
-+++ b/wpa_supplicant/Makefile
-@@ -1038,6 +1038,9 @@ ifdef CONFIG_FILS
- OBJS += ../src/ap/fils_hlp.o
- endif
- ifdef CONFIG_CTRL_IFACE
-+ifdef CONFIG_CTRL_IFACE_MIB
-+CFLAGS += -DCONFIG_CTRL_IFACE_MIB
-+endif
- OBJS += ../src/ap/ctrl_iface_ap.o
- endif
- 
---- a/wpa_supplicant/ctrl_iface.c
-+++ b/wpa_supplicant/ctrl_iface.c
-@@ -2355,7 +2355,7 @@ static int wpa_supplicant_ctrl_iface_sta
- 			pos += ret;
- 		}
- 
--#ifdef CONFIG_AP
-+#if defined(CONFIG_AP) && defined(CONFIG_CTRL_IFACE_MIB)
- 		if (wpa_s->ap_iface) {
- 			pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
- 							    end - pos,
-@@ -12542,6 +12542,7 @@ char * wpa_supplicant_ctrl_iface_process
- 			reply_len = -1;
- 	} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
- 		wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
-+#ifdef CONFIG_CTRL_IFACE_MIB
- 	} else if (os_strcmp(buf, "MIB") == 0) {
- 		reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
- 		if (reply_len >= 0) {
-@@ -12554,6 +12555,7 @@ char * wpa_supplicant_ctrl_iface_process
- 				reply_size - reply_len);
- #endif /* CONFIG_MACSEC */
- 		}
-+#endif
- 	} else if (os_strncmp(buf, "STATUS", 6) == 0) {
- 		reply_len = wpa_supplicant_ctrl_iface_status(
- 			wpa_s, buf + 6, reply, reply_size);
-@@ -13042,6 +13044,7 @@ char * wpa_supplicant_ctrl_iface_process
- 		reply_len = wpa_supplicant_ctrl_iface_bss(
- 			wpa_s, buf + 4, reply, reply_size);
- #ifdef CONFIG_AP
-+#ifdef CONFIG_CTRL_IFACE_MIB
- 	} else if (os_strcmp(buf, "STA-FIRST") == 0) {
- 		reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
- 	} else if (os_strncmp(buf, "STA ", 4) == 0) {
-@@ -13050,12 +13053,15 @@ char * wpa_supplicant_ctrl_iface_process
- 	} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
- 		reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
- 						   reply_size);
-+#endif
-+#ifdef CONFIG_CTRL_IFACE_MIB
- 	} else if (os_strncmp(buf, "DEAUTHENTICATE ", 15) == 0) {
- 		if (ap_ctrl_iface_sta_deauthenticate(wpa_s, buf + 15))
- 			reply_len = -1;
- 	} else if (os_strncmp(buf, "DISASSOCIATE ", 13) == 0) {
- 		if (ap_ctrl_iface_sta_disassociate(wpa_s, buf + 13))
- 			reply_len = -1;
-+#endif
- 	} else if (os_strncmp(buf, "CHAN_SWITCH ", 12) == 0) {
- 		if (ap_ctrl_iface_chanswitch(wpa_s, buf + 12))
- 			reply_len = -1;
 --- a/src/ap/ctrl_iface_ap.c
 +++ b/src/ap/ctrl_iface_ap.c
 @@ -26,6 +26,26 @@
@@ -226,6 +167,18 @@
  #endif /* CONFIG_CTRL_IFACE */
  
  
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -1038,6 +1038,9 @@ ifdef CONFIG_FILS
+ OBJS += ../src/ap/fils_hlp.o
+ endif
+ ifdef CONFIG_CTRL_IFACE
++ifdef CONFIG_CTRL_IFACE_MIB
++CFLAGS += -DCONFIG_CTRL_IFACE_MIB
++endif
+ OBJS += ../src/ap/ctrl_iface_ap.o
+ endif
+ 
 --- a/wpa_supplicant/ap.c
 +++ b/wpa_supplicant/ap.c
 @@ -1520,7 +1520,7 @@ int wpas_ap_wps_nfc_report_handover(stru
@@ -237,3 +190,54 @@
  
  int ap_ctrl_iface_sta_first(struct wpa_supplicant *wpa_s,
  			    char *buf, size_t buflen)
+--- a/wpa_supplicant/ctrl_iface.c
++++ b/wpa_supplicant/ctrl_iface.c
+@@ -2355,7 +2355,7 @@ static int wpa_supplicant_ctrl_iface_sta
+ 			pos += ret;
+ 		}
+ 
+-#ifdef CONFIG_AP
++#if defined(CONFIG_AP) && defined(CONFIG_CTRL_IFACE_MIB)
+ 		if (wpa_s->ap_iface) {
+ 			pos += ap_ctrl_iface_wpa_get_status(wpa_s, pos,
+ 							    end - pos,
+@@ -12542,6 +12542,7 @@ char * wpa_supplicant_ctrl_iface_process
+ 			reply_len = -1;
+ 	} else if (os_strncmp(buf, "NOTE ", 5) == 0) {
+ 		wpa_printf(MSG_INFO, "NOTE: %s", buf + 5);
++#ifdef CONFIG_CTRL_IFACE_MIB
+ 	} else if (os_strcmp(buf, "MIB") == 0) {
+ 		reply_len = wpa_sm_get_mib(wpa_s->wpa, reply, reply_size);
+ 		if (reply_len >= 0) {
+@@ -12554,6 +12555,7 @@ char * wpa_supplicant_ctrl_iface_process
+ 				reply_size - reply_len);
+ #endif /* CONFIG_MACSEC */
+ 		}
++#endif
+ 	} else if (os_strncmp(buf, "STATUS", 6) == 0) {
+ 		reply_len = wpa_supplicant_ctrl_iface_status(
+ 			wpa_s, buf + 6, reply, reply_size);
+@@ -13042,6 +13044,7 @@ char * wpa_supplicant_ctrl_iface_process
+ 		reply_len = wpa_supplicant_ctrl_iface_bss(
+ 			wpa_s, buf + 4, reply, reply_size);
+ #ifdef CONFIG_AP
++#ifdef CONFIG_CTRL_IFACE_MIB
+ 	} else if (os_strcmp(buf, "STA-FIRST") == 0) {
+ 		reply_len = ap_ctrl_iface_sta_first(wpa_s, reply, reply_size);
+ 	} else if (os_strncmp(buf, "STA ", 4) == 0) {
+@@ -13050,12 +13053,15 @@ char * wpa_supplicant_ctrl_iface_process
+ 	} else if (os_strncmp(buf, "STA-NEXT ", 9) == 0) {
+ 		reply_len = ap_ctrl_iface_sta_next(wpa_s, buf + 9, reply,
+ 						   reply_size);
++#endif
++#ifdef CONFIG_CTRL_IFACE_MIB
+ 	} else if (os_strncmp(buf, "DEAUTHENTICATE ", 15) == 0) {
+ 		if (ap_ctrl_iface_sta_deauthenticate(wpa_s, buf + 15))
+ 			reply_len = -1;
+ 	} else if (os_strncmp(buf, "DISASSOCIATE ", 13) == 0) {
+ 		if (ap_ctrl_iface_sta_disassociate(wpa_s, buf + 13))
+ 			reply_len = -1;
++#endif
+ 	} else if (os_strncmp(buf, "CHAN_SWITCH ", 12) == 0) {
+ 		if (ap_ctrl_iface_chanswitch(wpa_s, buf + 12))
+ 			reply_len = -1;
diff --git a/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch b/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch
index e9083f6ecc..b7d2e2b659 100644
--- a/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch
+++ b/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch
@@ -1,3 +1,14 @@
+From: Denton Gentry <denny at geekhold.com>
+Date: Wed, 30 May 2018 15:05:42 +0000
+Subject: [PATCH] hostapd: make cli treat UNKNOWN COMMAND as failing
+
+Avoid infinite loop at 100% CPU when running hostapd_cli
+if CONFIG_CTRL_IFACE_MIB is not defined.
+
+  _newselect(4, [3], NULL, NULL, ...)
+  recvfrom(3, "UNKNOWN COMMAND\n", 4095, 0, NULL, NULL) = 16
+  sendto(3, "STA-NEXT UNKNOWN COMMAND", 24, 0, NULL, 0) = 24
+
 --- a/hostapd/hostapd_cli.c
 +++ b/hostapd/hostapd_cli.c
 @@ -757,7 +757,7 @@ static int wpa_ctrl_command_sta(struct w
diff --git a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch
index de72738a2f..fc26a84468 100644
--- a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch
+++ b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch
@@ -1,3 +1,8 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Sun, 4 Sep 2011 18:23:36 +0000
+Subject: [PATCH] hostapd: add a workaround for driver issues in various
+ android devices with texas instruments wifi
+
 --- a/src/common/wpa_common.c
 +++ b/src/common/wpa_common.c
 @@ -2856,6 +2856,31 @@ u32 wpa_akm_to_suite(int akm)
diff --git a/package/network/services/hostapd/patches/400-wps_single_auth_enc_type.patch b/package/network/services/hostapd/patches/400-wps_single_auth_enc_type.patch
index edcd985257..65452a7c40 100644
--- a/package/network/services/hostapd/patches/400-wps_single_auth_enc_type.patch
+++ b/package/network/services/hostapd/patches/400-wps_single_auth_enc_type.patch
@@ -1,3 +1,10 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Sat, 9 Jul 2011 07:19:55 +0000
+Subject: [PATCH] hostapd: only advertise a single encryption type via WPS if
+ multiple are supported
+
+Fixes windows 7 interop issues
+
 --- a/src/ap/wps_hostapd.c
 +++ b/src/ap/wps_hostapd.c
 @@ -394,9 +394,8 @@ static int hapd_wps_reconfig_in_memory(s
diff --git a/package/network/services/hostapd/patches/410-limit_debug_messages.patch b/package/network/services/hostapd/patches/410-limit_debug_messages.patch
index 48a5589200..58dd415f09 100644
--- a/package/network/services/hostapd/patches/410-limit_debug_messages.patch
+++ b/package/network/services/hostapd/patches/410-limit_debug_messages.patch
@@ -1,3 +1,8 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Mon, 20 Feb 2012 23:41:52 +0000
+Subject: [PATCH] hostapd: add configurable debug message minimum priority to
+ cut down on bloat generated by excessive debug messages
+
 --- a/src/utils/wpa_debug.c
 +++ b/src/utils/wpa_debug.c
 @@ -206,7 +206,7 @@ void wpa_debug_close_linux_tracing(void)
diff --git a/package/network/services/hostapd/patches/420-indicate-features.patch b/package/network/services/hostapd/patches/420-indicate-features.patch
index 0a457c6905..006a567c33 100644
--- a/package/network/services/hostapd/patches/420-indicate-features.patch
+++ b/package/network/services/hostapd/patches/420-indicate-features.patch
@@ -1,3 +1,9 @@
+From: Jo-Philipp Wich <jow at openwrt.org>
+Date: Mon, 12 Dec 2011 17:26:13 +0000
+Subject: [PATCH] hostapd: support optional argument for the -v switch of
+ hostapd and wpa_supplicant to query build features, e.g. hostapd -veap to
+ test whether 802.11i support is compiled in
+
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
 @@ -31,7 +31,7 @@
diff --git a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch b/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch
index 6183c1f941..b6421e9d75 100644
--- a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch
+++ b/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch
@@ -1,3 +1,8 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Thu, 13 Sep 2012 12:39:14 +0000
+Subject: [PATCH] hostapd: support wps in hostapd_cli even when built from the
+ mini variant
+
 --- a/hostapd/hostapd_cli.c
 +++ b/hostapd/hostapd_cli.c
 @@ -401,7 +401,6 @@ static int hostapd_cli_cmd_disassociate(
diff --git a/package/network/services/hostapd/patches/431-wpa_cli_ifdef.patch b/package/network/services/hostapd/patches/431-wpa_cli_ifdef.patch
index 65c31c567f..d7f967d779 100644
--- a/package/network/services/hostapd/patches/431-wpa_cli_ifdef.patch
+++ b/package/network/services/hostapd/patches/431-wpa_cli_ifdef.patch
@@ -1,3 +1,7 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Mon, 2 Dec 2013 13:07:46 +0000
+Subject: [PATCH] hostapd: always include p2p options in wpa_cli
+
 --- a/wpa_supplicant/wpa_cli.c
 +++ b/wpa_supplicant/wpa_cli.c
 @@ -26,6 +26,15 @@
diff --git a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
index 2d7ca0191d..664f27bd63 100644
--- a/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
+++ b/package/network/services/hostapd/patches/464-fix-mesh-obss-check.patch
@@ -1,3 +1,8 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 14 Nov 2017 12:38:08 +0100
+Subject: [PATCH] Fix issues with disabling obss scan when using fixed_freq on
+ mesh
+
 --- a/wpa_supplicant/wpa_supplicant.c
 +++ b/wpa_supplicant/wpa_supplicant.c
 @@ -3100,6 +3100,10 @@ void ibss_mesh_setup_freq(struct wpa_sup
diff --git a/package/network/services/hostapd/patches/470-survey_data_fallback.patch b/package/network/services/hostapd/patches/470-survey_data_fallback.patch
index 20877345df..1ae2c599eb 100644
--- a/package/network/services/hostapd/patches/470-survey_data_fallback.patch
+++ b/package/network/services/hostapd/patches/470-survey_data_fallback.patch
@@ -1,3 +1,7 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 15 Jun 2016 17:31:48 +0200
+Subject: [PATCH] hostapd: implement fallback for incomplete survey data
+
 --- a/src/ap/acs.c
 +++ b/src/ap/acs.c
 @@ -467,17 +467,17 @@ static int acs_get_bw_center_chan(int fr
diff --git a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch b/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
index e1f568a55c..f7f071fb0e 100644
--- a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
+++ b/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
@@ -1,3 +1,8 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 10 Jul 2018 13:48:17 +0200
+Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
+ build)
+
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
 @@ -1408,7 +1408,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
diff --git a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch
index 8f97e54d08..e1bb37ea55 100644
--- a/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch
+++ b/package/network/services/hostapd/patches/590-rrm-wnm-statistics.patch
@@ -1,3 +1,13 @@
+From: David Bauer <mail at david-bauer.net>
+Date: Sat, 27 Nov 2021 22:08:28 +0100
+Subject: [PATCH] hostapd: add OpenWrt specific statistic counters
+
+This adds a new struct for storing statistics not (yet) tracked by
+hostapd regarding RRM and WNM activity.
+
+These statistics can be read using the get_status hostapd interface ubus
+method.
+
 --- a/src/ap/hostapd.h
 +++ b/src/ap/hostapd.h
 @@ -163,6 +163,21 @@ struct hostapd_sae_commit_queue {
@@ -32,6 +42,17 @@
  	int num_sta; /* number of entries in sta_list */
  	struct sta_info *sta_list; /* STA info list head */
  #define STA_HASH_SIZE 256
+--- a/src/ap/rrm.c
++++ b/src/ap/rrm.c
+@@ -269,6 +269,8 @@ static void hostapd_send_nei_report_resp
+ 		}
+ 	}
+ 
++	hapd->openwrt_stats.rrm.neighbor_report_tx++;
++
+ 	hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr,
+ 				wpabuf_head(buf), wpabuf_len(buf));
+ 	wpabuf_free(buf);
 --- a/src/ap/wnm_ap.c
 +++ b/src/ap/wnm_ap.c
 @@ -410,6 +410,7 @@ static int ieee802_11_send_bss_trans_mgm
@@ -79,14 +100,3 @@
  	if (disassoc_timer) {
  #ifdef CONFIG_IEEE80211BE
  		if (ap_sta_is_mld(hapd, sta)) {
---- a/src/ap/rrm.c
-+++ b/src/ap/rrm.c
-@@ -269,6 +269,8 @@ static void hostapd_send_nei_report_resp
- 		}
- 	}
- 
-+	hapd->openwrt_stats.rrm.neighbor_report_tx++;
-+
- 	hostapd_drv_send_action(hapd, hapd->iface->freq, 0, addr,
- 				wpabuf_head(buf), wpabuf_len(buf));
- 	wpabuf_free(buf);
diff --git a/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch b/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
index e70dc61419..4acd7cafe2 100644
--- a/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
+++ b/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
@@ -1,3 +1,16 @@
+From: "Leon M. George" <leon at georgemail.eu>
+Date: Wed, 11 Sep 2019 15:22:55 +0200
+Subject: [PATCH] hostapd: declare struct wpa_bss early
+
+wps_supplicant.h assumes that 'struct wpa_bss' is forward declared if
+CONFIG_WPS is not defined.  With the later inclusion of
+600-ubus_support, the issue manifests in warnings like these:
+
+wps_supplicant.h:113:15: warning: 'struct wpa_bss' declared inside parameter list will not be visible outside of this definition or declaration
+        struct wpa_bss *bss)
+               ^~~~~~~
+This patch forward declares 'struct wpa_bss' regardless.
+
 --- a/wpa_supplicant/wps_supplicant.h
 +++ b/wpa_supplicant/wps_supplicant.h
 @@ -9,6 +9,7 @@
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index 412cc0a032..a6b03ffd3f 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -1,3 +1,10 @@
+From: Felix Fietkau <nbd at openwrt.org>
+Date: Sun, 17 Mar 2013 20:47:18 +0000
+Subject: [PATCH] hostapd: initial prototype of an ubus binding
+
+Supports listing, removing and banning clients, and hooking into
+probe/assoc/auth requests via object subscribe.
+
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
 @@ -166,6 +166,12 @@ OBJS += ../src/common/hw_features_common
@@ -13,32 +20,102 @@
  
  ifdef CONFIG_CODE_COVERAGE
  CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE
---- a/src/ap/hostapd.h
-+++ b/src/ap/hostapd.h
-@@ -18,6 +18,7 @@
- #include "utils/list.h"
- #include "ap_config.h"
- #include "drivers/driver.h"
-+#include "ubus.h"
+--- a/src/ap/airtime_policy.c
++++ b/src/ap/airtime_policy.c
+@@ -112,8 +112,14 @@ static void set_sta_weights(struct hosta
+ {
+ 	struct sta_info *sta;
  
- #define OCE_STA_CFON_ENABLED(hapd) \
- 	((hapd->conf->oce & OCE_STA_CFON) && \
-@@ -184,6 +185,7 @@ struct hostapd_data {
- 	struct hostapd_iface *iface;
- 	struct hostapd_config *iconf;
- 	struct hostapd_bss_config *conf;
-+	struct hostapd_ubus_bss ubus;
- 	int interface_added; /* virtual interface added for this BSS */
- 	unsigned int started:1;
- 	unsigned int disabled:1;
-@@ -707,6 +709,7 @@ hostapd_alloc_bss_data(struct hostapd_if
- 		       struct hostapd_bss_config *bss);
- int hostapd_setup_interface(struct hostapd_iface *iface);
- int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
-+void hostapd_set_own_neighbor_report(struct hostapd_data *hapd);
- void hostapd_interface_deinit(struct hostapd_iface *iface);
- void hostapd_interface_free(struct hostapd_iface *iface);
- struct hostapd_iface * hostapd_alloc_iface(void);
+-	for (sta = hapd->sta_list; sta; sta = sta->next)
+-		sta_set_airtime_weight(hapd, sta, weight);
++	for (sta = hapd->sta_list; sta; sta = sta->next) {
++		unsigned int sta_weight = weight;
++
++		if (sta->dyn_airtime_weight)
++			sta_weight = (weight * sta->dyn_airtime_weight) / 256;
++
++		sta_set_airtime_weight(hapd, sta, sta_weight);
++	}
+ }
+ 
+ 
+@@ -244,7 +250,10 @@ int airtime_policy_new_sta(struct hostap
+ 	unsigned int weight;
+ 
+ 	if (hapd->iconf->airtime_mode == AIRTIME_MODE_STATIC) {
+-		weight = get_weight_for_sta(hapd, sta->addr);
++		if (sta->dyn_airtime_weight)
++			weight = sta->dyn_airtime_weight;
++		else
++			weight = get_weight_for_sta(hapd, sta->addr);
+ 		if (weight)
+ 			return sta_set_airtime_weight(hapd, sta, weight);
+ 	}
+--- a/src/ap/beacon.c
++++ b/src/ap/beacon.c
+@@ -1351,6 +1351,12 @@ void handle_probe_req(struct hostapd_dat
+ 	int mld_id;
+ 	u16 links;
+ #endif /* CONFIG_IEEE80211BE */
++	struct hostapd_ubus_request req = {
++		.type = HOSTAPD_UBUS_PROBE_REQ,
++		.mgmt_frame = mgmt,
++		.ssi_signal = ssi_signal,
++		.elems = &elems,
++	};
+ 
+ 	if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
+ 	    ssi_signal < hapd->iconf->rssi_ignore_probe_request)
+@@ -1537,6 +1543,12 @@ void handle_probe_req(struct hostapd_dat
+ 	}
+ #endif /* CONFIG_P2P */
+ 
++	if (hostapd_ubus_handle_event(hapd, &req)) {
++		wpa_printf(MSG_DEBUG, "Probe request for " MACSTR " rejected by ubus handler.\n",
++		       MAC2STR(mgmt->sa));
++		return;
++	}
++
+ 	/* TODO: verify that supp_rates contains at least one matching rate
+ 	 * with AP configuration */
+ 
+--- a/src/ap/dfs.c
++++ b/src/ap/dfs.c
+@@ -1225,6 +1225,8 @@ int hostapd_dfs_pre_cac_expired(struct h
+ 		"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
+ 		freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
+ 
++	hostapd_ubus_notify_radar_detected(iface, freq, chan_width, cf1, cf2);
++
+ 	/* Proceed only if DFS is not offloaded to the driver */
+ 	if (iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD)
+ 		return 0;
+--- a/src/ap/drv_callbacks.c
++++ b/src/ap/drv_callbacks.c
+@@ -268,6 +268,10 @@ int hostapd_notif_assoc(struct hostapd_d
+ 	struct hostapd_iface *iface = hapd->iface;
+ #endif /* CONFIG_OWE */
+ 	bool updated = false;
++	struct hostapd_ubus_request req = {
++		.type = HOSTAPD_UBUS_ASSOC_REQ,
++		.addr = addr,
++	};
+ 
+ 	if (addr == NULL) {
+ 		/*
+@@ -412,6 +416,12 @@ int hostapd_notif_assoc(struct hostapd_d
+ 		goto fail;
+ 	}
+ 
++	if (hostapd_ubus_handle_event(hapd, &req)) {
++		wpa_printf(MSG_DEBUG, "Station " MACSTR " assoc rejected by ubus handler.\n",
++			   MAC2STR(req.addr));
++		goto fail;
++	}
++
+ #ifdef CONFIG_P2P
+ 	if (elems.p2p) {
+ 		wpabuf_free(sta->p2p_ie);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -493,6 +493,7 @@ void hostapd_free_hapd_data(struct hosta
@@ -82,6 +159,32 @@
  	hostapd_interface_deinit(iface);
  	wpa_printf(MSG_DEBUG, "%s: driver=%p drv_priv=%p -> hapd_deinit",
  		   __func__, driver, drv_priv);
+--- a/src/ap/hostapd.h
++++ b/src/ap/hostapd.h
+@@ -18,6 +18,7 @@
+ #include "utils/list.h"
+ #include "ap_config.h"
+ #include "drivers/driver.h"
++#include "ubus.h"
+ 
+ #define OCE_STA_CFON_ENABLED(hapd) \
+ 	((hapd->conf->oce & OCE_STA_CFON) && \
+@@ -184,6 +185,7 @@ struct hostapd_data {
+ 	struct hostapd_iface *iface;
+ 	struct hostapd_config *iconf;
+ 	struct hostapd_bss_config *conf;
++	struct hostapd_ubus_bss ubus;
+ 	int interface_added; /* virtual interface added for this BSS */
+ 	unsigned int started:1;
+ 	unsigned int disabled:1;
+@@ -707,6 +709,7 @@ hostapd_alloc_bss_data(struct hostapd_if
+ 		       struct hostapd_bss_config *bss);
+ int hostapd_setup_interface(struct hostapd_iface *iface);
+ int hostapd_setup_interface_complete(struct hostapd_iface *iface, int err);
++void hostapd_set_own_neighbor_report(struct hostapd_data *hapd);
+ void hostapd_interface_deinit(struct hostapd_iface *iface);
+ void hostapd_interface_free(struct hostapd_iface *iface);
+ struct hostapd_iface * hostapd_alloc_iface(void);
 --- a/src/ap/ieee802_11.c
 +++ b/src/ap/ieee802_11.c
 @@ -2798,7 +2798,7 @@ static void handle_auth(struct hostapd_d
@@ -171,60 +274,28 @@
  	sta = ap_get_sta(hapd, mgmt->sa);
  	if (!sta) {
  		wpa_msg(hapd->msg_ctx, MSG_DEBUG, "Station " MACSTR
---- a/src/ap/beacon.c
-+++ b/src/ap/beacon.c
-@@ -1351,6 +1351,12 @@ void handle_probe_req(struct hostapd_dat
- 	int mld_id;
- 	u16 links;
- #endif /* CONFIG_IEEE80211BE */
-+	struct hostapd_ubus_request req = {
-+		.type = HOSTAPD_UBUS_PROBE_REQ,
-+		.mgmt_frame = mgmt,
-+		.ssi_signal = ssi_signal,
-+		.elems = &elems,
-+	};
- 
- 	if (hapd->iconf->rssi_ignore_probe_request && ssi_signal &&
- 	    ssi_signal < hapd->iconf->rssi_ignore_probe_request)
-@@ -1537,6 +1543,12 @@ void handle_probe_req(struct hostapd_dat
- 	}
- #endif /* CONFIG_P2P */
- 
-+	if (hostapd_ubus_handle_event(hapd, &req)) {
-+		wpa_printf(MSG_DEBUG, "Probe request for " MACSTR " rejected by ubus handler.\n",
-+		       MAC2STR(mgmt->sa));
+--- a/src/ap/rrm.c
++++ b/src/ap/rrm.c
+@@ -89,6 +89,9 @@ static void hostapd_handle_beacon_report
+ 		return;
+ 	wpa_msg(hapd->msg_ctx, MSG_INFO, BEACON_RESP_RX MACSTR " %u %02x %s",
+ 		MAC2STR(addr), token, rep_mode, report);
++	if (len < sizeof(struct rrm_measurement_beacon_report))
 +		return;
-+	}
-+
- 	/* TODO: verify that supp_rates contains at least one matching rate
- 	 * with AP configuration */
++	hostapd_ubus_notify_beacon_report(hapd, addr, token, rep_mode, (struct rrm_measurement_beacon_report*) pos, len);
+ }
  
---- a/src/ap/drv_callbacks.c
-+++ b/src/ap/drv_callbacks.c
-@@ -268,6 +268,10 @@ int hostapd_notif_assoc(struct hostapd_d
- 	struct hostapd_iface *iface = hapd->iface;
- #endif /* CONFIG_OWE */
- 	bool updated = false;
-+	struct hostapd_ubus_request req = {
-+		.type = HOSTAPD_UBUS_ASSOC_REQ,
-+		.addr = addr,
-+	};
  
- 	if (addr == NULL) {
- 		/*
-@@ -412,6 +416,12 @@ int hostapd_notif_assoc(struct hostapd_d
- 		goto fail;
- 	}
+@@ -352,6 +355,9 @@ void hostapd_handle_radio_measurement(st
+ 		   mgmt->u.action.u.rrm.action, MAC2STR(mgmt->sa));
  
-+	if (hostapd_ubus_handle_event(hapd, &req)) {
-+		wpa_printf(MSG_DEBUG, "Station " MACSTR " assoc rejected by ubus handler.\n",
-+			   MAC2STR(req.addr));
-+		goto fail;
-+	}
-+
- #ifdef CONFIG_P2P
- 	if (elems.p2p) {
- 		wpabuf_free(sta->p2p_ie);
+ 	switch (mgmt->u.action.u.rrm.action) {
++	case WLAN_RRM_LINK_MEASUREMENT_REPORT:
++		hostapd_ubus_handle_link_measurement(hapd, buf, len);
++		break;
+ 	case WLAN_RRM_RADIO_MEASUREMENT_REPORT:
+ 		hostapd_handle_radio_msmt_report(hapd, buf, len);
+ 		break;
 --- a/src/ap/sta_info.c
 +++ b/src/ap/sta_info.c
 @@ -476,6 +476,7 @@ void ap_handle_timer(void *eloop_ctx, vo
@@ -273,201 +344,53 @@
  		if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
  			os_snprintf(ip_addr, sizeof(ip_addr),
 @@ -1470,6 +1485,13 @@ void ap_sta_set_authorized_event(struct
- 		}
- #endif /* CONFIG_P2P */
- 
-+		if (sta->auth_alg < ARRAY_SIZE(auth_algs))
-+			auth_alg = auth_algs[sta->auth_alg];
-+
-+		if (auth_alg)
-+			os_snprintf(alg_buf, sizeof(alg_buf),
-+				" auth_alg=%s", auth_alg);
-+
- 		keyid = ap_sta_wpa_get_keyid(hapd, sta);
- 		if (keyid) {
- 			os_snprintf(keyid_buf, sizeof(keyid_buf),
-@@ -1488,17 +1510,19 @@ void ap_sta_set_authorized_event(struct
- 					 dpp_pkhash, SHA256_MAC_LEN);
- 		}
- 
--		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_CONNECTED "%s%s%s%s",
--			buf, ip_addr, keyid_buf, dpp_pkhash_buf);
-+		hostapd_ubus_notify_authorized(hapd, sta, auth_alg);
-+		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_CONNECTED "%s%s%s%s%s",
-+			buf, ip_addr, keyid_buf, dpp_pkhash_buf, alg_buf);
- 
- 		if (hapd->msg_ctx_parent &&
- 		    hapd->msg_ctx_parent != hapd->msg_ctx)
- 			wpa_msg_no_global(hapd->msg_ctx_parent, MSG_INFO,
--					  AP_STA_CONNECTED "%s%s%s%s",
-+					  AP_STA_CONNECTED "%s%s%s%s%s",
- 					  buf, ip_addr, keyid_buf,
--					  dpp_pkhash_buf);
-+					  dpp_pkhash_buf, alg_buf);
- 	} else {
- 		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED "%s", buf);
-+		hostapd_ubus_notify(hapd, "disassoc", sta->addr);
- 
- 		if (hapd->msg_ctx_parent &&
- 		    hapd->msg_ctx_parent != hapd->msg_ctx)
---- a/src/ap/wpa_auth_glue.c
-+++ b/src/ap/wpa_auth_glue.c
-@@ -275,6 +275,7 @@ static void hostapd_wpa_auth_psk_failure
- 	struct hostapd_data *hapd = ctx;
- 	wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR,
- 		MAC2STR(addr));
-+	hostapd_ubus_notify(hapd, "key-mismatch", addr);
- }
- 
- 
---- a/wpa_supplicant/Makefile
-+++ b/wpa_supplicant/Makefile
-@@ -189,6 +189,13 @@ ifdef CONFIG_EAPOL_TEST
- CFLAGS += -Werror -DEAPOL_TEST
- endif
- 
-+ifdef CONFIG_UBUS
-+CFLAGS += -DUBUS_SUPPORT
-+OBJS += ubus.o
-+OBJS += ../src/utils/uloop.o
-+LIBS += -lubox -lubus
-+endif
-+
- ifdef CONFIG_CODE_COVERAGE
- CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE
- LIBS += -lgcov
-@@ -1042,6 +1049,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
- CFLAGS += -DCONFIG_CTRL_IFACE_MIB
- endif
- OBJS += ../src/ap/ctrl_iface_ap.o
-+ifdef CONFIG_UBUS
-+OBJS += ../src/ap/ubus.o
-+endif
- endif
- 
- CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
---- a/wpa_supplicant/wpa_supplicant.c
-+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -7716,6 +7716,8 @@ struct wpa_supplicant * wpa_supplicant_a
- 	}
- #endif /* CONFIG_P2P */
- 
-+	wpas_ubus_add_bss(wpa_s);
-+
- 	return wpa_s;
- }
- 
-@@ -7742,6 +7744,8 @@ int wpa_supplicant_remove_iface(struct w
- 	struct wpa_supplicant *parent = wpa_s->parent;
- #endif /* CONFIG_MESH */
- 
-+	wpas_ubus_free_bss(wpa_s);
-+
- 	/* Remove interface from the global list of interfaces */
- 	prev = global->ifaces;
- 	if (prev == wpa_s) {
-@@ -8088,8 +8092,12 @@ int wpa_supplicant_run(struct wpa_global
- 	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
- 	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
- 
-+	wpas_ubus_add(global);
-+
- 	eloop_run();
- 
-+	wpas_ubus_free(global);
-+
- 	return 0;
- }
- 
---- a/wpa_supplicant/wpa_supplicant_i.h
-+++ b/wpa_supplicant/wpa_supplicant_i.h
-@@ -21,6 +21,7 @@
- #include "config_ssid.h"
- #include "wmm_ac.h"
- #include "pasn/pasn_common.h"
-+#include "ubus.h"
- 
- extern const char *const wpa_supplicant_version;
- extern const char *const wpa_supplicant_license;
-@@ -319,6 +320,8 @@ struct wpa_global {
- #endif /* CONFIG_WIFI_DISPLAY */
- 
- 	struct psk_list_entry *add_psk; /* From group formation */
-+
-+	struct ubus_object ubus_global;
- };
- 
- 
-@@ -693,6 +696,7 @@ struct wpa_supplicant {
- 	unsigned char own_addr[ETH_ALEN];
- 	unsigned char perm_addr[ETH_ALEN];
- 	char ifname[100];
-+	struct wpas_ubus_bss ubus;
- #ifdef CONFIG_MATCH_IFACE
- 	int matched;
- #endif /* CONFIG_MATCH_IFACE */
---- a/wpa_supplicant/wps_supplicant.c
-+++ b/wpa_supplicant/wps_supplicant.c
-@@ -33,6 +33,7 @@
- #include "p2p/p2p.h"
- #include "p2p_supplicant.h"
- #include "wps_supplicant.h"
-+#include "ubus.h"
- 
- 
- #ifndef WPS_PIN_SCAN_IGNORE_SEL_REG
-@@ -401,6 +402,8 @@ static int wpa_supplicant_wps_cred(void
- 	wpa_hexdump_key(MSG_DEBUG, "WPS: Received Credential attribute",
- 			cred->cred_attr, cred->cred_attr_len);
- 
-+	wpas_ubus_notify(wpa_s, cred);
-+
- 	if (wpa_s->conf->wps_cred_processing == 1)
- 		return 0;
- 
---- a/wpa_supplicant/main.c
-+++ b/wpa_supplicant/main.c
-@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
- 
- 	for (;;) {
- 		c = getopt(argc, argv,
--			   "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuv::W");
-+			   "b:Bc:C:D:de:f:g:G:hi:I:KLMm:nNo:O:p:P:qsTtuv::W");
- 		if (c < 0)
- 			break;
- 		switch (c) {
-@@ -268,6 +268,9 @@ int main(int argc, char *argv[])
- 			params.conf_p2p_dev = optarg;
- 			break;
+ 		}
  #endif /* CONFIG_P2P */
-+		case 'n':
-+			iface_count = 0;
-+			break;
- 		case 'o':
- 			params.override_driver = optarg;
- 			break;
---- a/src/ap/rrm.c
-+++ b/src/ap/rrm.c
-@@ -89,6 +89,9 @@ static void hostapd_handle_beacon_report
- 		return;
- 	wpa_msg(hapd->msg_ctx, MSG_INFO, BEACON_RESP_RX MACSTR " %u %02x %s",
- 		MAC2STR(addr), token, rep_mode, report);
-+	if (len < sizeof(struct rrm_measurement_beacon_report))
-+		return;
-+	hostapd_ubus_notify_beacon_report(hapd, addr, token, rep_mode, (struct rrm_measurement_beacon_report*) pos, len);
- }
  
++		if (sta->auth_alg < ARRAY_SIZE(auth_algs))
++			auth_alg = auth_algs[sta->auth_alg];
++
++		if (auth_alg)
++			os_snprintf(alg_buf, sizeof(alg_buf),
++				" auth_alg=%s", auth_alg);
++
+ 		keyid = ap_sta_wpa_get_keyid(hapd, sta);
+ 		if (keyid) {
+ 			os_snprintf(keyid_buf, sizeof(keyid_buf),
+@@ -1488,17 +1510,19 @@ void ap_sta_set_authorized_event(struct
+ 					 dpp_pkhash, SHA256_MAC_LEN);
+ 		}
  
-@@ -352,6 +355,9 @@ void hostapd_handle_radio_measurement(st
- 		   mgmt->u.action.u.rrm.action, MAC2STR(mgmt->sa));
+-		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_CONNECTED "%s%s%s%s",
+-			buf, ip_addr, keyid_buf, dpp_pkhash_buf);
++		hostapd_ubus_notify_authorized(hapd, sta, auth_alg);
++		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_CONNECTED "%s%s%s%s%s",
++			buf, ip_addr, keyid_buf, dpp_pkhash_buf, alg_buf);
+ 
+ 		if (hapd->msg_ctx_parent &&
+ 		    hapd->msg_ctx_parent != hapd->msg_ctx)
+ 			wpa_msg_no_global(hapd->msg_ctx_parent, MSG_INFO,
+-					  AP_STA_CONNECTED "%s%s%s%s",
++					  AP_STA_CONNECTED "%s%s%s%s%s",
+ 					  buf, ip_addr, keyid_buf,
+-					  dpp_pkhash_buf);
++					  dpp_pkhash_buf, alg_buf);
+ 	} else {
+ 		wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_DISCONNECTED "%s", buf);
++		hostapd_ubus_notify(hapd, "disassoc", sta->addr);
+ 
+ 		if (hapd->msg_ctx_parent &&
+ 		    hapd->msg_ctx_parent != hapd->msg_ctx)
+--- a/src/ap/sta_info.h
++++ b/src/ap/sta_info.h
+@@ -319,6 +319,7 @@ struct sta_info {
+ #endif /* CONFIG_TESTING_OPTIONS */
+ #ifdef CONFIG_AIRTIME_POLICY
+ 	unsigned int airtime_weight;
++	unsigned int dyn_airtime_weight;
+ 	struct os_reltime backlogged_until;
+ #endif /* CONFIG_AIRTIME_POLICY */
  
- 	switch (mgmt->u.action.u.rrm.action) {
-+	case WLAN_RRM_LINK_MEASUREMENT_REPORT:
-+		hostapd_ubus_handle_link_measurement(hapd, buf, len);
-+		break;
- 	case WLAN_RRM_RADIO_MEASUREMENT_REPORT:
- 		hostapd_handle_radio_msmt_report(hapd, buf, len);
- 		break;
 --- a/src/ap/vlan_init.c
 +++ b/src/ap/vlan_init.c
 @@ -22,6 +22,7 @@
@@ -506,58 +429,6 @@
  	return hostapd_vlan_if_remove(hapd, vlan->ifname);
  }
  
---- a/src/ap/dfs.c
-+++ b/src/ap/dfs.c
-@@ -1225,6 +1225,8 @@ int hostapd_dfs_pre_cac_expired(struct h
- 		"freq=%d ht_enabled=%d chan_offset=%d chan_width=%d cf1=%d cf2=%d",
- 		freq, ht_enabled, chan_offset, chan_width, cf1, cf2);
- 
-+	hostapd_ubus_notify_radar_detected(iface, freq, chan_width, cf1, cf2);
-+
- 	/* Proceed only if DFS is not offloaded to the driver */
- 	if (iface->drv_flags & WPA_DRIVER_FLAGS_DFS_OFFLOAD)
- 		return 0;
---- a/src/ap/airtime_policy.c
-+++ b/src/ap/airtime_policy.c
-@@ -112,8 +112,14 @@ static void set_sta_weights(struct hosta
- {
- 	struct sta_info *sta;
- 
--	for (sta = hapd->sta_list; sta; sta = sta->next)
--		sta_set_airtime_weight(hapd, sta, weight);
-+	for (sta = hapd->sta_list; sta; sta = sta->next) {
-+		unsigned int sta_weight = weight;
-+
-+		if (sta->dyn_airtime_weight)
-+			sta_weight = (weight * sta->dyn_airtime_weight) / 256;
-+
-+		sta_set_airtime_weight(hapd, sta, sta_weight);
-+	}
- }
- 
- 
-@@ -244,7 +250,10 @@ int airtime_policy_new_sta(struct hostap
- 	unsigned int weight;
- 
- 	if (hapd->iconf->airtime_mode == AIRTIME_MODE_STATIC) {
--		weight = get_weight_for_sta(hapd, sta->addr);
-+		if (sta->dyn_airtime_weight)
-+			weight = sta->dyn_airtime_weight;
-+		else
-+			weight = get_weight_for_sta(hapd, sta->addr);
- 		if (weight)
- 			return sta_set_airtime_weight(hapd, sta, weight);
- 	}
---- a/src/ap/sta_info.h
-+++ b/src/ap/sta_info.h
-@@ -319,6 +319,7 @@ struct sta_info {
- #endif /* CONFIG_TESTING_OPTIONS */
- #ifdef CONFIG_AIRTIME_POLICY
- 	unsigned int airtime_weight;
-+	unsigned int dyn_airtime_weight;
- 	struct os_reltime backlogged_until;
- #endif /* CONFIG_AIRTIME_POLICY */
- 
 --- a/src/ap/wnm_ap.c
 +++ b/src/ap/wnm_ap.c
 @@ -479,7 +479,8 @@ static void ieee802_11_rx_bss_trans_mgmt
@@ -598,6 +469,16 @@
  	wpa_hexdump(MSG_DEBUG, "WNM: BSS Transition Candidate List Entries",
  		    pos, end - pos);
  }
+--- a/src/ap/wpa_auth_glue.c
++++ b/src/ap/wpa_auth_glue.c
+@@ -275,6 +275,7 @@ static void hostapd_wpa_auth_psk_failure
+ 	struct hostapd_data *hapd = ctx;
+ 	wpa_msg(hapd->msg_ctx, MSG_INFO, AP_STA_POSSIBLE_PSK_MISMATCH MACSTR,
+ 		MAC2STR(addr));
++	hostapd_ubus_notify(hapd, "key-mismatch", addr);
+ }
+ 
+ 
 --- a/src/utils/eloop.c
 +++ b/src/utils/eloop.c
 @@ -77,6 +77,9 @@ struct eloop_sock_table {
@@ -746,3 +627,129 @@
 +
 +	eloop_register_cb(uloop_poll_handler, uloop_timeout_poll_handler);
 +}
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -189,6 +189,13 @@ ifdef CONFIG_EAPOL_TEST
+ CFLAGS += -Werror -DEAPOL_TEST
+ endif
+ 
++ifdef CONFIG_UBUS
++CFLAGS += -DUBUS_SUPPORT
++OBJS += ubus.o
++OBJS += ../src/utils/uloop.o
++LIBS += -lubox -lubus
++endif
++
+ ifdef CONFIG_CODE_COVERAGE
+ CFLAGS += -O0 -fprofile-arcs -ftest-coverage -U_FORTIFY_SOURCE
+ LIBS += -lgcov
+@@ -1042,6 +1049,9 @@ ifdef CONFIG_CTRL_IFACE_MIB
+ CFLAGS += -DCONFIG_CTRL_IFACE_MIB
+ endif
+ OBJS += ../src/ap/ctrl_iface_ap.o
++ifdef CONFIG_UBUS
++OBJS += ../src/ap/ubus.o
++endif
+ endif
+ 
+ CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
+--- a/wpa_supplicant/main.c
++++ b/wpa_supplicant/main.c
+@@ -203,7 +203,7 @@ int main(int argc, char *argv[])
+ 
+ 	for (;;) {
+ 		c = getopt(argc, argv,
+-			   "b:Bc:C:D:de:f:g:G:hi:I:KLMm:No:O:p:P:qsTtuv::W");
++			   "b:Bc:C:D:de:f:g:G:hi:I:KLMm:nNo:O:p:P:qsTtuv::W");
+ 		if (c < 0)
+ 			break;
+ 		switch (c) {
+@@ -268,6 +268,9 @@ int main(int argc, char *argv[])
+ 			params.conf_p2p_dev = optarg;
+ 			break;
+ #endif /* CONFIG_P2P */
++		case 'n':
++			iface_count = 0;
++			break;
+ 		case 'o':
+ 			params.override_driver = optarg;
+ 			break;
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -7716,6 +7716,8 @@ struct wpa_supplicant * wpa_supplicant_a
+ 	}
+ #endif /* CONFIG_P2P */
+ 
++	wpas_ubus_add_bss(wpa_s);
++
+ 	return wpa_s;
+ }
+ 
+@@ -7742,6 +7744,8 @@ int wpa_supplicant_remove_iface(struct w
+ 	struct wpa_supplicant *parent = wpa_s->parent;
+ #endif /* CONFIG_MESH */
+ 
++	wpas_ubus_free_bss(wpa_s);
++
+ 	/* Remove interface from the global list of interfaces */
+ 	prev = global->ifaces;
+ 	if (prev == wpa_s) {
+@@ -8088,8 +8092,12 @@ int wpa_supplicant_run(struct wpa_global
+ 	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
+ 	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
+ 
++	wpas_ubus_add(global);
++
+ 	eloop_run();
+ 
++	wpas_ubus_free(global);
++
+ 	return 0;
+ }
+ 
+--- a/wpa_supplicant/wpa_supplicant_i.h
++++ b/wpa_supplicant/wpa_supplicant_i.h
+@@ -21,6 +21,7 @@
+ #include "config_ssid.h"
+ #include "wmm_ac.h"
+ #include "pasn/pasn_common.h"
++#include "ubus.h"
+ 
+ extern const char *const wpa_supplicant_version;
+ extern const char *const wpa_supplicant_license;
+@@ -319,6 +320,8 @@ struct wpa_global {
+ #endif /* CONFIG_WIFI_DISPLAY */
+ 
+ 	struct psk_list_entry *add_psk; /* From group formation */
++
++	struct ubus_object ubus_global;
+ };
+ 
+ 
+@@ -693,6 +696,7 @@ struct wpa_supplicant {
+ 	unsigned char own_addr[ETH_ALEN];
+ 	unsigned char perm_addr[ETH_ALEN];
+ 	char ifname[100];
++	struct wpas_ubus_bss ubus;
+ #ifdef CONFIG_MATCH_IFACE
+ 	int matched;
+ #endif /* CONFIG_MATCH_IFACE */
+--- a/wpa_supplicant/wps_supplicant.c
++++ b/wpa_supplicant/wps_supplicant.c
+@@ -33,6 +33,7 @@
+ #include "p2p/p2p.h"
+ #include "p2p_supplicant.h"
+ #include "wps_supplicant.h"
++#include "ubus.h"
+ 
+ 
+ #ifndef WPS_PIN_SCAN_IGNORE_SEL_REG
+@@ -401,6 +402,8 @@ static int wpa_supplicant_wps_cred(void
+ 	wpa_hexdump_key(MSG_DEBUG, "WPS: Received Credential attribute",
+ 			cred->cred_attr, cred->cred_attr_len);
+ 
++	wpas_ubus_notify(wpa_s, cred);
++
+ 	if (wpa_s->conf->wps_cred_processing == 1)
+ 		return 0;
+ 
diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch
index 9704389fdb..bc50606038 100644
--- a/package/network/services/hostapd/patches/601-ucode_support.patch
+++ b/package/network/services/hostapd/patches/601-ucode_support.patch
@@ -1,3 +1,11 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Fri, 26 May 2023 10:23:59 +0200
+Subject: [PATCH] Add ucode support, use ucode for the main ubus object
+
+This implements vastly improved dynamic configuration reload support.
+It can handle configuration changes on individual wifi interfaces, as well
+as adding/removing interfaces.
+
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
 @@ -168,9 +168,21 @@ OBJS += ../src/eapol_auth/eapol_auth_sm.
@@ -24,6 +32,24 @@
  endif
  
  ifdef CONFIG_CODE_COVERAGE
+--- a/hostapd/ctrl_iface.c
++++ b/hostapd/ctrl_iface.c
+@@ -5487,6 +5487,7 @@ try_again:
+ 		return -1;
+ 	}
+ 
++	interface->ctrl_iface_recv = hostapd_ctrl_iface_receive_process;
+ 	wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb);
+ 
+ 	return 0;
+@@ -5588,6 +5589,7 @@ fail:
+ 	os_free(fname);
+ 
+ 	interface->global_ctrl_sock = s;
++	interface->ctrl_iface_recv = hostapd_ctrl_iface_receive_process;
+ 	eloop_register_read_sock(s, hostapd_global_ctrl_iface_receive,
+ 				 interface, NULL);
+ 
 --- a/hostapd/main.c
 +++ b/hostapd/main.c
 @@ -1014,6 +1014,7 @@ int main(int argc, char *argv[])
@@ -42,52 +68,32 @@
  	hostapd_global_ctrl_iface_deinit(&interfaces);
  	/* Deinitialize all interfaces */
  	for (i = 0; i < interfaces.count; i++) {
---- a/src/ap/hostapd.h
-+++ b/src/ap/hostapd.h
-@@ -19,6 +19,7 @@
- #include "ap_config.h"
- #include "drivers/driver.h"
- #include "ubus.h"
-+#include "ucode.h"
+--- a/src/ap/ap_drv_ops.h
++++ b/src/ap/ap_drv_ops.h
+@@ -399,6 +399,23 @@ static inline int hostapd_drv_stop_ap(st
+ 	return hapd->driver->stop_ap(hapd->drv_priv, link_id);
+ }
  
- #define OCE_STA_CFON_ENABLED(hapd) \
- 	((hapd->conf->oce & OCE_STA_CFON) && \
-@@ -51,6 +52,10 @@ struct hapd_interfaces {
- 	struct hostapd_config * (*config_read_cb)(const char *config_fname);
- 	int (*ctrl_iface_init)(struct hostapd_data *hapd);
- 	void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
-+	int (*ctrl_iface_recv)(struct hostapd_data *hapd,
-+			       char *buf, char *reply, int reply_size,
-+			       struct sockaddr_storage *from,
-+			       socklen_t fromlen);
- 	int (*for_each_interface)(struct hapd_interfaces *interfaces,
- 				  int (*cb)(struct hostapd_iface *iface,
- 					    void *ctx), void *ctx);
-@@ -186,6 +191,7 @@ struct hostapd_data {
- 	struct hostapd_config *iconf;
- 	struct hostapd_bss_config *conf;
- 	struct hostapd_ubus_bss ubus;
-+	struct hostapd_ucode_bss ucode;
- 	int interface_added; /* virtual interface added for this BSS */
- 	unsigned int started:1;
- 	unsigned int disabled:1;
-@@ -518,6 +524,7 @@ struct hostapd_sta_info {
-  */
- struct hostapd_iface {
- 	struct hapd_interfaces *interfaces;
-+	struct hostapd_ucode_iface ucode;
- 	void *owner;
- 	char *config_fname;
- 	struct hostapd_config *conf;
-@@ -718,6 +725,8 @@ struct hostapd_iface * hostapd_init(stru
- struct hostapd_iface *
- hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy,
- 			   const char *config_fname, int debug);
-+int hostapd_setup_bss(struct hostapd_data *hapd, int first, bool start_beacon);
-+void hostapd_bss_deinit(struct hostapd_data *hapd);
- void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
- 			   int reassoc);
- void hostapd_interface_deinit_free(struct hostapd_iface *iface);
++static inline int hostapd_drv_if_rename(struct hostapd_data *hapd,
++					enum wpa_driver_if_type type,
++					const char *ifname,
++					const char *new_name)
++{
++	if (!hapd->driver || !hapd->driver->if_rename || !hapd->drv_priv)
++		return -1;
++	return hapd->driver->if_rename(hapd->drv_priv, type, ifname, new_name);
++}
++
++static inline int hostapd_drv_set_first_bss(struct hostapd_data *hapd)
++{
++	if (!hapd->driver || !hapd->driver->set_first_bss || !hapd->drv_priv)
++		return 0;
++	return hapd->driver->set_first_bss(hapd->drv_priv);
++}
++
+ static inline int hostapd_drv_channel_info(struct hostapd_data *hapd,
+ 					   struct wpa_channel_info *ci)
+ {
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -255,6 +255,8 @@ int hostapd_reload_config(struct hostapd
@@ -152,132 +158,52 @@
  			wpa_printf(MSG_INFO, "Remove interface '%s'", buf);
  			hapd_iface->driver_ap_teardown =
  				!!(hapd_iface->drv_flags &
---- a/wpa_supplicant/Makefile
-+++ b/wpa_supplicant/Makefile
-@@ -192,8 +192,20 @@ endif
- ifdef CONFIG_UBUS
- CFLAGS += -DUBUS_SUPPORT
- OBJS += ubus.o
-+LIBS += -lubus
-+NEED_ULOOP:=y
-+endif
-+
-+ifdef CONFIG_UCODE
-+CFLAGS += -DUCODE_SUPPORT
-+OBJS += ../src/utils/ucode.o
-+OBJS += ucode.o
-+NEED_ULOOP:=y
-+endif
-+
-+ifdef NEED_ULOOP
- OBJS += ../src/utils/uloop.o
--LIBS += -lubox -lubus
-+LIBS += -lubox
- endif
- 
- ifdef CONFIG_CODE_COVERAGE
-@@ -1052,6 +1064,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o
- ifdef CONFIG_UBUS
- OBJS += ../src/ap/ubus.o
- endif
-+ifdef CONFIG_UCODE
-+OBJS += ../src/ap/ucode.o
-+endif
- endif
- 
- CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
---- a/wpa_supplicant/wpa_supplicant.c
-+++ b/wpa_supplicant/wpa_supplicant.c
-@@ -1060,6 +1060,7 @@ void wpa_supplicant_set_state(struct wpa
- 		sme_sched_obss_scan(wpa_s, 0);
- 	}
- 	wpa_s->wpa_state = state;
-+	wpas_ucode_update_state(wpa_s);
- 
- #ifdef CONFIG_BGSCAN
- 	if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid)
-@@ -7717,6 +7718,7 @@ struct wpa_supplicant * wpa_supplicant_a
- #endif /* CONFIG_P2P */
- 
- 	wpas_ubus_add_bss(wpa_s);
-+	wpas_ucode_add_bss(wpa_s);
- 
- 	return wpa_s;
- }
-@@ -7744,6 +7746,7 @@ int wpa_supplicant_remove_iface(struct w
- 	struct wpa_supplicant *parent = wpa_s->parent;
- #endif /* CONFIG_MESH */
- 
-+	wpas_ucode_free_bss(wpa_s);
- 	wpas_ubus_free_bss(wpa_s);
- 
- 	/* Remove interface from the global list of interfaces */
-@@ -8054,6 +8057,7 @@ struct wpa_global * wpa_supplicant_init(
- 
- 	eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0,
- 			       wpas_periodic, global, NULL);
-+	wpas_ucode_init(global);
- 
- 	return global;
- }
-@@ -8092,12 +8096,8 @@ int wpa_supplicant_run(struct wpa_global
- 	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
- 	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
- 
--	wpas_ubus_add(global);
--
- 	eloop_run();
- 
--	wpas_ubus_free(global);
--
- 	return 0;
- }
- 
-@@ -8130,6 +8130,8 @@ void wpa_supplicant_deinit(struct wpa_gl
- 
- 	wpas_notify_supplicant_deinitialized(global);
- 
-+	wpas_ucode_free();
-+
- 	eap_peer_unregister_methods();
- #ifdef CONFIG_AP
- 	eap_server_unregister_methods();
---- a/wpa_supplicant/wpa_supplicant_i.h
-+++ b/wpa_supplicant/wpa_supplicant_i.h
-@@ -22,6 +22,7 @@
- #include "wmm_ac.h"
- #include "pasn/pasn_common.h"
+--- a/src/ap/hostapd.h
++++ b/src/ap/hostapd.h
+@@ -19,6 +19,7 @@
+ #include "ap_config.h"
+ #include "drivers/driver.h"
  #include "ubus.h"
 +#include "ucode.h"
  
- extern const char *const wpa_supplicant_version;
- extern const char *const wpa_supplicant_license;
-@@ -697,6 +698,7 @@ struct wpa_supplicant {
- 	unsigned char perm_addr[ETH_ALEN];
- 	char ifname[100];
- 	struct wpas_ubus_bss ubus;
-+	struct wpas_ucode_bss ucode;
- #ifdef CONFIG_MATCH_IFACE
- 	int matched;
- #endif /* CONFIG_MATCH_IFACE */
---- a/hostapd/ctrl_iface.c
-+++ b/hostapd/ctrl_iface.c
-@@ -5487,6 +5487,7 @@ try_again:
- 		return -1;
- 	}
- 
-+	interface->ctrl_iface_recv = hostapd_ctrl_iface_receive_process;
- 	wpa_msg_register_cb(hostapd_ctrl_iface_msg_cb);
- 
- 	return 0;
-@@ -5588,6 +5589,7 @@ fail:
- 	os_free(fname);
- 
- 	interface->global_ctrl_sock = s;
-+	interface->ctrl_iface_recv = hostapd_ctrl_iface_receive_process;
- 	eloop_register_read_sock(s, hostapd_global_ctrl_iface_receive,
- 				 interface, NULL);
- 
+ #define OCE_STA_CFON_ENABLED(hapd) \
+ 	((hapd->conf->oce & OCE_STA_CFON) && \
+@@ -51,6 +52,10 @@ struct hapd_interfaces {
+ 	struct hostapd_config * (*config_read_cb)(const char *config_fname);
+ 	int (*ctrl_iface_init)(struct hostapd_data *hapd);
+ 	void (*ctrl_iface_deinit)(struct hostapd_data *hapd);
++	int (*ctrl_iface_recv)(struct hostapd_data *hapd,
++			       char *buf, char *reply, int reply_size,
++			       struct sockaddr_storage *from,
++			       socklen_t fromlen);
+ 	int (*for_each_interface)(struct hapd_interfaces *interfaces,
+ 				  int (*cb)(struct hostapd_iface *iface,
+ 					    void *ctx), void *ctx);
+@@ -186,6 +191,7 @@ struct hostapd_data {
+ 	struct hostapd_config *iconf;
+ 	struct hostapd_bss_config *conf;
+ 	struct hostapd_ubus_bss ubus;
++	struct hostapd_ucode_bss ucode;
+ 	int interface_added; /* virtual interface added for this BSS */
+ 	unsigned int started:1;
+ 	unsigned int disabled:1;
+@@ -518,6 +524,7 @@ struct hostapd_sta_info {
+  */
+ struct hostapd_iface {
+ 	struct hapd_interfaces *interfaces;
++	struct hostapd_ucode_iface ucode;
+ 	void *owner;
+ 	char *config_fname;
+ 	struct hostapd_config *conf;
+@@ -718,6 +725,8 @@ struct hostapd_iface * hostapd_init(stru
+ struct hostapd_iface *
+ hostapd_interface_init_bss(struct hapd_interfaces *interfaces, const char *phy,
+ 			   const char *config_fname, int debug);
++int hostapd_setup_bss(struct hostapd_data *hapd, int first, bool start_beacon);
++void hostapd_bss_deinit(struct hostapd_data *hapd);
+ void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
+ 			   int reassoc);
+ void hostapd_interface_deinit_free(struct hostapd_iface *iface);
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
 @@ -3853,6 +3853,25 @@ struct wpa_driver_ops {
@@ -322,77 +248,6 @@
  		int freq;
  		int ht_enabled;
  		int ch_offset;
---- a/src/drivers/driver_nl80211_event.c
-+++ b/src/drivers/driver_nl80211_event.c
-@@ -1196,6 +1196,7 @@ static void mlme_event_ch_switch(struct
- 				 struct nlattr *bw, struct nlattr *cf1,
- 				 struct nlattr *cf2,
- 				 struct nlattr *punct_bitmap,
-+				 struct nlattr *count,
- 				 int finished)
- {
- 	struct i802_bss *bss;
-@@ -1259,6 +1260,8 @@ static void mlme_event_ch_switch(struct
- 		data.ch_switch.cf1 = nla_get_u32(cf1);
- 	if (cf2)
- 		data.ch_switch.cf2 = nla_get_u32(cf2);
-+	if (count)
-+		data.ch_switch.count = nla_get_u32(count);
- 
- 	if (finished)
- 		bss->flink->freq = data.ch_switch.freq;
-@@ -3961,6 +3964,7 @@ static void do_process_drv_event(struct
- 				     tb[NL80211_ATTR_CENTER_FREQ1],
- 				     tb[NL80211_ATTR_CENTER_FREQ2],
- 				     tb[NL80211_ATTR_PUNCT_BITMAP],
-+				     tb[NL80211_ATTR_CH_SWITCH_COUNT],
- 				     0);
- 		break;
- 	case NL80211_CMD_CH_SWITCH_NOTIFY:
-@@ -3973,6 +3977,7 @@ static void do_process_drv_event(struct
- 				     tb[NL80211_ATTR_CENTER_FREQ1],
- 				     tb[NL80211_ATTR_CENTER_FREQ2],
- 				     tb[NL80211_ATTR_PUNCT_BITMAP],
-+				     NULL,
- 				     1);
- 		break;
- 	case NL80211_CMD_DISCONNECT:
---- a/wpa_supplicant/events.c
-+++ b/wpa_supplicant/events.c
-@@ -5955,6 +5955,7 @@ void supplicant_event(void *ctx, enum wp
- 		event_to_string(event), event);
- #endif /* CONFIG_NO_STDOUT_DEBUG */
- 
-+	wpas_ucode_event(wpa_s, event, data);
- 	switch (event) {
- 	case EVENT_AUTH:
- #ifdef CONFIG_FST
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -399,6 +399,23 @@ static inline int hostapd_drv_stop_ap(st
- 	return hapd->driver->stop_ap(hapd->drv_priv, link_id);
- }
- 
-+static inline int hostapd_drv_if_rename(struct hostapd_data *hapd,
-+					enum wpa_driver_if_type type,
-+					const char *ifname,
-+					const char *new_name)
-+{
-+	if (!hapd->driver || !hapd->driver->if_rename || !hapd->drv_priv)
-+		return -1;
-+	return hapd->driver->if_rename(hapd->drv_priv, type, ifname, new_name);
-+}
-+
-+static inline int hostapd_drv_set_first_bss(struct hostapd_data *hapd)
-+{
-+	if (!hapd->driver || !hapd->driver->set_first_bss || !hapd->drv_priv)
-+		return 0;
-+	return hapd->driver->set_first_bss(hapd->drv_priv);
-+}
-+
- static inline int hostapd_drv_channel_info(struct hostapd_data *hapd,
- 					   struct wpa_channel_info *ci)
- {
 --- a/src/drivers/driver_nl80211.c
 +++ b/src/drivers/driver_nl80211.c
 @@ -75,6 +75,16 @@ enum nlmsgerr_attrs {
@@ -621,6 +476,41 @@
  	.send_mlme = driver_nl80211_send_mlme,
  	.get_hw_feature_data = nl80211_get_hw_feature_data,
  	.sta_add = wpa_driver_nl80211_sta_add,
+--- a/src/drivers/driver_nl80211_event.c
++++ b/src/drivers/driver_nl80211_event.c
+@@ -1196,6 +1196,7 @@ static void mlme_event_ch_switch(struct
+ 				 struct nlattr *bw, struct nlattr *cf1,
+ 				 struct nlattr *cf2,
+ 				 struct nlattr *punct_bitmap,
++				 struct nlattr *count,
+ 				 int finished)
+ {
+ 	struct i802_bss *bss;
+@@ -1259,6 +1260,8 @@ static void mlme_event_ch_switch(struct
+ 		data.ch_switch.cf1 = nla_get_u32(cf1);
+ 	if (cf2)
+ 		data.ch_switch.cf2 = nla_get_u32(cf2);
++	if (count)
++		data.ch_switch.count = nla_get_u32(count);
+ 
+ 	if (finished)
+ 		bss->flink->freq = data.ch_switch.freq;
+@@ -3961,6 +3964,7 @@ static void do_process_drv_event(struct
+ 				     tb[NL80211_ATTR_CENTER_FREQ1],
+ 				     tb[NL80211_ATTR_CENTER_FREQ2],
+ 				     tb[NL80211_ATTR_PUNCT_BITMAP],
++				     tb[NL80211_ATTR_CH_SWITCH_COUNT],
+ 				     0);
+ 		break;
+ 	case NL80211_CMD_CH_SWITCH_NOTIFY:
+@@ -3973,6 +3977,7 @@ static void do_process_drv_event(struct
+ 				     tb[NL80211_ATTR_CENTER_FREQ1],
+ 				     tb[NL80211_ATTR_CENTER_FREQ2],
+ 				     tb[NL80211_ATTR_PUNCT_BITMAP],
++				     NULL,
+ 				     1);
+ 		break;
+ 	case NL80211_CMD_DISCONNECT:
 --- a/src/utils/wpa_debug.c
 +++ b/src/utils/wpa_debug.c
 @@ -26,6 +26,10 @@ static FILE *wpa_debug_tracing_file = NU
@@ -670,3 +560,121 @@
  extern int wpa_debug_level;
  extern int wpa_debug_show_keys;
  extern int wpa_debug_timestamp;
+--- a/wpa_supplicant/Makefile
++++ b/wpa_supplicant/Makefile
+@@ -192,8 +192,20 @@ endif
+ ifdef CONFIG_UBUS
+ CFLAGS += -DUBUS_SUPPORT
+ OBJS += ubus.o
++LIBS += -lubus
++NEED_ULOOP:=y
++endif
++
++ifdef CONFIG_UCODE
++CFLAGS += -DUCODE_SUPPORT
++OBJS += ../src/utils/ucode.o
++OBJS += ucode.o
++NEED_ULOOP:=y
++endif
++
++ifdef NEED_ULOOP
+ OBJS += ../src/utils/uloop.o
+-LIBS += -lubox -lubus
++LIBS += -lubox
+ endif
+ 
+ ifdef CONFIG_CODE_COVERAGE
+@@ -1052,6 +1064,9 @@ OBJS += ../src/ap/ctrl_iface_ap.o
+ ifdef CONFIG_UBUS
+ OBJS += ../src/ap/ubus.o
+ endif
++ifdef CONFIG_UCODE
++OBJS += ../src/ap/ucode.o
++endif
+ endif
+ 
+ CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
+--- a/wpa_supplicant/events.c
++++ b/wpa_supplicant/events.c
+@@ -5955,6 +5955,7 @@ void supplicant_event(void *ctx, enum wp
+ 		event_to_string(event), event);
+ #endif /* CONFIG_NO_STDOUT_DEBUG */
+ 
++	wpas_ucode_event(wpa_s, event, data);
+ 	switch (event) {
+ 	case EVENT_AUTH:
+ #ifdef CONFIG_FST
+--- a/wpa_supplicant/wpa_supplicant.c
++++ b/wpa_supplicant/wpa_supplicant.c
+@@ -1060,6 +1060,7 @@ void wpa_supplicant_set_state(struct wpa
+ 		sme_sched_obss_scan(wpa_s, 0);
+ 	}
+ 	wpa_s->wpa_state = state;
++	wpas_ucode_update_state(wpa_s);
+ 
+ #ifdef CONFIG_BGSCAN
+ 	if (state == WPA_COMPLETED && wpa_s->current_ssid != wpa_s->bgscan_ssid)
+@@ -7717,6 +7718,7 @@ struct wpa_supplicant * wpa_supplicant_a
+ #endif /* CONFIG_P2P */
+ 
+ 	wpas_ubus_add_bss(wpa_s);
++	wpas_ucode_add_bss(wpa_s);
+ 
+ 	return wpa_s;
+ }
+@@ -7744,6 +7746,7 @@ int wpa_supplicant_remove_iface(struct w
+ 	struct wpa_supplicant *parent = wpa_s->parent;
+ #endif /* CONFIG_MESH */
+ 
++	wpas_ucode_free_bss(wpa_s);
+ 	wpas_ubus_free_bss(wpa_s);
+ 
+ 	/* Remove interface from the global list of interfaces */
+@@ -8054,6 +8057,7 @@ struct wpa_global * wpa_supplicant_init(
+ 
+ 	eloop_register_timeout(WPA_SUPPLICANT_CLEANUP_INTERVAL, 0,
+ 			       wpas_periodic, global, NULL);
++	wpas_ucode_init(global);
+ 
+ 	return global;
+ }
+@@ -8092,12 +8096,8 @@ int wpa_supplicant_run(struct wpa_global
+ 	eloop_register_signal_terminate(wpa_supplicant_terminate, global);
+ 	eloop_register_signal_reconfig(wpa_supplicant_reconfig, global);
+ 
+-	wpas_ubus_add(global);
+-
+ 	eloop_run();
+ 
+-	wpas_ubus_free(global);
+-
+ 	return 0;
+ }
+ 
+@@ -8130,6 +8130,8 @@ void wpa_supplicant_deinit(struct wpa_gl
+ 
+ 	wpas_notify_supplicant_deinitialized(global);
+ 
++	wpas_ucode_free();
++
+ 	eap_peer_unregister_methods();
+ #ifdef CONFIG_AP
+ 	eap_server_unregister_methods();
+--- a/wpa_supplicant/wpa_supplicant_i.h
++++ b/wpa_supplicant/wpa_supplicant_i.h
+@@ -22,6 +22,7 @@
+ #include "wmm_ac.h"
+ #include "pasn/pasn_common.h"
+ #include "ubus.h"
++#include "ucode.h"
+ 
+ extern const char *const wpa_supplicant_version;
+ extern const char *const wpa_supplicant_license;
+@@ -697,6 +698,7 @@ struct wpa_supplicant {
+ 	unsigned char perm_addr[ETH_ALEN];
+ 	char ifname[100];
+ 	struct wpas_ubus_bss ubus;
++	struct wpas_ucode_bss ucode;
+ #ifdef CONFIG_MATCH_IFACE
+ 	int matched;
+ #endif /* CONFIG_MATCH_IFACE */
diff --git a/package/network/services/hostapd/patches/610-hostapd_cli_ujail_permission.patch b/package/network/services/hostapd/patches/610-hostapd_cli_ujail_permission.patch
index a03fcc9f92..30f675573a 100644
--- a/package/network/services/hostapd/patches/610-hostapd_cli_ujail_permission.patch
+++ b/package/network/services/hostapd/patches/610-hostapd_cli_ujail_permission.patch
@@ -1,3 +1,43 @@
+From: Mark Mentovai <mark at moxienet.com>
+Date: Tue, 23 Nov 2021 12:28:55 -0500
+Subject: [PATCH] hostapd: allow hostapd under ujail to communicate with
+ hostapd_cli
+
+When procd-ujail is available, 1f78538 runs hostapd as user
+"network", with only limited additional capabilities (CAP_NET_ADMIN and
+CAP_NET_RAW).
+
+hostapd_cli (CONFIG_PACKAGE_hostapd-utils) communicates with hostapd
+over a named UNIX-domain socket. hostapd_cli is responsible for creating
+this socket at /tmp/wpa_ctrl_$pid_$counter. Since it typically runs as
+root, this endpoint is normally created with uid root, gid root, mode
+0755. As a result, hostapd running as uid network is able to receive
+control messages sent through this interface, but is not able to respond
+to them. If debug-level logging is enabled (CONFIG_WPA_MSG_MIN_PRIORITY
+<= 2 at build, and log_level <= 2 in /etc/config/wireless wifi-device),
+this message will appear from hostapd:
+
+CTRL: sendto failed: Permission denied
+
+As a fix, hostapd_cli should create the socket node in the filesystem
+with uid network, gid network, mode 0770. This borrows the presently
+Android-only strategy already in hostapd intended to solve the same
+problem on Android.
+
+If procd-ujail is not available and hostapd falls back to running as
+root, it will still be able to read from and write to the socket even if
+the node in the filesystem has been restricted to the network user and
+group. This matches the logic in
+package/network/services/hostapd/files/wpad.init, which sets the uid and
+gid of /var/run/hostapd to network regardless of whether procd-ujail is
+available.
+
+As it appears that the "network" user and group are statically allocated
+uid 101 and gid 101, respectively, per
+package/base-files/files/etc/passwd and USERID in
+package/network/services/hostapd/Makefile, this patch also uses a
+constant 101 for the uid and gid.
+
 --- a/src/common/wpa_ctrl.c
 +++ b/src/common/wpa_ctrl.c
 @@ -135,7 +135,7 @@ try_again:
diff --git a/package/network/services/hostapd/patches/701-reload_config_inline.patch b/package/network/services/hostapd/patches/701-reload_config_inline.patch
index 7d159a23c5..260e832ddb 100644
--- a/package/network/services/hostapd/patches/701-reload_config_inline.patch
+++ b/package/network/services/hostapd/patches/701-reload_config_inline.patch
@@ -1,3 +1,11 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Fri, 26 May 2023 10:23:59 +0200
+Subject: [PATCH] Add ucode support, use ucode for the main ubus object #2
+
+This implements vastly improved dynamic configuration reload support.
+It can handle configuration changes on individual wifi interfaces, as well
+as adding/removing interfaces.
+
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -5065,7 +5065,12 @@ struct hostapd_config * hostapd_config_r
diff --git a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
index 1be3f89242..d3f797ed35 100644
--- a/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
+++ b/package/network/services/hostapd/patches/710-vlan_no_bridge.patch
@@ -1,3 +1,22 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 18 May 2021 12:50:17 +0200
+Subject: [PATCH] hostapd: add patch for disabling automatic bridging of vlan
+ interfaces
+
+netifd is responsible for handling that, except if the vlan bridge
+was provided by the config
+
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -3559,6 +3559,8 @@ static int hostapd_config_fill(struct ho
+ #ifndef CONFIG_NO_VLAN
+ 	} else if (os_strcmp(buf, "dynamic_vlan") == 0) {
+ 		bss->ssid.dynamic_vlan = atoi(pos);
++	} else if (os_strcmp(buf, "vlan_no_bridge") == 0) {
++		bss->ssid.vlan_no_bridge = atoi(pos);
+ 	} else if (os_strcmp(buf, "per_sta_vif") == 0) {
+ 		bss->ssid.per_sta_vif = atoi(pos);
+ 	} else if (os_strcmp(buf, "vlan_file") == 0) {
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
 @@ -121,6 +121,7 @@ struct hostapd_ssid {
@@ -28,14 +47,3 @@
  	ifconfig_up(ifname);
  }
  
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -3559,6 +3559,8 @@ static int hostapd_config_fill(struct ho
- #ifndef CONFIG_NO_VLAN
- 	} else if (os_strcmp(buf, "dynamic_vlan") == 0) {
- 		bss->ssid.dynamic_vlan = atoi(pos);
-+	} else if (os_strcmp(buf, "vlan_no_bridge") == 0) {
-+		bss->ssid.vlan_no_bridge = atoi(pos);
- 	} else if (os_strcmp(buf, "per_sta_vif") == 0) {
- 		bss->ssid.per_sta_vif = atoi(pos);
- 	} else if (os_strcmp(buf, "vlan_file") == 0) {
diff --git a/package/network/services/hostapd/patches/711-wds_bridge_force.patch b/package/network/services/hostapd/patches/711-wds_bridge_force.patch
index 32f4eb5b02..dbd75658ae 100644
--- a/package/network/services/hostapd/patches/711-wds_bridge_force.patch
+++ b/package/network/services/hostapd/patches/711-wds_bridge_force.patch
@@ -1,3 +1,14 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 20 Oct 2021 21:13:10 +0200
+Subject: [PATCH] hostpad: fix a race condition on adding AP mode wds sta
+ interfaces
+
+Both hostapd and netifd attempt to add a VLAN device to a bridge.
+Depending on which one wins the race, bridge vlan settings might be incomplete,
+or hostapd might run into an error and refuse to service the client.
+Fix this by preventing hostapd from adding interfaces to the bridge and
+instead rely entirely on netifd handling this properly
+
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -2447,6 +2447,8 @@ static int hostapd_config_fill(struct ho
diff --git a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
index 85dcd9f37a..fb00313f3d 100644
--- a/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
+++ b/package/network/services/hostapd/patches/720-iface_max_num_sta.patch
@@ -1,3 +1,11 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Wed, 26 May 2021 14:34:46 +0200
+Subject: [PATCH] hostapd: add support for specifying the maxassoc parameter as
+ a device option
+
+It allows enforcing a limit on associated stations to be enforced for the
+full device, e.g. in order to deal with hardware/driver limitations
+
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -3041,6 +3041,14 @@ static int hostapd_config_fill(struct ho
@@ -15,16 +23,28 @@
  	} else if (os_strcmp(buf, "wpa") == 0) {
  		bss->wpa = atoi(pos);
  	} else if (os_strcmp(buf, "extended_key_id") == 0) {
---- a/src/ap/hostapd.h
-+++ b/src/ap/hostapd.h
-@@ -754,6 +754,7 @@ void hostapd_cleanup_cs_params(struct ho
- void hostapd_periodic_iface(struct hostapd_iface *iface);
- int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
- void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
-+int hostapd_check_max_sta(struct hostapd_data *hapd);
+--- a/src/ap/ap_config.h
++++ b/src/ap/ap_config.h
+@@ -1057,6 +1057,8 @@ struct hostapd_config {
+ 	unsigned int track_sta_max_num;
+ 	unsigned int track_sta_max_age;
  
- void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap);
- void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
++	int max_num_sta;
++
+ 	char country[3]; /* first two octets: country code as described in
+ 			  * ISO/IEC 3166-1. Third octet:
+ 			  * ' ' (ascii 32): all environments
+--- a/src/ap/beacon.c
++++ b/src/ap/beacon.c
+@@ -1567,7 +1567,7 @@ void handle_probe_req(struct hostapd_dat
+ 	if (hapd->conf->no_probe_resp_if_max_sta &&
+ 	    is_multicast_ether_addr(mgmt->da) &&
+ 	    is_multicast_ether_addr(mgmt->bssid) &&
+-	    hapd->num_sta >= hapd->conf->max_num_sta &&
++	    hostapd_check_max_sta(hapd) &&
+ 	    !ap_get_sta(hapd, mgmt->sa)) {
+ 		wpa_printf(MSG_MSGDUMP, "%s: Ignore Probe Request from " MACSTR
+ 			   " since no room for additional STA",
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -247,6 +247,29 @@ static int hostapd_iface_conf_changed(st
@@ -57,25 +77,13 @@
  
  int hostapd_reload_config(struct hostapd_iface *iface)
  {
---- a/src/ap/beacon.c
-+++ b/src/ap/beacon.c
-@@ -1567,7 +1567,7 @@ void handle_probe_req(struct hostapd_dat
- 	if (hapd->conf->no_probe_resp_if_max_sta &&
- 	    is_multicast_ether_addr(mgmt->da) &&
- 	    is_multicast_ether_addr(mgmt->bssid) &&
--	    hapd->num_sta >= hapd->conf->max_num_sta &&
-+	    hostapd_check_max_sta(hapd) &&
- 	    !ap_get_sta(hapd, mgmt->sa)) {
- 		wpa_printf(MSG_MSGDUMP, "%s: Ignore Probe Request from " MACSTR
- 			   " since no room for additional STA",
---- a/src/ap/ap_config.h
-+++ b/src/ap/ap_config.h
-@@ -1057,6 +1057,8 @@ struct hostapd_config {
- 	unsigned int track_sta_max_num;
- 	unsigned int track_sta_max_age;
+--- a/src/ap/hostapd.h
++++ b/src/ap/hostapd.h
+@@ -754,6 +754,7 @@ void hostapd_cleanup_cs_params(struct ho
+ void hostapd_periodic_iface(struct hostapd_iface *iface);
+ int hostapd_owe_trans_get_info(struct hostapd_data *hapd);
+ void hostapd_ocv_check_csa_sa_query(void *eloop_ctx, void *timeout_ctx);
++int hostapd_check_max_sta(struct hostapd_data *hapd);
  
-+	int max_num_sta;
-+
- 	char country[3]; /* first two octets: country code as described in
- 			  * ISO/IEC 3166-1. Third octet:
- 			  * ' ' (ascii 32): all environments
+ void hostapd_switch_color(struct hostapd_data *hapd, u64 bitmap);
+ void hostapd_cleanup_cca_params(struct hostapd_data *hapd);
diff --git a/package/network/services/hostapd/patches/730-ft_iface.patch b/package/network/services/hostapd/patches/730-ft_iface.patch
index 1d10756343..2f47f17d96 100644
--- a/package/network/services/hostapd/patches/730-ft_iface.patch
+++ b/package/network/services/hostapd/patches/730-ft_iface.patch
@@ -1,3 +1,11 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Fri, 4 Jun 2021 09:12:07 +0200
+Subject: [PATCH] hostapd: configure inter-AP communication interface for
+ 802.11r
+
+In setups using VLAN bridge filtering, hostapd may need to communicate using
+a VLAN interface on top of the bridge, instead of using the bridge directly
+
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -3200,6 +3200,8 @@ static int hostapd_config_fill(struct ho
diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
index b704f2eb25..5611096ad8 100644
--- a/package/network/services/hostapd/patches/740-snoop_iface.patch
+++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
@@ -1,3 +1,22 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 27 Jul 2021 20:28:58 +0200
+Subject: [PATCH] hostapd: make the snooping interface (for proxyarp)
+ configurable
+
+Use the VLAN interface instead of the bridge, to ensure that hostapd receives
+untagged DHCP packets
+
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -2451,6 +2451,8 @@ static int hostapd_config_fill(struct ho
+ 			os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
+ 	} else if (os_strcmp(buf, "bridge_hairpin") == 0) {
+ 		bss->bridge_hairpin = atoi(pos);
++	} else if (os_strcmp(buf, "snoop_iface") == 0) {
++		os_strlcpy(bss->snoop_iface, pos, sizeof(bss->snoop_iface));
+ 	} else if (os_strcmp(buf, "vlan_bridge") == 0) {
+ 		os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
+ 	} else if (os_strcmp(buf, "wds_bridge") == 0) {
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
 @@ -284,6 +284,7 @@ struct hostapd_bss_config {
@@ -8,6 +27,23 @@
  	char vlan_bridge[IFNAMSIZ + 1];
  	char wds_bridge[IFNAMSIZ + 1];
  	int bridge_hairpin; /* hairpin_mode on bridge members */
+--- a/src/ap/ap_drv_ops.h
++++ b/src/ap/ap_drv_ops.h
+@@ -366,12 +366,12 @@ static inline int hostapd_drv_br_port_se
+ 
+ static inline int hostapd_drv_br_set_net_param(struct hostapd_data *hapd,
+ 					       enum drv_br_net_param param,
+-					       unsigned int val)
++					       const char *ifname, unsigned int val)
+ {
+ 	if (hapd->driver == NULL || hapd->drv_priv == NULL ||
+ 	    hapd->driver->br_set_net_param == NULL)
+ 		return -1;
+-	return hapd->driver->br_set_net_param(hapd->drv_priv, param, val);
++	return hapd->driver->br_set_net_param(hapd->drv_priv, param, ifname, val);
+ }
+ 
+ static inline int hostapd_drv_vendor_cmd(struct hostapd_data *hapd,
 --- a/src/ap/x_snoop.c
 +++ b/src/ap/x_snoop.c
 @@ -33,28 +33,31 @@ int x_snoop_init(struct hostapd_data *ha
@@ -74,34 +110,6 @@
  	hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_PROXYARP, 0);
  	hostapd_drv_br_port_set_attr(hapd, DRV_BR_PORT_ATTR_HAIRPIN_MODE, 0);
  	hapd->x_snoop_initialized = false;
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -2451,6 +2451,8 @@ static int hostapd_config_fill(struct ho
- 			os_strlcpy(bss->wds_bridge, pos, sizeof(bss->wds_bridge));
- 	} else if (os_strcmp(buf, "bridge_hairpin") == 0) {
- 		bss->bridge_hairpin = atoi(pos);
-+	} else if (os_strcmp(buf, "snoop_iface") == 0) {
-+		os_strlcpy(bss->snoop_iface, pos, sizeof(bss->snoop_iface));
- 	} else if (os_strcmp(buf, "vlan_bridge") == 0) {
- 		os_strlcpy(bss->vlan_bridge, pos, sizeof(bss->vlan_bridge));
- 	} else if (os_strcmp(buf, "wds_bridge") == 0) {
---- a/src/ap/ap_drv_ops.h
-+++ b/src/ap/ap_drv_ops.h
-@@ -366,12 +366,12 @@ static inline int hostapd_drv_br_port_se
- 
- static inline int hostapd_drv_br_set_net_param(struct hostapd_data *hapd,
- 					       enum drv_br_net_param param,
--					       unsigned int val)
-+					       const char *ifname, unsigned int val)
- {
- 	if (hapd->driver == NULL || hapd->drv_priv == NULL ||
- 	    hapd->driver->br_set_net_param == NULL)
- 		return -1;
--	return hapd->driver->br_set_net_param(hapd->drv_priv, param, val);
-+	return hapd->driver->br_set_net_param(hapd->drv_priv, param, ifname, val);
- }
- 
- static inline int hostapd_drv_vendor_cmd(struct hostapd_data *hapd,
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
 @@ -4275,7 +4275,7 @@ struct wpa_driver_ops {
diff --git a/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch b/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
index c30d6a485d..23b8dffb57 100644
--- a/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
+++ b/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
@@ -1,3 +1,9 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 4 Nov 2021 11:45:18 +0100
+Subject: [PATCH] hostapd: support qos_map_set without CONFIG_INTERWORKING
+
+This feature is useful on its own even without full interworking support
+
 --- a/hostapd/config_file.c
 +++ b/hostapd/config_file.c
 @@ -1680,6 +1680,8 @@ static int parse_anqp_elem(struct hostap
@@ -48,6 +54,22 @@
  
  	if (conf->bss_load_update_period && bss_load_update_init(hapd)) {
  		wpa_printf(MSG_ERROR, "BSS Load initialization failed");
+--- a/src/ap/ieee802_11_shared.c
++++ b/src/ap/ieee802_11_shared.c
+@@ -1138,13 +1138,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_da
+ u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta,
+ 		    const u8 *ext_capab_ie, size_t ext_capab_ie_len)
+ {
+-#ifdef CONFIG_INTERWORKING
+ 	/* check for QoS Map support */
+ 	if (ext_capab_ie_len >= 5) {
+ 		if (ext_capab_ie[4] & 0x01)
+ 			sta->qos_map_enabled = 1;
+ 	}
+-#endif /* CONFIG_INTERWORKING */
+ 
+ 	if (ext_capab_ie_len > 0) {
+ 		sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2));
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
 @@ -2935,8 +2935,6 @@ void wnm_bss_keep_alive_deinit(struct wp
@@ -79,19 +101,3 @@
  		if (wpa_s->hw_capab == CAPAB_VHT &&
  		    get_ie(data->assoc_info.resp_ies,
  			   data->assoc_info.resp_ies_len, WLAN_EID_VHT_CAP))
---- a/src/ap/ieee802_11_shared.c
-+++ b/src/ap/ieee802_11_shared.c
-@@ -1138,13 +1138,11 @@ u8 * hostapd_eid_rsnxe(struct hostapd_da
- u16 check_ext_capab(struct hostapd_data *hapd, struct sta_info *sta,
- 		    const u8 *ext_capab_ie, size_t ext_capab_ie_len)
- {
--#ifdef CONFIG_INTERWORKING
- 	/* check for QoS Map support */
- 	if (ext_capab_ie_len >= 5) {
- 		if (ext_capab_ie[4] & 0x01)
- 			sta->qos_map_enabled = 1;
- 	}
--#endif /* CONFIG_INTERWORKING */
- 
- 	if (ext_capab_ie_len > 0) {
- 		sta->ecsa_supported = !!(ext_capab_ie[0] & BIT(2));
diff --git a/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch b/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch
index 5428476b09..86394d78a4 100644
--- a/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch
+++ b/package/network/services/hostapd/patches/751-qos_map_ignore_when_unsupported.patch
@@ -1,3 +1,10 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 23 Dec 2021 19:18:33 +0100
+Subject: [PATCH] hostapd: only attempt to set qos map if supported by the
+ driver
+
+Fixes issues with brcmfmac
+
 --- a/src/ap/ap_drv_ops.c
 +++ b/src/ap/ap_drv_ops.c
 @@ -998,7 +998,8 @@ int hostapd_start_dfs_cac(struct hostapd
diff --git a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
index 7f1b5fc826..c4b14d41b0 100644
--- a/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
+++ b/package/network/services/hostapd/patches/760-dynamic_own_ip.patch
@@ -1,3 +1,21 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 15 Dec 2022 13:57:04 +0100
+Subject: [PATCH] hostapd: add support for automatically setting RADIUS own-ip
+ dynamically
+
+Some servers use the NAS-IP-Address attribute as a destination address
+
+--- a/hostapd/config_file.c
++++ b/hostapd/config_file.c
+@@ -2819,6 +2819,8 @@ static int hostapd_config_fill(struct ho
+ 	} else if (os_strcmp(buf, "iapp_interface") == 0) {
+ 		wpa_printf(MSG_INFO, "DEPRECATED: iapp_interface not used");
+ #endif /* CONFIG_IAPP */
++	} else if (os_strcmp(buf, "dynamic_own_ip_addr") == 0) {
++		bss->dynamic_own_ip_addr = atoi(pos);
+ 	} else if (os_strcmp(buf, "own_ip_addr") == 0) {
+ 		if (hostapd_parse_ip_addr(pos, &bss->own_ip_addr)) {
+ 			wpa_printf(MSG_ERROR,
 --- a/src/ap/ap_config.h
 +++ b/src/ap/ap_config.h
 @@ -310,6 +310,7 @@ struct hostapd_bss_config {
@@ -8,6 +26,19 @@
  	char *nas_identifier;
  	struct hostapd_radius_servers *radius;
  	int acct_interim_interval;
+--- a/src/ap/ieee802_1x.c
++++ b/src/ap/ieee802_1x.c
+@@ -601,6 +601,10 @@ int add_common_radius_attr(struct hostap
+ 	struct hostapd_radius_attr *attr;
+ 	int len;
+ 
++	if (hapd->conf->dynamic_own_ip_addr)
++		radius_client_get_local_addr(hapd->radius,
++					     &hapd->conf->own_ip_addr);
++
+ 	if (!hostapd_config_get_radius_attr(req_attr,
+ 					    RADIUS_ATTR_NAS_IP_ADDRESS) &&
+ 	    hapd->conf->own_ip_addr.af == AF_INET &&
 --- a/src/radius/radius_client.c
 +++ b/src/radius/radius_client.c
 @@ -165,6 +165,8 @@ struct radius_client_data {
@@ -83,27 +114,3 @@
  int radius_client_send(struct radius_client_data *radius,
  		       struct radius_msg *msg,
  		       RadiusType msg_type, const u8 *addr);
---- a/src/ap/ieee802_1x.c
-+++ b/src/ap/ieee802_1x.c
-@@ -601,6 +601,10 @@ int add_common_radius_attr(struct hostap
- 	struct hostapd_radius_attr *attr;
- 	int len;
- 
-+	if (hapd->conf->dynamic_own_ip_addr)
-+		radius_client_get_local_addr(hapd->radius,
-+					     &hapd->conf->own_ip_addr);
-+
- 	if (!hostapd_config_get_radius_attr(req_attr,
- 					    RADIUS_ATTR_NAS_IP_ADDRESS) &&
- 	    hapd->conf->own_ip_addr.af == AF_INET &&
---- a/hostapd/config_file.c
-+++ b/hostapd/config_file.c
-@@ -2819,6 +2819,8 @@ static int hostapd_config_fill(struct ho
- 	} else if (os_strcmp(buf, "iapp_interface") == 0) {
- 		wpa_printf(MSG_INFO, "DEPRECATED: iapp_interface not used");
- #endif /* CONFIG_IAPP */
-+	} else if (os_strcmp(buf, "dynamic_own_ip_addr") == 0) {
-+		bss->dynamic_own_ip_addr = atoi(pos);
- 	} else if (os_strcmp(buf, "own_ip_addr") == 0) {
- 		if (hostapd_parse_ip_addr(pos, &bss->own_ip_addr)) {
- 			wpa_printf(MSG_ERROR,
diff --git a/package/network/services/hostapd/patches/761-shared_das_port.patch b/package/network/services/hostapd/patches/761-shared_das_port.patch
index 333295bf22..5ca10d23bd 100644
--- a/package/network/services/hostapd/patches/761-shared_das_port.patch
+++ b/package/network/services/hostapd/patches/761-shared_das_port.patch
@@ -1,13 +1,10 @@
---- a/src/radius/radius_das.h
-+++ b/src/radius/radius_das.h
-@@ -44,6 +44,7 @@ struct radius_das_attrs {
- struct radius_das_conf {
- 	int port;
- 	const u8 *shared_secret;
-+	const u8 *nas_identifier;
- 	size_t shared_secret_len;
- 	const struct hostapd_ip_addr *client_addr;
- 	unsigned int time_window;
+From: Felix Fietkau <nbd at nbd.name>
+Date: Fri, 16 Dec 2022 13:32:48 +0100
+Subject: [PATCH] hostapd: allow sharing the incoming DAS port across multiple
+ interfaces
+
+Use the NAS identifier to find the right receiver context on incoming messages
+
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
 @@ -1510,6 +1510,7 @@ int hostapd_setup_bss(struct hostapd_dat
@@ -296,3 +293,13 @@
  	os_free(das->shared_secret);
  	os_free(das);
  }
+--- a/src/radius/radius_das.h
++++ b/src/radius/radius_das.h
+@@ -44,6 +44,7 @@ struct radius_das_attrs {
+ struct radius_das_conf {
+ 	int port;
+ 	const u8 *shared_secret;
++	const u8 *nas_identifier;
+ 	size_t shared_secret_len;
+ 	const struct hostapd_ip_addr *client_addr;
+ 	unsigned int time_window;
diff --git a/package/network/services/hostapd/patches/770-radius_server.patch b/package/network/services/hostapd/patches/770-radius_server.patch
index 488347eb63..73b2c8643b 100644
--- a/package/network/services/hostapd/patches/770-radius_server.patch
+++ b/package/network/services/hostapd/patches/770-radius_server.patch
@@ -1,3 +1,11 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 16 Mar 2023 11:35:50 +0100
+Subject: [PATCH] hostapd: add experimental radius server
+
+This can be used to run a standalone EAP server that can be used from
+other APs. It uses json as user database format and can automatically
+handle reload.
+
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
 @@ -63,6 +63,10 @@ endif



From lede-commits at lists.infradead.org  Thu Apr  4 04:39:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 07:39:10 -0400
Subject: [openwrt/openwrt]  hostapd: replace "argument list too long" fix with
 a simpler version
In-Reply-To: <171223074907.740996.9856400145860900992@git-01.infra.openwrt.org>
References: <171223074907.740996.9856400145860900992@git-01.infra.openwrt.org>
Message-ID: <mailman.23606.1712230755.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7b9996d107217393bac5b3edf6577b74991e02b4

commit 7b9996d107217393bac5b3edf6577b74991e02b4
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Apr 4 13:06:29 2024 +0200

    hostapd: replace "argument list too long" fix with a simpler version
    
    Less convoluted and more robust
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...d-de-duplicate-_DIRS-before-calling-mkdir.patch | 23 ++++++++++++++++++
 ..._make_dirs-robust-against-too-long-argume.patch | 27 ----------------------
 2 files changed, 23 insertions(+), 27 deletions(-)

diff --git a/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch b/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch
new file mode 100644
index 0000000000..08d4393c90
--- /dev/null
+++ b/package/network/services/hostapd/patches/210-build-de-duplicate-_DIRS-before-calling-mkdir.patch
@@ -0,0 +1,23 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Thu, 4 Apr 2024 12:59:41 +0200
+Subject: [PATCH] build: de-duplicate _DIRS before calling mkdir
+
+If the build path is long, the contents of the _DIRS variable can be very long,
+since it repeats the same directories very often.
+In some cases, this has triggered an "Argument list too long" build error.
+
+Suggested-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/src/build.rules
++++ b/src/build.rules
+@@ -80,7 +80,7 @@ endif
+ _DIRS := $(BUILDDIR)/$(PROJ)
+ .PHONY: _make_dirs
+ _make_dirs:
+-	@mkdir -p $(_DIRS)
++	@mkdir -p $(sort $(_DIRS))
+ 
+ $(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs
+ 	$(Q)$(CC) -c -o $@ $(CFLAGS) $<
diff --git a/package/network/services/hostapd/patches/999-build-make-_make_dirs-robust-against-too-long-argume.patch b/package/network/services/hostapd/patches/999-build-make-_make_dirs-robust-against-too-long-argume.patch
deleted file mode 100644
index cb8171551d..0000000000
--- a/package/network/services/hostapd/patches/999-build-make-_make_dirs-robust-against-too-long-argume.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From beeef79701082a82b2581a674e702ea60a358ce7 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robimarko at gmail.com>
-Date: Sun, 24 Mar 2024 20:47:06 +0100
-Subject: [PATCH] build: make _make_dirs robust against too long argument error
-
-_make_dirs currently can fail as _DIRS can be really long and thus go over
-the MAX_ARG_STRLEN limit so it will fail with:
-/bin/sh: Argument list too long
-
-Lets avoid this by stripping the $(BUILDDIR) prefix and then restoring it.
-
-Signed-off-by: Robert Marko <robimarko at gmail.com>
----
- src/build.rules | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/src/build.rules
-+++ b/src/build.rules
-@@ -80,7 +80,7 @@ endif
- _DIRS := $(BUILDDIR)/$(PROJ)
- .PHONY: _make_dirs
- _make_dirs:
--	@mkdir -p $(_DIRS)
-+	@printf '$(BUILDDIR)/%s ' $(patsubst $(BUILDDIR)/%,%,$(_DIRS)) | xargs mkdir -p
- 
- $(BUILDDIR)/$(PROJ)/src/%.o: $(ROOTDIR)src/%.c $(CONFIG_FILE) | _make_dirs
- 	$(Q)$(CC) -c -o $@ $(CFLAGS) $<



From lede-commits at lists.infradead.org  Thu Apr  4 04:39:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 07:39:09 -0400
Subject: [openwrt/openwrt]  hostapd: remove workaround for broken WPA IEs in
 ancient devices
In-Reply-To: <171223074907.740996.9856400145860900992@git-01.infra.openwrt.org>
References: <171223074907.740996.9856400145860900992@git-01.infra.openwrt.org>
Message-ID: <mailman.23607.1712230755.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6e391325af849df1efe45cf13d284a1b0da0ab74

commit 6e391325af849df1efe45cf13d284a1b0da0ab74
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Apr 4 12:54:25 2024 +0200

    hostapd: remove workaround for broken WPA IEs in ancient devices
    
    Affected devices were already quite old when this patch was added.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../patches/390-wpa_ie_cap_workaround.patch        | 61 ----------------------
 1 file changed, 61 deletions(-)

diff --git a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch b/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch
deleted file mode 100644
index fc26a84468..0000000000
--- a/package/network/services/hostapd/patches/390-wpa_ie_cap_workaround.patch
+++ /dev/null
@@ -1,61 +0,0 @@
-From: Felix Fietkau <nbd at openwrt.org>
-Date: Sun, 4 Sep 2011 18:23:36 +0000
-Subject: [PATCH] hostapd: add a workaround for driver issues in various
- android devices with texas instruments wifi
-
---- a/src/common/wpa_common.c
-+++ b/src/common/wpa_common.c
-@@ -2856,6 +2856,31 @@ u32 wpa_akm_to_suite(int akm)
- }
- 
- 
-+static void wpa_fixup_wpa_ie_rsn(u8 *assoc_ie, const u8 *wpa_msg_ie,
-+				 size_t rsn_ie_len)
-+{
-+	int pos, count;
-+
-+	pos = sizeof(struct rsn_ie_hdr) + RSN_SELECTOR_LEN;
-+	if (rsn_ie_len < pos + 2)
-+		return;
-+
-+	count = WPA_GET_LE16(wpa_msg_ie + pos);
-+	pos += 2 + count * RSN_SELECTOR_LEN;
-+	if (rsn_ie_len < pos + 2)
-+		return;
-+
-+	count = WPA_GET_LE16(wpa_msg_ie + pos);
-+	pos += 2 + count * RSN_SELECTOR_LEN;
-+	if (rsn_ie_len < pos + 2)
-+		return;
-+
-+	if (!assoc_ie[pos] && !assoc_ie[pos + 1] &&
-+	    (wpa_msg_ie[pos] || wpa_msg_ie[pos + 1]))
-+		memcpy(&assoc_ie[pos], &wpa_msg_ie[pos], 2);
-+}
-+
-+
- int wpa_compare_rsn_ie(int ft_initial_assoc,
- 		       const u8 *ie1, size_t ie1len,
- 		       const u8 *ie2, size_t ie2len)
-@@ -2863,8 +2888,19 @@ int wpa_compare_rsn_ie(int ft_initial_as
- 	if (ie1 == NULL || ie2 == NULL)
- 		return -1;
- 
--	if (ie1len == ie2len && os_memcmp(ie1, ie2, ie1len) == 0)
--		return 0; /* identical IEs */
-+	if (ie1len == ie2len) {
-+		u8 *ie_tmp;
-+
-+		if (os_memcmp(ie1, ie2, ie1len) == 0)
-+			return 0; /* identical IEs */
-+
-+		ie_tmp = alloca(ie1len);
-+		memcpy(ie_tmp, ie1, ie1len);
-+		wpa_fixup_wpa_ie_rsn(ie_tmp, ie2, ie1len);
-+
-+		if (os_memcmp(ie_tmp, ie2, ie1len) == 0)
-+			return 0; /* only mismatch in RSN capabilties */
-+	}
- 
- #ifdef CONFIG_IEEE80211R
- 	if (ft_initial_assoc) {



From lede-commits at lists.infradead.org  Thu Apr  4 04:39:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 07:39:11 -0400
Subject: [openwrt/openwrt]  hostapd: slightly clean up patches
In-Reply-To: <171223074907.740996.9856400145860900992@git-01.infra.openwrt.org>
References: <171223074907.740996.9856400145860900992@git-01.infra.openwrt.org>
Message-ID: <mailman.23608.1712230757.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5aab43f93388b1e35d80892e1534584e83802f89

commit 5aab43f93388b1e35d80892e1534584e83802f89
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Apr 4 13:19:49 2024 +0200

    hostapd: slightly clean up patches
    
    - move build/ifdef related changes together to the 200 patch range
    - reduce adding/removing include statements across patches
    - move patches away from the 99x patch range to simplify maintenance
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...Wrt-13156.patch => 050-Fix-OpenWrt-13156.patch} |  6 +++---
 ...-add-extra-ies-only-if-allowed-by-driver.patch} |  2 +-
 .../services/hostapd/patches/200-multicall.patch   |  4 ++--
 ...pport.patch => 201-lto-jobserver-support.patch} |  6 +++---
 ...-WNM_AP-functions-dependant-on-CONFIG_AP.patch} |  4 ++--
 ...inition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch} | 20 -------------------
 ...patch => 213-wpa_supplicant-fix-warnings.patch} |  0
 ...-features.patch => 220-indicate-features.patch} |  0
 ...cli_ifdef.patch => 250-hostapd_cli_ifdef.patch} |  0
 ...wpa_cli_ifdef.patch => 251-wpa_cli_ifdef.patch} |  0
 ..._mib.patch => 252-disable_ctrl_iface_mib.patch} |  0
 ... => 253-qos_map_set_without_interworking.patch} |  6 +++---
 .../patches/381-hostapd_cli_UNKNOWN-COMMAND.patch  |  2 +-
 ...ant-add-new-config-params-to-be-used-with.patch | 23 ++--------------------
 .../hostapd/patches/600-ubus_support.patch         |  6 +++---
 .../hostapd/patches/601-ucode_support.patch        |  8 ++++----
 .../services/hostapd/patches/740-snoop_iface.patch |  2 +-
 17 files changed, 25 insertions(+), 64 deletions(-)

diff --git a/package/network/services/hostapd/patches/991-Fix-OpenWrt-13156.patch b/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch
similarity index 91%
rename from package/network/services/hostapd/patches/991-Fix-OpenWrt-13156.patch
rename to package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch
index 4cd8eaa4d9..a044409d2d 100644
--- a/package/network/services/hostapd/patches/991-Fix-OpenWrt-13156.patch
+++ b/package/network/services/hostapd/patches/050-Fix-OpenWrt-13156.patch
@@ -20,7 +20,7 @@ Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
 
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -3681,6 +3681,8 @@ int hostapd_remove_iface(struct hapd_int
+@@ -3646,6 +3646,8 @@ int hostapd_remove_iface(struct hapd_int
  void hostapd_new_assoc_sta(struct hostapd_data *hapd, struct sta_info *sta,
  			   int reassoc)
  {
@@ -29,7 +29,7 @@ Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
  	if (hapd->tkip_countermeasures) {
  		hostapd_drv_sta_deauth(hapd, sta->addr,
  				       WLAN_REASON_MICHAEL_MIC_FAILURE);
-@@ -3688,10 +3690,16 @@ void hostapd_new_assoc_sta(struct hostap
+@@ -3653,10 +3655,16 @@ void hostapd_new_assoc_sta(struct hostap
  	}
  
  #ifdef CONFIG_IEEE80211BE
@@ -51,7 +51,7 @@ Signed-off-by: Stijn Tintel <stijn at linux-ipv6.be>
  	sta->post_csa_sa_query = 0;
 --- a/src/ap/sta_info.c
 +++ b/src/ap/sta_info.c
-@@ -1414,9 +1414,6 @@ bool ap_sta_set_authorized_flag(struct h
+@@ -1412,9 +1412,6 @@ bool ap_sta_set_authorized_flag(struct h
  				mld_assoc_link_id = -2;
  		}
  #endif /* CONFIG_IEEE80211BE */
diff --git a/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch b/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
similarity index 98%
rename from package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
rename to package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
index ca17791d84..de4d4ad3c2 100644
--- a/package/network/services/hostapd/patches/992-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
+++ b/package/network/services/hostapd/patches/051-nl80211-add-extra-ies-only-if-allowed-by-driver.patch
@@ -26,7 +26,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -2344,6 +2344,9 @@ struct wpa_driver_capa {
+@@ -2340,6 +2340,9 @@ struct wpa_driver_capa {
  	/** Maximum number of iterations in a single scan plan */
  	u32 max_sched_scan_plan_iterations;
  
diff --git a/package/network/services/hostapd/patches/200-multicall.patch b/package/network/services/hostapd/patches/200-multicall.patch
index 65c1e5d838..1a193b51bb 100644
--- a/package/network/services/hostapd/patches/200-multicall.patch
+++ b/package/network/services/hostapd/patches/200-multicall.patch
@@ -116,7 +116,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  	struct hapd_interfaces *interfaces = ctx;
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -6760,8 +6760,8 @@ union wpa_event_data {
+@@ -6763,8 +6763,8 @@ union wpa_event_data {
   * Driver wrapper code should call this function whenever an event is received
   * from the driver.
   */
@@ -127,7 +127,7 @@ This allows building both hostapd and wpa_supplicant as a single binary
  
  /**
   * wpa_supplicant_event_global - Report a driver event for wpa_supplicant
-@@ -6773,7 +6773,7 @@ void wpa_supplicant_event(void *ctx, enu
+@@ -6776,7 +6776,7 @@ void wpa_supplicant_event(void *ctx, enu
   * Same as wpa_supplicant_event(), but we search for the interface in
   * wpa_global.
   */
diff --git a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch b/package/network/services/hostapd/patches/201-lto-jobserver-support.patch
similarity index 91%
rename from package/network/services/hostapd/patches/500-lto-jobserver-support.patch
rename to package/network/services/hostapd/patches/201-lto-jobserver-support.patch
index f7f071fb0e..ea0dc29081 100644
--- a/package/network/services/hostapd/patches/500-lto-jobserver-support.patch
+++ b/package/network/services/hostapd/patches/201-lto-jobserver-support.patch
@@ -5,7 +5,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
 
 --- a/hostapd/Makefile
 +++ b/hostapd/Makefile
-@@ -1408,7 +1408,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
+@@ -1405,7 +1405,7 @@ hostapd_multi.a: $(BCHECK) $(OBJS)
  	@$(AR) cr $@ hostapd_multi.o $(OBJS)
  
  hostapd: $(OBJS)
@@ -14,7 +14,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
  	@$(E) "  LD " $@
  
  ifdef CONFIG_WPA_TRACE
-@@ -1419,7 +1419,7 @@ _OBJS_VAR := OBJS_c
+@@ -1416,7 +1416,7 @@ _OBJS_VAR := OBJS_c
  include ../src/objs.mk
  
  hostapd_cli: $(OBJS_c)
@@ -25,7 +25,7 @@ Subject: [PATCH] hostapd: build with LTO enabled (using jobserver for parallel
  NOBJS = nt_password_hash.o ../src/crypto/ms_funcs.o $(SHA1OBJS)
 --- a/wpa_supplicant/Makefile
 +++ b/wpa_supplicant/Makefile
-@@ -2106,31 +2106,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
+@@ -2103,31 +2103,31 @@ wpa_supplicant_multi.a: .config $(BCHECK
  	@$(AR) cr $@ wpa_supplicant_multi.o $(OBJS)
  
  wpa_supplicant: $(BCHECK) $(OBJS) $(EXTRA_progs)
diff --git a/package/network/services/hostapd/patches/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch b/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
similarity index 90%
rename from package/network/services/hostapd/patches/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
rename to package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
index b57550ac8b..84fdea8c78 100644
--- a/package/network/services/hostapd/patches/990-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
+++ b/package/network/services/hostapd/patches/211-ctrl-make-WNM_AP-functions-dependant-on-CONFIG_AP.patch
@@ -13,7 +13,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/wpa_supplicant/ctrl_iface.c
 +++ b/wpa_supplicant/ctrl_iface.c
-@@ -13220,7 +13220,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13214,7 +13214,7 @@ char * wpa_supplicant_ctrl_iface_process
  		if (wpas_ctrl_iface_coloc_intf_report(wpa_s, buf + 18))
  			reply_len = -1;
  #endif /* CONFIG_WNM */
@@ -22,7 +22,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	} else if (os_strncmp(buf, "DISASSOC_IMMINENT ", 18) == 0) {
  		if (ap_ctrl_iface_disassoc_imminent(wpa_s, buf + 18))
  			reply_len = -1;
-@@ -13230,7 +13230,7 @@ char * wpa_supplicant_ctrl_iface_process
+@@ -13224,7 +13224,7 @@ char * wpa_supplicant_ctrl_iface_process
  	} else if (os_strncmp(buf, "BSS_TM_REQ ", 11) == 0) {
  		if (ap_ctrl_iface_bss_tm_req(wpa_s, buf + 11))
  			reply_len = -1;
diff --git a/package/network/services/hostapd/patches/461-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch b/package/network/services/hostapd/patches/212-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch
similarity index 80%
rename from package/network/services/hostapd/patches/461-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch
rename to package/network/services/hostapd/patches/212-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch
index daff60a8ad..4c568c924c 100644
--- a/package/network/services/hostapd/patches/461-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch
+++ b/package/network/services/hostapd/patches/212-Move-definition-of-WLAN_SUPP_RATES_MAX-to-defs.h.patch
@@ -54,23 +54,3 @@ Signed-off-by: Eneas U de Queiroz <cotequeiroz at gmail.com>
  static inline int wpa_key_mgmt_wpa_ieee8021x(int akm)
  {
  	return !!(akm & (WPA_KEY_MGMT_IEEE8021X |
---- a/src/drivers/driver.h
-+++ b/src/drivers/driver.h
-@@ -19,7 +19,6 @@
- 
- #define WPA_SUPPLICANT_DRIVER_VERSION 4
- 
--#include "ap/sta_info.h"
- #include "common/defs.h"
- #include "common/ieee802_11_defs.h"
- #include "common/wpa_common.h"
---- a/wpa_supplicant/config_ssid.h
-+++ b/wpa_supplicant/config_ssid.h
-@@ -10,7 +10,6 @@
- #define CONFIG_SSID_H
- 
- #include "common/defs.h"
--#include "ap/sta_info.h"
- #include "utils/list.h"
- #include "eap_peer/eap_config.h"
- #include "drivers/nl80211_copy.h"
diff --git a/package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch b/package/network/services/hostapd/patches/213-wpa_supplicant-fix-warnings.patch
similarity index 100%
rename from package/network/services/hostapd/patches/599-wpa_supplicant-fix-warnings.patch
rename to package/network/services/hostapd/patches/213-wpa_supplicant-fix-warnings.patch
diff --git a/package/network/services/hostapd/patches/420-indicate-features.patch b/package/network/services/hostapd/patches/220-indicate-features.patch
similarity index 100%
rename from package/network/services/hostapd/patches/420-indicate-features.patch
rename to package/network/services/hostapd/patches/220-indicate-features.patch
diff --git a/package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch b/package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch
similarity index 100%
rename from package/network/services/hostapd/patches/430-hostapd_cli_ifdef.patch
rename to package/network/services/hostapd/patches/250-hostapd_cli_ifdef.patch
diff --git a/package/network/services/hostapd/patches/431-wpa_cli_ifdef.patch b/package/network/services/hostapd/patches/251-wpa_cli_ifdef.patch
similarity index 100%
rename from package/network/services/hostapd/patches/431-wpa_cli_ifdef.patch
rename to package/network/services/hostapd/patches/251-wpa_cli_ifdef.patch
diff --git a/package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch b/package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch
similarity index 100%
rename from package/network/services/hostapd/patches/380-disable_ctrl_iface_mib.patch
rename to package/network/services/hostapd/patches/252-disable_ctrl_iface_mib.patch
diff --git a/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch b/package/network/services/hostapd/patches/253-qos_map_set_without_interworking.patch
similarity index 94%
rename from package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
rename to package/network/services/hostapd/patches/253-qos_map_set_without_interworking.patch
index 23b8dffb57..4072ff5664 100644
--- a/package/network/services/hostapd/patches/750-qos_map_set_without_interworking.patch
+++ b/package/network/services/hostapd/patches/253-qos_map_set_without_interworking.patch
@@ -24,7 +24,7 @@ This feature is useful on its own even without full interworking support
  
  #ifdef CONFIG_HS20
  static int hs20_parse_conn_capab(struct hostapd_bss_config *bss, char *buf,
-@@ -4282,10 +4282,10 @@ static int hostapd_config_fill(struct ho
+@@ -4260,10 +4260,10 @@ static int hostapd_config_fill(struct ho
  		bss->gas_frag_limit = val;
  	} else if (os_strcmp(buf, "gas_comeback_delay") == 0) {
  		bss->gas_comeback_delay = atoi(pos);
@@ -38,7 +38,7 @@ This feature is useful on its own even without full interworking support
  		os_free(bss->dump_msk_file);
 --- a/src/ap/hostapd.c
 +++ b/src/ap/hostapd.c
-@@ -1578,6 +1578,7 @@ int hostapd_setup_bss(struct hostapd_dat
+@@ -1548,6 +1548,7 @@ static int hostapd_setup_bss(struct host
  		wpa_printf(MSG_ERROR, "GAS server initialization failed");
  		return -1;
  	}
@@ -46,7 +46,7 @@ This feature is useful on its own even without full interworking support
  
  	if (conf->qos_map_set_len &&
  	    hostapd_drv_set_qos_map(hapd, conf->qos_map_set,
-@@ -1585,7 +1586,6 @@ int hostapd_setup_bss(struct hostapd_dat
+@@ -1555,7 +1556,6 @@ static int hostapd_setup_bss(struct host
  		wpa_printf(MSG_ERROR, "Failed to initialize QoS Map");
  		return -1;
  	}
diff --git a/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch b/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch
index b7d2e2b659..e68edacb44 100644
--- a/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch
+++ b/package/network/services/hostapd/patches/381-hostapd_cli_UNKNOWN-COMMAND.patch
@@ -11,7 +11,7 @@ if CONFIG_CTRL_IFACE_MIB is not defined.
 
 --- a/hostapd/hostapd_cli.c
 +++ b/hostapd/hostapd_cli.c
-@@ -757,7 +757,7 @@ static int wpa_ctrl_command_sta(struct w
+@@ -753,7 +753,7 @@ static int wpa_ctrl_command_sta(struct w
  	}
  
  	buf[len] = '\0';
diff --git a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
index db561b8c20..ac1c9280b7 100644
--- a/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
+++ b/package/network/services/hostapd/patches/460-wpa_supplicant-add-new-config-params-to-be-used-with.patch
@@ -14,15 +14,7 @@ Signed-hostap: Antonio Quartulli <ordex at autistici.org>
 
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -19,6 +19,7 @@
- 
- #define WPA_SUPPLICANT_DRIVER_VERSION 4
- 
-+#include "ap/sta_info.h"
- #include "common/defs.h"
- #include "common/ieee802_11_defs.h"
- #include "common/wpa_common.h"
-@@ -971,6 +972,9 @@ struct wpa_driver_associate_params {
+@@ -971,6 +971,9 @@ struct wpa_driver_associate_params {
  	 * responsible for selecting with which BSS to associate. */
  	const u8 *bssid;
  
@@ -151,18 +143,7 @@ Signed-hostap: Antonio Quartulli <ordex at autistici.org>
  	{ INT_RANGE(macsec_integ_only, 0, 1) },
 --- a/wpa_supplicant/config_ssid.h
 +++ b/wpa_supplicant/config_ssid.h
-@@ -10,8 +10,10 @@
- #define CONFIG_SSID_H
- 
- #include "common/defs.h"
-+#include "ap/sta_info.h"
- #include "utils/list.h"
- #include "eap_peer/eap_config.h"
-+#include "drivers/nl80211_copy.h"
- 
- 
- #define DEFAULT_EAP_WORKAROUND ((unsigned int) -1)
-@@ -879,6 +881,9 @@ struct wpa_ssid {
+@@ -879,6 +879,9 @@ struct wpa_ssid {
  	 */
  	void *parent_cred;
  
diff --git a/package/network/services/hostapd/patches/600-ubus_support.patch b/package/network/services/hostapd/patches/600-ubus_support.patch
index a6b03ffd3f..0457f37f74 100644
--- a/package/network/services/hostapd/patches/600-ubus_support.patch
+++ b/package/network/services/hostapd/patches/600-ubus_support.patch
@@ -314,7 +314,7 @@ probe/assoc/auth requests via object subscribe.
  		ap_free_sta(hapd, sta);
  		break;
  	}
-@@ -1451,15 +1453,28 @@ void ap_sta_set_authorized_event(struct
+@@ -1448,15 +1450,28 @@ void ap_sta_set_authorized_event(struct
  		os_snprintf(buf, sizeof(buf), MACSTR, MAC2STR(sta->addr));
  
  	if (authorized) {
@@ -343,7 +343,7 @@ probe/assoc/auth requests via object subscribe.
  #ifdef CONFIG_P2P
  		if (wpa_auth_get_ip_addr(sta->wpa_sm, ip_addr_buf) == 0) {
  			os_snprintf(ip_addr, sizeof(ip_addr),
-@@ -1470,6 +1485,13 @@ void ap_sta_set_authorized_event(struct
+@@ -1467,6 +1482,13 @@ void ap_sta_set_authorized_event(struct
  		}
  #endif /* CONFIG_P2P */
  
@@ -357,7 +357,7 @@ probe/assoc/auth requests via object subscribe.
  		keyid = ap_sta_wpa_get_keyid(hapd, sta);
  		if (keyid) {
  			os_snprintf(keyid_buf, sizeof(keyid_buf),
-@@ -1488,17 +1510,19 @@ void ap_sta_set_authorized_event(struct
+@@ -1485,17 +1507,19 @@ void ap_sta_set_authorized_event(struct
  					 dpp_pkhash, SHA256_MAC_LEN);
  		}
  
diff --git a/package/network/services/hostapd/patches/601-ucode_support.patch b/package/network/services/hostapd/patches/601-ucode_support.patch
index bc50606038..b826363248 100644
--- a/package/network/services/hostapd/patches/601-ucode_support.patch
+++ b/package/network/services/hostapd/patches/601-ucode_support.patch
@@ -206,7 +206,7 @@ as adding/removing interfaces.
  void hostapd_interface_deinit_free(struct hostapd_iface *iface);
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -3853,6 +3853,25 @@ struct wpa_driver_ops {
+@@ -3856,6 +3856,25 @@ struct wpa_driver_ops {
  			 const char *ifname);
  
  	/**
@@ -232,7 +232,7 @@ as adding/removing interfaces.
  	 * set_sta_vlan - Bind a station into a specific interface (AP only)
  	 * @priv: Private driver interface data
  	 * @ifname: Interface (main or virtual BSS or VLAN)
-@@ -6507,6 +6526,7 @@ union wpa_event_data {
+@@ -6510,6 +6529,7 @@ union wpa_event_data {
  
  	/**
  	 * struct ch_switch
@@ -240,7 +240,7 @@ as adding/removing interfaces.
  	 * @freq: Frequency of new channel in MHz
  	 * @ht_enabled: Whether this is an HT channel
  	 * @ch_offset: Secondary channel offset
-@@ -6517,6 +6537,7 @@ union wpa_event_data {
+@@ -6520,6 +6540,7 @@ union wpa_event_data {
  	 * @punct_bitmap: Puncturing bitmap
  	 */
  	struct ch_switch {
@@ -596,7 +596,7 @@ as adding/removing interfaces.
  CFLAGS += -DEAP_SERVER -DEAP_SERVER_IDENTITY
 --- a/wpa_supplicant/events.c
 +++ b/wpa_supplicant/events.c
-@@ -5955,6 +5955,7 @@ void supplicant_event(void *ctx, enum wp
+@@ -5949,6 +5949,7 @@ void supplicant_event(void *ctx, enum wp
  		event_to_string(event), event);
  #endif /* CONFIG_NO_STDOUT_DEBUG */
  
diff --git a/package/network/services/hostapd/patches/740-snoop_iface.patch b/package/network/services/hostapd/patches/740-snoop_iface.patch
index 5611096ad8..f4b3ac33b1 100644
--- a/package/network/services/hostapd/patches/740-snoop_iface.patch
+++ b/package/network/services/hostapd/patches/740-snoop_iface.patch
@@ -112,7 +112,7 @@ untagged DHCP packets
  	hapd->x_snoop_initialized = false;
 --- a/src/drivers/driver.h
 +++ b/src/drivers/driver.h
-@@ -4275,7 +4275,7 @@ struct wpa_driver_ops {
+@@ -4278,7 +4278,7 @@ struct wpa_driver_ops {
  	 * Returns: 0 on success, negative (<0) on failure
  	 */
  	int (*br_set_net_param)(void *priv, enum drv_br_net_param param,



From lede-commits at lists.infradead.org  Thu Apr  4 04:46:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 07:46:08 -0400
Subject: [openwrt/openwrt]  libxml2: add host build dependency on
 libiconv-full
In-Reply-To: <171223116830.756552.1521342932953522889@git-01.infra.openwrt.org>
References: <171223116830.756552.1521342932953522889@git-01.infra.openwrt.org>
Message-ID: <mailman.23614.1712231172.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4ef13c4a49708d361df663a6e42e6e114a71c020

commit 4ef13c4a49708d361df663a6e42e6e114a71c020
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Apr 4 13:45:33 2024 +0200

    libxml2: add host build dependency on libiconv-full
    
    Fixes build on macOS
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/libxml2/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/libs/libxml2/Makefile b/package/libs/libxml2/Makefile
index 86fa370771..efd33a5278 100644
--- a/package/libs/libxml2/Makefile
+++ b/package/libs/libxml2/Makefile
@@ -11,6 +11,7 @@ PKG_HASH:=a972796696afd38073e0f59c283c3a2f5a560b5268b4babc391b286166526b21
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:xmlsoft:libxml2
+HOST_BUILD_DEPENDS := libiconv-full/host
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Thu Apr  4 07:15:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 10:15:41 -0400
Subject: [openwrt/openwrt]  kernel: ltq-vmmc: fix compilation warning/error
In-Reply-To: <171224014184.1118982.5683133762846581459@git-01.infra.openwrt.org>
References: <171224014184.1118982.5683133762846581459@git-01.infra.openwrt.org>
Message-ID: <mailman.23710.1712240147.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/000d25c31257e981309ea5d57c6c90337736f0bf

commit 000d25c31257e981309ea5d57c6c90337736f0bf
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Apr 3 22:54:51 2024 +0100

    kernel: ltq-vmmc: fix compilation warning/error
    
    Fix compilation warning enum-int-mismatch which results in failure to
    build kmod-ltq-vmmc in case CONFIG_KERNEL_WERROR is set.
    .../build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:392:14: error: conflicting types for 'ifx_mps_fastbuf_init' due to enum/integer mismatch; have 'IFX_return_t(void)' [-Werror=enum-int-mismatch]
      392 | IFX_return_t ifx_mps_fastbuf_init (IFX_void_t)
          |              ^~~~~~~~~~~~~~~~~~~~
    .../build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:120:13: note: previous declaration of 'ifx_mps_fastbuf_init' with type 'IFX_int32_t(void)' {aka 'int(void)'}
      120 | IFX_int32_t ifx_mps_fastbuf_init (IFX_void_t);
          |             ^~~~~~~~~~~~~~~~~~~~
    .../build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:420:14: error: conflicting types for 'ifx_mps_fastbuf_close' due to enum/integer mismatch; have 'IFX_return_t(void)' [-Werror=enum-int-mismatch]
      420 | IFX_return_t ifx_mps_fastbuf_close (IFX_void_t)
          |              ^~~~~~~~~~~~~~~~~~~~~
    .../build_dir/target-mips_24kc_musl/linux-lantiq_xrx200/drv_vmmc-1.9.0/src/mps/drv_mps_vmmc_common.c:121:13: note: previous declaration of 'ifx_mps_fastbuf_close' with type 'IFX_int32_t(void)' {aka 'int(void)'}
      121 | IFX_int32_t ifx_mps_fastbuf_close (IFX_void_t);
          |             ^~~~~~~~~~~~~~~~~~~~~
    cc1: all warnings being treated as errors
    
    Refresh patches and bump PKG_RELEASE while at it.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/kernel/lantiq/ltq-vmmc/Makefile            |  2 +-
 .../600-fix-compilation-warning-fallthrough.patch  |  2 +-
 ...02-fix-compilation-warning-int-conversion.patch | 26 ++++++++++++++++++++++
 3 files changed, 28 insertions(+), 2 deletions(-)

diff --git a/package/kernel/lantiq/ltq-vmmc/Makefile b/package/kernel/lantiq/ltq-vmmc/Makefile
index 4972f1c374..8cd6b3de45 100644
--- a/package/kernel/lantiq/ltq-vmmc/Makefile
+++ b/package/kernel/lantiq/ltq-vmmc/Makefile
@@ -10,7 +10,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=drv_vmmc
 PKG_VERSION:=1.9.0
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_HASH:=707f515eb727c032418c4da67d7e86884bb56cdc2a606e8f6ded6057d8767e57
diff --git a/package/kernel/lantiq/ltq-vmmc/patches/600-fix-compilation-warning-fallthrough.patch b/package/kernel/lantiq/ltq-vmmc/patches/600-fix-compilation-warning-fallthrough.patch
index 7282bc446d..aaacf2e7ca 100644
--- a/package/kernel/lantiq/ltq-vmmc/patches/600-fix-compilation-warning-fallthrough.patch
+++ b/package/kernel/lantiq/ltq-vmmc/patches/600-fix-compilation-warning-fallthrough.patch
@@ -1,6 +1,6 @@
 --- a/src/drv_vmmc_bbd.c
 +++ b/src/drv_vmmc_bbd.c
-@@ -1025,6 +1025,7 @@ static IFX_int32_t vmmc_BBD_WhiteListedCmdWr(VMMC_CHANNEL *pCh,
+@@ -1025,6 +1025,7 @@ static IFX_int32_t vmmc_BBD_WhiteListedC
                 }
              }
           }
diff --git a/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch b/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch
new file mode 100644
index 0000000000..f95407b395
--- /dev/null
+++ b/package/kernel/lantiq/ltq-vmmc/patches/602-fix-compilation-warning-int-conversion.patch
@@ -0,0 +1,26 @@
+--- a/src/mps/drv_mps_vmmc_common.c
++++ b/src/mps/drv_mps_vmmc_common.c
+@@ -117,8 +117,8 @@ IFX_void_t ifx_mps_mbx_event_upstream (I
+ #endif /* CONFIG_MPS_EVENT_MBX */
+ IFX_void_t *ifx_mps_fastbuf_malloc (IFX_size_t size, IFX_int32_t priority);
+ IFX_void_t ifx_mps_fastbuf_free (const IFX_void_t * ptr);
+-IFX_int32_t ifx_mps_fastbuf_init (IFX_void_t);
+-IFX_int32_t ifx_mps_fastbuf_close (IFX_void_t);
++IFX_return_t ifx_mps_fastbuf_init (IFX_void_t);
++IFX_return_t ifx_mps_fastbuf_close (IFX_void_t);
+ IFX_uint32_t ifx_mps_reset_structures (mps_comm_dev * pDev);
+ IFX_boolean_t ifx_mps_ext_bufman (IFX_void_t);
+ extern IFX_uint32_t danube_get_cpu_ver (IFX_void_t);
+--- a/src/mps/drv_mps_vmmc_device.h
++++ b/src/mps/drv_mps_vmmc_device.h
+@@ -216,8 +216,8 @@ typedef struct /**< mps buffer monitorin
+    mps_buffer_state_e buf_state;
+    IFX_void_t *(*malloc) (IFX_size_t size, IFX_int32_t priority); /**< Buffer alloc function (def. kmalloc) */
+    IFX_void_t (*free) (const IFX_void_t *ptr);  /**< Buffer free  function (def. kfree) */
+-   IFX_int32_t (*init) (IFX_void_t); /** Manager init function */
+-   IFX_int32_t (*close) (IFX_void_t); /** Manager shutdown function */
++   IFX_return_t (*init) (IFX_void_t); /** Manager init function */
++   IFX_return_t (*close) (IFX_void_t); /** Manager shutdown function */
+ } mps_buf_mng_t;
+ 
+ typedef IFX_uint32_t *mem_seg_t[MPS_MAX_PROVISION_SEGMENTS_PER_MSG];



From lede-commits at lists.infradead.org  Thu Apr  4 09:31:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 12:31:41 -0400
Subject: [openwrt/openwrt]  kirkwood: kernel: refresh 6.6 config
In-Reply-To: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
References: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
Message-ID: <mailman.23740.1712248304.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4e3093d90aaf57ebf1fd0e45c05330c7b56d2d32

commit 4e3093d90aaf57ebf1fd0e45c05330c7b56d2d32
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Thu Mar 14 14:41:11 2024 +0100

    kirkwood: kernel: refresh 6.6 config
    
    Done by 'make kernel_oldconfig'.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/kirkwood/config-6.6 | 17 +++++++++++++----
 1 file changed, 13 insertions(+), 4 deletions(-)

diff --git a/target/linux/kirkwood/config-6.6 b/target/linux/kirkwood/config-6.6
index 6d21143e96..b3320dac1f 100644
--- a/target/linux/kirkwood/config-6.6
+++ b/target/linux/kirkwood/config-6.6
@@ -10,10 +10,10 @@ CONFIG_ARCH_MULTI_CPU_AUTO=y
 CONFIG_ARCH_MULTI_V4_V5=y
 CONFIG_ARCH_MULTI_V5=y
 CONFIG_ARCH_MVEBU=y
-CONFIG_ARCH_NR_GPIO=0
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
 # CONFIG_ARMADA_37XX_WATCHDOG is not set
@@ -74,10 +74,10 @@ CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
 CONFIG_CRYPTO_LIB_DES=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_ZSTD=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL=y
@@ -98,10 +98,13 @@ CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
 CONFIG_FORCE_PCI=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_BUG=y
@@ -129,6 +132,7 @@ CONFIG_GRO_CELLS=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HWMON=y
 CONFIG_HW_RANDOM=y
@@ -162,8 +166,8 @@ CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MIGRATION=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 # CONFIG_MTD_CFI is not set
 CONFIG_MTD_CMDLINE_PARTS=y
@@ -195,10 +199,14 @@ CONFIG_NET_DSA_MV88E6XXX=y
 CONFIG_NET_DSA_TAG_DSA=y
 CONFIG_NET_DSA_TAG_DSA_COMMON=y
 CONFIG_NET_DSA_TAG_EDSA=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_SWITCHDEV=y
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
@@ -225,6 +233,7 @@ CONFIG_PCI_MVEBU=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 # CONFIG_PHY_MVEBU_A3700_UTMI is not set
 # CONFIG_PHY_MVEBU_A38X_COMPHY is not set
@@ -269,9 +278,9 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 CONFIG_SPI_ORION=y
 CONFIG_SPLIT_PTLOCK_CPUS=999999
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SRAM=y
 CONFIG_SRAM_EXEC=y
-CONFIG_SRCU=y
 CONFIG_SWPHY=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
 CONFIG_THERMAL=y



From lede-commits at lists.infradead.org  Thu Apr  4 09:31:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 12:31:43 -0400
Subject: [openwrt/openwrt]  kirkwood: add 6.6 kernel as testing version
In-Reply-To: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
References: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
Message-ID: <mailman.23741.1712248305.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c7d83d4379fb2c08f22e7a4f2852aaf9b37c3790

commit c7d83d4379fb2c08f22e7a4f2852aaf9b37c3790
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Thu Mar 14 14:41:56 2024 +0100

    kirkwood: add 6.6 kernel as testing version
    
    This patch introduce kernel 6.6 for kirkwood target as testing version.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/kirkwood/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/kirkwood/Makefile b/target/linux/kirkwood/Makefile
index 241fc614c4..44eaf925a1 100644
--- a/target/linux/kirkwood/Makefile
+++ b/target/linux/kirkwood/Makefile
@@ -12,6 +12,7 @@ CPU_TYPE:=xscale
 SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Thu Apr  4 09:31:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 12:31:38 -0400
Subject: [openwrt/openwrt]  kernel/kirkwood: Create kernel files for v6.6
 (from v6.1)
In-Reply-To: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
References: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
Message-ID: <mailman.23742.1712248307.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a1201f91448acb596e7de654090e3417364de6b5

commit a1201f91448acb596e7de654090e3417364de6b5
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Thu Mar 14 14:17:24 2024 +0100

    kernel/kirkwood: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    During a `git bisect` session, `git bisect --skip` is recommended.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/kirkwood/{config-6.1 => config-6.6}                          | 0
 .../002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch                | 0
 .../003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch           | 0
 .../004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch    | 0
 .../005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch       | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/100-ib62x0.patch       | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/101-iconnect.patch     | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/102-dockstar.patch     | 0
 .../linux/kirkwood/{patches-6.1 => patches-6.6}/103-iomega-ix2-200.patch  | 0
 .../kirkwood/{patches-6.1 => patches-6.6}/105-linksys-viper-dts.patch     | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/106-goflexnet.patch    | 0
 .../107-01-zyxel-nsa3x0-common-nand-partitions.patch                      | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/107-03-nsa325.patch    | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/109-pogoplug_v4.patch  | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/110-pogo_e02.patch     | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/111-l-50.patch         | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/112-sheevaplug.patch   | 0
 .../linux/kirkwood/{patches-6.1 => patches-6.6}/113-readynas_duo_v2.patch | 0
 .../linux/kirkwood/{patches-6.1 => patches-6.6}/114-ctera-c-200-v1.patch  | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/115-nsa310s.patch      | 0
 target/linux/kirkwood/{patches-6.1 => patches-6.6}/116-4i-edge-200.patch  | 0
 .../linux/kirkwood/{patches-6.1 => patches-6.6}/117-netgear_stora.patch   | 0
 .../201-enable-sata-port-specific-led-triggers.patch                      | 0
 .../{patches-6.1 => patches-6.6}/202-linksys-find-active-root.patch       | 0
 .../kirkwood/{patches-6.1 => patches-6.6}/203-blackarmor-nas220.patch     | 0
 25 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/kirkwood/config-6.1 b/target/linux/kirkwood/config-6.6
similarity index 100%
rename from target/linux/kirkwood/config-6.1
rename to target/linux/kirkwood/config-6.6
diff --git a/target/linux/kirkwood/patches-6.1/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch b/target/linux/kirkwood/patches-6.6/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
rename to target/linux/kirkwood/patches-6.6/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
diff --git a/target/linux/kirkwood/patches-6.1/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch b/target/linux/kirkwood/patches-6.6/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
rename to target/linux/kirkwood/patches-6.6/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
diff --git a/target/linux/kirkwood/patches-6.1/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch b/target/linux/kirkwood/patches-6.6/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
rename to target/linux/kirkwood/patches-6.6/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
diff --git a/target/linux/kirkwood/patches-6.1/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch b/target/linux/kirkwood/patches-6.6/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch
rename to target/linux/kirkwood/patches-6.6/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch
diff --git a/target/linux/kirkwood/patches-6.1/100-ib62x0.patch b/target/linux/kirkwood/patches-6.6/100-ib62x0.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/100-ib62x0.patch
rename to target/linux/kirkwood/patches-6.6/100-ib62x0.patch
diff --git a/target/linux/kirkwood/patches-6.1/101-iconnect.patch b/target/linux/kirkwood/patches-6.6/101-iconnect.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/101-iconnect.patch
rename to target/linux/kirkwood/patches-6.6/101-iconnect.patch
diff --git a/target/linux/kirkwood/patches-6.1/102-dockstar.patch b/target/linux/kirkwood/patches-6.6/102-dockstar.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/102-dockstar.patch
rename to target/linux/kirkwood/patches-6.6/102-dockstar.patch
diff --git a/target/linux/kirkwood/patches-6.1/103-iomega-ix2-200.patch b/target/linux/kirkwood/patches-6.6/103-iomega-ix2-200.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/103-iomega-ix2-200.patch
rename to target/linux/kirkwood/patches-6.6/103-iomega-ix2-200.patch
diff --git a/target/linux/kirkwood/patches-6.1/105-linksys-viper-dts.patch b/target/linux/kirkwood/patches-6.6/105-linksys-viper-dts.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/105-linksys-viper-dts.patch
rename to target/linux/kirkwood/patches-6.6/105-linksys-viper-dts.patch
diff --git a/target/linux/kirkwood/patches-6.1/106-goflexnet.patch b/target/linux/kirkwood/patches-6.6/106-goflexnet.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/106-goflexnet.patch
rename to target/linux/kirkwood/patches-6.6/106-goflexnet.patch
diff --git a/target/linux/kirkwood/patches-6.1/107-01-zyxel-nsa3x0-common-nand-partitions.patch b/target/linux/kirkwood/patches-6.6/107-01-zyxel-nsa3x0-common-nand-partitions.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/107-01-zyxel-nsa3x0-common-nand-partitions.patch
rename to target/linux/kirkwood/patches-6.6/107-01-zyxel-nsa3x0-common-nand-partitions.patch
diff --git a/target/linux/kirkwood/patches-6.1/107-03-nsa325.patch b/target/linux/kirkwood/patches-6.6/107-03-nsa325.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/107-03-nsa325.patch
rename to target/linux/kirkwood/patches-6.6/107-03-nsa325.patch
diff --git a/target/linux/kirkwood/patches-6.1/109-pogoplug_v4.patch b/target/linux/kirkwood/patches-6.6/109-pogoplug_v4.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/109-pogoplug_v4.patch
rename to target/linux/kirkwood/patches-6.6/109-pogoplug_v4.patch
diff --git a/target/linux/kirkwood/patches-6.1/110-pogo_e02.patch b/target/linux/kirkwood/patches-6.6/110-pogo_e02.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/110-pogo_e02.patch
rename to target/linux/kirkwood/patches-6.6/110-pogo_e02.patch
diff --git a/target/linux/kirkwood/patches-6.1/111-l-50.patch b/target/linux/kirkwood/patches-6.6/111-l-50.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/111-l-50.patch
rename to target/linux/kirkwood/patches-6.6/111-l-50.patch
diff --git a/target/linux/kirkwood/patches-6.1/112-sheevaplug.patch b/target/linux/kirkwood/patches-6.6/112-sheevaplug.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/112-sheevaplug.patch
rename to target/linux/kirkwood/patches-6.6/112-sheevaplug.patch
diff --git a/target/linux/kirkwood/patches-6.1/113-readynas_duo_v2.patch b/target/linux/kirkwood/patches-6.6/113-readynas_duo_v2.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/113-readynas_duo_v2.patch
rename to target/linux/kirkwood/patches-6.6/113-readynas_duo_v2.patch
diff --git a/target/linux/kirkwood/patches-6.1/114-ctera-c-200-v1.patch b/target/linux/kirkwood/patches-6.6/114-ctera-c-200-v1.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/114-ctera-c-200-v1.patch
rename to target/linux/kirkwood/patches-6.6/114-ctera-c-200-v1.patch
diff --git a/target/linux/kirkwood/patches-6.1/115-nsa310s.patch b/target/linux/kirkwood/patches-6.6/115-nsa310s.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/115-nsa310s.patch
rename to target/linux/kirkwood/patches-6.6/115-nsa310s.patch
diff --git a/target/linux/kirkwood/patches-6.1/116-4i-edge-200.patch b/target/linux/kirkwood/patches-6.6/116-4i-edge-200.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/116-4i-edge-200.patch
rename to target/linux/kirkwood/patches-6.6/116-4i-edge-200.patch
diff --git a/target/linux/kirkwood/patches-6.1/117-netgear_stora.patch b/target/linux/kirkwood/patches-6.6/117-netgear_stora.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/117-netgear_stora.patch
rename to target/linux/kirkwood/patches-6.6/117-netgear_stora.patch
diff --git a/target/linux/kirkwood/patches-6.1/201-enable-sata-port-specific-led-triggers.patch b/target/linux/kirkwood/patches-6.6/201-enable-sata-port-specific-led-triggers.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/201-enable-sata-port-specific-led-triggers.patch
rename to target/linux/kirkwood/patches-6.6/201-enable-sata-port-specific-led-triggers.patch
diff --git a/target/linux/kirkwood/patches-6.1/202-linksys-find-active-root.patch b/target/linux/kirkwood/patches-6.6/202-linksys-find-active-root.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/202-linksys-find-active-root.patch
rename to target/linux/kirkwood/patches-6.6/202-linksys-find-active-root.patch
diff --git a/target/linux/kirkwood/patches-6.1/203-blackarmor-nas220.patch b/target/linux/kirkwood/patches-6.6/203-blackarmor-nas220.patch
similarity index 100%
rename from target/linux/kirkwood/patches-6.1/203-blackarmor-nas220.patch
rename to target/linux/kirkwood/patches-6.6/203-blackarmor-nas220.patch



From lede-commits at lists.infradead.org  Thu Apr  4 09:31:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 12:31:42 -0400
Subject: [openwrt/openwrt]  kirkwood: split files into 6.1 and 6.6 version
In-Reply-To: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
References: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
Message-ID: <mailman.23745.1712248309.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3b5b3d89ed075214d4eb3f47ea372261a3cdad27

commit 3b5b3d89ed075214d4eb3f47ea372261a3cdad27
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Fri Mar 15 11:54:41 2024 +0100

    kirkwood: split files into 6.1 and 6.6 version
    
    Upstream change location of kirkwood dts files.
    Split downstream files location for better upstream follow.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 .../{files => files-6.1}/arch/arm/boot/dts/kirkwood-e4200-v2.dts       | 0
 .../{files => files-6.1}/arch/arm/boot/dts/kirkwood-ea3500.dts         | 0
 .../{files => files-6.1}/arch/arm/boot/dts/kirkwood-ea4500.dts         | 0
 .../{files => files-6.1}/arch/arm/boot/dts/kirkwood-goflexhome.dts     | 0
 .../{files => files-6.1}/arch/arm/boot/dts/kirkwood-ix4-200d.dts       | 0
 .../kirkwood/{files => files-6.1}/arch/arm/boot/dts/kirkwood-nas1.dts  | 0
 .../{files => files-6.1}/arch/arm/boot/dts/kirkwood-nsa310b.dts        | 0
 .../kirkwood/{files => files-6.1}/arch/arm/boot/dts/kirkwood-on100.dts | 0
 .../kirkwood/{files => files-6.1}/arch/arm/boot/dts/kirkwood-stora.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/marvell}/kirkwood-e4200-v2.dts  | 0
 .../dts => files-6.6/arch/arm/boot/dts/marvell}/kirkwood-ea3500.dts    | 0
 .../dts => files-6.6/arch/arm/boot/dts/marvell}/kirkwood-ea4500.dts    | 0
 .../arch/arm/boot/dts/marvell}/kirkwood-goflexhome.dts                 | 0
 .../dts => files-6.6/arch/arm/boot/dts/marvell}/kirkwood-ix4-200d.dts  | 0
 .../boot/dts => files-6.6/arch/arm/boot/dts/marvell}/kirkwood-nas1.dts | 0
 .../dts => files-6.6/arch/arm/boot/dts/marvell}/kirkwood-nsa310b.dts   | 0
 .../dts => files-6.6/arch/arm/boot/dts/marvell}/kirkwood-on100.dts     | 0
 .../dts => files-6.6/arch/arm/boot/dts/marvell}/kirkwood-stora.dts     | 0
 target/linux/kirkwood/image/Makefile                                   | 3 +++
 19 files changed, 3 insertions(+)

diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-e4200-v2.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-e4200-v2.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-e4200-v2.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-e4200-v2.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-ea3500.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-ea3500.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea4500.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-ea4500.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea4500.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-ea4500.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-goflexhome.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-goflexhome.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-goflexhome.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-goflexhome.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ix4-200d.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-ix4-200d.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ix4-200d.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-ix4-200d.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-nas1.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-nas1.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-nas1.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-nas1.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-nsa310b.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-nsa310b.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-nsa310b.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-nsa310b.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-on100.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-on100.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-on100.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-on100.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-stora.dts b/target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-stora.dts
similarity index 100%
copy from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-stora.dts
copy to target/linux/kirkwood/files-6.1/arch/arm/boot/dts/kirkwood-stora.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-e4200-v2.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-e4200-v2.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-e4200-v2.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-e4200-v2.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-ea3500.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea3500.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-ea3500.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea4500.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-ea4500.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ea4500.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-ea4500.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-goflexhome.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-goflexhome.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-goflexhome.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-goflexhome.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ix4-200d.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-ix4-200d.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-ix4-200d.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-ix4-200d.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-nas1.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-nas1.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-nas1.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-nas1.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-nsa310b.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-nsa310b.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-nsa310b.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-nsa310b.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-on100.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-on100.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-on100.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-on100.dts
diff --git a/target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-stora.dts b/target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-stora.dts
similarity index 100%
rename from target/linux/kirkwood/files/arch/arm/boot/dts/kirkwood-stora.dts
rename to target/linux/kirkwood/files-6.6/arch/arm/boot/dts/marvell/kirkwood-stora.dts
diff --git a/target/linux/kirkwood/image/Makefile b/target/linux/kirkwood/image/Makefile
index 8aa2d69720..cc13648890 100644
--- a/target/linux/kirkwood/image/Makefile
+++ b/target/linux/kirkwood/image/Makefile
@@ -112,6 +112,9 @@ endef
 
 define Device/Default
   PROFILES := Default
+ifdef CONFIG_LINUX_6_6
+  DEVICE_DTS_DIR := $(DTS_DIR)/marvell
+endif
   DEVICE_DTS = kirkwood-$(lastword $(subst _, ,$(1)))
   KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
   KERNEL := kernel-bin | append-dtb | uImage none



From lede-commits at lists.infradead.org  Thu Apr  4 09:31:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 12:31:40 -0400
Subject: [openwrt/openwrt]  kirkwood: refresh 6.6 patches
In-Reply-To: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
References: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
Message-ID: <mailman.23746.1712248309.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/70dd237ebd814b31e8a9a0e92c2a23733b65bf1e

commit 70dd237ebd814b31e8a9a0e92c2a23733b65bf1e
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Thu Mar 14 14:37:55 2024 +0100

    kirkwood: refresh 6.6 patches
    
    Removed upstream merged:
    002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
    003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
    004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
    005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch
    
    Manually refreshed:
    100-ib62x0.patch
    101-iconnect.patch
    102-dockstar.patch
    103-iomega-ix2-200.patch
    105-linksys-viper-dts.patch
    106-goflexnet.patch
    107-01-zyxel-nsa3x0-common-nand-partitions.patch
    107-03-nsa325.patch
    109-pogoplug_v4.patch
    110-pogo_e02.patch
    111-l-50.patch
    112-sheevaplug.patch
    113-readynas_duo_v2.patch
    114-ctera-c-200-v1.patch
    115-nsa310s.patch
    116-4i-edge-200.patch
    117-netgear_stora.patch
    203-blackarmor-nas220.patch
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 ...-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch | 301 ---------------------
 ...dts-kirkwood-Add-Endian-4i-Edge-200-board.patch | 249 -----------------
 ...kwood-Add-missing-phy-mode-and-fixed-link.patch | 108 --------
 ...mv88e6xxx-fix-marvell-6350-switch-probing.patch |  89 ------
 target/linux/kirkwood/patches-6.6/100-ib62x0.patch |   4 +-
 .../linux/kirkwood/patches-6.6/101-iconnect.patch  |   4 +-
 .../linux/kirkwood/patches-6.6/102-dockstar.patch  |   4 +-
 .../kirkwood/patches-6.6/103-iomega-ix2-200.patch  |   4 +-
 .../patches-6.6/105-linksys-viper-dts.patch        |   4 +-
 .../linux/kirkwood/patches-6.6/106-goflexnet.patch |   4 +-
 ...07-01-zyxel-nsa3x0-common-nand-partitions.patch |   4 +-
 .../linux/kirkwood/patches-6.6/107-03-nsa325.patch |   4 +-
 .../kirkwood/patches-6.6/109-pogoplug_v4.patch     |   4 +-
 .../linux/kirkwood/patches-6.6/110-pogo_e02.patch  |   4 +-
 target/linux/kirkwood/patches-6.6/111-l-50.patch   |   4 +-
 .../kirkwood/patches-6.6/112-sheevaplug.patch      |   8 +-
 .../kirkwood/patches-6.6/113-readynas_duo_v2.patch |   4 +-
 .../kirkwood/patches-6.6/114-ctera-c-200-v1.patch  |   4 +-
 .../linux/kirkwood/patches-6.6/115-nsa310s.patch   |   4 +-
 .../kirkwood/patches-6.6/116-4i-edge-200.patch     |   4 +-
 .../kirkwood/patches-6.6/117-netgear_stora.patch   |   6 +-
 .../patches-6.6/203-blackarmor-nas220.patch        |   4 +-
 22 files changed, 39 insertions(+), 786 deletions(-)

diff --git a/target/linux/kirkwood/patches-6.6/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch b/target/linux/kirkwood/patches-6.6/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
deleted file mode 100644
index 09e71813cd..0000000000
--- a/target/linux/kirkwood/patches-6.6/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
+++ /dev/null
@@ -1,301 +0,0 @@
-From e977a103840c57d72b52cbc8c17f87f86ef9aa8d Mon Sep 17 00:00:00 2001
-From: Pawel Dembicki <paweldembicki at gmail.com>
-Date: Sat, 29 Oct 2022 22:57:38 +0200
-Subject: [PATCH] ARM: dts: kirkwood: Add Zyxel NSA310S board
-
-Zyxel NSA310S is a NAS based on Marvell kirkwood SoC.
-
-Specification:
- - Processor Marvell 88F6702 1 GHz
- - 256MB RAM
- - 128MB NAND
- - 1x GBE LAN port (PHY: Marvell 88E1318)
- - 2x USB 2.0
- - 1x SATA
- - 3x button
- - 7x leds
- - serial on J1 connector (115200 8N1) (GND-NOPIN-RX-TX-VCC)
-
-Tested-by: Tony Dinh <mibodhi at gmail.com>
-Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
-Acked-by: Adam Baker <linux at baker-net.org.uk>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
----
- arch/arm/boot/dts/Makefile             |   1 +
- arch/arm/boot/dts/kirkwood-nsa310s.dts | 259 +++++++++++++++++++++++++
- 2 files changed, 260 insertions(+)
- create mode 100644 arch/arm/boot/dts/kirkwood-nsa310s.dts
-
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -356,6 +356,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
- 	kirkwood-ns2mini.dtb \
- 	kirkwood-nsa310.dtb \
- 	kirkwood-nsa310a.dtb \
-+	kirkwood-nsa310s.dtb \
- 	kirkwood-nsa320.dtb \
- 	kirkwood-nsa325.dtb \
- 	kirkwood-openblocks_a6.dtb \
---- /dev/null
-+++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts
-@@ -0,0 +1,259 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * ZyXEL NSA310S Board Description
-+ * Copyright 2020-2022 Pawel Dembicki <paweldembicki at gmail.com>
-+ * Copyright (c) 2015-2021, Tony Dinh <mibodhi at gmail.com>
-+ * Copyright (c) 2014, Adam Baker <linux at baker-net.org.uk>
-+ * Based upon the board setup file created by Peter Schildmann
-+ */
-+/dts-v1/;
-+
-+#include "kirkwood.dtsi"
-+#include "kirkwood-6281.dtsi"
-+#include <dt-bindings/leds/common.h>
-+
-+/ {
-+	model = "ZyXEL NSA310S";
-+	compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
-+
-+	memory {
-+		device_type = "memory";
-+		reg = <0x00000000 0x10000000>;
-+	};
-+
-+	chosen {
-+		bootargs = "console=ttyS0,115200n8 earlyprintk";
-+		stdout-path = &uart0;
-+	};
-+
-+	gpio_poweroff {
-+		compatible = "gpio-poweroff";
-+		pinctrl-0 = <&pmx_pwr_off>;
-+		pinctrl-names = "default";
-+		gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
-+	};
-+
-+	keys {
-+		compatible = "gpio-keys";
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		pinctrl-0 = <&pmx_buttons>;
-+		pinctrl-names = "default";
-+
-+		power {
-+			label = "Power Button";
-+			linux,code = <KEY_POWER>;
-+			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		copy {
-+			label = "Copy Button";
-+			linux,code = <KEY_COPY>;
-+			gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
-+		};
-+
-+		reset {
-+			label = "Reset Button";
-+			linux,code = <KEY_RESTART>;
-+			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+		pinctrl-0 = <&pmx_leds>;
-+		pinctrl-names = "default";
-+
-+		led-1 {
-+			function = LED_FUNCTION_DISK_ERR;
-+			color = <LED_COLOR_ID_RED>;
-+			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-2 {
-+			function = LED_FUNCTION_USB;
-+			color = <LED_COLOR_ID_GREEN>;
-+			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
-+			linux,default-trigger = "usb-host";
-+		};
-+
-+		led-3 {
-+			function = LED_FUNCTION_DISK;
-+			color = <LED_COLOR_ID_GREEN>;
-+			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
-+			linux,default-trigger = "ata1";
-+		};
-+
-+		led-4 {
-+			function = LED_FUNCTION_INDICATOR;
-+			color = <LED_COLOR_ID_GREEN>;
-+			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-5 {
-+			function = LED_FUNCTION_INDICATOR;
-+			color = <LED_COLOR_ID_RED>;
-+			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-6 {
-+			function = LED_FUNCTION_STATUS;
-+			color = <LED_COLOR_ID_GREEN>;
-+			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
-+			linux,default-trigger = "default-on";
-+		};
-+
-+		led-7 {
-+			function = LED_FUNCTION_STATUS;
-+			color = <LED_COLOR_ID_RED>;
-+			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
-+		};
-+	};
-+
-+	usb0_power: regulator at 1 {
-+		compatible = "regulator-fixed";
-+		regulator-name = "USB Power";
-+
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		regulator-always-on;
-+		regulator-boot-on;
-+		gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
-+	};
-+
-+	sata1_power: regulator at 2 {
-+		compatible = "regulator-fixed";
-+		regulator-name = "SATA1 Power";
-+
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		regulator-always-on;
-+		regulator-boot-on;
-+		gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
-+	};
-+
-+	thermal-zones {
-+		disk-thermal {
-+			polling-delay = <20000>;
-+			polling-delay-passive = <2000>;
-+
-+			thermal-sensors = <&hdd_temp>;
-+
-+			trips {
-+				disk_alert: disk-alert {
-+					temperature = <40000>;
-+					hysteresis = <5000>;
-+					type = "active";
-+				};
-+				disk_crit: disk-crit {
-+					temperature = <60000>;
-+					hysteresis = <2000>;
-+					type = "critical";
-+				};
-+			};
-+		};
-+	};
-+};
-+
-+
-+&eth0 {
-+	status = "okay";
-+
-+	ethernet0-port at 0 {
-+		phy-handle = <&ethphy0>;
-+	};
-+};
-+
-+&i2c0 {
-+	status = "okay";
-+
-+	rtc at 68 {
-+		compatible = "htk,ht1382";
-+		reg = <0x68>;
-+	};
-+};
-+
-+&mdio {
-+	status = "okay";
-+
-+	ethphy0: ethernet-phy at 1 {
-+		reg = <1>;
-+		phy-mode = "rgmii-id";
-+		marvell,reg-init = <0x1 0x16 0x0 0x3>,
-+				   <0x1 0x10 0x0 0x1017>,
-+				   <0x1 0x11 0x0 0x4408>,
-+				   <0x1 0x16 0x0 0x0>;
-+	};
-+};
-+
-+&nand {
-+	status = "okay";
-+	chip-delay = <35>;
-+
-+	partition at 0 {
-+		label = "uboot";
-+		reg = <0x0000000 0x00c0000>;
-+		read-only;
-+	};
-+	partition at c0000 {
-+		label = "uboot_env";
-+		reg = <0x00c0000 0x0080000>;
-+	};
-+	partition at 140000 {
-+		label = "ubi";
-+		reg = <0x0140000 0x7ec0000>;
-+	};
-+};
-+
-+&pciec {
-+	status = "okay";
-+};
-+
-+&pcie0 {
-+	status = "okay";
-+};
-+
-+&pinctrl {
-+	pinctrl-names = "default";
-+
-+	pmx_buttons: pmx-buttons {
-+		marvell,pins = "mpp24", "mpp25", "mpp26";
-+		marvell,function = "gpio";
-+	};
-+
-+	pmx_leds: pmx-leds {
-+		marvell,pins = "mpp13", "mpp15", "mpp16", "mpp22", "mpp23",
-+						"mpp28", "mpp29";
-+		marvell,function = "gpio";
-+	};
-+
-+	pmx_power: pmx-power {
-+		marvell,pins = "mpp21", "mpp33";
-+		marvell,function = "gpio";
-+	};
-+
-+	pmx_pwr_off: pmx-pwr-off {
-+		marvell,pins = "mpp27";
-+		marvell,function = "gpio";
-+	};
-+};
-+
-+&rtc {
-+	status = "disabled";
-+};
-+
-+&sata {
-+	status = "okay";
-+	nr-ports = <1>;
-+	#address-cells = <1>;
-+	#size-cells = <0>;
-+
-+	hdd_temp: sata-port at 0 {
-+		reg = <0>;
-+		#thermal-sensor-cells = <0>;
-+	};
-+};
-+
-+&uart0 {
-+	status = "okay";
-+};
diff --git a/target/linux/kirkwood/patches-6.6/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch b/target/linux/kirkwood/patches-6.6/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
deleted file mode 100644
index cde281526b..0000000000
--- a/target/linux/kirkwood/patches-6.6/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
+++ /dev/null
@@ -1,249 +0,0 @@
-From 5668d088ee4ea05db9daaae0645d1d1f579b20f9 Mon Sep 17 00:00:00 2001
-From: Pawel Dembicki <paweldembicki at gmail.com>
-Date: Mon, 3 Oct 2022 09:34:43 +0200
-Subject: ARM: dts: kirkwood: Add Endian 4i Edge 200 board
-
-Add Endian 4i Edge 200 is 5-port firewall.
-It have also clone: Endian UTM Mini (The same hardware, with added WLAN
-card).
-
-Hardware:
-  - SoC: Marvell 88F6281-A1 ARMv5TE Processor 1.2GHz
-  - Ram: 512MB (4x Nanya NT5TU128M8GE-AC)
-  - NAND Flash: 512MB (Micron 29F4G08AAC)
-  - Lan 1-4: 4x GBE (Marvell 88E6171R-TFJ2)
-  - Lan 5: 1x GBE (Marvell 88E1116R-NNC1)
-  - Storage: MicroSD Slot
-  - MCPIE: MiniPCIe Slot present [fitted with SparkLan WPEA-110N/E
-          (Atheros AR9280 chipset) in Endian UTM Mini WLAN only]
-  - USB: 1x USB 2.0 port
-  - Console: RJ-45 port
-  - LEDs: 3x GPIO controlled
-
-Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
----
- arch/arm/boot/dts/Makefile                 |   1 +
- arch/arm/boot/dts/kirkwood-4i-edge-200.dts | 205 +++++++++++++++++++++++++++++
- 2 files changed, 206 insertions(+)
- create mode 100644 arch/arm/boot/dts/kirkwood-4i-edge-200.dts
-
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -300,6 +300,7 @@ dtb-$(CONFIG_ARCH_KEYSTONE) += \
- 	keystone-k2g-evm.dtb \
- 	keystone-k2g-ice.dtb
- dtb-$(CONFIG_MACH_KIRKWOOD) += \
-+	kirkwood-4i-edge-200.dtb \
- 	kirkwood-b3.dtb \
- 	kirkwood-blackarmor-nas220.dtb \
- 	kirkwood-c200-v1.dtb \
---- /dev/null
-+++ b/arch/arm/boot/dts/kirkwood-4i-edge-200.dts
-@@ -0,0 +1,205 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Endian 4i Edge 200 Board Description
-+ * Note: Endian UTM Mini is hardware clone of Endian Edge 200
-+ * Copyright 2021-2022 Pawel Dembicki <paweldembicki at gmail.com>
-+ */
-+
-+/dts-v1/;
-+
-+#include "kirkwood.dtsi"
-+#include "kirkwood-6281.dtsi"
-+#include <dt-bindings/leds/common.h>
-+
-+/ {
-+	model = "Endian 4i Edge 200";
-+	compatible = "endian,4i-edge-200", "marvell,kirkwood-88f6281", "marvell,kirkwood";
-+
-+	memory {
-+		device_type = "memory";
-+		reg = <0x00000000 0x20000000>;
-+	};
-+
-+	chosen {
-+		bootargs = "console=ttyS0,115200n8";
-+		stdout-path = &uart0;
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+		pinctrl-0 = <&pmx_led>;
-+		pinctrl-names = "default";
-+
-+		led-1 {
-+			function = LED_FUNCTION_SD;
-+			color = <LED_COLOR_ID_AMBER>;
-+			gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
-+			linux,default-trigger = "mmc0";
-+		};
-+
-+		led-2 {
-+			function = LED_FUNCTION_STATUS;
-+			color = <LED_COLOR_ID_AMBER>;
-+			gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
-+		};
-+
-+		led-3 {
-+			function = LED_FUNCTION_STATUS;
-+			color = <LED_COLOR_ID_GREEN>;
-+			gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
-+		};
-+	};
-+};
-+
-+&eth0 {
-+	status = "okay";
-+};
-+
-+&eth0port {
-+	speed = <1000>;
-+	duplex = <1>;
-+};
-+
-+&eth1 {
-+	status = "okay";
-+};
-+
-+&eth1port {
-+	phy-handle = <&ethphyb>;
-+};
-+
-+&mdio {
-+	status = "okay";
-+
-+	ethphyb: ethernet-phy at b {
-+		reg = <0x0b>;
-+
-+		marvell,reg-init =
-+			/* link-activity, bi-color mode 4 */
-+			<3 0x10 0xfff0 0xf>; /* Reg 3,16 <- 0xzzzf */
-+	};
-+
-+	switch0: switch at 11 {
-+		compatible = "marvell,mv88e6085";
-+		reg = <0x11>;
-+
-+		ports {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+
-+			port at 0 {
-+				reg = <0>;
-+				label = "port1";
-+			};
-+
-+			port at 1 {
-+				reg = <1>;
-+				label = "port2";
-+			};
-+
-+			port at 2 {
-+				reg = <2>;
-+				label = "port3";
-+			};
-+
-+			port at 3 {
-+				reg = <3>;
-+				label = "port4";
-+			};
-+
-+			port at 5 {
-+				reg = <5>;
-+				phy-mode = "rgmii-id";
-+				ethernet = <&eth0port>;
-+
-+				fixed-link {
-+					speed = <1000>;
-+					full-duplex;
-+				};
-+			};
-+		};
-+	};
-+};
-+
-+&nand {
-+	status = "okay";
-+	pinctrl-0 = <&pmx_nand>;
-+	pinctrl-names = "default";
-+
-+	partition at 0 {
-+		label = "u-boot";
-+		reg = <0x00000000 0x000a0000>;
-+		read-only;
-+	};
-+
-+	partition at a0000 {
-+		label = "u-boot-env";
-+		reg = <0x000a0000 0x00060000>;
-+		read-only;
-+	};
-+
-+	partition at 100000 {
-+		label = "kernel";
-+		reg = <0x00100000 0x00400000>;
-+	};
-+
-+	partition at 500000 {
-+		label = "ubi";
-+		reg = <0x00500000 0x1fb00000>;
-+	};
-+};
-+
-+&pciec {
-+	status = "okay";
-+};
-+
-+&pcie0 {
-+	status = "okay";
-+};
-+
-+&pinctrl {
-+	pinctrl-0 = <&pmx_sysrst>;
-+	pinctrl-names = "default";
-+
-+	pmx_sysrst: pmx-sysrst {
-+		marvell,pins = "mpp6";
-+		marvell,function = "sysrst";
-+	};
-+
-+	pmx_sdio_cd: pmx-sdio-cd {
-+		marvell,pins = "mpp28";
-+		marvell,function = "gpio";
-+	};
-+
-+	pmx_led: pmx-led {
-+		marvell,pins = "mpp34", "mpp35", "mpp49";
-+		marvell,function = "gpio";
-+	};
-+};
-+
-+&rtc {
-+	status = "okay";
-+};
-+
-+&sata_phy0 {
-+	status = "disabled";
-+};
-+
-+&sata_phy1 {
-+	status = "disabled";
-+};
-+
-+&sdio {
-+	pinctrl-0 = <&pmx_sdio_cd>;
-+	pinctrl-names = "default";
-+	status = "okay";
-+	cd-gpios = <&gpio0 28 9>;
-+};
-+
-+&uart0 {
-+	status = "okay";
-+};
-+
-+&usb0 {
-+	status = "okay";
-+};
diff --git a/target/linux/kirkwood/patches-6.6/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch b/target/linux/kirkwood/patches-6.6/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
deleted file mode 100644
index fd7adc3584..0000000000
--- a/target/linux/kirkwood/patches-6.6/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
+++ /dev/null
@@ -1,108 +0,0 @@
-From 8aea8659a5f3ae8dc63c9f632ce1f676a1483556 Mon Sep 17 00:00:00 2001
-From: Andrew Lunn <andrew at lunn.ch>
-Date: Fri, 7 Apr 2023 17:17:20 +0200
-Subject: [PATCH] ARM: dts: kirkwood: Add missing phy-mode and fixed links
-
-The DSA framework has got more picky about always having a phy-mode
-for the CPU port. The Kirkwood Ethernet is an RGMII port. Set the
-switch to impose the RGMII delays.
-
-Additionally, the cpu label has never actually been used in the
-binding, so remove it.
-
-Signed-off-by: Andrew Lunn <andrew at lunn.ch>
-Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
----
- arch/arm/boot/dts/kirkwood-dir665.dts          | 3 ++-
- arch/arm/boot/dts/kirkwood-l-50.dts            | 2 +-
- arch/arm/boot/dts/kirkwood-linksys-viper.dts   | 3 ++-
- arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 3 ++-
- arch/arm/boot/dts/kirkwood-rd88f6281.dtsi      | 2 +-
- 5 files changed, 8 insertions(+), 5 deletions(-)
-
---- a/arch/arm/boot/dts/kirkwood-dir665.dts
-+++ b/arch/arm/boot/dts/kirkwood-dir665.dts
-@@ -232,7 +232,7 @@
- 
- 			port at 6 {
- 				reg = <6>;
--				label = "cpu";
-+				phy-mode = "rgmii-id";
- 				ethernet = <&eth0port>;
- 				fixed-link {
- 					speed = <1000>;
-@@ -251,6 +251,7 @@
- 	ethernet0-port at 0 {
- 		speed = <1000>;
- 		duplex = <1>;
-+		phy-mode = "rgmii";
- 	};
- };
- 
---- a/arch/arm/boot/dts/kirkwood-l-50.dts
-+++ b/arch/arm/boot/dts/kirkwood-l-50.dts
-@@ -254,7 +254,6 @@
- 
- 			port at 6 {
- 				reg = <6>;
--				label = "cpu";
- 				phy-mode = "rgmii-id";
- 				ethernet = <&eth1port>;
- 				fixed-link {
-@@ -330,6 +329,7 @@
- 	ethernet1-port at 0 {
- 		speed = <1000>;
- 		duplex = <1>;
-+		phy-mode = "rgmii";
- 	};
- };
- 
---- a/arch/arm/boot/dts/kirkwood-linksys-viper.dts
-+++ b/arch/arm/boot/dts/kirkwood-linksys-viper.dts
-@@ -198,7 +198,7 @@
- 
- 			port at 5 {
- 				reg = <5>;
--				label = "cpu";
-+				phy-mode = "rgmii-id";
- 				ethernet = <&eth0port>;
- 				fixed-link {
- 					speed = <1000>;
-@@ -221,6 +221,7 @@
- 	ethernet0-port at 0 {
- 		speed = <1000>;
- 		duplex = <1>;
-+		phy-mode = "rgmii";
- 	};
- };
- 
---- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
-+++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
-@@ -149,7 +149,7 @@
- 
- 			port at 5 {
- 				reg = <5>;
--				label = "cpu";
-+				phy-mode = "rgmii-id";
- 				ethernet = <&eth0port>;
- 				fixed-link {
- 					speed = <1000>;
-@@ -166,6 +166,7 @@
- 	ethernet0-port at 0 {
- 		speed = <1000>;
- 		duplex = <1>;
-+		phy-mode = "rgmii";
- 	};
- };
- 
---- a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
-+++ b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
-@@ -105,7 +105,7 @@
- 
- 			port at 5 {
- 				reg = <5>;
--				label = "cpu";
-+				phy-mode = "rgmii-id";
- 				ethernet = <&eth0port>;
- 				fixed-link {
- 					speed = <1000>;
diff --git a/target/linux/kirkwood/patches-6.6/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch b/target/linux/kirkwood/patches-6.6/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch
deleted file mode 100644
index cd838394d9..0000000000
--- a/target/linux/kirkwood/patches-6.6/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From b3f1a164c7f742503dc7159011f7ad6b092b660e Mon Sep 17 00:00:00 2001
-From: Greg Ungerer <gerg at kernel.org>
-Date: Fri, 24 Nov 2023 14:15:28 +1000
-Subject: [PATCH] net: dsa: mv88e6xxx: fix marvell 6350 switch probing
-
-As of commit de5c9bf40c45 ("net: phylink: require supported_interfaces to
-be filled") Marvell 88e6350 switches fail to be probed:
-
-    ...
-    mv88e6085 d0072004.mdio-mii:11: switch 0x3710 detected: Marvell 88E6350, revision 2
-    mv88e6085 d0072004.mdio-mii:11: phylink: error: empty supported_interfaces
-    error creating PHYLINK: -22
-    mv88e6085: probe of d0072004.mdio-mii:11 failed with error -22
-    ...
-
-The problem stems from the use of mv88e6185_phylink_get_caps() to get
-the device capabilities. Create a new dedicated phylink_get_caps for the
-6351 family (which the 6350 is one of) to properly support their set of
-capabilities.
-
-According to chip.h the 6351 switch family includes the 6171, 6175, 6350
-and 6351 switches, so update each of these to use the correct
-phylink_get_caps.
-
-Fixes: de5c9bf40c45 ("net: phylink: require supported_interfaces to be filled")
-Signed-off-by: Greg Ungerer <gerg at kernel.org>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/dsa/mv88e6xxx/chip.c | 20 ++++++++++++++++----
- 1 file changed, 16 insertions(+), 4 deletions(-)
-
---- a/drivers/net/dsa/mv88e6xxx/chip.c
-+++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -652,6 +652,18 @@ static void mv88e6250_phylink_get_caps(s
- 	config->mac_capabilities = MAC_SYM_PAUSE | MAC_10 | MAC_100;
- }
- 
-+static void mv88e6351_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,
-+				       struct phylink_config *config)
-+{
-+	unsigned long *supported = config->supported_interfaces;
-+
-+	/* Translate the default cmode */
-+	mv88e6xxx_translate_cmode(chip->ports[port].cmode, supported);
-+
-+	config->mac_capabilities = MAC_SYM_PAUSE | MAC_10 | MAC_100 |
-+				   MAC_1000FD;
-+}
-+
- static int mv88e6352_get_port4_serdes_cmode(struct mv88e6xxx_chip *chip)
- {
- 	u16 reg, val;
-@@ -4498,7 +4510,7 @@ static const struct mv88e6xxx_ops mv88e6
- 	.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge,
- 	.stu_getnext = mv88e6352_g1_stu_getnext,
- 	.stu_loadpurge = mv88e6352_g1_stu_loadpurge,
--	.phylink_get_caps = mv88e6185_phylink_get_caps,
-+	.phylink_get_caps = mv88e6351_phylink_get_caps,
- };
- 
- static const struct mv88e6xxx_ops mv88e6172_ops = {
-@@ -4599,7 +4611,7 @@ static const struct mv88e6xxx_ops mv88e6
- 	.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge,
- 	.stu_getnext = mv88e6352_g1_stu_getnext,
- 	.stu_loadpurge = mv88e6352_g1_stu_loadpurge,
--	.phylink_get_caps = mv88e6185_phylink_get_caps,
-+	.phylink_get_caps = mv88e6351_phylink_get_caps,
- };
- 
- static const struct mv88e6xxx_ops mv88e6176_ops = {
-@@ -5256,7 +5268,7 @@ static const struct mv88e6xxx_ops mv88e6
- 	.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge,
- 	.stu_getnext = mv88e6352_g1_stu_getnext,
- 	.stu_loadpurge = mv88e6352_g1_stu_loadpurge,
--	.phylink_get_caps = mv88e6185_phylink_get_caps,
-+	.phylink_get_caps = mv88e6351_phylink_get_caps,
- };
- 
- static const struct mv88e6xxx_ops mv88e6351_ops = {
-@@ -5302,7 +5314,7 @@ static const struct mv88e6xxx_ops mv88e6
- 	.stu_loadpurge = mv88e6352_g1_stu_loadpurge,
- 	.avb_ops = &mv88e6352_avb_ops,
- 	.ptp_ops = &mv88e6352_ptp_ops,
--	.phylink_get_caps = mv88e6185_phylink_get_caps,
-+	.phylink_get_caps = mv88e6351_phylink_get_caps,
- };
- 
- static const struct mv88e6xxx_ops mv88e6352_ops = {
diff --git a/target/linux/kirkwood/patches-6.6/100-ib62x0.patch b/target/linux/kirkwood/patches-6.6/100-ib62x0.patch
index 0637c24b63..1ee05f837f 100644
--- a/target/linux/kirkwood/patches-6.6/100-ib62x0.patch
+++ b/target/linux/kirkwood/patches-6.6/100-ib62x0.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
-+++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-ib62x0.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-ib62x0.dts
 @@ -6,7 +6,14 @@
  
  / {
diff --git a/target/linux/kirkwood/patches-6.6/101-iconnect.patch b/target/linux/kirkwood/patches-6.6/101-iconnect.patch
index 935e2dfcf5..cd1813d0a6 100644
--- a/target/linux/kirkwood/patches-6.6/101-iconnect.patch
+++ b/target/linux/kirkwood/patches-6.6/101-iconnect.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-iconnect.dts
-+++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-iconnect.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-iconnect.dts
 @@ -8,6 +8,13 @@
  	model = "Iomega Iconnect";
  	compatible = "iom,iconnect-1.1", "iom,iconnect", "marvell,kirkwood-88f6281", "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/102-dockstar.patch b/target/linux/kirkwood/patches-6.6/102-dockstar.patch
index 127f84962c..e97f15cab4 100644
--- a/target/linux/kirkwood/patches-6.6/102-dockstar.patch
+++ b/target/linux/kirkwood/patches-6.6/102-dockstar.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-dockstar.dts
-+++ b/arch/arm/boot/dts/kirkwood-dockstar.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-dockstar.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-dockstar.dts
 @@ -8,6 +8,13 @@
  	model = "Seagate FreeAgent Dockstar";
  	compatible = "seagate,dockstar", "marvell,kirkwood-88f6281", "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/103-iomega-ix2-200.patch b/target/linux/kirkwood/patches-6.6/103-iomega-ix2-200.patch
index db04c09f76..0251a10600 100644
--- a/target/linux/kirkwood/patches-6.6/103-iomega-ix2-200.patch
+++ b/target/linux/kirkwood/patches-6.6/103-iomega-ix2-200.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
-+++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-iomega_ix2_200.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-iomega_ix2_200.dts
 @@ -8,6 +8,13 @@
  	model = "Iomega StorCenter ix2-200";
  	compatible = "iom,ix2-200", "marvell,kirkwood-88f6281", "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/105-linksys-viper-dts.patch b/target/linux/kirkwood/patches-6.6/105-linksys-viper-dts.patch
index b1604ec92c..6eb83003a2 100644
--- a/target/linux/kirkwood/patches-6.6/105-linksys-viper-dts.patch
+++ b/target/linux/kirkwood/patches-6.6/105-linksys-viper-dts.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-linksys-viper.dts
-+++ b/arch/arm/boot/dts/kirkwood-linksys-viper.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-linksys-viper.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-linksys-viper.dts
 @@ -24,6 +24,10 @@
  	};
  
diff --git a/target/linux/kirkwood/patches-6.6/106-goflexnet.patch b/target/linux/kirkwood/patches-6.6/106-goflexnet.patch
index 82cf90841e..b664009b85 100644
--- a/target/linux/kirkwood/patches-6.6/106-goflexnet.patch
+++ b/target/linux/kirkwood/patches-6.6/106-goflexnet.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
-+++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-goflexnet.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-goflexnet.dts
 @@ -8,6 +8,13 @@
  	model = "Seagate GoFlex Net";
  	compatible = "seagate,goflexnet", "marvell,kirkwood-88f6281", "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/107-01-zyxel-nsa3x0-common-nand-partitions.patch b/target/linux/kirkwood/patches-6.6/107-01-zyxel-nsa3x0-common-nand-partitions.patch
index df654033fd..a73d82b892 100644
--- a/target/linux/kirkwood/patches-6.6/107-01-zyxel-nsa3x0-common-nand-partitions.patch
+++ b/target/linux/kirkwood/patches-6.6/107-01-zyxel-nsa3x0-common-nand-partitions.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi
-+++ b/arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi
+--- a/arch/arm/boot/dts/marvell/kirkwood-nsa3x0-common.dtsi
++++ b/arch/arm/boot/dts/marvell/kirkwood-nsa3x0-common.dtsi
 @@ -112,40 +112,16 @@
  
  	partition at 0 {
diff --git a/target/linux/kirkwood/patches-6.6/107-03-nsa325.patch b/target/linux/kirkwood/patches-6.6/107-03-nsa325.patch
index 374c0895a9..b3f19924db 100644
--- a/target/linux/kirkwood/patches-6.6/107-03-nsa325.patch
+++ b/target/linux/kirkwood/patches-6.6/107-03-nsa325.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-nsa325.dts
-+++ b/arch/arm/boot/dts/kirkwood-nsa325.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-nsa325.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-nsa325.dts
 @@ -15,6 +15,13 @@
  	model = "ZyXEL NSA325";
  	compatible = "zyxel,nsa325", "marvell,kirkwood-88f6282", "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/109-pogoplug_v4.patch b/target/linux/kirkwood/patches-6.6/109-pogoplug_v4.patch
index 4273eb9af1..ed7e4e4ff0 100644
--- a/target/linux/kirkwood/patches-6.6/109-pogoplug_v4.patch
+++ b/target/linux/kirkwood/patches-6.6/109-pogoplug_v4.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts
-+++ b/arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-pogoplug-series-4.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-pogoplug-series-4.dts
 @@ -18,12 +18,20 @@
  	compatible = "cloudengines,pogoplugv4", "marvell,kirkwood-88f6192",
  		     "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/110-pogo_e02.patch b/target/linux/kirkwood/patches-6.6/110-pogo_e02.patch
index fc384d3521..21b929dda7 100644
--- a/target/linux/kirkwood/patches-6.6/110-pogo_e02.patch
+++ b/target/linux/kirkwood/patches-6.6/110-pogo_e02.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-pogo_e02.dts
-+++ b/arch/arm/boot/dts/kirkwood-pogo_e02.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-pogo_e02.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-pogo_e02.dts
 @@ -20,6 +20,13 @@
  	compatible = "cloudengines,pogoe02", "marvell,kirkwood-88f6281",
  		     "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/111-l-50.patch b/target/linux/kirkwood/patches-6.6/111-l-50.patch
index bc933cb610..08897d4fae 100644
--- a/target/linux/kirkwood/patches-6.6/111-l-50.patch
+++ b/target/linux/kirkwood/patches-6.6/111-l-50.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-l-50.dts
-+++ b/arch/arm/boot/dts/kirkwood-l-50.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-l-50.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-l-50.dts
 @@ -18,6 +18,13 @@
  		reg = <0x00000000 0x20000000>;
  	};
diff --git a/target/linux/kirkwood/patches-6.6/112-sheevaplug.patch b/target/linux/kirkwood/patches-6.6/112-sheevaplug.patch
index d1ff9884a0..e8e83bdbba 100644
--- a/target/linux/kirkwood/patches-6.6/112-sheevaplug.patch
+++ b/target/linux/kirkwood/patches-6.6/112-sheevaplug.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
-+++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
+--- a/arch/arm/boot/dts/marvell/kirkwood-sheevaplug-common.dtsi
++++ b/arch/arm/boot/dts/marvell/kirkwood-sheevaplug-common.dtsi
 @@ -78,13 +78,8 @@
  	};
  
@@ -16,8 +16,8 @@
  	};
  };
  
---- a/arch/arm/boot/dts/kirkwood-sheevaplug.dts
-+++ b/arch/arm/boot/dts/kirkwood-sheevaplug.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-sheevaplug.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-sheevaplug.dts
 @@ -13,6 +13,13 @@
  	model = "Globalscale Technologies SheevaPlug";
  	compatible = "globalscale,sheevaplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/113-readynas_duo_v2.patch b/target/linux/kirkwood/patches-6.6/113-readynas_duo_v2.patch
index c6452c55a3..9cb2ad102c 100644
--- a/target/linux/kirkwood/patches-6.6/113-readynas_duo_v2.patch
+++ b/target/linux/kirkwood/patches-6.6/113-readynas_duo_v2.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
-+++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-netgear_readynas_duo_v2.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-netgear_readynas_duo_v2.dts
 @@ -19,6 +19,13 @@
  		reg = <0x00000000 0x10000000>;
  	};
diff --git a/target/linux/kirkwood/patches-6.6/114-ctera-c-200-v1.patch b/target/linux/kirkwood/patches-6.6/114-ctera-c-200-v1.patch
index eb62e1a5ed..7e93089616 100644
--- a/target/linux/kirkwood/patches-6.6/114-ctera-c-200-v1.patch
+++ b/target/linux/kirkwood/patches-6.6/114-ctera-c-200-v1.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-c200-v1.dts
-+++ b/arch/arm/boot/dts/kirkwood-c200-v1.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-c200-v1.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-c200-v1.dts
 @@ -14,6 +14,14 @@
  	model = "Ctera C200 V1";
  	compatible = "ctera,c200-v1", "marvell,kirkwood-88f6281", "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/115-nsa310s.patch b/target/linux/kirkwood/patches-6.6/115-nsa310s.patch
index 4c6e08f49c..2f43dd960c 100644
--- a/target/linux/kirkwood/patches-6.6/115-nsa310s.patch
+++ b/target/linux/kirkwood/patches-6.6/115-nsa310s.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-nsa310s.dts
-+++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-nsa310s.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-nsa310s.dts
 @@ -16,6 +16,13 @@
  	model = "ZyXEL NSA310S";
  	compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
diff --git a/target/linux/kirkwood/patches-6.6/116-4i-edge-200.patch b/target/linux/kirkwood/patches-6.6/116-4i-edge-200.patch
index ffc46c29dc..62a3074097 100644
--- a/target/linux/kirkwood/patches-6.6/116-4i-edge-200.patch
+++ b/target/linux/kirkwood/patches-6.6/116-4i-edge-200.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-4i-edge-200.dts
-+++ b/arch/arm/boot/dts/kirkwood-4i-edge-200.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-4i-edge-200.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-4i-edge-200.dts
 @@ -20,6 +20,13 @@
  		reg = <0x00000000 0x20000000>;
  	};
diff --git a/target/linux/kirkwood/patches-6.6/117-netgear_stora.patch b/target/linux/kirkwood/patches-6.6/117-netgear_stora.patch
index c7518933b2..db0bdb4228 100644
--- a/target/linux/kirkwood/patches-6.6/117-netgear_stora.patch
+++ b/target/linux/kirkwood/patches-6.6/117-netgear_stora.patch
@@ -1,6 +1,6 @@
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -375,6 +375,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
+--- a/arch/arm/boot/dts/marvell/Makefile
++++ b/arch/arm/boot/dts/marvell/Makefile
+@@ -157,6 +157,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
  	kirkwood-rs411.dtb \
  	kirkwood-sheevaplug.dtb \
  	kirkwood-sheevaplug-esata.dtb \
diff --git a/target/linux/kirkwood/patches-6.6/203-blackarmor-nas220.patch b/target/linux/kirkwood/patches-6.6/203-blackarmor-nas220.patch
index e04a28206a..8ceac179cb 100644
--- a/target/linux/kirkwood/patches-6.6/203-blackarmor-nas220.patch
+++ b/target/linux/kirkwood/patches-6.6/203-blackarmor-nas220.patch
@@ -1,5 +1,5 @@
---- a/arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
-+++ b/arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
+--- a/arch/arm/boot/dts/marvell/kirkwood-blackarmor-nas220.dts
++++ b/arch/arm/boot/dts/marvell/kirkwood-blackarmor-nas220.dts
 @@ -17,6 +17,13 @@
  	compatible = "seagate,blackarmor-nas220","marvell,kirkwood-88f6192",
  		     "marvell,kirkwood";



From lede-commits at lists.infradead.org  Thu Apr  4 09:31:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 12:31:39 -0400
Subject: [openwrt/openwrt]  kernel/kirkwood: Restore kernel files for v6.1
In-Reply-To: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
References: <171224829802.1448065.2726232819431499240@git-01.infra.openwrt.org>
Message-ID: <mailman.23749.1712248311.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/398fa87ef040c31397d32e514c9bc7f57579a099

commit 398fa87ef040c31397d32e514c9bc7f57579a099
Author: Pawel Dembicki <paweldembicki at gmail.com>
AuthorDate: Thu Mar 14 14:17:24 2024 +0100

    kernel/kirkwood: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
---
 target/linux/kirkwood/config-6.1                   | 309 +++++++++++++++++++++
 ...-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch | 301 ++++++++++++++++++++
 ...dts-kirkwood-Add-Endian-4i-Edge-200-board.patch | 249 +++++++++++++++++
 ...kwood-Add-missing-phy-mode-and-fixed-link.patch | 108 +++++++
 ...mv88e6xxx-fix-marvell-6350-switch-probing.patch |  89 ++++++
 target/linux/kirkwood/patches-6.1/100-ib62x0.patch |  53 ++++
 .../linux/kirkwood/patches-6.1/101-iconnect.patch  |  80 ++++++
 .../linux/kirkwood/patches-6.1/102-dockstar.patch  |  62 +++++
 .../kirkwood/patches-6.1/103-iomega-ix2-200.patch  |  71 +++++
 .../patches-6.1/105-linksys-viper-dts.patch        |  59 ++++
 .../linux/kirkwood/patches-6.1/106-goflexnet.patch |  53 ++++
 ...07-01-zyxel-nsa3x0-common-nand-partitions.patch |  48 ++++
 .../linux/kirkwood/patches-6.1/107-03-nsa325.patch |  54 ++++
 .../kirkwood/patches-6.1/109-pogoplug_v4.patch     |  87 ++++++
 .../linux/kirkwood/patches-6.1/110-pogo_e02.patch  |  68 +++++
 target/linux/kirkwood/patches-6.1/111-l-50.patch   |  47 ++++
 .../kirkwood/patches-6.1/112-sheevaplug.patch      |  47 ++++
 .../kirkwood/patches-6.1/113-readynas_duo_v2.patch |  76 +++++
 .../kirkwood/patches-6.1/114-ctera-c-200-v1.patch  |  58 ++++
 .../linux/kirkwood/patches-6.1/115-nsa310s.patch   |  35 +++
 .../kirkwood/patches-6.1/116-4i-edge-200.patch     |  34 +++
 .../kirkwood/patches-6.1/117-netgear_stora.patch   |  10 +
 ...01-enable-sata-port-specific-led-triggers.patch |  10 +
 .../patches-6.1/202-linksys-find-active-root.patch |  62 +++++
 .../patches-6.1/203-blackarmor-nas220.patch        |  99 +++++++
 25 files changed, 2169 insertions(+)

diff --git a/target/linux/kirkwood/config-6.1 b/target/linux/kirkwood/config-6.1
new file mode 100644
index 0000000000..6d21143e96
--- /dev/null
+++ b/target/linux/kirkwood/config-6.1
@@ -0,0 +1,309 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_CPU_AUTO=y
+# CONFIG_ARCH_MULTI_V4 is not set
+# CONFIG_ARCH_MULTI_V4T is not set
+CONFIG_ARCH_MULTI_V4_V5=y
+CONFIG_ARCH_MULTI_V5=y
+CONFIG_ARCH_MVEBU=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+# CONFIG_ARMADA_37XX_WATCHDOG is not set
+# CONFIG_ARMADA_THERMAL is not set
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
+# CONFIG_ARM_KIRKWOOD_CPUIDLE is not set
+CONFIG_ARM_L1_CACHE_SHIFT=5
+# CONFIG_ARM_MVEBU_V7_CPUIDLE is not set
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_THUMB is not set
+CONFIG_ARM_UNWIND=y
+CONFIG_ATA=y
+CONFIG_ATAGS=y
+CONFIG_ATA_LEDS=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CACHE_FEROCEON_L2=y
+# CONFIG_CACHE_FEROCEON_L2_WRITETHROUGH is not set
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5T=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_FEROCEON=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FEROCEON=y
+# CONFIG_CPU_FEROCEON_OLD_ID is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_THERMAL=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_FEROCEON=y
+CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_DEV_MARVELL=y
+CONFIG_CRYPTO_DEV_MARVELL_CESA=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_DES=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_INCLUDE="debug/8250.S"
+CONFIG_DEBUG_MVEBU_UART0_ALTERNATE=y
+# CONFIG_DEBUG_MVEBU_UART1_ALTERNATE is not set
+CONFIG_DEBUG_UART_8250=y
+CONFIG_DEBUG_UART_8250_SHIFT=2
+CONFIG_DEBUG_UART_PHYS=0xf1012000
+CONFIG_DEBUG_UART_VIRT=0xfed12000
+CONFIG_DMA_OPS=y
+CONFIG_DNOTIFY=y
+CONFIG_DTC=y
+# CONFIG_EARLY_PRINTK is not set
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FORCE_PCI=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_MVEBU=y
+CONFIG_GRO_CELLS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HWMON=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_OMAP=y
+CONFIG_HZ_FIXED=0
+CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_MV64XXX=y
+# CONFIG_I2C_PXA is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_KIRKWOOD_CLK=y
+CONFIG_KIRKWOOD_THERMAL=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_NETXBIG=y
+CONFIG_LEDS_NS2=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACH_KIRKWOOD=y
+CONFIG_MACH_MVEBU_ANY=y
+CONFIG_MANGLE_BOOTARGS=y
+CONFIG_MARVELL_PHY=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MIGRATION=y
+CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MTD_CFI is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+# CONFIG_MTD_NAND_MARVELL is not set
+CONFIG_MTD_NAND_ORION=y
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_FIRMWARE=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MV643XX_ETH=y
+CONFIG_MVEBU_CLK_COMMON=y
+CONFIG_MVEBU_MBUS=y
+CONFIG_MVMDIO=y
+# CONFIG_MVNETA is not set
+# CONFIG_MVPP2 is not set
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_KUSER_HELPERS=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MV88E6XXX=y
+CONFIG_NET_DSA_TAG_DSA=y
+CONFIG_NET_DSA_TAG_DSA_COMMON=y
+CONFIG_NET_DSA_TAG_EDSA=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NLS=y
+CONFIG_NVMEM=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_ORION_IRQCHIP=y
+CONFIG_ORION_TIMER=y
+CONFIG_ORION_WATCHDOG=y
+CONFIG_OUTER_CACHE=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PCI=y
+CONFIG_PCI_BRIDGE_EMUL=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_MVEBU=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+# CONFIG_PHY_MVEBU_A3700_UTMI is not set
+# CONFIG_PHY_MVEBU_A38X_COMPHY is not set
+CONFIG_PHY_MVEBU_SATA=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_KIRKWOOD=y
+CONFIG_PINCTRL_MVEBU=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PINCTRL_SX150X=y
+CONFIG_PLAT_ORION=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO=y
+CONFIG_POWER_RESET_LINKSTATION=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_MV=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+# CONFIG_SERIAL_MVEBU_UART is not set
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SG_POOL=y
+CONFIG_SOC_BUS=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+# CONFIG_SPI_ARMADA_3700 is not set
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_ORION=y
+CONFIG_SPLIT_PTLOCK_CPUS=999999
+CONFIG_SRAM=y
+CONFIG_SRAM_EXEC=y
+CONFIG_SRCU=y
+CONFIG_SWPHY=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TINY_SRCU=y
+CONFIG_UBIFS_FS=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_LED_TRIG=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+# CONFIG_VFP is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_WAN=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XXHASH=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/kirkwood/patches-6.1/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch b/target/linux/kirkwood/patches-6.1/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
new file mode 100644
index 0000000000..09e71813cd
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/002-6.2-ARM-dts-kirkwood-Add-Zyxel-NSA310S-board.patch
@@ -0,0 +1,301 @@
+From e977a103840c57d72b52cbc8c17f87f86ef9aa8d Mon Sep 17 00:00:00 2001
+From: Pawel Dembicki <paweldembicki at gmail.com>
+Date: Sat, 29 Oct 2022 22:57:38 +0200
+Subject: [PATCH] ARM: dts: kirkwood: Add Zyxel NSA310S board
+
+Zyxel NSA310S is a NAS based on Marvell kirkwood SoC.
+
+Specification:
+ - Processor Marvell 88F6702 1 GHz
+ - 256MB RAM
+ - 128MB NAND
+ - 1x GBE LAN port (PHY: Marvell 88E1318)
+ - 2x USB 2.0
+ - 1x SATA
+ - 3x button
+ - 7x leds
+ - serial on J1 connector (115200 8N1) (GND-NOPIN-RX-TX-VCC)
+
+Tested-by: Tony Dinh <mibodhi at gmail.com>
+Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
+Acked-by: Adam Baker <linux at baker-net.org.uk>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
+---
+ arch/arm/boot/dts/Makefile             |   1 +
+ arch/arm/boot/dts/kirkwood-nsa310s.dts | 259 +++++++++++++++++++++++++
+ 2 files changed, 260 insertions(+)
+ create mode 100644 arch/arm/boot/dts/kirkwood-nsa310s.dts
+
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -356,6 +356,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
+ 	kirkwood-ns2mini.dtb \
+ 	kirkwood-nsa310.dtb \
+ 	kirkwood-nsa310a.dtb \
++	kirkwood-nsa310s.dtb \
+ 	kirkwood-nsa320.dtb \
+ 	kirkwood-nsa325.dtb \
+ 	kirkwood-openblocks_a6.dtb \
+--- /dev/null
++++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts
+@@ -0,0 +1,259 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++/*
++ * ZyXEL NSA310S Board Description
++ * Copyright 2020-2022 Pawel Dembicki <paweldembicki at gmail.com>
++ * Copyright (c) 2015-2021, Tony Dinh <mibodhi at gmail.com>
++ * Copyright (c) 2014, Adam Baker <linux at baker-net.org.uk>
++ * Based upon the board setup file created by Peter Schildmann
++ */
++/dts-v1/;
++
++#include "kirkwood.dtsi"
++#include "kirkwood-6281.dtsi"
++#include <dt-bindings/leds/common.h>
++
++/ {
++	model = "ZyXEL NSA310S";
++	compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
++
++	memory {
++		device_type = "memory";
++		reg = <0x00000000 0x10000000>;
++	};
++
++	chosen {
++		bootargs = "console=ttyS0,115200n8 earlyprintk";
++		stdout-path = &uart0;
++	};
++
++	gpio_poweroff {
++		compatible = "gpio-poweroff";
++		pinctrl-0 = <&pmx_pwr_off>;
++		pinctrl-names = "default";
++		gpios = <&gpio0 27 GPIO_ACTIVE_HIGH>;
++	};
++
++	keys {
++		compatible = "gpio-keys";
++		#address-cells = <1>;
++		#size-cells = <0>;
++		pinctrl-0 = <&pmx_buttons>;
++		pinctrl-names = "default";
++
++		power {
++			label = "Power Button";
++			linux,code = <KEY_POWER>;
++			gpios = <&gpio0 26 GPIO_ACTIVE_HIGH>;
++		};
++
++		copy {
++			label = "Copy Button";
++			linux,code = <KEY_COPY>;
++			gpios = <&gpio0 25 GPIO_ACTIVE_LOW>;
++		};
++
++		reset {
++			label = "Reset Button";
++			linux,code = <KEY_RESTART>;
++			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-0 = <&pmx_leds>;
++		pinctrl-names = "default";
++
++		led-1 {
++			function = LED_FUNCTION_DISK_ERR;
++			color = <LED_COLOR_ID_RED>;
++			gpios = <&gpio0 13 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-2 {
++			function = LED_FUNCTION_USB;
++			color = <LED_COLOR_ID_GREEN>;
++			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "usb-host";
++		};
++
++		led-3 {
++			function = LED_FUNCTION_DISK;
++			color = <LED_COLOR_ID_GREEN>;
++			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "ata1";
++		};
++
++		led-4 {
++			function = LED_FUNCTION_INDICATOR;
++			color = <LED_COLOR_ID_GREEN>;
++			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-5 {
++			function = LED_FUNCTION_INDICATOR;
++			color = <LED_COLOR_ID_RED>;
++			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-6 {
++			function = LED_FUNCTION_STATUS;
++			color = <LED_COLOR_ID_GREEN>;
++			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "default-on";
++		};
++
++		led-7 {
++			function = LED_FUNCTION_STATUS;
++			color = <LED_COLOR_ID_RED>;
++			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
++		};
++	};
++
++	usb0_power: regulator at 1 {
++		compatible = "regulator-fixed";
++		regulator-name = "USB Power";
++
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		regulator-always-on;
++		regulator-boot-on;
++		gpio = <&gpio0 21 GPIO_ACTIVE_HIGH>;
++	};
++
++	sata1_power: regulator at 2 {
++		compatible = "regulator-fixed";
++		regulator-name = "SATA1 Power";
++
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		regulator-always-on;
++		regulator-boot-on;
++		gpio = <&gpio1 1 GPIO_ACTIVE_HIGH>;
++	};
++
++	thermal-zones {
++		disk-thermal {
++			polling-delay = <20000>;
++			polling-delay-passive = <2000>;
++
++			thermal-sensors = <&hdd_temp>;
++
++			trips {
++				disk_alert: disk-alert {
++					temperature = <40000>;
++					hysteresis = <5000>;
++					type = "active";
++				};
++				disk_crit: disk-crit {
++					temperature = <60000>;
++					hysteresis = <2000>;
++					type = "critical";
++				};
++			};
++		};
++	};
++};
++
++
++&eth0 {
++	status = "okay";
++
++	ethernet0-port at 0 {
++		phy-handle = <&ethphy0>;
++	};
++};
++
++&i2c0 {
++	status = "okay";
++
++	rtc at 68 {
++		compatible = "htk,ht1382";
++		reg = <0x68>;
++	};
++};
++
++&mdio {
++	status = "okay";
++
++	ethphy0: ethernet-phy at 1 {
++		reg = <1>;
++		phy-mode = "rgmii-id";
++		marvell,reg-init = <0x1 0x16 0x0 0x3>,
++				   <0x1 0x10 0x0 0x1017>,
++				   <0x1 0x11 0x0 0x4408>,
++				   <0x1 0x16 0x0 0x0>;
++	};
++};
++
++&nand {
++	status = "okay";
++	chip-delay = <35>;
++
++	partition at 0 {
++		label = "uboot";
++		reg = <0x0000000 0x00c0000>;
++		read-only;
++	};
++	partition at c0000 {
++		label = "uboot_env";
++		reg = <0x00c0000 0x0080000>;
++	};
++	partition at 140000 {
++		label = "ubi";
++		reg = <0x0140000 0x7ec0000>;
++	};
++};
++
++&pciec {
++	status = "okay";
++};
++
++&pcie0 {
++	status = "okay";
++};
++
++&pinctrl {
++	pinctrl-names = "default";
++
++	pmx_buttons: pmx-buttons {
++		marvell,pins = "mpp24", "mpp25", "mpp26";
++		marvell,function = "gpio";
++	};
++
++	pmx_leds: pmx-leds {
++		marvell,pins = "mpp13", "mpp15", "mpp16", "mpp22", "mpp23",
++						"mpp28", "mpp29";
++		marvell,function = "gpio";
++	};
++
++	pmx_power: pmx-power {
++		marvell,pins = "mpp21", "mpp33";
++		marvell,function = "gpio";
++	};
++
++	pmx_pwr_off: pmx-pwr-off {
++		marvell,pins = "mpp27";
++		marvell,function = "gpio";
++	};
++};
++
++&rtc {
++	status = "disabled";
++};
++
++&sata {
++	status = "okay";
++	nr-ports = <1>;
++	#address-cells = <1>;
++	#size-cells = <0>;
++
++	hdd_temp: sata-port at 0 {
++		reg = <0>;
++		#thermal-sensor-cells = <0>;
++	};
++};
++
++&uart0 {
++	status = "okay";
++};
diff --git a/target/linux/kirkwood/patches-6.1/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch b/target/linux/kirkwood/patches-6.1/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
new file mode 100644
index 0000000000..cde281526b
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/003-6.5-ARM-dts-kirkwood-Add-Endian-4i-Edge-200-board.patch
@@ -0,0 +1,249 @@
+From 5668d088ee4ea05db9daaae0645d1d1f579b20f9 Mon Sep 17 00:00:00 2001
+From: Pawel Dembicki <paweldembicki at gmail.com>
+Date: Mon, 3 Oct 2022 09:34:43 +0200
+Subject: ARM: dts: kirkwood: Add Endian 4i Edge 200 board
+
+Add Endian 4i Edge 200 is 5-port firewall.
+It have also clone: Endian UTM Mini (The same hardware, with added WLAN
+card).
+
+Hardware:
+  - SoC: Marvell 88F6281-A1 ARMv5TE Processor 1.2GHz
+  - Ram: 512MB (4x Nanya NT5TU128M8GE-AC)
+  - NAND Flash: 512MB (Micron 29F4G08AAC)
+  - Lan 1-4: 4x GBE (Marvell 88E6171R-TFJ2)
+  - Lan 5: 1x GBE (Marvell 88E1116R-NNC1)
+  - Storage: MicroSD Slot
+  - MCPIE: MiniPCIe Slot present [fitted with SparkLan WPEA-110N/E
+          (Atheros AR9280 chipset) in Endian UTM Mini WLAN only]
+  - USB: 1x USB 2.0 port
+  - Console: RJ-45 port
+  - LEDs: 3x GPIO controlled
+
+Signed-off-by: Pawel Dembicki <paweldembicki at gmail.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
+---
+ arch/arm/boot/dts/Makefile                 |   1 +
+ arch/arm/boot/dts/kirkwood-4i-edge-200.dts | 205 +++++++++++++++++++++++++++++
+ 2 files changed, 206 insertions(+)
+ create mode 100644 arch/arm/boot/dts/kirkwood-4i-edge-200.dts
+
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -300,6 +300,7 @@ dtb-$(CONFIG_ARCH_KEYSTONE) += \
+ 	keystone-k2g-evm.dtb \
+ 	keystone-k2g-ice.dtb
+ dtb-$(CONFIG_MACH_KIRKWOOD) += \
++	kirkwood-4i-edge-200.dtb \
+ 	kirkwood-b3.dtb \
+ 	kirkwood-blackarmor-nas220.dtb \
+ 	kirkwood-c200-v1.dtb \
+--- /dev/null
++++ b/arch/arm/boot/dts/kirkwood-4i-edge-200.dts
+@@ -0,0 +1,205 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++/*
++ * Endian 4i Edge 200 Board Description
++ * Note: Endian UTM Mini is hardware clone of Endian Edge 200
++ * Copyright 2021-2022 Pawel Dembicki <paweldembicki at gmail.com>
++ */
++
++/dts-v1/;
++
++#include "kirkwood.dtsi"
++#include "kirkwood-6281.dtsi"
++#include <dt-bindings/leds/common.h>
++
++/ {
++	model = "Endian 4i Edge 200";
++	compatible = "endian,4i-edge-200", "marvell,kirkwood-88f6281", "marvell,kirkwood";
++
++	memory {
++		device_type = "memory";
++		reg = <0x00000000 0x20000000>;
++	};
++
++	chosen {
++		bootargs = "console=ttyS0,115200n8";
++		stdout-path = &uart0;
++	};
++
++	leds {
++		compatible = "gpio-leds";
++		pinctrl-0 = <&pmx_led>;
++		pinctrl-names = "default";
++
++		led-1 {
++			function = LED_FUNCTION_SD;
++			color = <LED_COLOR_ID_AMBER>;
++			gpios = <&gpio1 2 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "mmc0";
++		};
++
++		led-2 {
++			function = LED_FUNCTION_STATUS;
++			color = <LED_COLOR_ID_AMBER>;
++			gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
++		};
++
++		led-3 {
++			function = LED_FUNCTION_STATUS;
++			color = <LED_COLOR_ID_GREEN>;
++			gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
++		};
++	};
++};
++
++&eth0 {
++	status = "okay";
++};
++
++&eth0port {
++	speed = <1000>;
++	duplex = <1>;
++};
++
++&eth1 {
++	status = "okay";
++};
++
++&eth1port {
++	phy-handle = <&ethphyb>;
++};
++
++&mdio {
++	status = "okay";
++
++	ethphyb: ethernet-phy at b {
++		reg = <0x0b>;
++
++		marvell,reg-init =
++			/* link-activity, bi-color mode 4 */
++			<3 0x10 0xfff0 0xf>; /* Reg 3,16 <- 0xzzzf */
++	};
++
++	switch0: switch at 11 {
++		compatible = "marvell,mv88e6085";
++		reg = <0x11>;
++
++		ports {
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			port at 0 {
++				reg = <0>;
++				label = "port1";
++			};
++
++			port at 1 {
++				reg = <1>;
++				label = "port2";
++			};
++
++			port at 2 {
++				reg = <2>;
++				label = "port3";
++			};
++
++			port at 3 {
++				reg = <3>;
++				label = "port4";
++			};
++
++			port at 5 {
++				reg = <5>;
++				phy-mode = "rgmii-id";
++				ethernet = <&eth0port>;
++
++				fixed-link {
++					speed = <1000>;
++					full-duplex;
++				};
++			};
++		};
++	};
++};
++
++&nand {
++	status = "okay";
++	pinctrl-0 = <&pmx_nand>;
++	pinctrl-names = "default";
++
++	partition at 0 {
++		label = "u-boot";
++		reg = <0x00000000 0x000a0000>;
++		read-only;
++	};
++
++	partition at a0000 {
++		label = "u-boot-env";
++		reg = <0x000a0000 0x00060000>;
++		read-only;
++	};
++
++	partition at 100000 {
++		label = "kernel";
++		reg = <0x00100000 0x00400000>;
++	};
++
++	partition at 500000 {
++		label = "ubi";
++		reg = <0x00500000 0x1fb00000>;
++	};
++};
++
++&pciec {
++	status = "okay";
++};
++
++&pcie0 {
++	status = "okay";
++};
++
++&pinctrl {
++	pinctrl-0 = <&pmx_sysrst>;
++	pinctrl-names = "default";
++
++	pmx_sysrst: pmx-sysrst {
++		marvell,pins = "mpp6";
++		marvell,function = "sysrst";
++	};
++
++	pmx_sdio_cd: pmx-sdio-cd {
++		marvell,pins = "mpp28";
++		marvell,function = "gpio";
++	};
++
++	pmx_led: pmx-led {
++		marvell,pins = "mpp34", "mpp35", "mpp49";
++		marvell,function = "gpio";
++	};
++};
++
++&rtc {
++	status = "okay";
++};
++
++&sata_phy0 {
++	status = "disabled";
++};
++
++&sata_phy1 {
++	status = "disabled";
++};
++
++&sdio {
++	pinctrl-0 = <&pmx_sdio_cd>;
++	pinctrl-names = "default";
++	status = "okay";
++	cd-gpios = <&gpio0 28 9>;
++};
++
++&uart0 {
++	status = "okay";
++};
++
++&usb0 {
++	status = "okay";
++};
diff --git a/target/linux/kirkwood/patches-6.1/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch b/target/linux/kirkwood/patches-6.1/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
new file mode 100644
index 0000000000..fd7adc3584
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/004-6.4-ARM-dts-kirkwood-Add-missing-phy-mode-and-fixed-link.patch
@@ -0,0 +1,108 @@
+From 8aea8659a5f3ae8dc63c9f632ce1f676a1483556 Mon Sep 17 00:00:00 2001
+From: Andrew Lunn <andrew at lunn.ch>
+Date: Fri, 7 Apr 2023 17:17:20 +0200
+Subject: [PATCH] ARM: dts: kirkwood: Add missing phy-mode and fixed links
+
+The DSA framework has got more picky about always having a phy-mode
+for the CPU port. The Kirkwood Ethernet is an RGMII port. Set the
+switch to impose the RGMII delays.
+
+Additionally, the cpu label has never actually been used in the
+binding, so remove it.
+
+Signed-off-by: Andrew Lunn <andrew at lunn.ch>
+Signed-off-by: Gregory CLEMENT <gregory.clement at bootlin.com>
+---
+ arch/arm/boot/dts/kirkwood-dir665.dts          | 3 ++-
+ arch/arm/boot/dts/kirkwood-l-50.dts            | 2 +-
+ arch/arm/boot/dts/kirkwood-linksys-viper.dts   | 3 ++-
+ arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts | 3 ++-
+ arch/arm/boot/dts/kirkwood-rd88f6281.dtsi      | 2 +-
+ 5 files changed, 8 insertions(+), 5 deletions(-)
+
+--- a/arch/arm/boot/dts/kirkwood-dir665.dts
++++ b/arch/arm/boot/dts/kirkwood-dir665.dts
+@@ -232,7 +232,7 @@
+ 
+ 			port at 6 {
+ 				reg = <6>;
+-				label = "cpu";
++				phy-mode = "rgmii-id";
+ 				ethernet = <&eth0port>;
+ 				fixed-link {
+ 					speed = <1000>;
+@@ -251,6 +251,7 @@
+ 	ethernet0-port at 0 {
+ 		speed = <1000>;
+ 		duplex = <1>;
++		phy-mode = "rgmii";
+ 	};
+ };
+ 
+--- a/arch/arm/boot/dts/kirkwood-l-50.dts
++++ b/arch/arm/boot/dts/kirkwood-l-50.dts
+@@ -254,7 +254,6 @@
+ 
+ 			port at 6 {
+ 				reg = <6>;
+-				label = "cpu";
+ 				phy-mode = "rgmii-id";
+ 				ethernet = <&eth1port>;
+ 				fixed-link {
+@@ -330,6 +329,7 @@
+ 	ethernet1-port at 0 {
+ 		speed = <1000>;
+ 		duplex = <1>;
++		phy-mode = "rgmii";
+ 	};
+ };
+ 
+--- a/arch/arm/boot/dts/kirkwood-linksys-viper.dts
++++ b/arch/arm/boot/dts/kirkwood-linksys-viper.dts
+@@ -198,7 +198,7 @@
+ 
+ 			port at 5 {
+ 				reg = <5>;
+-				label = "cpu";
++				phy-mode = "rgmii-id";
+ 				ethernet = <&eth0port>;
+ 				fixed-link {
+ 					speed = <1000>;
+@@ -221,6 +221,7 @@
+ 	ethernet0-port at 0 {
+ 		speed = <1000>;
+ 		duplex = <1>;
++		phy-mode = "rgmii";
+ 	};
+ };
+ 
+--- a/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
++++ b/arch/arm/boot/dts/kirkwood-mv88f6281gtw-ge.dts
+@@ -149,7 +149,7 @@
+ 
+ 			port at 5 {
+ 				reg = <5>;
+-				label = "cpu";
++				phy-mode = "rgmii-id";
+ 				ethernet = <&eth0port>;
+ 				fixed-link {
+ 					speed = <1000>;
+@@ -166,6 +166,7 @@
+ 	ethernet0-port at 0 {
+ 		speed = <1000>;
+ 		duplex = <1>;
++		phy-mode = "rgmii";
+ 	};
+ };
+ 
+--- a/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
++++ b/arch/arm/boot/dts/kirkwood-rd88f6281.dtsi
+@@ -105,7 +105,7 @@
+ 
+ 			port at 5 {
+ 				reg = <5>;
+-				label = "cpu";
++				phy-mode = "rgmii-id";
+ 				ethernet = <&eth0port>;
+ 				fixed-link {
+ 					speed = <1000>;
diff --git a/target/linux/kirkwood/patches-6.1/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch b/target/linux/kirkwood/patches-6.1/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch
new file mode 100644
index 0000000000..cd838394d9
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/005-6.7-net-dsa-mv88e6xxx-fix-marvell-6350-switch-probing.patch
@@ -0,0 +1,89 @@
+From b3f1a164c7f742503dc7159011f7ad6b092b660e Mon Sep 17 00:00:00 2001
+From: Greg Ungerer <gerg at kernel.org>
+Date: Fri, 24 Nov 2023 14:15:28 +1000
+Subject: [PATCH] net: dsa: mv88e6xxx: fix marvell 6350 switch probing
+
+As of commit de5c9bf40c45 ("net: phylink: require supported_interfaces to
+be filled") Marvell 88e6350 switches fail to be probed:
+
+    ...
+    mv88e6085 d0072004.mdio-mii:11: switch 0x3710 detected: Marvell 88E6350, revision 2
+    mv88e6085 d0072004.mdio-mii:11: phylink: error: empty supported_interfaces
+    error creating PHYLINK: -22
+    mv88e6085: probe of d0072004.mdio-mii:11 failed with error -22
+    ...
+
+The problem stems from the use of mv88e6185_phylink_get_caps() to get
+the device capabilities. Create a new dedicated phylink_get_caps for the
+6351 family (which the 6350 is one of) to properly support their set of
+capabilities.
+
+According to chip.h the 6351 switch family includes the 6171, 6175, 6350
+and 6351 switches, so update each of these to use the correct
+phylink_get_caps.
+
+Fixes: de5c9bf40c45 ("net: phylink: require supported_interfaces to be filled")
+Signed-off-by: Greg Ungerer <gerg at kernel.org>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mv88e6xxx/chip.c | 20 ++++++++++++++++----
+ 1 file changed, 16 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mv88e6xxx/chip.c
++++ b/drivers/net/dsa/mv88e6xxx/chip.c
+@@ -652,6 +652,18 @@ static void mv88e6250_phylink_get_caps(s
+ 	config->mac_capabilities = MAC_SYM_PAUSE | MAC_10 | MAC_100;
+ }
+ 
++static void mv88e6351_phylink_get_caps(struct mv88e6xxx_chip *chip, int port,
++				       struct phylink_config *config)
++{
++	unsigned long *supported = config->supported_interfaces;
++
++	/* Translate the default cmode */
++	mv88e6xxx_translate_cmode(chip->ports[port].cmode, supported);
++
++	config->mac_capabilities = MAC_SYM_PAUSE | MAC_10 | MAC_100 |
++				   MAC_1000FD;
++}
++
+ static int mv88e6352_get_port4_serdes_cmode(struct mv88e6xxx_chip *chip)
+ {
+ 	u16 reg, val;
+@@ -4498,7 +4510,7 @@ static const struct mv88e6xxx_ops mv88e6
+ 	.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge,
+ 	.stu_getnext = mv88e6352_g1_stu_getnext,
+ 	.stu_loadpurge = mv88e6352_g1_stu_loadpurge,
+-	.phylink_get_caps = mv88e6185_phylink_get_caps,
++	.phylink_get_caps = mv88e6351_phylink_get_caps,
+ };
+ 
+ static const struct mv88e6xxx_ops mv88e6172_ops = {
+@@ -4599,7 +4611,7 @@ static const struct mv88e6xxx_ops mv88e6
+ 	.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge,
+ 	.stu_getnext = mv88e6352_g1_stu_getnext,
+ 	.stu_loadpurge = mv88e6352_g1_stu_loadpurge,
+-	.phylink_get_caps = mv88e6185_phylink_get_caps,
++	.phylink_get_caps = mv88e6351_phylink_get_caps,
+ };
+ 
+ static const struct mv88e6xxx_ops mv88e6176_ops = {
+@@ -5256,7 +5268,7 @@ static const struct mv88e6xxx_ops mv88e6
+ 	.vtu_loadpurge = mv88e6352_g1_vtu_loadpurge,
+ 	.stu_getnext = mv88e6352_g1_stu_getnext,
+ 	.stu_loadpurge = mv88e6352_g1_stu_loadpurge,
+-	.phylink_get_caps = mv88e6185_phylink_get_caps,
++	.phylink_get_caps = mv88e6351_phylink_get_caps,
+ };
+ 
+ static const struct mv88e6xxx_ops mv88e6351_ops = {
+@@ -5302,7 +5314,7 @@ static const struct mv88e6xxx_ops mv88e6
+ 	.stu_loadpurge = mv88e6352_g1_stu_loadpurge,
+ 	.avb_ops = &mv88e6352_avb_ops,
+ 	.ptp_ops = &mv88e6352_ptp_ops,
+-	.phylink_get_caps = mv88e6185_phylink_get_caps,
++	.phylink_get_caps = mv88e6351_phylink_get_caps,
+ };
+ 
+ static const struct mv88e6xxx_ops mv88e6352_ops = {
diff --git a/target/linux/kirkwood/patches-6.1/100-ib62x0.patch b/target/linux/kirkwood/patches-6.1/100-ib62x0.patch
new file mode 100644
index 0000000000..0637c24b63
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/100-ib62x0.patch
@@ -0,0 +1,53 @@
+--- a/arch/arm/boot/dts/kirkwood-ib62x0.dts
++++ b/arch/arm/boot/dts/kirkwood-ib62x0.dts
+@@ -6,7 +6,14 @@
+ 
+ / {
+ 	model = "RaidSonic ICY BOX IB-NAS62x0 (Rev B)";
+-	compatible = "raidsonic,ib-nas6210-b", "raidsonic,ib-nas6220-b", "raidsonic,ib-nas6210", "raidsonic,ib-nas6220", "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood";
++	compatible = "raidsonic,ib-nas62x0", "marvell,kirkwood-88f6281", "marvell,kirkwood";
++
++	aliases {
++		led-boot = &led_green_os;
++		led-failsafe = &led_red_os;
++		led-running = &led_green_os;
++		led-upgrade = &led_red_os;
++	};
+ 
+ 	memory {
+ 		device_type = "memory";
+@@ -81,12 +88,12 @@
+ 			     &pmx_led_usb_transfer>;
+ 		pinctrl-names = "default";
+ 
+-		green-os {
++		led_green_os: green-os {
+ 			label = "ib62x0:green:os";
+ 			gpios = <&gpio0 25 GPIO_ACTIVE_HIGH>;
+-			default-state = "keep";
++			default-state = "on";
+ 		};
+-		red-os {
++		led_red_os: red-os {
+ 			label = "ib62x0:red:os";
+ 			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
+ 		};
+@@ -118,13 +125,13 @@
+ 	};
+ 
+ 	partition at 100000 {
+-		label = "uImage";
+-		reg = <0x0100000 0x600000>;
++		label = "second stage u-boot";
++		reg = <0x100000 0x200000>;
+ 	};
+ 
+-	partition at 700000 {
+-		label = "root";
+-		reg = <0x0700000 0xf900000>;
++	partition at 200000 {
++		label = "ubi";
++		reg = <0x200000 0xfe00000>;
+ 	};
+ 
+ };
diff --git a/target/linux/kirkwood/patches-6.1/101-iconnect.patch b/target/linux/kirkwood/patches-6.1/101-iconnect.patch
new file mode 100644
index 0000000000..935e2dfcf5
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/101-iconnect.patch
@@ -0,0 +1,80 @@
+--- a/arch/arm/boot/dts/kirkwood-iconnect.dts
++++ b/arch/arm/boot/dts/kirkwood-iconnect.dts
+@@ -8,6 +8,13 @@
+ 	model = "Iomega Iconnect";
+ 	compatible = "iom,iconnect-1.1", "iom,iconnect", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_power_blue;
++		led-failsafe = &led_power_red;
++		led-running = &led_power_blue;
++		led-upgrade = &led_power_red;
++	};
++
+ 	memory {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x10000000>;
+@@ -16,8 +23,6 @@
+ 	chosen {
+ 		bootargs = "console=ttyS0,115200n8 earlyprintk";
+ 		stdout-path = &uart0;
+-		linux,initrd-start = <0x4500040>;
+-		linux,initrd-end   = <0x4800000>;
+ 	};
+ 
+ 	ocp at f1000000 {
+@@ -89,12 +94,12 @@
+ 			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
+ 			default-state = "on";
+ 		};
+-		power-blue {
++		led_power_blue: power-blue {
+ 			label = "power:blue";
+ 			gpios = <&gpio1 10 GPIO_ACTIVE_HIGH>;
+-			default-state = "keep";
++			default-state = "on";
+ 		};
+-		power-red {
++		led_power_red: power-red {
+ 			label = "power:red";
+ 			gpios = <&gpio1 11 GPIO_ACTIVE_HIGH>;
+ 		};
+@@ -146,28 +151,23 @@
+ 	status = "okay";
+ 
+ 	partition at 0 {
+-		label = "uboot";
+-		reg = <0x0000000 0xc0000>;
++		label = "u-boot";
++		reg = <0x0000000 0xe0000>;
+ 	};
+ 
+-	partition at a0000 {
+-		label = "env";
+-		reg = <0xa0000 0x20000>;
++	partition at e0000 {
++		label = "u-boot environment";
++		reg = <0xe0000 0x100000>;
+ 	};
+ 
+ 	partition at 100000 {
+-		label = "zImage";
+-		reg = <0x100000 0x300000>;
+-	};
+-
+-	partition at 540000 {
+-		label = "initrd";
+-		reg = <0x540000 0x300000>;
++		label = "second stage u-boot";
++		reg = <0x100000 0x200000>;
+ 	};
+ 
+-	partition at 980000 {
+-		label = "boot";
+-		reg = <0x980000 0x1f400000>;
++	partition at 200000 {
++		label = "ubi";
++		reg = <0x200000 0x1fe00000>;
+ 	};
+ };
+ 
diff --git a/target/linux/kirkwood/patches-6.1/102-dockstar.patch b/target/linux/kirkwood/patches-6.1/102-dockstar.patch
new file mode 100644
index 0000000000..127f84962c
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/102-dockstar.patch
@@ -0,0 +1,62 @@
+--- a/arch/arm/boot/dts/kirkwood-dockstar.dts
++++ b/arch/arm/boot/dts/kirkwood-dockstar.dts
+@@ -8,6 +8,13 @@
+ 	model = "Seagate FreeAgent Dockstar";
+ 	compatible = "seagate,dockstar", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_health;
++		led-failsafe = &led_fault;
++		led-running = &led_health;
++		led-upgrade = &led_fault;
++	};
++
+ 	memory {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x8000000>;
+@@ -42,12 +49,12 @@
+ 		pinctrl-0 = <&pmx_led_green &pmx_led_orange>;
+ 		pinctrl-names = "default";
+ 
+-		health {
++		led_health: health {
+ 			label = "status:green:health";
+ 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+-			default-state = "keep";
++			default-state = "on";
+ 		};
+-		fault {
++		led_fault: fault {
+ 			label = "status:orange:fault";
+ 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ 		};
+@@ -78,18 +85,22 @@
+ 
+ 	partition at 0 {
+ 		label = "u-boot";
+-		reg = <0x0000000 0x100000>;
+-		read-only;
++		reg = <0x0000000 0xe0000>;
++	};
++
++	partition at e0000 {
++		label = "u-boot environment";
++		reg = <0xe0000 0x100000>;
+ 	};
+ 
+ 	partition at 100000 {
+-		label = "uImage";
+-		reg = <0x0100000 0x400000>;
++		label = "second stage u-boot";
++		reg = <0x100000 0x200000>;
+ 	};
+ 
+-	partition at 500000 {
+-		label = "data";
+-		reg = <0x0500000 0xfb00000>;
++	partition at 200000 {
++		label = "ubi";
++		reg = <0x200000 0xfe00000>;
+ 	};
+ };
+ 
diff --git a/target/linux/kirkwood/patches-6.1/103-iomega-ix2-200.patch b/target/linux/kirkwood/patches-6.1/103-iomega-ix2-200.patch
new file mode 100644
index 0000000000..db04c09f76
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/103-iomega-ix2-200.patch
@@ -0,0 +1,71 @@
+--- a/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
++++ b/arch/arm/boot/dts/kirkwood-iomega_ix2_200.dts
+@@ -8,6 +8,13 @@
+ 	model = "Iomega StorCenter ix2-200";
+ 	compatible = "iom,ix2-200", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_power;
++		led-failsafe = &led_health;
++		led-running = &led_power;
++		led-upgrade = &led_health;
++	};
++
+ 	memory {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x10000000>;
+@@ -127,16 +134,16 @@
+ 			      &pmx_led_rebuild &pmx_led_health >;
+ 		pinctrl-names = "default";
+ 
+-		power_led {
++		led_power: power_led {
+ 			label = "status:white:power_led";
+ 			gpios = <&gpio0 16 GPIO_ACTIVE_HIGH>;
+-			default-state = "keep";
++			default-state = "on";
+ 		};
+ 		rebuild_led {
+ 			label = "status:white:rebuild_led";
+ 			gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
+ 		};
+-		health_led {
++		led_health: health_led {
+ 			label = "status:red:health_led";
+ 			gpios = <&gpio1 5 GPIO_ACTIVE_HIGH>;
+ 		};
+@@ -186,19 +193,19 @@
+ 	};
+ 
+ 	partition at a0000 {
+-		label = "env";
++		label = "u-boot environment";
+ 		reg = <0xa0000 0x20000>;
+ 		read-only;
+ 	};
+ 
+ 	partition at 100000 {
+-		label = "uImage";
+-		reg = <0x100000 0x300000>;
++		label = "kernel";
++		reg = <0x100000 0x400000>;
+ 	};
+ 
+-	partition at 400000 {
+-		label = "rootfs";
+-		reg = <0x400000 0x1C00000>;
++	partition at 500000 {
++		label = "ubi";
++		reg = <0x500000 0x1C00000>;
+ 	};
+ };
+ 
+@@ -211,7 +218,7 @@
+ };
+ 
+ &eth0 {
+-	status = "okay";
++	status = "disabled";
+ 	ethernet0-port at 0 {
+ 		speed = <1000>;
+ 		duplex = <1>;
diff --git a/target/linux/kirkwood/patches-6.1/105-linksys-viper-dts.patch b/target/linux/kirkwood/patches-6.1/105-linksys-viper-dts.patch
new file mode 100644
index 0000000000..b1604ec92c
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/105-linksys-viper-dts.patch
@@ -0,0 +1,59 @@
+--- a/arch/arm/boot/dts/kirkwood-linksys-viper.dts
++++ b/arch/arm/boot/dts/kirkwood-linksys-viper.dts
+@@ -24,6 +24,10 @@
+ 	};
+ 
+ 	aliases {
++		led-boot = &led_white_health;
++		led-failsafe = &led_white_health;
++		led-running = &led_white_health;
++		led-upgrade = &led_white_health;
+ 		serial0 = &uart0;
+ 	};
+ 
+@@ -56,9 +60,10 @@
+ 		pinctrl-0 = < &pmx_led_white_health &pmx_led_white_pulse >;
+ 		pinctrl-names = "default";
+ 
+-		white-health {
++		led_white_health: white-health {
+ 			label = "viper:white:health";
+ 			gpios = <&gpio0 7 GPIO_ACTIVE_HIGH>;
++			default-state = "on";
+ 		};
+ 
+ 		white-pulse {
+@@ -114,23 +119,23 @@
+ 		};
+ 
+ 		partition at 200000 {
+-			label = "kernel";
+-			reg = <0x200000 0x2A0000>;
++			label = "kernel1";
++			reg = <0x200000 0x1A00000>;
+ 		};
+ 
+-		partition at 4a0000 {
+-			label = "rootfs";
+-			reg = <0x4A0000 0x1760000>;
++		partition at 600000 {
++			label = "rootfs1";
++			reg = <0x600000 0x1600000>;
+ 		};
+ 
+ 		partition at 1c00000 {
+-			label = "alt_kernel";
+-			reg = <0x1C00000 0x2A0000>;
++			label = "kernel2";
++			reg = <0x1C00000 0x1A00000>;
+ 		};
+ 
+-		partition at 1ea0000 {
+-			label = "alt_rootfs";
+-			reg = <0x1EA0000 0x1760000>;
++		partition at 2000000 {
++			label = "rootfs2";
++			reg = <0x2000000 0x1600000>;
+ 		};
+ 
+ 		partition at 3600000 {
diff --git a/target/linux/kirkwood/patches-6.1/106-goflexnet.patch b/target/linux/kirkwood/patches-6.1/106-goflexnet.patch
new file mode 100644
index 0000000000..82cf90841e
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/106-goflexnet.patch
@@ -0,0 +1,53 @@
+--- a/arch/arm/boot/dts/kirkwood-goflexnet.dts
++++ b/arch/arm/boot/dts/kirkwood-goflexnet.dts
+@@ -8,6 +8,13 @@
+ 	model = "Seagate GoFlex Net";
+ 	compatible = "seagate,goflexnet", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_health;
++		led-failsafe = &led_fault;
++		led-running = &led_health;
++		led-upgrade = &led_fault;
++	};
++
+ 	memory {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x8000000>;
+@@ -85,12 +92,12 @@
+ 			    >;
+ 		pinctrl-names = "default";
+ 
+-		health {
++		led_health: health {
+ 			label = "status:green:health";
+ 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
+-			default-state = "keep";
++			default-state = "on";
+ 		};
+-		fault {
++		led_fault: fault {
+ 			label = "status:orange:fault";
+ 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ 		};
+@@ -159,18 +166,8 @@
+ 	};
+ 
+ 	partition at 100000 {
+-		label = "uImage";
+-		reg = <0x0100000 0x400000>;
+-	};
+-
+-	partition at 500000 {
+-		label = "pogoplug";
+-		reg = <0x0500000 0x2000000>;
+-	};
+-
+-	partition at 2500000 {
+-		label = "root";
+-		reg = <0x02500000 0xd800000>;
++		label = "ubi";
++		reg = <0x0100000 0x0ff00000>;
+ 	};
+ };
+ 
diff --git a/target/linux/kirkwood/patches-6.1/107-01-zyxel-nsa3x0-common-nand-partitions.patch b/target/linux/kirkwood/patches-6.1/107-01-zyxel-nsa3x0-common-nand-partitions.patch
new file mode 100644
index 0000000000..df654033fd
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/107-01-zyxel-nsa3x0-common-nand-partitions.patch
@@ -0,0 +1,48 @@
+--- a/arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi
++++ b/arch/arm/boot/dts/kirkwood-nsa3x0-common.dtsi
+@@ -112,40 +112,16 @@
+ 
+ 	partition at 0 {
+ 		label = "uboot";
+-		reg = <0x0000000 0x0100000>;
++		reg = <0x0000000 0x00c0000>;
+ 		read-only;
+ 	};
+ 	partition at 100000 {
+ 		label = "uboot_env";
+-		reg = <0x0100000 0x0080000>;
++		reg = <0x00c0000 0x0080000>;
+ 	};
+-	partition at 180000 {
+-		label = "key_store";
+-		reg = <0x0180000 0x0080000>;
+-	};
+-	partition at 200000 {
+-		label = "info";
+-		reg = <0x0200000 0x0080000>;
+-	};
+-	partition at 280000 {
+-		label = "etc";
+-		reg = <0x0280000 0x0a00000>;
+-	};
+-	partition at c80000 {
+-		label = "kernel_1";
+-		reg = <0x0c80000 0x0a00000>;
+-	};
+-	partition at 1680000 {
+-		label = "rootfs1";
+-		reg = <0x1680000 0x2fc0000>;
+-	};
+-	partition at 4640000 {
+-		label = "kernel_2";
+-		reg = <0x4640000 0x0a00000>;
+-	};
+-	partition at 5040000 {
+-		label = "rootfs2";
+-		reg = <0x5040000 0x2fc0000>;
++	partition at 140000 {
++		label = "ubi";
++		reg = <0x0140000 0x7ec0000>;
+ 	};
+ };
+ 
diff --git a/target/linux/kirkwood/patches-6.1/107-03-nsa325.patch b/target/linux/kirkwood/patches-6.1/107-03-nsa325.patch
new file mode 100644
index 0000000000..374c0895a9
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/107-03-nsa325.patch
@@ -0,0 +1,54 @@
+--- a/arch/arm/boot/dts/kirkwood-nsa325.dts
++++ b/arch/arm/boot/dts/kirkwood-nsa325.dts
+@@ -15,6 +15,13 @@
+ 	model = "ZyXEL NSA325";
+ 	compatible = "zyxel,nsa325", "marvell,kirkwood-88f6282", "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_green_sys;
++		led-failsafe = &led_orange_sys;
++		led-running = &led_green_sys;
++		led-upgrade = &led_orange_sys;
++	};
++
+ 	memory {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x20000000>;
+@@ -162,17 +169,19 @@
+ 			     &pmx_led_hdd1_green &pmx_led_hdd1_red>;
+ 		pinctrl-names = "default";
+ 
+-		green-sys {
++		led_green_sys: green-sys {
+ 			label = "nsa325:green:sys";
+ 			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
++			default-state = "on";
+ 		};
+-		orange-sys {
++		led_orange_sys: orange-sys {
+ 			label = "nsa325:orange:sys";
+ 			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
+ 		};
+ 		green-hdd1 {
+ 			label = "nsa325:green:hdd1";
+ 			gpios = <&gpio1 9 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "ata1";
+ 		};
+ 		red-hdd1 {
+ 			label = "nsa325:red:hdd1";
+@@ -181,6 +190,7 @@
+ 		green-hdd2 {
+ 			label = "nsa325:green:hdd2";
+ 			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "ata2";
+ 		};
+ 		red-hdd2 {
+ 			label = "nsa325:red:hdd2";
+@@ -189,6 +199,7 @@
+ 		green-usb {
+ 			label = "nsa325:green:usb";
+ 			gpios = <&gpio0 15 GPIO_ACTIVE_HIGH>;
++			linux,default-trigger = "usb-host";
+ 		};
+ 		green-copy {
+ 			label = "nsa325:green:copy";
diff --git a/target/linux/kirkwood/patches-6.1/109-pogoplug_v4.patch b/target/linux/kirkwood/patches-6.1/109-pogoplug_v4.patch
new file mode 100644
index 0000000000..4273eb9af1
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/109-pogoplug_v4.patch
@@ -0,0 +1,87 @@
+--- a/arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts
++++ b/arch/arm/boot/dts/kirkwood-pogoplug-series-4.dts
+@@ -18,12 +18,20 @@
+ 	compatible = "cloudengines,pogoplugv4", "marvell,kirkwood-88f6192",
+ 		     "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_health;
++		led-failsafe = &led_fault;
++		led-running = &led_health;
++		led-upgrade = &led_fault;
++	};
++
+ 	memory {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x08000000>;
+ 	};
+ 
+ 	chosen {
++		bootargs = "console=ttyS0,115200";
+ 		stdout-path = "uart0:115200n8";
+ 	};
+ 
+@@ -37,8 +45,8 @@
+ 		eject {
+ 			debounce-interval = <50>;
+ 			wakeup-source;
+-			linux,code = <KEY_EJECTCD>;
+-			label = "Eject Button";
++			linux,code = <KEY_RESTART>;
++			label = "Reset";
+ 			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
+ 		};
+ 	};
+@@ -48,12 +56,12 @@
+ 		pinctrl-0 = <&pmx_led_green &pmx_led_red>;
+ 		pinctrl-names = "default";
+ 
+-		health {
++		led_health: health {
+ 			label = "pogoplugv4:green:health";
+ 			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
+ 			default-state = "on";
+ 		};
+-		fault {
++		led_fault: fault {
+ 			label = "pogoplugv4:red:fault";
+ 			gpios = <&gpio0 24 GPIO_ACTIVE_LOW>;
+ 		};
+@@ -137,29 +145,19 @@
+ 		#size-cells = <1>;
+ 
+ 		partition at 0 {
+-			label = "u-boot";
+-			reg = <0x00000000 0x200000>;
++			label = "uboot";
++			reg = <0x00000000 0x1c0000>;
+ 			read-only;
+ 		};
+ 
+-		partition at 200000 {
+-			label = "uImage";
+-			reg = <0x00200000 0x300000>;
+-		};
+-
+-		partition at 500000 {
+-			label = "uImage2";
+-			reg = <0x00500000 0x300000>;
+-		};
+-
+-		partition at 800000 {
+-			label = "failsafe";
+-			reg = <0x00800000 0x800000>;
++		partition at 1c0000 {
++			label = "uboot_env";
++			reg = <0x001c0000 0x40000>;
+ 		};
+ 
+-		partition at 1000000 {
+-			label = "root";
+-			reg = <0x01000000 0x7000000>;
++		partition at 200000 {
++			label = "ubi";
++			reg = <0x00200000 0x7e00000>;
+ 		};
+ 	};
+ };
diff --git a/target/linux/kirkwood/patches-6.1/110-pogo_e02.patch b/target/linux/kirkwood/patches-6.1/110-pogo_e02.patch
new file mode 100644
index 0000000000..fc384d3521
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/110-pogo_e02.patch
@@ -0,0 +1,68 @@
+--- a/arch/arm/boot/dts/kirkwood-pogo_e02.dts
++++ b/arch/arm/boot/dts/kirkwood-pogo_e02.dts
+@@ -20,6 +20,13 @@
+ 	compatible = "cloudengines,pogoe02", "marvell,kirkwood-88f6281",
+ 		     "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_health;
++		led-failsafe = &led_fault;
++		led-running = &led_health;
++		led-upgrade = &led_fault;
++	};
++
+ 	memory {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x10000000>;
+@@ -33,12 +40,12 @@
+ 	gpio-leds {
+ 		compatible = "gpio-leds";
+ 
+-		health {
++		led_health: health {
+ 			label = "pogo_e02:green:health";
+ 			gpios = <&gpio1 16 GPIO_ACTIVE_LOW>;
+-			default-state = "keep";
++			default-state = "on";
+ 		};
+-		fault {
++		led_fault: fault {
+ 			label = "pogo_e02:orange:fault";
+ 			gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
+ 		};
+@@ -95,24 +102,24 @@
+ 	status = "okay";
+ 
+ 	partition at 0 {
+-		label = "u-boot";
+-		reg = <0x0000000 0x100000>;
++		label = "uboot";
++		reg = <0x0 0xe0000>;
+ 		read-only;
+ 	};
+ 
+-	partition at 100000 {
+-		label = "uImage";
+-		reg = <0x0100000 0x400000>;
++	partition at e0000 {
++		label = "uboot_env";
++		reg = <0xe0000 0x20000>;
+ 	};
+ 
+-	partition at 500000 {
+-		label = "pogoplug";
+-		reg = <0x0500000 0x2000000>;
++	partition at 100000 {
++		label = "second_stage_uboot";
++		reg = <0x100000 0x100000>;
+ 	};
+ 
+-	partition at 2500000 {
+-		label = "root";
+-		reg = <0x02500000 0x5b00000>;
++	partition at 200000 {
++		label = "ubi";
++		reg = <0x200000 0x7e00000>;
+ 	};
+ };
+ 
diff --git a/target/linux/kirkwood/patches-6.1/111-l-50.patch b/target/linux/kirkwood/patches-6.1/111-l-50.patch
new file mode 100644
index 0000000000..bc933cb610
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/111-l-50.patch
@@ -0,0 +1,47 @@
+--- a/arch/arm/boot/dts/kirkwood-l-50.dts
++++ b/arch/arm/boot/dts/kirkwood-l-50.dts
+@@ -18,6 +18,13 @@
+ 		reg = <0x00000000 0x20000000>;
+ 	};
+ 
++	aliases {
++		led-boot = &led_status_green;
++		led-failsafe = &led_status_red;
++		led-running = &led_status_green;
++		led-upgrade = &led_status_red;
++	};
++
+ 	chosen {
+ 		bootargs = "console=ttyS0,115200n8";
+ 		stdout-path = &uart0;
+@@ -95,12 +102,12 @@
+ 	leds {
+ 		compatible = "gpio-leds";
+ 
+-		status_green {
++		led_status_green: status_green {
+ 			label = "l-50:green:status";
+ 			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ 		};
+ 
+-		status_red {
++		led_status_red: status_red {
+ 			label = "l-50:red:status";
+ 			gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
+ 		};
+@@ -349,13 +356,8 @@
+ 	};
+ 
+ 	partition at 100000 {
+-		label = "kernel-1";
+-		reg = <0x00100000 0x00800000>;
+-	};
+-
+-	partition at 900000 {
+-		label = "rootfs-1";
+-		reg = <0x00900000 0x07100000>;
++		label = "ubi";
++		reg = <0x00100000 0x07900000>;
+ 	};
+ 
+ 	partition at 7a00000 {
diff --git a/target/linux/kirkwood/patches-6.1/112-sheevaplug.patch b/target/linux/kirkwood/patches-6.1/112-sheevaplug.patch
new file mode 100644
index 0000000000..d1ff9884a0
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/112-sheevaplug.patch
@@ -0,0 +1,47 @@
+--- a/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
++++ b/arch/arm/boot/dts/kirkwood-sheevaplug-common.dtsi
+@@ -78,13 +78,8 @@
+ 	};
+ 
+ 	partition at 100000 {
+-		label = "uImage";
+-		reg = <0x0100000 0x400000>;
+-	};
+-
+-	partition at 500000 {
+-		label = "root";
+-		reg = <0x0500000 0x1fb00000>;
++		label = "ubi";
++		reg = <0x0100000 0x1ff00000>;
+ 	};
+ };
+ 
+--- a/arch/arm/boot/dts/kirkwood-sheevaplug.dts
++++ b/arch/arm/boot/dts/kirkwood-sheevaplug.dts
+@@ -13,6 +13,13 @@
+ 	model = "Globalscale Technologies SheevaPlug";
+ 	compatible = "globalscale,sheevaplug", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_health;
++		led-failsafe = &led_health;
++		led-running = &led_health;
++		led-upgrade = &led_health;
++	};
++
+ 	ocp at f1000000 {
+ 		mvsdio at 90000 {
+ 			pinctrl-0 = <&pmx_sdio>;
+@@ -28,10 +35,10 @@
+ 		pinctrl-0 = <&pmx_led_blue &pmx_led_red>;
+ 		pinctrl-names = "default";
+ 
+-		health {
++		led_health: health {
+ 			label = "sheevaplug:blue:health";
+ 			gpios = <&gpio1 17 GPIO_ACTIVE_LOW>;
+-			default-state = "keep";
++			default-state = "on";
+ 		};
+ 
+ 		misc {
diff --git a/target/linux/kirkwood/patches-6.1/113-readynas_duo_v2.patch b/target/linux/kirkwood/patches-6.1/113-readynas_duo_v2.patch
new file mode 100644
index 0000000000..c6452c55a3
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/113-readynas_duo_v2.patch
@@ -0,0 +1,76 @@
+--- a/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
++++ b/arch/arm/boot/dts/kirkwood-netgear_readynas_duo_v2.dts
+@@ -19,6 +19,13 @@
+ 		reg = <0x00000000 0x10000000>;
+ 	};
+ 
++	aliases {
++		led-boot = &led_power;
++		led-failsafe = &led_power;
++		led-running = &led_power;
++		led-upgrade = &led_power;
++	};
++
+ 	chosen {
+ 		bootargs = "console=ttyS0,115200n8 earlyprintk";
+ 		stdout-path = &uart0;
+@@ -115,7 +122,7 @@
+ 			      &pmx_led_blue_backup >;
+ 		pinctrl-names = "default";
+ 
+-		power_led {
++		led_power: power_led {
+ 			label = "status:blue:power_led";
+ 			gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
+ 			default-state = "keep";
+@@ -129,11 +136,13 @@
+ 		disk1_led {
+ 			label = "status:blue:disk1_led";
+ 			gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "ata1";
+ 		};
+ 
+ 		disk2_led {
+ 			label = "status:blue:disk2_led";
+ 			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "ata2";
+ 		};
+ 
+ 		backup_led {
+@@ -150,7 +159,13 @@
+ 
+ 		power-button {
+ 			label = "Power Button";
+-			linux,code = <KEY_POWER>;
++			/* Power button and INT pin from PHY are both connected
++			 * to this GPIO. Every network restart causes PHY restart
++			 * and button is pressed. It's difficult to use it as
++			 * KEY_POWER without changes in kernel (or netifd) so
++			 * the button is configured as regular one.
++			 */
++			linux,code = <BTN_1>;
+ 			gpios = <&gpio1 15 GPIO_ACTIVE_LOW>;
+ 		};
+ 
+@@ -208,18 +223,13 @@
+ 	};
+ 
+ 	partition at 200000 {
+-		label = "uImage";
++		label = "kernel";
+ 		reg = <0x0200000 0x600000>;
+ 	};
+ 
+ 	partition at 800000 {
+-		label = "minirootfs";
+-		reg = <0x0800000 0x1000000>;
+-	};
+-
+-	partition at 1800000 {
+-		label = "jffs2";
+-		reg = <0x1800000 0x6800000>;
++		label = "ubi";
++		reg = <0x0800000 0x7800000>;
+ 	};
+ };
+ 
diff --git a/target/linux/kirkwood/patches-6.1/114-ctera-c-200-v1.patch b/target/linux/kirkwood/patches-6.1/114-ctera-c-200-v1.patch
new file mode 100644
index 0000000000..eb62e1a5ed
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/114-ctera-c-200-v1.patch
@@ -0,0 +1,58 @@
+--- a/arch/arm/boot/dts/kirkwood-c200-v1.dts
++++ b/arch/arm/boot/dts/kirkwood-c200-v1.dts
+@@ -14,6 +14,14 @@
+ 	model = "Ctera C200 V1";
+ 	compatible = "ctera,c200-v1", "marvell,kirkwood-88f6281", "marvell,kirkwood";
+ 
++
++	aliases {
++		led-boot = &led_status_green;
++		led-failsafe = &led_status_red;
++		led-running = &led_status_green;
++		led-upgrade = &led_status_red;
++	};
++
+ 	chosen {
+ 		bootargs = "console=ttyS0,115200";
+ 		stdout-path = &uart0;
+@@ -78,6 +86,7 @@
+ 			function-enumerator = <1>;
+ 			color = <LED_COLOR_ID_GREEN>;
+ 			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "ata1";
+ 		};
+ 
+ 		led-2 {
+@@ -85,6 +94,7 @@
+ 			function-enumerator = <2>;
+ 			color = <LED_COLOR_ID_GREEN>;
+ 			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "ata2";
+ 		};
+ 
+ 		led-3 {
+@@ -94,13 +104,13 @@
+ 			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
+ 		};
+ 
+-		led-4 {
++		led_status_red: led-4 {
+ 			function = LED_FUNCTION_STATUS;
+ 			color = <LED_COLOR_ID_RED>;
+ 			gpios = <&gpio1 6 GPIO_ACTIVE_LOW>;
+ 		};
+ 
+-		led-5 {
++		led_status_green: led-5 {
+ 			function = LED_FUNCTION_STATUS;
+ 			color = <LED_COLOR_ID_GREEN>;
+ 			gpios = <&gpio1 7 GPIO_ACTIVE_LOW>;
+@@ -240,7 +250,7 @@
+ 	};
+ 
+ 	partition at 7a00000 {
+-		label = "rootfs";
++		label = "ubi";
+ 		reg = <0x7a00000 0x8600000>;
+ 	};
+ };
diff --git a/target/linux/kirkwood/patches-6.1/115-nsa310s.patch b/target/linux/kirkwood/patches-6.1/115-nsa310s.patch
new file mode 100644
index 0000000000..4c6e08f49c
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/115-nsa310s.patch
@@ -0,0 +1,35 @@
+--- a/arch/arm/boot/dts/kirkwood-nsa310s.dts
++++ b/arch/arm/boot/dts/kirkwood-nsa310s.dts
+@@ -16,6 +16,13 @@
+ 	model = "ZyXEL NSA310S";
+ 	compatible = "zyxel,nsa310s", "marvell,kirkwood-88f6702", "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_green_sys;
++		led-failsafe = &led_red_sys;
++		led-running = &led_green_sys;
++		led-upgrade = &led_red_sys;
++	};
++
+ 	memory {
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x10000000>;
+@@ -96,14 +103,16 @@
+ 			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
+ 		};
+ 
+-		led-6 {
++		led_green_sys: led-6 {
++			label = "nsa310s:green:sys";
+ 			function = LED_FUNCTION_STATUS;
+ 			color = <LED_COLOR_ID_GREEN>;
+ 			gpios = <&gpio0 28 GPIO_ACTIVE_HIGH>;
+ 			linux,default-trigger = "default-on";
+ 		};
+ 
+-		led-7 {
++		led_red_sys: led-7 {
++			label = "nsa310s:red:sys";
+ 			function = LED_FUNCTION_STATUS;
+ 			color = <LED_COLOR_ID_RED>;
+ 			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
diff --git a/target/linux/kirkwood/patches-6.1/116-4i-edge-200.patch b/target/linux/kirkwood/patches-6.1/116-4i-edge-200.patch
new file mode 100644
index 0000000000..ffc46c29dc
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/116-4i-edge-200.patch
@@ -0,0 +1,34 @@
+--- a/arch/arm/boot/dts/kirkwood-4i-edge-200.dts
++++ b/arch/arm/boot/dts/kirkwood-4i-edge-200.dts
+@@ -20,6 +20,13 @@
+ 		reg = <0x00000000 0x20000000>;
+ 	};
+ 
++	aliases {
++		led-boot = &led_status_green;
++		led-failsafe = &led_status_orange;
++		led-running = &led_status_green;
++		led-upgrade = &led_status_orange;
++	};
++
+ 	chosen {
+ 		bootargs = "console=ttyS0,115200n8";
+ 		stdout-path = &uart0;
+@@ -37,13 +44,15 @@
+ 			linux,default-trigger = "mmc0";
+ 		};
+ 
+-		led-2 {
++		led_status_orange: led-2 {
++			label = "orange:status";
+ 			function = LED_FUNCTION_STATUS;
+ 			color = <LED_COLOR_ID_AMBER>;
+ 			gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
+ 		};
+ 
+-		led-3 {
++		led_status_green: led-3 {
++			label = "green:status";
+ 			function = LED_FUNCTION_STATUS;
+ 			color = <LED_COLOR_ID_GREEN>;
+ 			gpios = <&gpio1 17 GPIO_ACTIVE_HIGH>;
diff --git a/target/linux/kirkwood/patches-6.1/117-netgear_stora.patch b/target/linux/kirkwood/patches-6.1/117-netgear_stora.patch
new file mode 100644
index 0000000000..c7518933b2
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/117-netgear_stora.patch
@@ -0,0 +1,10 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -375,6 +375,7 @@ dtb-$(CONFIG_MACH_KIRKWOOD) += \
+ 	kirkwood-rs411.dtb \
+ 	kirkwood-sheevaplug.dtb \
+ 	kirkwood-sheevaplug-esata.dtb \
++	kirkwood-stora.dtb \
+ 	kirkwood-t5325.dtb \
+ 	kirkwood-topkick.dtb \
+ 	kirkwood-ts219-6281.dtb \
diff --git a/target/linux/kirkwood/patches-6.1/201-enable-sata-port-specific-led-triggers.patch b/target/linux/kirkwood/patches-6.1/201-enable-sata-port-specific-led-triggers.patch
new file mode 100644
index 0000000000..3db362de9f
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/201-enable-sata-port-specific-led-triggers.patch
@@ -0,0 +1,10 @@
+--- a/arch/arm/mach-mvebu/Kconfig
++++ b/arch/arm/mach-mvebu/Kconfig
+@@ -115,6 +115,7 @@ config MACH_DOVE
+ config MACH_KIRKWOOD
+ 	bool "Marvell Kirkwood boards"
+ 	depends on ARCH_MULTI_V5
++	select ARCH_WANT_LIBATA_LEDS
+ 	select CPU_FEROCEON
+ 	select GPIOLIB
+ 	select KIRKWOOD_CLK
diff --git a/target/linux/kirkwood/patches-6.1/202-linksys-find-active-root.patch b/target/linux/kirkwood/patches-6.1/202-linksys-find-active-root.patch
new file mode 100644
index 0000000000..5029b1791c
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/202-linksys-find-active-root.patch
@@ -0,0 +1,62 @@
+The WRT1900AC among other Linksys routers uses a dual-firmware layout.
+Dynamically rename the active partition to "ubi".
+
+Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
+---
+--- a/drivers/mtd/parsers/ofpart_core.c
++++ b/drivers/mtd/parsers/ofpart_core.c
+@@ -38,6 +38,8 @@ static bool node_has_compatible(struct d
+ 	return of_get_property(pp, "compatible", NULL);
+ }
+ 
++static int mangled_rootblock;
++
+ static int parse_fixed_partitions(struct mtd_info *master,
+ 				  const struct mtd_partition **pparts,
+ 				  struct mtd_part_parser_data *data)
+@@ -47,6 +49,7 @@ static int parse_fixed_partitions(struct
+ 	struct mtd_partition *parts;
+ 	struct device_node *mtd_node;
+ 	struct device_node *ofpart_node;
++	const char *owrtpart = "ubi";
+ 	const char *partname;
+ 	struct device_node *pp;
+ 	int nr_parts, i, ret = 0;
+@@ -152,9 +155,15 @@ static int parse_fixed_partitions(struct
+ 		parts[i].size = of_read_number(reg + a_cells, s_cells);
+ 		parts[i].of_node = pp;
+ 
+-		partname = of_get_property(pp, "label", &len);
+-		if (!partname)
+-			partname = of_get_property(pp, "name", &len);
++		if (mangled_rootblock && (i == mangled_rootblock)) {
++			partname = owrtpart;
++		} else {
++			partname = of_get_property(pp, "label", &len);
++
++			if (!partname)
++				partname = of_get_property(pp, "name", &len);
++		}
++
+ 		parts[i].name = partname;
+ 
+ 		if (of_get_property(pp, "read-only", &len))
+@@ -271,6 +280,18 @@ static int __init ofpart_parser_init(voi
+ 	return 0;
+ }
+ 
++static int __init active_root(char *str)
++{
++	get_option(&str, &mangled_rootblock);
++
++	if (!mangled_rootblock)
++		return 1;
++
++	return 1;
++}
++
++__setup("mangled_rootblock=", active_root);
++
+ static void __exit ofpart_parser_exit(void)
+ {
+ 	deregister_mtd_parser(&ofpart_parser);
diff --git a/target/linux/kirkwood/patches-6.1/203-blackarmor-nas220.patch b/target/linux/kirkwood/patches-6.1/203-blackarmor-nas220.patch
new file mode 100644
index 0000000000..e04a28206a
--- /dev/null
+++ b/target/linux/kirkwood/patches-6.1/203-blackarmor-nas220.patch
@@ -0,0 +1,99 @@
+--- a/arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
++++ b/arch/arm/boot/dts/kirkwood-blackarmor-nas220.dts
+@@ -17,6 +17,13 @@
+ 	compatible = "seagate,blackarmor-nas220","marvell,kirkwood-88f6192",
+ 		     "marvell,kirkwood";
+ 
++	aliases {
++		led-boot = &led_status_amber;
++		led-failsafe = &led_status_amber;
++		led-running = &led_status_blue;
++		led-upgrade = &led_status_amber;
++	};
++
+ 	memory { /* 128 MB */
+ 		device_type = "memory";
+ 		reg = <0x00000000 0x8000000>;
+@@ -36,14 +43,14 @@
+ 		compatible = "gpio-keys";
+ 
+ 		reset {
+-			label = "Reset";
+-			linux,code = <KEY_POWER>;
++			label = "Reset Button";
++			linux,code = <KEY_RESTART>;
+ 			gpios = <&gpio0 29 GPIO_ACTIVE_HIGH>;
+ 		};
+ 
+-		button {
+-			label = "Power";
+-			linux,code = <KEY_SLEEP>;
++		power {
++			label = "Power Button";
++			linux,code = <KEY_POWER>;
+ 			gpios = <&gpio0 26 GPIO_ACTIVE_LOW>;
+ 		};
+ 	};
+@@ -51,11 +58,27 @@
+ 	gpio-leds {
+ 		compatible = "gpio-leds";
+ 
+-		blue-power {
++		led_power_blue: power_blue {
+ 			label = "nas220:blue:power";
+ 			gpios = <&gpio0 12 GPIO_ACTIVE_HIGH>;
+ 			linux,default-trigger = "default-on";
+ 		};
++
++		disk_blue {
++			label = "nas220:blue:disk";
++			gpios = <&gpio0 16 GPIO_ACTIVE_LOW>;
++			linux,default-trigger = "disk-activity";
++		};
++
++		led_status_blue: status_blue {
++			label = "nas220:blue:status";
++			gpios = <&gpio0 23 GPIO_ACTIVE_HIGH>;
++		};
++
++		led_status_amber: status_amber {
++			label = "nas220:amber:status";
++			gpios = <&gpio0 22 GPIO_ACTIVE_HIGH>;
++		};
+ 	};
+ 
+ 	regulators {
+@@ -153,6 +176,33 @@
+ 
+ &nand {
+ 	status = "okay";
++
++	partitions {
++		compatible = "fixed-partitions";
++
++		partition at 0 {
++			label = "uboot";
++			reg = <0x0 0xa0000>;
++			read-only;
++		};
++
++		partition at a0000 {
++			label = "uboot-env";
++			reg = <0xa0000 0x10000>;
++			read-only;
++		};
++
++		partition at b0000 {
++			label = "reserved";
++			reg = <0xb0000 0x10000>;
++			read-only;
++		};
++
++		partition at c0000 {
++			label = "ubi";
++			reg = <0xc0000 0x1e80000>;
++		};
++	};
+ };
+ 
+ &mdio {



From lede-commits at lists.infradead.org  Thu Apr  4 13:42:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 04 Apr 2024 16:42:09 -0400
Subject: [openwrt/openwrt]  libubox: fix PKG_MIRROR_HASH of 2024-03-29
In-Reply-To: <171226332931.1998724.3397483017136689166@git-01.infra.openwrt.org>
References: <171226332931.1998724.3397483017136689166@git-01.infra.openwrt.org>
Message-ID: <mailman.23810.1712263336.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b906a9c78ef51cdc2f97dc6c39f92b9295f48d4e

commit b906a9c78ef51cdc2f97dc6c39f92b9295f48d4e
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Thu Apr 4 22:39:27 2024 +0200

    libubox: fix PKG_MIRROR_HASH of 2024-03-29
    
    The PKG_MIRROR_HASH was wrong (again), likely due to an old set of tools
    which did not contain the downgrade of xz.
    
    Ref 2070049 unetd: fix PKG_MIRROR_HASH
    Fix 89c594e libubox: update to Git HEAD (2024-03-29)"
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/libs/libubox/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index 34cf442ed4..e9426ee220 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -5,7 +5,7 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
-PKG_MIRROR_HASH:=bbf074296f9fe1dd1f42c0733ca294f93f3b7848549cbfb51dff6a3e9f682395
+PKG_MIRROR_HASH:=7fbaa84cfb553bebd780194fe7b8b502b7745e709e45912bce192cd1c8380016
 PKG_SOURCE_DATE:=2024-03-29
 PKG_SOURCE_VERSION:=eb9bcb64185ac155c02cc1a604692c4b00368324
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:45 -0400
Subject: [openwrt/openwrt]  ramips: 6.6: fix net drivers compatibility
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23879.1712296728.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7753b143cde79a048cdda003b9e2825f50399b2c

commit 7753b143cde79a048cdda003b9e2825f50399b2c
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Wed Mar 13 02:24:11 2024 +0100

    ramips: 6.6: fix net drivers compatibility
    
    Fix compatibility of ralink net drivers with kernel 6.6.
    It follows the kernel patch: u64_stats: Streamline the implementation (https://github.com/torvalds/linux/commit/44b0c2957adc62b86fcd51adeaf8e993171b)
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c   | 8 ++++++++
 .../linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c  | 8 ++++++++
 2 files changed, 16 insertions(+)

diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
index 9b028fbbc9..ca3b6fb302 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/ethtool.c
@@ -199,12 +199,20 @@ static void fe_get_ethtool_stats(struct net_device *dev,
 	do {
 		data_src = &hwstats->tx_bytes;
 		data_dst = data;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+		start = u64_stats_fetch_begin(&hwstats->syncp);
+#else
 		start = u64_stats_fetch_begin_irq(&hwstats->syncp);
+#endif
 
 		for (i = 0; i < ARRAY_SIZE(fe_gdma_str); i++)
 			*data_dst++ = *data_src++;
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+	} while (u64_stats_fetch_retry(&hwstats->syncp, start));
+#else
 	} while (u64_stats_fetch_retry_irq(&hwstats->syncp, start));
+#endif
 }
 
 static struct ethtool_ops fe_ethtool_ops = {
diff --git a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
index 3748264dad..4365e398d3 100644
--- a/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
+++ b/target/linux/ramips/files/drivers/net/ethernet/ralink/mtk_eth_soc.c
@@ -487,7 +487,11 @@ static void fe_get_stats64(struct net_device *dev,
 	}
 
 	do {
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+		start = u64_stats_fetch_begin(&hwstats->syncp);
+#else
 		start = u64_stats_fetch_begin_irq(&hwstats->syncp);
+#endif
 		storage->rx_packets = hwstats->rx_packets;
 		storage->tx_packets = hwstats->tx_packets;
 		storage->rx_bytes = hwstats->rx_bytes;
@@ -499,7 +503,11 @@ static void fe_get_stats64(struct net_device *dev,
 		storage->rx_crc_errors = hwstats->rx_fcs_errors;
 		storage->rx_errors = hwstats->rx_checksum_errors;
 		storage->tx_aborted_errors = hwstats->tx_skip;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+	} while (u64_stats_fetch_retry(&hwstats->syncp, start));
+#else
 	} while (u64_stats_fetch_retry_irq(&hwstats->syncp, start));
+#endif
 
 	storage->tx_errors = priv->netdev->stats.tx_errors;
 	storage->rx_dropped = priv->netdev->stats.rx_dropped;



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:41 -0400
Subject: [openwrt/openwrt]  kernel/ramips: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23880.1712296728.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7bd44e0a30600c07bc1d565b992c92ac32d83da7

commit 7bd44e0a30600c07bc1d565b992c92ac32d83da7
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sun Mar 17 18:11:22 2024 +0100

    kernel/ramips: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    During a `git bisect` session, `git bisect --skip` is recommended.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/mt7620/{config-6.1 => config-6.6} | 0
 target/linux/ramips/mt7621/{config-6.1 => config-6.6} | 0
 target/linux/ramips/mt76x8/{config-6.1 => config-6.6} | 0
 target/linux/ramips/rt288x/{config-6.1 => config-6.6} | 0
 target/linux/ramips/rt305x/{config-6.1 => config-6.6} | 0
 target/linux/ramips/rt3883/{config-6.1 => config-6.6} | 0
 6 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/ramips/mt7620/config-6.1 b/target/linux/ramips/mt7620/config-6.6
similarity index 100%
rename from target/linux/ramips/mt7620/config-6.1
rename to target/linux/ramips/mt7620/config-6.6
diff --git a/target/linux/ramips/mt7621/config-6.1 b/target/linux/ramips/mt7621/config-6.6
similarity index 100%
rename from target/linux/ramips/mt7621/config-6.1
rename to target/linux/ramips/mt7621/config-6.6
diff --git a/target/linux/ramips/mt76x8/config-6.1 b/target/linux/ramips/mt76x8/config-6.6
similarity index 100%
rename from target/linux/ramips/mt76x8/config-6.1
rename to target/linux/ramips/mt76x8/config-6.6
diff --git a/target/linux/ramips/rt288x/config-6.1 b/target/linux/ramips/rt288x/config-6.6
similarity index 100%
rename from target/linux/ramips/rt288x/config-6.1
rename to target/linux/ramips/rt288x/config-6.6
diff --git a/target/linux/ramips/rt305x/config-6.1 b/target/linux/ramips/rt305x/config-6.6
similarity index 100%
rename from target/linux/ramips/rt305x/config-6.1
rename to target/linux/ramips/rt305x/config-6.6
diff --git a/target/linux/ramips/rt3883/config-6.1 b/target/linux/ramips/rt3883/config-6.6
similarity index 100%
rename from target/linux/ramips/rt3883/config-6.1
rename to target/linux/ramips/rt3883/config-6.6



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:47 -0400
Subject: [openwrt/openwrt]  ramips: mt7620: alignment with updated
 snd_soc_dai_driver structure
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23881.1712296728.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fddadcae431b082f1735949739b6421c44e2b9c0

commit fddadcae431b082f1735949739b6421c44e2b9c0
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Mar 15 08:27:14 2024 +0100

    ramips: mt7620: alignment with updated snd_soc_dai_driver structure
    
    Fix error: 'struct snd_soc_dai_driver' has no member named 'remove'
    It follows the kernel patch: ASoC: soc-dai.h: remove unused call back functions (https://github.com/torvalds/linux/commit/446b31e894935ebbcf84302061a4e0e2efb2368f)
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch b/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch
index 2c40fba694..8e1095ab00 100644
--- a/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch
+++ b/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch
@@ -545,12 +545,12 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +	.shutdown = ralink_i2s_shutdown,
 +	.hw_params = ralink_i2s_hw_params,
 +	.trigger = ralink_i2s_trigger,
++	.probe = ralink_i2s_dai_probe,
++	.remove = ralink_i2s_dai_remove,
 +};
 +
 +static struct snd_soc_dai_driver ralink_i2s_dai = {
 +	.name = DRV_NAME,
-+	.probe = ralink_i2s_dai_probe,
-+	.remove = ralink_i2s_dai_remove,
 +	.ops = &ralink_i2s_dai_ops,
 +	.capture = {
 +		.stream_name = "I2S Capture",



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:48 -0400
Subject: [openwrt/openwrt]  ramips: adjusted pinctrl-aw9523 for kernel 6.6
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23882.1712296728.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/359a9295f2e3385afa867a6c350252d46dd39f6c

commit 359a9295f2e3385afa867a6c350252d46dd39f6c
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Mar 15 09:08:09 2024 +0100

    ramips: adjusted pinctrl-aw9523 for kernel 6.6
    
    Compatiblity with kernel 6.6 for Awinic AW9523B i2c pin controller driver.
    It follows the kernel patch: i2c: Drop legacy callback .probe_new() (https://github.com/torvalds/linux/commit/5eb1e6e459cfa025f79c43014f66ff62a55542f1)
    and kernel patch: gpiolib: Get rid of not used of_node member (https://github.com/torvalds/linux/commit/70d0fc4288dabd65025fde7774b4f9262afa9034)
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c | 8 ++++++++
 1 file changed, 8 insertions(+)

diff --git a/target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c b/target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
index 65babf9946..a429bb82a3 100644
--- a/target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
+++ b/target/linux/ramips/files/drivers/pinctrl/pinctrl-aw9523.c
@@ -810,7 +810,11 @@ static int aw9523_init_gpiochip(struct aw9523 *awi, unsigned int npins)
 	gpiochip->set_multiple = aw9523_gpio_set_multiple;
 	gpiochip->set_config = gpiochip_generic_config;
 	gpiochip->parent = dev;
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+	gpiochip->fwnode = dev->fwnode;
+#else
 	gpiochip->of_node = dev->of_node;
+#endif
 	gpiochip->owner = THIS_MODULE;
 	gpiochip->can_sleep = true;
 
@@ -984,8 +988,12 @@ static int aw9523_hw_init(struct aw9523 *awi)
 	return regmap_reinit_cache(awi->regmap, &aw9523_regmap);
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6, 6, 0)
+static int aw9523_probe(struct i2c_client *client)
+#else
 static int aw9523_probe(struct i2c_client *client,
 			const struct i2c_device_id *id)
+#endif
 {
 	struct device *dev = &client->dev;
 	struct pinctrl_desc *pdesc;



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:46 -0400
Subject: [openwrt/openwrt]  generic: fix detect_memory_region() function
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23883.1712296728.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c5dee97d873636234d219e29e8cfd106e5324fb7

commit c5dee97d873636234d219e29e8cfd106e5324fb7
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Thu Mar 14 03:39:01 2024 +0800

    generic: fix detect_memory_region() function
    
    This patch fixes the broken detect_memory_region() function on
    6.6 kernel.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 ...-kernel-fix-detect_memory_region-function.patch | 56 ++++++++++++++++++++++
 1 file changed, 56 insertions(+)

diff --git a/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch b/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch
new file mode 100644
index 0000000000..4654bc14ef
--- /dev/null
+++ b/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch
@@ -0,0 +1,56 @@
+From: Shiji Yang <yangshiji66 at outlook.com>
+Date: Wed, 13 Mar 2024 20:28:37 +0800
+Subject: [PATCH] mips: kernel: fix detect_memory_region() function
+
+1. Do not use memcmp() on unallocated memory, as the new introduced
+   fortify dynamic object size check[1] will report unexpected result.
+2. Use a fixed pattern instead of a random function pointer as the
+   magic value.
+3. Flip magic value and double check it.
+
+[1] 439a1bcac648 ("fortify: Use __builtin_dynamic_object_size() when available")
+Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
+---
+ arch/mips/kernel/setup.c | 16 +++++++++++-----
+ 1 file changed, 11 insertions(+), 5 deletions(-)
+
+--- a/arch/mips/kernel/setup.c
++++ b/arch/mips/kernel/setup.c
+@@ -46,6 +46,8 @@
+ #include <asm/prom.h>
+ #include <asm/fw/fw.h>
+ 
++#define MIPS_MEM_TEST_PATTERN		0xaa5555aa
++
+ #ifdef CONFIG_MIPS_ELF_APPENDED_DTB
+ char __section(".appended_dtb") __appended_dtb[0x100000];
+ #endif /* CONFIG_MIPS_ELF_APPENDED_DTB */
+@@ -90,7 +92,7 @@ static struct resource bss_resource = {
+ unsigned long __kaslr_offset __ro_after_init;
+ EXPORT_SYMBOL(__kaslr_offset);
+ 
+-static void *detect_magic __initdata = detect_memory_region;
++static u32 detect_magic __initdata;
+ 
+ #ifdef CONFIG_MIPS_AUTO_PFN_OFFSET
+ unsigned long ARCH_PFN_OFFSET;
+@@ -99,12 +101,16 @@ EXPORT_SYMBOL(ARCH_PFN_OFFSET);
+ 
+ void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max)
+ {
+-	void *dm = &detect_magic;
++	void *dm = (void *)KSEG1ADDR(&detect_magic);
+ 	phys_addr_t size;
+ 
+ 	for (size = sz_min; size < sz_max; size <<= 1) {
+-		if (!memcmp(dm, dm + size, sizeof(detect_magic)))
+-			break;
++		__raw_writel(MIPS_MEM_TEST_PATTERN, dm);
++		if (__raw_readl(dm) == __raw_readl(dm + size)) {
++			__raw_writel(~MIPS_MEM_TEST_PATTERN, dm);
++			if (__raw_readl(dm) == __raw_readl(dm + size))
++				break;
++		}
+ 	}
+ 
+ 	pr_debug("Memory: %lluMB of RAM detected at 0x%llx (min: %lluMB, max: %lluMB)\n",



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:39 -0400
Subject: [openwrt/openwrt]  kernel/ramips: Create kernel patches for v6.6
 (from v6.1)
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23884.1712296733.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f19f8a886bd220f7dbf106a3804e679b862c40ec

commit f19f8a886bd220f7dbf106a3804e679b862c40ec
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sat Mar 16 11:58:22 2024 +0100

    kernel/ramips: Create kernel patches for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    During a `git bisect` session, `git bisect --skip` is recommended.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../003-v6.3-clk-ralink-fix-mt7621_gate_is_enabled-function.patch         | 0
 .../005-v6.5-01-dt-bindings-clock-add-mtmips-SoCs-system-controller.patch | 0
 ...005-v6.5-02-clk-ralink-add-clock-and-reset-driver-for-MTMIPS-SoC.patch | 0
 .../005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch        | 0
 .../005-v6.5-04-mips-ralink-rt305x-remove-clock-related-code.patch        | 0
 .../005-v6.5-05-mips-ralink-rt3883-remove-clock-related-code.patch        | 0
 .../005-v6.5-06-mips-ralink-mt7620-remove-clock-related-code.patch        | 0
 .../005-v6.5-07-mips-ralink-remove-reset-related-code.patch               | 0
 .../005-v6.5-08-mips-ralink-get-cpu-rate-from-new-driver-code.patch       | 0
 .../005-v6.5-09-MAINTAINERS-add-Mediatek-MTMIPS-Clock-maintainer.patch    | 0
 .../006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch   | 0
 .../007-v6.5-clk-ralink-mtmips-Fix-uninitialized-use-of-ret-in-mt.patch   | 0
 .../008-v6.5-mips-ralink-match-all-supported-system-controller-co.patch   | 0
 ...009-v6.3-01-watchdog-mt7621-wdt-avoid-static-global-declarations.patch | 0
 ...009-v6.3-02-watchdog-mt7621-wdt-avoid-ralink-architecture-depend.patch | 0
 ...010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch | 0
 ...010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch | 0
 .../110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch     | 0
 target/linux/ramips/{patches-6.1 => patches-6.6}/200-add-ralink-eth.patch | 0
 .../300-mt7620-export-chip-version-and-pkg.patch                          | 0
 .../311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch        | 0
 .../312-MIPS-ralink-add-cpu-frequency-scaling.patch                       | 0
 .../314-MIPS-add-bootargs-override-property.patch                         | 0
 .../315-owrt-hack-fix-mt7688-cache-issue.patch                            | 0
 .../316-arch-mips-do-not-select-illegal-access-driver-by-def.patch        | 0
 .../320-MIPS-add-support-for-buggy-MT7621S-core-detection.patch           | 0
 .../ramips/{patches-6.1 => patches-6.6}/324-mt7621-perfctr-fix.patch      | 0
 .../400-mtd-cfi-cmdset-0002-force-word-write.patch                        | 0
 .../405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch               | 0
 .../410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch        | 0
 .../411-dt-bindings-add-documentation-for-mt7621-nand-driver.patch        | 0
 .../700-net-ethernet-mediatek-support-net-labels.patch                    | 0
 .../720-Revert-net-phy-simplify-phy_link_change-arguments.patch           | 0
 .../721-NET-no-auto-carrier-off-support.patch                             | 0
 .../800-dmaengine-mediatek-add-HSDMA-support-for-mt7621.patch             | 0
 .../801-DT-Add-documentation-for-gpio-ralink.patch                        | 0
 .../802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch             | 0
 .../803-gpio-ralink-Add-support-for-GPIO-as-interrupt-contro.patch        | 0
 target/linux/ramips/{patches-6.1 => patches-6.6}/805-pinctrl-AW9523.patch | 0
 .../808-pinctrl-mtmips-support-requesting-different-function.patch        | 0
 .../810-uvc-add-iPassion-iP2970-support.patch                             | 0
 .../820-DT-Add-documentation-for-spi-rt2880.patch                         | 0
 .../821-SPI-ralink-add-Ralink-SoC-spi-driver.patch                        | 0
 .../825-i2c-MIPS-adds-ralink-I2C-driver.patch                             | 0
 .../830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch                   | 0
 .../ramips/{patches-6.1 => patches-6.6}/835-asoc-add-mt7620-support.patch | 0
 .../840-serial-add-ugly-custom-baud-rate-hack.patch                       | 0
 .../{patches-6.1 => patches-6.6}/845-pwm-add-mediatek-support.patch       | 0
 .../{patches-6.1 => patches-6.6}/850-awake-rt305x-dwc2-controller.patch   | 0
 .../linux/ramips/{patches-6.1 => patches-6.6}/855-linkit_bootstrap.patch  | 0
 .../ramips/{patches-6.1 => patches-6.6}/860-ramips-add-eip93-driver.patch | 0
 51 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/ramips/patches-6.1/003-v6.3-clk-ralink-fix-mt7621_gate_is_enabled-function.patch b/target/linux/ramips/patches-6.6/003-v6.3-clk-ralink-fix-mt7621_gate_is_enabled-function.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/003-v6.3-clk-ralink-fix-mt7621_gate_is_enabled-function.patch
rename to target/linux/ramips/patches-6.6/003-v6.3-clk-ralink-fix-mt7621_gate_is_enabled-function.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-01-dt-bindings-clock-add-mtmips-SoCs-system-controller.patch b/target/linux/ramips/patches-6.6/005-v6.5-01-dt-bindings-clock-add-mtmips-SoCs-system-controller.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-01-dt-bindings-clock-add-mtmips-SoCs-system-controller.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-01-dt-bindings-clock-add-mtmips-SoCs-system-controller.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-02-clk-ralink-add-clock-and-reset-driver-for-MTMIPS-SoC.patch b/target/linux/ramips/patches-6.6/005-v6.5-02-clk-ralink-add-clock-and-reset-driver-for-MTMIPS-SoC.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-02-clk-ralink-add-clock-and-reset-driver-for-MTMIPS-SoC.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-02-clk-ralink-add-clock-and-reset-driver-for-MTMIPS-SoC.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-04-mips-ralink-rt305x-remove-clock-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-04-mips-ralink-rt305x-remove-clock-related-code.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-04-mips-ralink-rt305x-remove-clock-related-code.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-04-mips-ralink-rt305x-remove-clock-related-code.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-05-mips-ralink-rt3883-remove-clock-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-05-mips-ralink-rt3883-remove-clock-related-code.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-05-mips-ralink-rt3883-remove-clock-related-code.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-05-mips-ralink-rt3883-remove-clock-related-code.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-06-mips-ralink-mt7620-remove-clock-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-06-mips-ralink-mt7620-remove-clock-related-code.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-06-mips-ralink-mt7620-remove-clock-related-code.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-06-mips-ralink-mt7620-remove-clock-related-code.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-07-mips-ralink-remove-reset-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-07-mips-ralink-remove-reset-related-code.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-07-mips-ralink-remove-reset-related-code.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-07-mips-ralink-remove-reset-related-code.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-08-mips-ralink-get-cpu-rate-from-new-driver-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-08-mips-ralink-get-cpu-rate-from-new-driver-code.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-08-mips-ralink-get-cpu-rate-from-new-driver-code.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-08-mips-ralink-get-cpu-rate-from-new-driver-code.patch
diff --git a/target/linux/ramips/patches-6.1/005-v6.5-09-MAINTAINERS-add-Mediatek-MTMIPS-Clock-maintainer.patch b/target/linux/ramips/patches-6.6/005-v6.5-09-MAINTAINERS-add-Mediatek-MTMIPS-Clock-maintainer.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/005-v6.5-09-MAINTAINERS-add-Mediatek-MTMIPS-Clock-maintainer.patch
rename to target/linux/ramips/patches-6.6/005-v6.5-09-MAINTAINERS-add-Mediatek-MTMIPS-Clock-maintainer.patch
diff --git a/target/linux/ramips/patches-6.1/006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch b/target/linux/ramips/patches-6.6/006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch
rename to target/linux/ramips/patches-6.6/006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch
diff --git a/target/linux/ramips/patches-6.1/007-v6.5-clk-ralink-mtmips-Fix-uninitialized-use-of-ret-in-mt.patch b/target/linux/ramips/patches-6.6/007-v6.5-clk-ralink-mtmips-Fix-uninitialized-use-of-ret-in-mt.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/007-v6.5-clk-ralink-mtmips-Fix-uninitialized-use-of-ret-in-mt.patch
rename to target/linux/ramips/patches-6.6/007-v6.5-clk-ralink-mtmips-Fix-uninitialized-use-of-ret-in-mt.patch
diff --git a/target/linux/ramips/patches-6.1/008-v6.5-mips-ralink-match-all-supported-system-controller-co.patch b/target/linux/ramips/patches-6.6/008-v6.5-mips-ralink-match-all-supported-system-controller-co.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/008-v6.5-mips-ralink-match-all-supported-system-controller-co.patch
rename to target/linux/ramips/patches-6.6/008-v6.5-mips-ralink-match-all-supported-system-controller-co.patch
diff --git a/target/linux/ramips/patches-6.1/009-v6.3-01-watchdog-mt7621-wdt-avoid-static-global-declarations.patch b/target/linux/ramips/patches-6.6/009-v6.3-01-watchdog-mt7621-wdt-avoid-static-global-declarations.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/009-v6.3-01-watchdog-mt7621-wdt-avoid-static-global-declarations.patch
rename to target/linux/ramips/patches-6.6/009-v6.3-01-watchdog-mt7621-wdt-avoid-static-global-declarations.patch
diff --git a/target/linux/ramips/patches-6.1/009-v6.3-02-watchdog-mt7621-wdt-avoid-ralink-architecture-depend.patch b/target/linux/ramips/patches-6.6/009-v6.3-02-watchdog-mt7621-wdt-avoid-ralink-architecture-depend.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/009-v6.3-02-watchdog-mt7621-wdt-avoid-ralink-architecture-depend.patch
rename to target/linux/ramips/patches-6.6/009-v6.3-02-watchdog-mt7621-wdt-avoid-ralink-architecture-depend.patch
diff --git a/target/linux/ramips/patches-6.1/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch b/target/linux/ramips/patches-6.6/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch
rename to target/linux/ramips/patches-6.6/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch
diff --git a/target/linux/ramips/patches-6.1/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch b/target/linux/ramips/patches-6.6/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch
rename to target/linux/ramips/patches-6.6/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch
diff --git a/target/linux/ramips/patches-6.1/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch b/target/linux/ramips/patches-6.6/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch
rename to target/linux/ramips/patches-6.6/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch
diff --git a/target/linux/ramips/patches-6.1/200-add-ralink-eth.patch b/target/linux/ramips/patches-6.6/200-add-ralink-eth.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/200-add-ralink-eth.patch
rename to target/linux/ramips/patches-6.6/200-add-ralink-eth.patch
diff --git a/target/linux/ramips/patches-6.1/300-mt7620-export-chip-version-and-pkg.patch b/target/linux/ramips/patches-6.6/300-mt7620-export-chip-version-and-pkg.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/300-mt7620-export-chip-version-and-pkg.patch
rename to target/linux/ramips/patches-6.6/300-mt7620-export-chip-version-and-pkg.patch
diff --git a/target/linux/ramips/patches-6.1/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch b/target/linux/ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
rename to target/linux/ramips/patches-6.6/311-MIPS-use-set_mode-to-enable-disable-the-cevt-r4k-irq.patch
diff --git a/target/linux/ramips/patches-6.1/312-MIPS-ralink-add-cpu-frequency-scaling.patch b/target/linux/ramips/patches-6.6/312-MIPS-ralink-add-cpu-frequency-scaling.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/312-MIPS-ralink-add-cpu-frequency-scaling.patch
rename to target/linux/ramips/patches-6.6/312-MIPS-ralink-add-cpu-frequency-scaling.patch
diff --git a/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch b/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch
rename to target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch
diff --git a/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch
rename to target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch
diff --git a/target/linux/ramips/patches-6.1/316-arch-mips-do-not-select-illegal-access-driver-by-def.patch b/target/linux/ramips/patches-6.6/316-arch-mips-do-not-select-illegal-access-driver-by-def.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/316-arch-mips-do-not-select-illegal-access-driver-by-def.patch
rename to target/linux/ramips/patches-6.6/316-arch-mips-do-not-select-illegal-access-driver-by-def.patch
diff --git a/target/linux/ramips/patches-6.1/320-MIPS-add-support-for-buggy-MT7621S-core-detection.patch b/target/linux/ramips/patches-6.6/320-MIPS-add-support-for-buggy-MT7621S-core-detection.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/320-MIPS-add-support-for-buggy-MT7621S-core-detection.patch
rename to target/linux/ramips/patches-6.6/320-MIPS-add-support-for-buggy-MT7621S-core-detection.patch
diff --git a/target/linux/ramips/patches-6.1/324-mt7621-perfctr-fix.patch b/target/linux/ramips/patches-6.6/324-mt7621-perfctr-fix.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/324-mt7621-perfctr-fix.patch
rename to target/linux/ramips/patches-6.6/324-mt7621-perfctr-fix.patch
diff --git a/target/linux/ramips/patches-6.1/400-mtd-cfi-cmdset-0002-force-word-write.patch b/target/linux/ramips/patches-6.6/400-mtd-cfi-cmdset-0002-force-word-write.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/400-mtd-cfi-cmdset-0002-force-word-write.patch
rename to target/linux/ramips/patches-6.6/400-mtd-cfi-cmdset-0002-force-word-write.patch
diff --git a/target/linux/ramips/patches-6.1/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch b/target/linux/ramips/patches-6.6/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
rename to target/linux/ramips/patches-6.6/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
diff --git a/target/linux/ramips/patches-6.1/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch b/target/linux/ramips/patches-6.6/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
rename to target/linux/ramips/patches-6.6/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
diff --git a/target/linux/ramips/patches-6.1/411-dt-bindings-add-documentation-for-mt7621-nand-driver.patch b/target/linux/ramips/patches-6.6/411-dt-bindings-add-documentation-for-mt7621-nand-driver.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/411-dt-bindings-add-documentation-for-mt7621-nand-driver.patch
rename to target/linux/ramips/patches-6.6/411-dt-bindings-add-documentation-for-mt7621-nand-driver.patch
diff --git a/target/linux/ramips/patches-6.1/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/700-net-ethernet-mediatek-support-net-labels.patch
rename to target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch
diff --git a/target/linux/ramips/patches-6.1/720-Revert-net-phy-simplify-phy_link_change-arguments.patch b/target/linux/ramips/patches-6.6/720-Revert-net-phy-simplify-phy_link_change-arguments.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/720-Revert-net-phy-simplify-phy_link_change-arguments.patch
rename to target/linux/ramips/patches-6.6/720-Revert-net-phy-simplify-phy_link_change-arguments.patch
diff --git a/target/linux/ramips/patches-6.1/721-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-6.6/721-NET-no-auto-carrier-off-support.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/721-NET-no-auto-carrier-off-support.patch
rename to target/linux/ramips/patches-6.6/721-NET-no-auto-carrier-off-support.patch
diff --git a/target/linux/ramips/patches-6.1/800-dmaengine-mediatek-add-HSDMA-support-for-mt7621.patch b/target/linux/ramips/patches-6.6/800-dmaengine-mediatek-add-HSDMA-support-for-mt7621.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/800-dmaengine-mediatek-add-HSDMA-support-for-mt7621.patch
rename to target/linux/ramips/patches-6.6/800-dmaengine-mediatek-add-HSDMA-support-for-mt7621.patch
diff --git a/target/linux/ramips/patches-6.1/801-DT-Add-documentation-for-gpio-ralink.patch b/target/linux/ramips/patches-6.6/801-DT-Add-documentation-for-gpio-ralink.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/801-DT-Add-documentation-for-gpio-ralink.patch
rename to target/linux/ramips/patches-6.6/801-DT-Add-documentation-for-gpio-ralink.patch
diff --git a/target/linux/ramips/patches-6.1/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch b/target/linux/ramips/patches-6.6/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
rename to target/linux/ramips/patches-6.6/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
diff --git a/target/linux/ramips/patches-6.1/803-gpio-ralink-Add-support-for-GPIO-as-interrupt-contro.patch b/target/linux/ramips/patches-6.6/803-gpio-ralink-Add-support-for-GPIO-as-interrupt-contro.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/803-gpio-ralink-Add-support-for-GPIO-as-interrupt-contro.patch
rename to target/linux/ramips/patches-6.6/803-gpio-ralink-Add-support-for-GPIO-as-interrupt-contro.patch
diff --git a/target/linux/ramips/patches-6.1/805-pinctrl-AW9523.patch b/target/linux/ramips/patches-6.6/805-pinctrl-AW9523.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/805-pinctrl-AW9523.patch
rename to target/linux/ramips/patches-6.6/805-pinctrl-AW9523.patch
diff --git a/target/linux/ramips/patches-6.1/808-pinctrl-mtmips-support-requesting-different-function.patch b/target/linux/ramips/patches-6.6/808-pinctrl-mtmips-support-requesting-different-function.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/808-pinctrl-mtmips-support-requesting-different-function.patch
rename to target/linux/ramips/patches-6.6/808-pinctrl-mtmips-support-requesting-different-function.patch
diff --git a/target/linux/ramips/patches-6.1/810-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/810-uvc-add-iPassion-iP2970-support.patch
rename to target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch
diff --git a/target/linux/ramips/patches-6.1/820-DT-Add-documentation-for-spi-rt2880.patch b/target/linux/ramips/patches-6.6/820-DT-Add-documentation-for-spi-rt2880.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/820-DT-Add-documentation-for-spi-rt2880.patch
rename to target/linux/ramips/patches-6.6/820-DT-Add-documentation-for-spi-rt2880.patch
diff --git a/target/linux/ramips/patches-6.1/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch b/target/linux/ramips/patches-6.6/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
rename to target/linux/ramips/patches-6.6/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
diff --git a/target/linux/ramips/patches-6.1/825-i2c-MIPS-adds-ralink-I2C-driver.patch b/target/linux/ramips/patches-6.6/825-i2c-MIPS-adds-ralink-I2C-driver.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/825-i2c-MIPS-adds-ralink-I2C-driver.patch
rename to target/linux/ramips/patches-6.6/825-i2c-MIPS-adds-ralink-I2C-driver.patch
diff --git a/target/linux/ramips/patches-6.1/830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch b/target/linux/ramips/patches-6.6/830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
rename to target/linux/ramips/patches-6.6/830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
diff --git a/target/linux/ramips/patches-6.1/835-asoc-add-mt7620-support.patch b/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/835-asoc-add-mt7620-support.patch
rename to target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch
diff --git a/target/linux/ramips/patches-6.1/840-serial-add-ugly-custom-baud-rate-hack.patch b/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/840-serial-add-ugly-custom-baud-rate-hack.patch
rename to target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch
diff --git a/target/linux/ramips/patches-6.1/845-pwm-add-mediatek-support.patch b/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/845-pwm-add-mediatek-support.patch
rename to target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch
diff --git a/target/linux/ramips/patches-6.1/850-awake-rt305x-dwc2-controller.patch b/target/linux/ramips/patches-6.6/850-awake-rt305x-dwc2-controller.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/850-awake-rt305x-dwc2-controller.patch
rename to target/linux/ramips/patches-6.6/850-awake-rt305x-dwc2-controller.patch
diff --git a/target/linux/ramips/patches-6.1/855-linkit_bootstrap.patch b/target/linux/ramips/patches-6.6/855-linkit_bootstrap.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/855-linkit_bootstrap.patch
rename to target/linux/ramips/patches-6.6/855-linkit_bootstrap.patch
diff --git a/target/linux/ramips/patches-6.1/860-ramips-add-eip93-driver.patch b/target/linux/ramips/patches-6.6/860-ramips-add-eip93-driver.patch
similarity index 100%
rename from target/linux/ramips/patches-6.1/860-ramips-add-eip93-driver.patch
rename to target/linux/ramips/patches-6.6/860-ramips-add-eip93-driver.patch



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:44 -0400
Subject: [openwrt/openwrt]  ramips: 6.6: refresh patches
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23887.1712296734.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0e5fb421a997bc9862a996fe93f63d5fe8bcb195

commit 0e5fb421a997bc9862a996fe93f63d5fe8bcb195
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu Mar 14 23:27:46 2024 +0100

    ramips: 6.6: refresh patches
    
    Refresh kernel patches.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../300-mt7620-export-chip-version-and-pkg.patch   |  2 +-
 .../314-MIPS-add-bootargs-override-property.patch  |  4 ++--
 .../315-owrt-hack-fix-mt7688-cache-issue.patch     |  4 ++--
 .../400-mtd-cfi-cmdset-0002-force-word-write.patch |  2 +-
 ...spi-nor-Add-support-for-BoHong-bh25q128as.patch |  4 ++--
 ...-add-driver-support-for-MT7621-nand-flash.patch |  4 ++--
 ...-net-ethernet-mediatek-support-net-labels.patch |  8 ++++----
 ...et-phy-simplify-phy_link_change-arguments.patch | 22 +++++++++++-----------
 .../721-NET-no-auto-carrier-off-support.patch      | 10 +++++-----
 ...IPS-ralink-add-gpio-driver-for-ralink-SoC.patch |  8 ++++----
 ...ips-support-requesting-different-function.patch |  8 ++++----
 .../810-uvc-add-iPassion-iP2970-support.patch      | 18 +++++++++---------
 .../821-SPI-ralink-add-Ralink-SoC-spi-driver.patch | 14 +++++++-------
 .../825-i2c-MIPS-adds-ralink-I2C-driver.patch      |  4 ++--
 ...mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch |  2 +-
 .../patches-6.6/835-asoc-add-mt7620-support.patch  |  4 ++--
 ...840-serial-add-ugly-custom-baud-rate-hack.patch |  2 +-
 .../patches-6.6/845-pwm-add-mediatek-support.patch |  8 ++++----
 .../850-awake-rt305x-dwc2-controller.patch         |  2 +-
 .../ramips/patches-6.6/855-linkit_bootstrap.patch  |  2 +-
 .../patches-6.6/860-ramips-add-eip93-driver.patch  | 10 +++++-----
 21 files changed, 71 insertions(+), 71 deletions(-)

diff --git a/target/linux/ramips/patches-6.6/300-mt7620-export-chip-version-and-pkg.patch b/target/linux/ramips/patches-6.6/300-mt7620-export-chip-version-and-pkg.patch
index 4f4fe9018a..6b80acec98 100644
--- a/target/linux/ramips/patches-6.6/300-mt7620-export-chip-version-and-pkg.patch
+++ b/target/linux/ramips/patches-6.6/300-mt7620-export-chip-version-and-pkg.patch
@@ -1,6 +1,6 @@
 --- a/arch/mips/include/asm/mach-ralink/mt7620.h
 +++ b/arch/mips/include/asm/mach-ralink/mt7620.h
-@@ -61,4 +61,16 @@ static inline int mt7620_get_eco(void)
+@@ -62,4 +62,16 @@ static inline int mt7620_get_eco(void)
  	return rt_sysc_r32(SYSC_REG_CHIP_REV) & CHIP_REV_ECO_MASK;
  }
  
diff --git a/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch b/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch
index 26a28167c6..f9975986fe 100644
--- a/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch
+++ b/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch
@@ -17,7 +17,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -557,8 +557,28 @@ static int __init bootcmdline_scan_chose
+@@ -563,8 +563,28 @@ static int __init bootcmdline_scan_chose
  
  #endif /* CONFIG_OF_EARLY_FLATTREE */
  
@@ -46,7 +46,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	bool dt_bootargs = false;
  
  	/*
-@@ -572,6 +592,14 @@ static void __init bootcmdline_init(void
+@@ -578,6 +598,14 @@ static void __init bootcmdline_init(void
  	}
  
  	/*
diff --git a/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch
index c31e6d7cde..04f0a67325 100644
--- a/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch
+++ b/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -699,7 +699,6 @@ static void __init arch_mem_init(char **
+@@ -705,7 +705,6 @@ static void __init arch_mem_init(char **
  	mips_reserve_vmcore();
  
  	mips_parse_crashkernel();
@@ -18,7 +18,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	/*
  	 * In order to reduce the possibility of kernel panic when failed to
-@@ -834,6 +833,7 @@ void __init setup_arch(char **cmdline_p)
+@@ -841,6 +840,7 @@ void __init setup_arch(char **cmdline_p)
  
  	cpu_cache_init();
  	paging_init();
diff --git a/target/linux/ramips/patches-6.6/400-mtd-cfi-cmdset-0002-force-word-write.patch b/target/linux/ramips/patches-6.6/400-mtd-cfi-cmdset-0002-force-word-write.patch
index 7011bbe50b..a1b861e412 100644
--- a/target/linux/ramips/patches-6.6/400-mtd-cfi-cmdset-0002-force-word-write.patch
+++ b/target/linux/ramips/patches-6.6/400-mtd-cfi-cmdset-0002-force-word-write.patch
@@ -9,7 +9,7 @@ Subject: [PATCH 37/53] mtd: cfi cmdset 0002 force word write
 
 --- a/drivers/mtd/chips/cfi_cmdset_0002.c
 +++ b/drivers/mtd/chips/cfi_cmdset_0002.c
-@@ -40,7 +40,7 @@
+@@ -38,7 +38,7 @@
  #include <linux/mtd/xip.h>
  
  #define AMD_BOOTLOC_BUG
diff --git a/target/linux/ramips/patches-6.6/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch b/target/linux/ramips/patches-6.6/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
index 3b88f78602..0e68aa5907 100644
--- a/target/linux/ramips/patches-6.6/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
+++ b/target/linux/ramips/patches-6.6/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
@@ -55,7 +55,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 +};
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -1620,6 +1620,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
+@@ -2001,6 +2001,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
  
  static const struct spi_nor_manufacturer *manufacturers[] = {
  	&spi_nor_atmel,
@@ -65,7 +65,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	&spi_nor_esmt,
 --- a/drivers/mtd/spi-nor/core.h
 +++ b/drivers/mtd/spi-nor/core.h
-@@ -617,6 +617,7 @@ struct sfdp {
+@@ -631,6 +631,7 @@ struct sfdp {
  
  /* Manufacturer drivers. */
  extern const struct spi_nor_manufacturer spi_nor_atmel;
diff --git a/target/linux/ramips/patches-6.6/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch b/target/linux/ramips/patches-6.6/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
index 438cc1ea8f..51f1a5ec5e 100644
--- a/target/linux/ramips/patches-6.6/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
+++ b/target/linux/ramips/patches-6.6/410-mtd-rawnand-add-driver-support-for-MT7621-nand-flash.patch
@@ -20,7 +20,7 @@ Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
 
 --- a/drivers/mtd/nand/raw/Kconfig
 +++ b/drivers/mtd/nand/raw/Kconfig
-@@ -352,6 +352,14 @@ config MTD_NAND_QCOM
+@@ -338,6 +338,14 @@ config MTD_NAND_QCOM
  	  Enables support for NAND flash chips on SoCs containing the EBI2 NAND
  	  controller. This controller is found on IPQ806x SoC.
  
@@ -37,7 +37,7 @@ Signed-off-by: Weijie Gao <weijie.gao at mediatek.com>
  	depends on MTD_NAND_ECC_MEDIATEK
 --- a/drivers/mtd/nand/raw/Makefile
 +++ b/drivers/mtd/nand/raw/Makefile
-@@ -48,6 +48,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI)		+= sunxi_n
+@@ -46,6 +46,7 @@ obj-$(CONFIG_MTD_NAND_SUNXI)		+= sunxi_n
  obj-$(CONFIG_MTD_NAND_HISI504)	        += hisi504_nand.o
  obj-$(CONFIG_MTD_NAND_BRCMNAND)		+= brcmnand/
  obj-$(CONFIG_MTD_NAND_QCOM)		+= qcom_nandc.o
diff --git a/target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch
index a6e2aa04ca..0a7f7785db 100644
--- a/target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch
+++ b/target/linux/ramips/patches-6.6/700-net-ethernet-mediatek-support-net-labels.patch
@@ -14,7 +14,7 @@ Signed-off-by: Ren? van Dorst <opensource at vdorst.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4643,6 +4643,7 @@ static const struct net_device_ops mtk_n
+@@ -4662,6 +4662,7 @@ static const struct net_device_ops mtk_n
  
  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
  {
@@ -22,9 +22,9 @@ Signed-off-by: Ren? van Dorst <opensource at vdorst.com>
  	const __be32 *_id = of_get_property(np, "reg", NULL);
  	struct device_node *pcs_np;
  	phy_interface_t phy_mode;
-@@ -4840,6 +4841,9 @@ static int mtk_add_mac(struct mtk_eth *e
- 		register_netdevice_notifier(&mac->device_notifier);
- 	}
+@@ -4875,6 +4876,9 @@ static int mtk_add_mac(struct mtk_eth *e
+ 						NETDEV_XDP_ACT_NDO_XMIT |
+ 						NETDEV_XDP_ACT_NDO_XMIT_SG;
  
 +	if (name)
 +		strlcpy(eth->netdev[id]->name, name, IFNAMSIZ);
diff --git a/target/linux/ramips/patches-6.6/720-Revert-net-phy-simplify-phy_link_change-arguments.patch b/target/linux/ramips/patches-6.6/720-Revert-net-phy-simplify-phy_link_change-arguments.patch
index 91159f2c63..f45544369d 100644
--- a/target/linux/ramips/patches-6.6/720-Revert-net-phy-simplify-phy_link_change-arguments.patch
+++ b/target/linux/ramips/patches-6.6/720-Revert-net-phy-simplify-phy_link_change-arguments.patch
@@ -16,7 +16,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
 
 --- a/drivers/net/phy/phy.c
 +++ b/drivers/net/phy/phy.c
-@@ -71,13 +71,13 @@ static void phy_process_state_change(str
+@@ -72,13 +72,13 @@ static void phy_process_state_change(str
  
  static void phy_link_up(struct phy_device *phydev)
  {
@@ -31,9 +31,9 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
 -	phydev->phy_link_change(phydev, false);
 +	phydev->phy_link_change(phydev, false, do_carrier);
  	phy_led_trigger_change_speed(phydev);
+ 	WRITE_ONCE(phydev->link_down_events, phydev->link_down_events + 1);
  }
- 
-@@ -595,7 +595,7 @@ int phy_start_cable_test(struct phy_devi
+@@ -823,7 +823,7 @@ int phy_start_cable_test(struct phy_devi
  		goto out;
  
  	/* Mark the carrier down until the test is complete */
@@ -42,7 +42,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
  
  	netif_testing_on(dev);
  	err = phydev->drv->cable_test_start(phydev);
-@@ -666,7 +666,7 @@ int phy_start_cable_test_tdr(struct phy_
+@@ -894,7 +894,7 @@ int phy_start_cable_test_tdr(struct phy_
  		goto out;
  
  	/* Mark the carrier down until the test is complete */
@@ -51,7 +51,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
  
  	netif_testing_on(dev);
  	err = phydev->drv->cable_test_tdr_start(phydev, config);
-@@ -738,7 +738,7 @@ static int phy_check_link_status(struct
+@@ -966,7 +966,7 @@ static int phy_check_link_status(struct
  		phy_link_up(phydev);
  	} else if (!phydev->link && phydev->state != PHY_NOLINK) {
  		phydev->state = PHY_NOLINK;
@@ -60,8 +60,8 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
  	}
  
  	return 0;
-@@ -1224,7 +1224,7 @@ void phy_state_machine(struct work_struc
- 	case PHY_HALTED:
+@@ -1485,7 +1485,7 @@ void phy_state_machine(struct work_struc
+ 	case PHY_ERROR:
  		if (phydev->link) {
  			phydev->link = 0;
 -			phy_link_down(phydev);
@@ -71,7 +71,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
  		break;
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1037,14 +1037,16 @@ struct phy_device *phy_find_first(struct
+@@ -1069,14 +1069,16 @@ struct phy_device *phy_find_first(struct
  }
  EXPORT_SYMBOL(phy_find_first);
  
@@ -95,7 +95,7 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
  		phydev->mii_ts->link_state(phydev->mii_ts, phydev);
 --- a/drivers/net/phy/phylink.c
 +++ b/drivers/net/phy/phylink.c
-@@ -1687,7 +1687,8 @@ bool phylink_expects_phy(struct phylink
+@@ -1724,7 +1724,8 @@ bool phylink_expects_phy(struct phylink
  }
  EXPORT_SYMBOL_GPL(phylink_expects_phy);
  
@@ -107,9 +107,9 @@ still required by target/linux/ramips/files/drivers/net/ethernet/ralink/mdio.c
  	bool tx_pause, rx_pause;
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -739,7 +739,7 @@ struct phy_device {
+@@ -758,7 +758,7 @@ struct phy_device {
  
- 	int pma_extable;
+ 	unsigned int link_down_events;
  
 -	void (*phy_link_change)(struct phy_device *phydev, bool up);
 +	void (*phy_link_change)(struct phy_device *, bool up, bool do_carrier);
diff --git a/target/linux/ramips/patches-6.6/721-NET-no-auto-carrier-off-support.patch b/target/linux/ramips/patches-6.6/721-NET-no-auto-carrier-off-support.patch
index 2594c66048..e594ead86f 100644
--- a/target/linux/ramips/patches-6.6/721-NET-no-auto-carrier-off-support.patch
+++ b/target/linux/ramips/patches-6.6/721-NET-no-auto-carrier-off-support.patch
@@ -11,7 +11,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/net/phy/phy.c
 +++ b/drivers/net/phy/phy.c
-@@ -738,7 +738,10 @@ static int phy_check_link_status(struct
+@@ -966,7 +966,10 @@ static int phy_check_link_status(struct
  		phy_link_up(phydev);
  	} else if (!phydev->link && phydev->state != PHY_NOLINK) {
  		phydev->state = PHY_NOLINK;
@@ -23,8 +23,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	}
  
  	return 0;
-@@ -1224,7 +1227,10 @@ void phy_state_machine(struct work_struc
- 	case PHY_HALTED:
+@@ -1485,7 +1488,10 @@ void phy_state_machine(struct work_struc
+ 	case PHY_ERROR:
  		if (phydev->link) {
  			phydev->link = 0;
 -			phy_link_down(phydev, true);
@@ -37,11 +37,11 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  		break;
 --- a/include/linux/phy.h
 +++ b/include/linux/phy.h
-@@ -647,6 +647,7 @@ struct phy_device {
+@@ -659,6 +659,7 @@ struct phy_device {
  	unsigned downshifted_rate:1;
  	unsigned is_on_sfp_module:1;
  	unsigned mac_managed_pm:1;
 +	unsigned no_auto_carrier_off:1;
+ 	unsigned wol_enabled:1;
  
  	unsigned autoneg:1;
- 	/* The most recently read link state */
diff --git a/target/linux/ramips/patches-6.6/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch b/target/linux/ramips/patches-6.6/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
index ff60b33cd4..75a7374054 100644
--- a/target/linux/ramips/patches-6.6/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
+++ b/target/linux/ramips/patches-6.6/802-GPIO-MIPS-ralink-add-gpio-driver-for-ralink-SoC.patch
@@ -47,7 +47,7 @@ Cc: linux-gpio at vger.kernel.org
 +#endif /* __ASM_MACH_RALINK_GPIO_H */
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -585,6 +585,12 @@ config GPIO_SNPS_CREG
+@@ -594,6 +594,12 @@ config GPIO_SNPS_CREG
  	  where only several fields in register belong to GPIO lines and
  	  each GPIO line owns a field with different length and on/off value.
  
@@ -62,7 +62,7 @@ Cc: linux-gpio at vger.kernel.org
  	depends on PLAT_SPEAR
 --- a/drivers/gpio/Makefile
 +++ b/drivers/gpio/Makefile
-@@ -122,6 +122,7 @@ obj-$(CONFIG_GPIO_PISOSR)		+= gpio-pisos
+@@ -130,6 +130,7 @@ obj-$(CONFIG_GPIO_PISOSR)		+= gpio-pisos
  obj-$(CONFIG_GPIO_PL061)		+= gpio-pl061.o
  obj-$(CONFIG_GPIO_PMIC_EIC_SPRD)	+= gpio-pmic-eic-sprd.o
  obj-$(CONFIG_GPIO_PXA)			+= gpio-pxa.o
@@ -84,7 +84,7 @@ Cc: linux-gpio at vger.kernel.org
 +
 +#include <linux/module.h>
 +#include <linux/io.h>
-+#include <linux/gpio.h>
++#include <linux/gpio/driver.h>
 +#include <linux/spinlock.h>
 +#include <linux/platform_device.h>
 +#include <linux/of_irq.h>
@@ -373,7 +373,7 @@ Cc: linux-gpio at vger.kernel.org
 +
 +	rg->chip.parent = &pdev->dev;
 +	rg->chip.label = dev_name(&pdev->dev);
-+	rg->chip.of_node = np;
++	rg->chip.fwnode = of_node_to_fwnode(np);
 +	rg->chip.ngpio = be32_to_cpu(*ngpio);
 +	rg->chip.direction_input = ralink_gpio_direction_input;
 +	rg->chip.direction_output = ralink_gpio_direction_output;
diff --git a/target/linux/ramips/patches-6.6/808-pinctrl-mtmips-support-requesting-different-function.patch b/target/linux/ramips/patches-6.6/808-pinctrl-mtmips-support-requesting-different-function.patch
index 047808f1e6..e5b03507aa 100644
--- a/target/linux/ramips/patches-6.6/808-pinctrl-mtmips-support-requesting-different-function.patch
+++ b/target/linux/ramips/patches-6.6/808-pinctrl-mtmips-support-requesting-different-function.patch
@@ -9,12 +9,12 @@ the group function flag when requesting a different function.
 
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
 ---
- drivers/pinctrl/ralink/pinctrl-ralink.c | 21 +++++++++++++++++----
+ drivers/pinctrl/mediatek/pinctrl-mtmips.c | 21 +++++++++++++++++----
  1 file changed, 17 insertions(+), 4 deletions(-)
 
---- a/drivers/pinctrl/ralink/pinctrl-ralink.c
-+++ b/drivers/pinctrl/ralink/pinctrl-ralink.c
-@@ -123,11 +123,24 @@ static int ralink_pmx_group_enable(struc
+--- a/drivers/pinctrl/mediatek/pinctrl-mtmips.c
++++ b/drivers/pinctrl/mediatek/pinctrl-mtmips.c
+@@ -123,11 +123,24 @@ static int mtmips_pmx_group_enable(struc
  	int i;
  	int shift;
  
diff --git a/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch b/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch
index d48b668484..80d5ec3b4a 100644
--- a/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch
+++ b/target/linux/ramips/patches-6.6/810-uvc-add-iPassion-iP2970-support.patch
@@ -13,7 +13,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/media/usb/uvc/uvc_driver.c
 +++ b/drivers/media/usb/uvc/uvc_driver.c
-@@ -2981,6 +2981,18 @@ static const struct usb_device_id uvc_id
+@@ -3120,6 +3120,18 @@ static const struct usb_device_id uvc_id
  	  .bInterfaceSubClass	= 1,
  	  .bInterfaceProtocol	= 0,
  	  .driver_info		= UVC_INFO_META(V4L2_META_FMT_D4XX) },
@@ -34,15 +34,15 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	{ USB_INTERFACE_INFO(USB_CLASS_VIDEO, 1, UVC_PC_PROTOCOL_15) },
 --- a/drivers/media/usb/uvc/uvc_status.c
 +++ b/drivers/media/usb/uvc/uvc_status.c
-@@ -223,6 +223,7 @@ static void uvc_status_complete(struct u
- 			if (uvc_event_control(urb, status, len))
+@@ -228,6 +228,7 @@ static void uvc_status_complete(struct u
+ 			if (uvc_event_control(urb, dev->status, len))
  				/* The URB will be resubmitted in work context. */
  				return;
 +			dev->motion = 1;
  			break;
  		}
  
-@@ -271,6 +272,7 @@ int uvc_status_init(struct uvc_device *d
+@@ -273,6 +274,7 @@ int uvc_status_init(struct uvc_device *d
  	}
  
  	pipe = usb_rcvintpipe(dev->udev, ep->desc.bEndpointAddress);
@@ -64,7 +64,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  #include <media/v4l2-common.h>
  
-@@ -1231,9 +1236,149 @@ static void uvc_video_decode_data(struct
+@@ -1235,9 +1240,149 @@ static void uvc_video_decode_data(struct
  	uvc_urb->async_operations++;
  }
  
@@ -214,7 +214,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	/* Mark the buffer as done if the EOF marker is set. */
  	if (data[1] & UVC_STREAM_EOF && buf->bytesused != 0) {
  		uvc_dbg(stream->dev, FRAME, "Frame complete (EOF found)\n");
-@@ -1815,6 +1960,8 @@ static int uvc_init_video_isoc(struct uv
+@@ -1819,6 +1964,8 @@ static int uvc_init_video_isoc(struct uv
  	if (npackets == 0)
  		return -ENOMEM;
  
@@ -225,7 +225,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	for_each_uvc_urb(uvc_urb, stream) {
 --- a/drivers/media/usb/uvc/uvcvideo.h
 +++ b/drivers/media/usb/uvc/uvcvideo.h
-@@ -75,6 +75,8 @@
+@@ -73,6 +73,8 @@
  #define UVC_QUIRK_FORCE_Y8		0x00000800
  #define UVC_QUIRK_FORCE_BPP		0x00001000
  #define UVC_QUIRK_WAKE_AUTOSUSPEND	0x00002000
@@ -234,8 +234,8 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  /* Format flags */
  #define UVC_FMT_FLAG_COMPRESSED		0x00000001
-@@ -562,6 +564,7 @@ struct uvc_device {
- 	u8 *status;
+@@ -582,6 +584,7 @@ struct uvc_device {
+ 
  	struct input_dev *input;
  	char input_phys[64];
 +	int motion;
diff --git a/target/linux/ramips/patches-6.6/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch b/target/linux/ramips/patches-6.6/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
index 9aaf86ffc7..6760d9f56c 100644
--- a/target/linux/ramips/patches-6.6/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
+++ b/target/linux/ramips/patches-6.6/821-SPI-ralink-add-Ralink-SoC-spi-driver.patch
@@ -16,7 +16,7 @@ Acked-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/spi/Kconfig
 +++ b/drivers/spi/Kconfig
-@@ -823,6 +823,12 @@ config SPI_QCOM_GENI
+@@ -895,6 +895,12 @@ config SPI_QCOM_GENI
  	  This driver can also be built as a module.  If so, the module
  	  will be called spi-geni-qcom.
  
@@ -26,19 +26,19 @@ Acked-by: John Crispin <blogic at openwrt.org>
 +	help
 +	  This selects a driver for the Ralink RT288x/RT305x SPI Controller.
 +
- config SPI_S3C24XX
- 	tristate "Samsung S3C24XX series SPI"
- 	depends on ARCH_S3C24XX
+ config SPI_S3C64XX
+ 	tristate "Samsung S3C64XX/Exynos SoC series type SPI"
+ 	depends on (PLAT_SAMSUNG || ARCH_S5PV210 || ARCH_EXYNOS || COMPILE_TEST)
 --- a/drivers/spi/Makefile
 +++ b/drivers/spi/Makefile
-@@ -110,6 +110,7 @@ obj-$(CONFIG_SPI_RB4XX)			+= spi-rb4xx.o
+@@ -117,6 +117,7 @@ obj-$(CONFIG_SPI_RB4XX)			+= spi-rb4xx.o
  obj-$(CONFIG_MACH_REALTEK_RTL)		+= spi-realtek-rtl.o
  obj-$(CONFIG_SPI_RPCIF)			+= spi-rpc-if.o
  obj-$(CONFIG_SPI_RSPI)			+= spi-rspi.o
 +obj-$(CONFIG_SPI_RT2880)		+= spi-rt2880.o
- obj-$(CONFIG_SPI_S3C24XX)		+= spi-s3c24xx-hw.o
- spi-s3c24xx-hw-y			:= spi-s3c24xx.o
+ obj-$(CONFIG_SPI_RZV2M_CSI)		+= spi-rzv2m-csi.o
  obj-$(CONFIG_SPI_S3C64XX)		+= spi-s3c64xx.o
+ obj-$(CONFIG_SPI_SC18IS602)		+= spi-sc18is602.o
 --- /dev/null
 +++ b/drivers/spi/spi-rt2880.c
 @@ -0,0 +1,535 @@
diff --git a/target/linux/ramips/patches-6.6/825-i2c-MIPS-adds-ralink-I2C-driver.patch b/target/linux/ramips/patches-6.6/825-i2c-MIPS-adds-ralink-I2C-driver.patch
index 461cf6e222..609ea71735 100644
--- a/target/linux/ramips/patches-6.6/825-i2c-MIPS-adds-ralink-I2C-driver.patch
+++ b/target/linux/ramips/patches-6.6/825-i2c-MIPS-adds-ralink-I2C-driver.patch
@@ -45,7 +45,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 +};
 --- a/drivers/i2c/busses/Kconfig
 +++ b/drivers/i2c/busses/Kconfig
-@@ -998,6 +998,11 @@ config I2C_RK3X
+@@ -1021,6 +1021,11 @@ config I2C_RK3X
  	  This driver can also be built as a module. If so, the module will
  	  be called i2c-rk3x.
  
@@ -59,7 +59,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	depends on ARCH_RENESAS || COMPILE_TEST
 --- a/drivers/i2c/busses/Makefile
 +++ b/drivers/i2c/busses/Makefile
-@@ -95,6 +95,7 @@ obj-$(CONFIG_I2C_PCA_PLATFORM)	+= i2c-pc
+@@ -96,6 +96,7 @@ obj-$(CONFIG_I2C_PCA_PLATFORM)	+= i2c-pc
  obj-$(CONFIG_I2C_PNX)		+= i2c-pnx.o
  obj-$(CONFIG_I2C_PXA)		+= i2c-pxa.o
  obj-$(CONFIG_I2C_PXA_PCI)	+= i2c-pxa-pci.o
diff --git a/target/linux/ramips/patches-6.6/830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch b/target/linux/ramips/patches-6.6/830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
index 37a10589a3..c19b0606a1 100644
--- a/target/linux/ramips/patches-6.6/830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
+++ b/target/linux/ramips/patches-6.6/830-mmc-MIPS-ralink-add-sdhci-for-mt7620a-SoC.patch
@@ -25,7 +25,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/mmc/host/Kconfig
 +++ b/drivers/mmc/host/Kconfig
-@@ -1102,6 +1102,8 @@ config MMC_OWL
+@@ -1059,6 +1059,8 @@ config MMC_OWL
  config MMC_SDHCI_EXTERNAL_DMA
  	bool
  
diff --git a/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch b/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch
index 57f0ec2c50..2c40fba694 100644
--- a/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch
+++ b/target/linux/ramips/patches-6.6/835-asoc-add-mt7620-support.patch
@@ -20,7 +20,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/sound/soc/Kconfig
 +++ b/sound/soc/Kconfig
-@@ -86,6 +86,7 @@ source "sound/soc/mxs/Kconfig"
+@@ -99,6 +99,7 @@ source "sound/soc/mxs/Kconfig"
  source "sound/soc/pxa/Kconfig"
  source "sound/soc/qcom/Kconfig"
  source "sound/soc/rockchip/Kconfig"
@@ -30,7 +30,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  source "sound/soc/sof/Kconfig"
 --- a/sound/soc/Makefile
 +++ b/sound/soc/Makefile
-@@ -54,6 +54,7 @@ obj-$(CONFIG_SND_SOC)	+= kirkwood/
+@@ -56,6 +56,7 @@ obj-$(CONFIG_SND_SOC)	+= kirkwood/
  obj-$(CONFIG_SND_SOC)	+= pxa/
  obj-$(CONFIG_SND_SOC)	+= qcom/
  obj-$(CONFIG_SND_SOC)	+= rockchip/
diff --git a/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch b/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch
index 42a15a935c..3d90286470 100644
--- a/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch
+++ b/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/tty/serial/serial_core.c
 +++ b/drivers/tty/serial/serial_core.c
-@@ -445,6 +445,9 @@ uart_get_baud_rate(struct uart_port *por
+@@ -467,6 +467,9 @@ uart_get_baud_rate(struct uart_port *por
  		break;
  	}
  
diff --git a/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch b/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch
index ab164f5ab8..67cc389fd5 100644
--- a/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch
+++ b/target/linux/ramips/patches-6.6/845-pwm-add-mediatek-support.patch
@@ -13,9 +13,9 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/pwm/Kconfig
 +++ b/drivers/pwm/Kconfig
-@@ -393,6 +393,15 @@ config PWM_MEDIATEK
+@@ -415,6 +415,15 @@ config PWM_MICROCHIP_CORE
  	  To compile this driver as a module, choose M here: the module
- 	  will be called pwm-mediatek.
+ 	  will be called pwm-microchip-core.
  
 +config PWM_MEDIATEK_RAMIPS
 +	tristate "Mediatek PWM support"
@@ -31,14 +31,14 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	depends on ARCH_MXS || COMPILE_TEST
 --- a/drivers/pwm/Makefile
 +++ b/drivers/pwm/Makefile
-@@ -34,6 +34,7 @@ obj-$(CONFIG_PWM_LPSS_PCI)	+= pwm-lpss-p
+@@ -35,6 +35,7 @@ obj-$(CONFIG_PWM_LPSS_PCI)	+= pwm-lpss-p
  obj-$(CONFIG_PWM_LPSS_PLATFORM)	+= pwm-lpss-platform.o
  obj-$(CONFIG_PWM_MESON)		+= pwm-meson.o
  obj-$(CONFIG_PWM_MEDIATEK)	+= pwm-mediatek.o
 +obj-$(CONFIG_PWM_MEDIATEK_RAMIPS)	+= pwm-mediatek-ramips.o
+ obj-$(CONFIG_PWM_MICROCHIP_CORE)	+= pwm-microchip-core.o
  obj-$(CONFIG_PWM_MTK_DISP)	+= pwm-mtk-disp.o
  obj-$(CONFIG_PWM_MXS)		+= pwm-mxs.o
- obj-$(CONFIG_PWM_NTXEC)		+= pwm-ntxec.o
 --- /dev/null
 +++ b/drivers/pwm/pwm-mediatek-ramips.c
 @@ -0,0 +1,197 @@
diff --git a/target/linux/ramips/patches-6.6/850-awake-rt305x-dwc2-controller.patch b/target/linux/ramips/patches-6.6/850-awake-rt305x-dwc2-controller.patch
index 01ce44d700..a08056d8d9 100644
--- a/target/linux/ramips/patches-6.6/850-awake-rt305x-dwc2-controller.patch
+++ b/target/linux/ramips/patches-6.6/850-awake-rt305x-dwc2-controller.patch
@@ -1,6 +1,6 @@
 --- a/drivers/usb/dwc2/platform.c
 +++ b/drivers/usb/dwc2/platform.c
-@@ -462,6 +462,12 @@ static int dwc2_driver_probe(struct plat
+@@ -493,6 +493,12 @@ static int dwc2_driver_probe(struct plat
  	if (retval)
  		return retval;
  
diff --git a/target/linux/ramips/patches-6.6/855-linkit_bootstrap.patch b/target/linux/ramips/patches-6.6/855-linkit_bootstrap.patch
index cd81601a72..16eaf619a0 100644
--- a/target/linux/ramips/patches-6.6/855-linkit_bootstrap.patch
+++ b/target/linux/ramips/patches-6.6/855-linkit_bootstrap.patch
@@ -1,6 +1,6 @@
 --- a/drivers/misc/Makefile
 +++ b/drivers/misc/Makefile
-@@ -50,6 +50,7 @@ obj-$(CONFIG_ECHO)		+= echo/
+@@ -52,6 +52,7 @@ obj-$(CONFIG_ECHO)		+= echo/
  obj-$(CONFIG_CXL_BASE)		+= cxl/
  obj-$(CONFIG_DW_XDATA_PCIE)	+= dw-xdata-pcie.o
  obj-$(CONFIG_PCI_ENDPOINT_TEST)	+= pci_endpoint_test.o
diff --git a/target/linux/ramips/patches-6.6/860-ramips-add-eip93-driver.patch b/target/linux/ramips/patches-6.6/860-ramips-add-eip93-driver.patch
index 275b81e715..5d0b3104b1 100644
--- a/target/linux/ramips/patches-6.6/860-ramips-add-eip93-driver.patch
+++ b/target/linux/ramips/patches-6.6/860-ramips-add-eip93-driver.patch
@@ -3260,17 +3260,17 @@
 +#endif
 --- a/drivers/crypto/Kconfig
 +++ b/drivers/crypto/Kconfig
-@@ -824,4 +824,6 @@ config CRYPTO_DEV_SA2UL
- source "drivers/crypto/keembay/Kconfig"
+@@ -797,4 +797,6 @@ config CRYPTO_DEV_SA2UL
  source "drivers/crypto/aspeed/Kconfig"
+ source "drivers/crypto/starfive/Kconfig"
  
 +source "drivers/crypto/mtk-eip93/Kconfig"
 +
  endif # CRYPTO_HW
 --- a/drivers/crypto/Makefile
 +++ b/drivers/crypto/Makefile
-@@ -53,3 +53,4 @@ obj-y += xilinx/
- obj-y += hisilicon/
+@@ -51,3 +51,4 @@ obj-y += hisilicon/
  obj-$(CONFIG_CRYPTO_DEV_AMLOGIC_GXL) += amlogic/
- obj-y += keembay/
+ obj-y += intel/
+ obj-y += starfive/
 +obj-$(CONFIG_CRYPTO_DEV_EIP93) += mtk-eip93/



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:42 -0400
Subject: [openwrt/openwrt]  kernel/ramips: Restore kernel files for v6.1
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23890.1712296734.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/662e8581ec8fb0db44319a6acee0bb02d9a4417a

commit 662e8581ec8fb0db44319a6acee0bb02d9a4417a
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sun Mar 17 18:11:29 2024 +0100

    kernel/ramips: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/mt7620/config-6.1 | 215 +++++++++++++++++++++++
 target/linux/ramips/mt7621/config-6.1 | 312 ++++++++++++++++++++++++++++++++++
 target/linux/ramips/mt76x8/config-6.1 | 215 +++++++++++++++++++++++
 target/linux/ramips/rt288x/config-6.1 | 201 ++++++++++++++++++++++
 target/linux/ramips/rt305x/config-6.1 | 196 +++++++++++++++++++++
 target/linux/ramips/rt3883/config-6.1 | 196 +++++++++++++++++++++
 6 files changed, 1335 insertions(+)

diff --git a/target/linux/ramips/mt7620/config-6.1 b/target/linux/ramips/mt7620/config-6.1
new file mode 100644
index 0000000000..111a59ab00
--- /dev/null
+++ b/target/linux/ramips/mt7620/config-6.1
@@ -0,0 +1,215 @@
+CONFIG_AR8216_PHY=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CEVT_R4K=y
+CONFIG_CEVT_SYSTICK_QUIRK=y
+CONFIG_CLKEVT_RT3352=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLK_MTMIPS=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
+CONFIG_CMDLINE_BOOL=y
+# CONFIG_CMDLINE_OVERRIDE is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_DIEI=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_RIXI=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CSRC_R4K=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_PINCTRL=y
+CONFIG_DMA_NONCOHERENT=y
+# CONFIG_DTB_MT7620A_EVAL is not set
+# CONFIG_DTB_OMEGA2P is not set
+CONFIG_DTB_RT_NONE=y
+# CONFIG_DTB_VOCORE2 is not set
+CONFIG_DTC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_ETHERNET_PACKET_MANGLE=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIO_CDEV=y
+# CONFIG_GPIO_MT7621 is not set
+CONFIG_GPIO_RALINK=y
+CONFIG_GPIO_WATCHDOG=y
+# CONFIG_GPIO_WATCHDOG_ARCH_INITCALL is not set
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_ICPLUS_PHY=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_INTC=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MARVELL_PHY=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
+# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_MIPS_CMDLINE_FROM_DTB=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+# CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_RAW_APPENDED_DTB=y
+CONFIG_MIPS_SPRAM=y
+CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MT7621_WDT is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_PARSER_TPLINK_SAFELOADER is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
+CONFIG_MTD_SPLIT_JIMAGE_FW=y
+CONFIG_MTD_SPLIT_SEAMA_FW=y
+CONFIG_MTD_SPLIT_TPLINK_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_VIRT_CONCAT=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_RALINK_GSW_MT7620=y
+CONFIG_NET_RALINK_MDIO=y
+CONFIG_NET_RALINK_MDIO_MT7620=y
+CONFIG_NET_RALINK_MT7620=y
+# CONFIG_NET_RALINK_RT3050 is not set
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_SELFTESTS=y
+# CONFIG_NET_VENDOR_MEDIATEK is not set
+CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DRIVERS_LEGACY=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+# CONFIG_PHY_MT7621_PCI is not set
+CONFIG_PHY_RALINK_USB=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_AW9523 is not set
+CONFIG_PINCTRL_MT7620=y
+CONFIG_PINCTRL_RALINK=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_RALINK=y
+CONFIG_RALINK_WDT=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_SERIAL_8250_RT288X=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SOC_MT7620=y
+# CONFIG_SOC_MT7621 is not set
+# CONFIG_SOC_RT288X is not set
+# CONFIG_SOC_RT305X is not set
+# CONFIG_SOC_RT3883 is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+# CONFIG_SPI_MT7621 is not set
+CONFIG_SPI_RT2880=y
+CONFIG_SRCU=y
+CONFIG_SWCONFIG=y
+CONFIG_SWCONFIG_LEDS=y
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_TARGET_ISA_REV=2
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TINY_SRCU=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0
diff --git a/target/linux/ramips/mt7621/config-6.1 b/target/linux/ramips/mt7621/config-6.1
new file mode 100644
index 0000000000..8f2355c564
--- /dev/null
+++ b/target/linux/ramips/mt7621/config-6.1
@@ -0,0 +1,312 @@
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_AT803X_PHY=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BOARD_SCACHE=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CEVT_R4K=y
+CONFIG_CLKSRC_MIPS_GIC=y
+CONFIG_CLK_MT7621=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
+CONFIG_CMDLINE_BOOL=y
+# CONFIG_CMDLINE_OVERRIDE is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_DIEI=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_RIXI=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MIPSR2_IRQ_EI=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_CSRC_R4K=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_PINCTRL=y
+CONFIG_DIMLIB=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DTC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_MT7621=y
+# CONFIG_GPIO_RALINK is not set
+CONFIG_GPIO_WATCHDOG=y
+# CONFIG_GPIO_WATCHDOG_ARCH_INITCALL is not set
+CONFIG_GRO_CELLS=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_GPIO=y
+CONFIG_I2C_MT7621=y
+CONFIG_ICPLUS_PHY=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_LED_TRIGGER_PHY=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEDIATEK_GE_PHY=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MIKROTIK=y
+CONFIG_MIKROTIK_RB_SYSFS=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+CONFIG_MIPS_CM=y
+# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
+# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_MIPS_CMDLINE_FROM_DTB=y
+CONFIG_MIPS_CPC=y
+CONFIG_MIPS_CPS=y
+# CONFIG_MIPS_CPS_NS16550_BOOL is not set
+CONFIG_MIPS_CPU_SCACHE=y
+CONFIG_MIPS_GIC=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+CONFIG_MIPS_MT=y
+CONFIG_MIPS_MT_FPAFF=y
+CONFIG_MIPS_MT_SMP=y
+# CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_NR_CPU_NR_MAP=4
+CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
+CONFIG_MIPS_RAW_APPENDED_DTB=y
+CONFIG_MIPS_SPRAM=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MT7621_WDT=y
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_NAND_ECC_SW_HAMMING=y
+CONFIG_MTD_NAND_MT7621=y
+CONFIG_MTD_NAND_MTK_BMT=y
+# CONFIG_MTD_PARSER_TPLINK_SAFELOADER is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_RAW_NAND=y
+CONFIG_MTD_ROUTERBOOT_PARTS=y
+CONFIG_MTD_SERCOMM_PARTS=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
+CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MTD_SPLIT_MINOR_FW=y
+CONFIG_MTD_SPLIT_SEAMA_FW=y
+CONFIG_MTD_SPLIT_TPLINK_FW=y
+CONFIG_MTD_SPLIT_TRX_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_MTD_VIRT_CONCAT=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_MT7530=y
+CONFIG_NET_DSA_MT7530_MDIO=y
+# CONFIG_NET_DSA_MT7530_MMIO is not set
+CONFIG_NET_DSA_TAG_MTK=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_MEDIATEK_SOC=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NET_VENDOR_MEDIATEK=y
+# CONFIG_NET_VENDOR_RALINK is not set
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=4
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_PADATA=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_POOL_STATS=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PCI=y
+CONFIG_PCIE_MT7621=y
+CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_DRIVERS_GENERIC=y
+CONFIG_PCS_MTK_LYNXI=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+CONFIG_PHYLINK=y
+CONFIG_PHY_MT7621_PCI=y
+# CONFIG_PHY_RALINK_USB is not set
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AW9523=y
+CONFIG_PINCTRL_MT7621=y
+CONFIG_PINCTRL_RALINK=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PINCTRL_SX150X=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_QCOM_NET_PHYLIB=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_RALINK=y
+# CONFIG_RALINK_WDT is not set
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_BQ32K=y
+CONFIG_RTC_DRV_PCF8563=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+# CONFIG_SCHED_CORE is not set
+CONFIG_SCHED_SMT=y
+CONFIG_SERIAL_8250_NR_UARTS=3
+CONFIG_SERIAL_8250_RUNTIME_UARTS=3
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SMP=y
+CONFIG_SMP_UP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOC_BUS=y
+# CONFIG_SOC_MT7620 is not set
+CONFIG_SOC_MT7621=y
+# CONFIG_SOC_RT288X is not set
+# CONFIG_SOC_RT305X is not set
+# CONFIG_SOC_RT3883 is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_MT7621=y
+# CONFIG_SPI_RT2880 is not set
+CONFIG_SRCU=y
+CONFIG_SWPHY=y
+CONFIG_SYNC_R4K=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_HIGHMEM=y
+CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_MIPS_CPS=y
+CONFIG_SYS_SUPPORTS_MULTITHREADING=y
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_TARGET_ISA_REV=2
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_UBIFS_FS=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_WEAK_ORDERING=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/ramips/mt76x8/config-6.1 b/target/linux/ramips/mt76x8/config-6.1
new file mode 100644
index 0000000000..be779b03d8
--- /dev/null
+++ b/target/linux/ramips/mt76x8/config-6.1
@@ -0,0 +1,215 @@
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CEVT_R4K=y
+CONFIG_CEVT_SYSTICK_QUIRK=y
+CONFIG_CLKEVT_RT3352=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLK_MTMIPS=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
+CONFIG_CMDLINE_BOOL=y
+# CONFIG_CMDLINE_OVERRIDE is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_DIEI=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_RIXI=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CSRC_R4K=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_PINCTRL=y
+CONFIG_DMA_NONCOHERENT=y
+# CONFIG_DTB_MT7620A_EVAL is not set
+# CONFIG_DTB_OMEGA2P is not set
+CONFIG_DTB_RT_NONE=y
+# CONFIG_DTB_VOCORE2 is not set
+CONFIG_DTC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_MT7621=y
+# CONFIG_GPIO_RALINK is not set
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_ICPLUS_PHY=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_INTC=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
+# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_MIPS_CMDLINE_FROM_DTB=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+# CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_RAW_APPENDED_DTB=y
+CONFIG_MIPS_SPRAM=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MT7621_WDT=y
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_PARSER_TPLINK_SAFELOADER is not set
+CONFIG_MTD_PARSER_TRX=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
+CONFIG_MTD_SPLIT_TPLINK_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_VIRT_CONCAT=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_RALINK_ESW_RT3050=y
+# CONFIG_NET_RALINK_MT7620 is not set
+CONFIG_NET_RALINK_RT3050=y
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_SELFTESTS=y
+# CONFIG_NET_VENDOR_MEDIATEK is not set
+CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DRIVERS_LEGACY=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+# CONFIG_PHY_MT7621_PCI is not set
+CONFIG_PHY_RALINK_USB=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_AW9523 is not set
+CONFIG_PINCTRL_MT7620=y
+CONFIG_PINCTRL_RALINK=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_RALINK=y
+# CONFIG_RALINK_WDT is not set
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_SERIAL_8250_NR_UARTS=3
+CONFIG_SERIAL_8250_RUNTIME_UARTS=3
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SOC_MT7620=y
+# CONFIG_SOC_MT7621 is not set
+# CONFIG_SOC_RT288X is not set
+# CONFIG_SOC_RT305X is not set
+# CONFIG_SOC_RT3883 is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_MT7621=y
+# CONFIG_SPI_RT2880 is not set
+CONFIG_SRCU=y
+CONFIG_SWCONFIG=y
+CONFIG_SWCONFIG_LEDS=y
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_TARGET_ISA_REV=2
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TINY_SRCU=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0
diff --git a/target/linux/ramips/rt288x/config-6.1 b/target/linux/ramips/rt288x/config-6.1
new file mode 100644
index 0000000000..d8b89934b9
--- /dev/null
+++ b/target/linux/ramips/rt288x/config-6.1
@@ -0,0 +1,201 @@
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CEVT_R4K=y
+CONFIG_CLK_MTMIPS=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
+CONFIG_CMDLINE_BOOL=y
+# CONFIG_CMDLINE_OVERRIDE is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_DIEI=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_RIXI=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CSRC_R4K=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DMA_NONCOHERENT=y
+# CONFIG_DTB_RT2880_EVAL is not set
+CONFIG_DTB_RT_NONE=y
+CONFIG_DTC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_RALINK=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IP17XX_PHY=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_INTC=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_AUTO_PFN_OFFSET=y
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
+# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_MIPS_CMDLINE_FROM_DTB=y
+CONFIG_MIPS_L1_CACHE_SHIFT=4
+CONFIG_MIPS_L1_CACHE_SHIFT_4=y
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+# CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_RAW_APPENDED_DTB=y
+CONFIG_MIPS_SPRAM=y
+CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
+CONFIG_MTD_SPLIT_LZMA_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_MTD_SPLIT_WRGG_FW=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_RALINK_MDIO=y
+CONFIG_NET_RALINK_MDIO_RT2880=y
+CONFIG_NET_RALINK_RT2880=y
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NLS=m
+CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DRIVERS_LEGACY=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+# CONFIG_PHY_MT7621_PCI is not set
+# CONFIG_PHY_RALINK_USB is not set
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_AW9523 is not set
+CONFIG_PINCTRL_RALINK=y
+CONFIG_PINCTRL_RT2880=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_RALINK=y
+CONFIG_RALINK_WDT=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_SERIAL_8250_RT288X=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_SOC_MT7620 is not set
+# CONFIG_SOC_MT7621 is not set
+CONFIG_SOC_RT288X=y
+# CONFIG_SOC_RT305X is not set
+# CONFIG_SOC_RT3883 is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+# CONFIG_SPI_MT7621 is not set
+CONFIG_SPI_RT2880=y
+CONFIG_SRCU=y
+CONFIG_SWCONFIG=y
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_TARGET_ISA_REV=2
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TINY_SRCU=y
+CONFIG_USB=m
+CONFIG_USB_COMMON=m
+CONFIG_USB_EHCI_HCD=m
+CONFIG_USB_EHCI_HCD_PLATFORM=m
+CONFIG_USB_OHCI_HCD=m
+CONFIG_USB_OHCI_HCD_PLATFORM=m
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0
diff --git a/target/linux/ramips/rt305x/config-6.1 b/target/linux/ramips/rt305x/config-6.1
new file mode 100644
index 0000000000..8b1b17033a
--- /dev/null
+++ b/target/linux/ramips/rt305x/config-6.1
@@ -0,0 +1,196 @@
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CEVT_R4K=y
+CONFIG_CEVT_SYSTICK_QUIRK=y
+CONFIG_CLKEVT_RT3352=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLK_MTMIPS=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
+CONFIG_CMDLINE_BOOL=y
+# CONFIG_CMDLINE_OVERRIDE is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_DIEI=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_RIXI=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CSRC_R4K=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_PINCTRL=y
+CONFIG_DMA_NONCOHERENT=y
+# CONFIG_DTB_RT305X_EVAL is not set
+CONFIG_DTB_RT_NONE=y
+CONFIG_DTC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_RALINK=y
+CONFIG_GPIO_WATCHDOG=y
+# CONFIG_GPIO_WATCHDOG_ARCH_INITCALL is not set
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_INTC=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
+# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_MIPS_CMDLINE_FROM_DTB=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+# CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_RAW_APPENDED_DTB=y
+CONFIG_MIPS_SPRAM=y
+CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
+CONFIG_MTD_SPLIT_JIMAGE_FW=y
+CONFIG_MTD_SPLIT_SEAMA_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_RALINK_ESW_RT3050=y
+CONFIG_NET_RALINK_RT3050=y
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PCI_DRIVERS_LEGACY=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+# CONFIG_PHY_MT7621_PCI is not set
+CONFIG_PHY_RALINK_USB=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_AW9523 is not set
+CONFIG_PINCTRL_RALINK=y
+CONFIG_PINCTRL_RT305X=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_RALINK=y
+# CONFIG_RALINK_ILL_ACC is not set
+CONFIG_RALINK_WDT=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_SERIAL_8250_RT288X=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_SOC_MT7620 is not set
+# CONFIG_SOC_MT7621 is not set
+# CONFIG_SOC_RT288X is not set
+CONFIG_SOC_RT305X=y
+# CONFIG_SOC_RT3883 is not set
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+# CONFIG_SPI_MT7621 is not set
+CONFIG_SPI_RT2880=y
+CONFIG_SRCU=y
+CONFIG_SWCONFIG=y
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_TARGET_ISA_REV=2
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TINY_SRCU=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0
diff --git a/target/linux/ramips/rt3883/config-6.1 b/target/linux/ramips/rt3883/config-6.1
new file mode 100644
index 0000000000..2aaebdc702
--- /dev/null
+++ b/target/linux/ramips/rt3883/config-6.1
@@ -0,0 +1,196 @@
+CONFIG_AR8216_PHY=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CEVT_R4K=y
+CONFIG_CLK_MTMIPS=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs,jffs2"
+CONFIG_CMDLINE_BOOL=y
+# CONFIG_CMDLINE_OVERRIDE is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_DIEI=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_RIXI=y
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CSRC_R4K=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DEBUG_PINCTRL=y
+CONFIG_DMA_NONCOHERENT=y
+# CONFIG_DTB_RT3883_EVAL is not set
+CONFIG_DTB_RT_NONE=y
+CONFIG_DTC=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_ETHERNET_PACKET_MANGLE=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_FIXED_PHY=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_RALINK=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_INTC=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+# CONFIG_MIPS_CMDLINE_BUILTIN_EXTEND is not set
+# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_MIPS_CMDLINE_FROM_DTB=y
+CONFIG_MIPS_L1_CACHE_SHIFT=5
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+# CONFIG_MIPS_NO_APPENDED_DTB is not set
+CONFIG_MIPS_RAW_APPENDED_DTB=y
+CONFIG_MIPS_SPRAM=y
+CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_VARIABLE_ERASE=y
+CONFIG_MTD_SPLIT_SEAMA_FW=y
+CONFIG_MTD_SPLIT_UIMAGE_FW=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_RALINK_MDIO=y
+CONFIG_NET_RALINK_MDIO_RT2880=y
+CONFIG_NET_RALINK_RT3883=y
+CONFIG_NET_RALINK_SOC=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DRIVERS_LEGACY=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+# CONFIG_PHY_MT7621_PCI is not set
+CONFIG_PHY_RALINK_USB=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_AW9523 is not set
+CONFIG_PINCTRL_RALINK=y
+CONFIG_PINCTRL_RT3883=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_RALINK=y
+CONFIG_RALINK_WDT=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RTL8366_SMI=y
+CONFIG_RTL8367B_PHY=y
+CONFIG_RTL8367_PHY=y
+CONFIG_SERIAL_8250_RT288X=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+# CONFIG_SOC_MT7620 is not set
+# CONFIG_SOC_MT7621 is not set
+# CONFIG_SOC_RT288X is not set
+# CONFIG_SOC_RT305X is not set
+CONFIG_SOC_RT3883=y
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+# CONFIG_SPI_MT7621 is not set
+CONFIG_SPI_RT2880=y
+CONFIG_SRCU=y
+CONFIG_SWCONFIG=y
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_EARLY_PRINTK=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_TARGET_ISA_REV=2
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TINY_SRCU=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:43 -0400
Subject: [openwrt/openwrt]  ramips: 6.6: remove old patches
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23896.1712296739.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4b8b7438f78346ccc3fc7393a3d026f63df0cdcd

commit 4b8b7438f78346ccc3fc7393a3d026f63df0cdcd
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Wed Mar 13 02:02:58 2024 +0100

    ramips: 6.6: remove old patches
    
    Remove patches for old kernel.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 ...alink-fix-mt7621_gate_is_enabled-function.patch |   77 --
 ...s-clock-add-mtmips-SoCs-system-controller.patch |   86 --
 ...add-clock-and-reset-driver-for-MTMIPS-SoC.patch | 1221 --------------------
 ...s-ralink-rt288x-remove-clock-related-code.patch |   81 --
 ...s-ralink-rt305x-remove-clock-related-code.patch |  145 ---
 ...s-ralink-rt3883-remove-clock-related-code.patch |   85 --
 ...s-ralink-mt7620-remove-clock-related-code.patch |  327 ------
 ...-07-mips-ralink-remove-reset-related-code.patch |  121 --
 ...-ralink-get-cpu-rate-from-new-driver-code.patch |  102 --
 ...NERS-add-Mediatek-MTMIPS-Clock-maintainer.patch |   28 -
 ...-introduce-commonly-used-remap-node-funct.patch |  191 ---
 ...mtmips-Fix-uninitialized-use-of-ret-in-mt.patch |   56 -
 ...-match-all-supported-system-controller-co.patch |   40 -
 ...7621-wdt-avoid-static-global-declarations.patch |  213 ----
 ...7621-wdt-avoid-ralink-architecture-depend.patch |  104 --
 ...7620-do-not-print-NFTS-register-value-as-.patch |   32 -
 ...7620-use-dev_info-to-log-PCIe-device-dete.patch |   39 -
 ...1-Use-dev_info-to-log-PCIe-card-detection.patch |   31 -
 18 files changed, 2979 deletions(-)

diff --git a/target/linux/ramips/patches-6.6/003-v6.3-clk-ralink-fix-mt7621_gate_is_enabled-function.patch b/target/linux/ramips/patches-6.6/003-v6.3-clk-ralink-fix-mt7621_gate_is_enabled-function.patch
deleted file mode 100644
index 4574f7977f..0000000000
--- a/target/linux/ramips/patches-6.6/003-v6.3-clk-ralink-fix-mt7621_gate_is_enabled-function.patch
+++ /dev/null
@@ -1,77 +0,0 @@
-From 35dcae535afc153fa83f2fe51c0812536c192c58 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 6 Feb 2023 09:33:05 +0100
-Subject: [PATCH] clk: ralink: fix 'mt7621_gate_is_enabled()' function
-
-Compiling clock driver with CONFIG_UBSAN enabled shows the following trace:
-
-UBSAN: shift-out-of-bounds in drivers/clk/ralink/clk-mt7621.c:121:15
-shift exponent 131072 is too large for 32-bit type 'long unsigned int'
-CPU: 1 PID: 1 Comm: swapper/0 Not tainted 5.15.86 #0
-Stack : ...
-
-Call Trace:
-[<80009a58>] show_stack+0x38/0x118
-[<8045ce04>] dump_stack_lvl+0x60/0x80
-[<80458868>] ubsan_epilogue+0x10/0x54
-[<804590e0>] __ubsan_handle_shift_out_of_bounds+0x118/0x190
-[<804c9a10>] mt7621_gate_is_enabled+0x98/0xa0
-[<804bb774>] clk_core_is_enabled+0x34/0x90
-[<80aad73c>] clk_disable_unused_subtree+0x98/0x1e4
-[<80aad6d4>] clk_disable_unused_subtree+0x30/0x1e4
-[<80aad6d4>] clk_disable_unused_subtree+0x30/0x1e4
-[<80aad900>] clk_disable_unused+0x78/0x120
-[<80002030>] do_one_initcall+0x54/0x1f0
-[<80a922a4>] kernel_init_freeable+0x280/0x31c
-[<808047c4>] kernel_init+0x20/0x118
-[<80003e58>] ret_from_kernel_thread+0x14/0x1c
-
-Shifting a value (131032) larger than the type (32 bit unsigned integer)
-is undefined behaviour in C.
-
-The problem is in 'mt7621_gate_is_enabled()' function which is using the
-'BIT()' kernel macro with the bit index for the clock gate to check if the
-bit is set. When the clock gates structure is created driver is already
-setting 'bit_idx' using 'BIT()' macro, so we are wrongly applying an extra
-'BIT()' mask here. Removing it solve the problem and makes this function
-correct. However when clock gating is correctly working, the kernel starts
-disabling those clocks that are not requested. Some drivers for this SoC
-are older than this clock driver itself. So to avoid the kernel to disable
-clocks that have been enabled until now, we must apply 'CLK_IS_CRITICAL'
-flag on gates initialization code.
-
-Fixes: 48df7a26f470 ("clk: ralink: add clock driver for mt7621 SoC")
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Link: https://lore.kernel.org/r/20230206083305.147582-1-sergio.paracuellos at gmail.com
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/ralink/clk-mt7621.c | 10 ++++++++--
- 1 file changed, 8 insertions(+), 2 deletions(-)
-
---- a/drivers/clk/ralink/clk-mt7621.c
-+++ b/drivers/clk/ralink/clk-mt7621.c
-@@ -121,7 +121,7 @@ static int mt7621_gate_is_enabled(struct
- 	if (regmap_read(sysc, SYSC_REG_CLKCFG1, &val))
- 		return 0;
- 
--	return val & BIT(clk_gate->bit_idx);
-+	return val & clk_gate->bit_idx;
- }
- 
- static const struct clk_ops mt7621_gate_ops = {
-@@ -133,8 +133,14 @@ static const struct clk_ops mt7621_gate_
- static int mt7621_gate_ops_init(struct device *dev,
- 				struct mt7621_gate *sclk)
- {
-+	/*
-+	 * There are drivers for this SoC that are older
-+	 * than clock driver and are not prepared for the clock.
-+	 * We don't want the kernel to disable anything so we
-+	 * add CLK_IS_CRITICAL flag here.
-+	 */
- 	struct clk_init_data init = {
--		.flags = CLK_SET_RATE_PARENT,
-+		.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
- 		.num_parents = 1,
- 		.parent_names = &sclk->parent_name,
- 		.ops = &mt7621_gate_ops,
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-01-dt-bindings-clock-add-mtmips-SoCs-system-controller.patch b/target/linux/ramips/patches-6.6/005-v6.5-01-dt-bindings-clock-add-mtmips-SoCs-system-controller.patch
deleted file mode 100644
index 94784f7885..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-01-dt-bindings-clock-add-mtmips-SoCs-system-controller.patch
+++ /dev/null
@@ -1,86 +0,0 @@
-From 612616e6381929e7f9e303f8b8ad3655cc101516 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:33 +0200
-Subject: [PATCH 1/9] dt-bindings: clock: add mtmips SoCs system controller
-
-Adds device tree binding documentation for system controller node present
-in Mediatek MIPS and Ralink SOCs. This node is a clock and reset provider
-for the rest of the world. This covers RT2880, RT3050, RT3052, RT3350,
-RT3883, RT5350, MT7620, MT7628 and MT7688 SoCs.
-
-Reviewed-by: Rob Herring <robh at kernel.org>
-Acked-by: Stephen Boyd <sboyd at kernel.org>
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- .../bindings/clock/mediatek,mtmips-sysc.yaml       | 64 ++++++++++++++++++++++
- 1 file changed, 64 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/clock/mediatek,mtmips-sysc.yaml
-
---- /dev/null
-+++ b/Documentation/devicetree/bindings/clock/mediatek,mtmips-sysc.yaml
-@@ -0,0 +1,64 @@
-+# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
-+%YAML 1.2
-+---
-+$id: http://devicetree.org/schemas/clock/mediatek,mtmips-sysc.yaml#
-+$schema: http://devicetree.org/meta-schemas/core.yaml#
-+
-+title: MTMIPS SoCs System Controller
-+
-+maintainers:
-+  - Sergio Paracuellos <sergio.paracuellos at gmail.com>
-+
-+description: |
-+  MediaTek MIPS and Ralink SoCs provides a system controller to allow
-+  to access to system control registers. These registers include clock
-+  and reset related ones so this node is both clock and reset provider
-+  for the rest of the world.
-+
-+  These SoCs have an XTAL from where the cpu clock is
-+  provided as well as derived clocks for the bus and the peripherals.
-+
-+properties:
-+  compatible:
-+    items:
-+      - enum:
-+          - ralink,mt7620-sysc
-+          - ralink,mt7628-sysc
-+          - ralink,mt7688-sysc
-+          - ralink,rt2880-sysc
-+          - ralink,rt3050-sysc
-+          - ralink,rt3052-sysc
-+          - ralink,rt3352-sysc
-+          - ralink,rt3883-sysc
-+          - ralink,rt5350-sysc
-+      - const: syscon
-+
-+  reg:
-+    maxItems: 1
-+
-+  '#clock-cells':
-+    description:
-+      The first cell indicates the clock number.
-+    const: 1
-+
-+  '#reset-cells':
-+    description:
-+      The first cell indicates the reset bit within the register.
-+    const: 1
-+
-+required:
-+  - compatible
-+  - reg
-+  - '#clock-cells'
-+  - '#reset-cells'
-+
-+additionalProperties: false
-+
-+examples:
-+  - |
-+    syscon at 0 {
-+      compatible = "ralink,rt5350-sysc", "syscon";
-+      reg = <0x0 0x100>;
-+      #clock-cells = <1>;
-+      #reset-cells = <1>;
-+    };
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-02-clk-ralink-add-clock-and-reset-driver-for-MTMIPS-SoC.patch b/target/linux/ramips/patches-6.6/005-v6.5-02-clk-ralink-add-clock-and-reset-driver-for-MTMIPS-SoC.patch
deleted file mode 100644
index cef39978e0..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-02-clk-ralink-add-clock-and-reset-driver-for-MTMIPS-SoC.patch
+++ /dev/null
@@ -1,1221 +0,0 @@
-From 6f3b15586eef736831abe6a14f2a6906bc0dc074 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:34 +0200
-Subject: [PATCH 2/9] clk: ralink: add clock and reset driver for MTMIPS SoCs
-
-Until now, clock related code for old ralink SoCs was based in fixed clocks
-using 'clk_register_fixed_rate' and 'clkdev_create' directly doing in code
-and not using device tree at all for their definition. Including this driver
-is an effort to be able to define proper clocks using device tree and also
-cleaning all the clock and reset related code from 'arch/mips/ralink' dir.
-This clock and reset driver covers all the ralink SoCs but MT7621 which is
-the newest and provides gating and some differences that make it different
-from its predecesors. It has its own driver since some time ago. The ralink
-SoCs we are taking about are RT2880, RT3050, RT3052, RT3350, RT3352, RT3883,
-RT5350, MT7620, MT7628 and MT7688. Mostly the code in this new driver has
-been extracted from 'arch/mips/ralink' and cleanly put using kernel clock
-driver APIs. The clock plans for this SoCs only talks about relation between
-CPU frequency and BUS frequency. This relation is different depending on the
-particular SoC. CPU clock is derived from XTAL frequencies.
-
-Depending on the SoC we have the following frequencies:
-* RT2880 SoC:
-    - XTAL: 40 MHz.
-    - CPU: 250, 266, 280 or 300 MHz.
-    - BUS: CPU / 2 MHz.
-* RT3050, RT3052, RT3350:
-    - XTAL: 40 MHz.
-    - CPU: 320 or 384 MHz.
-    - BUS: CPU / 3 MHz.
-* RT3352:
-    - XTAL: 40 MHz.
-    - CPU: 384 or 400 MHz.
-    - BUS: CPU / 3 MHz.
-    - PERIPH: 40 MHz.
-* RT3383:
-    - XTAL: 40 MHz.
-    - CPU: 250, 384, 480 or 500 MHz.
-    - BUS: Depends on RAM Type and CPU:
-        + RAM DDR2: 125. ELSE 83 MHz.
-        + RAM DDR2: 128. ELSE 96 MHz.
-        + RAM DDR2: 160. ELSE 120 MHz.
-        + RAM DDR2: 166. ELSE 125 MHz.
-* RT5350:
-    - XTAL: 40 MHz.
-    - CPU: 300, 320 or 360 MHz.
-    - BUS: CPU / 3, CPU / 4, CPU / 3 MHz.
-    - PERIPH: 40 MHz.
-* MT7628 and MT7688:
-    - XTAL: 20 MHz or 40 MHz.
-    - CPU: 575 or 580 MHz.
-    - BUS: CPU / 3.
-    - PCMI2S: 480 MHz.
-    - PERIPH: 40 MHz.
-* MT7620:
-    - XTAL: 20 MHz or 40 MHz.
-    - PLL: XTAL, 480, 600 MHz.
-    - CPU: depends on PLL and some mult and dividers.
-    - BUS: depends on PLL and some mult and dividers.
-    - PERIPH: 40 or XTAL MHz.
-
-MT7620 is a bit more complex deriving CPU clock from a PLL and an bunch of
-register reads and predividers. To derive CPU and BUS frequencies in the
-MT7620 SoC 'mt7620_calc_rate()' helper is used.
-
-In the case XTAL can have different frequencies and we need a different
-clock frequency for peripherals 'periph' clock in introduced.
-
-The rest of the peripherals present in the SoC just follow their parent
-frequencies.
-
-With this information the clk driver will provide all the clock and reset
-functionality from a set of hardcoded clocks allowing to define a nice
-device tree without fixed clocks.
-
-Acked-by: Stephen Boyd <sboyd at kernel.org>
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- drivers/clk/ralink/Kconfig      |    7 +
- drivers/clk/ralink/Makefile     |    1 +
- drivers/clk/ralink/clk-mtmips.c | 1115 +++++++++++++++++++++++++++++++++++++++
- 3 files changed, 1123 insertions(+)
- create mode 100644 drivers/clk/ralink/clk-mtmips.c
-
---- a/drivers/clk/ralink/Kconfig
-+++ b/drivers/clk/ralink/Kconfig
-@@ -9,3 +9,10 @@ config CLK_MT7621
- 	select MFD_SYSCON
- 	help
- 	  This driver supports MediaTek MT7621 basic clocks.
-+
-+config CLK_MTMIPS
-+	bool "Clock driver for MTMIPS SoCs"
-+	depends on SOC_RT305X || SOC_RT288X || SOC_RT3883 || SOC_MT7620 || COMPILE_TEST
-+	select MFD_SYSCON
-+	help
-+	  This driver supports MTMIPS basic clocks.
---- a/drivers/clk/ralink/Makefile
-+++ b/drivers/clk/ralink/Makefile
-@@ -1,2 +1,3 @@
- # SPDX-License-Identifier: GPL-2.0
- obj-$(CONFIG_CLK_MT7621) += clk-mt7621.o
-+obj-$(CONFIG_CLK_MTMIPS) += clk-mtmips.o
---- /dev/null
-+++ b/drivers/clk/ralink/clk-mtmips.c
-@@ -0,0 +1,1115 @@
-+// SPDX-License-Identifier: GPL-2.0
-+/*
-+ * MTMIPS SoCs Clock Driver
-+ * Author: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-+ */
-+
-+#include <linux/bitops.h>
-+#include <linux/clk-provider.h>
-+#include <linux/mfd/syscon.h>
-+#include <linux/platform_device.h>
-+#include <linux/regmap.h>
-+#include <linux/reset-controller.h>
-+#include <linux/slab.h>
-+
-+/* Configuration registers */
-+#define SYSC_REG_SYSTEM_CONFIG		0x10
-+#define SYSC_REG_CLKCFG0		0x2c
-+#define SYSC_REG_RESET_CTRL		0x34
-+#define SYSC_REG_CPU_SYS_CLKCFG		0x3c
-+#define SYSC_REG_CPLL_CONFIG0		0x54
-+#define SYSC_REG_CPLL_CONFIG1		0x58
-+
-+/* RT2880 SoC */
-+#define RT2880_CONFIG_CPUCLK_SHIFT	20
-+#define RT2880_CONFIG_CPUCLK_MASK	0x3
-+#define RT2880_CONFIG_CPUCLK_250	0x0
-+#define RT2880_CONFIG_CPUCLK_266	0x1
-+#define RT2880_CONFIG_CPUCLK_280	0x2
-+#define RT2880_CONFIG_CPUCLK_300	0x3
-+
-+/* RT305X SoC */
-+#define RT305X_SYSCFG_CPUCLK_SHIFT	18
-+#define RT305X_SYSCFG_CPUCLK_MASK	0x1
-+#define RT305X_SYSCFG_CPUCLK_LOW	0x0
-+#define RT305X_SYSCFG_CPUCLK_HIGH	0x1
-+
-+/* RT3352 SoC */
-+#define RT3352_SYSCFG0_CPUCLK_SHIFT	8
-+#define RT3352_SYSCFG0_CPUCLK_MASK	0x1
-+#define RT3352_SYSCFG0_CPUCLK_LOW	0x0
-+#define RT3352_SYSCFG0_CPUCLK_HIGH	0x1
-+
-+/* RT3383 SoC */
-+#define RT3883_SYSCFG0_DRAM_TYPE_DDR2	BIT(17)
-+#define RT3883_SYSCFG0_CPUCLK_SHIFT	8
-+#define RT3883_SYSCFG0_CPUCLK_MASK	0x3
-+#define RT3883_SYSCFG0_CPUCLK_250	0x0
-+#define RT3883_SYSCFG0_CPUCLK_384	0x1
-+#define RT3883_SYSCFG0_CPUCLK_480	0x2
-+#define RT3883_SYSCFG0_CPUCLK_500	0x3
-+
-+/* RT5350 SoC */
-+#define RT5350_CLKCFG0_XTAL_SEL		BIT(20)
-+#define RT5350_SYSCFG0_CPUCLK_SHIFT	8
-+#define RT5350_SYSCFG0_CPUCLK_MASK	0x3
-+#define RT5350_SYSCFG0_CPUCLK_360	0x0
-+#define RT5350_SYSCFG0_CPUCLK_320	0x2
-+#define RT5350_SYSCFG0_CPUCLK_300	0x3
-+
-+/* MT7620 and MT76x8 SoCs */
-+#define MT7620_XTAL_FREQ_SEL		BIT(6)
-+#define CPLL_CFG0_SW_CFG		BIT(31)
-+#define CPLL_CFG0_PLL_MULT_RATIO_SHIFT	16
-+#define CPLL_CFG0_PLL_MULT_RATIO_MASK   0x7
-+#define CPLL_CFG0_LC_CURFCK		BIT(15)
-+#define CPLL_CFG0_BYPASS_REF_CLK	BIT(14)
-+#define CPLL_CFG0_PLL_DIV_RATIO_SHIFT	10
-+#define CPLL_CFG0_PLL_DIV_RATIO_MASK	0x3
-+#define CPLL_CFG1_CPU_AUX1		BIT(25)
-+#define CPLL_CFG1_CPU_AUX0		BIT(24)
-+#define CLKCFG0_PERI_CLK_SEL		BIT(4)
-+#define CPU_SYS_CLKCFG_OCP_RATIO_SHIFT	16
-+#define CPU_SYS_CLKCFG_OCP_RATIO_MASK	0xf
-+#define CPU_SYS_CLKCFG_OCP_RATIO_1	0	/* 1:1   (Reserved) */
-+#define CPU_SYS_CLKCFG_OCP_RATIO_1_5	1	/* 1:1.5 (Reserved) */
-+#define CPU_SYS_CLKCFG_OCP_RATIO_2	2	/* 1:2   */
-+#define CPU_SYS_CLKCFG_OCP_RATIO_2_5	3       /* 1:2.5 (Reserved) */
-+#define CPU_SYS_CLKCFG_OCP_RATIO_3	4	/* 1:3   */
-+#define CPU_SYS_CLKCFG_OCP_RATIO_3_5	5	/* 1:3.5 (Reserved) */
-+#define CPU_SYS_CLKCFG_OCP_RATIO_4	6	/* 1:4   */
-+#define CPU_SYS_CLKCFG_OCP_RATIO_5	7	/* 1:5   */
-+#define CPU_SYS_CLKCFG_OCP_RATIO_10	8	/* 1:10  */
-+#define CPU_SYS_CLKCFG_CPU_FDIV_SHIFT	8
-+#define CPU_SYS_CLKCFG_CPU_FDIV_MASK	0x1f
-+#define CPU_SYS_CLKCFG_CPU_FFRAC_SHIFT	0
-+#define CPU_SYS_CLKCFG_CPU_FFRAC_MASK	0x1f
-+
-+/* clock scaling */
-+#define CLKCFG_FDIV_MASK		0x1f00
-+#define CLKCFG_FDIV_USB_VAL		0x0300
-+#define CLKCFG_FFRAC_MASK		0x001f
-+#define CLKCFG_FFRAC_USB_VAL		0x0003
-+
-+struct mtmips_clk;
-+struct mtmips_clk_fixed;
-+struct mtmips_clk_factor;
-+
-+struct mtmips_clk_data {
-+	struct mtmips_clk *clk_base;
-+	size_t num_clk_base;
-+	struct mtmips_clk_fixed *clk_fixed;
-+	size_t num_clk_fixed;
-+	struct mtmips_clk_factor *clk_factor;
-+	size_t num_clk_factor;
-+	struct mtmips_clk *clk_periph;
-+	size_t num_clk_periph;
-+};
-+
-+struct mtmips_clk_priv {
-+	struct regmap *sysc;
-+	const struct mtmips_clk_data *data;
-+};
-+
-+struct mtmips_clk {
-+	struct clk_hw hw;
-+	struct mtmips_clk_priv *priv;
-+};
-+
-+struct mtmips_clk_fixed {
-+	const char *name;
-+	const char *parent;
-+	unsigned long rate;
-+	struct clk_hw *hw;
-+};
-+
-+struct mtmips_clk_factor {
-+	const char *name;
-+	const char *parent;
-+	int mult;
-+	int div;
-+	unsigned long flags;
-+	struct clk_hw *hw;
-+};
-+
-+static unsigned long mtmips_pherip_clk_rate(struct clk_hw *hw,
-+					    unsigned long parent_rate)
-+{
-+	return parent_rate;
-+}
-+
-+static const struct clk_ops mtmips_periph_clk_ops = {
-+	.recalc_rate = mtmips_pherip_clk_rate,
-+};
-+
-+#define CLK_PERIPH(_name, _parent) {				\
-+	.init = &(const struct clk_init_data) {			\
-+		.name = _name,					\
-+		.ops = &mtmips_periph_clk_ops,			\
-+		.parent_data = &(const struct clk_parent_data) {\
-+			.name = _parent,			\
-+			.fw_name = _parent			\
-+		},						\
-+		.num_parents = 1,				\
-+		/*						\
-+		 * There are drivers for these SoCs that are	\
-+		 * older than clock driver and are not prepared \
-+		 * for the clock. We don't want the kernel to   \
-+		 * disable anything so we add CLK_IS_CRITICAL	\
-+		 * flag here.					\
-+		 */						\
-+		.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL	\
-+	},							\
-+}
-+
-+static struct mtmips_clk rt2880_pherip_clks[] = {
-+	{ CLK_PERIPH("300100.timer", "bus") },
-+	{ CLK_PERIPH("300120.watchdog", "bus") },
-+	{ CLK_PERIPH("300500.uart", "bus") },
-+	{ CLK_PERIPH("300900.i2c", "bus") },
-+	{ CLK_PERIPH("300c00.uartlite", "bus") },
-+	{ CLK_PERIPH("400000.ethernet", "bus") },
-+	{ CLK_PERIPH("480000.wmac", "xtal") }
-+};
-+
-+static struct mtmips_clk rt305x_pherip_clks[] = {
-+	{ CLK_PERIPH("10000100.timer", "bus") },
-+	{ CLK_PERIPH("10000120.watchdog", "bus") },
-+	{ CLK_PERIPH("10000500.uart", "bus") },
-+	{ CLK_PERIPH("10000900.i2c", "bus") },
-+	{ CLK_PERIPH("10000a00.i2s", "bus") },
-+	{ CLK_PERIPH("10000b00.spi", "bus") },
-+	{ CLK_PERIPH("10000b40.spi", "bus") },
-+	{ CLK_PERIPH("10000c00.uartlite", "bus") },
-+	{ CLK_PERIPH("10100000.ethernet", "bus") },
-+	{ CLK_PERIPH("10180000.wmac", "xtal") }
-+};
-+
-+static struct mtmips_clk rt5350_pherip_clks[] = {
-+	{ CLK_PERIPH("10000100.timer", "bus") },
-+	{ CLK_PERIPH("10000120.watchdog", "bus") },
-+	{ CLK_PERIPH("10000500.uart", "periph") },
-+	{ CLK_PERIPH("10000900.i2c", "periph") },
-+	{ CLK_PERIPH("10000a00.i2s", "periph") },
-+	{ CLK_PERIPH("10000b00.spi", "bus") },
-+	{ CLK_PERIPH("10000b40.spi", "bus") },
-+	{ CLK_PERIPH("10000c00.uartlite", "periph") },
-+	{ CLK_PERIPH("10100000.ethernet", "bus") },
-+	{ CLK_PERIPH("10180000.wmac", "xtal") }
-+};
-+
-+static struct mtmips_clk mt7620_pherip_clks[] = {
-+	{ CLK_PERIPH("10000100.timer", "periph") },
-+	{ CLK_PERIPH("10000120.watchdog", "periph") },
-+	{ CLK_PERIPH("10000500.uart", "periph") },
-+	{ CLK_PERIPH("10000900.i2c", "periph") },
-+	{ CLK_PERIPH("10000a00.i2s", "periph") },
-+	{ CLK_PERIPH("10000b00.spi", "bus") },
-+	{ CLK_PERIPH("10000b40.spi", "bus") },
-+	{ CLK_PERIPH("10000c00.uartlite", "periph") },
-+	{ CLK_PERIPH("10180000.wmac", "xtal") }
-+};
-+
-+static struct mtmips_clk mt76x8_pherip_clks[] = {
-+	{ CLK_PERIPH("10000100.timer", "periph") },
-+	{ CLK_PERIPH("10000120.watchdog", "periph") },
-+	{ CLK_PERIPH("10000900.i2c", "periph") },
-+	{ CLK_PERIPH("10000a00.i2s", "pcmi2s") },
-+	{ CLK_PERIPH("10000b00.spi", "bus") },
-+	{ CLK_PERIPH("10000b40.spi", "bus") },
-+	{ CLK_PERIPH("10000c00.uart0", "periph") },
-+	{ CLK_PERIPH("10000d00.uart1", "periph") },
-+	{ CLK_PERIPH("10000e00.uart2", "periph") },
-+	{ CLK_PERIPH("10300000.wmac", "xtal") }
-+};
-+
-+static int mtmips_register_pherip_clocks(struct device_node *np,
-+					 struct clk_hw_onecell_data *clk_data,
-+					 struct mtmips_clk_priv *priv)
-+{
-+	struct clk_hw **hws = clk_data->hws;
-+	struct mtmips_clk *sclk;
-+	size_t idx_start = priv->data->num_clk_base + priv->data->num_clk_fixed +
-+			   priv->data->num_clk_factor;
-+	int ret, i;
-+
-+	for (i = 0; i < priv->data->num_clk_periph; i++) {
-+		int idx = idx_start + i;
-+
-+		sclk = &priv->data->clk_periph[i];
-+		ret = of_clk_hw_register(np, &sclk->hw);
-+		if (ret) {
-+			pr_err("Couldn't register peripheral clock %d\n", idx);
-+			goto err_clk_unreg;
-+		}
-+
-+		hws[idx] = &sclk->hw;
-+	}
-+
-+	return 0;
-+
-+err_clk_unreg:
-+	while (--i >= 0) {
-+		sclk = &priv->data->clk_periph[i];
-+		clk_hw_unregister(&sclk->hw);
-+	}
-+	return ret;
-+}
-+
-+#define CLK_FIXED(_name, _parent, _rate) \
-+	{				 \
-+		.name = _name,		 \
-+		.parent = _parent,	 \
-+		.rate = _rate		 \
-+	}
-+
-+static struct mtmips_clk_fixed rt305x_fixed_clocks[] = {
-+	CLK_FIXED("xtal", NULL, 40000000)
-+};
-+
-+static struct mtmips_clk_fixed rt3352_fixed_clocks[] = {
-+	CLK_FIXED("periph", "xtal", 40000000)
-+};
-+
-+static struct mtmips_clk_fixed mt76x8_fixed_clocks[] = {
-+	CLK_FIXED("pcmi2s", "xtal", 480000000),
-+	CLK_FIXED("periph", "xtal", 40000000)
-+};
-+
-+static int mtmips_register_fixed_clocks(struct clk_hw_onecell_data *clk_data,
-+					struct mtmips_clk_priv *priv)
-+{
-+	struct clk_hw **hws = clk_data->hws;
-+	struct mtmips_clk_fixed *sclk;
-+	size_t idx_start = priv->data->num_clk_base;
-+	int ret, i;
-+
-+	for (i = 0; i < priv->data->num_clk_fixed; i++) {
-+		int idx = idx_start + i;
-+
-+		sclk = &priv->data->clk_fixed[i];
-+		sclk->hw = clk_hw_register_fixed_rate(NULL, sclk->name,
-+						      sclk->parent, 0,
-+						      sclk->rate);
-+		if (IS_ERR(sclk->hw)) {
-+			pr_err("Couldn't register fixed clock %d\n", idx);
-+			goto err_clk_unreg;
-+		}
-+
-+		hws[idx] = sclk->hw;
-+	}
-+
-+	return 0;
-+
-+err_clk_unreg:
-+	while (--i >= 0) {
-+		sclk = &priv->data->clk_fixed[i];
-+		clk_hw_unregister_fixed_rate(sclk->hw);
-+	}
-+	return ret;
-+}
-+
-+#define CLK_FACTOR(_name, _parent, _mult, _div)		\
-+	{						\
-+		.name = _name,				\
-+		.parent = _parent,			\
-+		.mult = _mult,				\
-+		.div = _div,				\
-+		.flags = CLK_SET_RATE_PARENT		\
-+	}
-+
-+static struct mtmips_clk_factor rt2880_factor_clocks[] = {
-+	CLK_FACTOR("bus", "cpu", 1, 2)
-+};
-+
-+static struct mtmips_clk_factor rt305x_factor_clocks[] = {
-+	CLK_FACTOR("bus", "cpu", 1, 3)
-+};
-+
-+static int mtmips_register_factor_clocks(struct clk_hw_onecell_data *clk_data,
-+					 struct mtmips_clk_priv *priv)
-+{
-+	struct clk_hw **hws = clk_data->hws;
-+	struct mtmips_clk_factor *sclk;
-+	size_t idx_start = priv->data->num_clk_base + priv->data->num_clk_fixed;
-+	int ret, i;
-+
-+	for (i = 0; i < priv->data->num_clk_factor; i++) {
-+		int idx = idx_start + i;
-+
-+		sclk = &priv->data->clk_factor[i];
-+		sclk->hw = clk_hw_register_fixed_factor(NULL, sclk->name,
-+						  sclk->parent, sclk->flags,
-+						  sclk->mult, sclk->div);
-+		if (IS_ERR(sclk->hw)) {
-+			pr_err("Couldn't register factor clock %d\n", idx);
-+			goto err_clk_unreg;
-+		}
-+
-+		hws[idx] = sclk->hw;
-+	}
-+
-+	return 0;
-+
-+err_clk_unreg:
-+	while (--i >= 0) {
-+		sclk = &priv->data->clk_factor[i];
-+		clk_hw_unregister_fixed_factor(sclk->hw);
-+	}
-+	return ret;
-+}
-+
-+static inline struct mtmips_clk *to_mtmips_clk(struct clk_hw *hw)
-+{
-+	return container_of(hw, struct mtmips_clk, hw);
-+}
-+
-+static unsigned long rt5350_xtal_recalc_rate(struct clk_hw *hw,
-+					     unsigned long parent_rate)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 val;
-+
-+	regmap_read(sysc, SYSC_REG_SYSTEM_CONFIG, &val);
-+	if (!(val & RT5350_CLKCFG0_XTAL_SEL))
-+		return 20000000;
-+
-+	return 40000000;
-+}
-+
-+static unsigned long rt5350_cpu_recalc_rate(struct clk_hw *hw,
-+					    unsigned long xtal_clk)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+
-+	regmap_read(sysc, SYSC_REG_SYSTEM_CONFIG, &t);
-+	t = (t >> RT5350_SYSCFG0_CPUCLK_SHIFT) & RT5350_SYSCFG0_CPUCLK_MASK;
-+
-+	switch (t) {
-+	case RT5350_SYSCFG0_CPUCLK_360:
-+		return 360000000;
-+	case RT5350_SYSCFG0_CPUCLK_320:
-+		return 320000000;
-+	case RT5350_SYSCFG0_CPUCLK_300:
-+		return 300000000;
-+	default:
-+		BUG();
-+	}
-+}
-+
-+static unsigned long rt5350_bus_recalc_rate(struct clk_hw *hw,
-+					    unsigned long parent_rate)
-+{
-+	if (parent_rate == 320000000)
-+		return parent_rate / 4;
-+
-+	return parent_rate / 3;
-+}
-+
-+static unsigned long rt3352_cpu_recalc_rate(struct clk_hw *hw,
-+					    unsigned long xtal_clk)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+
-+	regmap_read(sysc, SYSC_REG_SYSTEM_CONFIG, &t);
-+	t = (t >> RT3352_SYSCFG0_CPUCLK_SHIFT) & RT3352_SYSCFG0_CPUCLK_MASK;
-+
-+	switch (t) {
-+	case RT3352_SYSCFG0_CPUCLK_LOW:
-+		return 384000000;
-+	case RT3352_SYSCFG0_CPUCLK_HIGH:
-+		return 400000000;
-+	default:
-+		BUG();
-+	}
-+}
-+
-+static unsigned long rt305x_cpu_recalc_rate(struct clk_hw *hw,
-+					    unsigned long xtal_clk)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+
-+	regmap_read(sysc, SYSC_REG_SYSTEM_CONFIG, &t);
-+	t = (t >> RT305X_SYSCFG_CPUCLK_SHIFT) & RT305X_SYSCFG_CPUCLK_MASK;
-+
-+	switch (t) {
-+	case RT305X_SYSCFG_CPUCLK_LOW:
-+		return 320000000;
-+	case RT305X_SYSCFG_CPUCLK_HIGH:
-+		return 384000000;
-+	default:
-+		BUG();
-+	}
-+}
-+
-+static unsigned long rt3883_cpu_recalc_rate(struct clk_hw *hw,
-+					    unsigned long xtal_clk)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+
-+	regmap_read(sysc, SYSC_REG_SYSTEM_CONFIG, &t);
-+	t = (t >> RT3883_SYSCFG0_CPUCLK_SHIFT) & RT3883_SYSCFG0_CPUCLK_MASK;
-+
-+	switch (t) {
-+	case RT3883_SYSCFG0_CPUCLK_250:
-+		return 250000000;
-+	case RT3883_SYSCFG0_CPUCLK_384:
-+		return 384000000;
-+	case RT3883_SYSCFG0_CPUCLK_480:
-+		return 480000000;
-+	case RT3883_SYSCFG0_CPUCLK_500:
-+		return 500000000;
-+	default:
-+		BUG();
-+	}
-+}
-+
-+static unsigned long rt3883_bus_recalc_rate(struct clk_hw *hw,
-+					    unsigned long parent_rate)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 ddr2;
-+	u32 t;
-+
-+	regmap_read(sysc, SYSC_REG_SYSTEM_CONFIG, &t);
-+	ddr2 = t & RT3883_SYSCFG0_DRAM_TYPE_DDR2;
-+
-+	switch (parent_rate) {
-+	case 250000000:
-+		return (ddr2) ? 125000000 : 83000000;
-+	case 384000000:
-+		return (ddr2) ? 128000000 : 96000000;
-+	case 480000000:
-+		return (ddr2) ? 160000000 : 120000000;
-+	case 500000000:
-+		return (ddr2) ? 166000000 : 125000000;
-+	default:
-+		WARN_ON_ONCE(parent_rate == 0);
-+		return parent_rate / 4;
-+	}
-+}
-+
-+static unsigned long rt2880_cpu_recalc_rate(struct clk_hw *hw,
-+					    unsigned long xtal_clk)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+
-+	regmap_read(sysc, SYSC_REG_SYSTEM_CONFIG, &t);
-+	t = (t >> RT2880_CONFIG_CPUCLK_SHIFT) & RT2880_CONFIG_CPUCLK_MASK;
-+
-+	switch (t) {
-+	case RT2880_CONFIG_CPUCLK_250:
-+		return 250000000;
-+	case RT2880_CONFIG_CPUCLK_266:
-+		return 266000000;
-+	case RT2880_CONFIG_CPUCLK_280:
-+		return 280000000;
-+	case RT2880_CONFIG_CPUCLK_300:
-+		return 300000000;
-+	default:
-+		BUG();
-+	}
-+}
-+
-+static u32 mt7620_calc_rate(u32 ref_rate, u32 mul, u32 div)
-+{
-+	u64 t;
-+
-+	t = ref_rate;
-+	t *= mul;
-+	t = div_u64(t, div);
-+
-+	return t;
-+}
-+
-+static unsigned long mt7620_pll_recalc_rate(struct clk_hw *hw,
-+					    unsigned long parent_rate)
-+{
-+	static const u32 clk_divider[] = { 2, 3, 4, 8 };
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	unsigned long cpu_pll;
-+	u32 t;
-+	u32 mul;
-+	u32 div;
-+
-+	regmap_read(sysc, SYSC_REG_CPLL_CONFIG0, &t);
-+	if (t & CPLL_CFG0_BYPASS_REF_CLK) {
-+		cpu_pll = parent_rate;
-+	} else if ((t & CPLL_CFG0_SW_CFG) == 0) {
-+		cpu_pll = 600000000;
-+	} else {
-+		mul = (t >> CPLL_CFG0_PLL_MULT_RATIO_SHIFT) &
-+			CPLL_CFG0_PLL_MULT_RATIO_MASK;
-+		mul += 24;
-+		if (t & CPLL_CFG0_LC_CURFCK)
-+			mul *= 2;
-+
-+		div = (t >> CPLL_CFG0_PLL_DIV_RATIO_SHIFT) &
-+			CPLL_CFG0_PLL_DIV_RATIO_MASK;
-+
-+		WARN_ON_ONCE(div >= ARRAY_SIZE(clk_divider));
-+
-+		cpu_pll = mt7620_calc_rate(parent_rate, mul, clk_divider[div]);
-+	}
-+
-+	regmap_read(sysc, SYSC_REG_CPLL_CONFIG1, &t);
-+	if (t & CPLL_CFG1_CPU_AUX1)
-+		return parent_rate;
-+
-+	if (t & CPLL_CFG1_CPU_AUX0)
-+		return 480000000;
-+
-+	return cpu_pll;
-+}
-+
-+static unsigned long mt7620_cpu_recalc_rate(struct clk_hw *hw,
-+					    unsigned long parent_rate)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+	u32 mul;
-+	u32 div;
-+
-+	regmap_read(sysc, SYSC_REG_CPU_SYS_CLKCFG, &t);
-+	mul = t & CPU_SYS_CLKCFG_CPU_FFRAC_MASK;
-+	div = (t >> CPU_SYS_CLKCFG_CPU_FDIV_SHIFT) &
-+		CPU_SYS_CLKCFG_CPU_FDIV_MASK;
-+
-+	return mt7620_calc_rate(parent_rate, mul, div);
-+}
-+
-+static unsigned long mt7620_bus_recalc_rate(struct clk_hw *hw,
-+					    unsigned long parent_rate)
-+{
-+	static const u32 ocp_dividers[16] = {
-+		[CPU_SYS_CLKCFG_OCP_RATIO_2] = 2,
-+		[CPU_SYS_CLKCFG_OCP_RATIO_3] = 3,
-+		[CPU_SYS_CLKCFG_OCP_RATIO_4] = 4,
-+		[CPU_SYS_CLKCFG_OCP_RATIO_5] = 5,
-+		[CPU_SYS_CLKCFG_OCP_RATIO_10] = 10,
-+	};
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+	u32 ocp_ratio;
-+	u32 div;
-+
-+	regmap_read(sysc, SYSC_REG_CPU_SYS_CLKCFG, &t);
-+	ocp_ratio = (t >> CPU_SYS_CLKCFG_OCP_RATIO_SHIFT) &
-+		CPU_SYS_CLKCFG_OCP_RATIO_MASK;
-+
-+	if (WARN_ON_ONCE(ocp_ratio >= ARRAY_SIZE(ocp_dividers)))
-+		return parent_rate;
-+
-+	div = ocp_dividers[ocp_ratio];
-+
-+	if (WARN(!div, "invalid divider for OCP ratio %u", ocp_ratio))
-+		return parent_rate;
-+
-+	return parent_rate / div;
-+}
-+
-+static unsigned long mt7620_periph_recalc_rate(struct clk_hw *hw,
-+					       unsigned long parent_rate)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+
-+	regmap_read(sysc, SYSC_REG_CLKCFG0, &t);
-+	if (t & CLKCFG0_PERI_CLK_SEL)
-+		return parent_rate;
-+
-+	return 40000000;
-+}
-+
-+static unsigned long mt76x8_xtal_recalc_rate(struct clk_hw *hw,
-+					     unsigned long parent_rate)
-+{
-+	struct mtmips_clk *clk = to_mtmips_clk(hw);
-+	struct regmap *sysc = clk->priv->sysc;
-+	u32 t;
-+
-+	regmap_read(sysc, SYSC_REG_SYSTEM_CONFIG, &t);
-+	if (t & MT7620_XTAL_FREQ_SEL)
-+		return 40000000;
-+
-+	return 20000000;
-+}
-+
-+static unsigned long mt76x8_cpu_recalc_rate(struct clk_hw *hw,
-+					    unsigned long xtal_clk)
-+{
-+	if (xtal_clk == 40000000)
-+		return 580000000;
-+
-+	return 575000000;
-+}
-+
-+#define CLK_BASE(_name, _parent, _recalc) {				\
-+	.init = &(const struct clk_init_data) {				\
-+		.name = _name,						\
-+		.ops = &(const struct clk_ops) {			\
-+			.recalc_rate = _recalc,				\
-+		},							\
-+		.parent_data = &(const struct clk_parent_data) {	\
-+			.name = _parent,				\
-+			.fw_name = _parent				\
-+		},							\
-+		.num_parents = _parent ? 1 : 0				\
-+	},								\
-+}
-+
-+static struct mtmips_clk rt2880_clks_base[] = {
-+	{ CLK_BASE("cpu", "xtal", rt2880_cpu_recalc_rate) }
-+};
-+
-+static struct mtmips_clk rt305x_clks_base[] = {
-+	{ CLK_BASE("cpu", "xtal", rt305x_cpu_recalc_rate) }
-+};
-+
-+static struct mtmips_clk rt3352_clks_base[] = {
-+	{ CLK_BASE("xtal", NULL, rt5350_xtal_recalc_rate) },
-+	{ CLK_BASE("cpu", "xtal", rt3352_cpu_recalc_rate) }
-+};
-+
-+static struct mtmips_clk rt3883_clks_base[] = {
-+	{ CLK_BASE("cpu", "xtal", rt3883_cpu_recalc_rate) },
-+	{ CLK_BASE("bus", "cpu", rt3883_bus_recalc_rate) }
-+};
-+
-+static struct mtmips_clk rt5350_clks_base[] = {
-+	{ CLK_BASE("xtal", NULL, rt5350_xtal_recalc_rate) },
-+	{ CLK_BASE("cpu", "xtal", rt5350_cpu_recalc_rate) },
-+	{ CLK_BASE("bus", "cpu", rt5350_bus_recalc_rate) }
-+};
-+
-+static struct mtmips_clk mt7620_clks_base[] = {
-+	{ CLK_BASE("xtal", NULL, mt76x8_xtal_recalc_rate) },
-+	{ CLK_BASE("pll", "xtal", mt7620_pll_recalc_rate) },
-+	{ CLK_BASE("cpu", "pll", mt7620_cpu_recalc_rate) },
-+	{ CLK_BASE("periph", "xtal", mt7620_periph_recalc_rate) },
-+	{ CLK_BASE("bus", "cpu", mt7620_bus_recalc_rate) }
-+};
-+
-+static struct mtmips_clk mt76x8_clks_base[] = {
-+	{ CLK_BASE("xtal", NULL, mt76x8_xtal_recalc_rate) },
-+	{ CLK_BASE("cpu", "xtal", mt76x8_cpu_recalc_rate) }
-+};
-+
-+static int mtmips_register_clocks(struct device_node *np,
-+				  struct clk_hw_onecell_data *clk_data,
-+				  struct mtmips_clk_priv *priv)
-+{
-+	struct clk_hw **hws = clk_data->hws;
-+	struct mtmips_clk *sclk;
-+	int ret, i;
-+
-+	for (i = 0; i < priv->data->num_clk_base; i++) {
-+		sclk = &priv->data->clk_base[i];
-+		sclk->priv = priv;
-+		ret = of_clk_hw_register(np, &sclk->hw);
-+		if (ret) {
-+			pr_err("Couldn't register top clock %i\n", i);
-+			goto err_clk_unreg;
-+		}
-+
-+		hws[i] = &sclk->hw;
-+	}
-+
-+	return 0;
-+
-+err_clk_unreg:
-+	while (--i >= 0) {
-+		sclk = &priv->data->clk_base[i];
-+		clk_hw_unregister(&sclk->hw);
-+	}
-+	return ret;
-+}
-+
-+static const struct mtmips_clk_data rt2880_clk_data = {
-+	.clk_base = rt2880_clks_base,
-+	.num_clk_base = ARRAY_SIZE(rt2880_clks_base),
-+	.clk_fixed = rt305x_fixed_clocks,
-+	.num_clk_fixed = ARRAY_SIZE(rt305x_fixed_clocks),
-+	.clk_factor = rt2880_factor_clocks,
-+	.num_clk_factor = ARRAY_SIZE(rt2880_factor_clocks),
-+	.clk_periph = rt2880_pherip_clks,
-+	.num_clk_periph = ARRAY_SIZE(rt2880_pherip_clks),
-+};
-+
-+static const struct mtmips_clk_data rt305x_clk_data = {
-+	.clk_base = rt305x_clks_base,
-+	.num_clk_base = ARRAY_SIZE(rt305x_clks_base),
-+	.clk_fixed = rt305x_fixed_clocks,
-+	.num_clk_fixed = ARRAY_SIZE(rt305x_fixed_clocks),
-+	.clk_factor = rt305x_factor_clocks,
-+	.num_clk_factor = ARRAY_SIZE(rt305x_factor_clocks),
-+	.clk_periph = rt305x_pherip_clks,
-+	.num_clk_periph = ARRAY_SIZE(rt305x_pherip_clks),
-+};
-+
-+static const struct mtmips_clk_data rt3352_clk_data = {
-+	.clk_base = rt3352_clks_base,
-+	.num_clk_base = ARRAY_SIZE(rt3352_clks_base),
-+	.clk_fixed = rt3352_fixed_clocks,
-+	.num_clk_fixed = ARRAY_SIZE(rt3352_fixed_clocks),
-+	.clk_factor = rt305x_factor_clocks,
-+	.num_clk_factor = ARRAY_SIZE(rt305x_factor_clocks),
-+	.clk_periph = rt5350_pherip_clks,
-+	.num_clk_periph = ARRAY_SIZE(rt5350_pherip_clks),
-+};
-+
-+static const struct mtmips_clk_data rt3883_clk_data = {
-+	.clk_base = rt3883_clks_base,
-+	.num_clk_base = ARRAY_SIZE(rt3883_clks_base),
-+	.clk_fixed = rt305x_fixed_clocks,
-+	.num_clk_fixed = ARRAY_SIZE(rt305x_fixed_clocks),
-+	.clk_factor = NULL,
-+	.num_clk_factor = 0,
-+	.clk_periph = rt5350_pherip_clks,
-+	.num_clk_periph = ARRAY_SIZE(rt5350_pherip_clks),
-+};
-+
-+static const struct mtmips_clk_data rt5350_clk_data = {
-+	.clk_base = rt5350_clks_base,
-+	.num_clk_base = ARRAY_SIZE(rt5350_clks_base),
-+	.clk_fixed = rt3352_fixed_clocks,
-+	.num_clk_fixed = ARRAY_SIZE(rt3352_fixed_clocks),
-+	.clk_factor = NULL,
-+	.num_clk_factor = 0,
-+	.clk_periph = rt5350_pherip_clks,
-+	.num_clk_periph = ARRAY_SIZE(rt5350_pherip_clks),
-+};
-+
-+static const struct mtmips_clk_data mt7620_clk_data = {
-+	.clk_base = mt7620_clks_base,
-+	.num_clk_base = ARRAY_SIZE(mt7620_clks_base),
-+	.clk_fixed = NULL,
-+	.num_clk_fixed = 0,
-+	.clk_factor = NULL,
-+	.num_clk_factor = 0,
-+	.clk_periph = mt7620_pherip_clks,
-+	.num_clk_periph = ARRAY_SIZE(mt7620_pherip_clks),
-+};
-+
-+static const struct mtmips_clk_data mt76x8_clk_data = {
-+	.clk_base = mt76x8_clks_base,
-+	.num_clk_base = ARRAY_SIZE(mt76x8_clks_base),
-+	.clk_fixed = mt76x8_fixed_clocks,
-+	.num_clk_fixed = ARRAY_SIZE(mt76x8_fixed_clocks),
-+	.clk_factor = rt305x_factor_clocks,
-+	.num_clk_factor = ARRAY_SIZE(rt305x_factor_clocks),
-+	.clk_periph = mt76x8_pherip_clks,
-+	.num_clk_periph = ARRAY_SIZE(mt76x8_pherip_clks),
-+};
-+
-+static const struct of_device_id mtmips_of_match[] = {
-+	{
-+		.compatible = "ralink,rt2880-sysc",
-+		.data = &rt2880_clk_data,
-+	},
-+	{
-+		.compatible = "ralink,rt3050-sysc",
-+		.data = &rt305x_clk_data,
-+	},
-+	{
-+		.compatible = "ralink,rt3052-sysc",
-+		.data = &rt305x_clk_data,
-+	},
-+	{
-+		.compatible = "ralink,rt3352-sysc",
-+		.data = &rt3352_clk_data,
-+	},
-+	{
-+		.compatible = "ralink,rt3883-sysc",
-+		.data = &rt3883_clk_data,
-+	},
-+	{
-+		.compatible = "ralink,rt5350-sysc",
-+		.data = &rt5350_clk_data,
-+	},
-+	{
-+		.compatible = "ralink,mt7620-sysc",
-+		.data = &mt7620_clk_data,
-+	},
-+	{
-+		.compatible = "ralink,mt7628-sysc",
-+		.data = &mt76x8_clk_data,
-+	},
-+	{
-+		.compatible = "ralink,mt7688-sysc",
-+		.data = &mt76x8_clk_data,
-+	},
-+	{}
-+};
-+
-+static void __init mtmips_clk_regs_init(struct device_node *node,
-+					struct mtmips_clk_priv *priv)
-+{
-+	u32 t;
-+
-+	if (!of_device_is_compatible(node, "ralink,mt7620-sysc"))
-+		return;
-+
-+	/*
-+	 * When the CPU goes into sleep mode, the BUS
-+	 * clock will be too low for USB to function properly.
-+	 * Adjust the busses fractional divider to fix this
-+	 */
-+	regmap_read(priv->sysc, SYSC_REG_CPU_SYS_CLKCFG, &t);
-+	t &= ~(CLKCFG_FDIV_MASK | CLKCFG_FFRAC_MASK);
-+	t |= CLKCFG_FDIV_USB_VAL | CLKCFG_FFRAC_USB_VAL;
-+	regmap_write(priv->sysc, SYSC_REG_CPU_SYS_CLKCFG, t);
-+}
-+
-+static void __init mtmips_clk_init(struct device_node *node)
-+{
-+	const struct of_device_id *match;
-+	const struct mtmips_clk_data *data;
-+	struct mtmips_clk_priv *priv;
-+	struct clk_hw_onecell_data *clk_data;
-+	int ret, i, count;
-+
-+	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
-+	if (!priv)
-+		return;
-+
-+	priv->sysc = syscon_node_to_regmap(node);
-+	if (IS_ERR(priv->sysc)) {
-+		pr_err("Could not get sysc syscon regmap\n");
-+		goto free_clk_priv;
-+	}
-+
-+	mtmips_clk_regs_init(node, priv);
-+
-+	match = of_match_node(mtmips_of_match, node);
-+	if (WARN_ON(!match))
-+		return;
-+
-+	data = match->data;
-+	priv->data = data;
-+	count = priv->data->num_clk_base + priv->data->num_clk_fixed +
-+		priv->data->num_clk_factor + priv->data->num_clk_periph;
-+	clk_data = kzalloc(struct_size(clk_data, hws, count), GFP_KERNEL);
-+	if (!clk_data)
-+		goto free_clk_priv;
-+
-+	ret = mtmips_register_clocks(node, clk_data, priv);
-+	if (ret) {
-+		pr_err("Couldn't register top clocks\n");
-+		goto free_clk_data;
-+	}
-+
-+	ret = mtmips_register_fixed_clocks(clk_data, priv);
-+	if (ret) {
-+		pr_err("Couldn't register fixed clocks\n");
-+		goto unreg_clk_top;
-+	}
-+
-+	ret = mtmips_register_factor_clocks(clk_data, priv);
-+	if (ret) {
-+		pr_err("Couldn't register factor clocks\n");
-+		goto unreg_clk_fixed;
-+	}
-+
-+	ret = mtmips_register_pherip_clocks(node, clk_data, priv);
-+	if (ret) {
-+		pr_err("Couldn't register peripheral clocks\n");
-+		goto unreg_clk_factor;
-+	}
-+
-+	clk_data->num = count;
-+
-+	ret = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-+	if (ret) {
-+		pr_err("Couldn't add clk hw provider\n");
-+		goto unreg_clk_periph;
-+	}
-+
-+	return;
-+
-+unreg_clk_periph:
-+	for (i = 0; i < priv->data->num_clk_periph; i++) {
-+		struct mtmips_clk *sclk = &priv->data->clk_periph[i];
-+
-+		clk_hw_unregister(&sclk->hw);
-+	}
-+
-+unreg_clk_factor:
-+	for (i = 0; i < priv->data->num_clk_factor; i++) {
-+		struct mtmips_clk_factor *sclk = &priv->data->clk_factor[i];
-+
-+		clk_hw_unregister_fixed_factor(sclk->hw);
-+	}
-+
-+unreg_clk_fixed:
-+	for (i = 0; i < priv->data->num_clk_fixed; i++) {
-+		struct mtmips_clk_fixed *sclk = &priv->data->clk_fixed[i];
-+
-+		clk_hw_unregister_fixed_rate(sclk->hw);
-+	}
-+
-+unreg_clk_top:
-+	for (i = 0; i < priv->data->num_clk_base; i++) {
-+		struct mtmips_clk *sclk = &priv->data->clk_base[i];
-+
-+		clk_hw_unregister(&sclk->hw);
-+	}
-+
-+free_clk_data:
-+	kfree(clk_data);
-+
-+free_clk_priv:
-+	kfree(priv);
-+}
-+CLK_OF_DECLARE_DRIVER(rt2880_clk, "ralink,rt2880-sysc", mtmips_clk_init);
-+CLK_OF_DECLARE_DRIVER(rt3050_clk, "ralink,rt3050-sysc", mtmips_clk_init);
-+CLK_OF_DECLARE_DRIVER(rt3052_clk, "ralink,rt3052-sysc", mtmips_clk_init);
-+CLK_OF_DECLARE_DRIVER(rt3352_clk, "ralink,rt3352-sysc", mtmips_clk_init);
-+CLK_OF_DECLARE_DRIVER(rt3883_clk, "ralink,rt3883-sysc", mtmips_clk_init);
-+CLK_OF_DECLARE_DRIVER(rt5350_clk, "ralink,rt5350-sysc", mtmips_clk_init);
-+CLK_OF_DECLARE_DRIVER(mt7620_clk, "ralink,mt7620-sysc", mtmips_clk_init);
-+CLK_OF_DECLARE_DRIVER(mt7628_clk, "ralink,mt7628-sysc", mtmips_clk_init);
-+CLK_OF_DECLARE_DRIVER(mt7688_clk, "ralink,mt7688-sysc", mtmips_clk_init);
-+
-+struct mtmips_rst {
-+	struct reset_controller_dev rcdev;
-+	struct regmap *sysc;
-+};
-+
-+static struct mtmips_rst *to_mtmips_rst(struct reset_controller_dev *dev)
-+{
-+	return container_of(dev, struct mtmips_rst, rcdev);
-+}
-+
-+static int mtmips_assert_device(struct reset_controller_dev *rcdev,
-+				unsigned long id)
-+{
-+	struct mtmips_rst *data = to_mtmips_rst(rcdev);
-+	struct regmap *sysc = data->sysc;
-+
-+	return regmap_update_bits(sysc, SYSC_REG_RESET_CTRL, BIT(id), BIT(id));
-+}
-+
-+static int mtmips_deassert_device(struct reset_controller_dev *rcdev,
-+				  unsigned long id)
-+{
-+	struct mtmips_rst *data = to_mtmips_rst(rcdev);
-+	struct regmap *sysc = data->sysc;
-+
-+	return regmap_update_bits(sysc, SYSC_REG_RESET_CTRL, BIT(id), 0);
-+}
-+
-+static int mtmips_reset_device(struct reset_controller_dev *rcdev,
-+			       unsigned long id)
-+{
-+	int ret;
-+
-+	ret = mtmips_assert_device(rcdev, id);
-+	if (ret < 0)
-+		return ret;
-+
-+	return mtmips_deassert_device(rcdev, id);
-+}
-+
-+static int mtmips_rst_xlate(struct reset_controller_dev *rcdev,
-+			    const struct of_phandle_args *reset_spec)
-+{
-+	unsigned long id = reset_spec->args[0];
-+
-+	if (id == 0 || id >= rcdev->nr_resets)
-+		return -EINVAL;
-+
-+	return id;
-+}
-+
-+static const struct reset_control_ops reset_ops = {
-+	.reset = mtmips_reset_device,
-+	.assert = mtmips_assert_device,
-+	.deassert = mtmips_deassert_device
-+};
-+
-+static int mtmips_reset_init(struct device *dev, struct regmap *sysc)
-+{
-+	struct mtmips_rst *rst_data;
-+
-+	rst_data = devm_kzalloc(dev, sizeof(*rst_data), GFP_KERNEL);
-+	if (!rst_data)
-+		return -ENOMEM;
-+
-+	rst_data->sysc = sysc;
-+	rst_data->rcdev.ops = &reset_ops;
-+	rst_data->rcdev.owner = THIS_MODULE;
-+	rst_data->rcdev.nr_resets = 32;
-+	rst_data->rcdev.of_reset_n_cells = 1;
-+	rst_data->rcdev.of_xlate = mtmips_rst_xlate;
-+	rst_data->rcdev.of_node = dev_of_node(dev);
-+
-+	return devm_reset_controller_register(dev, &rst_data->rcdev);
-+}
-+
-+static int mtmips_clk_probe(struct platform_device *pdev)
-+{
-+	struct device_node *np = pdev->dev.of_node;
-+	struct device *dev = &pdev->dev;
-+	struct mtmips_clk_priv *priv;
-+	int ret;
-+
-+	priv = devm_kzalloc(dev, sizeof(*priv), GFP_KERNEL);
-+	if (!priv)
-+		return -ENOMEM;
-+
-+	priv->sysc = syscon_node_to_regmap(np);
-+	if (IS_ERR(priv->sysc))
-+		return dev_err_probe(dev, PTR_ERR(priv->sysc),
-+				     "Could not get sysc syscon regmap\n");
-+
-+	ret = mtmips_reset_init(dev, priv->sysc);
-+	if (ret)
-+		return dev_err_probe(dev, ret, "Could not init reset controller\n");
-+
-+	return 0;
-+}
-+
-+static const struct of_device_id mtmips_clk_of_match[] = {
-+	{ .compatible = "ralink,rt2880-reset" },
-+	{ .compatible = "ralink,rt2880-sysc" },
-+	{ .compatible = "ralink,rt3050-sysc" },
-+	{ .compatible = "ralink,rt3052-sysc" },
-+	{ .compatible = "ralink,rt3352-sysc" },
-+	{ .compatible = "ralink,rt3883-sysc" },
-+	{ .compatible = "ralink,rt5350-sysc" },
-+	{ .compatible = "ralink,mt7620-sysc" },
-+	{ .compatible = "ralink,mt7628-sysc" },
-+	{ .compatible = "ralink,mt7688-sysc" },
-+	{}
-+};
-+
-+static struct platform_driver mtmips_clk_driver = {
-+	.probe = mtmips_clk_probe,
-+	.driver = {
-+		.name = "mtmips-clk",
-+		.of_match_table = mtmips_clk_of_match,
-+	},
-+};
-+
-+static int __init mtmips_clk_reset_init(void)
-+{
-+	return platform_driver_register(&mtmips_clk_driver);
-+}
-+arch_initcall(mtmips_clk_reset_init);
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch
deleted file mode 100644
index df4208b23d..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-03-mips-ralink-rt288x-remove-clock-related-code.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From ffcdf47379eae86dc8f8f02c62994dacf2c9038e Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:35 +0200
-Subject: [PATCH 3/9] mips: ralink: rt288x: remove clock related code
-
-A properly clock driver for ralink SoCs has been added. Hence there is no
-need to have clock related code in 'arch/mips/ralink' folder anymore.
-
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/include/asm/mach-ralink/rt288x.h | 10 ----------
- arch/mips/ralink/rt288x.c                  | 31 ------------------------------
- 2 files changed, 41 deletions(-)
-
---- a/arch/mips/include/asm/mach-ralink/rt288x.h
-+++ b/arch/mips/include/asm/mach-ralink/rt288x.h
-@@ -17,7 +17,6 @@
- #define SYSC_REG_CHIP_NAME1		0x04
- #define SYSC_REG_CHIP_ID		0x0c
- #define SYSC_REG_SYSTEM_CONFIG		0x10
--#define SYSC_REG_CLKCFG			0x30
- 
- #define RT2880_CHIP_NAME0		0x38325452
- #define RT2880_CHIP_NAME1		0x20203038
-@@ -26,15 +25,6 @@
- #define CHIP_ID_ID_SHIFT		8
- #define CHIP_ID_REV_MASK		0xff
- 
--#define SYSTEM_CONFIG_CPUCLK_SHIFT	20
--#define SYSTEM_CONFIG_CPUCLK_MASK	0x3
--#define SYSTEM_CONFIG_CPUCLK_250	0x0
--#define SYSTEM_CONFIG_CPUCLK_266	0x1
--#define SYSTEM_CONFIG_CPUCLK_280	0x2
--#define SYSTEM_CONFIG_CPUCLK_300	0x3
--
--#define CLKCFG_SRAM_CS_N_WDT		BIT(9)
--
- #define RT2880_SDRAM_BASE		0x08000000
- #define RT2880_MEM_SIZE_MIN		2
- #define RT2880_MEM_SIZE_MAX		128
---- a/arch/mips/ralink/rt288x.c
-+++ b/arch/mips/ralink/rt288x.c
-@@ -17,37 +17,6 @@
- 
- #include "common.h"
- 
--void __init ralink_clk_init(void)
--{
--	unsigned long cpu_rate, wmac_rate = 40000000;
--	u32 t = rt_sysc_r32(SYSC_REG_SYSTEM_CONFIG);
--	t = ((t >> SYSTEM_CONFIG_CPUCLK_SHIFT) & SYSTEM_CONFIG_CPUCLK_MASK);
--
--	switch (t) {
--	case SYSTEM_CONFIG_CPUCLK_250:
--		cpu_rate = 250000000;
--		break;
--	case SYSTEM_CONFIG_CPUCLK_266:
--		cpu_rate = 266666667;
--		break;
--	case SYSTEM_CONFIG_CPUCLK_280:
--		cpu_rate = 280000000;
--		break;
--	case SYSTEM_CONFIG_CPUCLK_300:
--		cpu_rate = 300000000;
--		break;
--	}
--
--	ralink_clk_add("cpu", cpu_rate);
--	ralink_clk_add("300100.timer", cpu_rate / 2);
--	ralink_clk_add("300120.watchdog", cpu_rate / 2);
--	ralink_clk_add("300500.uart", cpu_rate / 2);
--	ralink_clk_add("300900.i2c", cpu_rate / 2);
--	ralink_clk_add("300c00.uartlite", cpu_rate / 2);
--	ralink_clk_add("400000.ethernet", cpu_rate / 2);
--	ralink_clk_add("480000.wmac", wmac_rate);
--}
--
- void __init ralink_of_remap(void)
- {
- 	rt_sysc_membase = plat_of_remap_node("ralink,rt2880-sysc");
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-04-mips-ralink-rt305x-remove-clock-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-04-mips-ralink-rt305x-remove-clock-related-code.patch
deleted file mode 100644
index 12b4623b73..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-04-mips-ralink-rt305x-remove-clock-related-code.patch
+++ /dev/null
@@ -1,145 +0,0 @@
-From daf73c70f69386fb15960526772ef584a4efcaf2 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:36 +0200
-Subject: [PATCH 4/9] mips: ralink: rt305x: remove clock related code
-
-A properly clock driver for ralink SoCs has been added. Hence there is no
-need to have clock related code in 'arch/mips/ralink' folder anymore.
-
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/include/asm/mach-ralink/rt305x.h | 21 --------
- arch/mips/ralink/rt305x.c                  | 78 ------------------------------
- 2 files changed, 99 deletions(-)
-
---- a/arch/mips/include/asm/mach-ralink/rt305x.h
-+++ b/arch/mips/include/asm/mach-ralink/rt305x.h
-@@ -66,26 +66,9 @@ static inline int soc_is_rt5350(void)
- #define CHIP_ID_ID_SHIFT		8
- #define CHIP_ID_REV_MASK		0xff
- 
--#define RT305X_SYSCFG_CPUCLK_SHIFT		18
--#define RT305X_SYSCFG_CPUCLK_MASK		0x1
--#define RT305X_SYSCFG_CPUCLK_LOW		0x0
--#define RT305X_SYSCFG_CPUCLK_HIGH		0x1
--
- #define RT305X_SYSCFG_SRAM_CS0_MODE_SHIFT	2
--#define RT305X_SYSCFG_CPUCLK_MASK		0x1
- #define RT305X_SYSCFG_SRAM_CS0_MODE_WDT		0x1
- 
--#define RT3352_SYSCFG0_CPUCLK_SHIFT	8
--#define RT3352_SYSCFG0_CPUCLK_MASK	0x1
--#define RT3352_SYSCFG0_CPUCLK_LOW	0x0
--#define RT3352_SYSCFG0_CPUCLK_HIGH	0x1
--
--#define RT5350_SYSCFG0_CPUCLK_SHIFT	8
--#define RT5350_SYSCFG0_CPUCLK_MASK	0x3
--#define RT5350_SYSCFG0_CPUCLK_360	0x0
--#define RT5350_SYSCFG0_CPUCLK_320	0x2
--#define RT5350_SYSCFG0_CPUCLK_300	0x3
--
- #define RT5350_SYSCFG0_DRAM_SIZE_SHIFT  12
- #define RT5350_SYSCFG0_DRAM_SIZE_MASK   7
- #define RT5350_SYSCFG0_DRAM_SIZE_2M     0
-@@ -116,13 +99,9 @@ static inline int soc_is_rt5350(void)
- 
- #define RT3352_SYSC_REG_SYSCFG0		0x010
- #define RT3352_SYSC_REG_SYSCFG1         0x014
--#define RT3352_SYSC_REG_CLKCFG1         0x030
- #define RT3352_SYSC_REG_RSTCTRL         0x034
- #define RT3352_SYSC_REG_USB_PS          0x05c
- 
--#define RT3352_CLKCFG0_XTAL_SEL		BIT(20)
--#define RT3352_CLKCFG1_UPHY0_CLK_EN	BIT(18)
--#define RT3352_CLKCFG1_UPHY1_CLK_EN	BIT(20)
- #define RT3352_RSTCTRL_UHST		BIT(22)
- #define RT3352_RSTCTRL_UDEV		BIT(25)
- #define RT3352_SYSCFG1_USB0_HOST_MODE	BIT(10)
---- a/arch/mips/ralink/rt305x.c
-+++ b/arch/mips/ralink/rt305x.c
-@@ -53,84 +53,6 @@ static unsigned long rt5350_get_mem_size
- 	return ret;
- }
- 
--void __init ralink_clk_init(void)
--{
--	unsigned long cpu_rate, sys_rate, wdt_rate, uart_rate;
--	unsigned long wmac_rate = 40000000;
--
--	u32 t = rt_sysc_r32(SYSC_REG_SYSTEM_CONFIG);
--
--	if (soc_is_rt305x() || soc_is_rt3350()) {
--		t = (t >> RT305X_SYSCFG_CPUCLK_SHIFT) &
--		     RT305X_SYSCFG_CPUCLK_MASK;
--		switch (t) {
--		case RT305X_SYSCFG_CPUCLK_LOW:
--			cpu_rate = 320000000;
--			break;
--		case RT305X_SYSCFG_CPUCLK_HIGH:
--			cpu_rate = 384000000;
--			break;
--		}
--		sys_rate = uart_rate = wdt_rate = cpu_rate / 3;
--	} else if (soc_is_rt3352()) {
--		t = (t >> RT3352_SYSCFG0_CPUCLK_SHIFT) &
--		     RT3352_SYSCFG0_CPUCLK_MASK;
--		switch (t) {
--		case RT3352_SYSCFG0_CPUCLK_LOW:
--			cpu_rate = 384000000;
--			break;
--		case RT3352_SYSCFG0_CPUCLK_HIGH:
--			cpu_rate = 400000000;
--			break;
--		}
--		sys_rate = wdt_rate = cpu_rate / 3;
--		uart_rate = 40000000;
--	} else if (soc_is_rt5350()) {
--		t = (t >> RT5350_SYSCFG0_CPUCLK_SHIFT) &
--		     RT5350_SYSCFG0_CPUCLK_MASK;
--		switch (t) {
--		case RT5350_SYSCFG0_CPUCLK_360:
--			cpu_rate = 360000000;
--			sys_rate = cpu_rate / 3;
--			break;
--		case RT5350_SYSCFG0_CPUCLK_320:
--			cpu_rate = 320000000;
--			sys_rate = cpu_rate / 4;
--			break;
--		case RT5350_SYSCFG0_CPUCLK_300:
--			cpu_rate = 300000000;
--			sys_rate = cpu_rate / 3;
--			break;
--		default:
--			BUG();
--		}
--		uart_rate = 40000000;
--		wdt_rate = sys_rate;
--	} else {
--		BUG();
--	}
--
--	if (soc_is_rt3352() || soc_is_rt5350()) {
--		u32 val = rt_sysc_r32(RT3352_SYSC_REG_SYSCFG0);
--
--		if (!(val & RT3352_CLKCFG0_XTAL_SEL))
--			wmac_rate = 20000000;
--	}
--
--	ralink_clk_add("cpu", cpu_rate);
--	ralink_clk_add("sys", sys_rate);
--	ralink_clk_add("10000900.i2c", uart_rate);
--	ralink_clk_add("10000a00.i2s", uart_rate);
--	ralink_clk_add("10000b00.spi", sys_rate);
--	ralink_clk_add("10000b40.spi", sys_rate);
--	ralink_clk_add("10000100.timer", wdt_rate);
--	ralink_clk_add("10000120.watchdog", wdt_rate);
--	ralink_clk_add("10000500.uart", uart_rate);
--	ralink_clk_add("10000c00.uartlite", uart_rate);
--	ralink_clk_add("10100000.ethernet", sys_rate);
--	ralink_clk_add("10180000.wmac", wmac_rate);
--}
--
- void __init ralink_of_remap(void)
- {
- 	rt_sysc_membase = plat_of_remap_node("ralink,rt3050-sysc");
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-05-mips-ralink-rt3883-remove-clock-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-05-mips-ralink-rt3883-remove-clock-related-code.patch
deleted file mode 100644
index c13c4215f3..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-05-mips-ralink-rt3883-remove-clock-related-code.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 7cd1bb48885449a9323c7ff0f10012925e93b4e1 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:37 +0200
-Subject: [PATCH 5/9] mips: ralink: rt3883: remove clock related code
-
-A properly clock driver for ralink SoCs has been added. Hence there is no
-need to have clock related code in 'arch/mips/ralink' folder anymore.
-
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/include/asm/mach-ralink/rt3883.h |  8 ------
- arch/mips/ralink/rt3883.c                  | 44 ------------------------------
- 2 files changed, 52 deletions(-)
-
---- a/arch/mips/include/asm/mach-ralink/rt3883.h
-+++ b/arch/mips/include/asm/mach-ralink/rt3883.h
-@@ -90,14 +90,6 @@
- #define RT3883_REVID_VER_ID_SHIFT	8
- #define RT3883_REVID_ECO_ID_MASK	0x0f
- 
--#define RT3883_SYSCFG0_DRAM_TYPE_DDR2	BIT(17)
--#define RT3883_SYSCFG0_CPUCLK_SHIFT	8
--#define RT3883_SYSCFG0_CPUCLK_MASK	0x3
--#define RT3883_SYSCFG0_CPUCLK_250	0x0
--#define RT3883_SYSCFG0_CPUCLK_384	0x1
--#define RT3883_SYSCFG0_CPUCLK_480	0x2
--#define RT3883_SYSCFG0_CPUCLK_500	0x3
--
- #define RT3883_SYSCFG1_USB0_HOST_MODE	BIT(10)
- #define RT3883_SYSCFG1_PCIE_RC_MODE	BIT(8)
- #define RT3883_SYSCFG1_PCI_HOST_MODE	BIT(7)
---- a/arch/mips/ralink/rt3883.c
-+++ b/arch/mips/ralink/rt3883.c
-@@ -17,50 +17,6 @@
- 
- #include "common.h"
- 
--void __init ralink_clk_init(void)
--{
--	unsigned long cpu_rate, sys_rate;
--	u32 syscfg0;
--	u32 clksel;
--	u32 ddr2;
--
--	syscfg0 = rt_sysc_r32(RT3883_SYSC_REG_SYSCFG0);
--	clksel = ((syscfg0 >> RT3883_SYSCFG0_CPUCLK_SHIFT) &
--		RT3883_SYSCFG0_CPUCLK_MASK);
--	ddr2 = syscfg0 & RT3883_SYSCFG0_DRAM_TYPE_DDR2;
--
--	switch (clksel) {
--	case RT3883_SYSCFG0_CPUCLK_250:
--		cpu_rate = 250000000;
--		sys_rate = (ddr2) ? 125000000 : 83000000;
--		break;
--	case RT3883_SYSCFG0_CPUCLK_384:
--		cpu_rate = 384000000;
--		sys_rate = (ddr2) ? 128000000 : 96000000;
--		break;
--	case RT3883_SYSCFG0_CPUCLK_480:
--		cpu_rate = 480000000;
--		sys_rate = (ddr2) ? 160000000 : 120000000;
--		break;
--	case RT3883_SYSCFG0_CPUCLK_500:
--		cpu_rate = 500000000;
--		sys_rate = (ddr2) ? 166000000 : 125000000;
--		break;
--	}
--
--	ralink_clk_add("cpu", cpu_rate);
--	ralink_clk_add("10000100.timer", sys_rate);
--	ralink_clk_add("10000120.watchdog", sys_rate);
--	ralink_clk_add("10000500.uart", 40000000);
--	ralink_clk_add("10000900.i2c", 40000000);
--	ralink_clk_add("10000a00.i2s", 40000000);
--	ralink_clk_add("10000b00.spi", sys_rate);
--	ralink_clk_add("10000b40.spi", sys_rate);
--	ralink_clk_add("10000c00.uartlite", 40000000);
--	ralink_clk_add("10100000.ethernet", sys_rate);
--	ralink_clk_add("10180000.wmac", 40000000);
--}
--
- void __init ralink_of_remap(void)
- {
- 	rt_sysc_membase = plat_of_remap_node("ralink,rt3883-sysc");
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-06-mips-ralink-mt7620-remove-clock-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-06-mips-ralink-mt7620-remove-clock-related-code.patch
deleted file mode 100644
index 7b83cf54b4..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-06-mips-ralink-mt7620-remove-clock-related-code.patch
+++ /dev/null
@@ -1,327 +0,0 @@
-From 04b153abdfcbaba70ceef5a846067d4447fd0078 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:38 +0200
-Subject: [PATCH 6/9] mips: ralink: mt7620: remove clock related code
-
-A proper clock driver for ralink SoCs has been added. Hence there is no
-need to have clock related code in 'arch/mips/ralink' folder anymore.
-Since this is the last clock related code removal, remove also remaining
-prototypes in 'common.h' header file.
-
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/include/asm/mach-ralink/mt7620.h |  35 -----
- arch/mips/ralink/common.h                  |   3 -
- arch/mips/ralink/mt7620.c                  | 226 -----------------------------
- 3 files changed, 264 deletions(-)
-
---- a/arch/mips/include/asm/mach-ralink/mt7620.h
-+++ b/arch/mips/include/asm/mach-ralink/mt7620.h
-@@ -19,52 +19,17 @@
- #define SYSC_REG_CHIP_REV		0x0c
- #define SYSC_REG_SYSTEM_CONFIG0		0x10
- #define SYSC_REG_SYSTEM_CONFIG1		0x14
--#define SYSC_REG_CLKCFG0		0x2c
--#define SYSC_REG_CPU_SYS_CLKCFG		0x3c
--#define SYSC_REG_CPLL_CONFIG0		0x54
--#define SYSC_REG_CPLL_CONFIG1		0x58
- 
- #define MT7620_CHIP_NAME0		0x3637544d
- #define MT7620_CHIP_NAME1		0x20203032
- #define MT7628_CHIP_NAME1		0x20203832
- 
--#define SYSCFG0_XTAL_FREQ_SEL		BIT(6)
--
- #define CHIP_REV_PKG_MASK		0x1
- #define CHIP_REV_PKG_SHIFT		16
- #define CHIP_REV_VER_MASK		0xf
- #define CHIP_REV_VER_SHIFT		8
- #define CHIP_REV_ECO_MASK		0xf
- 
--#define CLKCFG0_PERI_CLK_SEL		BIT(4)
--
--#define CPU_SYS_CLKCFG_OCP_RATIO_SHIFT	16
--#define CPU_SYS_CLKCFG_OCP_RATIO_MASK	0xf
--#define CPU_SYS_CLKCFG_OCP_RATIO_1	0	/* 1:1   (Reserved) */
--#define CPU_SYS_CLKCFG_OCP_RATIO_1_5	1	/* 1:1.5 (Reserved) */
--#define CPU_SYS_CLKCFG_OCP_RATIO_2	2	/* 1:2   */
--#define CPU_SYS_CLKCFG_OCP_RATIO_2_5	3       /* 1:2.5 (Reserved) */
--#define CPU_SYS_CLKCFG_OCP_RATIO_3	4	/* 1:3   */
--#define CPU_SYS_CLKCFG_OCP_RATIO_3_5	5	/* 1:3.5 (Reserved) */
--#define CPU_SYS_CLKCFG_OCP_RATIO_4	6	/* 1:4   */
--#define CPU_SYS_CLKCFG_OCP_RATIO_5	7	/* 1:5   */
--#define CPU_SYS_CLKCFG_OCP_RATIO_10	8	/* 1:10  */
--#define CPU_SYS_CLKCFG_CPU_FDIV_SHIFT	8
--#define CPU_SYS_CLKCFG_CPU_FDIV_MASK	0x1f
--#define CPU_SYS_CLKCFG_CPU_FFRAC_SHIFT	0
--#define CPU_SYS_CLKCFG_CPU_FFRAC_MASK	0x1f
--
--#define CPLL_CFG0_SW_CFG		BIT(31)
--#define CPLL_CFG0_PLL_MULT_RATIO_SHIFT	16
--#define CPLL_CFG0_PLL_MULT_RATIO_MASK   0x7
--#define CPLL_CFG0_LC_CURFCK		BIT(15)
--#define CPLL_CFG0_BYPASS_REF_CLK	BIT(14)
--#define CPLL_CFG0_PLL_DIV_RATIO_SHIFT	10
--#define CPLL_CFG0_PLL_DIV_RATIO_MASK	0x3
--
--#define CPLL_CFG1_CPU_AUX1		BIT(25)
--#define CPLL_CFG1_CPU_AUX0		BIT(24)
--
- #define SYSCFG0_DRAM_TYPE_MASK		0x3
- #define SYSCFG0_DRAM_TYPE_SHIFT		4
- #define SYSCFG0_DRAM_TYPE_SDRAM		0
---- a/arch/mips/ralink/common.h
-+++ b/arch/mips/ralink/common.h
-@@ -23,9 +23,6 @@ extern struct ralink_soc_info soc_info;
- 
- extern void ralink_of_remap(void);
- 
--extern void ralink_clk_init(void);
--extern void ralink_clk_add(const char *dev, unsigned long rate);
--
- extern void ralink_rst_init(void);
- 
- extern void __init prom_soc_init(struct ralink_soc_info *soc_info);
---- a/arch/mips/ralink/mt7620.c
-+++ b/arch/mips/ralink/mt7620.c
-@@ -34,12 +34,6 @@
- #define PMU1_CFG		0x8C
- #define DIG_SW_SEL		BIT(25)
- 
--/* clock scaling */
--#define CLKCFG_FDIV_MASK	0x1f00
--#define CLKCFG_FDIV_USB_VAL	0x0300
--#define CLKCFG_FFRAC_MASK	0x001f
--#define CLKCFG_FFRAC_USB_VAL	0x0003
--
- /* EFUSE bits */
- #define EFUSE_MT7688		0x100000
- 
-@@ -49,226 +43,6 @@
- /* does the board have sdram or ddram */
- static int dram_type;
- 
--static __init u32
--mt7620_calc_rate(u32 ref_rate, u32 mul, u32 div)
--{
--	u64 t;
--
--	t = ref_rate;
--	t *= mul;
--	do_div(t, div);
--
--	return t;
--}
--
--#define MHZ(x)		((x) * 1000 * 1000)
--
--static __init unsigned long
--mt7620_get_xtal_rate(void)
--{
--	u32 reg;
--
--	reg = rt_sysc_r32(SYSC_REG_SYSTEM_CONFIG0);
--	if (reg & SYSCFG0_XTAL_FREQ_SEL)
--		return MHZ(40);
--
--	return MHZ(20);
--}
--
--static __init unsigned long
--mt7620_get_periph_rate(unsigned long xtal_rate)
--{
--	u32 reg;
--
--	reg = rt_sysc_r32(SYSC_REG_CLKCFG0);
--	if (reg & CLKCFG0_PERI_CLK_SEL)
--		return xtal_rate;
--
--	return MHZ(40);
--}
--
--static const u32 mt7620_clk_divider[] __initconst = { 2, 3, 4, 8 };
--
--static __init unsigned long
--mt7620_get_cpu_pll_rate(unsigned long xtal_rate)
--{
--	u32 reg;
--	u32 mul;
--	u32 div;
--
--	reg = rt_sysc_r32(SYSC_REG_CPLL_CONFIG0);
--	if (reg & CPLL_CFG0_BYPASS_REF_CLK)
--		return xtal_rate;
--
--	if ((reg & CPLL_CFG0_SW_CFG) == 0)
--		return MHZ(600);
--
--	mul = (reg >> CPLL_CFG0_PLL_MULT_RATIO_SHIFT) &
--	      CPLL_CFG0_PLL_MULT_RATIO_MASK;
--	mul += 24;
--	if (reg & CPLL_CFG0_LC_CURFCK)
--		mul *= 2;
--
--	div = (reg >> CPLL_CFG0_PLL_DIV_RATIO_SHIFT) &
--	      CPLL_CFG0_PLL_DIV_RATIO_MASK;
--
--	WARN_ON(div >= ARRAY_SIZE(mt7620_clk_divider));
--
--	return mt7620_calc_rate(xtal_rate, mul, mt7620_clk_divider[div]);
--}
--
--static __init unsigned long
--mt7620_get_pll_rate(unsigned long xtal_rate, unsigned long cpu_pll_rate)
--{
--	u32 reg;
--
--	reg = rt_sysc_r32(SYSC_REG_CPLL_CONFIG1);
--	if (reg & CPLL_CFG1_CPU_AUX1)
--		return xtal_rate;
--
--	if (reg & CPLL_CFG1_CPU_AUX0)
--		return MHZ(480);
--
--	return cpu_pll_rate;
--}
--
--static __init unsigned long
--mt7620_get_cpu_rate(unsigned long pll_rate)
--{
--	u32 reg;
--	u32 mul;
--	u32 div;
--
--	reg = rt_sysc_r32(SYSC_REG_CPU_SYS_CLKCFG);
--
--	mul = reg & CPU_SYS_CLKCFG_CPU_FFRAC_MASK;
--	div = (reg >> CPU_SYS_CLKCFG_CPU_FDIV_SHIFT) &
--	      CPU_SYS_CLKCFG_CPU_FDIV_MASK;
--
--	return mt7620_calc_rate(pll_rate, mul, div);
--}
--
--static const u32 mt7620_ocp_dividers[16] __initconst = {
--	[CPU_SYS_CLKCFG_OCP_RATIO_2] = 2,
--	[CPU_SYS_CLKCFG_OCP_RATIO_3] = 3,
--	[CPU_SYS_CLKCFG_OCP_RATIO_4] = 4,
--	[CPU_SYS_CLKCFG_OCP_RATIO_5] = 5,
--	[CPU_SYS_CLKCFG_OCP_RATIO_10] = 10,
--};
--
--static __init unsigned long
--mt7620_get_dram_rate(unsigned long pll_rate)
--{
--	if (dram_type == SYSCFG0_DRAM_TYPE_SDRAM)
--		return pll_rate / 4;
--
--	return pll_rate / 3;
--}
--
--static __init unsigned long
--mt7620_get_sys_rate(unsigned long cpu_rate)
--{
--	u32 reg;
--	u32 ocp_ratio;
--	u32 div;
--
--	reg = rt_sysc_r32(SYSC_REG_CPU_SYS_CLKCFG);
--
--	ocp_ratio = (reg >> CPU_SYS_CLKCFG_OCP_RATIO_SHIFT) &
--		    CPU_SYS_CLKCFG_OCP_RATIO_MASK;
--
--	if (WARN_ON(ocp_ratio >= ARRAY_SIZE(mt7620_ocp_dividers)))
--		return cpu_rate;
--
--	div = mt7620_ocp_dividers[ocp_ratio];
--	if (WARN(!div, "invalid divider for OCP ratio %u", ocp_ratio))
--		return cpu_rate;
--
--	return cpu_rate / div;
--}
--
--void __init ralink_clk_init(void)
--{
--	unsigned long xtal_rate;
--	unsigned long cpu_pll_rate;
--	unsigned long pll_rate;
--	unsigned long cpu_rate;
--	unsigned long sys_rate;
--	unsigned long dram_rate;
--	unsigned long periph_rate;
--	unsigned long pcmi2s_rate;
--
--	xtal_rate = mt7620_get_xtal_rate();
--
--#define RFMT(label)	label ":%lu.%03luMHz "
--#define RINT(x)		((x) / 1000000)
--#define RFRAC(x)	(((x) / 1000) % 1000)
--
--	if (is_mt76x8()) {
--		if (xtal_rate == MHZ(40))
--			cpu_rate = MHZ(580);
--		else
--			cpu_rate = MHZ(575);
--		dram_rate = sys_rate = cpu_rate / 3;
--		periph_rate = MHZ(40);
--		pcmi2s_rate = MHZ(480);
--
--		ralink_clk_add("10000d00.uartlite", periph_rate);
--		ralink_clk_add("10000e00.uartlite", periph_rate);
--	} else {
--		cpu_pll_rate = mt7620_get_cpu_pll_rate(xtal_rate);
--		pll_rate = mt7620_get_pll_rate(xtal_rate, cpu_pll_rate);
--
--		cpu_rate = mt7620_get_cpu_rate(pll_rate);
--		dram_rate = mt7620_get_dram_rate(pll_rate);
--		sys_rate = mt7620_get_sys_rate(cpu_rate);
--		periph_rate = mt7620_get_periph_rate(xtal_rate);
--		pcmi2s_rate = periph_rate;
--
--		pr_debug(RFMT("XTAL") RFMT("CPU_PLL") RFMT("PLL"),
--			 RINT(xtal_rate), RFRAC(xtal_rate),
--			 RINT(cpu_pll_rate), RFRAC(cpu_pll_rate),
--			 RINT(pll_rate), RFRAC(pll_rate));
--
--		ralink_clk_add("10000500.uart", periph_rate);
--	}
--
--	pr_debug(RFMT("CPU") RFMT("DRAM") RFMT("SYS") RFMT("PERIPH"),
--		 RINT(cpu_rate), RFRAC(cpu_rate),
--		 RINT(dram_rate), RFRAC(dram_rate),
--		 RINT(sys_rate), RFRAC(sys_rate),
--		 RINT(periph_rate), RFRAC(periph_rate));
--#undef RFRAC
--#undef RINT
--#undef RFMT
--
--	ralink_clk_add("cpu", cpu_rate);
--	ralink_clk_add("10000100.timer", periph_rate);
--	ralink_clk_add("10000120.watchdog", periph_rate);
--	ralink_clk_add("10000900.i2c", periph_rate);
--	ralink_clk_add("10000a00.i2s", pcmi2s_rate);
--	ralink_clk_add("10000b00.spi", sys_rate);
--	ralink_clk_add("10000b40.spi", sys_rate);
--	ralink_clk_add("10000c00.uartlite", periph_rate);
--	ralink_clk_add("10000d00.uart1", periph_rate);
--	ralink_clk_add("10000e00.uart2", periph_rate);
--	ralink_clk_add("10180000.wmac", xtal_rate);
--
--	if (IS_ENABLED(CONFIG_USB) && !is_mt76x8()) {
--		/*
--		 * When the CPU goes into sleep mode, the BUS clock will be
--		 * too low for USB to function properly. Adjust the busses
--		 * fractional divider to fix this
--		 */
--		u32 val = rt_sysc_r32(SYSC_REG_CPU_SYS_CLKCFG);
--
--		val &= ~(CLKCFG_FDIV_MASK | CLKCFG_FFRAC_MASK);
--		val |= CLKCFG_FDIV_USB_VAL | CLKCFG_FFRAC_USB_VAL;
--
--		rt_sysc_w32(val, SYSC_REG_CPU_SYS_CLKCFG);
--	}
--}
--
- void __init ralink_of_remap(void)
- {
- 	rt_sysc_membase = plat_of_remap_node("ralink,mt7620a-sysc");
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-07-mips-ralink-remove-reset-related-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-07-mips-ralink-remove-reset-related-code.patch
deleted file mode 100644
index e96a9084a6..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-07-mips-ralink-remove-reset-related-code.patch
+++ /dev/null
@@ -1,121 +0,0 @@
-From 201ddc05777cd8e084b508bcdda22214bfe2895e Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:39 +0200
-Subject: [PATCH 7/9] mips: ralink: remove reset related code
-
-A proper clock driver for ralink SoCs has been added. This driver is also
-a reset provider for the SoC. Hence there is no need to have reset related
-code in 'arch/mips/ralink' folder anymore. The only code that remains is
-the one related with mips_reboot_setup where a PCI reset is performed.
-We maintain this because I cannot test old ralink board with PCI to be
-sure all works if we remove also this code.
-
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/ralink/common.h |  2 --
- arch/mips/ralink/of.c     |  4 ----
- arch/mips/ralink/reset.c  | 61 -----------------------------------------------
- 3 files changed, 67 deletions(-)
-
---- a/arch/mips/ralink/common.h
-+++ b/arch/mips/ralink/common.h
-@@ -23,8 +23,6 @@ extern struct ralink_soc_info soc_info;
- 
- extern void ralink_of_remap(void);
- 
--extern void ralink_rst_init(void);
--
- extern void __init prom_soc_init(struct ralink_soc_info *soc_info);
- 
- __iomem void *plat_of_remap_node(const char *node);
---- a/arch/mips/ralink/of.c
-+++ b/arch/mips/ralink/of.c
-@@ -81,10 +81,6 @@ static int __init plat_of_setup(void)
- {
- 	__dt_register_buses(soc_info.compatible, "palmbus");
- 
--	/* make sure that the reset controller is setup early */
--	if (ralink_soc != MT762X_SOC_MT7621AT)
--		ralink_rst_init();
--
- 	return 0;
- }
- 
---- a/arch/mips/ralink/reset.c
-+++ b/arch/mips/ralink/reset.c
-@@ -10,7 +10,6 @@
- #include <linux/io.h>
- #include <linux/of.h>
- #include <linux/delay.h>
--#include <linux/reset-controller.h>
- 
- #include <asm/reboot.h>
- 
-@@ -22,66 +21,6 @@
- #define RSTCTL_RESET_PCI	BIT(26)
- #define RSTCTL_RESET_SYSTEM	BIT(0)
- 
--static int ralink_assert_device(struct reset_controller_dev *rcdev,
--				unsigned long id)
--{
--	u32 val;
--
--	if (id == 0)
--		return -1;
--
--	val = rt_sysc_r32(SYSC_REG_RESET_CTRL);
--	val |= BIT(id);
--	rt_sysc_w32(val, SYSC_REG_RESET_CTRL);
--
--	return 0;
--}
--
--static int ralink_deassert_device(struct reset_controller_dev *rcdev,
--				  unsigned long id)
--{
--	u32 val;
--
--	if (id == 0)
--		return -1;
--
--	val = rt_sysc_r32(SYSC_REG_RESET_CTRL);
--	val &= ~BIT(id);
--	rt_sysc_w32(val, SYSC_REG_RESET_CTRL);
--
--	return 0;
--}
--
--static int ralink_reset_device(struct reset_controller_dev *rcdev,
--			       unsigned long id)
--{
--	ralink_assert_device(rcdev, id);
--	return ralink_deassert_device(rcdev, id);
--}
--
--static const struct reset_control_ops reset_ops = {
--	.reset = ralink_reset_device,
--	.assert = ralink_assert_device,
--	.deassert = ralink_deassert_device,
--};
--
--static struct reset_controller_dev reset_dev = {
--	.ops			= &reset_ops,
--	.owner			= THIS_MODULE,
--	.nr_resets		= 32,
--	.of_reset_n_cells	= 1,
--};
--
--void ralink_rst_init(void)
--{
--	reset_dev.of_node = of_find_compatible_node(NULL, NULL,
--						"ralink,rt2880-reset");
--	if (!reset_dev.of_node)
--		pr_err("Failed to find reset controller node");
--	else
--		reset_controller_register(&reset_dev);
--}
--
- static void ralink_restart(char *command)
- {
- 	if (IS_ENABLED(CONFIG_PCI)) {
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-08-mips-ralink-get-cpu-rate-from-new-driver-code.patch b/target/linux/ramips/patches-6.6/005-v6.5-08-mips-ralink-get-cpu-rate-from-new-driver-code.patch
deleted file mode 100644
index 2430c1f375..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-08-mips-ralink-get-cpu-rate-from-new-driver-code.patch
+++ /dev/null
@@ -1,102 +0,0 @@
-From ad38c17b0c26ae2108b50ac1eb0281a2e1ce08e9 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:40 +0200
-Subject: [PATCH 8/9] mips: ralink: get cpu rate from new driver code
-
-At very early stage on boot, there is a need to set 'mips_hpt_frequency'.
-This timer frequency is a half of the CPU frequency. To get clocks properly
-set we need to call to 'of_clk_init()' and properly get cpu clock frequency
-afterwards. Depending on the SoC, CPU clock index and compatible differs, so
-use them to get the proper clock frm the clock provider. Hence, adapt code
-to be aligned with new clock driver.
-
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/ralink/clk.c | 61 ++++++++++++++++++++++++++++++++++++++++++--------
- 1 file changed, 52 insertions(+), 9 deletions(-)
-
---- a/arch/mips/ralink/clk.c
-+++ b/arch/mips/ralink/clk.c
-@@ -11,29 +11,72 @@
- #include <linux/clkdev.h>
- #include <linux/clk.h>
- #include <linux/clk-provider.h>
-+#include <asm/mach-ralink/ralink_regs.h>
- 
- #include <asm/time.h>
- 
- #include "common.h"
- 
--void ralink_clk_add(const char *dev, unsigned long rate)
-+static const char *clk_cpu(int *idx)
- {
--	struct clk *clk = clk_register_fixed_rate(NULL, dev, NULL, 0, rate);
--
--	if (!clk)
--		panic("failed to add clock");
--
--	clkdev_create(clk, NULL, "%s", dev);
-+	switch (ralink_soc) {
-+	case RT2880_SOC:
-+		*idx = 0;
-+		return "ralink,rt2880-sysc";
-+	case RT3883_SOC:
-+		*idx = 0;
-+		return "ralink,rt3883-sysc";
-+	case RT305X_SOC_RT3050:
-+		*idx = 0;
-+		return "ralink,rt3050-sysc";
-+	case RT305X_SOC_RT3052:
-+		*idx = 0;
-+		return "ralink,rt3052-sysc";
-+	case RT305X_SOC_RT3350:
-+		*idx = 1;
-+		return "ralink,rt3350-sysc";
-+	case RT305X_SOC_RT3352:
-+		*idx = 1;
-+		return "ralink,rt3352-sysc";
-+	case RT305X_SOC_RT5350:
-+		*idx = 1;
-+		return "ralink,rt5350-sysc";
-+	case MT762X_SOC_MT7620A:
-+		*idx = 2;
-+		return "ralink,mt7620-sysc";
-+	case MT762X_SOC_MT7620N:
-+		*idx = 2;
-+		return "ralink,mt7620-sysc";
-+	case MT762X_SOC_MT7628AN:
-+		*idx = 1;
-+		return "ralink,mt7628-sysc";
-+	case MT762X_SOC_MT7688:
-+		*idx = 1;
-+		return "ralink,mt7688-sysc";
-+	default:
-+		*idx = -1;
-+		return "invalid";
-+	}
- }
- 
- void __init plat_time_init(void)
- {
-+	struct of_phandle_args clkspec;
-+	const char *compatible;
- 	struct clk *clk;
-+	int cpu_clk_idx;
- 
- 	ralink_of_remap();
- 
--	ralink_clk_init();
--	clk = clk_get_sys("cpu", NULL);
-+	compatible = clk_cpu(&cpu_clk_idx);
-+	if (cpu_clk_idx == -1)
-+		panic("unable to get CPU clock index");
-+
-+	of_clk_init(NULL);
-+	clkspec.np = of_find_compatible_node(NULL, NULL, compatible);
-+	clkspec.args_count = 1;
-+	clkspec.args[0] = cpu_clk_idx;
-+	clk = of_clk_get_from_provider(&clkspec);
- 	if (IS_ERR(clk))
- 		panic("unable to get CPU clock, err=%ld", PTR_ERR(clk));
- 	pr_info("CPU Clock: %ldMHz\n", clk_get_rate(clk) / 1000000);
diff --git a/target/linux/ramips/patches-6.6/005-v6.5-09-MAINTAINERS-add-Mediatek-MTMIPS-Clock-maintainer.patch b/target/linux/ramips/patches-6.6/005-v6.5-09-MAINTAINERS-add-Mediatek-MTMIPS-Clock-maintainer.patch
deleted file mode 100644
index f7ab99bc76..0000000000
--- a/target/linux/ramips/patches-6.6/005-v6.5-09-MAINTAINERS-add-Mediatek-MTMIPS-Clock-maintainer.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From fc15a7193a4d37d79e873fa06cc423180ddd2ddf Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Mon, 19 Jun 2023 06:09:41 +0200
-Subject: [PATCH 9/9] MAINTAINERS: add Mediatek MTMIPS Clock maintainer
-
-Adding myself as maintainer for Mediatek MTMIPS clock driver.
-
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- MAINTAINERS | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/MAINTAINERS
-+++ b/MAINTAINERS
-@@ -13021,6 +13021,12 @@ S:	Maintained
- F:	Documentation/devicetree/bindings/clock/mediatek,mt7621-sysc.yaml
- F:	drivers/clk/ralink/clk-mt7621.c
- 
-+MEDIATEK MTMIPS CLOCK DRIVER
-+M:	Sergio Paracuellos <sergio.paracuellos at gmail.com>
-+S:	Maintained
-+F:	Documentation/devicetree/bindings/clock/mediatek,mtmips-sysc.yaml
-+F:	drivers/clk/ralink/clk-mtmips.c
-+
- MEDIATEK MT7621/28/88 I2C DRIVER
- M:	Stefan Roese <sr at denx.de>
- L:	linux-i2c at vger.kernel.org
diff --git a/target/linux/ramips/patches-6.6/006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch b/target/linux/ramips/patches-6.6/006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch
deleted file mode 100644
index f5c148101f..0000000000
--- a/target/linux/ramips/patches-6.6/006-v6.5-mips-ralink-introduce-commonly-used-remap-node-funct.patch
+++ /dev/null
@@ -1,191 +0,0 @@
-From fd99ac5055d4705e91c73d1adba18bc71c8511a8 Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Tue, 20 Jun 2023 19:44:32 +0800
-Subject: [PATCH] mips: ralink: introduce commonly used remap node function
-
-The ralink_of_remap() function is repeated several times on SoC specific
-source files. They have the same structure, but just differ in compatible
-strings. In order to make commonly use of these codes, this patch
-introduces a newly designed mtmips_of_remap_node() function to match and
-remap all supported system controller and memory controller nodes.
-
-Build and run tested on MT7620 and MT7628.
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
-Reviewed-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/ralink/common.h |  2 --
- arch/mips/ralink/mt7620.c |  9 ---------
- arch/mips/ralink/mt7621.c |  9 ---------
- arch/mips/ralink/of.c     | 42 +++++++++++++++++++++++++++++++++++-------
- arch/mips/ralink/rt288x.c |  9 ---------
- arch/mips/ralink/rt305x.c |  9 ---------
- arch/mips/ralink/rt3883.c |  9 ---------
- 7 files changed, 35 insertions(+), 54 deletions(-)
-
---- a/arch/mips/ralink/common.h
-+++ b/arch/mips/ralink/common.h
-@@ -25,6 +25,4 @@ extern void ralink_of_remap(void);
- 
- extern void __init prom_soc_init(struct ralink_soc_info *soc_info);
- 
--__iomem void *plat_of_remap_node(const char *node);
--
- #endif /* _RALINK_COMMON_H__ */
---- a/arch/mips/ralink/mt7620.c
-+++ b/arch/mips/ralink/mt7620.c
-@@ -43,15 +43,6 @@
- /* does the board have sdram or ddram */
- static int dram_type;
- 
--void __init ralink_of_remap(void)
--{
--	rt_sysc_membase = plat_of_remap_node("ralink,mt7620a-sysc");
--	rt_memc_membase = plat_of_remap_node("ralink,mt7620a-memc");
--
--	if (!rt_sysc_membase || !rt_memc_membase)
--		panic("Failed to remap core resources");
--}
--
- static __init void
- mt7620_dram_init(struct ralink_soc_info *soc_info)
- {
---- a/arch/mips/ralink/mt7621.c
-+++ b/arch/mips/ralink/mt7621.c
-@@ -89,15 +89,6 @@ static void __init mt7621_memory_detect(
- 	memblock_add(MT7621_HIGHMEM_BASE, MT7621_HIGHMEM_SIZE);
- }
- 
--void __init ralink_of_remap(void)
--{
--	rt_sysc_membase = plat_of_remap_node("mediatek,mt7621-sysc");
--	rt_memc_membase = plat_of_remap_node("mediatek,mt7621-memc");
--
--	if (!rt_sysc_membase || !rt_memc_membase)
--		panic("Failed to remap core resources");
--}
--
- static unsigned int __init mt7621_get_soc_name0(void)
- {
- 	return __raw_readl(MT7621_SYSC_BASE + SYSC_REG_CHIP_NAME0);
---- a/arch/mips/ralink/of.c
-+++ b/arch/mips/ralink/of.c
-@@ -29,28 +29,56 @@ __iomem void *rt_sysc_membase;
- __iomem void *rt_memc_membase;
- EXPORT_SYMBOL_GPL(rt_sysc_membase);
- 
--__iomem void *plat_of_remap_node(const char *node)
-+static const struct of_device_id mtmips_memc_match[] = {
-+	{ .compatible = "mediatek,mt7621-memc" },
-+	{ .compatible = "ralink,mt7620a-memc" },
-+	{ .compatible = "ralink,rt2880-memc" },
-+	{ .compatible = "ralink,rt3050-memc" },
-+	{ .compatible = "ralink,rt3883-memc" },
-+	{}
-+};
-+
-+static const struct of_device_id mtmips_sysc_match[] = {
-+	{ .compatible = "mediatek,mt7621-sysc" },
-+	{ .compatible = "ralink,mt7620a-sysc" },
-+	{ .compatible = "ralink,rt2880-sysc" },
-+	{ .compatible = "ralink,rt3050-sysc" },
-+	{ .compatible = "ralink,rt3883-sysc" },
-+	{}
-+};
-+
-+static __iomem void *
-+mtmips_of_remap_node(const struct of_device_id *match, const char *type)
- {
- 	struct resource res;
- 	struct device_node *np;
- 
--	np = of_find_compatible_node(NULL, NULL, node);
-+	np = of_find_matching_node(NULL, match);
- 	if (!np)
--		panic("Failed to find %s node", node);
-+		panic("Failed to find %s controller node", type);
- 
- 	if (of_address_to_resource(np, 0, &res))
--		panic("Failed to get resource for %s", node);
--
--	of_node_put(np);
-+		panic("Failed to get resource for %s node", np->name);
- 
- 	if (!request_mem_region(res.start,
- 				resource_size(&res),
- 				res.name))
--		panic("Failed to request resources for %s", node);
-+		panic("Failed to request resources for %s node", np->name);
-+
-+	of_node_put(np);
- 
- 	return ioremap(res.start, resource_size(&res));
- }
- 
-+void __init ralink_of_remap(void)
-+{
-+	rt_sysc_membase = mtmips_of_remap_node(mtmips_sysc_match, "system");
-+	rt_memc_membase = mtmips_of_remap_node(mtmips_memc_match, "memory");
-+
-+	if (!rt_sysc_membase || !rt_memc_membase)
-+		panic("Failed to remap core resources");
-+}
-+
- void __init plat_mem_setup(void)
- {
- 	void *dtb;
---- a/arch/mips/ralink/rt288x.c
-+++ b/arch/mips/ralink/rt288x.c
-@@ -17,15 +17,6 @@
- 
- #include "common.h"
- 
--void __init ralink_of_remap(void)
--{
--	rt_sysc_membase = plat_of_remap_node("ralink,rt2880-sysc");
--	rt_memc_membase = plat_of_remap_node("ralink,rt2880-memc");
--
--	if (!rt_sysc_membase || !rt_memc_membase)
--		panic("Failed to remap core resources");
--}
--
- void __init prom_soc_init(struct ralink_soc_info *soc_info)
- {
- 	void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT2880_SYSC_BASE);
---- a/arch/mips/ralink/rt305x.c
-+++ b/arch/mips/ralink/rt305x.c
-@@ -53,15 +53,6 @@ static unsigned long rt5350_get_mem_size
- 	return ret;
- }
- 
--void __init ralink_of_remap(void)
--{
--	rt_sysc_membase = plat_of_remap_node("ralink,rt3050-sysc");
--	rt_memc_membase = plat_of_remap_node("ralink,rt3050-memc");
--
--	if (!rt_sysc_membase || !rt_memc_membase)
--		panic("Failed to remap core resources");
--}
--
- void __init prom_soc_init(struct ralink_soc_info *soc_info)
- {
- 	void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT305X_SYSC_BASE);
---- a/arch/mips/ralink/rt3883.c
-+++ b/arch/mips/ralink/rt3883.c
-@@ -17,15 +17,6 @@
- 
- #include "common.h"
- 
--void __init ralink_of_remap(void)
--{
--	rt_sysc_membase = plat_of_remap_node("ralink,rt3883-sysc");
--	rt_memc_membase = plat_of_remap_node("ralink,rt3883-memc");
--
--	if (!rt_sysc_membase || !rt_memc_membase)
--		panic("Failed to remap core resources");
--}
--
- void __init prom_soc_init(struct ralink_soc_info *soc_info)
- {
- 	void __iomem *sysc = (void __iomem *) KSEG1ADDR(RT3883_SYSC_BASE);
diff --git a/target/linux/ramips/patches-6.6/007-v6.5-clk-ralink-mtmips-Fix-uninitialized-use-of-ret-in-mt.patch b/target/linux/ramips/patches-6.6/007-v6.5-clk-ralink-mtmips-Fix-uninitialized-use-of-ret-in-mt.patch
deleted file mode 100644
index c0c2a6e204..0000000000
--- a/target/linux/ramips/patches-6.6/007-v6.5-clk-ralink-mtmips-Fix-uninitialized-use-of-ret-in-mt.patch
+++ /dev/null
@@ -1,56 +0,0 @@
-From 6e68dae946e3a0333fbde5487ce163142ca10ae0 Mon Sep 17 00:00:00 2001
-From: Nathan Chancellor <nathan at kernel.org>
-Date: Thu, 22 Jun 2023 15:56:19 +0000
-Subject: clk: ralink: mtmips: Fix uninitialized use of ret in
- mtmips_register_{fixed,factor}_clocks()
-
-Clang warns:
-
-  drivers/clk/ralink/clk-mtmips.c:309:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
-    309 |         return ret;
-        |                ^~~
-  drivers/clk/ralink/clk-mtmips.c:285:9: note: initialize the variable 'ret' to silence this warning
-    285 |         int ret, i;
-        |                ^
-        |                 = 0
-  drivers/clk/ralink/clk-mtmips.c:359:9: error: variable 'ret' is uninitialized when used here [-Werror,-Wuninitialized]
-    359 |         return ret;
-        |                ^~~
-  drivers/clk/ralink/clk-mtmips.c:335:9: note: initialize the variable 'ret' to silence this warning
-    335 |         int ret, i;
-        |                ^
-        |                 = 0
-  2 errors generated.
-
-Set ret to the return value of clk_hw_register_fixed_rate() using the
-PTR_ERR() macro, which ensures ret is not used uninitialized, clearing
-up the warning.
-
-Fixes: 6f3b15586eef ("clk: ralink: add clock and reset driver for MTMIPS SoCs")
-Closes: https://github.com/ClangBuiltLinux/linux/issues/1879
-Signed-off-by: Nathan Chancellor <nathan at kernel.org>
-Reviewed-by: Nick Desaulniers <ndesaulniers at google.com>
-Acked-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- drivers/clk/ralink/clk-mtmips.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/drivers/clk/ralink/clk-mtmips.c
-+++ b/drivers/clk/ralink/clk-mtmips.c
-@@ -292,6 +292,7 @@ static int mtmips_register_fixed_clocks(
- 						      sclk->parent, 0,
- 						      sclk->rate);
- 		if (IS_ERR(sclk->hw)) {
-+			ret = PTR_ERR(sclk->hw);
- 			pr_err("Couldn't register fixed clock %d\n", idx);
- 			goto err_clk_unreg;
- 		}
-@@ -342,6 +343,7 @@ static int mtmips_register_factor_clocks
- 						  sclk->parent, sclk->flags,
- 						  sclk->mult, sclk->div);
- 		if (IS_ERR(sclk->hw)) {
-+			ret = PTR_ERR(sclk->hw);
- 			pr_err("Couldn't register factor clock %d\n", idx);
- 			goto err_clk_unreg;
- 		}
diff --git a/target/linux/ramips/patches-6.6/008-v6.5-mips-ralink-match-all-supported-system-controller-co.patch b/target/linux/ramips/patches-6.6/008-v6.5-mips-ralink-match-all-supported-system-controller-co.patch
deleted file mode 100644
index 6940a2b4b9..0000000000
--- a/target/linux/ramips/patches-6.6/008-v6.5-mips-ralink-match-all-supported-system-controller-co.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 670f77f76f650b1b341d31d009cc2fb03a4d1fcf Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Fri, 23 Jun 2023 08:17:48 +0800
-Subject: mips: ralink: match all supported system controller compatible
- strings
-
-Recently, A new clock and reset controller driver has been introduced to
-the ralink mips target[1]. It provides proper system control and adds more
-SoC specific compatible strings. In order to better initialize CPUs, this
-patch removes the outdated "ralink,mt7620a-sysc" and add all dt-binding
-documented compatible strings to the system controller match table.
-
-[1] https://lore.kernel.org/all/20230619040941.1340372-1-sergio.paracuellos at gmail.com/
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
-Reviewed-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/ralink/of.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
---- a/arch/mips/ralink/of.c
-+++ b/arch/mips/ralink/of.c
-@@ -40,10 +40,15 @@ static const struct of_device_id mtmips_
- 
- static const struct of_device_id mtmips_sysc_match[] = {
- 	{ .compatible = "mediatek,mt7621-sysc" },
--	{ .compatible = "ralink,mt7620a-sysc" },
-+	{ .compatible = "ralink,mt7620-sysc" },
-+	{ .compatible = "ralink,mt7628-sysc" },
-+	{ .compatible = "ralink,mt7688-sysc" },
- 	{ .compatible = "ralink,rt2880-sysc" },
- 	{ .compatible = "ralink,rt3050-sysc" },
-+	{ .compatible = "ralink,rt3052-sysc" },
-+	{ .compatible = "ralink,rt3352-sysc" },
- 	{ .compatible = "ralink,rt3883-sysc" },
-+	{ .compatible = "ralink,rt5350-sysc" },
- 	{}
- };
- 
diff --git a/target/linux/ramips/patches-6.6/009-v6.3-01-watchdog-mt7621-wdt-avoid-static-global-declarations.patch b/target/linux/ramips/patches-6.6/009-v6.3-01-watchdog-mt7621-wdt-avoid-static-global-declarations.patch
deleted file mode 100644
index e06d5621e1..0000000000
--- a/target/linux/ramips/patches-6.6/009-v6.3-01-watchdog-mt7621-wdt-avoid-static-global-declarations.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From 783c7cb4659b53b5e1b809dac5e8cdf250145919 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Tue, 14 Feb 2023 11:39:35 +0100
-Subject: [PATCH 1/2] watchdog: mt7621-wdt: avoid static global declarations
-
-Instead of using static global definitions in driver code, refactor code
-introducing a new watchdog driver data structure and use it along the
-code.
-
-Reviewed-by: Guenter Roeck <linux at roeck-us.net>
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Link: https://lore.kernel.org/r/20230214103936.1061078-5-sergio.paracuellos at gmail.com
-[groeck: unsigned -> unsigned int]
-Signed-off-by: Guenter Roeck <linux at roeck-us.net>
-Signed-off-by: Wim Van Sebroeck <wim at linux-watchdog.org>
----
- drivers/watchdog/mt7621_wdt.c | 102 +++++++++++++++++++++++++++---------------
- 1 file changed, 65 insertions(+), 37 deletions(-)
-
---- a/drivers/watchdog/mt7621_wdt.c
-+++ b/drivers/watchdog/mt7621_wdt.c
-@@ -31,8 +31,11 @@
- #define TMR1CTL_RESTART			BIT(9)
- #define TMR1CTL_PRESCALE_SHIFT		16
- 
--static void __iomem *mt7621_wdt_base;
--static struct reset_control *mt7621_wdt_reset;
-+struct mt7621_wdt_data {
-+	void __iomem *base;
-+	struct reset_control *rst;
-+	struct watchdog_device wdt;
-+};
- 
- static bool nowayout = WATCHDOG_NOWAYOUT;
- module_param(nowayout, bool, 0);
-@@ -40,27 +43,31 @@ MODULE_PARM_DESC(nowayout,
- 		 "Watchdog cannot be stopped once started (default="
- 		 __MODULE_STRING(WATCHDOG_NOWAYOUT) ")");
- 
--static inline void rt_wdt_w32(unsigned reg, u32 val)
-+static inline void rt_wdt_w32(void __iomem *base, unsigned int reg, u32 val)
- {
--	iowrite32(val, mt7621_wdt_base + reg);
-+	iowrite32(val, base + reg);
- }
- 
--static inline u32 rt_wdt_r32(unsigned reg)
-+static inline u32 rt_wdt_r32(void __iomem *base, unsigned int reg)
- {
--	return ioread32(mt7621_wdt_base + reg);
-+	return ioread32(base + reg);
- }
- 
- static int mt7621_wdt_ping(struct watchdog_device *w)
- {
--	rt_wdt_w32(TIMER_REG_TMRSTAT, TMR1CTL_RESTART);
-+	struct mt7621_wdt_data *drvdata = watchdog_get_drvdata(w);
-+
-+	rt_wdt_w32(drvdata->base, TIMER_REG_TMRSTAT, TMR1CTL_RESTART);
- 
- 	return 0;
- }
- 
- static int mt7621_wdt_set_timeout(struct watchdog_device *w, unsigned int t)
- {
-+	struct mt7621_wdt_data *drvdata = watchdog_get_drvdata(w);
-+
- 	w->timeout = t;
--	rt_wdt_w32(TIMER_REG_TMR1LOAD, t * 1000);
-+	rt_wdt_w32(drvdata->base, TIMER_REG_TMR1LOAD, t * 1000);
- 	mt7621_wdt_ping(w);
- 
- 	return 0;
-@@ -68,29 +75,31 @@ static int mt7621_wdt_set_timeout(struct
- 
- static int mt7621_wdt_start(struct watchdog_device *w)
- {
-+	struct mt7621_wdt_data *drvdata = watchdog_get_drvdata(w);
- 	u32 t;
- 
- 	/* set the prescaler to 1ms == 1000us */
--	rt_wdt_w32(TIMER_REG_TMR1CTL, 1000 << TMR1CTL_PRESCALE_SHIFT);
-+	rt_wdt_w32(drvdata->base, TIMER_REG_TMR1CTL, 1000 << TMR1CTL_PRESCALE_SHIFT);
- 
- 	mt7621_wdt_set_timeout(w, w->timeout);
- 
--	t = rt_wdt_r32(TIMER_REG_TMR1CTL);
-+	t = rt_wdt_r32(drvdata->base, TIMER_REG_TMR1CTL);
- 	t |= TMR1CTL_ENABLE;
--	rt_wdt_w32(TIMER_REG_TMR1CTL, t);
-+	rt_wdt_w32(drvdata->base, TIMER_REG_TMR1CTL, t);
- 
- 	return 0;
- }
- 
- static int mt7621_wdt_stop(struct watchdog_device *w)
- {
-+	struct mt7621_wdt_data *drvdata = watchdog_get_drvdata(w);
- 	u32 t;
- 
- 	mt7621_wdt_ping(w);
- 
--	t = rt_wdt_r32(TIMER_REG_TMR1CTL);
-+	t = rt_wdt_r32(drvdata->base, TIMER_REG_TMR1CTL);
- 	t &= ~TMR1CTL_ENABLE;
--	rt_wdt_w32(TIMER_REG_TMR1CTL, t);
-+	rt_wdt_w32(drvdata->base, TIMER_REG_TMR1CTL, t);
- 
- 	return 0;
- }
-@@ -105,7 +114,9 @@ static int mt7621_wdt_bootcause(void)
- 
- static int mt7621_wdt_is_running(struct watchdog_device *w)
- {
--	return !!(rt_wdt_r32(TIMER_REG_TMR1CTL) & TMR1CTL_ENABLE);
-+	struct mt7621_wdt_data *drvdata = watchdog_get_drvdata(w);
-+
-+	return !!(rt_wdt_r32(drvdata->base, TIMER_REG_TMR1CTL) & TMR1CTL_ENABLE);
- }
- 
- static const struct watchdog_info mt7621_wdt_info = {
-@@ -121,30 +132,39 @@ static const struct watchdog_ops mt7621_
- 	.set_timeout = mt7621_wdt_set_timeout,
- };
- 
--static struct watchdog_device mt7621_wdt_dev = {
--	.info = &mt7621_wdt_info,
--	.ops = &mt7621_wdt_ops,
--	.min_timeout = 1,
--	.max_timeout = 0xfffful / 1000,
--};
--
- static int mt7621_wdt_probe(struct platform_device *pdev)
- {
- 	struct device *dev = &pdev->dev;
--	mt7621_wdt_base = devm_platform_ioremap_resource(pdev, 0);
--	if (IS_ERR(mt7621_wdt_base))
--		return PTR_ERR(mt7621_wdt_base);
--
--	mt7621_wdt_reset = devm_reset_control_get_exclusive(dev, NULL);
--	if (!IS_ERR(mt7621_wdt_reset))
--		reset_control_deassert(mt7621_wdt_reset);
--
--	mt7621_wdt_dev.bootstatus = mt7621_wdt_bootcause();
--
--	watchdog_init_timeout(&mt7621_wdt_dev, mt7621_wdt_dev.max_timeout,
--			      dev);
--	watchdog_set_nowayout(&mt7621_wdt_dev, nowayout);
--	if (mt7621_wdt_is_running(&mt7621_wdt_dev)) {
-+	struct watchdog_device *mt7621_wdt;
-+	struct mt7621_wdt_data *drvdata;
-+	int err;
-+
-+	drvdata = devm_kzalloc(dev, sizeof(*drvdata), GFP_KERNEL);
-+	if (!drvdata)
-+		return -ENOMEM;
-+
-+	drvdata->base = devm_platform_ioremap_resource(pdev, 0);
-+	if (IS_ERR(drvdata->base))
-+		return PTR_ERR(drvdata->base);
-+
-+	drvdata->rst = devm_reset_control_get_exclusive(dev, NULL);
-+	if (!IS_ERR(drvdata->rst))
-+		reset_control_deassert(drvdata->rst);
-+
-+	mt7621_wdt = &drvdata->wdt;
-+	mt7621_wdt->info = &mt7621_wdt_info;
-+	mt7621_wdt->ops = &mt7621_wdt_ops;
-+	mt7621_wdt->min_timeout = 1;
-+	mt7621_wdt->max_timeout = 0xfffful / 1000;
-+	mt7621_wdt->parent = dev;
-+
-+	mt7621_wdt->bootstatus = mt7621_wdt_bootcause();
-+
-+	watchdog_init_timeout(mt7621_wdt, mt7621_wdt->max_timeout, dev);
-+	watchdog_set_nowayout(mt7621_wdt, nowayout);
-+	watchdog_set_drvdata(mt7621_wdt, drvdata);
-+
-+	if (mt7621_wdt_is_running(mt7621_wdt)) {
- 		/*
- 		 * Make sure to apply timeout from watchdog core, taking
- 		 * the prescaler of this driver here into account (the
-@@ -154,17 +174,25 @@ static int mt7621_wdt_probe(struct platf
- 		 * we first disable the watchdog, set the new prescaler
- 		 * and timeout, and then re-enable the watchdog.
- 		 */
--		mt7621_wdt_stop(&mt7621_wdt_dev);
--		mt7621_wdt_start(&mt7621_wdt_dev);
--		set_bit(WDOG_HW_RUNNING, &mt7621_wdt_dev.status);
-+		mt7621_wdt_stop(mt7621_wdt);
-+		mt7621_wdt_start(mt7621_wdt);
-+		set_bit(WDOG_HW_RUNNING, &mt7621_wdt->status);
- 	}
- 
--	return devm_watchdog_register_device(dev, &mt7621_wdt_dev);
-+	err = devm_watchdog_register_device(dev, &drvdata->wdt);
-+	if (err)
-+		return err;
-+
-+	platform_set_drvdata(pdev, drvdata);
-+
-+	return 0;
- }
- 
- static void mt7621_wdt_shutdown(struct platform_device *pdev)
- {
--	mt7621_wdt_stop(&mt7621_wdt_dev);
-+	struct mt7621_wdt_data *drvdata = platform_get_drvdata(pdev);
-+
-+	mt7621_wdt_stop(&drvdata->wdt);
- }
- 
- static const struct of_device_id mt7621_wdt_match[] = {
diff --git a/target/linux/ramips/patches-6.6/009-v6.3-02-watchdog-mt7621-wdt-avoid-ralink-architecture-depend.patch b/target/linux/ramips/patches-6.6/009-v6.3-02-watchdog-mt7621-wdt-avoid-ralink-architecture-depend.patch
deleted file mode 100644
index 7e4e45df13..0000000000
--- a/target/linux/ramips/patches-6.6/009-v6.3-02-watchdog-mt7621-wdt-avoid-ralink-architecture-depend.patch
+++ /dev/null
@@ -1,104 +0,0 @@
-From ff8ec4ac39ad413b580d611dbf68e1d8a82eba56 Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Tue, 14 Feb 2023 11:39:36 +0100
-Subject: [PATCH 2/2] watchdog: mt7621-wdt: avoid ralink architecture dependent code
-
-MT7621 SoC has a system controller node. Watchdog need to access to reset
-status register. Ralink architecture and related driver are old and from
-the beggining they are using some architecture dependent operations for
-accessing this shared registers through 'asm/mach-ralink/ralink_regs.h'
-header file. However this is not ideal from a driver perspective which can
-just access to the system controller registers in an arch independent way
-using regmap syscon APIs. Update Kconfig accordingly to select new added
-dependencies and allow driver to be compile tested.
-
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Reviewed-by: Guenter Roeck <linux at roeck-us.net>
-Link: https://lore.kernel.org/r/20230214103936.1061078-6-sergio.paracuellos at gmail.com
-Signed-off-by: Guenter Roeck <linux at roeck-us.net>
-Signed-off-by: Wim Van Sebroeck <wim at linux-watchdog.org>
----
- drivers/watchdog/Kconfig      |  4 +++-
- drivers/watchdog/mt7621_wdt.c | 22 +++++++++++++++++-----
- 2 files changed, 20 insertions(+), 6 deletions(-)
-
---- a/drivers/watchdog/Kconfig
-+++ b/drivers/watchdog/Kconfig
-@@ -1865,7 +1865,9 @@ config GXP_WATCHDOG
- config MT7621_WDT
- 	tristate "Mediatek SoC watchdog"
- 	select WATCHDOG_CORE
--	depends on SOC_MT7620 || SOC_MT7621
-+	select REGMAP_MMIO
-+	select MFD_SYSCON
-+	depends on SOC_MT7620 || SOC_MT7621 || COMPILE_TEST
- 	help
- 	  Hardware driver for the Mediatek/Ralink MT7621/8 SoC Watchdog Timer.
- 
---- a/drivers/watchdog/mt7621_wdt.c
-+++ b/drivers/watchdog/mt7621_wdt.c
-@@ -15,8 +15,8 @@
- #include <linux/moduleparam.h>
- #include <linux/platform_device.h>
- #include <linux/mod_devicetable.h>
--
--#include <asm/mach-ralink/ralink_regs.h>
-+#include <linux/mfd/syscon.h>
-+#include <linux/regmap.h>
- 
- #define SYSC_RSTSTAT			0x38
- #define WDT_RST_CAUSE			BIT(1)
-@@ -34,6 +34,7 @@
- struct mt7621_wdt_data {
- 	void __iomem *base;
- 	struct reset_control *rst;
-+	struct regmap *sysc;
- 	struct watchdog_device wdt;
- };
- 
-@@ -104,9 +105,12 @@ static int mt7621_wdt_stop(struct watchd
- 	return 0;
- }
- 
--static int mt7621_wdt_bootcause(void)
-+static int mt7621_wdt_bootcause(struct mt7621_wdt_data *d)
- {
--	if (rt_sysc_r32(SYSC_RSTSTAT) & WDT_RST_CAUSE)
-+	u32 val;
-+
-+	regmap_read(d->sysc, SYSC_RSTSTAT, &val);
-+	if (val & WDT_RST_CAUSE)
- 		return WDIOF_CARDRESET;
- 
- 	return 0;
-@@ -134,6 +138,7 @@ static const struct watchdog_ops mt7621_
- 
- static int mt7621_wdt_probe(struct platform_device *pdev)
- {
-+	struct device_node *np = pdev->dev.of_node;
- 	struct device *dev = &pdev->dev;
- 	struct watchdog_device *mt7621_wdt;
- 	struct mt7621_wdt_data *drvdata;
-@@ -143,6 +148,13 @@ static int mt7621_wdt_probe(struct platf
- 	if (!drvdata)
- 		return -ENOMEM;
- 
-+	drvdata->sysc = syscon_regmap_lookup_by_phandle(np, "mediatek,sysctl");
-+	if (IS_ERR(drvdata->sysc)) {
-+		drvdata->sysc = syscon_regmap_lookup_by_compatible("mediatek,mt7621-sysc");
-+		if (IS_ERR(drvdata->sysc))
-+			return PTR_ERR(drvdata->sysc);
-+	}
-+
- 	drvdata->base = devm_platform_ioremap_resource(pdev, 0);
- 	if (IS_ERR(drvdata->base))
- 		return PTR_ERR(drvdata->base);
-@@ -158,7 +170,7 @@ static int mt7621_wdt_probe(struct platf
- 	mt7621_wdt->max_timeout = 0xfffful / 1000;
- 	mt7621_wdt->parent = dev;
- 
--	mt7621_wdt->bootstatus = mt7621_wdt_bootcause();
-+	mt7621_wdt->bootstatus = mt7621_wdt_bootcause(drvdata);
- 
- 	watchdog_init_timeout(mt7621_wdt, mt7621_wdt->max_timeout, dev);
- 	watchdog_set_nowayout(mt7621_wdt, nowayout);
diff --git a/target/linux/ramips/patches-6.6/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch b/target/linux/ramips/patches-6.6/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch
deleted file mode 100644
index 704e861b82..0000000000
--- a/target/linux/ramips/patches-6.6/010-v6.5-01-mips-pci-mt7620-do-not-print-NFTS-register-value-as-.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From 9f9a035e6156a57d9da062b26d2a48d031744a1e Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Tue, 20 Jun 2023 18:43:22 +0800
-Subject: [PATCH 1/2] mips: pci-mt7620: do not print NFTS register value as
- error log
-
-These codes are used to read NFTS_TIMEOUT_DELAY register value and
-write it into kernel log after writing the register. they are only
-used for debugging during driver development, so there is no need
-to keep them now.
-
-Tested on MT7628AN router Motorola MWR03.
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
-Reviewed-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/pci/pci-mt7620.c | 3 ---
- 1 file changed, 3 deletions(-)
-
---- a/arch/mips/pci/pci-mt7620.c
-+++ b/arch/mips/pci/pci-mt7620.c
-@@ -274,9 +274,6 @@ static int mt7628_pci_hw_init(struct pla
- 	val |= 0x50 << 8;
- 	pci_config_write(NULL, 0, 0x70c, 4, val);
- 
--	pci_config_read(NULL, 0, 0x70c, 4, &val);
--	dev_err(&pdev->dev, "Port 0 N_FTS = %x\n", (unsigned int) val);
--
- 	return 0;
- }
- 
diff --git a/target/linux/ramips/patches-6.6/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch b/target/linux/ramips/patches-6.6/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch
deleted file mode 100644
index 5898a110ea..0000000000
--- a/target/linux/ramips/patches-6.6/010-v6.5-02-mips-pci-mt7620-use-dev_info-to-log-PCIe-device-dete.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 89ec9bbe60b61cc6ae3eddd6d4f43e128f8a88de Mon Sep 17 00:00:00 2001
-From: Shiji Yang <yangshiji66 at outlook.com>
-Date: Tue, 20 Jun 2023 18:43:23 +0800
-Subject: [PATCH 2/2] mips: pci-mt7620: use dev_info() to log PCIe device
- detection result
-
-Usually, We only need to print the error log when there is a PCIe card but
-initialization fails. Whether the driver finds the PCIe card or not is the
-expected behavior. So it's better to log these information with dev_info().
-
-Tested on MT7628AN router Motorola MWR03.
-
-Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
-Reviewed-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Thomas Bogendoerfer <tsbogend at alpha.franken.de>
----
- arch/mips/pci/pci-mt7620.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/arch/mips/pci/pci-mt7620.c
-+++ b/arch/mips/pci/pci-mt7620.c
-@@ -331,7 +331,7 @@ static int mt7620_pci_probe(struct platf
- 		rt_sysc_m32(RALINK_PCIE0_CLK_EN, 0, RALINK_CLKCFG1);
- 		if (ralink_soc == MT762X_SOC_MT7620A)
- 			rt_sysc_m32(LC_CKDRVPD, PDRV_SW_SET, PPLL_DRV);
--		dev_err(&pdev->dev, "PCIE0 no card, disable it(RST&CLK)\n");
-+		dev_info(&pdev->dev, "PCIE0 no card, disable it(RST&CLK)\n");
- 		return -1;
- 	}
- 
-@@ -374,7 +374,7 @@ int pcibios_map_irq(const struct pci_dev
- 			dev->bus->number, slot);
- 		return 0;
- 	}
--	dev_err(&dev->dev, "card - bus=0x%x, slot = 0x%x irq=%d\n",
-+	dev_info(&dev->dev, "card - bus=0x%x, slot = 0x%x irq=%d\n",
- 		dev->bus->number, slot, irq);
- 
- 	/* configure the cache line size to 0x14 */
diff --git a/target/linux/ramips/patches-6.6/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch b/target/linux/ramips/patches-6.6/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch
deleted file mode 100644
index ad2191e655..0000000000
--- a/target/linux/ramips/patches-6.6/110-v6.4-PCI-mt7621-Use-dev_info-to-log-PCIe-card-detection.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 50233e105a0332ec0f3bc83180c416e6b200471e Mon Sep 17 00:00:00 2001
-From: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Date: Fri, 24 Mar 2023 08:37:33 +0100
-Subject: PCI: mt7621: Use dev_info() to log PCIe card detection
-
-When there is no card plugged on a PCIe port a log reporting that
-the port will be disabled is flagged as an error (dev_err()).
-
-Since this is not an error at all, change the log level by using
-dev_info() instead.
-
-Link: https://lore.kernel.org/r/20230324073733.1596231-1-sergio.paracuellos at gmail.com
-Signed-off-by: Sergio Paracuellos <sergio.paracuellos at gmail.com>
-Signed-off-by: Lorenzo Pieralisi <lpieralisi at kernel.org>
----
- drivers/pci/controller/pcie-mt7621.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/pci/controller/pcie-mt7621.c
-+++ b/drivers/pci/controller/pcie-mt7621.c
-@@ -378,8 +378,8 @@ static int mt7621_pcie_init_ports(struct
- 		u32 slot = port->slot;
- 
- 		if (!mt7621_pcie_port_is_linkup(port)) {
--			dev_err(dev, "pcie%d no card, disable it (RST & CLK)\n",
--				slot);
-+			dev_info(dev, "pcie%d no card, disable it (RST & CLK)\n",
-+				 slot);
- 			mt7621_control_assert(port);
- 			port->enabled = false;
- 			num_disabled++;



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:50 -0400
Subject: [openwrt/openwrt]  ramips: 6.6: set testing kernel
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23899.1712297263.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b7a900782840de767e2aa751fbaf1575dc6abda4

commit b7a900782840de767e2aa751fbaf1575dc6abda4
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Wed Mar 13 02:15:14 2024 +0100

    ramips: 6.6: set testing kernel
    
    Allow selecting 6.6 as testing kernel on ramips.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/ramips/Makefile b/target/linux/ramips/Makefile
index 787b2e94cc..fec2a2b1f8 100644
--- a/target/linux/ramips/Makefile
+++ b/target/linux/ramips/Makefile
@@ -11,6 +11,7 @@ SUBTARGETS:=mt7620 mt7621 mt76x8 rt288x rt305x rt3883
 FEATURES:=squashfs gpio
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 define Target/Description
 	Build firmware images for Ralink RT288x/RT3xxx based boards.



From lede-commits at lists.infradead.org  Thu Apr  4 22:58:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 01:58:49 -0400
Subject: [openwrt/openwrt]  ramips: 6.6: refresh kernel config
In-Reply-To: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
References: <171229671932.3115970.3456713160992552983@git-01.infra.openwrt.org>
Message-ID: <mailman.23900.1712297321.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/093a5aab40d6fea0bb092a257ee38fd316956804

commit 093a5aab40d6fea0bb092a257ee38fd316956804
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Mon Apr 1 16:56:34 2024 +0200

    ramips: 6.6: refresh kernel config
    
    Refresh kernel config.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/mt7620/config-6.6 | 25 +++++++++++++++++--------
 target/linux/ramips/mt7621/config-6.6 | 21 +++++++++++++--------
 target/linux/ramips/mt76x8/config-6.6 | 27 ++++++++++++++++++---------
 target/linux/ramips/rt288x/config-6.6 | 24 ++++++++++++++++--------
 target/linux/ramips/rt305x/config-6.6 | 24 ++++++++++++++++--------
 target/linux/ramips/rt3883/config-6.6 | 24 ++++++++++++++++--------
 6 files changed, 96 insertions(+), 49 deletions(-)

diff --git a/target/linux/ramips/mt7620/config-6.6 b/target/linux/ramips/mt7620/config-6.6
index 111a59ab00..839b201cf1 100644
--- a/target/linux/ramips/mt7620/config-6.6
+++ b/target/linux/ramips/mt7620/config-6.6
@@ -27,7 +27,6 @@ CONFIG_CPU_HAS_RIXI=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_MIPS32=y
-# CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
 CONFIG_CPU_MIPSR2_IRQ_VI=y
@@ -37,10 +36,10 @@ CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CSRC_R4K=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_PINCTRL=y
@@ -54,15 +53,19 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_SHOW=y
@@ -77,6 +80,7 @@ CONFIG_GENERIC_PINCONF=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
 CONFIG_GPIO_CDEV=y
 # CONFIG_GPIO_MT7621 is not set
 CONFIG_GPIO_RALINK=y
@@ -85,6 +89,7 @@ CONFIG_GPIO_WATCHDOG=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_ICPLUS_PHY=y
@@ -101,7 +106,6 @@ CONFIG_MARVELL_PHY=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
@@ -112,10 +116,10 @@ CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 # CONFIG_MT7621_WDT is not set
 # CONFIG_MTD_CFI_INTELEXT is not set
@@ -131,6 +135,8 @@ CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_MTD_VIRT_CONCAT=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_RALINK_GSW_MT7620=y
 CONFIG_NET_RALINK_MDIO=y
 CONFIG_NET_RALINK_MDIO_MT7620=y
@@ -140,6 +146,7 @@ CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_SELFTESTS=y
 # CONFIG_NET_VENDOR_MEDIATEK is not set
 CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NET_XGRESS=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYOUTS=y
@@ -154,7 +161,6 @@ CONFIG_OF_MDIO=y
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_DRIVERS_LEGACY=y
@@ -167,7 +173,8 @@ CONFIG_PHY_RALINK_USB=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_AW9523 is not set
 CONFIG_PINCTRL_MT7620=y
-CONFIG_PINCTRL_RALINK=y
+# CONFIG_PINCTRL_MT76X8 is not set
+CONFIG_PINCTRL_MTK_MTMIPS=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
@@ -181,6 +188,7 @@ CONFIG_RESET_CONTROLLER=y
 CONFIG_SERIAL_8250_RT288X=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SOC_BUS=y
 CONFIG_SOC_MT7620=y
 # CONFIG_SOC_MT7621 is not set
 # CONFIG_SOC_RT288X is not set
@@ -191,12 +199,13 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 # CONFIG_SPI_MT7621 is not set
 CONFIG_SPI_RT2880=y
-CONFIG_SRCU=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_SINGLE=y
 CONFIG_SWCONFIG=y
 CONFIG_SWCONFIG_LEDS=y
 CONFIG_SWPHY=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
diff --git a/target/linux/ramips/mt7621/config-6.6 b/target/linux/ramips/mt7621/config-6.6
index 8f2355c564..9225a9c35c 100644
--- a/target/linux/ramips/mt7621/config-6.6
+++ b/target/linux/ramips/mt7621/config-6.6
@@ -30,7 +30,6 @@ CONFIG_CPU_HAS_RIXI=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_MIPS32=y
-# CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
 CONFIG_CPU_MIPSR2_IRQ_EI=y
@@ -45,11 +44,11 @@ CONFIG_CRC16=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_ZSTD=y
 CONFIG_CSRC_R4K=y
 CONFIG_DEBUG_INFO=y
@@ -60,15 +59,19 @@ CONFIG_DTC=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
@@ -96,6 +99,7 @@ CONFIG_GRO_CELLS=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_I2C=y
 CONFIG_I2C_ALGOBIT=y
@@ -120,7 +124,6 @@ CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
 CONFIG_MEDIATEK_GE_PHY=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIKROTIK=y
@@ -139,7 +142,6 @@ CONFIG_MIPS_CPS=y
 CONFIG_MIPS_CPU_SCACHE=y
 CONFIG_MIPS_GIC=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 CONFIG_MIPS_MT=y
 CONFIG_MIPS_MT_FPAFF=y
 CONFIG_MIPS_MT_SMP=y
@@ -148,6 +150,7 @@ CONFIG_MIPS_NR_CPU_NR_MAP=4
 CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MT7621_WDT=y
 # CONFIG_MTD_CFI_INTELEXT is not set
@@ -176,18 +179,22 @@ CONFIG_MTD_UBI_BLOCK=y
 CONFIG_MTD_UBI_WL_THRESHOLD=4096
 CONFIG_MTD_VIRT_CONCAT=y
 CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SRCU_NMI_SAFE=y
 CONFIG_NET_DEVLINK=y
 CONFIG_NET_DSA=y
 CONFIG_NET_DSA_MT7530=y
 CONFIG_NET_DSA_MT7530_MDIO=y
 # CONFIG_NET_DSA_MT7530_MMIO is not set
 CONFIG_NET_DSA_TAG_MTK=y
+CONFIG_NET_EGRESS=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_MEDIATEK_SOC=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_SWITCHDEV=y
 CONFIG_NET_VENDOR_MEDIATEK=y
 # CONFIG_NET_VENDOR_RALINK is not set
+CONFIG_NET_XGRESS=y
 CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=4
@@ -206,7 +213,6 @@ CONFIG_PAGE_POOL=y
 CONFIG_PAGE_POOL_STATS=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCI=y
 CONFIG_PCIE_MT7621=y
 CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
@@ -224,7 +230,7 @@ CONFIG_PHY_MT7621_PCI=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AW9523=y
 CONFIG_PINCTRL_MT7621=y
-CONFIG_PINCTRL_RALINK=y
+CONFIG_PINCTRL_MTK_MTMIPS=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PINCTRL_SX150X=y
 CONFIG_POWER_RESET=y
@@ -273,11 +279,10 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 CONFIG_SPI_MT7621=y
 # CONFIG_SPI_RT2880 is not set
-CONFIG_SRCU=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SWPHY=y
 CONFIG_SYNC_R4K=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
diff --git a/target/linux/ramips/mt76x8/config-6.6 b/target/linux/ramips/mt76x8/config-6.6
index be779b03d8..b03b220a71 100644
--- a/target/linux/ramips/mt76x8/config-6.6
+++ b/target/linux/ramips/mt76x8/config-6.6
@@ -26,7 +26,6 @@ CONFIG_CPU_HAS_RIXI=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_MIPS32=y
-# CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
 CONFIG_CPU_MIPSR2_IRQ_VI=y
@@ -36,10 +35,10 @@ CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CSRC_R4K=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_PINCTRL=y
@@ -52,15 +51,19 @@ CONFIG_DTC=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_SHOW=y
@@ -75,6 +78,7 @@ CONFIG_GENERIC_PINCONF=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_GENERIC=y
@@ -83,6 +87,7 @@ CONFIG_GPIO_MT7621=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_ICPLUS_PHY=y
@@ -98,7 +103,6 @@ CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
@@ -109,10 +113,10 @@ CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MT7621_WDT=y
 # CONFIG_MTD_CFI_INTELEXT is not set
@@ -127,6 +131,8 @@ CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_MTD_VIRT_CONCAT=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_RALINK_ESW_RT3050=y
 # CONFIG_NET_RALINK_MT7620 is not set
 CONFIG_NET_RALINK_RT3050=y
@@ -134,6 +140,7 @@ CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_SELFTESTS=y
 # CONFIG_NET_VENDOR_MEDIATEK is not set
 CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NET_XGRESS=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYOUTS=y
@@ -148,7 +155,6 @@ CONFIG_OF_MDIO=y
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_DRIVERS_LEGACY=y
@@ -160,8 +166,9 @@ CONFIG_PHYLIB_LEDS=y
 CONFIG_PHY_RALINK_USB=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_AW9523 is not set
-CONFIG_PINCTRL_MT7620=y
-CONFIG_PINCTRL_RALINK=y
+# CONFIG_PINCTRL_MT7620 is not set
+CONFIG_PINCTRL_MT76X8=y
+CONFIG_PINCTRL_MTK_MTMIPS=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
@@ -181,6 +188,7 @@ CONFIG_SERIAL_8250_NR_UARTS=3
 CONFIG_SERIAL_8250_RUNTIME_UARTS=3
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SOC_BUS=y
 CONFIG_SOC_MT7620=y
 # CONFIG_SOC_MT7621 is not set
 # CONFIG_SOC_RT288X is not set
@@ -191,12 +199,13 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 CONFIG_SPI_MT7621=y
 # CONFIG_SPI_RT2880 is not set
-CONFIG_SRCU=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_SINGLE=y
 CONFIG_SWCONFIG=y
 CONFIG_SWCONFIG_LEDS=y
 CONFIG_SWPHY=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
diff --git a/target/linux/ramips/rt288x/config-6.6 b/target/linux/ramips/rt288x/config-6.6
index d8b89934b9..f3261258ae 100644
--- a/target/linux/ramips/rt288x/config-6.6
+++ b/target/linux/ramips/rt288x/config-6.6
@@ -23,7 +23,6 @@ CONFIG_CPU_HAS_RIXI=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_MIPS32=y
-# CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
 CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
@@ -32,10 +31,10 @@ CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CSRC_R4K=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DMA_NONCOHERENT=y
@@ -45,16 +44,20 @@ CONFIG_DTC=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_SHOW=y
@@ -68,11 +71,13 @@ CONFIG_GENERIC_PINCONF=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_RALINK=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -88,7 +93,6 @@ CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
@@ -101,10 +105,10 @@ CONFIG_MIPS_CLOCK_VSYSCALL=y
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=4
 CONFIG_MIPS_L1_CACHE_SHIFT_4=y
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 # CONFIG_MTD_CFI_INTELEXT is not set
 CONFIG_MTD_CMDLINE_PARTS=y
@@ -116,12 +120,15 @@ CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_MTD_SPLIT_WRGG_FW=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_RALINK_MDIO=y
 CONFIG_NET_RALINK_MDIO_RT2880=y
 CONFIG_NET_RALINK_RT2880=y
 CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=m
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NVMEM=y
@@ -137,7 +144,6 @@ CONFIG_OF_MDIO=y
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_DRIVERS_LEGACY=y
@@ -149,7 +155,7 @@ CONFIG_PHYLIB_LEDS=y
 # CONFIG_PHY_RALINK_USB is not set
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_AW9523 is not set
-CONFIG_PINCTRL_RALINK=y
+CONFIG_PINCTRL_MTK_MTMIPS=y
 CONFIG_PINCTRL_RT2880=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PREEMPT_NONE_BUILD=y
@@ -164,6 +170,7 @@ CONFIG_RESET_CONTROLLER=y
 CONFIG_SERIAL_8250_RT288X=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SOC_BUS=y
 # CONFIG_SOC_MT7620 is not set
 # CONFIG_SOC_MT7621 is not set
 CONFIG_SOC_RT288X=y
@@ -174,11 +181,12 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 # CONFIG_SPI_MT7621 is not set
 CONFIG_SPI_RT2880=y
-CONFIG_SRCU=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_SINGLE=y
 CONFIG_SWCONFIG=y
 CONFIG_SWPHY=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
diff --git a/target/linux/ramips/rt305x/config-6.6 b/target/linux/ramips/rt305x/config-6.6
index 8b1b17033a..5d2e4f3766 100644
--- a/target/linux/ramips/rt305x/config-6.6
+++ b/target/linux/ramips/rt305x/config-6.6
@@ -25,7 +25,6 @@ CONFIG_CPU_HAS_RIXI=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_MIPS32=y
-# CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
 CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
@@ -34,10 +33,10 @@ CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CSRC_R4K=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_PINCTRL=y
@@ -48,15 +47,19 @@ CONFIG_DTC=y
 CONFIG_EARLY_PRINTK=y
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_SHOW=y
@@ -71,6 +74,7 @@ CONFIG_GENERIC_PINCONF=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_RALINK=y
 CONFIG_GPIO_WATCHDOG=y
@@ -78,6 +82,7 @@ CONFIG_GPIO_WATCHDOG=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -92,7 +97,6 @@ CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
@@ -103,10 +107,10 @@ CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 # CONFIG_MTD_CFI_INTELEXT is not set
 CONFIG_MTD_CMDLINE_PARTS=y
@@ -118,11 +122,14 @@ CONFIG_MTD_SPLIT_SEAMA_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_RALINK_ESW_RT3050=y
 CONFIG_NET_RALINK_RT3050=y
 CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NET_XGRESS=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYOUTS=y
@@ -137,7 +144,6 @@ CONFIG_OF_MDIO=y
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCI_DRIVERS_LEGACY=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
@@ -147,7 +153,7 @@ CONFIG_PHYLIB_LEDS=y
 CONFIG_PHY_RALINK_USB=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_AW9523 is not set
-CONFIG_PINCTRL_RALINK=y
+CONFIG_PINCTRL_MTK_MTMIPS=y
 CONFIG_PINCTRL_RT305X=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PREEMPT_NONE_BUILD=y
@@ -163,6 +169,7 @@ CONFIG_RESET_CONTROLLER=y
 CONFIG_SERIAL_8250_RT288X=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SOC_BUS=y
 # CONFIG_SOC_MT7620 is not set
 # CONFIG_SOC_MT7621 is not set
 # CONFIG_SOC_RT288X is not set
@@ -173,11 +180,12 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 # CONFIG_SPI_MT7621 is not set
 CONFIG_SPI_RT2880=y
-CONFIG_SRCU=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_SINGLE=y
 CONFIG_SWCONFIG=y
 CONFIG_SWPHY=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
diff --git a/target/linux/ramips/rt3883/config-6.6 b/target/linux/ramips/rt3883/config-6.6
index 2aaebdc702..afb3fb6787 100644
--- a/target/linux/ramips/rt3883/config-6.6
+++ b/target/linux/ramips/rt3883/config-6.6
@@ -24,7 +24,6 @@ CONFIG_CPU_HAS_RIXI=y
 CONFIG_CPU_HAS_SYNC=y
 CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_MIPS32=y
-# CONFIG_CPU_MIPS32_R1 is not set
 CONFIG_CPU_MIPS32_R2=y
 CONFIG_CPU_MIPSR2=y
 CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
@@ -33,10 +32,10 @@ CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
 CONFIG_CPU_SUPPORTS_HIGHMEM=y
 CONFIG_CPU_SUPPORTS_MSA=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG2=y
 CONFIG_CSRC_R4K=y
 CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_PINCTRL=y
@@ -48,15 +47,19 @@ CONFIG_EARLY_PRINTK=y
 CONFIG_ETHERNET_PACKET_MANGLE=y
 CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_FIXED_PHY=y
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_SHOW=y
@@ -71,11 +74,13 @@ CONFIG_GENERIC_PINCONF=y
 CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_RALINK=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HZ_PERIODIC=y
 CONFIG_INITRAMFS_SOURCE=""
@@ -90,7 +95,6 @@ CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
@@ -101,10 +105,10 @@ CONFIG_MIPS_CLOCK_VSYSCALL=y
 # CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
 CONFIG_MIPS_CMDLINE_FROM_DTB=y
 CONFIG_MIPS_L1_CACHE_SHIFT=5
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 # CONFIG_MIPS_NO_APPENDED_DTB is not set
 CONFIG_MIPS_RAW_APPENDED_DTB=y
 CONFIG_MIPS_SPRAM=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 # CONFIG_MTD_CFI_INTELEXT is not set
 CONFIG_MTD_CMDLINE_PARTS=y
@@ -115,12 +119,15 @@ CONFIG_MTD_SPLIT_SEAMA_FW=y
 CONFIG_MTD_SPLIT_UIMAGE_FW=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_RALINK_MDIO=y
 CONFIG_NET_RALINK_MDIO_RT2880=y
 CONFIG_NET_RALINK_RT3883=y
 CONFIG_NET_RALINK_SOC=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NET_VENDOR_RALINK=y
+CONFIG_NET_XGRESS=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NVMEM=y
 CONFIG_NVMEM_LAYOUTS=y
@@ -135,7 +142,6 @@ CONFIG_OF_MDIO=y
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCI=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_DRIVERS_LEGACY=y
@@ -147,7 +153,7 @@ CONFIG_PHYLIB_LEDS=y
 CONFIG_PHY_RALINK_USB=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_AW9523 is not set
-CONFIG_PINCTRL_RALINK=y
+CONFIG_PINCTRL_MTK_MTMIPS=y
 CONFIG_PINCTRL_RT3883=y
 # CONFIG_PINCTRL_SINGLE is not set
 CONFIG_PREEMPT_NONE_BUILD=y
@@ -165,6 +171,7 @@ CONFIG_RTL8367_PHY=y
 CONFIG_SERIAL_8250_RT288X=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SOC_BUS=y
 # CONFIG_SOC_MT7620 is not set
 # CONFIG_SOC_MT7621 is not set
 # CONFIG_SOC_RT288X is not set
@@ -175,11 +182,12 @@ CONFIG_SPI_MASTER=y
 CONFIG_SPI_MEM=y
 # CONFIG_SPI_MT7621 is not set
 CONFIG_SPI_RT2880=y
-CONFIG_SRCU=y
+# CONFIG_SQUASHFS_COMPILE_DECOMP_MULTI_PERCPU is not set
+CONFIG_SQUASHFS_COMPILE_DECOMP_SINGLE=y
+CONFIG_SQUASHFS_DECOMP_SINGLE=y
 CONFIG_SWCONFIG=y
 CONFIG_SWPHY=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
 CONFIG_SYS_HAS_EARLY_PRINTK=y
 CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y



From lede-commits at lists.infradead.org  Fri Apr  5 00:46:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 03:46:04 -0400
Subject: [openwrt/openwrt]  apm821xx: prepare WNDR4700 for 6.6 - add
 preliminary u-boot-env access
In-Reply-To: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
References: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
Message-ID: <mailman.23938.1712303170.1280.lede-commits@lists.infradead.org>

chunkeey pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/82c8c38a5c236971930167ee9f38a1732d0aeba7

commit 82c8c38a5c236971930167ee9f38a1732d0aeba7
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sat Mar 23 11:26:23 2024 +0100

    apm821xx: prepare WNDR4700 for 6.6 - add preliminary u-boot-env access
    
    With the default BUILD_BOT configuration on a linux 6.6 kernel,
    the WNDR4700's kernel no longer fits into the alloted ~3.5MiB,
    even with LZMA compression.
    
    Bigger kernels are possible, but there's a problem with Netgear's
    "bootcmd":
    
    > if loadn_dniimg 0 0x180000 0x4e0000 && chk_dniimg 0x4e0000; then nand read 0x800000 0x180000 0x20000;bootm 0x500000 - 0x800040;else fw_recovery; fi"
    
    This loads the dni-image starting offset 0x180000 from the NAND
    flash (which is the DTB partition) to 0x4e0000 in the RAM. It then
    checks whenever the provided image is "valid". If it is then it
    reads the DTB again to 0x800000 in the RAM and starts the extraction
    and boot process. (If the image wasn't valid then it starts the
    automated firmware recovery).
    
    The issues here are that first: the kernel image gets "squeezed"
    between 0x500040 and 0x7fffff... And second, the decompressor
    only has area 0x0 - 0x500000 for decompression.
    
    Hence the image now requires to update the bootcmd by providing
    new values (which have been successfully tested with the original
    Netgear WNDR4700 v1.0.0.56 firmware) for the RAM locations and
    make full use of the fact that loadn_dniimg loads the DTB as well.
    
    This needs to be done only once. Just connect a serial adapter to
    interface with uboot and overwrite (and save) the new bootcmd.
    
    WARNING: The serial port needs a TTL/RS-232 3.3v level converter!
    
    Steps:
     0. Power-off the WNDR4700
     1. Connect the serial interface (you need to open the WNDR4700)
     2. Power-up the WNDR4700
     3. Monitor the boot-sequence and hit "Enter"-key when it says:
    
      "Hit any key to stop autoboot" (Be quick, you have a ~2 second window)
    
     4. in the Prompt enter the following commands (copy & paste)
    
     setenv bootcmd "if loadn_dniimg 0 0x180000 0xce0000 && chk_dniimg 0xce0000; then bootm 0xd00000 - 0xce0040;else fw_recovery; fi"
     saveenv
     run bootcmd
    
    Note: This new bootcmd will also unbrick devices that were bricked
    by the bigger 4.19-6.1 kernels.
    
    Note2: This method was tested with a WNDR4700. A big kernel with most
    debug features enabled on v6.6.22 measured 4.30 MiB when compressed
    with lzma. The uncompressed kernel is 12.34 MiB. This is over the 3 MiB,
    the device reserves for the kernel... But it booted! For bigger kernels,
    the device needs repartitioning of the the ubi partition due to the
    kernel+dtb not fitting into the partition.
    
    Note3: For initramfs development. I would advice to load the initramfs
    images to 0x800000 (or higher). i.e.: tftp 800000 wndr4700.bin
    
    Note4: the fw_recovery uboot command to transfer the factory image to
    the flash still works.
    
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 package/boot/uboot-envtools/files/apm821xx         |  4 ++++
 .../etc/uci-defaults/05_fix-compat-version         |  3 ++-
 target/linux/apm821xx/dts/netgear-wndr4700.dts     | 26 +++++++++++++++++++---
 target/linux/apm821xx/image/nand.mk                |  5 ++++-
 4 files changed, 33 insertions(+), 5 deletions(-)

diff --git a/package/boot/uboot-envtools/files/apm821xx b/package/boot/uboot-envtools/files/apm821xx
index e73aaab7a0..1076f931bb 100644
--- a/package/boot/uboot-envtools/files/apm821xx
+++ b/package/boot/uboot-envtools/files/apm821xx
@@ -19,6 +19,10 @@ netgear,wndap620|\
 netgear,wndap660)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x4000" "0x4000" "4"
 	;;
+netgear,wndr4700)
+	ubootenv_add_uci_config "/dev/mtd0" "0x40000" "0x20000" "0x20000" "1"
+	ubootenv_add_uci_config "/dev/mtd0" "0x60000" "0x20000" "0x20000" "1"
+	;;
 wd,mybooklive)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x1000" "1"
 	ubootenv_add_uci_config "/dev/mtd1" "0x1000" "0x1000" "0x1000" "1"
diff --git a/target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version b/target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version
index 0be0b6112a..d34b4051be 100644
--- a/target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version
+++ b/target/linux/apm821xx/base-files/etc/uci-defaults/05_fix-compat-version
@@ -3,7 +3,8 @@
 case "$(board_name)" in
 meraki,mx60|\
 netgear,wndap620|\
-netgear,wndap660)
+netgear,wndap660|\
+netgear,wndr4700)
 	uci set system. at system[0].compat_version="2.0"
 	uci commit system
 	;;
diff --git a/target/linux/apm821xx/dts/netgear-wndr4700.dts b/target/linux/apm821xx/dts/netgear-wndr4700.dts
index 0788037981..851a3192b3 100644
--- a/target/linux/apm821xx/dts/netgear-wndr4700.dts
+++ b/target/linux/apm821xx/dts/netgear-wndr4700.dts
@@ -183,7 +183,27 @@
 			partition at 0 {
 				label = "uboot";
 				reg = <0x00000000 0x00180000>;
+				compatible = "fixed-partitions";
 				read-only;
+
+				partition at 40000 {
+					label = "u-boot-env-main";
+					compatible = "u-boot,env-redundant-count";
+					reg = <0x00040000 0x20000>; /* one block is 128k */
+					read-only;
+				};
+
+/*
+ * Causes u_boot_env: probe of 4e4000000.ndfc:nand:partitions:partition at 0:partition at 60000
+ * failed with error -17
+ *
+ *				partition at 60000 {
+ *					label = "u-boot-env-redundant";
+ *					compatible = "u-boot,env-redundant-count";
+ *					reg = <0x00060000 0x20000>;
+ *					read-only;
+ *				};
+ */
 			};
 
 			partition at 180000 {
@@ -196,7 +216,7 @@
 
 				partition at 0 {
 					label = "kernel";
-					reg = <0x00000000 0x00380000>;
+					reg = <0x00000000 0x00480000>;
 
 					compatible = "fixed-partitions";
 					#address-cells = <1>;
@@ -218,9 +238,9 @@
 				 */
 				};
 
-				partition at 380000 {
+				partition at 480000 {
 					label = "ubi";
-					reg = <0x00380000 0x014e0000>;
+					reg = <0x00480000 0x013e0000>;
 				};
 			};
 
diff --git a/target/linux/apm821xx/image/nand.mk b/target/linux/apm821xx/image/nand.mk
index 469bf58c1d..69eb386126 100644
--- a/target/linux/apm821xx/image/nand.mk
+++ b/target/linux/apm821xx/image/nand.mk
@@ -105,7 +105,7 @@ define Device/netgear_wndr4700
   IMAGE_SIZE := 24960k
   IMAGES := factory.img sysupgrade.bin
   ARTIFACTS := device-tree.dtb
-  KERNEL_SIZE := 3584k
+  KERNEL_SIZE := 4608k
   # append a fake/empty rootfs to fool netgear's uboot
   # CHECK_DNI_FIRMWARE_ROOTFS_INTEGRITY in do_chk_dniimg()
   KERNEL := kernel-bin | lzma -d16 | uImage lzma | pad-offset $$(BLOCKSIZE) 64 | \
@@ -119,5 +119,8 @@ define Device/netgear_wndr4700
   NETGEAR_HW_ID := 29763875+128+256
   UBINIZE_OPTS := -E 5
   SUPPORTED_DEVICES += wndr4700
+  DEVICE_COMPAT_VERSION := 2.0
+  DEVICE_COMPAT_MESSAGE := kernel and ubi partitions had to be resized. \
+       Upgrade via sysupgrade mechanism is not possible.
 endef
 TARGET_DEVICES += netgear_wndr4700



From lede-commits at lists.infradead.org  Fri Apr  5 00:46:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 03:46:08 -0400
Subject: [openwrt/openwrt]  ipq40xx: 6.6: remove redundant patch
In-Reply-To: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
References: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
Message-ID: <mailman.23939.1712303210.1280.lede-commits@lists.infradead.org>

chunkeey pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/46efc77502a811b768e9ddbf10e6cd8740abd227

commit 46efc77502a811b768e9ddbf10e6cd8740abd227
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Apr 5 00:26:16 2024 +0200

    ipq40xx: 6.6: remove redundant patch
    
    Remove file 110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch redundand after adding 440-mtd-don-t-look-for-OTP-legacy-NVMEM-cells-if-proper-.patch in dd78a59
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 ...0-mtd-limit-OTP-nvmem-to-non-nand-devices.patch | 58 ----------------------
 1 file changed, 58 deletions(-)

diff --git a/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch b/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch
deleted file mode 100644
index 03f45d7a9a..0000000000
--- a/target/linux/ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch
+++ /dev/null
@@ -1,58 +0,0 @@
-From 540dcef6f39d6356d2a65230a8d4e9738ee2d25b Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Wed, 20 Mar 2024 16:43:01 +0100
-Subject: [PATCH] mtd: limit OTP nvmem to non nand devices
-
-MTD OTP logic is very fragile and can be problematic with some specific
-kind of devices.
-
-NVMEM across the years had various iteration on how Cells could be
-declared in DT and MTD OTP probably was left behind and
-add_legacy_fixed_of_cells was enabled without thinking of the consequences.
-
-That option enables NVMEM to scan the provided of_node and treat each
-child as a NVMEM Cell, this was to support legacy NVMEM implementation
-and don't cause regression.
-
-This is problematic if we have devices like Nand where the OTP is
-triggered by setting a special mode in the flash. In this context real
-partitions declared in the Nand node are registered as OTP Cells and
-this cause probe fail with -EINVAL error.
-
-This was never notice due to the fact that till now, no Nand supported
-the OTP feature. With commit e87161321a40 ("mtd: rawnand: macronix: OTP
-access for MX30LFxG18AC") this changed and coincidentally this Nand is
-used on an FritzBox 7530 supported on OpenWrt.
-
-Alternative and more robust way to declare OTP Cells are already
-prossible by using the fixed-layout node or by declaring a child node
-with the compatible set to "otp-user" or "otp-factory".
-
-To fix this and limit any regression with other MTD that makes use of
-declaring OTP as direct child of the dev node, disable
-add_legacy_fixed_of_cells if we have a node called nand since it's the
-standard property name to identify Nand devices attached to a Nand
-Controller.
-
-With the following logic, the OTP NVMEM entry is correctly created with
-no Cells and the MTD Nand is correctly probed and partitions are
-correctly exposed.
-
-Fixes: 2cc3b37f5b6d ("nvmem: add explicit config option to read old syntax fixed OF cells")
-Cc: <stable at vger.kernel.org>
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- drivers/mtd/mtdcore.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/mtd/mtdcore.c
-+++ b/drivers/mtd/mtdcore.c
-@@ -933,7 +933,7 @@ static struct nvmem_device *mtd_otp_nvme
- 	config.name = compatible;
- 	config.id = NVMEM_DEVID_AUTO;
- 	config.owner = THIS_MODULE;
--	config.add_legacy_fixed_of_cells = true;
-+	config.add_legacy_fixed_of_cells = !of_node_name_eq(mtd->dev.of_node, "nand");
- 	config.type = NVMEM_TYPE_OTP;
- 	config.root_only = true;
- 	config.ignore_wp = true;



From lede-commits at lists.infradead.org  Fri Apr  5 00:46:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 03:46:06 -0400
Subject: [openwrt/openwrt]  apm821xx: restore 6.1 config+patches
In-Reply-To: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
References: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
Message-ID: <mailman.23940.1712303220.1280.lede-commits@lists.infradead.org>

chunkeey pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bc014392a45e1cee507300ef9768afbfc95675b9

commit bc014392a45e1cee507300ef9768afbfc95675b9
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sat Mar 23 10:33:47 2024 +0100

    apm821xx: restore 6.1 config+patches
    
    simply attached previous versions of the
    config-6.1 and patches-6.1 directory.
    
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/apm821xx/config-6.1                   | 250 +++++++++++++++++++++
 .../201-add-amcc-apollo3g-support.patch            |  30 +++
 .../300-fix-atheros-nics-on-apm82181.patch         |  51 +++++
 .../patches-6.1/301-fix-memory-map-wndr4700.patch  |  14 ++
 ...twrapper-force-gzip-as-mkimage-s-compress.patch |  29 +++
 5 files changed, 374 insertions(+)

diff --git a/target/linux/apm821xx/config-6.1 b/target/linux/apm821xx/config-6.1
new file mode 100644
index 0000000000..bde05e2f12
--- /dev/null
+++ b/target/linux/apm821xx/config-6.1
@@ -0,0 +1,250 @@
+# CONFIG_40x is not set
+# CONFIG_440_CPU is not set
+CONFIG_44x=y
+CONFIG_464_CPU=y
+CONFIG_4xx=y
+CONFIG_4xx_SOC=y
+# CONFIG_ADVANCED_OPTIONS is not set
+CONFIG_APM821xx=y
+# CONFIG_APOLLO3G is not set
+# CONFIG_ARCHES is not set
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
+CONFIG_ARCH_MMAP_RND_BITS=11
+CONFIG_ARCH_MMAP_RND_BITS_MAX=17
+CONFIG_ARCH_MMAP_RND_BITS_MIN=11
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SPLIT_ARG64=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_WEAK_RELEASE_ACQUIRE=y
+CONFIG_AUDIT_ARCH=y
+# CONFIG_BAMBOO is not set
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLUESTONE=y
+CONFIG_BOOKE=y
+CONFIG_BOOKE_OR_40x=y
+CONFIG_BOOKE_WDT=y
+# CONFIG_CANYONLANDS is not set
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="rootfstype=squashfs noinitrd"
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CPU_BIG_ENDIAN=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_LZO=y
+# CONFIG_CRYPTO_MD5_PPC is not set
+# CONFIG_CRYPTO_SHA1_PPC is not set
+CONFIG_DATA_SHIFT=12
+CONFIG_DMADEVICES=y
+CONFIG_DMA_DIRECT_REMAP=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DTC=y
+CONFIG_DW_DMAC=y
+CONFIG_DW_DMAC_CORE=y
+CONFIG_EARLY_PRINTK=y
+# CONFIG_EBONY is not set
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+# CONFIG_EIGER is not set
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_EXTRA_TARGETS="uImage"
+CONFIG_FIXED_PHY=y
+CONFIG_FORCE_PCI=y
+# CONFIG_FSL_LBC is not set
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+# CONFIG_GEN_RTC is not set
+# CONFIG_GLACIER is not set
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_IBM_IIC=y
+CONFIG_IBM_EMAC=y
+CONFIG_IBM_EMAC_EMAC4=y
+CONFIG_IBM_EMAC_POLL_WEIGHT=32
+CONFIG_IBM_EMAC_RGMII=y
+CONFIG_IBM_EMAC_RXB=128
+CONFIG_IBM_EMAC_RX_COPY_THRESHOLD=256
+CONFIG_IBM_EMAC_TAH=y
+CONFIG_IBM_EMAC_TXB=128
+# CONFIG_ICON is not set
+CONFIG_ILLEGAL_POINTER_VALUE=0
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_ISA_DMA_API=y
+# CONFIG_JFFS2_FS is not set
+# CONFIG_KATMAI is not set
+CONFIG_KERNEL_START=0xc0000000
+CONFIG_LEDS_TRIGGER_MTD=y
+CONFIG_LEDS_TRIGGER_PATTERN=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOWMEM_SIZE=0x30000000
+# CONFIG_MATH_EMULATION is not set
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MIGRATION=y
+CONFIG_MMU_GATHER_PAGE_SIZE=y
+CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
+CONFIG_MTD_CFI_ADV_OPTIONS=y
+# CONFIG_MTD_CFI_GEOMETRY is not set
+# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NOT_COHERENT_CACHE=y
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=1
+CONFIG_NR_IRQS=512
+CONFIG_NVMEM=y
+CONFIG_NVMEM_SYSFS=y
+CONFIG_NVMEM_U_BOOT_ENV=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND=y
+CONFIG_PACKING=y
+CONFIG_PAGE_OFFSET=0xc0000000
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_ARCH_FALLBACKS=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYSICAL_START=0x00000000
+CONFIG_PHYS_64BIT=y
+CONFIG_PHYS_ADDR_T_64BIT=y
+# CONFIG_PMU_SYSFS is not set
+CONFIG_PPC=y
+CONFIG_PPC32=y
+CONFIG_PPC44x_SIMPLE=y
+CONFIG_PPC4xx_GPIO=y
+CONFIG_PPC4xx_PCI_EXPRESS=y
+# CONFIG_PPC64 is not set
+# CONFIG_PPC_47x is not set
+# CONFIG_PPC_85xx is not set
+# CONFIG_PPC_8xx is not set
+CONFIG_PPC_ADV_DEBUG_DACS=2
+CONFIG_PPC_ADV_DEBUG_DAC_RANGE=y
+CONFIG_PPC_ADV_DEBUG_DVCS=2
+CONFIG_PPC_ADV_DEBUG_IACS=4
+CONFIG_PPC_ADV_DEBUG_REGS=y
+# CONFIG_PPC_BOOK3S_32 is not set
+CONFIG_PPC_DCR=y
+CONFIG_PPC_DCR_NATIVE=y
+# CONFIG_PPC_EARLY_DEBUG is not set
+CONFIG_PPC_FPU=y
+CONFIG_PPC_FPU_REGS=y
+CONFIG_PPC_INDIRECT_PCI=y
+CONFIG_PPC_KUAP=y
+# CONFIG_PPC_KUAP_DEBUG is not set
+CONFIG_PPC_KUEP=y
+CONFIG_PPC_MMU_NOHASH=y
+CONFIG_PPC_PAGE_SHIFT=12
+# CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT is not set
+CONFIG_PPC_UDBG_16550=y
+CONFIG_PPC_WERROR=y
+CONFIG_PTE_64BIT=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+# CONFIG_RAINIER is not set
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+CONFIG_REGULATOR=y
+CONFIG_RSEQ=y
+# CONFIG_SAM440EP is not set
+# CONFIG_SCOM_DEBUGFS is not set
+# CONFIG_SEQUOIA is not set
+# CONFIG_SERIAL_8250_FSL is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SRCU=y
+# CONFIG_STATIC_CALL_SELFTEST is not set
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+# CONFIG_TAISHAN is not set
+CONFIG_TARGET_CPU="464"
+CONFIG_TARGET_CPU_BOOL=y
+CONFIG_TASK_SIZE=0xc0000000
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_THREAD_SHIFT=13
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TINY_SRCU=y
+# CONFIG_TOOLCHAIN_DEFAULT_CPU is not set
+CONFIG_USB_SUPPORT=y
+CONFIG_VDSO32=y
+# CONFIG_VIRTIO_MENU is not set
+# CONFIG_VIRT_CPU_ACCOUNTING_NATIVE is not set
+# CONFIG_WARP is not set
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_XZ_DEC_POWERPC=y
+# CONFIG_YOSEMITE is not set
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
diff --git a/target/linux/apm821xx/patches-6.1/201-add-amcc-apollo3g-support.patch b/target/linux/apm821xx/patches-6.1/201-add-amcc-apollo3g-support.patch
new file mode 100644
index 0000000000..d26e74dfb7
--- /dev/null
+++ b/target/linux/apm821xx/patches-6.1/201-add-amcc-apollo3g-support.patch
@@ -0,0 +1,30 @@
+--- a/arch/powerpc/platforms/44x/Kconfig
++++ b/arch/powerpc/platforms/44x/Kconfig
+@@ -118,6 +118,17 @@ config CANYONLANDS
+ 	help
+ 	  This option enables support for the AMCC PPC460EX evaluation board.
+ 
++config APOLLO3G
++	bool "Apollo3G"
++	depends on 44x
++	default n
++	select PPC44x_SIMPLE
++	select APM821xx
++	select IBM_EMAC_RGMII
++	select 460EX
++	help
++	  This option enables support for the AMCC Apollo 3G board.
++
+ config GLACIER
+ 	bool "Glacier"
+ 	depends on 44x
+--- a/arch/powerpc/platforms/44x/ppc44x_simple.c
++++ b/arch/powerpc/platforms/44x/ppc44x_simple.c
+@@ -46,6 +46,7 @@ machine_device_initcall(ppc44x_simple, p
+  * board.c file for it rather than adding it to this list.
+  */
+ static char *board[] __initdata = {
++	"amcc,apollo3g",
+ 	"amcc,arches",
+ 	"amcc,bamboo",
+ 	"apm,bluestone",
diff --git a/target/linux/apm821xx/patches-6.1/300-fix-atheros-nics-on-apm82181.patch b/target/linux/apm821xx/patches-6.1/300-fix-atheros-nics-on-apm82181.patch
new file mode 100644
index 0000000000..706f86d0cf
--- /dev/null
+++ b/target/linux/apm821xx/patches-6.1/300-fix-atheros-nics-on-apm82181.patch
@@ -0,0 +1,51 @@
+--- a/arch/powerpc/platforms/4xx/pci.c
++++ b/arch/powerpc/platforms/4xx/pci.c
+@@ -1061,15 +1061,24 @@ static int __init apm821xx_pciex_init_po
+ 	u32 val;
+ 
+ 	/*
+-	 * Do a software reset on PCIe ports.
+-	 * This code is to fix the issue that pci drivers doesn't re-assign
+-	 * bus number for PCIE devices after Uboot
+-	 * scanned and configured all the buses (eg. PCIE NIC IntelPro/1000
+-	 * PT quad port, SAS LSI 1064E)
++	 * Only reset the PHY when no link is currently established.
++	 * This is for the Atheros PCIe board which has problems to establish
++	 * the link (again) after this PHY reset. All other currently tested
++	 * PCIe boards don't show this problem.
+ 	 */
+-
+-	mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x0);
+-	mdelay(10);
++	val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
++	if (!(val & 0x00001000)) {
++		/*
++		 * Do a software reset on PCIe ports.
++		 * This code is to fix the issue that pci drivers doesn't re-assign
++		 * bus number for PCIE devices after Uboot
++		 * scanned and configured all the buses (eg. PCIE NIC IntelPro/1000
++		 * PT quad port, SAS LSI 1064E)
++		 */
++
++		mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x0);
++		mdelay(10);
++	}
+ 
+ 	if (port->endpoint)
+ 		val = PTYPE_LEGACY_ENDPOINT << 20;
+@@ -1086,9 +1095,12 @@ static int __init apm821xx_pciex_init_po
+ 	mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x00000130);
+ 	mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x00000006);
+ 
+-	mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x10000000);
+-	mdelay(50);
+-	mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x30000000);
++	val = mfdcri(SDR0, port->sdr_base + PESDRn_LOOP);
++	if (!(val & 0x00001000)) {
++		mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x10000000);
++		mdelay(50);
++		mtdcri(SDR0, PESDR0_460EX_PHY_CTL_RST, 0x30000000);
++	}
+ 
+ 	mtdcri(SDR0, port->sdr_base + PESDRn_RCSSET,
+ 		mfdcri(SDR0, port->sdr_base + PESDRn_RCSSET) |
diff --git a/target/linux/apm821xx/patches-6.1/301-fix-memory-map-wndr4700.patch b/target/linux/apm821xx/patches-6.1/301-fix-memory-map-wndr4700.patch
new file mode 100644
index 0000000000..0c9fb370f1
--- /dev/null
+++ b/target/linux/apm821xx/patches-6.1/301-fix-memory-map-wndr4700.patch
@@ -0,0 +1,14 @@
+--- a/arch/powerpc/platforms/4xx/pci.c
++++ b/arch/powerpc/platforms/4xx/pci.c
+@@ -1903,9 +1903,9 @@ static void __init ppc4xx_configure_pcie
+ 		 * if it works
+ 		 */
+ 		out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
+-		out_le32(mbase + PECFG_PIM0LAH, 0x00000000);
++		out_le32(mbase + PECFG_PIM0LAH, 0x00000008);
+ 		out_le32(mbase + PECFG_PIM1LAL, 0x00000000);
+-		out_le32(mbase + PECFG_PIM1LAH, 0x00000000);
++		out_le32(mbase + PECFG_PIM1LAH, 0x0000000c);
+ 		out_le32(mbase + PECFG_PIM01SAH, 0xffff0000);
+ 		out_le32(mbase + PECFG_PIM01SAL, 0x00000000);
+ 
diff --git a/target/linux/apm821xx/patches-6.1/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch b/target/linux/apm821xx/patches-6.1/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch
new file mode 100644
index 0000000000..292a252a2e
--- /dev/null
+++ b/target/linux/apm821xx/patches-6.1/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch
@@ -0,0 +1,29 @@
+From c9395ad54e2cabb87d408becc37566f3d8248933 Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey at gmail.com>
+Date: Sun, 1 Dec 2019 02:08:23 +0100
+Subject: [PATCH] powerpc: bootwrapper: force gzip as mkimage's compression
+ method
+
+Due to CONFIG_KERNEL_XZ symbol, the bootwrapper code tries to
+instruct the mkimage to use the xz compression, which isn't
+supported. This patch forces the gzip compression, which is
+supported and doesn't matter because the generated uImage for
+the apm821xx target gets ignored as the OpenWrt toolchain will
+do separate U-Boot kernel images for each device individually.
+
+Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
+---
+ arch/powerpc/boot/Makefile | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -274,7 +274,7 @@ compressor-$(CONFIG_KERNEL_LZO) := lzo
+ 
+ # args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
+ quiet_cmd_wrap	= WRAP    $@
+-      cmd_wrap	=$(CONFIG_SHELL) $(wrapper) -Z $(compressor-y) -c -o $@ -p $2 \
++      cmd_wrap	=$(CONFIG_SHELL) $(wrapper) -Z gzip -c -o $@ -p $2 \
+ 		$(CROSSWRAP) $(if $3, -s $3)$(if $4, -d $4)$(if $5, -i $5) \
+ 		vmlinux
+ 



From lede-commits at lists.infradead.org  Fri Apr  5 00:46:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 03:46:07 -0400
Subject: [openwrt/openwrt]  kirkwood: 6.6: refresh patches
In-Reply-To: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
References: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
Message-ID: <mailman.23943.1712303245.1280.lede-commits@lists.infradead.org>

chunkeey pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c72c35d66494d4f68d7202368d19d1c2ec9aa3ab

commit c72c35d66494d4f68d7202368d19d1c2ec9aa3ab
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Thu Apr 4 22:46:01 2024 +0200

    kirkwood: 6.6: refresh patches
    
    Refresh patches for kernel 6.6.23 with make target/linux/refresh.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/kirkwood/patches-6.6/111-l-50.patch | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/kirkwood/patches-6.6/111-l-50.patch b/target/linux/kirkwood/patches-6.6/111-l-50.patch
index 08897d4fae..af6aa80b6d 100644
--- a/target/linux/kirkwood/patches-6.6/111-l-50.patch
+++ b/target/linux/kirkwood/patches-6.6/111-l-50.patch
@@ -14,7 +14,7 @@
  	chosen {
  		bootargs = "console=ttyS0,115200n8";
  		stdout-path = &uart0;
-@@ -95,12 +102,12 @@
+@@ -97,12 +104,12 @@
  	leds {
  		compatible = "gpio-leds";
  
@@ -29,7 +29,7 @@
  			label = "l-50:red:status";
  			gpios = <&gpio3 2 GPIO_ACTIVE_LOW>;
  		};
-@@ -349,13 +356,8 @@
+@@ -351,13 +358,8 @@
  	};
  
  	partition at 100000 {



From lede-commits at lists.infradead.org  Fri Apr  5 00:46:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 03:46:05 -0400
Subject: [openwrt/openwrt]  apm821xx: add 6.6 testing kernel
In-Reply-To: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
References: <171230316440.3329433.6507839558018326174@git-01.infra.openwrt.org>
Message-ID: <mailman.23944.1712303250.1280.lede-commits@lists.infradead.org>

chunkeey pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/56db0210a2c9f1acd62903445f22bfb7d18d134f

commit 56db0210a2c9f1acd62903445f22bfb7d18d134f
Author: Christian Lamparter <chunkeey at gmail.com>
AuthorDate: Sat Mar 23 10:32:14 2024 +0100

    apm821xx: add 6.6 testing kernel
    
    refreshed kernel config + patches
    
    otherwise same as 6.1/5.15.
    
    Tested on: WNDAP620, WNDAP660, MyBook Live Single, MR24, MX60, WNDR4700
    Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
---
 target/linux/apm821xx/Makefile                     |  1 +
 target/linux/apm821xx/{config-6.1 => config-6.6}   | 32 +++++++++++++++++++---
 .../201-add-amcc-apollo3g-support.patch            |  0
 .../300-fix-atheros-nics-on-apm82181.patch         |  4 +--
 .../301-fix-memory-map-wndr4700.patch              |  2 +-
 ...twrapper-force-gzip-as-mkimage-s-compress.patch |  2 +-
 6 files changed, 33 insertions(+), 8 deletions(-)

diff --git a/target/linux/apm821xx/Makefile b/target/linux/apm821xx/Makefile
index 66bbf3ef47..6719a69779 100644
--- a/target/linux/apm821xx/Makefile
+++ b/target/linux/apm821xx/Makefile
@@ -10,6 +10,7 @@ FEATURES:=fpu dt gpio ramdisk squashfs usb
 SUBTARGETS:=nand sata
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 define Target/Description
 	Build images for AppliedMicro APM821xx based boards.
diff --git a/target/linux/apm821xx/config-6.1 b/target/linux/apm821xx/config-6.6
similarity index 89%
rename from target/linux/apm821xx/config-6.1
rename to target/linux/apm821xx/config-6.6
index bde05e2f12..8814e5bdca 100644
--- a/target/linux/apm821xx/config-6.1
+++ b/target/linux/apm821xx/config-6.6
@@ -47,12 +47,16 @@ CONFIG_CRC32_SLICEBY8=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_JITTERENTROPY=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
 CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZO=y
 # CONFIG_CRYPTO_MD5_PPC is not set
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
 # CONFIG_CRYPTO_SHA1_PPC is not set
+CONFIG_CRYPTO_SHA3=y
 CONFIG_DATA_SHIFT=12
 CONFIG_DMADEVICES=y
 CONFIG_DMA_DIRECT_REMAP=y
@@ -71,6 +75,8 @@ CONFIG_EXTRA_TARGETS="uImage"
 CONFIG_FIXED_PHY=y
 CONFIG_FORCE_PCI=y
 # CONFIG_FSL_LBC is not set
+CONFIG_FS_IOMAP=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
@@ -83,11 +89,12 @@ CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
 CONFIG_GENERIC_EARLY_IOREMAP=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IOREMAP=y
 CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
 CONFIG_GENERIC_ISA_DMA=y
 CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
 CONFIG_GENERIC_PCI_IOMAP=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_STRNCPY_FROM_USER=y
@@ -100,6 +107,7 @@ CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_I2C=y
 CONFIG_I2C_BOARDINFO=y
@@ -129,13 +137,16 @@ CONFIG_LEDS_TRIGGER_PATTERN=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_LOWMEM_SIZE=0x30000000
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
 # CONFIG_MATH_EMULATION is not set
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MIGRATION=y
+CONFIG_MMU_GATHER_MERGE_VMAS=y
 CONFIG_MMU_GATHER_PAGE_SIZE=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_RELA=y
 CONFIG_MODULE_ALLOW_MISSING_NAMESPACE_IMPORTS=y
 CONFIG_MTD_CFI_ADV_OPTIONS=y
@@ -144,7 +155,10 @@ CONFIG_MTD_CFI_ADV_OPTIONS=y
 CONFIG_NEED_DMA_MAP_STATE=y
 CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 CONFIG_NET_SELFTESTS=y
+CONFIG_NET_XGRESS=y
 CONFIG_NOT_COHERENT_CACHE=y
 CONFIG_NO_HZ=y
 CONFIG_NO_HZ_COMMON=y
@@ -152,6 +166,7 @@ CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=1
 CONFIG_NR_IRQS=512
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 CONFIG_NVMEM_SYSFS=y
 CONFIG_NVMEM_U_BOOT_ENV=y
 CONFIG_OF=y
@@ -159,6 +174,7 @@ CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
 CONFIG_OF_FLATTREE=y
 CONFIG_OF_GPIO=y
+CONFIG_OF_GPIO_MM_GPIOCHIP=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
 CONFIG_OF_MDIO=y
@@ -166,6 +182,10 @@ CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND=y
 CONFIG_PACKING=y
 CONFIG_PAGE_OFFSET=0xc0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCI=y
 CONFIG_PCIEAER=y
 CONFIG_PCIEPORTBUS=y
@@ -173,9 +193,9 @@ CONFIG_PCI_DISABLE_COMMON_QUIRKS=y
 CONFIG_PCI_DOMAINS=y
 CONFIG_PCI_MSI=y
 CONFIG_PCI_MSI_ARCH_FALLBACKS=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYSICAL_START=0x00000000
 CONFIG_PHYS_64BIT=y
 CONFIG_PHYS_ADDR_T_64BIT=y
@@ -209,9 +229,11 @@ CONFIG_PPC_PAGE_SHIFT=12
 # CONFIG_PPC_PCI_BUS_NUM_DOMAIN_DEPENDENT is not set
 CONFIG_PPC_UDBG_16550=y
 CONFIG_PPC_WERROR=y
+CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTE_64BIT=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 # CONFIG_RAINIER is not set
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
 CONFIG_RATIONAL=y
 CONFIG_REGULATOR=y
@@ -223,8 +245,10 @@ CONFIG_RSEQ=y
 CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIAL_OF_PLATFORM=y
 CONFIG_SGL_ALLOC=y
+# CONFIG_SMT_NUM_THREADS_DYNAMIC is not set
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSE_IRQ=y
-CONFIG_SRCU=y
+# CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU is not set
 # CONFIG_STATIC_CALL_SELFTEST is not set
 CONFIG_SWPHY=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
diff --git a/target/linux/apm821xx/patches-6.1/201-add-amcc-apollo3g-support.patch b/target/linux/apm821xx/patches-6.6/201-add-amcc-apollo3g-support.patch
similarity index 100%
rename from target/linux/apm821xx/patches-6.1/201-add-amcc-apollo3g-support.patch
rename to target/linux/apm821xx/patches-6.6/201-add-amcc-apollo3g-support.patch
diff --git a/target/linux/apm821xx/patches-6.1/300-fix-atheros-nics-on-apm82181.patch b/target/linux/apm821xx/patches-6.6/300-fix-atheros-nics-on-apm82181.patch
similarity index 92%
rename from target/linux/apm821xx/patches-6.1/300-fix-atheros-nics-on-apm82181.patch
rename to target/linux/apm821xx/patches-6.6/300-fix-atheros-nics-on-apm82181.patch
index 706f86d0cf..48c57acde8 100644
--- a/target/linux/apm821xx/patches-6.1/300-fix-atheros-nics-on-apm82181.patch
+++ b/target/linux/apm821xx/patches-6.6/300-fix-atheros-nics-on-apm82181.patch
@@ -1,6 +1,6 @@
 --- a/arch/powerpc/platforms/4xx/pci.c
 +++ b/arch/powerpc/platforms/4xx/pci.c
-@@ -1061,15 +1061,24 @@ static int __init apm821xx_pciex_init_po
+@@ -1058,15 +1058,24 @@ static int __init apm821xx_pciex_init_po
  	u32 val;
  
  	/*
@@ -33,7 +33,7 @@
  
  	if (port->endpoint)
  		val = PTYPE_LEGACY_ENDPOINT << 20;
-@@ -1086,9 +1095,12 @@ static int __init apm821xx_pciex_init_po
+@@ -1083,9 +1092,12 @@ static int __init apm821xx_pciex_init_po
  	mtdcri(SDR0, PESDR0_460EX_L0DRV, 0x00000130);
  	mtdcri(SDR0, PESDR0_460EX_L0CLK, 0x00000006);
  
diff --git a/target/linux/apm821xx/patches-6.1/301-fix-memory-map-wndr4700.patch b/target/linux/apm821xx/patches-6.6/301-fix-memory-map-wndr4700.patch
similarity index 88%
rename from target/linux/apm821xx/patches-6.1/301-fix-memory-map-wndr4700.patch
rename to target/linux/apm821xx/patches-6.6/301-fix-memory-map-wndr4700.patch
index 0c9fb370f1..bd022ca220 100644
--- a/target/linux/apm821xx/patches-6.1/301-fix-memory-map-wndr4700.patch
+++ b/target/linux/apm821xx/patches-6.6/301-fix-memory-map-wndr4700.patch
@@ -1,6 +1,6 @@
 --- a/arch/powerpc/platforms/4xx/pci.c
 +++ b/arch/powerpc/platforms/4xx/pci.c
-@@ -1903,9 +1903,9 @@ static void __init ppc4xx_configure_pcie
+@@ -1900,9 +1900,9 @@ static void __init ppc4xx_configure_pcie
  		 * if it works
  		 */
  		out_le32(mbase + PECFG_PIM0LAL, 0x00000000);
diff --git a/target/linux/apm821xx/patches-6.1/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch b/target/linux/apm821xx/patches-6.6/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch
similarity index 95%
rename from target/linux/apm821xx/patches-6.1/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch
rename to target/linux/apm821xx/patches-6.6/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch
index 292a252a2e..3ea4faf202 100644
--- a/target/linux/apm821xx/patches-6.1/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch
+++ b/target/linux/apm821xx/patches-6.6/900-powerpc-bootwrapper-force-gzip-as-mkimage-s-compress.patch
@@ -18,7 +18,7 @@ Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
 
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -274,7 +274,7 @@ compressor-$(CONFIG_KERNEL_LZO) := lzo
+@@ -276,7 +276,7 @@ compressor-$(CONFIG_KERNEL_LZO) := lzo
  
  # args (to if_changed): 1 = (this rule), 2 = platform, 3 = dts 4=dtb 5=initrd
  quiet_cmd_wrap	= WRAP    $@



From lede-commits at lists.infradead.org  Fri Apr  5 05:56:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 08:56:38 -0400
Subject: [openwrt/openwrt]  hostapd: fix Config.in dependencies
In-Reply-To: <171232179874.238654.7358976838148726132@git-01.infra.openwrt.org>
References: <171232179874.238654.7358976838148726132@git-01.infra.openwrt.org>
Message-ID: <mailman.24098.1712321809.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/27a2b54cba1539fc0f3afdc3160722322fffdeb3

commit 27a2b54cba1539fc0f3afdc3160722322fffdeb3
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Apr 5 14:54:16 2024 +0200

    hostapd: fix Config.in dependencies
    
    hostapd packages were accidentally left out. Clean up this mess by
    changing the dependencies to hostapd-common
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/Config.in | 57 +++---------------------------
 1 file changed, 5 insertions(+), 52 deletions(-)

diff --git a/package/network/services/hostapd/Config.in b/package/network/services/hostapd/Config.in
index 87ad7e093e..1fff4f8acd 100644
--- a/package/network/services/hostapd/Config.in
+++ b/package/network/services/hostapd/Config.in
@@ -1,54 +1,12 @@
 # wpa_supplicant config
 config WPA_RFKILL_SUPPORT
 	bool "Add rfkill support"
-	depends on PACKAGE_wpa-supplicant || \
-		   PACKAGE_wpa-supplicant-openssl || \
-		   PACKAGE_wpa-supplicant-wolfssl || \
-		   PACKAGE_wpa-supplicant-mbedtls || \
-		   PACKAGE_wpa-supplicant-mesh-openssl || \
-		   PACKAGE_wpa-supplicant-mesh-wolfssl || \
-		   PACKAGE_wpa-supplicant-mesh-mbedtls || \
-		   PACKAGE_wpa-supplicant-basic || \
-		   PACKAGE_wpa-supplicant-mini || \
-		   PACKAGE_wpa-supplicant-p2p || \
-		   PACKAGE_wpad || \
-		   PACKAGE_wpad-openssl || \
-		   PACKAGE_wpad-wolfssl || \
-		   PACKAGE_wpad-mbedtls || \
-		   PACKAGE_wpad-basic || \
-		   PACKAGE_wpad-basic-openssl || \
-		   PACKAGE_wpad-basic-wolfssl || \
-		   PACKAGE_wpad-basic-mbedtls || \
-		   PACKAGE_wpad-mini || \
-		   PACKAGE_wpad-mesh-openssl || \
-		   PACKAGE_wpad-mesh-wolfssl || \
-		   PACKAGE_wpad-mesh-mbedtls
+	depends on PACKAGE_hostapd-common
 	default n
 
 config WPA_MSG_MIN_PRIORITY
 	int "Minimum debug message priority"
-	depends on PACKAGE_wpa-supplicant || \
-		   PACKAGE_wpa-supplicant-openssl || \
-		   PACKAGE_wpa-supplicant-wolfssl || \
-		   PACKAGE_wpa-supplicant-mbedtls || \
-		   PACKAGE_wpa-supplicant-mesh-openssl || \
-		   PACKAGE_wpa-supplicant-mesh-wolfssl || \
-		   PACKAGE_wpa-supplicant-mesh-mbedtls || \
-		   PACKAGE_wpa-supplicant-basic || \
-		   PACKAGE_wpa-supplicant-mini || \
-		   PACKAGE_wpa-supplicant-p2p || \
-		   PACKAGE_wpad || \
-		   PACKAGE_wpad-openssl || \
-		   PACKAGE_wpad-wolfssl || \
-		   PACKAGE_wpad-mbedtls || \
-		   PACKAGE_wpad-basic || \
-		   PACKAGE_wpad-basic-openssl || \
-		   PACKAGE_wpad-basic-wolfssl || \
-		   PACKAGE_wpad-basic-mbedtls || \
-		   PACKAGE_wpad-mini || \
-		   PACKAGE_wpad-mesh-openssl || \
-		   PACKAGE_wpad-mesh-wolfssl || \
-		   PACKAGE_wpad-mesh-mbedtls
+	depends on PACKAGE_hostapd-common
 	default 3
 	help
 	  Useful values are:
@@ -84,6 +42,7 @@ config DRIVER_11AX_SUPPORT
 
 config WPA_ENABLE_WEP
 	bool "Enable support for unsecure and obsolete WEP"
+	depends on PACKAGE_hostapd-common
 	help
 	  Wired equivalent privacy (WEP) is an obsolete cryptographic data
 	  confidentiality algorithm that is not considered secure. It should not be used
@@ -93,14 +52,8 @@ config WPA_ENABLE_WEP
 
 config WPA_MBO_SUPPORT
 	bool "Multi Band Operation (Agile Multiband)"
-	default PACKAGE_wpa-supplicant || \
-		PACKAGE_wpa-supplicant-openssl || \
-		PACKAGE_wpa-supplicant-wolfssl || \
-		PACKAGE_wpa-supplicant-mbedtls || \
-		PACKAGE_wpad || \
-		PACKAGE_wpad-openssl || \
-		PACKAGE_wpad-wolfssl || \
-		PACKAGE_wpad-mbedtls
+	depends on PACKAGE_hostapd-common
+	default y
 	help
 	  Multi Band Operation aka (Agile Multiband) enables features
 	  that facilitate efficient use of multiple frequency bands.



From lede-commits at lists.infradead.org  Fri Apr  5 06:08:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 09:08:42 -0400
Subject: [openwrt/openwrt]  gettext-full: link libiconv when building host pkg
In-Reply-To: <171232252223.262692.12636425347773185507@git-01.infra.openwrt.org>
References: <171232252223.262692.12636425347773185507@git-01.infra.openwrt.org>
Message-ID: <mailman.24105.1712322526.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/63dd14b906e9eb27bc878b95ac6777a3624b1135

commit 63dd14b906e9eb27bc878b95ac6777a3624b1135
Author: Yanase Yuki <dev at zpc.st>
AuthorDate: Thu Mar 7 17:31:34 2024 +0900

    gettext-full: link libiconv when building host pkg
    
    On Fedora 40 system, some compile error happens when
    building iconv-ostream.c. Linking to libiconv-full
    fixes this.
    
    Signed-off-by: Yanase Yuki <dev at zpc.st>
---
 package/libs/gettext-full/Makefile | 6 ++----
 1 file changed, 2 insertions(+), 4 deletions(-)

diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile
index eb5b6d31bd..94b973d5c1 100644
--- a/package/libs/gettext-full/Makefile
+++ b/package/libs/gettext-full/Makefile
@@ -27,7 +27,7 @@ PKG_BUILD_PARALLEL:=0
 
 PKG_FIXUP:=autoreconf
 
-HOST_BUILD_DEPENDS:=gperf/host libunistring/host libxml2/host
+HOST_BUILD_DEPENDS:=gperf/host libiconv-full/host libunistring/host libxml2/host
 HOST_BUILD_PARALLEL:=0
 
 PKG_SUBDIRS:= \
@@ -101,14 +101,12 @@ HOST_CONFIGURE_ARGS += \
 	--disable-java \
 	--disable-openmp \
 	--without-emacs \
+	--with-libiconv-prefix=$(STAGING_DIR_HOSTPKG) \
 	--with-libunistring-prefix=$(STAGING_DIR_HOSTPKG) \
 	--with-libxml2-prefix=$(STAGING_DIR_HOSTPKG)
 
 HOST_CONFIGURE_VARS += \
 	EMACS="no" \
-	am_cv_lib_iconv=no \
-	am_cv_func_iconv=no \
-	ac_cv_header_iconv_h=no \
 
 HOST_CFLAGS += $(HOST_FPIC)
 



From lede-commits at lists.infradead.org  Fri Apr  5 06:39:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 09:39:11 -0400
Subject: [openwrt/openwrt]  pistachio: add 6.1 testing kernel
In-Reply-To: <171232434876.392998.6182569591030826878@git-01.infra.openwrt.org>
References: <171232434876.392998.6182569591030826878@git-01.infra.openwrt.org>
Message-ID: <mailman.24112.1712324354.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5713032fd43a31e74ff87b7d68c5346f3c27a03e

commit 5713032fd43a31e74ff87b7d68c5346f3c27a03e
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Mar 19 23:31:47 2024 +0100

    pistachio: add 6.1 testing kernel
    
    Configure 6.1 as testing kernel.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/pistachio/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/pistachio/Makefile b/target/linux/pistachio/Makefile
index 6ccf63142e..f170ff0125 100644
--- a/target/linux/pistachio/Makefile
+++ b/target/linux/pistachio/Makefile
@@ -13,6 +13,7 @@ CPU_SUBTYPE:=24kf
 SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=5.15
+KERNEL_TESTING_PATCHVER:=6.1
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Fri Apr  5 06:39:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 09:39:09 -0400
Subject: [openwrt/openwrt]  pistachio: update and extend 6.1 patches
In-Reply-To: <171232434876.392998.6182569591030826878@git-01.infra.openwrt.org>
References: <171232434876.392998.6182569591030826878@git-01.infra.openwrt.org>
Message-ID: <mailman.24113.1712324358.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/47dee7be559e095724d45de188610352da14052a

commit 47dee7be559e095724d45de188610352da14052a
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Mar 19 23:28:53 2024 +0100

    pistachio: update and extend 6.1 patches
    
    Add:
    110-pwm-img-fix-clock-lookup.patch
     - patch to fix a clock lookup issue from upstream
    Update:
    401-mtd-nor-support-mtd-name-from-device-tree.patch
     - mtd-name lookup hack to reflect the updated spi_nor_scan function
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 .../patches-6.1/110-pwm-img-fix-clock-lookup.patch | 39 ++++++++++++++++++++++
 ...mtd-nor-support-mtd-name-from-device-tree.patch | 21 ++++++------
 2 files changed, 49 insertions(+), 11 deletions(-)

diff --git a/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch b/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch
new file mode 100644
index 0000000000..d77a2f4259
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch
@@ -0,0 +1,39 @@
+From 58d03770ac5f78ff2d819caabea9371a041bf7be Mon Sep 17 00:00:00 2001
+From: Zoltan HERPAI <wigyori at uid0.hu>
+Date: Wed, 20 Mar 2024 09:36:02 +0100
+Subject: pwm: img: fix pwm clock lookup
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+22e8e19 has introduced a regression in the imgchip->pwm_clk lookup, whereas
+the clock name has also been renamed to "imgchip". This causes the driver
+failing to load:
+
+[    0.546905] img-pwm 18101300.pwm: failed to get imgchip clock
+[    0.553418] img-pwm: probe of 18101300.pwm failed with error -2
+
+Fix this lookup by reverting the clock name back to "pwm".
+
+Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
+Link: https://lore.kernel.org/r/20240320083602.81592-1-wigyori at uid0.hu
+Fixes: 22e8e19a46f7 ("pwm: img: Rename variable pointing to driver private data")
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+---
+ drivers/pwm/pwm-img.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/pwm/pwm-img.c
++++ b/drivers/pwm/pwm-img.c
+@@ -289,9 +289,9 @@ static int img_pwm_probe(struct platform
+ 		return PTR_ERR(imgchip->sys_clk);
+ 	}
+ 
+-	imgchip->pwm_clk = devm_clk_get(&pdev->dev, "imgchip");
++	imgchip->pwm_clk = devm_clk_get(&pdev->dev, "pwm");
+ 	if (IS_ERR(imgchip->pwm_clk)) {
+-		dev_err(&pdev->dev, "failed to get imgchip clock\n");
++		dev_err(&pdev->dev, "failed to get pwm clock\n");
+ 		return PTR_ERR(imgchip->pwm_clk);
+ 	}
+ 
diff --git a/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch
index 36f5331bd0..b30f79b773 100644
--- a/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch
+++ b/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch
@@ -10,19 +10,18 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
 
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -3108,6 +3108,7 @@ int spi_nor_scan(struct spi_nor *nor, co
- 	struct device *dev = nor->dev;
+@@ -2942,12 +2942,20 @@ static void spi_nor_set_mtd_info(struct
+ {
  	struct mtd_info *mtd = &nor->mtd;
- 	struct device_node *np = spi_nor_get_flash_node(nor);
+ 	struct device *dev = nor->dev;
++ 	struct device_node *np = spi_nor_get_flash_node(nor);
 +	const char __maybe_unused *of_mtd_name = NULL;
- 	int ret;
- 	int i;
  
-@@ -3162,7 +3163,12 @@ int spi_nor_scan(struct spi_nor *nor, co
- 	if (ret)
- 		return ret;
+ 	spi_nor_set_mtd_locking_ops(nor);
+ 	spi_nor_set_mtd_otp_ops(nor);
  
--	if (!mtd->name)
+ 	mtd->dev.parent = dev;
+ 	if (!mtd->name)
 +#ifdef CONFIG_MTD_OF_PARTS
 +	of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
 +#endif
@@ -30,11 +29,11 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
 +		mtd->name = of_mtd_name;
 +	else if (!mtd->name)
  		mtd->name = dev_name(dev);
- 	mtd->priv = nor;
  	mtd->type = MTD_NORFLASH;
+ 	mtd->flags = MTD_CAP_NORFLASH;
 --- a/drivers/mtd/mtdcore.c
 +++ b/drivers/mtd/mtdcore.c
-@@ -870,6 +870,17 @@ out_error:
+@@ -863,6 +863,17 @@ out_error:
   */
  static void mtd_set_dev_defaults(struct mtd_info *mtd)
  {



From lede-commits at lists.infradead.org  Fri Apr  5 06:39:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 09:39:10 -0400
Subject: [openwrt/openwrt]  pistachio: refresh 6.1 config
In-Reply-To: <171232434876.392998.6182569591030826878@git-01.infra.openwrt.org>
References: <171232434876.392998.6182569591030826878@git-01.infra.openwrt.org>
Message-ID: <mailman.24116.1712324358.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/91ce93a893a86f0a38f5c9de868818bd0b600b9d

commit 91ce93a893a86f0a38f5c9de868818bd0b600b9d
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Mar 19 23:31:10 2024 +0100

    pistachio: refresh 6.1 config
    
    Kernel config needs to be refreshed after copy from 5.15.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/pistachio/config-6.1 | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/pistachio/config-6.1 b/target/linux/pistachio/config-6.1
index c16a0c4551..926b5e67f7 100644
--- a/target/linux/pistachio/config-6.1
+++ b/target/linux/pistachio/config-6.1
@@ -13,6 +13,7 @@ CONFIG_CEVT_R4K=y
 CONFIG_CLKSRC_MIPS_GIC=y
 CONFIG_CLKSRC_PISTACHIO=y
 CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_PISTACHIO=y
@@ -325,6 +326,7 @@ CONFIG_WATCHDOG_CORE=y
 CONFIG_WEAK_ORDERING=y
 CONFIG_XPS=y
 CONFIG_XXHASH=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
 CONFIG_ZSMALLOC=y



From lede-commits at lists.infradead.org  Fri Apr  5 06:39:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 09:39:08 -0400
Subject: [openwrt/openwrt]  pistachio: copy config and patches of 5.15 to 6.1
In-Reply-To: <171232434876.392998.6182569591030826878@git-01.infra.openwrt.org>
References: <171232434876.392998.6182569591030826878@git-01.infra.openwrt.org>
Message-ID: <mailman.24117.1712324360.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/05fe149486af7c02d69410df04875a0a824d1d9b

commit 05fe149486af7c02d69410df04875a0a824d1d9b
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Mar 19 23:27:08 2024 +0100

    pistachio: copy config and patches of 5.15 to 6.1
    
    Simple copy of config and patches.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/pistachio/config-6.1                  | 333 +++++++++++++++++++++
 ...maengine-img-mdc-Handle-early-status-read.patch |  68 +++++
 ...spi-img-spfi-Implement-dual-and-quad-mode.patch | 198 ++++++++++++
 ...i-use-device-0-configuration-for-all-devi.patch |  64 ++++
 ...g-spfi-RX-maximum-burst-size-for-DMA-is-8.patch |  59 ++++
 ...pi-img-spfi-finish-every-transfer-cleanly.patch | 120 ++++++++
 ...clk-pistachio-Fix-wrong-SDHost-card-speed.patch |  49 +++
 ...S-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch |  47 +++
 ...mtd-nor-support-mtd-name-from-device-tree.patch |  54 ++++
 ...01-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch |  30 ++
 ...DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch |  43 +++
 ...-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch |  81 +++++
 ...04-MIPS-DTS-img-marduk-Add-partition-name.patch |  27 ++
 .../905-MIPS-DTS-img-marduk-Add-led-aliases.patch  |  27 ++
 14 files changed, 1200 insertions(+)

diff --git a/target/linux/pistachio/config-6.1 b/target/linux/pistachio/config-6.1
new file mode 100644
index 0000000000..c16a0c4551
--- /dev/null
+++ b/target/linux/pistachio/config-6.1
@@ -0,0 +1,333 @@
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_SD=y
+# CONFIG_BOARD_INGENIC is not set
+CONFIG_BOARD_SCACHE=y
+CONFIG_BUILTIN_DTB=y
+CONFIG_CEVT_R4K=y
+CONFIG_CLKSRC_MIPS_GIC=y
+CONFIG_CLKSRC_PISTACHIO=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_PISTACHIO=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONNECTOR=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_DIEI=y
+CONFIG_CPU_HAS_PREFETCH=y
+CONFIG_CPU_HAS_RIXI=y
+# CONFIG_CPU_HAS_SMARTMIPS is not set
+CONFIG_CPU_HAS_SYNC=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+# CONFIG_CPU_MICROMIPS is not set
+CONFIG_CPU_MIPS32=y
+# CONFIG_CPU_MIPS32_R1 is not set
+CONFIG_CPU_MIPS32_R2=y
+# CONFIG_CPU_MIPS32_R6 is not set
+# CONFIG_CPU_MIPS64_R1 is not set
+# CONFIG_CPU_MIPS64_R2 is not set
+# CONFIG_CPU_MIPS64_R6 is not set
+CONFIG_CPU_MIPSR2=y
+CONFIG_CPU_MIPSR2_IRQ_EI=y
+CONFIG_CPU_MIPSR2_IRQ_VI=y
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_R4K_CACHE_TLB=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CPU_SUPPORTS_MSA=y
+CONFIG_CRC16=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_CSRC_R4K=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DTC=y
+CONFIG_DWMAC_GENERIC=y
+CONFIG_EXT4_FS=y
+# CONFIG_FIT_IMAGE_FDT_BOSTON is not set
+# CONFIG_FIT_IMAGE_FDT_JAGUAR2 is not set
+# CONFIG_FIT_IMAGE_FDT_LUTON is not set
+CONFIG_FIT_IMAGE_FDT_MARDUK=y
+# CONFIG_FIT_IMAGE_FDT_NI169445 is not set
+# CONFIG_FIT_IMAGE_FDT_OCELOT is not set
+# CONFIG_FIT_IMAGE_FDT_SERVAL is not set
+# CONFIG_FIT_IMAGE_FDT_XILFPGA is not set
+CONFIG_FIXED_PHY=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_FIND_FIRST_BIT=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_IMG=y
+CONFIG_IMGPDC_WDT=y
+CONFIG_IMG_MDC_DMA=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+# CONFIG_LEGACY_BOARD_OCELOT is not set
+# CONFIG_LEGACY_BOARD_SEAD3 is not set
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOG_BUF_SHIFT=18
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MICREL_PHY=y
+CONFIG_MIGRATION=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_AUTO_PFN_OFFSET=y
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+CONFIG_MIPS_CM=y
+CONFIG_MIPS_CMDLINE_DTB_EXTEND=y
+# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
+CONFIG_MIPS_CPC=y
+CONFIG_MIPS_CPS=y
+# CONFIG_MIPS_CPS_CPUIDLE is not set
+# CONFIG_MIPS_CPS_NS16550_BOOL is not set
+CONFIG_MIPS_CPS_PM=y
+CONFIG_MIPS_CPU_SCACHE=y
+CONFIG_MIPS_EBPF_JIT=y
+CONFIG_MIPS_GENERIC=y
+CONFIG_MIPS_GENERIC_KERNEL=y
+CONFIG_MIPS_GIC=y
+CONFIG_MIPS_L1_CACHE_SHIFT=7
+CONFIG_MIPS_L1_CACHE_SHIFT_7=y
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+CONFIG_MIPS_MT=y
+CONFIG_MIPS_MT_FPAFF=y
+CONFIG_MIPS_MT_SMP=y
+CONFIG_MIPS_NO_APPENDED_DTB=y
+CONFIG_MIPS_NR_CPU_NR_MAP=4
+CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
+CONFIG_MIPS_SPRAM=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_DW=y
+# CONFIG_MMC_DW_BLUEFIELD is not set
+# CONFIG_MMC_DW_EXYNOS is not set
+# CONFIG_MMC_DW_HI3798CV200 is not set
+# CONFIG_MMC_DW_K3 is not set
+CONFIG_MMC_DW_PLTFM=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_NAND_CORE=y
+CONFIG_MTD_NAND_ECC=y
+CONFIG_MTD_SPI_NAND=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+CONFIG_MTD_UBI_BLOCK=y
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NLS=y
+CONFIG_NO_EXCEPT_FILL=y
+CONFIG_NR_CPUS=4
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_PADATA=y
+CONFIG_PAGE_POOL=y
+CONFIG_PCI_DRIVERS_GENERIC=y
+CONFIG_PCS_XPCS=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PHY_PISTACHIO_USB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_PISTACHIO=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+CONFIG_PRINTK_TIME=y
+CONFIG_PROC_EVENTS=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_IMG=y
+CONFIG_PWM_SYSFS=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_GPIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RESET_PISTACHIO=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_SCHEDSTATS=y
+CONFIG_SCHED_INFO=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SCSI_SPI_ATTRS=y
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_8250_DWLIB=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_SC16IS7XX=y
+CONFIG_SERIAL_SC16IS7XX_CORE=y
+# CONFIG_SERIAL_SC16IS7XX_I2C is not set
+CONFIG_SERIAL_SC16IS7XX_SPI=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SG_POOL=y
+CONFIG_SMP=y
+CONFIG_SMP_UP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SPI=y
+CONFIG_SPI_IMG_SPFI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SRAM=y
+CONFIG_SRCU=y
+CONFIG_STMMAC_ETH=y
+CONFIG_STMMAC_PLATFORM=y
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_SWPHY=y
+CONFIG_SYNC_R4K=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_CPU_MIPS32_R6=y
+CONFIG_SYS_HAS_CPU_MIPS64_R1=y
+CONFIG_SYS_HAS_CPU_MIPS64_R2=y
+CONFIG_SYS_HAS_CPU_MIPS64_R6=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_SYS_SUPPORTS_HIGHMEM=y
+CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MICROMIPS=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_MIPS_CPS=y
+CONFIG_SYS_SUPPORTS_MULTITHREADING=y
+CONFIG_SYS_SUPPORTS_RELOCATABLE=y
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
+CONFIG_SYS_SUPPORTS_SMARTMIPS=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_TARGET_ISA_REV=2
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_UBIFS_FS=y
+CONFIG_UHI_BOOT=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_DWC2=y
+CONFIG_USB_DWC2_DUAL_ROLE=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_ROLE_SWITCH=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+# CONFIG_VIRT_BOARD_RANCHU is not set
+CONFIG_WATCHDOG_CORE=y
+CONFIG_WEAK_ORDERING=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSMALLOC=y
+# CONFIG_ZSMALLOC_STAT is not set
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/pistachio/patches-6.1/101-dmaengine-img-mdc-Handle-early-status-read.patch b/target/linux/pistachio/patches-6.1/101-dmaengine-img-mdc-Handle-early-status-read.patch
new file mode 100644
index 0000000000..031a4e3e5e
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/101-dmaengine-img-mdc-Handle-early-status-read.patch
@@ -0,0 +1,68 @@
+From a2dd154377c9aa6ddda00d39b8c7c334e4fa16ff Mon Sep 17 00:00:00 2001
+From: Damien Horsley <damien.horsley at imgtec.com>
+Date: Tue, 22 Mar 2016 12:46:09 +0000
+Subject: dmaengine: img-mdc: Handle early status read
+
+It is possible that mdc_tx_status may be called before the first
+node has been read from memory.
+
+In this case, the residue value stored in the register is undefined.
+Return the transfer size instead.
+
+Signed-off-by: Damien Horsley <damien.horsley at imgtec.com>
+---
+ drivers/dma/img-mdc-dma.c | 40 ++++++++++++++++++++++++----------------
+ 1 file changed, 24 insertions(+), 16 deletions(-)
+
+--- a/drivers/dma/img-mdc-dma.c
++++ b/drivers/dma/img-mdc-dma.c
+@@ -618,25 +618,33 @@ static enum dma_status mdc_tx_status(str
+ 			(MDC_CMDS_PROCESSED_CMDS_DONE_MASK + 1);
+ 
+ 		/*
+-		 * If the command loaded event hasn't been processed yet, then
+-		 * the difference above includes an extra command.
++		 * If the first node has not yet been read from memory,
++		 * the residue register value is undefined
+ 		 */
+-		if (!mdesc->cmd_loaded)
+-			cmds--;
+-		else
+-			cmds += mdesc->list_cmds_done;
+-
+-		bytes = mdesc->list_xfer_size;
+-		ldesc = mdesc->list;
+-		for (i = 0; i < cmds; i++) {
+-			bytes -= ldesc->xfer_size + 1;
+-			ldesc = ldesc->next_desc;
+-		}
+-		if (ldesc) {
+-			if (residue != MDC_TRANSFER_SIZE_MASK)
+-				bytes -= ldesc->xfer_size - residue;
++		if (!mdesc->cmd_loaded && !cmds) {
++			bytes = mdesc->list_xfer_size;
++		} else {
++			/*
++			 * If the command loaded event hasn't been processed yet, then
++			 * the difference above includes an extra command.
++			 */
++			if (!mdesc->cmd_loaded)
++				cmds--;
+ 			else
++				cmds += mdesc->list_cmds_done;
++
++			bytes = mdesc->list_xfer_size;
++			ldesc = mdesc->list;
++			for (i = 0; i < cmds; i++) {
+ 				bytes -= ldesc->xfer_size + 1;
++				ldesc = ldesc->next_desc;
++			}
++			if (ldesc) {
++				if (residue != MDC_TRANSFER_SIZE_MASK)
++					bytes -= ldesc->xfer_size - residue;
++				else
++					bytes -= ldesc->xfer_size + 1;
++			}
+ 		}
+ 	}
+ 	spin_unlock_irqrestore(&mchan->vc.lock, flags);
diff --git a/target/linux/pistachio/patches-6.1/102-spi-img-spfi-Implement-dual-and-quad-mode.patch b/target/linux/pistachio/patches-6.1/102-spi-img-spfi-Implement-dual-and-quad-mode.patch
new file mode 100644
index 0000000000..83f21a5c0a
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/102-spi-img-spfi-Implement-dual-and-quad-mode.patch
@@ -0,0 +1,198 @@
+From cd2a6af51553d38072cd31699b58d16ca6176ef5 Mon Sep 17 00:00:00 2001
+From: Ionela Voinescu <ionela.voinescu at imgtec.com>
+Date: Thu, 2 Feb 2017 16:46:14 +0000
+Subject: spi: img-spfi: Implement dual and quad mode
+
+For dual and quad modes to work the SPFI controller needs
+to have information about command/address/dummy bytes in the
+transaction register. This information is not relevant for
+single mode, and therefore it can have any value in the
+allowed range. Therefore, for any read or write transfers of less
+than 8 bytes (cmd = 1 byte, addr up to 7 bytes), SPFI will be
+configured, but not enabled (unless it is the last transfer in
+the queue). The transfer will be enabled by the subsequent tranfer.
+A pending transfer is determined by the content of the transaction
+register: if command part is set and tsize is not.
+
+This way we ensure that for dual and quad transactions
+the command request size will apear in the command/address part
+of the transaction register, while the data size will be in
+tsize, all data being sent/received in the same transaction (as
+set up in the transaction register).
+
+Signed-off-by: Ionela Voinescu <ionela.voinescu at imgtec.com>
+Signed-off-by: Ezequiel Garcia <ezequiel.garcia at imgtec.com>
+---
+ drivers/spi/spi-img-spfi.c | 96 ++++++++++++++++++++++++++++++++++++++++------
+ 1 file changed, 85 insertions(+), 11 deletions(-)
+
+--- a/drivers/spi/spi-img-spfi.c
++++ b/drivers/spi/spi-img-spfi.c
+@@ -36,7 +36,8 @@
+ #define SPFI_CONTROL_SOFT_RESET			BIT(11)
+ #define SPFI_CONTROL_SEND_DMA			BIT(10)
+ #define SPFI_CONTROL_GET_DMA			BIT(9)
+-#define SPFI_CONTROL_SE			BIT(8)
++#define SPFI_CONTROL_SE				BIT(8)
++#define SPFI_CONTROL_TX_RX			BIT(1)
+ #define SPFI_CONTROL_TMODE_SHIFT		5
+ #define SPFI_CONTROL_TMODE_MASK			0x7
+ #define SPFI_CONTROL_TMODE_SINGLE		0
+@@ -47,6 +48,10 @@
+ #define SPFI_TRANSACTION			0x18
+ #define SPFI_TRANSACTION_TSIZE_SHIFT		16
+ #define SPFI_TRANSACTION_TSIZE_MASK		0xffff
++#define SPFI_TRANSACTION_CMD_SHIFT		13
++#define SPFI_TRANSACTION_CMD_MASK		0x7
++#define SPFI_TRANSACTION_ADDR_SHIFT		10
++#define SPFI_TRANSACTION_ADDR_MASK		0x7
+ 
+ #define SPFI_PORT_STATE				0x1c
+ #define SPFI_PORT_STATE_DEV_SEL_SHIFT		20
+@@ -83,6 +88,7 @@
+  */
+ #define SPFI_32BIT_FIFO_SIZE			64
+ #define SPFI_8BIT_FIFO_SIZE			16
++#define SPFI_DATA_REQUEST_MAX_SIZE		8
+ 
+ struct img_spfi {
+ 	struct device *dev;
+@@ -99,6 +105,8 @@ struct img_spfi {
+ 	struct dma_chan *tx_ch;
+ 	bool tx_dma_busy;
+ 	bool rx_dma_busy;
++
++	bool complete;
+ };
+ 
+ static inline u32 spfi_readl(struct img_spfi *spfi, u32 reg)
+@@ -115,9 +123,11 @@ static inline void spfi_start(struct img
+ {
+ 	u32 val;
+ 
+-	val = spfi_readl(spfi, SPFI_CONTROL);
+-	val |= SPFI_CONTROL_SPFI_EN;
+-	spfi_writel(spfi, val, SPFI_CONTROL);
++	if (spfi->complete) {
++		val = spfi_readl(spfi, SPFI_CONTROL);
++		val |= SPFI_CONTROL_SPFI_EN;
++		spfi_writel(spfi, val, SPFI_CONTROL);
++	}
+ }
+ 
+ static inline void spfi_reset(struct img_spfi *spfi)
+@@ -130,12 +140,21 @@ static int spfi_wait_all_done(struct img
+ {
+ 	unsigned long timeout = jiffies + msecs_to_jiffies(50);
+ 
++	if (!(spfi->complete))
++		return 0;
++
+ 	while (time_before(jiffies, timeout)) {
+ 		u32 status = spfi_readl(spfi, SPFI_INTERRUPT_STATUS);
+ 
+ 		if (status & SPFI_INTERRUPT_ALLDONETRIG) {
+ 			spfi_writel(spfi, SPFI_INTERRUPT_ALLDONETRIG,
+ 				    SPFI_INTERRUPT_CLEAR);
++			/*
++			 * Disable SPFI for it not to interfere with
++			 * pending transactions
++			 */
++			spfi_writel(spfi, spfi_readl(spfi, SPFI_CONTROL)
++			& ~SPFI_CONTROL_SPFI_EN, SPFI_CONTROL);
+ 			return 0;
+ 		}
+ 		cpu_relax();
+@@ -441,9 +460,32 @@ static void img_spfi_config(struct spi_m
+ 			    struct spi_transfer *xfer)
+ {
+ 	struct img_spfi *spfi = spi_master_get_devdata(spi->master);
+-	u32 val, div;
++	u32 val, div, transact;
++	bool is_pending;
+ 
+ 	/*
++	 * For read or write transfers of less than 8 bytes (cmd = 1 byte,
++	 * addr up to 7 bytes), SPFI will be configured, but not enabled
++	 * (unless it is the last transfer in the queue).The transfer will
++	 * be enabled by the subsequent transfer.
++	 * A pending transfer is determined by the content of the
++	 * transaction register: if command part is set and tsize
++	 * is not
++	 */
++	transact = spfi_readl(spfi, SPFI_TRANSACTION);
++	is_pending = ((transact >> SPFI_TRANSACTION_CMD_SHIFT) &
++			SPFI_TRANSACTION_CMD_MASK) &&
++			(!((transact >> SPFI_TRANSACTION_TSIZE_SHIFT) &
++			SPFI_TRANSACTION_TSIZE_MASK));
++
++	/* If there are no pending transactions it's OK to soft reset */
++	if (!is_pending) {
++		/* Start the transaction from a known (reset) state */
++		spfi_reset(spfi);
++	}
++
++	/*
++	 * Before anything else, set up parameters.
+ 	 * output = spfi_clk * (BITCLK / 512), where BITCLK must be a
+ 	 * power of 2 up to 128
+ 	 */
+@@ -456,20 +498,52 @@ static void img_spfi_config(struct spi_m
+ 	val |= div << SPFI_DEVICE_PARAMETER_BITCLK_SHIFT;
+ 	spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(spi->chip_select));
+ 
+-	spfi_writel(spfi, xfer->len << SPFI_TRANSACTION_TSIZE_SHIFT,
+-		    SPFI_TRANSACTION);
++	if (!list_is_last(&xfer->transfer_list, &master->cur_msg->transfers) &&
++		/*
++		 * For duplex mode (both the tx and rx buffers are !NULL) the
++		 * CMD, ADDR, and DUMMY byte parts of the transaction register
++		 * should always be 0 and therefore the pending transfer
++		 * technique cannot be used.
++		 */
++		(xfer->tx_buf) && (!xfer->rx_buf) &&
++		(xfer->len <= SPFI_DATA_REQUEST_MAX_SIZE) && !is_pending) {
++		transact = (1 & SPFI_TRANSACTION_CMD_MASK) <<
++			SPFI_TRANSACTION_CMD_SHIFT;
++		transact |= ((xfer->len - 1) & SPFI_TRANSACTION_ADDR_MASK) <<
++			SPFI_TRANSACTION_ADDR_SHIFT;
++		spfi->complete = false;
++	} else {
++		spfi->complete = true;
++		if (is_pending) {
++			/* Keep setup from pending transfer */
++			transact |= ((xfer->len & SPFI_TRANSACTION_TSIZE_MASK) <<
++				SPFI_TRANSACTION_TSIZE_SHIFT);
++		} else {
++			transact = ((xfer->len & SPFI_TRANSACTION_TSIZE_MASK) <<
++				SPFI_TRANSACTION_TSIZE_SHIFT);
++		}
++	}
++	spfi_writel(spfi, transact, SPFI_TRANSACTION);
+ 
+ 	val = spfi_readl(spfi, SPFI_CONTROL);
+ 	val &= ~(SPFI_CONTROL_SEND_DMA | SPFI_CONTROL_GET_DMA);
+-	if (xfer->tx_buf)
++	/*
++	 * We set up send DMA for pending transfers also, as
++	 * those are always send transfers
++	 */
++	if ((xfer->tx_buf) || is_pending)
+ 		val |= SPFI_CONTROL_SEND_DMA;
+-	if (xfer->rx_buf)
++	if (xfer->tx_buf)
++		val |= SPFI_CONTROL_TX_RX;
++	if (xfer->rx_buf) {
+ 		val |= SPFI_CONTROL_GET_DMA;
++		val &= ~SPFI_CONTROL_TX_RX;
++	}
+ 	val &= ~(SPFI_CONTROL_TMODE_MASK << SPFI_CONTROL_TMODE_SHIFT);
+-	if (xfer->tx_nbits == SPI_NBITS_DUAL &&
++	if (xfer->tx_nbits == SPI_NBITS_DUAL ||
+ 	    xfer->rx_nbits == SPI_NBITS_DUAL)
+ 		val |= SPFI_CONTROL_TMODE_DUAL << SPFI_CONTROL_TMODE_SHIFT;
+-	else if (xfer->tx_nbits == SPI_NBITS_QUAD &&
++	else if (xfer->tx_nbits == SPI_NBITS_QUAD ||
+ 		 xfer->rx_nbits == SPI_NBITS_QUAD)
+ 		val |= SPFI_CONTROL_TMODE_QUAD << SPFI_CONTROL_TMODE_SHIFT;
+ 	val |= SPFI_CONTROL_SE;
diff --git a/target/linux/pistachio/patches-6.1/104-spi-img-spfi-use-device-0-configuration-for-all-devi.patch b/target/linux/pistachio/patches-6.1/104-spi-img-spfi-use-device-0-configuration-for-all-devi.patch
new file mode 100644
index 0000000000..2995b7dd88
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/104-spi-img-spfi-use-device-0-configuration-for-all-devi.patch
@@ -0,0 +1,64 @@
+From 905ee06a9966113fe51d6bad1819759cb30fd0bd Mon Sep 17 00:00:00 2001
+From: Ionela Voinescu <ionela.voinescu at imgtec.com>
+Date: Tue, 9 Feb 2016 10:18:31 +0000
+Subject: spi: img-spfi: use device 0 configuration for all devices
+
+Given that we control the chip select line externally
+we can use only one parameter register (device 0 parameter
+register) and one set of configuration bits (port configuration
+bits for device 0) for all devices (all chip select lines).
+
+Signed-off-by: Ionela Voinescu <ionela.voinescu at imgtec.com>
+---
+ drivers/spi/spi-img-spfi.c | 23 ++++++++++++++++-------
+ 1 file changed, 16 insertions(+), 7 deletions(-)
+
+--- a/drivers/spi/spi-img-spfi.c
++++ b/drivers/spi/spi-img-spfi.c
+@@ -429,18 +429,23 @@ static int img_spfi_prepare(struct spi_m
+ 	struct img_spfi *spfi = spi_master_get_devdata(master);
+ 	u32 val;
+ 
++	/*
++	 * The chip select line is controlled externally so
++	 * we can use the CS0 configuration for all devices
++	 */
+ 	val = spfi_readl(spfi, SPFI_PORT_STATE);
++
++	/* 0 for device selection */
+ 	val &= ~(SPFI_PORT_STATE_DEV_SEL_MASK <<
+ 		 SPFI_PORT_STATE_DEV_SEL_SHIFT);
+-	val |= msg->spi->chip_select << SPFI_PORT_STATE_DEV_SEL_SHIFT;
+ 	if (msg->spi->mode & SPI_CPHA)
+-		val |= SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
++		val |= SPFI_PORT_STATE_CK_PHASE(0);
+ 	else
+-		val &= ~SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
++		val &= ~SPFI_PORT_STATE_CK_PHASE(0);
+ 	if (msg->spi->mode & SPI_CPOL)
+-		val |= SPFI_PORT_STATE_CK_POL(msg->spi->chip_select);
++		val |= SPFI_PORT_STATE_CK_POL(0);
+ 	else
+-		val &= ~SPFI_PORT_STATE_CK_POL(msg->spi->chip_select);
++		val &= ~SPFI_PORT_STATE_CK_POL(0);
+ 	spfi_writel(spfi, val, SPFI_PORT_STATE);
+ 
+ 	return 0;
+@@ -492,11 +497,15 @@ static void img_spfi_config(struct spi_m
+ 	div = DIV_ROUND_UP(clk_get_rate(spfi->spfi_clk), xfer->speed_hz);
+ 	div = clamp(512 / (1 << get_count_order(div)), 1, 128);
+ 
+-	val = spfi_readl(spfi, SPFI_DEVICE_PARAMETER(spi->chip_select));
++	/*
++	 * The chip select line is controlled externally so
++	 * we can use the CS0 parameters for all devices
++	 */
++	val = spfi_readl(spfi, SPFI_DEVICE_PARAMETER(0));
+ 	val &= ~(SPFI_DEVICE_PARAMETER_BITCLK_MASK <<
+ 		 SPFI_DEVICE_PARAMETER_BITCLK_SHIFT);
+ 	val |= div << SPFI_DEVICE_PARAMETER_BITCLK_SHIFT;
+-	spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(spi->chip_select));
++	spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(0));
+ 
+ 	if (!list_is_last(&xfer->transfer_list, &master->cur_msg->transfers) &&
+ 		/*
diff --git a/target/linux/pistachio/patches-6.1/105-spi-img-spfi-RX-maximum-burst-size-for-DMA-is-8.patch b/target/linux/pistachio/patches-6.1/105-spi-img-spfi-RX-maximum-burst-size-for-DMA-is-8.patch
new file mode 100644
index 0000000000..5418503816
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/105-spi-img-spfi-RX-maximum-burst-size-for-DMA-is-8.patch
@@ -0,0 +1,59 @@
+From 56466f505f58f44b69feb7eaed3b506842800456 Mon Sep 17 00:00:00 2001
+From: Ionela Voinescu <ionela.voinescu at imgtec.com>
+Date: Tue, 1 Mar 2016 17:49:45 +0000
+Subject: spi: img-spfi: RX maximum burst size for DMA is 8
+
+The depth of the FIFOs is 16 bytes. The DMA request line is tied
+to the half full/empty (depending on the use of the TX or RX FIFO)
+threshold. For the TX FIFO, if you set a burst size of 8 (equal to
+half the depth) the first burst goes into FIFO without any issues,
+but due the latency involved (the time the data leaves  the DMA
+engine to the time it arrives at the FIFO), the DMA might trigger
+another burst of 8. But given that there is no space for 2 additonal
+bursts of 8, this would result in a failure. Therefore, we have to
+keep the burst size for TX to 4 to accomodate for an extra burst.
+
+For the read (RX) scenario, the DMA request line goes high when
+there is at least 8 entries in the FIFO (half full), and we can
+program the burst size to be 8 because the risk of accidental burst
+does not exist. The DMA engine will not trigger another read until
+the read data for all the burst it has sent out has been received.
+
+While here, move the burst size setting outside of the if/else branches
+as they have the same value for both 8 and 32 bit data widths.
+
+Signed-off-by: Ionela Voinescu <ionela.voinescu at imgtec.com>
+---
+ drivers/spi/spi-img-spfi.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/spi/spi-img-spfi.c
++++ b/drivers/spi/spi-img-spfi.c
+@@ -338,12 +338,11 @@ static int img_spfi_start_dma(struct spi
+ 		if (xfer->len % 4 == 0) {
+ 			rxconf.src_addr = spfi->phys + SPFI_RX_32BIT_VALID_DATA;
+ 			rxconf.src_addr_width = 4;
+-			rxconf.src_maxburst = 4;
+ 		} else {
+ 			rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA;
+ 			rxconf.src_addr_width = 1;
+-			rxconf.src_maxburst = 4;
+ 		}
++		rxconf.src_maxburst = 8;
+ 		dmaengine_slave_config(spfi->rx_ch, &rxconf);
+ 
+ 		rxdesc = dmaengine_prep_slave_sg(spfi->rx_ch, xfer->rx_sg.sgl,
+@@ -362,12 +361,11 @@ static int img_spfi_start_dma(struct spi
+ 		if (xfer->len % 4 == 0) {
+ 			txconf.dst_addr = spfi->phys + SPFI_TX_32BIT_VALID_DATA;
+ 			txconf.dst_addr_width = 4;
+-			txconf.dst_maxburst = 4;
+ 		} else {
+ 			txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA;
+ 			txconf.dst_addr_width = 1;
+-			txconf.dst_maxburst = 4;
+ 		}
++		txconf.dst_maxburst = 4;
+ 		dmaengine_slave_config(spfi->tx_ch, &txconf);
+ 
+ 		txdesc = dmaengine_prep_slave_sg(spfi->tx_ch, xfer->tx_sg.sgl,
diff --git a/target/linux/pistachio/patches-6.1/106-spi-img-spfi-finish-every-transfer-cleanly.patch b/target/linux/pistachio/patches-6.1/106-spi-img-spfi-finish-every-transfer-cleanly.patch
new file mode 100644
index 0000000000..ea1f9f28cc
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/106-spi-img-spfi-finish-every-transfer-cleanly.patch
@@ -0,0 +1,120 @@
+From 5fcca3fd4b621d7b5bdeca18d36dfc6ca6cfe383 Mon Sep 17 00:00:00 2001
+From: Ionela Voinescu <ionela.voinescu at imgtec.com>
+Date: Wed, 10 Aug 2016 11:42:26 +0100
+Subject: spi: img-spfi: finish every transfer cleanly
+
+Before this change, the interrupt status bit that signaled
+the end of a tranfers was cleared in the wait_all_done
+function. That functionality triggered issues for DMA
+duplex transactions where the wait function was called
+twice, in both the TX and RX callbacks.
+
+In order to fix the issue, clear all interrupt data bits
+at the end of a PIO transfer or at the end of both TX and RX
+duplex transfers, if the transfer is not a pending tranfer
+(command waiting for data). After that, the status register
+is checked for new incoming data or new data requests to be
+signaled. If SPFI finished cleanly, no new interrupt data
+bits should be set.
+
+Signed-off-by: Ionela Voinescu <ionela.voinescu at imgtec.com>
+---
+ drivers/spi/spi-img-spfi.c | 49 +++++++++++++++++++++++++++++++++-------------
+ 1 file changed, 35 insertions(+), 14 deletions(-)
+
+--- a/drivers/spi/spi-img-spfi.c
++++ b/drivers/spi/spi-img-spfi.c
+@@ -79,6 +79,14 @@
+ #define SPFI_INTERRUPT_SDE			BIT(1)
+ #define SPFI_INTERRUPT_SDTRIG			BIT(0)
+ 
++#define SPFI_INTERRUPT_DATA_BITS		(SPFI_INTERRUPT_SDHF |\
++						SPFI_INTERRUPT_SDFUL |\
++						SPFI_INTERRUPT_GDEX32BIT |\
++						SPFI_INTERRUPT_GDHF |\
++						SPFI_INTERRUPT_GDFUL |\
++						SPFI_INTERRUPT_ALLDONETRIG |\
++						SPFI_INTERRUPT_GDEX8BIT)
++
+ /*
+  * There are four parallel FIFOs of 16 bytes each.  The word buffer
+  * (*_32BIT_VALID_DATA) accesses all four FIFOs at once, resulting in an
+@@ -136,6 +144,23 @@ static inline void spfi_reset(struct img
+ 	spfi_writel(spfi, 0, SPFI_CONTROL);
+ }
+ 
++static inline void spfi_finish(struct img_spfi *spfi)
++{
++	if (!(spfi->complete))
++		return;
++
++	/* Clear data bits as all transfers(TX and RX) have finished */
++	spfi_writel(spfi, SPFI_INTERRUPT_DATA_BITS, SPFI_INTERRUPT_CLEAR);
++	if (spfi_readl(spfi, SPFI_INTERRUPT_STATUS) & SPFI_INTERRUPT_DATA_BITS) {
++		dev_err(spfi->dev, "SPFI did not finish transfer cleanly.\n");
++		spfi_reset(spfi);
++	}
++	/* Disable SPFI for it not to interfere with pending transactions */
++	spfi_writel(spfi,
++		    spfi_readl(spfi, SPFI_CONTROL) & ~SPFI_CONTROL_SPFI_EN,
++		    SPFI_CONTROL);
++}
++
+ static int spfi_wait_all_done(struct img_spfi *spfi)
+ {
+ 	unsigned long timeout = jiffies + msecs_to_jiffies(50);
+@@ -144,19 +169,9 @@ static int spfi_wait_all_done(struct img
+ 		return 0;
+ 
+ 	while (time_before(jiffies, timeout)) {
+-		u32 status = spfi_readl(spfi, SPFI_INTERRUPT_STATUS);
+-
+-		if (status & SPFI_INTERRUPT_ALLDONETRIG) {
+-			spfi_writel(spfi, SPFI_INTERRUPT_ALLDONETRIG,
+-				    SPFI_INTERRUPT_CLEAR);
+-			/*
+-			 * Disable SPFI for it not to interfere with
+-			 * pending transactions
+-			 */
+-			spfi_writel(spfi, spfi_readl(spfi, SPFI_CONTROL)
+-			& ~SPFI_CONTROL_SPFI_EN, SPFI_CONTROL);
++		if (spfi_readl(spfi, SPFI_INTERRUPT_STATUS) &
++		    SPFI_INTERRUPT_ALLDONETRIG)
+ 			return 0;
+-		}
+ 		cpu_relax();
+ 	}
+ 
+@@ -288,6 +303,8 @@ static int img_spfi_start_pio(struct spi
+ 	}
+ 
+ 	ret = spfi_wait_all_done(spfi);
++	spfi_finish(spfi);
++
+ 	if (ret < 0)
+ 		return ret;
+ 
+@@ -303,8 +320,10 @@ static void img_spfi_dma_rx_cb(void *dat
+ 
+ 	spin_lock_irqsave(&spfi->lock, flags);
+ 	spfi->rx_dma_busy = false;
+-	if (!spfi->tx_dma_busy)
++	if (!spfi->tx_dma_busy) {
++		spfi_finish(spfi);
+ 		spi_finalize_current_transfer(spfi->master);
++	}
+ 	spin_unlock_irqrestore(&spfi->lock, flags);
+ }
+ 
+@@ -317,8 +336,10 @@ static void img_spfi_dma_tx_cb(void *dat
+ 
+ 	spin_lock_irqsave(&spfi->lock, flags);
+ 	spfi->tx_dma_busy = false;
+-	if (!spfi->rx_dma_busy)
++	if (!spfi->rx_dma_busy) {
++		spfi_finish(spfi);
+ 		spi_finalize_current_transfer(spfi->master);
++	}
+ 	spin_unlock_irqrestore(&spfi->lock, flags);
+ }
+ 
diff --git a/target/linux/pistachio/patches-6.1/108-clk-pistachio-Fix-wrong-SDHost-card-speed.patch b/target/linux/pistachio/patches-6.1/108-clk-pistachio-Fix-wrong-SDHost-card-speed.patch
new file mode 100644
index 0000000000..6fddbe269a
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/108-clk-pistachio-Fix-wrong-SDHost-card-speed.patch
@@ -0,0 +1,49 @@
+From 3642843a06025ec333d7e92580cf52cb8db2a652 Mon Sep 17 00:00:00 2001
+From: Govindraj Raja <Govindraj.Raja at imgtec.com>
+Date: Fri, 8 Jan 2016 16:36:07 +0000
+Subject: clk: pistachio: Fix wrong SDHost card speed
+
+The SDHost currently clocks the card 4x slower than it
+should do, because there is fixed divide by 4 in the
+sdhost wrapper that is not present in the clock tree.
+To model this add a fixed divide by 4 clock node in
+the SDHost clock path.
+
+This will ensure the right clock frequency is selected when
+the mmc driver tries to configure frequency on card insert.
+
+Signed-off-by: Govindraj Raja <Govindraj.Raja at imgtec.com>
+---
+ drivers/clk/pistachio/clk-pistachio.c     | 3 ++-
+ include/dt-bindings/clock/pistachio-clk.h | 1 +
+ 2 files changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/clk/pistachio/clk-pistachio.c
++++ b/drivers/clk/pistachio/clk-pistachio.c
+@@ -41,7 +41,7 @@ static struct pistachio_gate pistachio_g
+ 	GATE(CLK_AUX_ADC_INTERNAL, "aux_adc_internal", "sys_internal_div",
+ 	     0x104, 22),
+ 	GATE(CLK_AUX_ADC, "aux_adc", "aux_adc_div", 0x104, 23),
+-	GATE(CLK_SD_HOST, "sd_host", "sd_host_div", 0x104, 24),
++	GATE(CLK_SD_HOST, "sd_host", "sd_host_div4", 0x104, 24),
+ 	GATE(CLK_BT, "bt", "bt_div", 0x104, 25),
+ 	GATE(CLK_BT_DIV4, "bt_div4", "bt_div4_div", 0x104, 26),
+ 	GATE(CLK_BT_DIV8, "bt_div8", "bt_div8_div", 0x104, 27),
+@@ -51,6 +51,7 @@ static struct pistachio_gate pistachio_g
+ static struct pistachio_fixed_factor pistachio_ffs[] __initdata = {
+ 	FIXED_FACTOR(CLK_WIFI_DIV4, "wifi_div4", "wifi_pll", 4),
+ 	FIXED_FACTOR(CLK_WIFI_DIV8, "wifi_div8", "wifi_pll", 8),
++	FIXED_FACTOR(CLK_SDHOST_DIV4, "sd_host_div4", "sd_host_div", 4),
+ };
+ 
+ static struct pistachio_div pistachio_divs[] __initdata = {
+--- a/include/dt-bindings/clock/pistachio-clk.h
++++ b/include/dt-bindings/clock/pistachio-clk.h
+@@ -18,6 +18,7 @@
+ /* Fixed-factor clocks */
+ #define CLK_WIFI_DIV4			16
+ #define CLK_WIFI_DIV8			17
++#define CLK_SDHOST_DIV4			18
+ 
+ /* Gate clocks */
+ #define CLK_MIPS			32
diff --git a/target/linux/pistachio/patches-6.1/109-MIPS-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch b/target/linux/pistachio/patches-6.1/109-MIPS-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch
new file mode 100644
index 0000000000..faba23c5f1
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/109-MIPS-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch
@@ -0,0 +1,47 @@
+From 981c1d416af45eff207227aec106381ac23aac99 Mon Sep 17 00:00:00 2001
+From: Ian Pozella <Ian.Pozella at imgtec.com>
+Date: Mon, 20 Feb 2017 10:00:52 +0000
+Subject: MIPS: DTS: img: marduk: switch mmc to 1 bit mode
+
+The mmc block in Pistachio allows 1 to 8 data bits to be used.
+Marduk uses 4 bits allowing the upper 4 bits to be allocated
+to the Mikrobus ports. However these bits are still connected
+internally meaning the mmc block recieves signals on all data lines
+and seems the internal HW CRC checks get corrupted by this erroneous
+data.
+
+We cannot control what data is sent on these lines because they go
+to external ports. 1 bit mode does not exhibit the issue hence the
+safe default is to use this. If a user knows that in their use case
+they will not use the upper bits then they can set to 4 bit mode in
+order to improve performance.
+
+Also make sure that the upper 4 bits don't get allocated to the mmc
+driver (the default is to assign all 8 pins) so they can be allocated
+to other drivers. Allocating all 4 despite setting 1 bit mode as this
+matches what is there in hardware.
+
+Signed-off-by: Ian Pozella <Ian.Pozella at imgtec.com>
+---
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -118,7 +118,7 @@
+ 
+ &sdhost {
+ 	status = "okay";
+-	bus-width = <4>;
++	bus-width = <1>;
+ 	disable-wp;
+ };
+ 
+@@ -128,6 +128,7 @@
+ 
+ &pin_sdhost_data {
+ 	drive-strength = <2>;
++	pins = "mfio17", "mfio18", "mfio19", "mfio20";
+ };
+ 
+ &pwm {
diff --git a/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch
new file mode 100644
index 0000000000..36f5331bd0
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch
@@ -0,0 +1,54 @@
+From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001
+From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
+Date: Sat, 25 Feb 2017 16:42:50 +0000
+Subject: mtd: nor: support mtd name from device tree
+
+Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
+---
+ drivers/mtd/spi-nor/spi-nor.c | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/drivers/mtd/spi-nor/core.c
++++ b/drivers/mtd/spi-nor/core.c
+@@ -3108,6 +3108,7 @@ int spi_nor_scan(struct spi_nor *nor, co
+ 	struct device *dev = nor->dev;
+ 	struct mtd_info *mtd = &nor->mtd;
+ 	struct device_node *np = spi_nor_get_flash_node(nor);
++	const char __maybe_unused *of_mtd_name = NULL;
+ 	int ret;
+ 	int i;
+ 
+@@ -3162,7 +3163,12 @@ int spi_nor_scan(struct spi_nor *nor, co
+ 	if (ret)
+ 		return ret;
+ 
+-	if (!mtd->name)
++#ifdef CONFIG_MTD_OF_PARTS
++	of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
++#endif
++	if (of_mtd_name)
++		mtd->name = of_mtd_name;
++	else if (!mtd->name)
+ 		mtd->name = dev_name(dev);
+ 	mtd->priv = nor;
+ 	mtd->type = MTD_NORFLASH;
+--- a/drivers/mtd/mtdcore.c
++++ b/drivers/mtd/mtdcore.c
+@@ -870,6 +870,17 @@ out_error:
+  */
+ static void mtd_set_dev_defaults(struct mtd_info *mtd)
+ {
++#ifdef CONFIG_MTD_OF_PARTS
++	const char __maybe_unused *of_mtd_name = NULL;
++	struct device_node *np;
++
++	np = mtd_get_of_node(mtd);
++	if (np && !mtd->name) {
++		of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
++		if (of_mtd_name)
++			mtd->name = of_mtd_name;
++	} else
++#endif
+ 	if (mtd->dev.parent) {
+ 		if (!mtd->owner && mtd->dev.parent->driver)
+ 			mtd->owner = mtd->dev.parent->driver->owner;
diff --git a/target/linux/pistachio/patches-6.1/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch b/target/linux/pistachio/patches-6.1/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch
new file mode 100644
index 0000000000..4b28f46833
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch
@@ -0,0 +1,30 @@
+From 0023c706f7e0f0f02bd48a63a2f3c04c839532ae Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Sat, 15 Aug 2020 16:04:53 +0200
+Subject: [PATCH 901/904] MIPS: DTS: img: marduk: Add SPI NAND flash
+
+Add Gigadevice GD5F4GQ4UCYIGT SPI NAND flash to the device tree.
+
+The NAND flash chip is connected with quad SPI, but reading currently
+fails in quad SPI mode.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -89,6 +89,12 @@
+ 		reg = <0>;
+ 		spi-max-frequency = <50000000>;
+ 	};
++
++	flash at 1 {
++		compatible = "spi-nand";
++		reg = <1>;
++		spi-max-frequency = <50000000>;
++	};
+ };
+ 
+ &uart0 {
diff --git a/target/linux/pistachio/patches-6.1/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch b/target/linux/pistachio/patches-6.1/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch
new file mode 100644
index 0000000000..d4c4ccac53
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch
@@ -0,0 +1,43 @@
+From b7700154d75e8d7c9a2022f09c2d5430137606fa Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Sat, 15 Aug 2020 16:05:25 +0200
+Subject: [PATCH 902/904] MIPS: DTS: img: marduk: Add Cascoda CA8210 6LoWPAN
+
+Add Cascoda CA8210 6LoWPAN controller to device tree.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 22 +++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -76,6 +76,28 @@
+ 	VDD-supply = <&internal_dac_supply>;
+ };
+ 
++&spfi0 {
++	status = "okay";
++	pinctrl-0 = <&spim0_pins>, <&spim0_cs0_alt_pin>, <&spim0_cs2_alt_pin>, <&spim0_cs3_alt_pin>, <&spim0_cs4_alt_pin>;
++	pinctrl-names = "default";
++
++	cs-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>, <&gpio0 2 GPIO_ACTIVE_HIGH>,
++			<&gpio1 12 GPIO_ACTIVE_HIGH>, <&gpio1 13 GPIO_ACTIVE_HIGH>;
++
++	ca8210: ca8210 at 0 {
++		status = "okay";
++		compatible = "cascoda,ca8210";
++		reg = <0>;
++		spi-max-frequency = <4000000>;
++		spi-cpol;
++		reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
++		irq-gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
++		extclock-enable;
++		extclock-freq = <16000000>;
++		extclock-gpio = <2>;
++	};
++};
++
+ &spfi1 {
+ 	status = "okay";
+ 
diff --git a/target/linux/pistachio/patches-6.1/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch b/target/linux/pistachio/patches-6.1/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch
new file mode 100644
index 0000000000..b1070c3d30
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch
@@ -0,0 +1,81 @@
+From ad4eba0c36ce8af6ab9ea1bc163e4c1ac7c271c3 Mon Sep 17 00:00:00 2001
+From: Hauke Mehrtens <hauke at hauke-m.de>
+Date: Sat, 15 Aug 2020 16:09:02 +0200
+Subject: [PATCH 903/904] MIPS: DTS: img: marduk: Add NXP SC16IS752IPW
+
+Add NXP SC16IS752IPW SPI-UART controller to device tree.
+
+This controller drives 2 UARTs and 7 LEDs on the board.
+
+Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
+---
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 51 +++++++++++++++++++++
+ 1 file changed, 51 insertions(+)
+
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -46,6 +46,46 @@
+ 		regulator-max-microvolt = <1800000>;
+ 	};
+ 
++	/* EXT clock from ca8210 is fed to sc16is752 */
++	ca8210_ext_clk: ca8210-ext-clk {
++		compatible = "fixed-clock";
++		#clock-cells = <0>;
++		clock-frequency = <16000000>;
++		clock-output-names = "ca8210_ext_clock";
++	};
++
++	gpioleds {
++		compatible = "gpio-leds";
++		user1 {
++			label = "marduk:red:user1";
++			gpios = <&sc16is752 0 GPIO_ACTIVE_LOW>;
++		};
++		user2 {
++			label = "marduk:red:user2";
++			gpios = <&sc16is752 1 GPIO_ACTIVE_LOW>;
++		};
++		user3 {
++			label = "marduk:red:user3";
++			gpios = <&sc16is752 2 GPIO_ACTIVE_LOW>;
++		};
++		user4 {
++			label = "marduk:red:user4";
++			gpios = <&sc16is752 3 GPIO_ACTIVE_LOW>;
++		};
++		user5 {
++			label = "marduk:red:user5";
++			gpios = <&sc16is752 4 GPIO_ACTIVE_LOW>;
++		};
++		user6 {
++			label = "marduk:red:user6";
++			gpios = <&sc16is752 5 GPIO_ACTIVE_LOW>;
++		};
++		user7 {
++			label = "marduk:red:user7";
++			gpios = <&sc16is752 6 GPIO_ACTIVE_LOW>;
++		};
++	};
++
+ 	led-controller {
+ 		compatible = "pwm-leds";
+ 
+@@ -96,6 +136,17 @@
+ 		extclock-freq = <16000000>;
+ 		extclock-gpio = <2>;
+ 	};
++
++	sc16is752: sc16is752 at 1 {
++		compatible = "nxp,sc16is752";
++		reg = <1>;
++		clocks = <&ca8210_ext_clk>;
++		spi-max-frequency = <4000000>;
++		interrupt-parent = <&gpio0>;
++		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
++		gpio-controller;
++		#gpio-cells = <2>;
++	};
+ };
+ 
+ &spfi1 {
diff --git a/target/linux/pistachio/patches-6.1/904-MIPS-DTS-img-marduk-Add-partition-name.patch b/target/linux/pistachio/patches-6.1/904-MIPS-DTS-img-marduk-Add-partition-name.patch
new file mode 100644
index 0000000000..490027a702
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/904-MIPS-DTS-img-marduk-Add-partition-name.patch
@@ -0,0 +1,27 @@
+From ff0e950b605047bf50d470023e0fb2fc2003a0f0 Mon Sep 17 00:00:00 2001
+From: Ian Pozella <Ian.Pozella at imgtec.com>
+Date: Mon, 20 Feb 2017 10:38:07 +0000
+Subject: [PATCH 904/904] MIPS: DTS: img: marduk: Add partition name
+
+Signed-off-by: Ian Pozella <Ian.Pozella at imgtec.com>
+---
+ arch/mips/boot/dts/img/pistachio_marduk.dts | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -161,12 +161,14 @@
+ 		compatible = "spansion,s25fl016k", "jedec,spi-nor";
+ 		reg = <0>;
+ 		spi-max-frequency = <50000000>;
++		linux,mtd-name = "spi-nor";
+ 	};
+ 
+ 	flash at 1 {
+ 		compatible = "spi-nand";
+ 		reg = <1>;
+ 		spi-max-frequency = <50000000>;
++		linux,mtd-name = "spi-nand";
+ 	};
+ };
+ 
diff --git a/target/linux/pistachio/patches-6.1/905-MIPS-DTS-img-marduk-Add-led-aliases.patch b/target/linux/pistachio/patches-6.1/905-MIPS-DTS-img-marduk-Add-led-aliases.patch
new file mode 100644
index 0000000000..8c03ddeea2
--- /dev/null
+++ b/target/linux/pistachio/patches-6.1/905-MIPS-DTS-img-marduk-Add-led-aliases.patch
@@ -0,0 +1,27 @@
+--- a/arch/mips/boot/dts/img/pistachio_marduk.dts
++++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
+@@ -19,6 +19,11 @@
+ 		ethernet0 = &enet;
+ 		spi0 = &spfi0;
+ 		spi1 = &spfi1;
++
++		led-boot = &led_heartbeat;
++		led-failsafe = &led_heartbeat;
++		led-running = &led_heartbeat;
++		led-upgrade = &led_heartbeat;
+ 	};
+ 
+ 	chosen {
+@@ -89,11 +94,10 @@
+ 	led-controller {
+ 		compatible = "pwm-leds";
+ 
+-		led-1 {
++		led_heartbeat: heartbeat {
+ 			label = "marduk:red:heartbeat";
+ 			pwms = <&pwm 3 300000>;
+ 			max-brightness = <255>;
+-			linux,default-trigger = "heartbeat";
+ 		};
+ 	};
+ 



From lede-commits at lists.infradead.org  Fri Apr  5 08:32:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 11:32:45 -0400
Subject: [openwrt/openwrt]  ipq806x: 6.6: refresh patches
In-Reply-To: <171233116515.821645.10795669143967316273@git-01.infra.openwrt.org>
References: <171233116515.821645.10795669143967316273@git-01.infra.openwrt.org>
Message-ID: <mailman.24158.1712331176.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4d3f41130e3c681d40c3599653a17bbff5d00306

commit 4d3f41130e3c681d40c3599653a17bbff5d00306
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Apr 5 14:58:33 2024 +0200

    ipq806x: 6.6: refresh patches
    
    Refresh patches for kernel 6.6.23 with make target/linux/refresh.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch b/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
index 1832b6bead..969f8b9ef3 100644
--- a/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
+++ b/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
@@ -177,7 +177,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  #include <linux/bootconfig.h>
  #include <linux/console.h>
  #include <linux/nmi.h>
-@@ -929,6 +930,17 @@ void start_kernel(void)
+@@ -930,6 +931,17 @@ void start_kernel(void)
  	pr_notice("Kernel command line: %s\n", saved_command_line);
  	/* parameters may set static keys */
  	jump_label_init();



From lede-commits at lists.infradead.org  Fri Apr  5 16:00:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 19:00:20 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.25
In-Reply-To: <171235801909.1996240.5612520348098040823@git-01.infra.openwrt.org>
References: <171235801909.1996240.5612520348098040823@git-01.infra.openwrt.org>
Message-ID: <mailman.24263.1712358023.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e6f7e9dca916626a6d5dd22835d3c91be052f708

commit e6f7e9dca916626a6d5dd22835d3c91be052f708
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Thu Apr 4 15:16:38 2024 -0400

    kernel: bump 6.6 to 6.6.25
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.25
    
    All patches automatically rebased.
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000
    Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6 | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index d2c082c447..5c67d52577 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .24
-LINUX_KERNEL_HASH-6.6.24 = 3e9ef879dae8319338eb0dc2d2c2025c13257fdeddf6245c000cb5a85a8af6f5
+LINUX_VERSION-6.6 = .25
+LINUX_KERNEL_HASH-6.6.25 = 99d210be87908233a55b0fadc0dccd3b95926c0651b6b82e37350b2029de1f44



From lede-commits at lists.infradead.org  Fri Apr  5 16:00:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 05 Apr 2024 19:00:19 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.24
In-Reply-To: <171235801909.1996240.5612520348098040823@git-01.infra.openwrt.org>
References: <171235801909.1996240.5612520348098040823@git-01.infra.openwrt.org>
Message-ID: <mailman.24264.1712358023.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5c2eca676a8b08ad0cea3b80a32ae55a628477e7

commit 5c2eca676a8b08ad0cea3b80a32ae55a628477e7
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Wed Apr 3 15:06:44 2024 -0400

    kernel: bump 6.6 to 6.6.24
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.24
    
    Removed upstreamed:
            generic/backport-6.6/838-v6.9-leds-trigger-netdev-Fix-kernel-panic-on-interface-re.patch[1]
            generic/backport-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch[2]
            mediatek/patches-6.6/831-thermal-drivers-mediatek-Fix-control-buffer-enablement-on-MT7896.patch[3]
    
    Removed:
            ipq40xx/patches-6.6/110-mtd-limit-OTP-nvmem-to-non-nand-devices.patch[4]
    
    All other patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=10f2af1af8ab8a7064f193446abd5579d3def7e3
    2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=9c74507e6c4382d12a5e418742b81fd441f03313
    3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.24&id=fe750e2744428be6aec7395b13df3b34381ce6b6
    4. Acknowledgment to @DragonBlurp for pointing out the redundancy of this patch. https://github.com/openwrt/openwrt/commit/dd78a59cd7b029560b33cb3ac0e1aa8b747bd807
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6                                 |  4 +-
 ...xplicit-config-option-to-read-old-syntax-.patch |  2 +-
 ...r-netdev-Fix-kernel-panic-on-interface-re.patch | 55 --------------------
 ...81-mtd-spinand-Add-support-for-5-byte-IDs.patch | 27 ----------
 .../780-usb-net-MeigLink_modem_support.patch       |  4 +-
 .../linux/generic/hack-6.6/902-debloat_proc.patch  |  2 +-
 ...0-14-mmc-block-set-fwnode-of-disk-devices.patch |  4 +-
 .../450-15-mmc-block-set-GENHD_FL_NVMEM.patch      |  2 +-
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |  2 +-
 .../generic/pending-6.6/834-ledtrig-libata.patch   |  2 +-
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |  2 +-
 .../patches-6.6/410-bt-mtk-serial-fix.patch        |  2 +-
 ...k-Fix-control-buffer-enablement-on-MT7896.patch | 59 ----------------------
 ...7-clk-qcom-gcc-ipq6018-add-QUP6-I2C-clock.patch |  4 +-
 ...c-ipq6018-add-qdss_at-clock-needed-for-wi.patch |  4 +-
 ...c-ipq8074-rework-nss_port5-6-clock-to-mul.patch |  8 +--
 .../0118-clk-qcom-Add-WCSSAON-reset.patch          |  2 +-
 ...q6018-workaround-networking-clock-parenti.patch |  2 +-
 18 files changed, 23 insertions(+), 164 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 872a5b2aac..d2c082c447 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .23
-LINUX_KERNEL_HASH-6.6.23 = 200fd119cb9ef06bcedcdb52be00ba443163eab154295c5831fed9a12211a8b9
+LINUX_VERSION-6.6 = .24
+LINUX_KERNEL_HASH-6.6.24 = 3e9ef879dae8319338eb0dc2d2c2025c13257fdeddf6245c000cb5a85a8af6f5
diff --git a/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch b/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
index 80c9836010..12c77c17af 100644
--- a/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
+++ b/target/linux/generic/backport-6.6/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
@@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	imx_ocotp_nvmem_config.priv = priv;
 --- a/drivers/nvmem/meson-efuse.c
 +++ b/drivers/nvmem/meson-efuse.c
-@@ -93,6 +93,7 @@ static int meson_efuse_probe(struct plat
+@@ -74,6 +74,7 @@ static int meson_efuse_probe(struct plat
  
  	econfig->dev = dev;
  	econfig->name = dev_name(dev);
diff --git a/target/linux/generic/backport-6.6/838-v6.9-leds-trigger-netdev-Fix-kernel-panic-on-interface-re.patch b/target/linux/generic/backport-6.6/838-v6.9-leds-trigger-netdev-Fix-kernel-panic-on-interface-re.patch
deleted file mode 100644
index 8d391678ff..0000000000
--- a/target/linux/generic/backport-6.6/838-v6.9-leds-trigger-netdev-Fix-kernel-panic-on-interface-re.patch
+++ /dev/null
@@ -1,55 +0,0 @@
-From 12ce20e02e532f101b725d71c52a36c5cc8ad1e6 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sun, 4 Feb 2024 00:54:01 +0100
-Subject: [PATCH] leds: trigger: netdev: Fix kernel panic on interface rename
- trig notify
-
-Commit d5e01266e7f5 ("leds: trigger: netdev: add additional specific link
-speed mode") in the various changes, reworked the way to set the LINKUP
-mode in commit cee4bd16c319 ("leds: trigger: netdev: Recheck
-NETDEV_LED_MODE_LINKUP on dev rename") and moved it to a generic function.
-
-This changed the logic where, in the previous implementation the dev
-from the trigger event was used to check if the carrier was ok, but in
-the new implementation with the generic function, the dev in
-trigger_data is used instead.
-
-This is problematic and cause a possible kernel panic due to the fact
-that the dev in the trigger_data still reference the old one as the
-new one (passed from the trigger event) still has to be hold and saved
-in the trigger_data struct (done in the NETDEV_REGISTER case).
-
-On calling of get_device_state(), an invalid net_dev is used and this
-cause a kernel panic.
-
-To handle this correctly, move the call to get_device_state() after the
-new net_dev is correctly set in trigger_data (in the NETDEV_REGISTER
-case) and correctly parse the new dev.
-
-Fixes: d5e01266e7f5 ("leds: trigger: netdev: add additional specific link speed mode")
-Cc: stable at vger.kernel.org
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
-Reviewed-by: Andrew Lunn <andrew at lunn.ch>
-Link: https://lore.kernel.org/r/20240203235413.1146-1-ansuelsmth at gmail.com
-Signed-off-by: Lee Jones <lee at kernel.org>
----
- drivers/leds/trigger/ledtrig-netdev.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/leds/trigger/ledtrig-netdev.c
-+++ b/drivers/leds/trigger/ledtrig-netdev.c
-@@ -489,12 +489,12 @@ static int netdev_trig_notify(struct not
- 	trigger_data->duplex = DUPLEX_UNKNOWN;
- 	switch (evt) {
- 	case NETDEV_CHANGENAME:
--		get_device_state(trigger_data);
--		fallthrough;
- 	case NETDEV_REGISTER:
- 		dev_put(trigger_data->net_dev);
- 		dev_hold(dev);
- 		trigger_data->net_dev = dev;
-+		if (evt == NETDEV_CHANGENAME)
-+			get_device_state(trigger_data);
- 		break;
- 	case NETDEV_UNREGISTER:
- 		dev_put(trigger_data->net_dev);
diff --git a/target/linux/generic/backport-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch b/target/linux/generic/backport-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch
deleted file mode 100644
index 0bec36cb8f..0000000000
--- a/target/linux/generic/backport-6.6/981-mtd-spinand-Add-support-for-5-byte-IDs.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From: Ezra Buehler <ezra.buehler at husqvarnagroup.com>
-
-E.g. ESMT chips will return an identification code with a length of 5
-bytes. In order to prevent ambiguity, flash chips would actually need to
-return IDs that are up to 17 or more bytes long due to JEDEC's
-continuation scheme. I understand that if a manufacturer ID is located
-in bank N of JEDEC's database (there are currently 16 banks), N - 1
-continuation codes (7Fh) need to be added to the identification code
-(comprising of manufacturer ID and device ID). However, most flash chip
-manufacturers don't seem to implement this (correctly).
-
-Signed-off-by: Ezra Buehler <ezra.buehler at husqvarnagroup.com>
----
- include/linux/mtd/spinand.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/include/linux/mtd/spinand.h
-+++ b/include/linux/mtd/spinand.h
-@@ -169,7 +169,7 @@
- struct spinand_op;
- struct spinand_device;
- 
--#define SPINAND_MAX_ID_LEN	4
-+#define SPINAND_MAX_ID_LEN	5
- /*
-  * For erase, write and read operation, we got the following timings :
-  * tBERS (erase) 1ms to 4ms
diff --git a/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch
index 794a28b716..9b2ecba1c3 100644
--- a/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch
@@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1147,6 +1152,11 @@ static const struct usb_device_id option
+@@ -1152,6 +1157,11 @@ static const struct usb_device_id option
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  	  .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  	/* Quectel products using Qualcomm vendor ID */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1188,6 +1198,11 @@ static const struct usb_device_id option
+@@ -1193,6 +1203,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/hack-6.6/902-debloat_proc.patch b/target/linux/generic/hack-6.6/902-debloat_proc.patch
index ea9c20c1ab..6b59fd674f 100644
--- a/target/linux/generic/hack-6.6/902-debloat_proc.patch
+++ b/target/linux/generic/hack-6.6/902-debloat_proc.patch
@@ -385,7 +385,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/net/ipv4/proc.c
 +++ b/net/ipv4/proc.c
-@@ -556,5 +556,8 @@ static __net_initdata struct pernet_oper
+@@ -557,5 +557,8 @@ static __net_initdata struct pernet_oper
  
  int __init ip_misc_proc_init(void)
  {
diff --git a/target/linux/generic/pending-6.6/450-14-mmc-block-set-fwnode-of-disk-devices.patch b/target/linux/generic/pending-6.6/450-14-mmc-block-set-fwnode-of-disk-devices.patch
index 27875b8c2c..d6b3df3aa0 100644
--- a/target/linux/generic/pending-6.6/450-14-mmc-block-set-fwnode-of-disk-devices.patch
+++ b/target/linux/generic/pending-6.6/450-14-mmc-block-set-fwnode-of-disk-devices.patch
@@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mmc/core/block.c
 +++ b/drivers/mmc/core/block.c
-@@ -2461,6 +2461,8 @@ static struct mmc_blk_data *mmc_blk_allo
+@@ -2463,6 +2463,8 @@ static struct mmc_blk_data *mmc_blk_allo
  					      int area_type,
  					      unsigned int part_type)
  {
@@ -23,7 +23,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	struct mmc_blk_data *md;
  	int devidx, ret;
  	char cap_str[10];
-@@ -2557,6 +2559,13 @@ static struct mmc_blk_data *mmc_blk_allo
+@@ -2559,6 +2561,13 @@ static struct mmc_blk_data *mmc_blk_allo
  
  	blk_queue_write_cache(md->queue.queue, cache_enabled, fua_enabled);
  
diff --git a/target/linux/generic/pending-6.6/450-15-mmc-block-set-GENHD_FL_NVMEM.patch b/target/linux/generic/pending-6.6/450-15-mmc-block-set-GENHD_FL_NVMEM.patch
index 308910859b..d4c3cd8df8 100644
--- a/target/linux/generic/pending-6.6/450-15-mmc-block-set-GENHD_FL_NVMEM.patch
+++ b/target/linux/generic/pending-6.6/450-15-mmc-block-set-GENHD_FL_NVMEM.patch
@@ -12,7 +12,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mmc/core/block.c
 +++ b/drivers/mmc/core/block.c
-@@ -2515,6 +2515,7 @@ static struct mmc_blk_data *mmc_blk_allo
+@@ -2517,6 +2517,7 @@ static struct mmc_blk_data *mmc_blk_allo
  	md->disk->major	= MMC_BLOCK_MAJOR;
  	md->disk->minors = perdev_minors;
  	md->disk->first_minor = devidx * perdev_minors;
diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 02aa8c3340..c3d92da5f9 100644
--- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -8214,7 +8214,7 @@ static int nft_register_flowtable_net_ho
+@@ -8221,7 +8221,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-6.6/834-ledtrig-libata.patch b/target/linux/generic/pending-6.6/834-ledtrig-libata.patch
index 2173f666df..f5cd5e4a56 100644
--- a/target/linux/generic/pending-6.6/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-6.6/834-ledtrig-libata.patch
@@ -132,7 +132,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -874,6 +877,12 @@ struct ata_port {
+@@ -875,6 +878,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index e07cee30c7..9257f916ca 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4627,6 +4627,9 @@ enum skb_ext_id {
+@@ -4637,6 +4637,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif
diff --git a/target/linux/mediatek/patches-6.6/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-6.6/410-bt-mtk-serial-fix.patch
index f377487975..53e92a6dd3 100644
--- a/target/linux/mediatek/patches-6.6/410-bt-mtk-serial-fix.patch
+++ b/target/linux/mediatek/patches-6.6/410-bt-mtk-serial-fix.patch
@@ -19,7 +19,7 @@
  	},
  	[PORT_NPCM] = {
  		.name		= "Nuvoton 16550",
-@@ -2780,6 +2780,11 @@ serial8250_do_set_termios(struct uart_po
+@@ -2774,6 +2774,11 @@ serial8250_do_set_termios(struct uart_po
  	unsigned long flags;
  	unsigned int baud, quot, frac = 0;
  
diff --git a/target/linux/mediatek/patches-6.6/831-thermal-drivers-mediatek-Fix-control-buffer-enablement-on-MT7896.patch b/target/linux/mediatek/patches-6.6/831-thermal-drivers-mediatek-Fix-control-buffer-enablement-on-MT7896.patch
deleted file mode 100644
index bf9fa57113..0000000000
--- a/target/linux/mediatek/patches-6.6/831-thermal-drivers-mediatek-Fix-control-buffer-enablement-on-MT7896.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From patchwork Thu Sep  7 11:20:18 2023
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 7bit
-X-Patchwork-Submitter: Frank Wunderlich <linux at fw-web.de>
-X-Patchwork-Id: 13376356
-From: Frank Wunderlich <linux at fw-web.de>
-To: linux-mediatek at lists.infradead.org
-Subject: [PATCH] thermal/drivers/mediatek: Fix control buffer enablement on
- MT7896
-Date: Thu,  7 Sep 2023 13:20:18 +0200
-Message-Id: <20230907112018.52811-1-linux at fw-web.de>
-X-Mailer: git-send-email 2.34.1
-MIME-Version: 1.0
-X-Mail-ID: e7eeb8e1-00de-41f6-a5df-ce2e9164136e
-X-BeenThere: linux-mediatek at lists.infradead.org
-X-Mailman-Version: 2.1.34
-Precedence: list
-List-Id: <linux-mediatek.lists.infradead.org>
-Cc: Daniel Lezcano <daniel.lezcano at linaro.org>,
- "Rafael J. Wysocki" <rafael at kernel.org>, linux-pm at vger.kernel.org,
- Amit Kucheria <amitk at kernel.org>, Daniel Golle <daniel at makrotopia.org>,
- stable at vger.kernel.org, linux-kernel at vger.kernel.org,
- Matthias Brugger <matthias.bgg at gmail.com>, Zhang Rui <rui.zhang at intel.com>,
- linux-arm-kernel at lists.infradead.org,
- AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Sender: "Linux-mediatek" <linux-mediatek-bounces at lists.infradead.org>
-
-From: Frank Wunderlich <frank-w at public-files.de>
-
-Reading thermal sensor on mt7986 devices returns invalid temperature:
-
-bpi-r3 ~ # cat /sys/class/thermal/thermal_zone0/temp
- -274000
-
-Fix this by adding missing members in mtk_thermal_data struct which were
-used in mtk_thermal_turn_on_buffer after commit 33140e668b10.
-
-Cc: stable at vger.kernel.org
-Fixes: 33140e668b10 ("thermal/drivers/mediatek: Control buffer enablement tweaks")
-Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
-Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Reviewed-by: Markus Schneider-Pargmann <msp at baylibre.com>
----
- drivers/thermal/mediatek/auxadc_thermal.c | 3 +++
- 1 file changed, 3 insertions(+)
-
---- a/drivers/thermal/mediatek/auxadc_thermal.c
-+++ b/drivers/thermal/mediatek/auxadc_thermal.c
-@@ -690,6 +690,9 @@ static const struct mtk_thermal_data mt7
- 	.adcpnp = mt7986_adcpnp,
- 	.sensor_mux_values = mt7986_mux_values,
- 	.version = MTK_THERMAL_V3,
-+	.apmixed_buffer_ctl_reg = APMIXED_SYS_TS_CON1,
-+	.apmixed_buffer_ctl_mask = GENMASK(31, 6) | BIT(3),
-+	.apmixed_buffer_ctl_set = BIT(0),
- };
- 
- static bool mtk_thermal_temp_is_valid(int temp)
diff --git a/target/linux/qualcommax/patches-6.6/0053-v6.7-clk-qcom-gcc-ipq6018-add-QUP6-I2C-clock.patch b/target/linux/qualcommax/patches-6.6/0053-v6.7-clk-qcom-gcc-ipq6018-add-QUP6-I2C-clock.patch
index caef49cfaf..eb68b87640 100644
--- a/target/linux/qualcommax/patches-6.6/0053-v6.7-clk-qcom-gcc-ipq6018-add-QUP6-I2C-clock.patch
+++ b/target/linux/qualcommax/patches-6.6/0053-v6.7-clk-qcom-gcc-ipq6018-add-QUP6-I2C-clock.patch
@@ -20,7 +20,7 @@ Signed-off-by: Bjorn Andersson <andersson at kernel.org>
 
 --- a/drivers/clk/qcom/gcc-ipq6018.c
 +++ b/drivers/clk/qcom/gcc-ipq6018.c
-@@ -2119,6 +2119,26 @@ static struct clk_branch gcc_blsp1_qup5_
+@@ -2121,6 +2121,26 @@ static struct clk_branch gcc_blsp1_qup5_
  	},
  };
  
@@ -47,7 +47,7 @@ Signed-off-by: Bjorn Andersson <andersson at kernel.org>
  static struct clk_branch gcc_blsp1_qup6_spi_apps_clk = {
  	.halt_reg = 0x0700c,
  	.clkr = {
-@@ -4275,6 +4295,7 @@ static struct clk_regmap *gcc_ipq6018_cl
+@@ -4277,6 +4297,7 @@ static struct clk_regmap *gcc_ipq6018_cl
  	[GCC_BLSP1_QUP4_SPI_APPS_CLK] = &gcc_blsp1_qup4_spi_apps_clk.clkr,
  	[GCC_BLSP1_QUP5_I2C_APPS_CLK] = &gcc_blsp1_qup5_i2c_apps_clk.clkr,
  	[GCC_BLSP1_QUP5_SPI_APPS_CLK] = &gcc_blsp1_qup5_spi_apps_clk.clkr,
diff --git a/target/linux/qualcommax/patches-6.6/0060-v6.9-clk-qcom-gcc-ipq6018-add-qdss_at-clock-needed-for-wi.patch b/target/linux/qualcommax/patches-6.6/0060-v6.9-clk-qcom-gcc-ipq6018-add-qdss_at-clock-needed-for-wi.patch
index 8b455532a1..5f0af1352a 100644
--- a/target/linux/qualcommax/patches-6.6/0060-v6.9-clk-qcom-gcc-ipq6018-add-qdss_at-clock-needed-for-wi.patch
+++ b/target/linux/qualcommax/patches-6.6/0060-v6.9-clk-qcom-gcc-ipq6018-add-qdss_at-clock-needed-for-wi.patch
@@ -17,7 +17,7 @@ Signed-off-by: Bjorn Andersson <andersson at kernel.org>
 
 --- a/drivers/clk/qcom/gcc-ipq6018.c
 +++ b/drivers/clk/qcom/gcc-ipq6018.c
-@@ -3522,6 +3522,22 @@ static struct clk_branch gcc_prng_ahb_cl
+@@ -3524,6 +3524,22 @@ static struct clk_branch gcc_prng_ahb_cl
  	},
  };
  
@@ -40,7 +40,7 @@ Signed-off-by: Bjorn Andersson <andersson at kernel.org>
  static struct clk_branch gcc_qdss_dap_clk = {
  	.halt_reg = 0x29084,
  	.clkr = {
-@@ -4361,6 +4377,7 @@ static struct clk_regmap *gcc_ipq6018_cl
+@@ -4363,6 +4379,7 @@ static struct clk_regmap *gcc_ipq6018_cl
  	[GCC_SYS_NOC_PCIE0_AXI_CLK] = &gcc_sys_noc_pcie0_axi_clk.clkr,
  	[GCC_PCIE0_PIPE_CLK] = &gcc_pcie0_pipe_clk.clkr,
  	[GCC_PRNG_AHB_CLK] = &gcc_prng_ahb_clk.clkr,
diff --git a/target/linux/qualcommax/patches-6.6/0101-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch b/target/linux/qualcommax/patches-6.6/0101-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch
index af1e44a6af..2f915e2a29 100644
--- a/target/linux/qualcommax/patches-6.6/0101-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch
+++ b/target/linux/qualcommax/patches-6.6/0101-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch
@@ -23,7 +23,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/clk/qcom/gcc-ipq8074.c
 +++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -1675,13 +1675,21 @@ static struct clk_regmap_div nss_port4_t
+@@ -1677,13 +1677,21 @@ static struct clk_regmap_div nss_port4_t
  	},
  };
  
@@ -49,7 +49,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	F(156250000, P_UNIPHY1_RX, 2, 0, 0),
  	F(312500000, P_UNIPHY1_RX, 1, 0, 0),
  	{ }
-@@ -1737,13 +1745,21 @@ static struct clk_regmap_div nss_port5_r
+@@ -1739,13 +1747,21 @@ static struct clk_regmap_div nss_port5_r
  	},
  };
  
@@ -75,7 +75,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	F(156250000, P_UNIPHY1_TX, 2, 0, 0),
  	F(312500000, P_UNIPHY1_TX, 1, 0, 0),
  	{ }
-@@ -1799,13 +1815,21 @@ static struct clk_regmap_div nss_port5_t
+@@ -1801,13 +1817,21 @@ static struct clk_regmap_div nss_port5_t
  	},
  };
  
@@ -101,7 +101,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	F(156250000, P_UNIPHY2_RX, 2, 0, 0),
  	F(312500000, P_UNIPHY2_RX, 1, 0, 0),
  	{ }
-@@ -1856,13 +1880,21 @@ static struct clk_regmap_div nss_port6_r
+@@ -1858,13 +1882,21 @@ static struct clk_regmap_div nss_port6_r
  	},
  };
  
diff --git a/target/linux/qualcommax/patches-6.6/0118-clk-qcom-Add-WCSSAON-reset.patch b/target/linux/qualcommax/patches-6.6/0118-clk-qcom-Add-WCSSAON-reset.patch
index 9fa0243f15..7938b1823f 100644
--- a/target/linux/qualcommax/patches-6.6/0118-clk-qcom-Add-WCSSAON-reset.patch
+++ b/target/linux/qualcommax/patches-6.6/0118-clk-qcom-Add-WCSSAON-reset.patch
@@ -15,7 +15,7 @@ Acked-by: Stephen Boyd <sboyd at kernel.org>
 
 --- a/drivers/clk/qcom/gcc-ipq8074.c
 +++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -4710,6 +4710,7 @@ static const struct qcom_reset_map gcc_i
+@@ -4712,6 +4712,7 @@ static const struct qcom_reset_map gcc_i
  	[GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = BIT(27) | GENMASK(9, 8) },
  	[GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = BIT(28) | GENMASK(11, 10) },
  	[GCC_NSSPORT6_RESET] = { .reg = 0x68014, .bitmask = BIT(29) | GENMASK(13, 12) },
diff --git a/target/linux/qualcommax/patches-6.6/0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch b/target/linux/qualcommax/patches-6.6/0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch
index 9172a02b08..2e7a56f728 100644
--- a/target/linux/qualcommax/patches-6.6/0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch
+++ b/target/linux/qualcommax/patches-6.6/0904-clk-qcom-ipq6018-workaround-networking-clock-parenti.patch
@@ -92,7 +92,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  };
  
  static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
-@@ -1897,12 +1897,11 @@ static const struct freq_tbl ftbl_ubi32_
+@@ -1899,12 +1899,11 @@ static const struct freq_tbl ftbl_ubi32_
  	{ }
  };
  



From lede-commits at lists.infradead.org  Fri Apr  5 23:02:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 02:02:57 -0400
Subject: [openwrt/openwrt]  tools/mkimage: update to v2024.04
In-Reply-To: <171238337770.2927518.4479955828794604861@git-01.infra.openwrt.org>
References: <171238337770.2927518.4479955828794604861@git-01.infra.openwrt.org>
Message-ID: <mailman.24283.1712383384.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8d934c11968de49ad17bc62366a88230e47b4f56

commit 8d934c11968de49ad17bc62366a88230e47b4f56
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Fri Apr 5 12:18:41 2024 +0200

    tools/mkimage: update to v2024.04
    
    Update to latest version.
    
    Refresh patches:
    - 030-allow-to-use-different-magic.patch
    - 095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 tools/mkimage/Makefile                                             | 4 ++--
 tools/mkimage/patches/030-allow-to-use-different-magic.patch       | 4 ++--
 tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile
index ae744f9bf3..6d2cc5f764 100644
--- a/tools/mkimage/Makefile
+++ b/tools/mkimage/Makefile
@@ -7,14 +7,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mkimage
-PKG_VERSION:=2024.01
+PKG_VERSION:=2024.04
 
 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
 	https://mirror.cyberbits.eu/u-boot \
 	https://ftp.denx.de/pub/u-boot \
 	ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3
+PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
 
diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
index f2f57965f6..bcbdc4d6cd 100644
--- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch
+++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
@@ -24,7 +24,7 @@ This patch makes it possible to set a custom image magic.
  		"          -a ==> set load address to 'addr' (hex)\n"
  		"          -e ==> set entry point to 'ep' (hex)\n"
  		"          -n ==> set image name to 'name'\n"
-@@ -159,7 +161,7 @@ static int add_content(int type, const c
+@@ -160,7 +162,7 @@ static int add_content(int type, const c
  }
  
  static const char optstring[] =
@@ -33,7 +33,7 @@ This patch makes it possible to set a custom image magic.
  
  static const struct option longopts[] = {
  	{ "load-address", required_argument, NULL, 'a' },
-@@ -302,6 +304,14 @@ static void process_args(int argc, char
+@@ -303,6 +305,14 @@ static void process_args(int argc, char
  		case 'l':
  			params.lflag = 1;
  			break;
diff --git a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
index f2e3b9b053..ed6824b11a 100644
--- a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
+++ b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
@@ -14,7 +14,7 @@ https://github.com/u-boot/u-boot/commit/3f04db891a353f4b127ed57279279f851c6b4917
 
 --- a/tools/Kconfig
 +++ b/tools/Kconfig
-@@ -31,7 +31,7 @@ config TOOLS_FIT
+@@ -36,7 +36,7 @@ config TOOLS_FIT
  	  Enable FIT support in the tools builds.
  
  config TOOLS_FIT_FULL_CHECK



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:32 -0400
Subject: [openwrt/openwrt]  tools: rework tools-core dependecies
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24298.1712395471.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e09d3fd2904a35beaf5e27e81538cd8061b0ef36

commit e09d3fd2904a35beaf5e27e81538cd8061b0ef36
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Wed Apr 3 12:17:21 2024 -0700

    tools: rework tools-core dependecies
    
    ZSTD and libdeflate do not depend on SED nor flock, so instead of the whole
    for loop that will filter 2 out of 4 core packages just specify that patch
    and tar depend on sed explicitly.
    
    ZSTD now depends on libdeflate since libdeflate-gzip will then be used to
    unpack ZSTD as well as most tool archives.
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/Makefile | 6 ++++--
 1 file changed, 4 insertions(+), 2 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 445101c012..f60a458f98 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -164,8 +164,10 @@ tools-core += zstd
 $(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(patsubst %,$(curdir)/%/compile,$(tools-core))))
 tools-y += $(tools-core)
 
-# make core tools depend on sed and flock
-$(foreach tool, $(filter-out zstd,$(tools-core)), $(eval $(curdir)/$(tool)/compile += $(curdir)/sed/compile))
+# make some core tools depend on sed and flock
+$(curdir)/patch/compile += $(curdir)/sed/compile
+$(curdir)/tar/compile += $(curdir)/sed/compile
+$(curdir)/zstd/compile += $(curdir)/libdeflate/compile
 
 $(curdir)/sed/compile := $(curdir)/flock/compile $(curdir)/zstd/compile
 tools-y += flock sed



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:27 -0400
Subject: [openwrt/openwrt]  include/download.mk: switch to zst compression
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24299.1712395473.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/706f0e395f5392da0a502f1039aa01ca14849ec5

commit 706f0e395f5392da0a502f1039aa01ca14849ec5
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Mon Mar 25 09:56:18 2024 +0100

    include/download.mk: switch to zst compression
    
    The compression is faster to (un)pack files, make use of it.
    
    Also add a new build prerequirement, the `zstd` to (un)pack files.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
    [ improve commit title ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 include/download.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/download.mk b/include/download.mk
index ce8a7894b6..960dd816c0 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -13,7 +13,7 @@ ifdef PKG_SOURCE_VERSION
     PKG_VERSION := $(if $(PKG_SOURCE_DATE),$(subst -,.,$(PKG_SOURCE_DATE)),0)~$(call version_abbrev,$(PKG_SOURCE_VERSION))
   endif
   PKG_SOURCE_SUBDIR ?= $(PKG_NAME)-$(PKG_VERSION)
-  PKG_SOURCE ?= $(PKG_SOURCE_SUBDIR).tar.xz
+  PKG_SOURCE ?= $(PKG_SOURCE_SUBDIR).tar.zst
 endif
 
 DOWNLOAD_RDEP=$(STAMP_PREPARED) $(HOST_STAMP_PREPARED)



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:33 -0400
Subject: [openwrt/openwrt]  tools: libdeflate: fetch source as tarball
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24300.1712395473.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4c7591c426f562c0705e4e0966356345d0b6cbb7

commit 4c7591c426f562c0705e4e0966356345d0b6cbb7
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Thu Apr 4 11:14:55 2024 +0200

    tools: libdeflate: fetch source as tarball
    
    libdeflate is currently intentionally being fetched via GIT.
    
    However, with the move to using ZSTD to compress the cloned GIT repo
    tarballs it means that we would first need to compile ZSTD.
    But that means that we need to be able to unpack gzipped tarballs first
    which we currently do by using libdeflate-gzip.
    So, in order to do so lets fetch libdeflate as a tarball, use gzip to
    extract it and then use libdeflate as regular for all other tools.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/libdeflate/Makefile | 9 +++++----
 1 file changed, 5 insertions(+), 4 deletions(-)

diff --git a/tools/libdeflate/Makefile b/tools/libdeflate/Makefile
index 5da6c693ea..fbf8bde984 100644
--- a/tools/libdeflate/Makefile
+++ b/tools/libdeflate/Makefile
@@ -10,13 +10,14 @@ PKG_NAME:=libdeflate
 PKG_VERSION:=1.19
 PKG_RELEASE:=1
 
-PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate.git
-PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v$(PKG_VERSION)
-PKG_MIRROR_HASH:=5aac9801815384a5e417c8345d25d07547648e28403566ef73a46295ec26b6c4
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate/releases/download/v$(PKG_VERSION)
+PKG_HASH:=d9bb9bdd8cc5a8c1f7f6226fa0053dd72861e15f366e7ff7d0d191eac16d66f3
 
 include $(INCLUDE_DIR)/host-build.mk
 
+DECOMPRESS_CMD:=$(STAGING_DIR_HOST)/bin/gzip -dc $(DL_DIR)/$(PKG_SOURCE) |
+
 define Host/Compile
 	$(HOSTCC_NOCACHE) $(HOST_CFLAGS) $(HOST_LDFLAGS) \
 	$(HOST_BUILD_DIR)/lib/*{,/*}.c \



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:25 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:25 -0400
Subject: [openwrt/openwrt]  include/download.mk: handle .gitattributes rules
 on rawgit method
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24301.1712395473.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cce4124f426e5cf625e62be90810873bacabfeff

commit cce4124f426e5cf625e62be90810873bacabfeff
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 5 14:22:18 2024 +0200

    include/download.mk: handle .gitattributes rules on rawgit method
    
    This fix a long lasting bug/inconsistency with rawgit method and
    dl_github_archive script.
    
    The dl_github_archive script works by using the github generated tar.gz
    instead of cloning and checkout and the tar.gz is generated by using git
    archive command that parse and apply .gitattributes rules.
    
    rawgit command never handled .gitattributes and instead made a simple git
    clone and checkout causing the inconsistency.
    
    To fix the inconsistency, add extra steps to call git archive command
    and generate an intermediate tar to apply .gitattributes rules.
    
    Also for git log format, Github shorthash length is 8 instead of the
    default 7, also apply this locally for each cloned repo to produce
    consistent tar.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 include/download.mk | 19 +++++++++++++++----
 1 file changed, 15 insertions(+), 4 deletions(-)

diff --git a/include/download.mk b/include/download.mk
index d9edcb1c3a..ce8a7894b6 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -215,6 +215,11 @@ define DownloadMethod/github_archive
 endef
 
 # Only intends to be called as a submethod from other DownloadMethod
+#
+# We first clone, checkout and then we generate a tar using the
+# git archive command to apply any rules of .gitattributes
+# To keep consistency with github generated tar archive, we default
+# the short hash to 8 (default is 7). (for git log related usage)
 define DownloadMethod/rawgit
 	echo "Checking out files from the git repository..."; \
 	mkdir -p $(TMP_DIR)/dl && \
@@ -222,11 +227,17 @@ define DownloadMethod/rawgit
 	rm -rf $(SUBDIR) && \
 	[ \! -d $(SUBDIR) ] && \
 	git clone $(OPTS) $(URL) $(SUBDIR) && \
-	(cd $(SUBDIR) && git checkout $(VERSION) && \
-	$(if $(filter skip,$(SUBMODULES)),true,git submodule update --init --recursive -- $(SUBMODULES))) && \
-	echo "Packing checkout..." && \
+	(cd $(SUBDIR) && git checkout $(VERSION)) && \
 	export TAR_TIMESTAMP=`cd $(SUBDIR) && git log -1 --format='@%ct'` && \
-	rm -rf $(SUBDIR)/.git && \
+	echo "Generating formal git archive (apply .gitattributes rules)" && \
+	(cd $(SUBDIR) && git config core.abbrev 8 && \
+	git archive --format=tar HEAD --output=../$(SUBDIR).tar.git) && \
+	$(if $(filter skip,$(SUBMODULES)),true,$(TAR) --ignore-failed-read -C $(SUBDIR) -f $(SUBDIR).tar.git -r .git .gitmodules 2>/dev/null) && \
+	rm -rf $(SUBDIR) && mkdir $(SUBDIR) && \
+	$(TAR) -C $(SUBDIR) -xf $(SUBDIR).tar.git && \
+	(cd $(SUBDIR) && $(if $(filter skip,$(SUBMODULES)),true,git submodule update --init --recursive -- $(SUBMODULES) && \
+	rm -rf .git .gitmodules)) && \
+	echo "Packing checkout..." && \
 	$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 	mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
 	rm -rf $(SUBDIR);



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:26 -0400
Subject: [openwrt/openwrt]  scripts/dl_github_archive: add support for packing
 zstd archive
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24302.1712395473.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c922c780946ae522237f970991300cdcda20a3a7

commit c922c780946ae522237f970991300cdcda20a3a7
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Mar 25 11:00:38 2024 +0100

    scripts/dl_github_archive: add support for packing zstd archive
    
    Add support for packing .zst archive when creating Github mirror tar.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 scripts/dl_github_archive.py | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/dl_github_archive.py b/scripts/dl_github_archive.py
index 580b7cba38..744c441ca7 100755
--- a/scripts/dl_github_archive.py
+++ b/scripts/dl_github_archive.py
@@ -138,7 +138,11 @@ class Path(object):
         envs = os.environ.copy()
         if ts is not None:
             args.append('--mtime=@%d' % ts)
-        if into.endswith('.xz'):
+        if into.endswith('.zst'):
+            envs['ZSTD_CLEVEL'] = '20'
+            envs['ZSTD_NBTHREADS'] = '0'
+            args.append('--zstd')
+        elif into.endswith('.xz'):
             envs['XZ_OPT'] = '-7e'
             args.append('-J')
         elif into.endswith('.bz2'):



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:29 -0400
Subject: [openwrt/openwrt]  tools: zstd: override max safe compression level
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24303.1712395477.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ed149717eec3bfe42d4cc32ee1d74cc53a19bad5

commit ed149717eec3bfe42d4cc32ee1d74cc53a19bad5
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 5 14:29:50 2024 +0200

    tools: zstd: override max safe compression level
    
    ZTSD limits the safe compression level to a max of 19 as 20 to 22 cause
    increased RAM usage. Higher levels require --ultra arg passed.
    
    There isn't currently a way to set --ultra using ENV options similar to
    ZSTD_CLEVEL and ZSTD_CLEVEL is limited to 19.
    
    To fix this, we can increase the max safe compression level by providing
    a custom ZSTDCLI_CLEVEL_MAX value with CFLAGS.
    
    The max safe level is increased to 20.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/zstd/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index 3f69c6d497..d194ecd005 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -17,6 +17,9 @@ include $(INCLUDE_DIR)/host-build.mk
 
 HOSTCC:= $(HOSTCC_NOCACHE)
 
+HOST_CFLAGS += \
+	-DZSTDCLI_CLEVEL_MAX=20
+
 HOST_MAKE_FLAGS += \
 	ZSTD_LEGACY_SUPPORT=7 \
 	BACKTRACE=0 \



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:28 -0400
Subject: [openwrt/openwrt]  tools: zstd: convert to make and drop meson
 dependency
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24304.1712395477.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4b920e799fba445c450d9bc86843c0a37e202e7f

commit 4b920e799fba445c450d9bc86843c0a37e202e7f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Apr 3 01:07:14 2024 +0200

    tools: zstd: convert to make and drop meson dependency
    
    Convert to make and drop meson dependency since it's not a core tools
    and can't depend on advanced build system like cmake or meson.
    
    On top of this make is the official build support and cmake/meson are
    supported by 3rd parties.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/Makefile      |  1 -
 tools/zstd/Makefile | 40 ++++++++++++++++++++++++----------------
 2 files changed, 24 insertions(+), 17 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 7607e84481..36a2ae1933 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -130,7 +130,6 @@ $(curdir)/sdcc/compile := $(curdir)/bison/compile
 $(curdir)/squashfs3-lzma/compile := $(curdir)/lzma-old/compile
 $(curdir)/squashfs4/compile := $(curdir)/xz/compile $(curdir)/zlib/compile
 $(curdir)/util-linux/compile := $(curdir)/bison/compile
-$(curdir)/zstd/compile := $(curdir)/meson/compile
 
 ifneq ($(HOST_OS),Linux)
   $(curdir)/coreutils/compile += $(curdir)/automake/compile $(curdir)/bison/compile $(curdir)/gnulib/compile
diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index 41dd70b7a9..3f69c6d497 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -11,25 +11,33 @@ PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
 PKG_CPE_ID:=cpe:/a:facebook:zstandard
 
-include $(INCLUDE_DIR)/host-build.mk
-include $(INCLUDE_DIR)/meson.mk
+HOST_BUILD_PARALLEL:=1
 
-MESON_HOST_BUILD_DIR:=$(HOST_BUILD_DIR)/build/meson/openwrt-build
+include $(INCLUDE_DIR)/host-build.mk
 
 HOSTCC:= $(HOSTCC_NOCACHE)
 
-MESON_HOST_ARGS += \
-	-Ddefault_library=static \
-	-Dlegacy_level=7 \
-	-Ddebug_level=0 \
-	-Dbacktrace=disabled \
-	-Dstatic_runtime=false \
-	-Dbin_programs=true \
-	-Dbin_tests=false \
-	-Dbin_contrib=false \
-	-Dmulti_thread=enabled \
-	-Dzlib=disabled \
-	-Dlzma=disabled \
-	-Dlz4=disabled
+HOST_MAKE_FLAGS += \
+	ZSTD_LEGACY_SUPPORT=7 \
+	BACKTRACE=0 \
+	HAVE_THREAD=1 \
+	HAVE_ZLIB=0 \
+	HAVE_LZMA=0 \
+	HAVE_LZ4=0 \
+	PREFIX=$(HOST_BUILD_PREFIX)
+
+define Host/Compile
+	$(call Host/Compile/Default,lib-mt)
+	$(call Host/Compile/Default,zstd)
+endef
+
+define Host/Install
+	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib install-pc install-static PREFIX=$(HOST_BUILD_PREFIX)
+	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/programs install PREFIX=$(HOST_BUILD_PREFIX)
+endef
+
+define Host/Uninstall
+	-$(call Host/Compile/Default,uninstall)
+endef
 
 $(eval $(call HostBuild))



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:31 -0400
Subject: [openwrt/openwrt]  tools: make zstd tool core and xz tool non-core
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24305.1712395477.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c3e43b7e654982f8f48ec63558806be2647da7e4

commit c3e43b7e654982f8f48ec63558806be2647da7e4
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Apr 3 01:10:01 2024 +0200

    tools: make zstd tool core and xz tool non-core
    
    Make zstd tool core and xz tool non-core since zstd is the new default
    for compression format.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/Makefile | 11 +++++------
 1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/tools/Makefile b/tools/Makefile
index 36a2ae1933..445101c012 100644
--- a/tools/Makefile
+++ b/tools/Makefile
@@ -67,9 +67,9 @@ tools-y += quilt
 tools-y += squashfs4
 tools-y += sstrip
 tools-y += util-linux
+tools-y += xz
 tools-y += zip
 tools-y += zlib
-tools-y += zstd
 tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS),y) += liblzo
 tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_B43_TOOLS),y) += b43-tools
 tools-$(if $(CONFIG_BUILD_ALL_HOST_TOOLS)$(BUILD_BZIP2_TOOLS),y) += bzip2
@@ -153,22 +153,21 @@ endif
 # dependency for tools which have patches directory
 $(foreach tool, $(tools-y), $(if $(wildcard $(curdir)/$(tool)/patches),$(eval $(curdir)/$(tool)/compile += $(curdir)/patch/compile)))
 
-$(foreach tool, $(filter-out xz,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/xz/compile))
+$(foreach tool, $(filter-out zstd,$(tools-y)), $(eval $(curdir)/$(tool)/compile += $(curdir)/zstd/compile))
 
 # make any tool depend on the following to ensure that archives can be unpacked and patched properly
 tools-core += libdeflate
 tools-core += patch
 tools-core += tar
-tools-core += xz
+tools-core += zstd
 
 $(foreach tool, $(tools-y), $(eval $(curdir)/$(tool)/compile += $(patsubst %,$(curdir)/%/compile,$(tools-core))))
 tools-y += $(tools-core)
 
 # make core tools depend on sed and flock
-$(foreach tool, $(filter-out xz,$(tools-core)), $(eval $(curdir)/$(tool)/compile += $(curdir)/sed/compile))
-$(curdir)/xz/compile += $(curdir)/flock/compile
+$(foreach tool, $(filter-out zstd,$(tools-core)), $(eval $(curdir)/$(tool)/compile += $(curdir)/sed/compile))
 
-$(curdir)/sed/compile := $(curdir)/flock/compile $(curdir)/xz/compile
+$(curdir)/sed/compile := $(curdir)/flock/compile $(curdir)/zstd/compile
 tools-y += flock sed
 
 $(curdir)/autoremove := 1



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:30 -0400
Subject: [openwrt/openwrt]  tools: zstd: dont override ZSTD_LEGACY_SUPPORT
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24308.1712395477.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d5c4cb0a8d251883d7a17d4426311090d6791249

commit d5c4cb0a8d251883d7a17d4426311090d6791249
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Fri Apr 5 15:44:40 2024 +0200

    tools: zstd: dont override ZSTD_LEGACY_SUPPORT
    
    We dont really have a reason to deviate from the upstream default for
    ZSTD_LEGACY_SUPPORT value of 5, as it will save a bit of space but
    prevent decompressing data compressed with legacy ZSTD versions.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/zstd/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index d194ecd005..5b98d9215f 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -21,7 +21,6 @@ HOST_CFLAGS += \
 	-DZSTDCLI_CLEVEL_MAX=20
 
 HOST_MAKE_FLAGS += \
-	ZSTD_LEGACY_SUPPORT=7 \
 	BACKTRACE=0 \
 	HAVE_THREAD=1 \
 	HAVE_ZLIB=0 \



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:34 -0400
Subject: [openwrt/openwrt]  tools: prefer gz or bz2 tarballs
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24309.1712395477.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bab3ae2ee7656600a185f4cef11cef94389023af

commit bab3ae2ee7656600a185f4cef11cef94389023af
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Wed Apr 3 19:12:57 2024 +0200

    tools: prefer gz or bz2 tarballs
    
    In the light of recent XZ events, and fundamental XZ issues lets work on
    moving away from using XZ.
    
    So, use gz compressed tarballs as sources whenever possible.
    
    dwarves only offers bz2 compressed tarballs, so use those as size
    difference is minor compared to XZ.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    
    dwarves
---
 tools/autoconf/Makefile   | 4 ++--
 tools/automake/Makefile   | 4 ++--
 tools/bison/Makefile      | 4 ++--
 tools/ccache/Makefile     | 4 ++--
 tools/coreutils/Makefile  | 4 ++--
 tools/dwarves/Makefile    | 4 ++--
 tools/e2fsprogs/Makefile  | 4 ++--
 tools/expat/Makefile      | 4 ++--
 tools/gmp/Makefile        | 4 ++--
 tools/isl/Makefile        | 4 ++--
 tools/libtool/Makefile    | 4 ++--
 tools/m4/Makefile         | 5 ++---
 tools/mpfr/Makefile       | 4 ++--
 tools/patch/Makefile      | 4 ++--
 tools/pkgconf/Makefile    | 4 ++--
 tools/sed/Makefile        | 4 ++--
 tools/sparse/Makefile     | 4 ++--
 tools/tar/Makefile        | 4 ++--
 tools/util-linux/Makefile | 4 ++--
 tools/zlib/Makefile       | 4 ++--
 20 files changed, 40 insertions(+), 41 deletions(-)

diff --git a/tools/autoconf/Makefile b/tools/autoconf/Makefile
index a1ce158031..d933c712b4 100644
--- a/tools/autoconf/Makefile
+++ b/tools/autoconf/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=autoconf
 PKG_VERSION:=2.71
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/autoconf
-PKG_HASH:=f14c83cfebcc9427f2c3cea7258bd90df972d92eb26752da4ddad81c87a0faa4
+PKG_HASH:=431075ad0bf529ef13cb41e9042c542381103e80015686222b8a9d4abef42a1c
 
 include $(INCLUDE_DIR)/host-build.mk
 
diff --git a/tools/automake/Makefile b/tools/automake/Makefile
index 4c1e5758cb..7f129c1d83 100644
--- a/tools/automake/Makefile
+++ b/tools/automake/Makefile
@@ -11,9 +11,9 @@ PKG_CPE_ID:=cpe:/a:gnu:automake
 PKG_VERSION:=1.16.5
 PKG_API_VERSION:=$(word 2,$(subst ., ,$(PKG_VERSION)))
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/automake
-PKG_HASH:=f01d58cd6d9d77fbdca9eb4bbd5ead1988228fdb73d6f7a201f5f8d6b118b469
+PKG_HASH:=07bd24ad08a64bc17250ce09ec56e921d6343903943e99ccf63bbf0705e34605
 
 include $(INCLUDE_DIR)/host-build.mk
 
diff --git a/tools/bison/Makefile b/tools/bison/Makefile
index 0aa0969b20..97d34b5a16 100644
--- a/tools/bison/Makefile
+++ b/tools/bison/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=bison
 PKG_VERSION:=3.8.2
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=9bba0214ccf7f1079c5d59210045227bcf619519840ebfa80cd3849cff5a5bf2
+PKG_HASH:=06c9e13bdf7eb24d4ceb6b59205a4f67c2c7e7213119644430fe82fbd14a0abb
 PKG_CPE_ID:=cpe:/a:gnu:bison
 
 HOST_BUILD_PARALLEL:=1
diff --git a/tools/ccache/Makefile b/tools/ccache/Makefile
index 5720dabf6e..cd2c6d27d5 100644
--- a/tools/ccache/Makefile
+++ b/tools/ccache/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ccache
 PKG_VERSION:=4.9.1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/ccache/ccache/releases/download/v$(PKG_VERSION)
-PKG_HASH:=4c03bc840699127d16c3f0e6112e3f40ce6a230d5873daa78c60a59c7ef59d25
+PKG_HASH:=12834ecaaaf2db069dda1d1d991f91c19e3274cc04a471af5b64195def17e90f
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
diff --git a/tools/coreutils/Makefile b/tools/coreutils/Makefile
index 8630286206..69d1dcbd37 100644
--- a/tools/coreutils/Makefile
+++ b/tools/coreutils/Makefile
@@ -10,9 +10,9 @@ PKG_NAME:=coreutils
 PKG_CPE_ID:=cpe:/a:gnu:coreutils
 PKG_VERSION:=9.3
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/coreutils
-PKG_HASH:=adbcfcfe899235b71e8768dcf07cd532520b7f54f9a8064843f8d199a904bbaa
+PKG_HASH:=a33d2c0bc49be3c79a4794944dcd87103bf497b53a14bafcd431c8ca53975252
 
 HOST_BUILD_PARALLEL := 1
 
diff --git a/tools/dwarves/Makefile b/tools/dwarves/Makefile
index f48516fcdf..8d72536b42 100644
--- a/tools/dwarves/Makefile
+++ b/tools/dwarves/Makefile
@@ -6,9 +6,9 @@ PKG_NAME:=dwarves
 PKG_VERSION:=1.26
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://fedorapeople.org/~acme/dwarves/
-PKG_HASH:=ad4c08339850e404609e2808012580b7e98366d2b91054bb93fe6dca94651fb4
+PKG_HASH:=1d8c9a1c2d42e06cc121a70a39c4f621fd28f15c476ed1b7c7b226f41fdd32df
 
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
diff --git a/tools/e2fsprogs/Makefile b/tools/e2fsprogs/Makefile
index 7aafc9f06b..567e6a4c9a 100644
--- a/tools/e2fsprogs/Makefile
+++ b/tools/e2fsprogs/Makefile
@@ -10,10 +10,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=e2fsprogs
 PKG_CPE_ID:=cpe:/a:e2fsprogs_project:e2fsprogs
 PKG_VERSION:=1.47.0
-PKG_HASH:=144af53f2bbd921cef6f8bea88bb9faddca865da3fbc657cc9b4d2001097d5db
+PKG_HASH:=0b4fe723d779b0927fb83c9ae709bc7b40f66d7df36433bef143e41c54257084
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@KERNEL/linux/kernel/people/tytso/e2fsprogs/v$(PKG_VERSION)/
 
 HOST_BUILD_PARALLEL:=1
diff --git a/tools/expat/Makefile b/tools/expat/Makefile
index 95e631716c..4cd9ef11b2 100644
--- a/tools/expat/Makefile
+++ b/tools/expat/Makefile
@@ -11,8 +11,8 @@ PKG_NAME:=expat
 PKG_CPE_ID:=cpe:/a:libexpat:expat
 PKG_VERSION:=2.6.2
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=ee14b4c5d8908b1bec37ad937607eab183d4d9806a08adee472c3c3121d27364
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=d4cf38d26e21a56654ffe4acd9cd5481164619626802328506a2869afab29ab3
 PKG_SOURCE_URL:=https://github.com/libexpat/libexpat/releases/download/R_$(subst .,_,$(PKG_VERSION))
 
 HOST_BUILD_PARALLEL:=1
diff --git a/tools/gmp/Makefile b/tools/gmp/Makefile
index 7f0a7a7a6a..f1aa5b1a40 100644
--- a/tools/gmp/Makefile
+++ b/tools/gmp/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=gmp
 PKG_VERSION:=6.3.0
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/gmp/
-PKG_HASH:=a3c2b80201b89e68616f4ad30bc66aee4927c3ce50e33929ca819d5c43538898
+PKG_HASH:=e56fd59d76810932a0555aa15a14b61c16bed66110d3c75cc2ac49ddaa9ab24c
 PKG_CPE_ID:=cpe:/a:gmplib:gmp
 
 HOST_FIXUP:=autoreconf
diff --git a/tools/isl/Makefile b/tools/isl/Makefile
index 4ad23a6318..1ce20fb49c 100644
--- a/tools/isl/Makefile
+++ b/tools/isl/Makefile
@@ -10,8 +10,8 @@ PKG_NAME:=isl
 PKG_VERSION:=0.26
 
 PKG_SOURCE_URL:=https://libisl.sourceforge.io/
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=a0b5cb06d24f9fa9e77b55fabbe9a3c94a336190345c2555f9915bb38e976504
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=b10473024cbf17d7db85323121eff0e50f03de14342a03738b4d384b587ce212
 
 HOST_BUILD_PARALLEL:=1
 
diff --git a/tools/libtool/Makefile b/tools/libtool/Makefile
index 1187191478..dd9afc05bd 100644
--- a/tools/libtool/Makefile
+++ b/tools/libtool/Makefile
@@ -10,9 +10,9 @@ PKG_NAME:=libtool
 PKG_CPE_ID:=cpe:/a:gnu:libtool
 PKG_VERSION:=2.4.7
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=4f7f217f057ce655ff22559ad221a0fd8ef84ad1fc5fcb6990cecc333aa1635d
+PKG_HASH:=04e96c2404ea70c590c546eba4202a4e12722c640016c12b9b2f1ce3d481e9a8
 
 HOST_BUILD_PARALLEL:=1
 
diff --git a/tools/m4/Makefile b/tools/m4/Makefile
index d621000daf..ee369f3cbb 100644
--- a/tools/m4/Makefile
+++ b/tools/m4/Makefile
@@ -10,10 +10,9 @@ PKG_NAME:=m4
 PKG_CPE_ID:=cpe:/a:gnu:m4
 PKG_VERSION:=1.4.19
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=63aede5c6d33b6d9b13511cd0be2cac046f2e70fd0a07aa9573a04a82783af96
-PKG_CAT:=xzcat
+PKG_HASH:=3be4a26d825ffdfda52a56fc43246456989a3630093cced3fbddf4771ee58a70
 
 HOST_BUILD_PARALLEL:=1
 
diff --git a/tools/mpfr/Makefile b/tools/mpfr/Makefile
index e7f5106a67..bfbbf399d2 100644
--- a/tools/mpfr/Makefile
+++ b/tools/mpfr/Makefile
@@ -11,8 +11,8 @@ PKG_VERSION:=4.2.1
 PKG_CPE_ID:=cpe:/a:mpfr:gnu_mpfr
 
 PKG_SOURCE_URL:=@GNU/mpfr http://www.mpfr.org/mpfr-$(PKG_VERSION)
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
-PKG_HASH:=277807353a6726978996945af13e52829e3abd7a9a5b7fb2793894e18f1fcbb2
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_HASH:=116715552bd966c85b417c424db1bbdf639f53836eb361549d1f8d6ded5cb4c6
 
 HOST_BUILD_PARALLEL:=1
 HOST_FIXUP:=autoreconf
diff --git a/tools/patch/Makefile b/tools/patch/Makefile
index 957fe6e309..f4cf588622 100644
--- a/tools/patch/Makefile
+++ b/tools/patch/Makefile
@@ -11,9 +11,9 @@ PKG_VERSION:=2.7.6
 PKG_RELEASE:=7
 PKG_CPE_ID:=cpe:/a:gnu:patch
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/patch
-PKG_HASH:=ac610bda97abe0d9f6b7c963255a11dcb196c25e337c61f94e4778d632f1d8fd
+PKG_HASH:=8cf86e00ad3aaa6d26aca30640e86b0e3e1f395ed99f189b06d4c9f74bc58a4e
 
 HOST_BUILD_PARALLEL := 1
 
diff --git a/tools/pkgconf/Makefile b/tools/pkgconf/Makefile
index e1dea71c8a..517b8d847b 100644
--- a/tools/pkgconf/Makefile
+++ b/tools/pkgconf/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=pkgconf
 PKG_VERSION:=2.1.1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://distfiles.dereferenced.org/pkgconf
-PKG_HASH:=3a224f2accf091b77a5781316e27b9ee3ba82c083cc2e539e08940b68a44fec5
+PKG_HASH:=1a00b7fa08c7b506a24c40f7cc8d9e0e59be748d731af8f7aa0b4d722bd8ccbe
 
 PKG_CPE_ID:=cpe:/a:pkgconf:pkgconf
 
diff --git a/tools/sed/Makefile b/tools/sed/Makefile
index 49cbc72e6e..f6bb61e229 100644
--- a/tools/sed/Makefile
+++ b/tools/sed/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=sed
 PKG_VERSION:=4.9
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/$(PKG_NAME)
-PKG_HASH:=6e226b732e1cd739464ad6862bd1a1aba42d7982922da7a53519631d24975181
+PKG_HASH:=d1478a18f033a73ac16822901f6533d30b6be561bcbce46ffd7abce93602282e
 PKG_CPE_ID:=cpe:/a:gnu:sed
 
 export SED:=
diff --git a/tools/sparse/Makefile b/tools/sparse/Makefile
index e08bd1d05f..74d25bfbde 100644
--- a/tools/sparse/Makefile
+++ b/tools/sparse/Makefile
@@ -7,10 +7,10 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=sparse
 
 PKG_VERSION:=0.6.4
-PKG_HASH:=6ab28b4991bc6aedbd73550291360aa6ab3df41f59206a9bde9690208a6e387c
+PKG_HASH:=8b907c007459a66db110496f0a02fcff1c3c8b67ddff37b959fb102a28424209
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@KERNEL/software/devel/sparse/dist/
 
 PKG_BUILD_PARALLEL:=1
diff --git a/tools/tar/Makefile b/tools/tar/Makefile
index 47aad9ec6e..a05ffc4381 100644
--- a/tools/tar/Makefile
+++ b/tools/tar/Makefile
@@ -10,9 +10,9 @@ PKG_NAME:=tar
 PKG_CPE_ID:=cpe:/a:gnu:tar
 PKG_VERSION:=1.34
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/tar
-PKG_HASH:=63bebd26879c5e1eea4352f0d03c991f966aeb3ddeb3c7445c902568d5411d28
+PKG_HASH:=03d908cf5768cfe6b7ad588c921c6ed21acabfb2b79b788d1330453507647aed
 
 HOST_BUILD_PARALLEL:=1
 
diff --git a/tools/util-linux/Makefile b/tools/util-linux/Makefile
index acd819e38b..846005ebe9 100644
--- a/tools/util-linux/Makefile
+++ b/tools/util-linux/Makefile
@@ -9,9 +9,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=util-linux
 PKG_VERSION:=2.39.3
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@KERNEL/linux/utils/$(PKG_NAME)/v2.39
-PKG_HASH:=7b6605e48d1a49f43cc4b4cfc59f313d0dd5402fa40b96810bd572e167dfed0f
+PKG_HASH:=40ea07584d56c310455471afa92c119ec259776a561af7159cc802344c2c370d
 PKG_CPE_ID:=cpe:/a:kernel:util-linux
 
 HOST_BUILD_PARALLEL:=1
diff --git a/tools/zlib/Makefile b/tools/zlib/Makefile
index 6786e14be4..f743445678 100644
--- a/tools/zlib/Makefile
+++ b/tools/zlib/Makefile
@@ -11,9 +11,9 @@ PKG_NAME:=zlib
 PKG_VERSION:=1.3.1
 PKG_RELEASE:=1
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/madler/zlib/releases/download/v$(PKG_VERSION)
-PKG_HASH:=38ef96b8dfe510d42707d9c781877914792541133e1870841463bfa73f883e32
+PKG_HASH:=9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
 
 PKG_LICENSE:=Zlib
 PKG_LICENSE_FILES:=README



From lede-commits at lists.infradead.org  Sat Apr  6 02:24:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 05:24:35 -0400
Subject: [openwrt/openwrt]  treewide: update PKG_MIRROR_HASH to zst
In-Reply-To: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
References: <171239546542.3343438.10589807796360646778@git-01.infra.openwrt.org>
Message-ID: <mailman.24310.1712396225.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b3c1c57a35a0974cf931c71f7279ec0e1fc0fa80

commit b3c1c57a35a0974cf931c71f7279ec0e1fc0fa80
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Mon Mar 25 10:03:26 2024 +0100

    treewide: update PKG_MIRROR_HASH to zst
    
    When using zst instead of xz, the hash changes. This commit fixes the
    hash for packages and tools in core.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/firmware/ath11k-firmware/Makefile   | 2 +-
 package/firmware/broadcom-sprom/Makefile    | 2 +-
 package/firmware/cypress-firmware/Makefile  | 2 +-
 package/firmware/ipq-wifi/Makefile          | 2 +-
 package/kernel/ath10k-ct/Makefile           | 2 +-
 package/kernel/mt76/Makefile                | 2 +-
 package/kernel/nat46/Makefile               | 2 +-
 package/kernel/qca-nss-dp/Makefile          | 2 +-
 package/kernel/qca-ssdk/Makefile            | 2 +-
 package/kernel/rtl8812au-ct/Makefile        | 2 +-
 package/libs/libbpf/Makefile                | 2 +-
 package/libs/libnl-tiny/Makefile            | 2 +-
 package/libs/libubox/Makefile               | 2 +-
 package/libs/uclient/Makefile               | 2 +-
 package/libs/udebug/Makefile                | 2 +-
 package/libs/ustream-ssl/Makefile           | 2 +-
 package/network/config/firewall/Makefile    | 2 +-
 package/network/config/firewall4/Makefile   | 2 +-
 package/network/config/netifd/Makefile      | 2 +-
 package/network/config/qosify/Makefile      | 2 +-
 package/network/ipv6/odhcp6c/Makefile       | 2 +-
 package/network/services/bridger/Makefile   | 2 +-
 package/network/services/hostapd/Makefile   | 2 +-
 package/network/services/ipset-dns/Makefile | 2 +-
 package/network/services/odhcpd/Makefile    | 2 +-
 package/network/services/omcproxy/Makefile  | 2 +-
 package/network/services/ppp/Makefile       | 2 +-
 package/network/services/relayd/Makefile    | 2 +-
 package/network/services/uhttpd/Makefile    | 2 +-
 package/network/services/umdns/Makefile     | 2 +-
 package/network/services/unetd/Makefile     | 2 +-
 package/network/services/ustp/Makefile      | 2 +-
 package/network/utils/bpftool/Makefile      | 2 +-
 package/network/utils/ebtables/Makefile     | 2 +-
 package/network/utils/iwinfo/Makefile       | 2 +-
 package/network/utils/umbim/Makefile        | 2 +-
 package/network/utils/uqmi/Makefile         | 2 +-
 package/system/fstools/Makefile             | 2 +-
 package/system/fwtool/Makefile              | 2 +-
 package/system/openwrt-keyring/Makefile     | 2 +-
 package/system/opkg/Makefile                | 2 +-
 package/system/procd/Makefile               | 2 +-
 package/system/rpcd/Makefile                | 2 +-
 package/system/selinux-policy/Makefile      | 2 +-
 package/system/ubox/Makefile                | 2 +-
 package/system/ubus/Makefile                | 2 +-
 package/system/ucert/Makefile               | 2 +-
 package/system/uci/Makefile                 | 2 +-
 package/system/urngd/Makefile               | 2 +-
 package/system/usign/Makefile               | 2 +-
 package/utils/jsonfilter/Makefile           | 2 +-
 package/utils/ravpower-mcu/Makefile         | 2 +-
 package/utils/ucode/Makefile                | 2 +-
 package/utils/ugps/Makefile                 | 2 +-
 package/utils/usbmode/Makefile              | 2 +-
 package/utils/yafut/Makefile                | 2 +-
 tools/b43-tools/Makefile                    | 2 +-
 tools/cbootimage-configs/Makefile           | 2 +-
 tools/cbootimage/Makefile                   | 2 +-
 tools/firmware-utils/Makefile               | 2 +-
 tools/kernel2minor/Makefile                 | 2 +-
 tools/make-ext4fs/Makefile                  | 2 +-
 tools/sdimage/Makefile                      | 2 +-
 tools/squashfs4/Makefile                    | 2 +-
 64 files changed, 64 insertions(+), 64 deletions(-)

diff --git a/package/firmware/ath11k-firmware/Makefile b/package/firmware/ath11k-firmware/Makefile
index 87d486eacc..85cbfa87c3 100644
--- a/package/firmware/ath11k-firmware/Makefile
+++ b/package/firmware/ath11k-firmware/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=ath11k-firmware
 PKG_SOURCE_DATE:=2024-03-14
 PKG_SOURCE_VERSION:=795809c7041582bd51bdfaa1f548b916ae8d4382
-PKG_MIRROR_HASH:=5018bbfed6da372b9f2ab9b152d3dfd09718713310d83232a699545b53c84b2e
+PKG_MIRROR_HASH:=d93edc651b641a97ec4f5ed329e15ac110928f863b4afbaae7fcb25953d04544
 PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
diff --git a/package/firmware/broadcom-sprom/Makefile b/package/firmware/broadcom-sprom/Makefile
index 2d2839179e..20fcf45479 100644
--- a/package/firmware/broadcom-sprom/Makefile
+++ b/package/firmware/broadcom-sprom/Makefile
@@ -5,7 +5,7 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=broadcom-sprom
 PKG_SOURCE_DATE:=2023-04-27
 PKG_SOURCE_VERSION:=d36f7fcb37711106a3a2652b576436cb09aa5b6f
-PKG_MIRROR_HASH:=70c68c923a661f40842e8800203b4b3a2675f6735c35aa3479f856cc54ad750c
+PKG_MIRROR_HASH:=fce49b1deb40e336fa3cceca7d6c1a062e38ca3c206240bd0acb6c62e3f58ca6
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
diff --git a/package/firmware/cypress-firmware/Makefile b/package/firmware/cypress-firmware/Makefile
index 6a14ff9938..4d83617605 100644
--- a/package/firmware/cypress-firmware/Makefile
+++ b/package/firmware/cypress-firmware/Makefile
@@ -8,7 +8,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/Infineon/ifx-linux-firmware/
-PKG_MIRROR_HASH:=944faae3a80013f1a963b6692d7f50a38c97edcf91fd163de521df755e6922b5
+PKG_MIRROR_HASH:=3e48063f0ee621d938cbfea24f9e5632751b6eac9fe09b0d1289181eed1ee95e
 PKG_SOURCE_VERSION:=release-v$(PKG_VERSION)
 
 PKG_MAINTAINER:=?lvaro Fern?ndez Rojas <noltari at gmail.com>
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 86e2337e00..6537477d3f 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -8,7 +8,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
 PKG_SOURCE_DATE:=2024-03-20
 PKG_SOURCE_VERSION:=87717baa8a7c922942f4202a0ec3de3cb5643941
-PKG_MIRROR_HASH:=5f05f922780b55c0069c4ee9725f2b1aa857f3bc841bec71a44e997ece9cea15
+PKG_MIRROR_HASH:=a88124db0cd9a386d2cbd905e48408e7131f057240bcc7da93f7c5fc10ea4892
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/kernel/ath10k-ct/Makefile b/package/kernel/ath10k-ct/Makefile
index 2942976373..1d9856d8cd 100644
--- a/package/kernel/ath10k-ct/Makefile
+++ b/package/kernel/ath10k-ct/Makefile
@@ -10,7 +10,7 @@ PKG_SOURCE_URL:=https://github.com/greearb/ath10k-ct.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2023-06-05
 PKG_SOURCE_VERSION:=fadd0768cbd22248a60efbb219ccefc9d86cd78c
-PKG_MIRROR_HASH:=94b5f99245bb35edbfeff08b32f03272c4e6fac8eabcd2a88e85835e088bc534
+PKG_MIRROR_HASH:=caaa373ae2cc6e443e8a31e43e5e2caca4f4ba2b9614efd3e5c9df401056d307
 
 # Build the 6.4 ath10k-ct driver version.
 # Probably this should match as closely as
diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index 3f48c76faa..548492e919 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -10,7 +10,7 @@ PKG_SOURCE_URL:=https://github.com/openwrt/mt76
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2024-04-03
 PKG_SOURCE_VERSION:=1e336a8582dce2ef32ddd440d423e9afef961e71
-PKG_MIRROR_HASH:=f3801af80d5f9c1aa266c9401d4dfa2d501df0382c81fd249150e17dddc70936
+PKG_MIRROR_HASH:=276613540603dc6ece9d2474ae1899b6aaa6ca93bd27824056c9689c725f5890
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_USE_NINJA:=0
diff --git a/package/kernel/nat46/Makefile b/package/kernel/nat46/Makefile
index 5c70b4b5fd..296ef5a058 100644
--- a/package/kernel/nat46/Makefile
+++ b/package/kernel/nat46/Makefile
@@ -3,7 +3,7 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=nat46
 
-PKG_MIRROR_HASH:=fc3ce43f8680bba6ada7d793479c5961e609138304198b250609b968d1833bb4
+PKG_MIRROR_HASH:=09b93f31d10030d3b4f326066b544b70b1f60236d0482f27c384ed93b298c0a6
 PKG_SOURCE_URL:=https://github.com/ayourtch/nat46.git
 PKG_SOURCE_DATE:=2022-09-19
 PKG_SOURCE_PROTO:=git
diff --git a/package/kernel/qca-nss-dp/Makefile b/package/kernel/qca-nss-dp/Makefile
index 167a9af4e4..504074a81e 100644
--- a/package/kernel/qca-nss-dp/Makefile
+++ b/package/kernel/qca-nss-dp/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-dp.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2023-06-06
 PKG_SOURCE_VERSION:=fa67464466f69f00967cc373d1bdd6025f57eb89
-PKG_MIRROR_HASH:=48a3c3c6af426bf8a14dc4c2c68c4af70117acf31269024792b3a455181b7d31
+PKG_MIRROR_HASH:=39329770042c85b32780cd12eef2aad2c5df79f34d1b7081e5ba1e1cc0b1b161
 
 PKG_BUILD_PARALLEL:=1
 PKG_FLAGS:=nonshared
diff --git a/package/kernel/qca-ssdk/Makefile b/package/kernel/qca-ssdk/Makefile
index 8d49ec9e3b..bbe9f12051 100644
--- a/package/kernel/qca-ssdk/Makefile
+++ b/package/kernel/qca-ssdk/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/qca-ssdk.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2023-10-04
 PKG_SOURCE_VERSION:=23a5aa4a4d5834da7a07efb58baebfbee91786b0
-PKG_MIRROR_HASH:=2310cdad1ebc424c534aa3a2c71e72e0ab3635295653a88d17dfc64c402cd151
+PKG_MIRROR_HASH:=53fb201053b3aca004c4da07b06a0608b0b3322a2062b1f7ab3b3a7871ddabcb
 
 PKG_FLAGS:=nonshared
 PKG_BUILD_PARALLEL:=1
diff --git a/package/kernel/rtl8812au-ct/Makefile b/package/kernel/rtl8812au-ct/Makefile
index 8941358d54..a994f35052 100644
--- a/package/kernel/rtl8812au-ct/Makefile
+++ b/package/kernel/rtl8812au-ct/Makefile
@@ -7,7 +7,7 @@ PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/greearb/rtl8812AU_8821AU_linux.git
-PKG_MIRROR_HASH:=141633ba4d68fce3ae1eed59e79eec9107ae36614480630a6eccd97d5cee612a
+PKG_MIRROR_HASH:=880c0ddd968a8f4bfdf4263318e925635c9abe4cc20a79bbdc905d46e00018d0
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2022-10-26
 PKG_SOURCE_VERSION:=9b2b203a217e1320602a0eb07c338a1bfca0f5a6
diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile
index 240eb51d68..913c025e54 100644
--- a/package/libs/libbpf/Makefile
+++ b/package/libs/libbpf/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=1.3.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/libbpf/libbpf
-PKG_MIRROR_HASH:=ff597a3635c2c099419d7e9e8bc44084f7f9e0c4ba2dcd571130165a19ed4ef4
+PKG_MIRROR_HASH:=669d8db696f86f640f86edc358bffa2af8dda656b8e787b095de3578bd8d94ff
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=v1.3.0
 PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
diff --git a/package/libs/libnl-tiny/Makefile b/package/libs/libnl-tiny/Makefile
index 093c058a22..c211288f8e 100644
--- a/package/libs/libnl-tiny/Makefile
+++ b/package/libs/libnl-tiny/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/libnl-tiny.git
 PKG_SOURCE_DATE:=2023-12-05
 PKG_SOURCE_VERSION:=965c4bf49658342ced0bd6e7cb069571b4a1ddff
-PKG_MIRROR_HASH:=4e166d01533aaaea5e01a2e3605ae224c3d632264936b6c40c07335e11e6b51b
+PKG_MIRROR_HASH:=4b56499e71f5f10b123e1c7ee13dbfcd970de560bff8d16ab39dc25c9ff743cb
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=LGPL-2.1
diff --git a/package/libs/libubox/Makefile b/package/libs/libubox/Makefile
index e9426ee220..22abfd4372 100644
--- a/package/libs/libubox/Makefile
+++ b/package/libs/libubox/Makefile
@@ -5,7 +5,7 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/libubox.git
-PKG_MIRROR_HASH:=7fbaa84cfb553bebd780194fe7b8b502b7745e709e45912bce192cd1c8380016
+PKG_MIRROR_HASH:=a4f671d10840fd8487394335636051a6df5edf6d8854af4fcb834a590efb240a
 PKG_SOURCE_DATE:=2024-03-29
 PKG_SOURCE_VERSION:=eb9bcb64185ac155c02cc1a604692c4b00368324
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile
index 6294f5d089..8a977a7aa7 100644
--- a/package/libs/uclient/Makefile
+++ b/package/libs/uclient/Makefile
@@ -5,7 +5,7 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git
-PKG_MIRROR_HASH:=761d8b357eb0c37a0833cc76106948c5f2bfe9abe785728996a8d050a25b0a8a
+PKG_MIRROR_HASH:=798f77d47695f7aaf7397072be2d2359c69ef53993e1b1910074cdacaa1d17e2
 PKG_SOURCE_DATE:=2023-04-13
 PKG_SOURCE_VERSION:=007d945467499f43656b141171d31f5643b83a6c
 CMAKE_INSTALL:=1
diff --git a/package/libs/udebug/Makefile b/package/libs/udebug/Makefile
index 5c665f2d1e..bfb13cf788 100644
--- a/package/libs/udebug/Makefile
+++ b/package/libs/udebug/Makefile
@@ -11,7 +11,7 @@ PKG_NAME:=udebug
 CMAKE_INSTALL:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/udebug.git
-PKG_MIRROR_HASH:=62d470ad4a3c4a0138c3102ad2e21dd56e93e9c0c7ec466d591c14e7b8af9a97
+PKG_MIRROR_HASH:=4dfe98b5d5813066dccd46d112502565b6961a4a7382083c529dfb423a626c2b
 PKG_SOURCE_DATE:=2023-12-06
 PKG_SOURCE_VERSION:=6d3f51f9fda706f0cf4732c762e4dbe8c21e12cf
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile
index 830f67ad0e..686a05cbe7 100644
--- a/package/libs/ustream-ssl/Makefile
+++ b/package/libs/ustream-ssl/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
 PKG_SOURCE_DATE:=2023-11-26
 PKG_SOURCE_VERSION:=263b9a97cf7e1e2467319c23832b705fc01190b5
-PKG_MIRROR_HASH:=95db3f3a01c65d008a48398c7d5bfbf98cb31eabe291e74a0238220018f0a15b
+PKG_MIRROR_HASH:=b18a5e7510d3984829f1c2ad1850b101ed1931670cf556d509c0a91750aafcb3
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=ISC
diff --git a/package/network/config/firewall/Makefile b/package/network/config/firewall/Makefile
index 3306dde319..c4bf73f07d 100644
--- a/package/network/config/firewall/Makefile
+++ b/package/network/config/firewall/Makefile
@@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall3.git
 PKG_SOURCE_DATE:=2022-02-17
 PKG_SOURCE_VERSION:=4cd7d4f36bea731bf901cb067456f1d460294926
-PKG_MIRROR_HASH:=66a498164dc89251f34155a679186f090d9f1df104a4a63805f3231d0587e0c9
+PKG_MIRROR_HASH:=d48a1937328b4a46b4771839d7f281a0e95e024169caa02253fc216a0907d0b9
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=ISC
 
diff --git a/package/network/config/firewall4/Makefile b/package/network/config/firewall4/Makefile
index 7f1058b8d4..365a363303 100644
--- a/package/network/config/firewall4/Makefile
+++ b/package/network/config/firewall4/Makefile
@@ -11,7 +11,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firewall4.git
 PKG_SOURCE_DATE:=2023-11-03
 PKG_SOURCE_VERSION:=698a53354fd280aae097efe08803c0c9a10c14c2
-PKG_MIRROR_HASH:=466c43e46fc4b9c24053874b322b84556e24718c1149bd9a52b889062de0dc29
+PKG_MIRROR_HASH:=736b3d03cf0db1170242de20776b0095cc37d260108e4313f84eafb46b1be711
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=ISC
 
diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index e0998b0b80..35b5c0b277 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
 PKG_SOURCE_DATE:=2024-01-04
 PKG_SOURCE_VERSION:=f01345ec13b9b27ffd314d8689fb2d3f9c81a47d
-PKG_MIRROR_HASH:=7d1d40d89a8bc20213e0f7a9c1167cdefef250417ec34ca8b4df79b92ba0b5d3
+PKG_MIRROR_HASH:=b051aa94e6413f520b711372f8cae4574cad26cba880ff6ab2d415713d06e592
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/network/config/qosify/Makefile b/package/network/config/qosify/Makefile
index 1cfc65d4f0..8e8c1b8713 100644
--- a/package/network/config/qosify/Makefile
+++ b/package/network/config/qosify/Makefile
@@ -13,7 +13,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/qosify.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2023-03-07
 PKG_SOURCE_VERSION:=9a47ea4b683dd845ec94534fcd82d3117c9ab313
-PKG_MIRROR_HASH:=0df1dc6e9645691f1ce0c3c039afedbcd8d4635dad36923ce47174e8d5b4ce43
+PKG_MIRROR_HASH:=3d97456dcd13f481beff9a87d939e4bd671577865ed7cfc11b00d6e40f3e5621
 PKG_RELEASE:=1
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/network/ipv6/odhcp6c/Makefile b/package/network/ipv6/odhcp6c/Makefile
index 36e79c6d79..894f388945 100644
--- a/package/network/ipv6/odhcp6c/Makefile
+++ b/package/network/ipv6/odhcp6c/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcp6c.git
 PKG_SOURCE_DATE:=2023-05-12
 PKG_SOURCE_VERSION:=bcd283632ac13391aac3ebdd074d1fd832d76fa3
-PKG_MIRROR_HASH:=21aac76fcf4099287868afb52924ed2219e8e846ad82b96b7e1753417a8dde87
+PKG_MIRROR_HASH:=0c18c578045f9251bd86a5b8fb0518b69c519e83f69907bf76583a2985482508
 PKG_MAINTAINER:=Hans Dedecker <dedeckeh at gmail.com>
 PKG_LICENSE:=GPL-2.0
 
diff --git a/package/network/services/bridger/Makefile b/package/network/services/bridger/Makefile
index ccb29db1ed..fa98220f68 100644
--- a/package/network/services/bridger/Makefile
+++ b/package/network/services/bridger/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/nbd168/bridger
 PKG_SOURCE_DATE:=2023-05-12
 PKG_SOURCE_VERSION:=d0f79a16c749ad310d79e1c31f593860619f99eb
-PKG_MIRROR_HASH:=052beb648545c67a4e24034347e4cb5d91319147bfe3f8d498d1aa576d14a089
+PKG_MIRROR_HASH:=dde6613662ad53ba6622e669400560a534426edfa4f42c91d156fbd7ccafd15c
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
diff --git a/package/network/services/hostapd/Makefile b/package/network/services/hostapd/Makefile
index 780acc47c4..0171bc0edc 100644
--- a/package/network/services/hostapd/Makefile
+++ b/package/network/services/hostapd/Makefile
@@ -11,7 +11,7 @@ PKG_SOURCE_URL:=https://w1.fi/hostap.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2024-03-09
 PKG_SOURCE_VERSION:=695277a5b3da08b9a8a4e7117b933deb8b4950a7
-PKG_MIRROR_HASH:=8d6cb89be101bb3dcd84e7eb29484111dfeeeadf49eae85594b08011ba0ed62e
+PKG_MIRROR_HASH:=57b8e64d24707e37e0df3359cee15dd5184b824b8622568833a5b8a0cae163ae
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=BSD-3-Clause
diff --git a/package/network/services/ipset-dns/Makefile b/package/network/services/ipset-dns/Makefile
index 284e76eab2..b3b557ce49 100644
--- a/package/network/services/ipset-dns/Makefile
+++ b/package/network/services/ipset-dns/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.zx2c4.com/ipset-dns
 PKG_SOURCE_DATE:=2017-10-08
 PKG_SOURCE_VERSION:=ade2cf88e933f4f90451e0a6171f0aa4a523f989
-PKG_MIRROR_HASH:=3e978df41cf2c79edb13846c458579388b0fae9a547ebca7b9f52ad6c0e50e70
+PKG_MIRROR_HASH:=94478078566bb8ddd76063607780f899646eacd2414e60d799231ff9391ce540
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/network/services/odhcpd/Makefile b/package/network/services/odhcpd/Makefile
index 22df72df60..55a24a90e5 100644
--- a/package/network/services/odhcpd/Makefile
+++ b/package/network/services/odhcpd/Makefile
@@ -12,7 +12,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/odhcpd.git
-PKG_MIRROR_HASH:=59d04d80175a115d04031291195dcb2ce858301c78bd37f18aeabfa40f750ef8
+PKG_MIRROR_HASH:=08fddf4294929d1713e0c3f7b258f8c7bf4abe731d5f34fceb797faa411f7a58
 PKG_SOURCE_DATE:=2023-10-24
 PKG_SOURCE_VERSION:=d8118f6e76e5519881f9a37137c3a06b3cb60fd2
 
diff --git a/package/network/services/omcproxy/Makefile b/package/network/services/omcproxy/Makefile
index f90c5192f0..0ca0970af2 100644
--- a/package/network/services/omcproxy/Makefile
+++ b/package/network/services/omcproxy/Makefile
@@ -12,7 +12,7 @@ PKG_RELEASE:=9
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/omcproxy.git
-PKG_MIRROR_HASH:=5e69aa12ca3bc1ecfb211e0ad40e0763a7e9dd99fc8b95b4d62b8c3d29df40bd
+PKG_MIRROR_HASH:=61f03d76b14149e417360b6aaa630e920b75a31a6a497353b7160b3a374b20b2
 PKG_SOURCE_DATE:=2021-11-04
 PKG_SOURCE_VERSION:=bfba2aa75802ff1a70ef2fd3eba53409a8c6e93a
 PKG_MAINTAINER:=Steven Barth <cyrus at openwrt.org>
diff --git a/package/network/services/ppp/Makefile b/package/network/services/ppp/Makefile
index db55a32e2f..3ed43e9a5a 100644
--- a/package/network/services/ppp/Makefile
+++ b/package/network/services/ppp/Makefile
@@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/paulusmack/ppp
 PKG_SOURCE_DATE:=2021-01-04
 PKG_SOURCE_VERSION:=4fb319056f168bb8379865b91b4fd3e1ada73f1e
-PKG_MIRROR_HASH:=a6a31f71e46c7170b94e53723515f7d6f8ec512a84aa3003f20d393d8bd97347
+PKG_MIRROR_HASH:=58b415e17bdcac81bb9594a1b2ba65ec90598817850d22e98c1690e8ed0cd3d8
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=BSD-4-Clause
 PKG_CPE_ID:=cpe:/a:samba:ppp
diff --git a/package/network/services/relayd/Makefile b/package/network/services/relayd/Makefile
index a7d38cb0a8..9e275bbc5d 100644
--- a/package/network/services/relayd/Makefile
+++ b/package/network/services/relayd/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/relayd.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2023-01-28
 PKG_SOURCE_VERSION:=f646ba40489371e69f624f2dee2fc4e19ceec00e
-PKG_MIRROR_HASH:=19f2627c2e878617df72e31f01bf4505b063e0cb736c1745b176ec416971f923
+PKG_MIRROR_HASH:=658a09a1a947c148c2827335c7bbe126f4bcf361d2de6d9de7cca432c9fe04d3
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=GPL-2.0
diff --git a/package/network/services/uhttpd/Makefile b/package/network/services/uhttpd/Makefile
index b4f5fb84cf..a373e62820 100644
--- a/package/network/services/uhttpd/Makefile
+++ b/package/network/services/uhttpd/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uhttpd.git
 PKG_SOURCE_DATE:=2023-06-25
 PKG_SOURCE_VERSION:=34a8a74dbdec3c0de38abc1b08f6a73c51263792
-PKG_MIRROR_HASH:=28f4b97588d6a991f64ae19a3e8dfed52295f37f543e30010fbeec92b3723c66
+PKG_MIRROR_HASH:=0603019dabb89b1b207d0f7916616c95ce8194a7ff9fd71f0ddd845dd2de944e
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=ISC
 
diff --git a/package/network/services/umdns/Makefile b/package/network/services/umdns/Makefile
index 95997eaba5..2491126bf6 100644
--- a/package/network/services/umdns/Makefile
+++ b/package/network/services/umdns/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/mdnsd.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2024-01-08
 PKG_SOURCE_VERSION:=e91ed406ecebb4bc08c346929e25f1b819c19edd
-PKG_MIRROR_HASH:=d5b94ff96dd16d1df3281621c66b3974982d9ee96f52b8400504e9acbc3d9de4
+PKG_MIRROR_HASH:=f667e939520f0ce27b63ddcab64eb079d84fd2c61beaad5399bfc5f9276ca62e
 
 PKG_MAINTAINER:=John Crispin <john at phrozen.org>
 PKG_LICENSE:=LGPL-2.1
diff --git a/package/network/services/unetd/Makefile b/package/network/services/unetd/Makefile
index 680b8b7b3c..018f6b8ea9 100644
--- a/package/network/services/unetd/Makefile
+++ b/package/network/services/unetd/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/unetd.git
 PKG_SOURCE_DATE:=2024-03-31
 PKG_SOURCE_VERSION:=806457664ab6e952a7f4febb82e891f596fe577c
-PKG_MIRROR_HASH:=a62bef497078c7b825f11fc8358c1a43f5db3e6d4b97812044f7653d60747d5b
+PKG_MIRROR_HASH:=f469d65fd83721a8da0e5253d1ba871a6734233da6f23b631009b17b3af82455
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
diff --git a/package/network/services/ustp/Makefile b/package/network/services/ustp/Makefile
index 48ee988882..baf45288dd 100644
--- a/package/network/services/ustp/Makefile
+++ b/package/network/services/ustp/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustp.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2021-09-21
 PKG_SOURCE_VERSION:=462b3a491347e452c15220861949b1d6371fa59e
-PKG_MIRROR_HASH:=b1d4e96f4855580d20572f930764cb09986339017c2a0ec26b22ce11d511c14f
+PKG_MIRROR_HASH:=c3373b369b127c26d4a79425631cb5db83ef479ab21d164da879b35942539dfb
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=GPL-2.0
diff --git a/package/network/utils/bpftool/Makefile b/package/network/utils/bpftool/Makefile
index 2782a30735..d81cf95102 100644
--- a/package/network/utils/bpftool/Makefile
+++ b/package/network/utils/bpftool/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION:=7.3.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/libbpf/bpftool
-PKG_MIRROR_HASH:=c8fe336005019fee4d4fd416ce68a749fb479786dead69d6a0b3b04bcd903b98
+PKG_MIRROR_HASH:=42030a007714aa075fbd402ccb0196e4892344fb7215b4f51a99b633cc5104fa
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=v7.3.0
 
diff --git a/package/network/utils/ebtables/Makefile b/package/network/utils/ebtables/Makefile
index ebbdcb035f..32a452b068 100644
--- a/package/network/utils/ebtables/Makefile
+++ b/package/network/utils/ebtables/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_URL:=https://git.netfilter.org/ebtables
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=48cff25dfea5b37e16ba5dc6601e98ab140f5f99
-PKG_MIRROR_HASH:=160f5087b403173d5d1e93880d28b89dab98e828ba3f545315bf1cb88afe5a46
+PKG_MIRROR_HASH:=1ee560498e1a047b329eab3dad8425ae51e7f0527e4495efb99481ca11206b37
 
 PKG_LICENSE:=GPL-2.0
 PKG_CPE_ID:=cpe:/a:netfilter:ebtables
diff --git a/package/network/utils/iwinfo/Makefile b/package/network/utils/iwinfo/Makefile
index 5b5d1b573f..33661941a6 100644
--- a/package/network/utils/iwinfo/Makefile
+++ b/package/network/utils/iwinfo/Makefile
@@ -13,7 +13,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/iwinfo.git
 PKG_SOURCE_DATE:=2024-03-23
 PKG_SOURCE_VERSION:=79a96150647110fb03852bc321bd37159d63ae1a
-PKG_MIRROR_HASH:=684ef80f1b85e054016709fc1d90160bd2191e76309831818ace1d4c5ec0f37e
+PKG_MIRROR_HASH:=0bf6230019f80a05ae2a49722f3ecb2a9000da7ae0d398fd0e163d168ee8b494
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=GPL-2.0
 
diff --git a/package/network/utils/umbim/Makefile b/package/network/utils/umbim/Makefile
index 0d4ea5ac5f..5b0a5a8f7d 100644
--- a/package/network/utils/umbim/Makefile
+++ b/package/network/utils/umbim/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/umbim.git
 PKG_SOURCE_DATE:=2022-08-13
 PKG_SOURCE_VERSION:=146bc77c98ace3d1cc672986669650d2e1da71f3
-PKG_MIRROR_HASH:=c610dc08b5663876c2afdc247d4d5615fd1be23e33fa7a646f0237d298719b98
+PKG_MIRROR_HASH:=9eae9f191e9c4a8132dba32e356047b8dfd62556f06800f05a283630cfed472a
 PKG_MAINTAINER:=John Crispin <john at phrozen.org>
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile
index 2c7f71b48a..90ba080a6f 100644
--- a/package/network/utils/uqmi/Makefile
+++ b/package/network/utils/uqmi/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
 PKG_SOURCE_DATE:=2024-01-16
 PKG_SOURCE_VERSION:=c3488b831ce6285c8107704156b9b8ed7d59deb3
-PKG_MIRROR_HASH:=a171d71d471a03e24c45509059db461efcf3cfe0fc19cffec2e8e4fbf99d6eed
+PKG_MIRROR_HASH:=1aa576e46dfb6528ef12f5fd1b626585d565bbcf9119cde302cc34d732c75076
 PKG_MAINTAINER:=Matti Laakso <malaakso at elisanet.fi>
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/system/fstools/Makefile b/package/system/fstools/Makefile
index 86f9a8643b..29d4726af7 100644
--- a/package/system/fstools/Makefile
+++ b/package/system/fstools/Makefile
@@ -12,7 +12,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/fstools.git
-PKG_MIRROR_HASH:=ab6978773d2b88eec502f5a217035b059730baf845d90ebb5f1fa52aacf12218
+PKG_MIRROR_HASH:=cf9e09885954e0e43b58126ce4b6f5552462cf1495b89330ce4e66056249787e
 PKG_SOURCE_DATE:=2024-01-22
 PKG_SOURCE_VERSION:=08cd7083cac4bddf88459efa0881ee52858e7d0a
 CMAKE_INSTALL:=1
diff --git a/package/system/fwtool/Makefile b/package/system/fwtool/Makefile
index 965200bf5c..e1fa1c86d0 100644
--- a/package/system/fwtool/Makefile
+++ b/package/system/fwtool/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/fwtool.git
 PKG_SOURCE_DATE:=2019-11-12
 PKG_SOURCE_VERSION:=8f7fe925ca205c8e8e2d0d1b16218c1e148d5173
-PKG_MIRROR_HASH:=f8309d4cf548ce28d98f8f8313d78e17307ded135b96b49bfbc9ac6b039d8689
+PKG_MIRROR_HASH:=fe00ac98103645d20a211732ebbbd3d46acb1e5b29392dddca2df56531e54a2e
 CMAKE_INSTALL:=1
 
 PKG_FLAGS:=nonshared
diff --git a/package/system/openwrt-keyring/Makefile b/package/system/openwrt-keyring/Makefile
index 9280e8102b..d8b15d46e4 100644
--- a/package/system/openwrt-keyring/Makefile
+++ b/package/system/openwrt-keyring/Makefile
@@ -9,7 +9,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/keyring.git
 PKG_SOURCE_DATE:=2022-03-25
 PKG_SOURCE_VERSION:=62471e693b4f9f19dd88afa6827fc3a2cf121d9a
-PKG_MIRROR_HASH:=805bc093b13d9faa4751f7236421199554e6ddbd7d8ae399b9ca3925dcdc5374
+PKG_MIRROR_HASH:=dbc6cf709f702f92f6aabcd9f981a14901ec61c9b340bd506986f8b438503632
 
 PKG_MAINTAINER:=John Crispin <john at phrozen.org>
 PKG_LICENSE:=GPL-2.0
diff --git a/package/system/opkg/Makefile b/package/system/opkg/Makefile
index c892020de9..047d723750 100644
--- a/package/system/opkg/Makefile
+++ b/package/system/opkg/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/opkg-lede.git
 PKG_SOURCE_DATE:=2022-02-24
 PKG_SOURCE_VERSION:=d038e5b6d155784575f62a66a8bb7e874173e92e
-PKG_MIRROR_HASH:=6ef0c62ae66ae77c51513b42b685908b709cf7e1c897289a36b3f6d5612b1462
+PKG_MIRROR_HASH:=6889f7d322996f9291f42d7d6a5877d256b91d4a01d6015cebaae9227702eb43
 
 PKG_LICENSE:=GPL-2.0
 PKG_LICENSE_FILES:=COPYING
diff --git a/package/system/procd/Makefile b/package/system/procd/Makefile
index af16724999..dca6684df8 100644
--- a/package/system/procd/Makefile
+++ b/package/system/procd/Makefile
@@ -12,7 +12,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/procd.git
-PKG_MIRROR_HASH:=2ba058d25c7489e9d38d674878087aa5d36ffd9fe4f83bee6c88e2a0c340c757
+PKG_MIRROR_HASH:=ad1e0d6c2549b2ebec57705c33b231e7c02042dd65c3134f62bf528cf2516efb
 PKG_SOURCE_DATE:=2024-03-30
 PKG_SOURCE_VERSION:=946552a7b598a0b88db6101e864679554ec4f221
 CMAKE_INSTALL:=1
diff --git a/package/system/rpcd/Makefile b/package/system/rpcd/Makefile
index 2bdd7a7e8d..2db014f2df 100644
--- a/package/system/rpcd/Makefile
+++ b/package/system/rpcd/Makefile
@@ -12,7 +12,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/rpcd.git
-PKG_MIRROR_HASH:=69ba17315cfaa2736e1d2c4da03624f42dcff25cc3c8422cbb0e5f7d2729f4ae
+PKG_MIRROR_HASH:=4b4c0a15180a4e39a5af5a6b9c7cf663bcef53d40df780e4da6edd6e63966006
 PKG_SOURCE_DATE:=2024-02-22
 PKG_SOURCE_VERSION:=8ef4c2587ac0041049c67befed281a70cf240769
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
diff --git a/package/system/selinux-policy/Makefile b/package/system/selinux-policy/Makefile
index 8e36b267bb..2834e94cc5 100644
--- a/package/system/selinux-policy/Makefile
+++ b/package/system/selinux-policy/Makefile
@@ -9,7 +9,7 @@ PKG_NAME:=selinux-policy
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.defensec.nl/selinux-policy.git
 PKG_VERSION:=1.2.5
-PKG_MIRROR_HASH:=81ac6e31d2f1febddbe594f3578a9c40444fc0e349075ab6abd3d3ee014a988e
+PKG_MIRROR_HASH:=0b485aefed7ecc1ba3c5f5843cb3b10e9d7c55c09b361cd56933081c0dbdc223
 PKG_SOURCE_VERSION:=v$(PKG_VERSION)
 PKG_BUILD_DEPENDS:=secilc/host policycoreutils/host
 
diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 3d1754c5f0..024532f34b 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git
 PKG_SOURCE_DATE:=2024-01-24
 PKG_SOURCE_VERSION:=2c5887cb46883a28d69071c4349c3dabbbe3972c
-PKG_MIRROR_HASH:=3194d80bc10147a32d7e4491c54d1a4e718a53080fa0307fe68b6d11cf79e13e
+PKG_MIRROR_HASH:=5b7b00c358cc53b842c25e6f6dd21bf429d4913204a8186a72b13447658927cf
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/system/ubus/Makefile b/package/system/ubus/Makefile
index fddc36b0dd..49958c2428 100644
--- a/package/system/ubus/Makefile
+++ b/package/system/ubus/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubus.git
 PKG_SOURCE_DATE:=2023-11-28
 PKG_SOURCE_VERSION:=f84eb5998c6ea2d34989ca2d3254e56c66139313
-PKG_MIRROR_HASH:=75f39a88a6b019ae95c73ed3f7373e5197aa1ff29dc9a95ea46483412f4051ae
+PKG_MIRROR_HASH:=c9f6118b98550802893c7c0b497f2215dbfd863d819fabc9df2aa57ce29a5fd2
 PKG_ABI_VERSION:=$(call abi_version_str,$(PKG_SOURCE_DATE))
 CMAKE_INSTALL:=1
 
diff --git a/package/system/ucert/Makefile b/package/system/ucert/Makefile
index 2aea706a3a..1ad1b95d70 100644
--- a/package/system/ucert/Makefile
+++ b/package/system/ucert/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ucert.git
 PKG_SOURCE_DATE:=2020-05-24
 PKG_SOURCE_VERSION:=00b921d80ac0dc47339305d803f865ff43c56d63
-PKG_MIRROR_HASH:=e6e9024777c36c43a8aa5f0f91927d822d1e08943adfee9bc0a34d86a00dde4c
+PKG_MIRROR_HASH:=45391983bd5ec9bf03004f31388f01b84ad1a564e16b71acf1b1b26a6055e721
 
 CMAKE_INSTALL:=1
 PKG_CHECK_FORMAT_SECURITY:=1
diff --git a/package/system/uci/Makefile b/package/system/uci/Makefile
index 90cd8be1f9..c8f661c684 100644
--- a/package/system/uci/Makefile
+++ b/package/system/uci/Makefile
@@ -15,7 +15,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/uci.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2023-08-10
 PKG_SOURCE_VERSION:=5781664d5087ccc4b5ab58505883231212dbedbc
-PKG_MIRROR_HASH:=18169cbabe76e8b3f5989a031c05e353a57708633e522605ea0f11dcbb3fa441
+PKG_MIRROR_HASH:=0ca4a29c077e85a7cfe69916c3ceb2bee98662b6268befc3c02519939647f984
 
 PKG_LICENSE:=LGPL-2.1
 PKG_LICENSE_FILES:=
diff --git a/package/system/urngd/Makefile b/package/system/urngd/Makefile
index ff7e59fc56..2745b8fc29 100644
--- a/package/system/urngd/Makefile
+++ b/package/system/urngd/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/urngd.git
 PKG_SOURCE_DATE:=2023-11-01
 PKG_SOURCE_VERSION:=44365eb1e1165f2a44cb31f404b04cf85031718e
-PKG_MIRROR_HASH:=07055a10fe6f45e07bb8e06245e3231f316ac0c9efb0f86a0f6630b8ac640b38
+PKG_MIRROR_HASH:=b153530c4e66d1b0fe7d98b0ec24df580964f24a756e754323e3fa297eed1229
 
 PKG_LICENSE:=GPL-2.0 BSD-3-Clause
 PKG_LICENSE_FILES:=
diff --git a/package/system/usign/Makefile b/package/system/usign/Makefile
index 75ecd2018a..2bcae7f523 100644
--- a/package/system/usign/Makefile
+++ b/package/system/usign/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/usign.git
 PKG_SOURCE_DATE:=2020-05-23
 PKG_SOURCE_VERSION:=f1f65026a94137c91b5466b149ef3ea3f20091e9
-PKG_MIRROR_HASH:=e5c047bf0fdb2d790a60fcfe460c414be8bea84863fa4503c65d95d2ee4bf5ee
+PKG_MIRROR_HASH:=3157ad9e0ebe0512644fbd00191d97a91809f03c3deca67200845a5d07aa721f
 CMAKE_INSTALL:=1
 PKG_CHECK_FORMAT_SECURITY:=1
 PKG_BUILD_FLAGS:=no-mips16 lto
diff --git a/package/utils/jsonfilter/Makefile b/package/utils/jsonfilter/Makefile
index d243ac732c..d249ea1a36 100644
--- a/package/utils/jsonfilter/Makefile
+++ b/package/utils/jsonfilter/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/jsonpath.git
 PKG_SOURCE_DATE:=2024-01-23
 PKG_SOURCE_VERSION:=594cfa86469c005972ba750614f5b3f1af84d0f6
-PKG_MIRROR_HASH:=92bb2bc64be6769bd16c2c3c0e955e8f58abd6b99ffe6841d089e08df78fc8b7
+PKG_MIRROR_HASH:=2f455f04fbfcdb4c81cccd23475b47395f847db44aa4bd9a1007b9aa0ab7fd19
 CMAKE_INSTALL:=1
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
diff --git a/package/utils/ravpower-mcu/Makefile b/package/utils/ravpower-mcu/Makefile
index 8337cb2a1a..8139e1bf87 100644
--- a/package/utils/ravpower-mcu/Makefile
+++ b/package/utils/ravpower-mcu/Makefile
@@ -5,7 +5,7 @@ PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/blocktrron/ravpower-mcu.git
-PKG_MIRROR_HASH:=b018291629782d46cd5e3aae59c18598f83d2bae2edd1e356b88d296be07a48a
+PKG_MIRROR_HASH:=683c04c85c6f973d3e9a0c9d0f77e2dde4e89ff0d40a28ad6682bc2550022b3c
 PKG_SOURCE_DATE:=2020-06-19
 PKG_SOURCE_VERSION:=1665d9e9212dcd118629a74fbe658841f81036f7
 PKG_MAINTAINER:=David Bauer <mail at david-bauer.net>
diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile
index 61cf3815a9..fdaafdddcc 100644
--- a/package/utils/ucode/Makefile
+++ b/package/utils/ucode/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/jow-/ucode.git
 PKG_SOURCE_DATE:=2024-02-21
 PKG_SOURCE_VERSION:=ba3855ae3775197f3594fc2615cac539075bd2fb
-PKG_MIRROR_HASH:=8c52f1a03729653640a8184dbb97c22fde9619ee3a29b6ebdd76a16fae3e60ef
+PKG_MIRROR_HASH:=f585447ebbb5ef56ada3a9f8dbe71d5310cc8185d0e90676b512849eaf60f77c
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=ISC
 
diff --git a/package/utils/ugps/Makefile b/package/utils/ugps/Makefile
index 62e183821d..aa91b606db 100644
--- a/package/utils/ugps/Makefile
+++ b/package/utils/ugps/Makefile
@@ -14,7 +14,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/ugps.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2024-02-14
 PKG_SOURCE_VERSION:=69561a074d6f50f63b82608b19041e5eb2c605a9
-PKG_MIRROR_HASH:=ed85dfc8eb34b2c4ffdfd817f851bcef48f46983e5a3b7212003df418c217493
+PKG_MIRROR_HASH:=87f9634c5e940523808391886fde504237ac2f7f62224733120a06fba4f7e952
 
 PKG_MAINTAINER:=John Crispin <john at phrozen.org>
 PKG_LICENSE:=GPL-2.0+
diff --git a/package/utils/usbmode/Makefile b/package/utils/usbmode/Makefile
index aebc7926d6..33362d33c8 100644
--- a/package/utils/usbmode/Makefile
+++ b/package/utils/usbmode/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/usbmode.git
 PKG_SOURCE_DATE:=2022-02-24
 PKG_SOURCE_VERSION:=3c8595a4e75510f58fa231b145d5506768dcafc9
-PKG_MIRROR_HASH:=dfa2cd90d5bea5f7382157f6396da8a79a7b38d25f65bacfdb682729ac257cf4
+PKG_MIRROR_HASH:=e8a40ed3b849c3b9ba9c9823a4631731dcf261d3529f173ff5973f7cc08add15
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0
diff --git a/package/utils/yafut/Makefile b/package/utils/yafut/Makefile
index 225b53852b..37df2d8172 100644
--- a/package/utils/yafut/Makefile
+++ b/package/utils/yafut/Makefile
@@ -5,7 +5,7 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/kempniu/yafut.git
-PKG_MIRROR_HASH:=281da69ba77c1b7556b76f8ee907e012dc9c6b15916bf5e2027980014b25d401
+PKG_MIRROR_HASH:=591eb3ffa334aaebf9f8155ade90b674896223bcabc1039deda57c2aeafb0525
 PKG_SOURCE_DATE:=2023-03-31
 PKG_SOURCE_VERSION:=16435e89d449f953712983315e1a89cdb678620d
 
diff --git a/tools/b43-tools/Makefile b/tools/b43-tools/Makefile
index ed8030e9c5..8ec13309be 100644
--- a/tools/b43-tools/Makefile
+++ b/tools/b43-tools/Makefile
@@ -13,7 +13,7 @@ PKG_DATE:=2022-07-05
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/mbuesch/b43-tools.git
 PKG_SOURCE_VERSION:=2fe10ea6690df9a068cb21cde537236bae784a14
-PKG_MIRROR_HASH:=3b18a0883924029b295fd2df4458b51e00f47d299a8ecca6cb2ed9e30afae5d5
+PKG_MIRROR_HASH:=4009d6c1f9ede43102897d6ebf4bd954331f3c4e2a94d4e61c0e5f303f929914
 
 include $(INCLUDE_DIR)/host-build.mk
 
diff --git a/tools/cbootimage-configs/Makefile b/tools/cbootimage-configs/Makefile
index 5d841041b3..586d1efc9d 100644
--- a/tools/cbootimage-configs/Makefile
+++ b/tools/cbootimage-configs/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_DATE := 2017-04-13
 PKG_SOURCE_PROTO := git
 PKG_SOURCE_URL := https://github.com/NVIDIA/cbootimage-configs.git
 PKG_SOURCE_VERSION := 7c3b458b93ed6947cd083623f543e93f9103cc0f
-PKG_MIRROR_HASH := 56c01f0339a3b4bee4ce31db253bb614d04f4e17a13793e873d701ec1a0de91b
+PKG_MIRROR_HASH := 6ba2dde907d3cc403720954738a92431b1f40d562db5815c08971c39374d72a1
 
 include $(INCLUDE_DIR)/host-build.mk
 
diff --git a/tools/cbootimage/Makefile b/tools/cbootimage/Makefile
index 71fdb5768c..82be7950d3 100644
--- a/tools/cbootimage/Makefile
+++ b/tools/cbootimage/Makefile
@@ -12,7 +12,7 @@ PKG_VERSION := 1.8
 PKG_SOURCE_PROTO := git
 PKG_SOURCE_URL := https://github.com/NVIDIA/cbootimage.git
 PKG_SOURCE_VERSION := 7c9db585d06cce9efffa2a82245f233233680060
-PKG_MIRROR_HASH := 84d9abaaa3eddde05f506dc16effe1c9e18eb94727ed59c5e0a879baeb04e0b2
+PKG_MIRROR_HASH := e38b1e9581524fcabc7b24fff1c18d13f7e3a93accf73c55caf33832249bfd03
 
 HOST_BUILD_PARALLEL := 1
 
diff --git a/tools/firmware-utils/Makefile b/tools/firmware-utils/Makefile
index 9e7c8d6d31..e22f7a7b9a 100644
--- a/tools/firmware-utils/Makefile
+++ b/tools/firmware-utils/Makefile
@@ -13,7 +13,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
 PKG_SOURCE_DATE:=2024-03-23
 PKG_SOURCE_VERSION:=6b242991a995c41769977efb010dc9f4e4ec3da2
-PKG_MIRROR_HASH:=f8d84868487ec51ea4119fb5a48a181025ca272d8eb5b714068d0eec8db88d87
+PKG_MIRROR_HASH:=00ff2661fda2eb299ccbfaa07dff8fbcf46b3441a6e9f6f46eaa119e66dbe142
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk
diff --git a/tools/kernel2minor/Makefile b/tools/kernel2minor/Makefile
index be730b4df6..69108f43df 100644
--- a/tools/kernel2minor/Makefile
+++ b/tools/kernel2minor/Makefile
@@ -11,7 +11,7 @@ PKG_VERSION:=0.25
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/adron-s/kernel2minor.git
-PKG_MIRROR_HASH:=6083c46c2fe0da37bacd04d5d5439c0e2a9d00e58ff47a63acfd5057d2aa2145
+PKG_MIRROR_HASH:=4e59e6e9883a17b90d09d4b6df0cbff83badad9a0e148dfa730abafce000128d
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=1e5a52c7941945f6d64807ebca4a5923ba5466bd
 PKG_HASH:=33ca413403a3341af0c9a8e6d9bb58f4ad080a5339e8a8729b83637d35bfaf1b
diff --git a/tools/make-ext4fs/Makefile b/tools/make-ext4fs/Makefile
index 91fba48ba7..b5616b1bc7 100644
--- a/tools/make-ext4fs/Makefile
+++ b/tools/make-ext4fs/Makefile
@@ -13,7 +13,7 @@ PKG_SOURCE_URL=$(PROJECT_GIT)/project/make_ext4fs.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2020-01-05
 PKG_SOURCE_VERSION:=5c201be7d72aff735da27e17c29852e0cefe3e52
-PKG_MIRROR_HASH:=f1c204ff4daa941dc30465286af25044d67bafa537cc66b29fc1b4ec49bfdb28
+PKG_MIRROR_HASH:=ec8304dc06f94338e14e608a807f48e10d0987bdac4d90f235650b46994dfbd7
 
 include $(INCLUDE_DIR)/host-build.mk
 
diff --git a/tools/sdimage/Makefile b/tools/sdimage/Makefile
index 654d157497..e09b1e01f4 100644
--- a/tools/sdimage/Makefile
+++ b/tools/sdimage/Makefile
@@ -13,7 +13,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/mhei/fsl-imx-uuc.git
 PKG_SOURCE_DATE:=2018-11-18
 PKG_SOURCE_VERSION:=c6536ac5b4388b33c217bde2c3a76a4e96d64176
-PKG_MIRROR_HASH:=5bff90bf59bb3e7e8db6c2ec55c984367f75cb0ee6847f3f2ea666172e203c07
+PKG_MIRROR_HASH:=c4487635ea06ea6311a28739c58f7f889b888c91b7ccc0398d225b4bcdeb76a3
 
 PKG_LICENSE:=GPL-2.0+
 PKG_LICENSE_FILES:=LICENSE
diff --git a/tools/squashfs4/Makefile b/tools/squashfs4/Makefile
index ce66a85580..38c3e5233f 100644
--- a/tools/squashfs4/Makefile
+++ b/tools/squashfs4/Makefile
@@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/plougher/squashfs-tools
 PKG_SOURCE_DATE:=2023-03-26
 PKG_SOURCE_VERSION:=d8cb82d9840330f9344ec37b992595b5d7b44184
-PKG_MIRROR_HASH:=fc625af657ca284d69fbc32e3bb572d0afd566cf816b7c1c1b66dda0a0c2760a
+PKG_MIRROR_HASH:=e84026de1ab187f3f76d1b781a29259d818f887e1651225f850a62d6f90b1b9e
 
 HOST_BUILD_PARALLEL:=1
 



From lede-commits at lists.infradead.org  Sat Apr  6 03:11:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 06:11:00 -0400
Subject: [openwrt/openwrt]  tools: zstd: install headers as well
In-Reply-To: <171239826019.3442296.2851082908487232241@git-01.infra.openwrt.org>
References: <171239826019.3442296.2851082908487232241@git-01.infra.openwrt.org>
Message-ID: <mailman.24315.1712398265.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/076e86041862ff7962c395706238c69fc8b83594

commit 076e86041862ff7962c395706238c69fc8b83594
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 6 12:05:56 2024 +0200

    tools: zstd: install headers as well
    
    We forgot to make sure install-includes is called for the libzstd in
    order for it to install the required headers.
    
    Fixes: 4b920e799fba ("tools: zstd: convert to make and drop meson dependency")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/zstd/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index 5b98d9215f..2bb055c93d 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -34,7 +34,7 @@ define Host/Compile
 endef
 
 define Host/Install
-	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib install-pc install-static PREFIX=$(HOST_BUILD_PREFIX)
+	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib install-pc install-static install-includes PREFIX=$(HOST_BUILD_PREFIX)
 	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/programs install PREFIX=$(HOST_BUILD_PREFIX)
 endef
 



From lede-commits at lists.infradead.org  Sat Apr  6 05:52:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 08:52:34 -0400
Subject: [openwrt/openwrt]  Revert "tools/mkimage: update to v2024.04"
In-Reply-To: <171240795456.3794538.13077452257533202185@git-01.infra.openwrt.org>
References: <171240795456.3794538.13077452257533202185@git-01.infra.openwrt.org>
Message-ID: <mailman.24328.1712407959.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0a0d89265ee474d0784f675d65685ed011cc30b3

commit 0a0d89265ee474d0784f675d65685ed011cc30b3
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Sat Apr 6 14:49:54 2024 +0200

    Revert "tools/mkimage: update to v2024.04"
    
    This reverts commit 8d934c11968de49ad17bc62366a88230e47b4f56.
    
    The update seems to be causing issues that need to be further
    explored [0]. Let's revert it.
    
    [0] - https://github.com/openwrt/openwrt/pull/15078
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 tools/mkimage/Makefile                                             | 4 ++--
 tools/mkimage/patches/030-allow-to-use-different-magic.patch       | 4 ++--
 tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch | 2 +-
 3 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/tools/mkimage/Makefile b/tools/mkimage/Makefile
index 6d2cc5f764..ae744f9bf3 100644
--- a/tools/mkimage/Makefile
+++ b/tools/mkimage/Makefile
@@ -7,14 +7,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mkimage
-PKG_VERSION:=2024.04
+PKG_VERSION:=2024.01
 
 PKG_SOURCE:=u-boot-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:= \
 	https://mirror.cyberbits.eu/u-boot \
 	https://ftp.denx.de/pub/u-boot \
 	ftp://ftp.denx.de/pub/u-boot
-PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a
+PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3
 
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/u-boot-$(PKG_VERSION)
 
diff --git a/tools/mkimage/patches/030-allow-to-use-different-magic.patch b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
index bcbdc4d6cd..f2f57965f6 100644
--- a/tools/mkimage/patches/030-allow-to-use-different-magic.patch
+++ b/tools/mkimage/patches/030-allow-to-use-different-magic.patch
@@ -24,7 +24,7 @@ This patch makes it possible to set a custom image magic.
  		"          -a ==> set load address to 'addr' (hex)\n"
  		"          -e ==> set entry point to 'ep' (hex)\n"
  		"          -n ==> set image name to 'name'\n"
-@@ -160,7 +162,7 @@ static int add_content(int type, const c
+@@ -159,7 +161,7 @@ static int add_content(int type, const c
  }
  
  static const char optstring[] =
@@ -33,7 +33,7 @@ This patch makes it possible to set a custom image magic.
  
  static const struct option longopts[] = {
  	{ "load-address", required_argument, NULL, 'a' },
-@@ -303,6 +305,14 @@ static void process_args(int argc, char
+@@ -302,6 +304,14 @@ static void process_args(int argc, char
  		case 'l':
  			params.lflag = 1;
  			break;
diff --git a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
index ed6824b11a..f2e3b9b053 100644
--- a/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
+++ b/tools/mkimage/patches/095-tools-disable-TOOLS_FIT_FULL_CHECK.patch
@@ -14,7 +14,7 @@ https://github.com/u-boot/u-boot/commit/3f04db891a353f4b127ed57279279f851c6b4917
 
 --- a/tools/Kconfig
 +++ b/tools/Kconfig
-@@ -36,7 +36,7 @@ config TOOLS_FIT
+@@ -31,7 +31,7 @@ config TOOLS_FIT
  	  Enable FIT support in the tools builds.
  
  config TOOLS_FIT_FULL_CHECK



From lede-commits at lists.infradead.org  Sat Apr  6 06:01:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 06 Apr 2024 09:01:50 -0400
Subject: [openwrt/openwrt]  tools: zstd: add patch fixing wrong generated .pc
 with lib-mt
In-Reply-To: <171240851013.3809551.9206309372653937389@git-01.infra.openwrt.org>
References: <171240851013.3809551.9206309372653937389@git-01.infra.openwrt.org>
Message-ID: <mailman.24329.1712408516.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f2fabf7aaaacec6fdc50226f57f4be2c19d8cace

commit f2fabf7aaaacec6fdc50226f57f4be2c19d8cace
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sat Apr 6 14:58:48 2024 +0200

    tools: zstd: add patch fixing wrong generated .pc with lib-mt
    
    The current .pc generated by make build system for zstd is wrong and
    always assume a single-threaded library is used.
    
    This wasn't the case for the meson build system that used his own logic
    to generate the pkg-config file.
    
    Add a patch to fix this by introducing install-mt-pc make target to
    generate the correct pkg-config gile.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/zstd/Makefile                                |  2 +-
 ...iant-pkg-config-file-for-multi-threaded-s.patch | 97 ++++++++++++++++++++++
 2 files changed, 98 insertions(+), 1 deletion(-)

diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index 2bb055c93d..728cef26b8 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -34,7 +34,7 @@ define Host/Compile
 endef
 
 define Host/Install
-	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib install-pc install-static install-includes PREFIX=$(HOST_BUILD_PREFIX)
+	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib install-mt-pc install-static install-includes PREFIX=$(HOST_BUILD_PREFIX)
 	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/programs install PREFIX=$(HOST_BUILD_PREFIX)
 endef
 
diff --git a/tools/zstd/patches/100-Provide-variant-pkg-config-file-for-multi-threaded-s.patch b/tools/zstd/patches/100-Provide-variant-pkg-config-file-for-multi-threaded-s.patch
new file mode 100644
index 0000000000..a7b3823e66
--- /dev/null
+++ b/tools/zstd/patches/100-Provide-variant-pkg-config-file-for-multi-threaded-s.patch
@@ -0,0 +1,97 @@
+From 5886e6a45b3c20c8d8f837657d1506b580434136 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sat, 6 Apr 2024 14:41:54 +0200
+Subject: [PATCH] Provide variant pkg-config file for multi-threaded static lib
+
+Multi-threaded static library require -pthread to correctly link and works.
+The pkg-config we provide tho only works with dynamic multi-threaded library
+and won't provide the correct libs and cflags values if lib-mt is used.
+
+To handle this, introduce a variant of libzstd.pc.in, mt-libzstd.pc.in
+and intoduce a new make target, install-mt-pc to permit advanced user to
+install and generate a correct pkg-config file for lib-mt.
+
+This was notice while migrating from meson to make build system where
+meson generates a correct .pc file while make doesn't.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ lib/Makefile         | 16 ++++++++++++++++
+ lib/README.md        |  4 ++++
+ lib/mt-libzstd.pc.in | 15 +++++++++++++++
+ 3 files changed, 35 insertions(+)
+ create mode 100644 lib/mt-libzstd.pc.in
+
+diff --git a/lib/Makefile b/lib/Makefile
+index 8bfdade9..4933f0e9 100644
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -319,6 +319,17 @@ libzstd.pc: libzstd.pc.in
+ 	        -e 's|@LIBS_PRIVATE@|$(LDFLAGS_DYNLIB)|' \
+ 	        $< >$@
+ 
++mt-libzstd.pc: mt-libzstd.pc.in
++	@echo creating pkgconfig
++	@sed \
++	        -e 's|@PREFIX@|$(PREFIX)|' \
++	        -e 's|@EXEC_PREFIX@|$(PCEXEC_PREFIX)|' \
++	        -e 's|@INCLUDEDIR@|$(PCINCPREFIX)$(PCINCDIR)|' \
++	        -e 's|@LIBDIR@|$(PCLIBPREFIX)$(PCLIBDIR)|' \
++	        -e 's|@VERSION@|$(VERSION)|' \
++	        -e 's|@LIBS_PRIVATE@|$(LDFLAGS_DYNLIB)|' \
++	        $< >$@
++
+ .PHONY: install
+ install: install-pc install-static install-shared install-includes
+ 	@echo zstd static and shared library installed
+@@ -328,6 +339,11 @@ install-pc: libzstd.pc
+ 	[ -e $(DESTDIR)$(PKGCONFIGDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
+ 	$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
+ 
++.PHONY: install-mt-pc
++install-mt-pc: mt-libzstd.pc
++	[ -e $(DESTDIR)$(PKGCONFIGDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
++	$(INSTALL_DATA) mt-libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/libzstd.pc
++
+ .PHONY: install-static
+ install-static:
+ 	# only generate libzstd.a if it's not already present
+diff --git a/lib/README.md b/lib/README.md
+index a560f06c..3038bc7a 100644
+--- a/lib/README.md
++++ b/lib/README.md
+@@ -33,6 +33,10 @@ For convenience, we provide a build target to generate multi and single threaded
+ When linking a POSIX program with a multithreaded version of `libzstd`,
+ note that it's necessary to invoke the `-pthread` flag during link stage.
+ 
++The `.pc` generated from `make install` or `make install-pc` always assume a single-threaded static library
++is compiled. If `make lib-mt` is used, to correctly generate a `.pc` for the multi-threaded static library,
++`make install-mt-pc` is needed.
++
+ Multithreading capabilities are exposed
+ via the [advanced API defined in `lib/zstd.h`](https://github.com/facebook/zstd/blob/v1.4.3/lib/zstd.h#L351).
+ 
+diff --git a/lib/mt-libzstd.pc.in b/lib/mt-libzstd.pc.in
+new file mode 100644
+index 00000000..cd93301a
+--- /dev/null
++++ b/lib/mt-libzstd.pc.in
+@@ -0,0 +1,15 @@
++#   ZSTD - standard compression algorithm
++#   Copyright (c) Meta Platforms, Inc. and affiliates.
++#   BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
++
++prefix=@PREFIX@
++exec_prefix=@EXEC_PREFIX@
++includedir=@INCLUDEDIR@
++libdir=@LIBDIR@
++
++Name: zstd
++Description: fast lossless compression algorithm library
++URL: https://facebook.github.io/zstd/
++Version: @VERSION@
++Libs: -L${libdir} -lzstd @LIBS_PRIVATE@
++Cflags: -I${includedir} @LIBS_PRIVATE@
+-- 
+2.43.0
+



From lede-commits at lists.infradead.org  Sun Apr  7 02:12:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 05:12:58 -0400
Subject: [openwrt/openwrt]  wifi-scripts: fix creation of IBSS in legacy
 (non-HT) mode
In-Reply-To: <171248117816.1368767.9740730496795983803@git-01.infra.openwrt.org>
References: <171248117816.1368767.9740730496795983803@git-01.infra.openwrt.org>
Message-ID: <mailman.24382.1712481184.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cee9fcdb7350911f474544189817d25fd4070111

commit cee9fcdb7350911f474544189817d25fd4070111
Author: Alexandru Gagniuc <mr.nuke.me at gmail.com>
AuthorDate: Wed Apr 3 14:32:08 2024 -0500

    wifi-scripts: fix creation of IBSS in legacy (non-HT) mode
    
    When an IBBS interface is configured for IBSS legacy mode, wdev.htmode
    is empty. This is empty string results in an empty positional argument
    to the "ibbs join" command, for example:
    
        iw dev phy0-ibss0 ibss join crymesh 2412 '' fixed-freq beacon-interval 100
    
    This empty argument is interpreted as an invalid HT mode by 'iw',
    causing the entire command to fail and print a "usage" message:
    
        daemon.notice netifd: radio0 (4527): Usage:    iw [options] \
            dev <devname> ibss join <SSID> <freq in MHz> ...
    
    Although nobody will ever need more than 640K of IBSS, explicitly use
    "NOHT" if an HT mode is not given. This fixes the problem.
    
    Fixes: e56c5f7b276a ("hostapd: add ucode support, use ucode for the main ubus object")
    Signed-off-by: Alexandru Gagniuc <mr.nuke.me at gmail.com>
    Signed-off-by: Felix Fietkau <nbd at nbd.name> [extend to cover more cases]
---
 package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc | 7 ++++---
 1 file changed, 4 insertions(+), 3 deletions(-)

diff --git a/package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc b/package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc
index ff4d629fd6..d505e3035f 100644
--- a/package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc
+++ b/package/network/config/wifi-scripts/files/usr/share/hostap/wdev.uc
@@ -32,10 +32,11 @@ function iface_start(wdev)
 		wdev_config.macaddr = phydev.macaddr_next();
 	wdev_create(phy, ifname, wdev_config);
 	wdev_set_up(ifname, true);
+	let htmode = wdev.htmode || "NOHT";
 	if (wdev.freq)
-		system(`iw dev ${ifname} set freq ${wdev.freq} ${wdev.htmode}`);
+		system(`iw dev ${ifname} set freq ${wdev.freq} ${htmode}`);
 	if (wdev.mode == "adhoc") {
-		let cmd = ["iw", "dev", ifname, "ibss", "join", wdev.ssid, wdev.freq, wdev.htmode, "fixed-freq" ];
+		let cmd = ["iw", "dev", ifname, "ibss", "join", wdev.ssid, wdev.freq, htmode, "fixed-freq" ];
 		if (wdev.bssid)
 			push(cmd, wdev.bssid);
 		for (let key in [ "beacon-interval", "basic-rates", "mcast-rate", "keys" ])
@@ -43,7 +44,7 @@ function iface_start(wdev)
 				push(cmd, key, wdev[key]);
 		system(cmd);
 	} else if (wdev.mode == "mesh") {
-		let cmd = [ "iw", "dev", ifname, "mesh", "join", wdev.ssid, "freq", wdev.freq, wdev.htmode ];
+		let cmd = [ "iw", "dev", ifname, "mesh", "join", wdev.ssid, "freq", wdev.freq, htmode ];
 		for (let key in [ "mcast-rate", "beacon-interval" ])
 			if (wdev[key])
 				push(cmd, key, wdev[key]);



From lede-commits at lists.infradead.org  Sun Apr  7 02:30:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 05:30:59 -0400
Subject: [openwrt/openwrt]  x86: geode: 6.6: add missing kernel options
In-Reply-To: <171248225978.1398145.6466553165815990869@git-01.infra.openwrt.org>
References: <171248225978.1398145.6466553165815990869@git-01.infra.openwrt.org>
Message-ID: <mailman.24385.1712482264.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2b6fb2dfba5117e2c195ddb60442b2e59c015f0a

commit 2b6fb2dfba5117e2c195ddb60442b2e59c015f0a
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Sat Apr 6 17:18:46 2024 +0200

    x86: geode: 6.6: add missing kernel options
    
    Add options removed by `make kernel_oldconfig CONFIG_TARGET=subtarget', missing which causes compilation to stop and cause an error.
    
    Fixes: 2a86425de107 ("x86: 6.6: refresh kernel config")
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/x86/geode/config-6.6 | 16 ++++++++++++++++
 1 file changed, 16 insertions(+)

diff --git a/target/linux/x86/geode/config-6.6 b/target/linux/x86/geode/config-6.6
index 1ab188af53..729dc30c27 100644
--- a/target/linux/x86/geode/config-6.6
+++ b/target/linux/x86/geode/config-6.6
@@ -5,6 +5,7 @@ CONFIG_8139TOO_8129=y
 CONFIG_8139TOO_PIO=y
 # CONFIG_8139TOO_TUNE_TWISTER is not set
 # CONFIG_8139_OLD_RX_RESET is not set
+# CONFIG_ACER_WMI is not set
 CONFIG_ACPI=y
 CONFIG_ACPI_AC=y
 # CONFIG_ACPI_BATTERY is not set
@@ -51,6 +52,7 @@ CONFIG_FUNCTION_PADDING_BYTES=4
 CONFIG_FUNCTION_PADDING_CFI=0
 CONFIG_GEODE_WDT=y
 CONFIG_GEOS=y
+# CONFIG_GIGABYTE_WMI is not set
 CONFIG_GPIO_ACPI=y
 CONFIG_GPIO_CS5535=y
 # CONFIG_HPET is not set
@@ -65,6 +67,8 @@ CONFIG_I2C_BOARDINFO=y
 # CONFIG_INTEL_SAR_INT1092 is not set
 # CONFIG_INTEL_SCU_PLATFORM is not set
 # CONFIG_INTEL_SOC_DTS_THERMAL is not set
+# CONFIG_INTEL_WMI_SBL_FW_UPDATE is not set
+# CONFIG_INTEL_WMI_THUNDERBOLT is not set
 CONFIG_IOSF_MBI=y
 # CONFIG_IOSF_MBI_DEBUG is not set
 CONFIG_ISA=y
@@ -73,6 +77,7 @@ CONFIG_ISA_BUS_API=y
 # CONFIG_ISCSI_IBFT is not set
 # CONFIG_LANCE is not set
 CONFIG_LEDS_GPIO=y
+# CONFIG_LENOVO_YMC is not set
 # CONFIG_M686 is not set
 # CONFIG_MDA_CONSOLE is not set
 CONFIG_MFD_CORE=y
@@ -81,9 +86,12 @@ CONFIG_MFD_CS5535=y
 # CONFIG_MFD_INTEL_PMC_BXT is not set
 CONFIG_MGEODEGX1=y
 # CONFIG_MIXCOMWD is not set
+# CONFIG_MSI_WMI is not set
+# CONFIG_MXM_WMI is not set
 CONFIG_NATSEMI=y
 CONFIG_NET5501=y
 CONFIG_NSC_GPIO=y
+# CONFIG_NVIDIA_WMI_EC_BACKLIGHT is not set
 CONFIG_PATA_CS5520=y
 CONFIG_PATA_CS5530=y
 CONFIG_PATA_CS5535=y
@@ -92,6 +100,7 @@ CONFIG_PATA_SC1200=y
 CONFIG_PC8736x_GPIO=y
 CONFIG_PCI_MMCONFIG=y
 # CONFIG_PCWATCHDOG is not set
+# CONFIG_PEAQ_WMI is not set
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_ALDERLAKE is not set
 # CONFIG_PINCTRL_BAYTRAIL is not set
@@ -121,6 +130,8 @@ CONFIG_SC1200_WDT=y
 CONFIG_SCx200_ACB=y
 CONFIG_SCx200_WDT=y
 # CONFIG_SENSORS_ASUS_EC is not set
+# CONFIG_SENSORS_ASUS_WMI is not set
+# CONFIG_SENSORS_HP_WMI is not set
 CONFIG_SENSORS_LM90=y
 # CONFIG_SENSORS_OXP is not set
 CONFIG_SERIAL_8250_PNP=y
@@ -136,13 +147,16 @@ CONFIG_SERIAL_8250_PNP=y
 # CONFIG_SND_SOC_AMD_PS is not set
 # CONFIG_SND_SOC_AMD_RPL_ACP6x is not set
 # CONFIG_SND_SOC_INTEL_AVS is not set
+# CONFIG_THINKPAD_LMI is not set
 # CONFIG_TOSHIBA_BT_RFKILL is not set
+# CONFIG_TOSHIBA_WMI is not set
 # CONFIG_USB_UHCI_HCD is not set
 CONFIG_VIA_RHINE=y
 CONFIG_VIA_RHINE_MMIO=y
 CONFIG_WATCHDOG_CORE=y
 # CONFIG_WDT is not set
 # CONFIG_WIRELESS_HOTKEY is not set
+# CONFIG_WMI_BMOF is not set
 # CONFIG_X86_ACPI_CPUFREQ is not set
 CONFIG_X86_ALIGNMENT_16=y
 # CONFIG_X86_AMD_PLATFORM_DEVICE is not set
@@ -157,3 +171,5 @@ CONFIG_X86_MINIMUM_CPU_FAMILY=5
 # CONFIG_X86_PCC_CPUFREQ is not set
 CONFIG_X86_PM_TIMER=y
 CONFIG_X86_REBOOTFIXUPS=y
+# CONFIG_XIAOMI_WMI is not set
+# CONFIG_YOGABOOK is not set



From lede-commits at lists.infradead.org  Sun Apr  7 03:23:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 06:23:09 -0400
Subject: [openwrt/openwrt]  nu801: update PKG_MIRROR_HASH to zst
In-Reply-To: <171248538947.1467609.15029673889920038617@git-01.infra.openwrt.org>
References: <171248538947.1467609.15029673889920038617@git-01.infra.openwrt.org>
Message-ID: <mailman.24410.1712485395.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1ea6ddacc2d8b32ddbdb11cd5ceff3f2dbca0bfc

commit 1ea6ddacc2d8b32ddbdb11cd5ceff3f2dbca0bfc
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sun Apr 7 11:49:53 2024 +0200

    nu801: update PKG_MIRROR_HASH to zst
    
    When using zst instead of xz, the hash changes.
    This was missed in the initial treewide updated.
    
    Fixes: b3c1c57a35a0 ("treewide: update PKG_MIRROR_HASH to zst")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/system/gpio-cdev/nu801/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/system/gpio-cdev/nu801/Makefile b/package/system/gpio-cdev/nu801/Makefile
index 3c0b4f2086..82c04ccb41 100644
--- a/package/system/gpio-cdev/nu801/Makefile
+++ b/package/system/gpio-cdev/nu801/Makefile
@@ -8,7 +8,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/chunkeey/nu801.git
 PKG_SOURCE_VERSION:=f623879a393d0315f29095fe46b19cd2246d10d7
-PKG_MIRROR_HASH:=d2080fa74901fcd9c2576784adaa84792b577167576a45326b478192cb157eba
+PKG_MIRROR_HASH:=8bf2de78e078b7305178577530ff51e7373f94d39629653ea7efc8e485d0fdbd
 PKG_MAINTAINER:=Christian Lamparter <chunkeey at gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=LICENSE



From lede-commits at lists.infradead.org  Sun Apr  7 05:28:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 08:28:57 -0400
Subject: [openwrt/openwrt]  generic: 6.6: backport arm64 swiotlb default size
 reduction
In-Reply-To: <171249293722.1649258.8925919226817838925@git-01.infra.openwrt.org>
References: <171249293722.1649258.8925919226817838925@git-01.infra.openwrt.org>
Message-ID: <mailman.24419.1712492943.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/153c9f348270bf6fb727abf96726c082a7d41aa7

commit 153c9f348270bf6fb727abf96726c082a7d41aa7
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 6 23:08:03 2024 +0200

    generic: 6.6: backport arm64 swiotlb default size reduction
    
    Kernel 6.6 added dynamic SWIOTLB allocation, but with it also started
    allocating 64MB of the SWIOTLB bounce buffer by default which is quite a
    lot of memory on most OpenWrt devices.
    
    Luckily in kernel 6.7 arm64 received an optimization that reduces that
    default size to 1MB per 1GB of RAM if certain criteria was met.
    
    So in order to reclaim back 63MB of RAM which brought some ipq807x devices
    close to OOM under load lets backport the upstream commit.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...lb-Reduce-the-default-size-if-no-ZONE_DMA.patch | 51 ++++++++++++++++++++++
 1 file changed, 51 insertions(+)

diff --git a/target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch b/target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch
new file mode 100644
index 0000000000..6ede4d32a1
--- /dev/null
+++ b/target/linux/generic/backport-6.6/300-v6.7-arm64-swiotlb-Reduce-the-default-size-if-no-ZONE_DMA.patch
@@ -0,0 +1,51 @@
+From 65033574ade97afccba074d837fd269903a83a9a Mon Sep 17 00:00:00 2001
+From: Catalin Marinas <catalin.marinas at arm.com>
+Date: Thu, 5 Oct 2023 16:40:30 +0100
+Subject: [PATCH] arm64: swiotlb: Reduce the default size if no ZONE_DMA
+ bouncing needed
+
+With CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC enabled, the arm64 kernel still
+allocates the default SWIOTLB buffer (64MB) even if ZONE_DMA is disabled
+or all the RAM fits into this zone. However, this potentially wastes a
+non-negligible amount of memory on platforms with little RAM.
+
+Reduce the SWIOTLB size to 1MB per 1GB of RAM if only needed for
+kmalloc() buffer bouncing.
+
+Signed-off-by: Catalin Marinas <catalin.marinas at arm.com>
+Suggested-by: Ross Burton <ross.burton at arm.com>
+Cc: Ross Burton <ross.burton at arm.com>
+Cc: Will Deacon <will at kernel.org>
+Reviewed-by: Robin Murphy <robin.murphy at arm.com>
+---
+ arch/arm64/mm/init.c | 11 ++++++++++-
+ 1 file changed, 10 insertions(+), 1 deletion(-)
+
+--- a/arch/arm64/mm/init.c
++++ b/arch/arm64/mm/init.c
+@@ -16,6 +16,7 @@
+ #include <linux/nodemask.h>
+ #include <linux/initrd.h>
+ #include <linux/gfp.h>
++#include <linux/math.h>
+ #include <linux/memblock.h>
+ #include <linux/sort.h>
+ #include <linux/of.h>
+@@ -493,8 +494,16 @@ void __init mem_init(void)
+ {
+ 	bool swiotlb = max_pfn > PFN_DOWN(arm64_dma_phys_limit);
+ 
+-	if (IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC))
++	if (IS_ENABLED(CONFIG_DMA_BOUNCE_UNALIGNED_KMALLOC) && !swiotlb) {
++		/*
++		 * If no bouncing needed for ZONE_DMA, reduce the swiotlb
++		 * buffer for kmalloc() bouncing to 1MB per 1GB of RAM.
++		 */
++		unsigned long size =
++			DIV_ROUND_UP(memblock_phys_mem_size(), 1024);
++		swiotlb_adjust_size(min(swiotlb_size_or_default(), size));
+ 		swiotlb = true;
++	}
+ 
+ 	swiotlb_init(swiotlb, SWIOTLB_VERBOSE);
+ 



From lede-commits at lists.infradead.org  Sun Apr  7 05:56:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 08:56:08 -0400
Subject: [openwrt/openwrt]  treewide: package: update missed hashes after
 switch to ZSTD
In-Reply-To: <171249456870.1680338.7815008115045622827@git-01.infra.openwrt.org>
References: <171249456870.1680338.7815008115045622827@git-01.infra.openwrt.org>
Message-ID: <mailman.24434.1712494573.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6918c637b79724d8ad9d0851afc06c1c82913fde

commit 6918c637b79724d8ad9d0851afc06c1c82913fde
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sun Apr 7 12:29:11 2024 +0200

    treewide: package: update missed hashes after switch to ZSTD
    
    With the switch to ZSTD for git clone packaging, hashes have changed so
    fixup remaining package hashes that were missed in the inital update.
    
    Fixes: b3c1c57 ("treewide: update PKG_MIRROR_HASH to zst")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/boot/apex/Makefile                          | 2 +-
 package/boot/arm-trusted-firmware-bcm63xx/Makefile  | 2 +-
 package/boot/arm-trusted-firmware-mediatek/Makefile | 2 +-
 package/boot/at91bootstrap/Makefile                 | 2 +-
 package/boot/opensbi/Makefile                       | 2 +-
 package/boot/rkbin/Makefile                         | 2 +-
 package/boot/tfa-layerscape/Makefile                | 2 +-
 package/boot/uboot-at91/Makefile                    | 2 +-
 package/boot/uboot-bcm4908/Makefile                 | 2 +-
 package/boot/uboot-fritz4040/Makefile               | 2 +-
 package/boot/uboot-layerscape/Makefile              | 2 +-
 package/firmware/layerscape/fman-ucode/Makefile     | 2 +-
 package/firmware/layerscape/ls-ddr-phy/Makefile     | 2 +-
 package/firmware/layerscape/ls-dpl/Makefile         | 2 +-
 package/firmware/layerscape/ls-mc/Makefile          | 2 +-
 package/firmware/layerscape/ls-rcw/Makefile         | 2 +-
 package/firmware/layerscape/ppfe-firmware/Makefile  | 2 +-
 package/kernel/bcm63xx-cfe/Makefile                 | 2 +-
 package/kernel/lantiq/ltq-vectoring/Makefile        | 2 +-
 package/kernel/mwlwifi/Makefile                     | 2 +-
 package/network/utils/layerscape/restool/Makefile   | 2 +-
 package/utils/bcm27xx-utils/Makefile                | 2 +-
 package/utils/debugcc/Makefile                      | 2 +-
 package/utils/firmware-utils/Makefile               | 2 +-
 24 files changed, 24 insertions(+), 24 deletions(-)

diff --git a/package/boot/apex/Makefile b/package/boot/apex/Makefile
index 66a1b7667e..cf8d97bb1c 100644
--- a/package/boot/apex/Makefile
+++ b/package/boot/apex/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linusw/apex.git
 PKG_SOURCE_VERSION:=483e18aa133d5e25866570c29b124530b2d1e0d3
-PKG_MIRROR_HASH:=42230bb436f5590447ca55e8befb8927e6ea74c1e6953c043bbbef986c411704
+PKG_MIRROR_HASH:=75e0be55e779a6c1f582bf12f5f98ac175404be9172750c1c1015ad78aa8aa3d
 
 PKG_TARGETS:=bin
 PKG_FLAGS:=nonshared
diff --git a/package/boot/arm-trusted-firmware-bcm63xx/Makefile b/package/boot/arm-trusted-firmware-bcm63xx/Makefile
index 69289af2d9..bcb5ce9892 100644
--- a/package/boot/arm-trusted-firmware-bcm63xx/Makefile
+++ b/package/boot/arm-trusted-firmware-bcm63xx/Makefile
@@ -9,7 +9,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/bcm63xx/atf.git
 PKG_SOURCE_DATE:=2021-12-24
 PKG_SOURCE_VERSION:=e6d46baf3fae79f693f90bf34f7284c3dfc64aef
-PKG_MIRROR_HASH:=9d5d04f572b1b6ddc6eb3064b9cb09f5fe982e82d350790041d35316349af124
+PKG_MIRROR_HASH:=5646abc01152210a8181455151f01145001d61b3fb09619b1cee48008e36b0fa
 
 PKG_MAINTAINER:=Rafa? Mi?ecki <rafal at milecki.pl>
 
diff --git a/package/boot/arm-trusted-firmware-mediatek/Makefile b/package/boot/arm-trusted-firmware-mediatek/Makefile
index 70190b7618..c065c7e67d 100644
--- a/package/boot/arm-trusted-firmware-mediatek/Makefile
+++ b/package/boot/arm-trusted-firmware-mediatek/Makefile
@@ -15,7 +15,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/mtk-openwrt/arm-trusted-firmware.git
 PKG_SOURCE_DATE:=2023-10-13
 PKG_SOURCE_VERSION:=0ea67d76ae8be127c91caa3fcdf449b1fe533175
-PKG_MIRROR_HASH:=ad538e7304f8fae280491104b2128d9b7626c5da49216149a25921905590cb62
+PKG_MIRROR_HASH:=22579fae08de942e0d5a420cfaa0b1d310dc9431e85b7e28a3c3ef08331a199d
 
 PKG_MAINTAINER:=Daniel Golle <daniel at makrotopia.org>
 
diff --git a/package/boot/at91bootstrap/Makefile b/package/boot/at91bootstrap/Makefile
index f27a3f01dc..a2a1f2bddb 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -10,7 +10,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=at91bootstrap
 PKG_VERSION:=v4.0.3
-PKG_MIRROR_HASH:=1ecdc31a13350fcdcaa3f77ed8ad73906f79fc668dbb2f337e1d5dd877bf9882
+PKG_MIRROR_HASH:=9c1d42337294b549e6c229ae4c9996efd21e00ae5f968bd780d352e054e24cb7
 PKG_SOURCE_VERSION:=1d9e673698d9db4a4f2301559f481274de2e75ae
 BINARIES_DIR:=build/binaries
 PKG_CPE_ID:=cpe:/a:linux4sam:at91bootstrap
diff --git a/package/boot/opensbi/Makefile b/package/boot/opensbi/Makefile
index c9f104845f..99a4631630 100644
--- a/package/boot/opensbi/Makefile
+++ b/package/boot/opensbi/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/riscv/opensbi
 PKG_SOURCE_DATE:=2022-12-24
 PKG_SOURCE_VERSION:=6b5188ca14e59ce7bf71afe4e7d3d557c3d31bf8
-PKG_MIRROR_HASH:=72096b51297b0fa9375500dab2e85e42fe32127b041dee073ecd14eb13906465
+PKG_MIRROR_HASH:=5939a3225cb37c1dde0b5b9f28f9980c0712533676774ae244d6d84bb09a1439
 
 PKG_BUILD_DIR=$(BUILD_DIR)/$(PKG_NAME)-$(BUILD_VARIANT)/$(PKG_NAME)-$(PKG_VERSION)
 
diff --git a/package/boot/rkbin/Makefile b/package/boot/rkbin/Makefile
index 253d8f52b9..3b6cc0d42c 100644
--- a/package/boot/rkbin/Makefile
+++ b/package/boot/rkbin/Makefile
@@ -11,7 +11,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/rockchip-linux/rkbin.git
 PKG_SOURCE_DATE:=2023-07-26
 PKG_SOURCE_VERSION:=b4558da0860ca48bf1a571dd33ccba580b9abe23
-PKG_MIRROR_HASH:=8c6259c64ee53f596ac15dbedd0541ca9af40cdf3951d40f030ea00b94379009
+PKG_MIRROR_HASH:=7cd2cb8357fa850eb4eef94db49a2c46cf910bfe4e673eff9071413bb002afc9
 
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Tianling Shen <cnsztl at immortalwrt.org>
diff --git a/package/boot/tfa-layerscape/Makefile b/package/boot/tfa-layerscape/Makefile
index 3509658869..b92516ceb0 100644
--- a/package/boot/tfa-layerscape/Makefile
+++ b/package/boot/tfa-layerscape/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/atf
 PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=c0e3c7d0cc9ee5f9ae68cd705ce7f07f714c4fe3fd4a5a79de5699e7865b759f
+PKG_MIRROR_HASH:=e109ca87a0f432529ab4d1fcd019adc0cd0d3684c96cdf770aac113f9bbe4bd6
 PKG_BUILD_DEPENDS:=tfa-layerscape/host
 
 include $(INCLUDE_DIR)/host-build.mk
diff --git a/package/boot/uboot-at91/Makefile b/package/boot/uboot-at91/Makefile
index afab24e841..81ea22ded6 100644
--- a/package/boot/uboot-at91/Makefile
+++ b/package/boot/uboot-at91/Makefile
@@ -12,7 +12,7 @@ PKG_RELEASE:=3
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/linux4sam/u-boot-at91.git
-PKG_MIRROR_HASH:=56bbac45f71aaf39b365661db2a76c6c8415e27f7147b27bb58312b12756c8f3
+PKG_MIRROR_HASH:=82229503800d9a624bb8de5f8d7a84cb35fd512a1550c6f1d46958cd47d4807b
 PKG_SOURCE_VERSION:=7b59654a486d39dc8e0343e2554699b8a79c7a54
 
 include $(INCLUDE_DIR)/u-boot.mk
diff --git a/package/boot/uboot-bcm4908/Makefile b/package/boot/uboot-bcm4908/Makefile
index 1e6e04c287..7bc4986007 100644
--- a/package/boot/uboot-bcm4908/Makefile
+++ b/package/boot/uboot-bcm4908/Makefile
@@ -9,7 +9,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://git.openwrt.org/project/bcm63xx/u-boot.git
 PKG_SOURCE_DATE:=2022-12-08
 PKG_SOURCE_VERSION:=4435700d18a791dca0d8d767e5414dfac9df4451
-PKG_MIRROR_HASH:=a05c13451cd311f3b32c734cfc341e76007c8c6ed1eeb27aee7b0651609b7be3
+PKG_MIRROR_HASH:=80de483c11938cca9fdd0f35931cce1921c8166d9c1c146da56bf155394842cb
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-fritz4040/Makefile b/package/boot/uboot-fritz4040/Makefile
index 29130fc596..6fa4d14814 100644
--- a/package/boot/uboot-fritz4040/Makefile
+++ b/package/boot/uboot-fritz4040/Makefile
@@ -12,7 +12,7 @@ PKG_SOURCE_URL:=https://github.com/chunkeey/FritzBox-4040-UBOOT
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_VERSION:=9d89013f9cc963eca25856c61fa066091d35f8de
 PKG_SOURCE_DATE:=2022-05-01
-PKG_MIRROR_HASH:=7c60ca967b607c9b43f54dd75e6126f63935e21e330bbf80f07d210889bb6c2d
+PKG_MIRROR_HASH:=4e8106a7877ae6aa8da44bf95401b860d11f7d51417cc5a61ce59a353d4ee866
 
 PKG_RELEASE:=5
 
diff --git a/package/boot/uboot-layerscape/Makefile b/package/boot/uboot-layerscape/Makefile
index e255debfeb..8c5e32587d 100644
--- a/package/boot/uboot-layerscape/Makefile
+++ b/package/boot/uboot-layerscape/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/u-boot
 PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=f4a3a262fd8923af72dede0348a512c05b756e3925279553eaf1c6667b186fb4
+PKG_MIRROR_HASH:=6cb3cd569f11f582375eb3af475a2a0d77fe602813337b64883ef01344be7bf6
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/firmware/layerscape/fman-ucode/Makefile b/package/firmware/layerscape/fman-ucode/Makefile
index fdd4659851..99729e0b83 100644
--- a/package/firmware/layerscape/fman-ucode/Makefile
+++ b/package/firmware/layerscape/fman-ucode/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/qoriq-fm-ucode
 PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=3614200837945460374570a48822a3efb96a64b93724e7f973e61008baeccf3a
+PKG_MIRROR_HASH:=d69792e0b03f2fd00cb9d69325d9817b43fb14dd1b27e41018b3ea69b25c55a5
 
 PKG_FLAGS:=nonshared
 
diff --git a/package/firmware/layerscape/ls-ddr-phy/Makefile b/package/firmware/layerscape/ls-ddr-phy/Makefile
index 28e1355073..848ee4e85f 100644
--- a/package/firmware/layerscape/ls-ddr-phy/Makefile
+++ b/package/firmware/layerscape/ls-ddr-phy/Makefile
@@ -12,7 +12,7 @@ PKG_RELEASE:=3
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/NXP/ddr-phy-binary.git
 PKG_SOURCE_VERSION:=LSDK-21.08
-PKG_MIRROR_HASH:=0fb35c697f4b4274577cce63223198f5c7715164a2c5d09a55c46ef17639ed4b
+PKG_MIRROR_HASH:=2f9bf4f6b2410e436e4e606f981c71919b1896e4da4f204de483d9f7677a064d
 PKG_BUILD_DEPENDS:=tfa-layerscape/host
 
 PKG_LICENSE:=EULA
diff --git a/package/firmware/layerscape/ls-dpl/Makefile b/package/firmware/layerscape/ls-dpl/Makefile
index 7ceba620bb..058fe5443b 100644
--- a/package/firmware/layerscape/ls-dpl/Makefile
+++ b/package/firmware/layerscape/ls-dpl/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/mc-utils
 PKG_SOURCE_VERSION:=mc_release_10.38.0
-PKG_MIRROR_HASH:=c5032ad73a04cf7fa23a2afeee85108677e665871a6c48ca352f415eea9b6390
+PKG_MIRROR_HASH:=9ada83ac4cc259cdf2ea2ebfc2328292f7dace701bfac2b5514749bd9f8315f0
 
 PKG_FLAGS:=nonshared
 
diff --git a/package/firmware/layerscape/ls-mc/Makefile b/package/firmware/layerscape/ls-mc/Makefile
index 3ef5a78327..4d01a531cd 100644
--- a/package/firmware/layerscape/ls-mc/Makefile
+++ b/package/firmware/layerscape/ls-mc/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/NXP/qoriq-mc-binary.git
 PKG_SOURCE_VERSION:=mc_release_10.38.0
-PKG_MIRROR_HASH:=b4482690246f9bd6a8728c482fd391ccf9b25a104b02f08add6e5c5d43a5ad75
+PKG_MIRROR_HASH:=4bd0eab4b600d6dee67b4c5b32624a92fd84e6c93f506e46a4fe52217e2d1593
 
 PKG_FLAGS:=nonshared
 
diff --git a/package/firmware/layerscape/ls-rcw/Makefile b/package/firmware/layerscape/ls-rcw/Makefile
index 1569f1042e..3565c540d7 100644
--- a/package/firmware/layerscape/ls-rcw/Makefile
+++ b/package/firmware/layerscape/ls-rcw/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/rcw
 PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=3127285549a0a7dd3cded20c2fbfb67b06943faa8dab529f61936dc1bea177db
+PKG_MIRROR_HASH:=6d505c1a60046a79c91b69cd6e26a2ef3515d7cb2999bdc9defcb664a1a5aef9
 
 PKG_FLAGS:=nonshared
 
diff --git a/package/firmware/layerscape/ppfe-firmware/Makefile b/package/firmware/layerscape/ppfe-firmware/Makefile
index 86f6194125..b6a251098e 100644
--- a/package/firmware/layerscape/ppfe-firmware/Makefile
+++ b/package/firmware/layerscape/ppfe-firmware/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/qoriq-engine-pfe-bin
 PKG_SOURCE_VERSION:=lf-6.1.1-1.0.0
-PKG_MIRROR_HASH:=eb1e3efe08980e70594060c84c1620a1dde53e00e96bae63d15dceb236c0bfa8
+PKG_MIRROR_HASH:=59f5660f1b93314e3e073053195719eab7361f07d1a9e02896f9356b1a615873
 
 PKG_FLAGS:=nonshared
 
diff --git a/package/kernel/bcm63xx-cfe/Makefile b/package/kernel/bcm63xx-cfe/Makefile
index dbd82403e9..62548a5761 100644
--- a/package/kernel/bcm63xx-cfe/Makefile
+++ b/package/kernel/bcm63xx-cfe/Makefile
@@ -8,7 +8,7 @@ PKG_SOURCE_URL:=https://github.com/openwrt/bcm63xx-cfe.git
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2021-06-22
 PKG_SOURCE_VERSION:=e5050f37150b34deb547b50feccd0e7439cb5bd7
-PKG_MIRROR_HASH:=a3e255903e398aa5627ab3a4b5fb2576f07e130a236e74f19d8b9830fe0d58f0
+PKG_MIRROR_HASH:=3b53abf21790e42707e20c73aff23fc32db9fdaf010da6f459a20a9e8f8feae6
 
 PKG_FLAGS:=nonshared
 
diff --git a/package/kernel/lantiq/ltq-vectoring/Makefile b/package/kernel/lantiq/ltq-vectoring/Makefile
index 7e25422f01..6076df7742 100644
--- a/package/kernel/lantiq/ltq-vectoring/Makefile
+++ b/package/kernel/lantiq/ltq-vectoring/Makefile
@@ -6,7 +6,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://gitlab.com/prpl-foundation/intel/ppa_drv.git
 PKG_SOURCE_DATE:=2019-05-20
 PKG_SOURCE_VERSION:=4fa7ac30fcc8ec4eddae9debba5f4230981f469f
-PKG_MIRROR_HASH:=444eb823dd9ddd25453976bf7a3230955e4148b8bf92f35f165ecffee32c4555
+PKG_MIRROR_HASH:=53ae72a929db598202a4e9c3df43b65fa0778cd165c1ec2ddf9361993795b930
 PKG_LICENSE:=GPL-2.0 BSD-2-Clause
 
 MAKE_PATH:=src/vectoring
diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
index e316869075..b55b4604ca 100644
--- a/package/kernel/mwlwifi/Makefile
+++ b/package/kernel/mwlwifi/Makefile
@@ -17,7 +17,7 @@ PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_DATE:=2023-11-29
 PKG_SOURCE_VERSION:=ebf3167445f108346dcff9a31a708534c0bd7cc5
-PKG_MIRROR_HASH:=402ca0023f03c631b1dcefb15345cdc0eb92a3359912bc0ee46e06f0c9ebbac1
+PKG_MIRROR_HASH:=6dffc08208305366b9c25133b74693d5c2e544c1076b7b4ed846628c66be56c1
 
 PKG_MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
 PKG_BUILD_PARALLEL:=1
diff --git a/package/network/utils/layerscape/restool/Makefile b/package/network/utils/layerscape/restool/Makefile
index 5919f42ff2..bca78fbda8 100644
--- a/package/network/utils/layerscape/restool/Makefile
+++ b/package/network/utils/layerscape/restool/Makefile
@@ -14,7 +14,7 @@ PKG_RELEASE:=4
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/nxp-qoriq/restool
 PKG_SOURCE_VERSION:=LSDK-21.08
-PKG_MIRROR_HASH:=0396644927b8f3da20183227562f695c8063d3d4c6bb606e8f31dda450e962e4
+PKG_MIRROR_HASH:=3c289e6c9adc2c61445473ecd8b1b1a7b6dfd19a66d3c65f3b83b669e4c3e25b
 
 PKG_FLAGS:=nonshared
 
diff --git a/package/utils/bcm27xx-utils/Makefile b/package/utils/bcm27xx-utils/Makefile
index ec41b70c30..9e113914e7 100644
--- a/package/utils/bcm27xx-utils/Makefile
+++ b/package/utils/bcm27xx-utils/Makefile
@@ -9,7 +9,7 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL:=https://github.com/raspberrypi/utils.git
 PKG_SOURCE_VERSION:=e65f5ec102e74218cda7da9fdc8b1caa0fd1127d
-PKG_MIRROR_HASH:=14f4aa1a8115240d702251bc399b53cbfa0928813f70a73ca27b22da94b696d2
+PKG_MIRROR_HASH:=ea946fc4a86875c5d1efc35b2bc80f6b5482afc3d1ea13853b69abc2b4a2eee6
 
 PKG_FLAGS:=nonshared
 PKG_BUILD_FLAGS:=no-lto
diff --git a/package/utils/debugcc/Makefile b/package/utils/debugcc/Makefile
index 2a72f17730..3e26cea7e5 100644
--- a/package/utils/debugcc/Makefile
+++ b/package/utils/debugcc/Makefile
@@ -7,7 +7,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/linux-msm/debugcc.git
 PKG_SOURCE_DATE:=2023-11-10
 PKG_SOURCE_VERSION:=d15bea7c05f224a85dd1fcec24b0f153dbad9f6e
-PKG_MIRROR_HASH:=b6bd181db4992cf429343cd7d0fdde0f937a8f1811f5fe9e7855a0d76b0d88a0
+PKG_MIRROR_HASH:=4cd7a770a05db28f496a60eb9fe015a4af677bba05053b4d4be21adcf95e52e5
 
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENSE
diff --git a/package/utils/firmware-utils/Makefile b/package/utils/firmware-utils/Makefile
index d9213d71c8..3a6467503c 100644
--- a/package/utils/firmware-utils/Makefile
+++ b/package/utils/firmware-utils/Makefile
@@ -9,7 +9,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware-utils.git
 PKG_SOURCE_DATE:=2024-03-23
 PKG_SOURCE_VERSION:=6b242991a995c41769977efb010dc9f4e4ec3da2
-PKG_MIRROR_HASH:=f8d84868487ec51ea4119fb5a48a181025ca272d8eb5b714068d0eec8db88d87
+PKG_MIRROR_HASH:=00ff2661fda2eb299ccbfaa07dff8fbcf46b3441a6e9f6f46eaa119e66dbe142
 
 PKG_BUILD_DEPENDS:=openssl zlib
 



From lede-commits at lists.infradead.org  Sun Apr  7 07:57:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 10:57:32 -0400
Subject: [openwrt/openwrt]  generic: backport at803x kernel panic fix
In-Reply-To: <171250185278.1861882.7204795606586723834@git-01.infra.openwrt.org>
References: <171250185278.1861882.7204795606586723834@git-01.infra.openwrt.org>
Message-ID: <mailman.24453.1712501862.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/449b5701d726a0b7ef7371bb94d0f36645a7a2bc

commit 449b5701d726a0b7ef7371bb94d0f36645a7a2bc
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun Apr 7 16:52:48 2024 +0200

    generic: backport at803x kernel panic fix
    
    Backport at803x kernel panic fix merged upstream for kernel 6.1 and 6.6.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...m-at803x-fix-kernel-panic-with-at8031_pro.patch | 45 ++++++++++++++++++++++
 ...m-at803x-fix-kernel-panic-with-at8031_pro.patch | 45 ++++++++++++++++++++++
 2 files changed, 90 insertions(+)

diff --git a/target/linux/generic/backport-6.1/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch b/target/linux/generic/backport-6.1/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch
new file mode 100644
index 0000000000..9b9ce2a3cd
--- /dev/null
+++ b/target/linux/generic/backport-6.1/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch
@@ -0,0 +1,45 @@
+From 6a4aee277740d04ac0fd54cfa17cc28261932ddc Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Mon, 25 Mar 2024 20:06:19 +0100
+Subject: [PATCH] net: phy: qcom: at803x: fix kernel panic with at8031_probe
+
+On reworking and splitting the at803x driver, in splitting function of
+at803x PHYs it was added a NULL dereference bug where priv is referenced
+before it's actually allocated and then is tried to write to for the
+is_1000basex and is_fiber variables in the case of at8031, writing on
+the wrong address.
+
+Fix this by correctly setting priv local variable only after
+at803x_probe is called and actually allocates priv in the phydev struct.
+
+Reported-by: William Wortel <wwortel at dorpstraat.com>
+Cc: <stable at vger.kernel.org>
+Fixes: 25d2ba94005f ("net: phy: at803x: move specific at8031 probe mode check to dedicated probe")
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/r/20240325190621.2665-1-ansuelsmth at gmail.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/phy/qcom/at803x.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/phy/qcom/at803x.c
++++ b/drivers/net/phy/qcom/at803x.c
+@@ -797,7 +797,7 @@ static int at8031_parse_dt(struct phy_de
+ 
+ static int at8031_probe(struct phy_device *phydev)
+ {
+-	struct at803x_priv *priv = phydev->priv;
++	struct at803x_priv *priv;
+ 	int mode_cfg;
+ 	int ccr;
+ 	int ret;
+@@ -806,6 +806,8 @@ static int at8031_probe(struct phy_devic
+ 	if (ret)
+ 		return ret;
+ 
++	priv = phydev->priv;
++
+ 	/* Only supported on AR8031/AR8033, the AR8030/AR8035 use strapping
+ 	 * options.
+ 	 */
diff --git a/target/linux/generic/backport-6.6/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch b/target/linux/generic/backport-6.6/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch
new file mode 100644
index 0000000000..9b9ce2a3cd
--- /dev/null
+++ b/target/linux/generic/backport-6.6/718-v6.9-net-phy-qcom-at803x-fix-kernel-panic-with-at8031_pro.patch
@@ -0,0 +1,45 @@
+From 6a4aee277740d04ac0fd54cfa17cc28261932ddc Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Mon, 25 Mar 2024 20:06:19 +0100
+Subject: [PATCH] net: phy: qcom: at803x: fix kernel panic with at8031_probe
+
+On reworking and splitting the at803x driver, in splitting function of
+at803x PHYs it was added a NULL dereference bug where priv is referenced
+before it's actually allocated and then is tried to write to for the
+is_1000basex and is_fiber variables in the case of at8031, writing on
+the wrong address.
+
+Fix this by correctly setting priv local variable only after
+at803x_probe is called and actually allocates priv in the phydev struct.
+
+Reported-by: William Wortel <wwortel at dorpstraat.com>
+Cc: <stable at vger.kernel.org>
+Fixes: 25d2ba94005f ("net: phy: at803x: move specific at8031 probe mode check to dedicated probe")
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Link: https://lore.kernel.org/r/20240325190621.2665-1-ansuelsmth at gmail.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/phy/qcom/at803x.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/phy/qcom/at803x.c
++++ b/drivers/net/phy/qcom/at803x.c
+@@ -797,7 +797,7 @@ static int at8031_parse_dt(struct phy_de
+ 
+ static int at8031_probe(struct phy_device *phydev)
+ {
+-	struct at803x_priv *priv = phydev->priv;
++	struct at803x_priv *priv;
+ 	int mode_cfg;
+ 	int ccr;
+ 	int ret;
+@@ -806,6 +806,8 @@ static int at8031_probe(struct phy_devic
+ 	if (ret)
+ 		return ret;
+ 
++	priv = phydev->priv;
++
+ 	/* Only supported on AR8031/AR8033, the AR8030/AR8035 use strapping
+ 	 * options.
+ 	 */



From lede-commits at lists.infradead.org  Sun Apr  7 08:11:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 11:11:57 -0400
Subject: [openwrt/openwrt]  at91bootstrap: update PKG_MIRROR_HASH to zstd for
 v3 at91bootstrap
In-Reply-To: <171250271746.1881079.3912365584805014879@git-01.infra.openwrt.org>
References: <171250271746.1881079.3912365584805014879@git-01.infra.openwrt.org>
Message-ID: <mailman.24454.1712502721.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/57c9cb421e428c840d5aa0d6c56aead952bfadb4

commit 57c9cb421e428c840d5aa0d6c56aead952bfadb4
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sun Apr 7 14:44:46 2024 +0200

    at91bootstrap: update PKG_MIRROR_HASH to zstd for v3 at91bootstrap
    
    So, when updating the hash for at91bootstrap it was done via CHECK_ALL=1
    so that updated the PKG_MIRROR_HASH for the main v4 version hash, but
    at91bootstrap checkout version depends on the subtarget as well.
    
    Choosing to build for sam9x will change the at91bootstrap version to v3
    and this hash was not refreshed thus causing the CI to fail.
    
    Fixes: 6918c637b797 ("treewide: package: update missed hashes after switch to ZSTD")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/boot/at91bootstrap/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/boot/at91bootstrap/Makefile b/package/boot/at91bootstrap/Makefile
index a2a1f2bddb..1b145c8a8b 100644
--- a/package/boot/at91bootstrap/Makefile
+++ b/package/boot/at91bootstrap/Makefile
@@ -26,7 +26,7 @@ endif
 
 ifeq ($(AT91BOOTSTRAP_V4),n)
   PKG_VERSION=v3.10.4
-  PKG_MIRROR_HASH=6fe61fe90838e785917383bb9e887fa05e1bd061a6725954242f504e38b5c426
+  PKG_MIRROR_HASH:=08ab81c37b995592992d6eda3f76ce9aad6e2b3e9d9c4f7e88c1ba8bb8346657
   PKG_SOURCE_VERSION=404846dd283894367a015ca59189bcf927d92e11
   BINARIES_DIR=binaries
 endif



From lede-commits at lists.infradead.org  Sun Apr  7 11:02:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 14:02:53 -0400
Subject: [openwrt/openwrt]  ustream-ssl: update to Git HEAD (2024-04-07)
In-Reply-To: <171251297311.2129022.13260521481466082532@git-01.infra.openwrt.org>
References: <171251297311.2129022.13260521481466082532@git-01.infra.openwrt.org>
Message-ID: <mailman.24471.1712512978.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/507b0286d9e5a06fc50fcad6e1b38f373f4beb13

commit 507b0286d9e5a06fc50fcad6e1b38f373f4beb13
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Apr 7 18:55:14 2024 +0200

    ustream-ssl: update to Git HEAD (2024-04-07)
    
    7621339d7694 mbedtls: fix build on non-linux systems
    268050964b08 ustream-mbedtls: add missing psa_crypto_init call
    956fba242ac0 add callbacks for debug messages
    9fdf3fb87af5 mbedtls: add TLS 1.3 ciphers
    28c4c1e6471b mbedtls: disable TLS 1.3 in client mode when skipping verification
    d61493a44204 mbedtls: add missing ifdef for build with disabled debug
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/ustream-ssl/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile
index 686a05cbe7..8537205fda 100644
--- a/package/libs/ustream-ssl/Makefile
+++ b/package/libs/ustream-ssl/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
-PKG_SOURCE_DATE:=2023-11-26
-PKG_SOURCE_VERSION:=263b9a97cf7e1e2467319c23832b705fc01190b5
-PKG_MIRROR_HASH:=b18a5e7510d3984829f1c2ad1850b101ed1931670cf556d509c0a91750aafcb3
+PKG_SOURCE_DATE:=2024-04-07
+PKG_SOURCE_VERSION:=d61493a4420417cbf9931ffee8c862faf04f2967
+PKG_MIRROR_HASH:=a420d775ad4928836e33e0d9423486fe4904555dbbfff283cd96370a49cf9659
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=ISC



From lede-commits at lists.infradead.org  Sun Apr  7 12:07:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 15:07:08 -0400
Subject: [openwrt/openwrt]  base-files: minor fix to mmc_get_mac_ascii
 function
In-Reply-To: <171251682863.2226519.6590898891753397508@git-01.infra.openwrt.org>
References: <171251682863.2226519.6590898891753397508@git-01.infra.openwrt.org>
Message-ID: <mailman.24491.1712516835.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8cf4ac5195476356a14678ae72897e563881b15e

commit 8cf4ac5195476356a14678ae72897e563881b15e
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Sat Apr 6 03:18:00 2024 -0300

    base-files: minor fix to mmc_get_mac_ascii function
    
    This is mostly a cosmetic cleanup. The absence of
    the return statement was not causing any problems.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
---
 package/base-files/files/lib/functions/system.sh | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh
index 107e67835a..23484c8ad9 100644
--- a/package/base-files/files/lib/functions/system.sh
+++ b/package/base-files/files/lib/functions/system.sh
@@ -205,6 +205,7 @@ mmc_get_mac_ascii() {
 	part=$(find_mmc_part "$part_name")
 	if [ -z "$part" ]; then
 		echo "mmc_get_mac_ascii: partition $part_name not found!" >&2
+		return
 	fi
 
 	get_mac_ascii "$part" "$key"



From lede-commits at lists.infradead.org  Sun Apr  7 13:14:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 16:14:01 -0400
Subject: [openwrt/openwrt]  bcm27xx: bcm2712: backport RP1 interrupt affinity
In-Reply-To: <171252084010.2314120.16625633189231580689@git-01.infra.openwrt.org>
References: <171252084010.2314120.16625633189231580689@git-01.infra.openwrt.org>
Message-ID: <mailman.24495.1712520846.1280.lede-commits@lists.infradead.org>

noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/65123335189e4600d7986e3d2fa461e6c823fb2d

commit 65123335189e4600d7986e3d2fa461e6c823fb2d
Author: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
AuthorDate: Sat Apr 6 17:56:37 2024 +0200

    bcm27xx: bcm2712: backport RP1 interrupt affinity
    
    Support for setting the CPU affinity on RP1 has been added to RPi linux v6.6
    
    Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
 ...-1-mfd-rp1-Support-interrupt-CPU-affinity.patch | 35 +++++++++++++++
 ...rl-rp1-Use-the-correct-per-bank-GPIO-base.patch | 30 +++++++++++++
 ...l-rp1-Allow-legacy-brcm-pins-on-all-banks.patch | 47 +++++++++++++++++++
 ...inctrl-rp1-Support-interrupt-CPU-affinity.patch | 52 ++++++++++++++++++++++
 ...rl-rp1-Clear-events-when-setting-IRQ-type.patch | 31 +++++++++++++
 5 files changed, 195 insertions(+)

diff --git a/target/linux/bcm27xx/patches-6.1/961-1-mfd-rp1-Support-interrupt-CPU-affinity.patch b/target/linux/bcm27xx/patches-6.1/961-1-mfd-rp1-Support-interrupt-CPU-affinity.patch
new file mode 100644
index 0000000000..3d0aa360bf
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/961-1-mfd-rp1-Support-interrupt-CPU-affinity.patch
@@ -0,0 +1,35 @@
+From 877cf6ae71c8eb9315014b3b379d9519ae6401b4 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Wed, 3 Apr 2024 23:15:28 +0100
+Subject: [PATCH 1/5] mfd: rp1: Support interrupt CPU affinity
+
+See: https://github.com/raspberrypi/linux/issues/6077
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ drivers/mfd/rp1.c | 9 +++++++++
+ 1 file changed, 9 insertions(+)
+
+--- a/drivers/mfd/rp1.c
++++ b/drivers/mfd/rp1.c
+@@ -141,11 +141,20 @@ static int rp1_irq_set_type(struct irq_d
+ 	return ret;
+ }
+ 
++static int rp1_irq_set_affinity(struct irq_data *irqd, const struct cpumask *dest, bool force)
++{
++	struct rp1_dev *rp1 = irqd->domain->host_data;
++	struct irq_data *pcie_irqd = rp1->pcie_irqds[irqd->hwirq];
++
++	return msi_domain_set_affinity(pcie_irqd, dest, force);
++}
++
+ static struct irq_chip rp1_irq_chip = {
+ 	.name            = "rp1_irq_chip",
+ 	.irq_mask        = rp1_mask_irq,
+ 	.irq_unmask      = rp1_unmask_irq,
+ 	.irq_set_type    = rp1_irq_set_type,
++	.irq_set_affinity = rp1_irq_set_affinity,
+ };
+ 
+ static void rp1_chained_handle_irq(struct irq_desc *desc)
diff --git a/target/linux/bcm27xx/patches-6.1/961-2-pinctrl-rp1-Use-the-correct-per-bank-GPIO-base.patch b/target/linux/bcm27xx/patches-6.1/961-2-pinctrl-rp1-Use-the-correct-per-bank-GPIO-base.patch
new file mode 100644
index 0000000000..213df3f7fb
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/961-2-pinctrl-rp1-Use-the-correct-per-bank-GPIO-base.patch
@@ -0,0 +1,30 @@
+From d11b1d7f7df4bd1a5ab4df35b2a5c8569f2eacbe Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Thu, 4 Apr 2024 10:47:46 +0100
+Subject: [PATCH 2/5] pinctrl: rp1: Use the correct per-bank GPIO base
+
+The GPIO start for each bank - min_gpio - must be used in the IRQ
+handler.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ drivers/pinctrl/pinctrl-rp1.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/pinctrl/pinctrl-rp1.c
++++ b/drivers/pinctrl/pinctrl-rp1.c
+@@ -781,12 +781,12 @@ static void rp1_gpio_irq_handler(struct
+ 
+ 	ints = readl(pc->gpio_base + bank->ints_offset);
+ 	for_each_set_bit(b, &ints, 32) {
+-		struct rp1_pin_info *pin = rp1_get_pin(chip, b);
++		struct rp1_pin_info *pin = rp1_get_pin(chip, bank->min_gpio + b);
+ 
+ 		writel(RP1_GPIO_CTRL_IRQRESET,
+ 		       pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL);
+ 		generic_handle_irq(irq_linear_revmap(pc->gpio_chip.irq.domain,
+-						     bank->gpio_offset + b));
++						     bank->min_gpio + b));
+ 	}
+ 
+ 	chained_irq_exit(host_chip, desc);
diff --git a/target/linux/bcm27xx/patches-6.1/961-3-pinctrl-rp1-Allow-legacy-brcm-pins-on-all-banks.patch b/target/linux/bcm27xx/patches-6.1/961-3-pinctrl-rp1-Allow-legacy-brcm-pins-on-all-banks.patch
new file mode 100644
index 0000000000..4550188cb4
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/961-3-pinctrl-rp1-Allow-legacy-brcm-pins-on-all-banks.patch
@@ -0,0 +1,47 @@
+From d81e2fafab376d3975c46c5f477945384a38524d Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Thu, 4 Apr 2024 10:50:32 +0100
+Subject: [PATCH 3/5] pinctrl: rp1: Allow legacy brcm,pins on all banks
+
+Support the use of the brcm,pins property for GPIOs in banks 1 and 2,
+but only for inputs and outputs - no other legacy mapping.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ drivers/pinctrl/pinctrl-rp1.c | 18 ++++++++++--------
+ 1 file changed, 10 insertions(+), 8 deletions(-)
+
+--- a/drivers/pinctrl/pinctrl-rp1.c
++++ b/drivers/pinctrl/pinctrl-rp1.c
+@@ -981,7 +981,16 @@ static int rp1_pctl_legacy_map_func(stru
+ 		return -EINVAL;
+ 	}
+ 
+-	func = legacy_fsel_map[pin][fnum];
++	if (pin < ARRAY_SIZE(legacy_fsel_map)) {
++		func = legacy_fsel_map[pin][fnum];
++	} else if (fnum < 2) {
++		func = func_gpio;
++	} else {
++		dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n",
++			np, pin);
++		return -EINVAL;
++	}
++
+ 	if (func == func_invalid) {
+ 		dev_err(pc->dev, "%pOF: brcm,function %d not supported on pin %d\n",
+ 			np, fnum, pin);
+@@ -1104,13 +1113,6 @@ static int rp1_pctl_dt_node_to_map(struc
+ 		err = of_property_read_u32_index(np, "brcm,pins", i, &pin);
+ 		if (err)
+ 			goto out;
+-		if (pin >= ARRAY_SIZE(legacy_fsel_map)) {
+-			dev_err(pc->dev, "%pOF: invalid brcm,pins value %d\n",
+-				np, pin);
+-			err = -EINVAL;
+-			goto out;
+-		}
+-
+ 		if (num_funcs) {
+ 			err = of_property_read_u32_index(np, "brcm,function",
+ 							 (num_funcs > 1) ? i : 0,
diff --git a/target/linux/bcm27xx/patches-6.1/961-4-pinctrl-rp1-Support-interrupt-CPU-affinity.patch b/target/linux/bcm27xx/patches-6.1/961-4-pinctrl-rp1-Support-interrupt-CPU-affinity.patch
new file mode 100644
index 0000000000..6d418626dc
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/961-4-pinctrl-rp1-Support-interrupt-CPU-affinity.patch
@@ -0,0 +1,52 @@
+From 086480cc43b9d967647b237a84623b27b8850a64 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Wed, 3 Apr 2024 23:16:47 +0100
+Subject: [PATCH 4/5] pinctrl: rp1: Support interrupt CPU affinity
+
+See: https://github.com/raspberrypi/linux/issues/6077
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ drivers/pinctrl/pinctrl-rp1.c | 24 ++++++++++++++++++++++++
+ 1 file changed, 24 insertions(+)
+
+--- a/drivers/pinctrl/pinctrl-rp1.c
++++ b/drivers/pinctrl/pinctrl-rp1.c
+@@ -894,6 +894,29 @@ static void rp1_gpio_irq_ack(struct irq_
+ 	writel(RP1_GPIO_CTRL_IRQRESET, pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL);
+ }
+ 
++static int rp1_gpio_irq_set_affinity(struct irq_data *data, const struct cpumask *dest, bool force)
++{
++	struct gpio_chip *chip = irq_data_get_irq_chip_data(data);
++	struct rp1_pinctrl *pc = gpiochip_get_data(chip);
++	const struct rp1_iobank_desc *bank;
++	struct irq_data *parent_data = NULL;
++	int i;
++
++	for (i = 0; i < 3; i++) {
++		bank = &rp1_iobanks[i];
++		if (data->hwirq >= bank->min_gpio &&
++		    data->hwirq < bank->min_gpio + bank->num_gpios) {
++			parent_data = irq_get_irq_data(pc->irq[i]);
++			break;
++		}
++	}
++
++	if (parent_data && parent_data->chip->irq_set_affinity)
++		return parent_data->chip->irq_set_affinity(parent_data, dest, force);
++
++	return -EINVAL;
++}
++
+ static struct irq_chip rp1_gpio_irq_chip = {
+ 	.name = MODULE_NAME,
+ 	.irq_enable = rp1_gpio_irq_enable,
+@@ -902,6 +925,7 @@ static struct irq_chip rp1_gpio_irq_chip
+ 	.irq_ack = rp1_gpio_irq_ack,
+ 	.irq_mask = rp1_gpio_irq_disable,
+ 	.irq_unmask = rp1_gpio_irq_enable,
++	.irq_set_affinity = rp1_gpio_irq_set_affinity,
+ 	.flags = IRQCHIP_IMMUTABLE,
+ };
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/961-5-pinctrl-rp1-Clear-events-when-setting-IRQ-type.patch b/target/linux/bcm27xx/patches-6.1/961-5-pinctrl-rp1-Clear-events-when-setting-IRQ-type.patch
new file mode 100644
index 0000000000..afb3d965bd
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/961-5-pinctrl-rp1-Clear-events-when-setting-IRQ-type.patch
@@ -0,0 +1,31 @@
+From ba9f37cecf19e4d2b5cc7186d054735e3cc7a4a2 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Thu, 4 Apr 2024 11:52:33 +0100
+Subject: [PATCH 5/5] pinctrl: rp1: Clear events when setting IRQ type
+
+When setting the interrupt type, it is unlikely that any latched events
+are of interest, so clear them.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ drivers/pinctrl/pinctrl-rp1.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/pinctrl/pinctrl-rp1.c
++++ b/drivers/pinctrl/pinctrl-rp1.c
+@@ -848,10 +848,13 @@ static int rp1_irq_set_type(struct rp1_p
+ 		return -EINVAL;
+ 	}
+ 
+-	/* Clear them all */
++	/* Clear the event enables */
+ 	writel(RP1_INT_MASK << RP1_GPIO_EVENTS_SHIFT_RAW,
+ 	       pin->gpio + RP1_CLR_OFFSET + RP1_GPIO_CTRL);
+-	/* Set those that are needed */
++	/* Clear any latched events */
++	writel(RP1_GPIO_CTRL_IRQRESET,
++		pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL);
++	/* Enable the events that are needed */
+ 	writel(irq_flags << RP1_GPIO_EVENTS_SHIFT_RAW,
+ 	       pin->gpio + RP1_SET_OFFSET + RP1_GPIO_CTRL);
+ 	pin->irq_type = type;



From lede-commits at lists.infradead.org  Sun Apr  7 13:14:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 16:14:00 -0400
Subject: [openwrt/openwrt]  bcm27xx: update 6.1 patches from RPi foundation
In-Reply-To: <171252084010.2314120.16625633189231580689@git-01.infra.openwrt.org>
References: <171252084010.2314120.16625633189231580689@git-01.infra.openwrt.org>
Message-ID: <mailman.24496.1712520848.1280.lede-commits@lists.infradead.org>

noltari pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/20fe7e687e59bdc787362585f154a71227add004

commit 20fe7e687e59bdc787362585f154a71227add004
Author: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
AuthorDate: Sat Apr 6 17:30:49 2024 +0200

    bcm27xx: update 6.1 patches from RPi foundation
    
    Sync 6.1 patches with the RPi foundation.
    Since rpi-6.6.y is now the main branch of the RPi foundation, there won't be
    any new patches for linux 6.1.
    
    Signed-off-by: ?lvaro Fern?ndez Rojas <noltari at gmail.com>
---
 target/linux/bcm27xx/bcm2708/config-6.1            |   3 +
 target/linux/bcm27xx/bcm2709/config-6.1            |   3 +
 target/linux/bcm27xx/bcm2710/config-6.1            |   3 +
 target/linux/bcm27xx/bcm2711/config-6.1            |   3 +
 target/linux/bcm27xx/bcm2712/config-6.1            |   3 +
 ...-v3d-Improve-MMU-support-for-larger-pages.patch |  64 ---
 ...-i2c-designware-Look-for-CNT-values-in-DT.patch |  57 ---
 .../950-1227-dts-rp1-Add-I2C-timings.patch         | 103 -----
 ...imise-vc4_hvs_dlist_free_work-to-only-rea.patch |  45 +++
 ...sh-stale-dlist-entries-if-allocation-fail.patch |  69 ++++
 ...-t-export-the-button-GPIO-via-sysfs-GPIO-.patch |  55 +++
 ...d-out-the-SPI-speed-to-use-from-the-Devic.patch |  94 +++++
 ...-the-spi-speed-hz-for-Pisound-in-the-Devi.patch | 129 ++++++
 ...-on-backup-switchover-mode-overlay-value-.patch |  51 +++
 ...-the-improvement-on-backup-switchover-mod.patch |  30 ++
 ...bit-dma-overlay-pi5-to-enable-32bit-DMA-o.patch |  85 ++++
 ...ignware-Use-SCL-rise-and-fall-times-in-DT.patch |  91 +++++
 ...esignware-Support-non-standard-bus-speeds.patch |  80 ++++
 .../950-1259-ARM-dts-rp1-Add-I2C-timings.patch     |  78 ++++
 ...mu-bcm2712-don-t-allow-building-as-module.patch |  28 ++
 ...-rp1-depends-on-instead-of-select-MFD_RP1.patch |  59 +++
 .../950-1262-Update-touch-PiTFT-overlays.patch     | 435 +++++++++++++++++++++
 ...-ARM-dts-rp1-Boost-the-I2C-drive-strength.patch |  95 +++++
 ...-ARM-dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch |  75 ++++
 ...s-fix-16bit-sample-support-in-clock-consu.patch |  33 ++
 ...upport-for-AMP4-Pro-to-the-DAC-Plus-drive.patch | 114 ++++++
 ...rlays-adds-support-for-Hifiberry-AMP4-Pro.patch | 130 ++++++
 ...sADCPro-fix-16bit-sample-support-in-clock.patch |  38 ++
 ...-overlays-Correct-some-compatible-strings.patch |  72 ++++
 ...verlays-Delete-deprecated-overlay-mpu6050.patch |  57 +++
 ...ia-cfe-Increase-default-size-of-embedded-.patch |  36 ++
 ...-sc16is7xx-Don-t-spin-if-no-data-received.patch |  26 ++
 ...river-support-for-Interlude-Audio-Digital.patch | 196 ++++++++++
 ...s-needed-for-Interlude-Audio-Digital-and-.patch | 179 +++++++++
 ...v3d-Enable-V3D-to-use-different-PAGE_SIZE.patch | 118 ++++++
 ...ays-adau1977-adc-Replace-use-of-i2c-label.patch |  25 ++
 ...1281-Add-IQaudio-CodecZero-to-hat_map.dts.patch |  24 ++
 ...HiFiBerry-DAC8X-to-the-simple-card-driver.patch |  82 ++++
 ...d-definitions-for-HiFiBerry-8-channel-DAC.patch | 113 ++++++
 ...hvs-Fix-lbm-size-calculation-for-yuv-6012.patch |  31 ++
 ...iver-add-waveshare-4inch-dsi-lcd-C-driver.patch |  41 ++
 ...y-add-waveshare-4inch-dsi-lcd-C-dtoverlay.patch |  22 ++
 ...ix-waveshare-11.9inch-touch-orientation-e.patch |  22 ++
 ...dd-waveshare-4inch-dsi-lcd-C-parameters-t.patch |  21 +
 ...d-specific-clk-producer-consumer-overlays.patch | 223 +++++++++++
 ...1291-overlays-hat_map-Add-Hifiberry-cards.patch |  96 +++++
 ...bit-sample-support-for-Hifiberry-DACplusA.patch |  31 ++
 ...ts-i2s_clk_producer-as-default-for-Hifibe.patch |  79 ++++
 ...mx477-make-trigger-mode-more-configurable.patch |  77 ++++
 ...te-device-tree-overlays-to-support-trigge.patch | 129 ++++++
 50 files changed, 3529 insertions(+), 224 deletions(-)

diff --git a/target/linux/bcm27xx/bcm2708/config-6.1 b/target/linux/bcm27xx/bcm2708/config-6.1
index af5d0183ec..d874eb9f8a 100644
--- a/target/linux/bcm27xx/bcm2708/config-6.1
+++ b/target/linux/bcm27xx/bcm2708/config-6.1
@@ -169,6 +169,7 @@ CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_CLOCKEVENTS=y
@@ -229,6 +230,7 @@ CONFIG_LOGO_LINUX_CLUT224=y
 # CONFIG_LOGO_LINUX_VGA16 is not set
 CONFIG_MAC_PARTITION=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
 CONFIG_MAILBOX=y
 # CONFIG_MAILBOX_TEST is not set
 CONFIG_MDIO_BUS=y
@@ -290,6 +292,7 @@ CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_BCM2835=y
 CONFIG_PM=y
diff --git a/target/linux/bcm27xx/bcm2709/config-6.1 b/target/linux/bcm27xx/bcm2709/config-6.1
index 58d695cff3..4dcca5dd04 100644
--- a/target/linux/bcm27xx/bcm2709/config-6.1
+++ b/target/linux/bcm27xx/bcm2709/config-6.1
@@ -206,6 +206,7 @@ CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 CONFIG_GENERIC_BUG=y
@@ -287,6 +288,7 @@ CONFIG_LOGO_LINUX_CLUT224=y
 # CONFIG_LOGO_LINUX_VGA16 is not set
 CONFIG_MAC_PARTITION=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
 CONFIG_MAILBOX=y
 # CONFIG_MAILBOX_TEST is not set
 CONFIG_MDIO_BCM_UNIMAC=y
@@ -367,6 +369,7 @@ CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=3
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_BCM2835=y
diff --git a/target/linux/bcm27xx/bcm2710/config-6.1 b/target/linux/bcm27xx/bcm2710/config-6.1
index e5b357f2fa..8f262671c7 100644
--- a/target/linux/bcm27xx/bcm2710/config-6.1
+++ b/target/linux/bcm27xx/bcm2710/config-6.1
@@ -213,6 +213,7 @@ CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
@@ -286,6 +287,7 @@ CONFIG_LOGO_LINUX_CLUT224=y
 # CONFIG_LOGO_LINUX_VGA16 is not set
 CONFIG_MAC_PARTITION=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
 CONFIG_MAILBOX=y
 # CONFIG_MAILBOX_TEST is not set
 CONFIG_MDIO_BUS=y
@@ -358,6 +360,7 @@ CONFIG_PCI_MSI=y
 CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PGTABLE_LEVELS=3
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_BCM2835=y
diff --git a/target/linux/bcm27xx/bcm2711/config-6.1 b/target/linux/bcm27xx/bcm2711/config-6.1
index 2feb6e9aea..1556ae5593 100644
--- a/target/linux/bcm27xx/bcm2711/config-6.1
+++ b/target/linux/bcm27xx/bcm2711/config-6.1
@@ -213,6 +213,7 @@ CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
@@ -287,6 +288,7 @@ CONFIG_LOGO_LINUX_CLUT224=y
 # CONFIG_LOGO_LINUX_VGA16 is not set
 CONFIG_MAC_PARTITION=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
 CONFIG_MAILBOX=y
 # CONFIG_MAILBOX_TEST is not set
 CONFIG_MDIO_BCM_UNIMAC=y
@@ -362,6 +364,7 @@ CONFIG_PCI_MSI=y
 CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PGTABLE_LEVELS=3
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYS_ADDR_T_64BIT=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_BCM2835=y
diff --git a/target/linux/bcm27xx/bcm2712/config-6.1 b/target/linux/bcm27xx/bcm2712/config-6.1
index ddd29f78fb..ed2b623cfe 100644
--- a/target/linux/bcm27xx/bcm2712/config-6.1
+++ b/target/linux/bcm27xx/bcm2712/config-6.1
@@ -256,6 +256,7 @@ CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
 CONFIG_FW_LOADER_SYSFS=y
 CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GCC_SUPPORTS_DYNAMIC_FTRACE_WITH_REGS=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
@@ -360,6 +361,7 @@ CONFIG_MACB_PCI=y
 CONFIG_MACB_USE_HWSTAMP=y
 CONFIG_MAC_PARTITION=y
 CONFIG_MAGIC_SYSRQ=y
+CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0x1f6
 CONFIG_MAILBOX=y
 # CONFIG_MAILBOX_TEST is not set
 CONFIG_MDIO_BCM_UNIMAC=y
@@ -460,6 +462,7 @@ CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PCI_STUB=y
 CONFIG_PGTABLE_LEVELS=3
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PHYS_ADDR_T_64BIT=y
 # CONFIG_PHY_BRCM_SATA is not set
diff --git a/target/linux/bcm27xx/patches-6.1/950-0905-drm-v3d-Improve-MMU-support-for-larger-pages.patch b/target/linux/bcm27xx/patches-6.1/950-0905-drm-v3d-Improve-MMU-support-for-larger-pages.patch
deleted file mode 100644
index 3c53996ff0..0000000000
--- a/target/linux/bcm27xx/patches-6.1/950-0905-drm-v3d-Improve-MMU-support-for-larger-pages.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 12c7ea43b930976f35ce75d11fd3f55438868e13 Mon Sep 17 00:00:00 2001
-From: Phil Elwell <phil at raspberrypi.com>
-Date: Fri, 4 Aug 2023 11:26:10 +0100
-Subject: [PATCH] drm/v3d: Improve MMU support for larger pages
-
-The built-in MMU driver went most of the way towards supporting larger
-kernel pages, but dropped the ball when it comes to calculating indexes
-into the page table. Fix it.
-
-Signed-off-by: Phil Elwell <phil at raspberrypi.com>
----
- drivers/gpu/drm/v3d/v3d_mmu.c | 15 ++++++++-------
- 1 file changed, 8 insertions(+), 7 deletions(-)
-
---- a/drivers/gpu/drm/v3d/v3d_mmu.c
-+++ b/drivers/gpu/drm/v3d/v3d_mmu.c
-@@ -22,6 +22,7 @@
- #include "v3d_regs.h"
- 
- #define V3D_MMU_PAGE_SHIFT 12
-+#define V3D_PAGE_FACTOR (PAGE_SIZE >> V3D_MMU_PAGE_SHIFT)
- 
- /* Note: All PTEs for the 1MB superpage must be filled with the
-  * superpage bit set.
-@@ -88,7 +89,7 @@ void v3d_mmu_insert_ptes(struct v3d_bo *
- {
- 	struct drm_gem_shmem_object *shmem_obj = &bo->base;
- 	struct v3d_dev *v3d = to_v3d_dev(shmem_obj->base.dev);
--	u32 page = bo->node.start;
-+	u32 page = bo->node.start * V3D_PAGE_FACTOR;
- 	u32 page_prot = V3D_PTE_WRITEABLE | V3D_PTE_VALID;
- 	struct sg_dma_page_iter dma_iter;
- 
-@@ -98,13 +99,13 @@ void v3d_mmu_insert_ptes(struct v3d_bo *
- 		u32 pte = page_prot | page_address;
- 		u32 i;
- 
--		BUG_ON(page_address + (PAGE_SIZE >> V3D_MMU_PAGE_SHIFT) >=
-+		BUG_ON(page_address + V3D_PAGE_FACTOR >=
- 		       BIT(24));
--		for (i = 0; i < PAGE_SIZE >> V3D_MMU_PAGE_SHIFT; i++)
-+		for (i = 0; i < V3D_PAGE_FACTOR; i++)
- 			v3d->pt[page++] = pte + i;
- 	}
- 
--	WARN_ON_ONCE(page - bo->node.start !=
-+	WARN_ON_ONCE(page - (bo->node.start * V3D_PAGE_FACTOR) !=
- 		     shmem_obj->base.size >> V3D_MMU_PAGE_SHIFT);
- 
- 	if (v3d_mmu_flush_all(v3d))
-@@ -115,10 +116,10 @@ void v3d_mmu_remove_ptes(struct v3d_bo *
- {
- 	struct v3d_dev *v3d = to_v3d_dev(bo->base.base.dev);
- 	u32 npages = bo->base.base.size >> V3D_MMU_PAGE_SHIFT;
--	u32 page;
-+	u32 page = bo->node.start * V3D_PAGE_FACTOR;
- 
--	for (page = bo->node.start; page < bo->node.start + npages; page++)
--		v3d->pt[page] = 0;
-+	while (npages--)
-+		v3d->pt[page++] = 0;
- 
- 	if (v3d_mmu_flush_all(v3d))
- 		dev_err(v3d->drm.dev, "MMU flush timeout\n");
diff --git a/target/linux/bcm27xx/patches-6.1/950-1226-i2c-designware-Look-for-CNT-values-in-DT.patch b/target/linux/bcm27xx/patches-6.1/950-1226-i2c-designware-Look-for-CNT-values-in-DT.patch
deleted file mode 100644
index ccba16ad8e..0000000000
--- a/target/linux/bcm27xx/patches-6.1/950-1226-i2c-designware-Look-for-CNT-values-in-DT.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From 0a09088e24c013ef608b1bb79501ef890cefc767 Mon Sep 17 00:00:00 2001
-From: Phil Elwell <phil at raspberrypi.com>
-Date: Tue, 19 Dec 2023 11:16:25 +0000
-Subject: [PATCH] i2c: designware: Look for *CNT values in DT
-
-The i2c-designware driver supports reading precise timing values from
-ACPI, but the Device Tree support relies on a combination of standard
-rise and fall times and hard-coded minimum timings. The result of this
-is that it is difficult to get optimum timings, particularly given that
-the values are bus speed-specific and only one set can be stored in
-DT at a time.
-
-Add support for initialisation from DT that is similar to that for
-ACPI.
-
-Signed-off-by: Phil Elwell <phil at raspberrypi.com>
----
- drivers/i2c/busses/i2c-designware-platdrv.c | 18 ++++++++++++++++++
- 1 file changed, 18 insertions(+)
-
---- a/drivers/i2c/busses/i2c-designware-platdrv.c
-+++ b/drivers/i2c/busses/i2c-designware-platdrv.c
-@@ -132,9 +132,18 @@ static int mscc_twi_set_sda_hold_time(st
- 	return 0;
- }
- 
-+static void dw_i2c_read_of_cnt(struct device_node *np, const char *name, u16 *pval)
-+{
-+	u32 val;
-+
-+	if (!of_property_read_u32(np, name, &val))
-+		*pval = (u16)val;
-+}
-+
- static int dw_i2c_of_configure(struct platform_device *pdev)
- {
- 	struct dw_i2c_dev *dev = platform_get_drvdata(pdev);
-+	struct device_node *np = pdev->dev.of_node;
- 
- 	switch (dev->flags & MODEL_MASK) {
- 	case MODEL_MSCC_OCELOT:
-@@ -146,6 +155,15 @@ static int dw_i2c_of_configure(struct pl
- 		break;
- 	}
- 
-+	dw_i2c_read_of_cnt(np, "snps,ss_hcnt", &dev->ss_hcnt);
-+	dw_i2c_read_of_cnt(np, "snps,ss_lcnt", &dev->ss_lcnt);
-+	dw_i2c_read_of_cnt(np, "snps,fs_hcnt", &dev->fs_hcnt);
-+	dw_i2c_read_of_cnt(np, "snps,fs_lcnt", &dev->fs_lcnt);
-+	dw_i2c_read_of_cnt(np, "snps,fp_hcnt", &dev->fp_hcnt);
-+	dw_i2c_read_of_cnt(np, "snps,fp_lcnt", &dev->fp_lcnt);
-+	dw_i2c_read_of_cnt(np, "snps,hs_hcnt", &dev->hs_hcnt);
-+	dw_i2c_read_of_cnt(np, "snps,hs_lcnt", &dev->hs_lcnt);
-+
- 	return 0;
- }
- 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1227-dts-rp1-Add-I2C-timings.patch b/target/linux/bcm27xx/patches-6.1/950-1227-dts-rp1-Add-I2C-timings.patch
deleted file mode 100644
index 892f31ec9f..0000000000
--- a/target/linux/bcm27xx/patches-6.1/950-1227-dts-rp1-Add-I2C-timings.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 660d569b1a623e4b64350e608bbf8bc2cc6332e9 Mon Sep 17 00:00:00 2001
-From: Phil Elwell <phil at raspberrypi.com>
-Date: Tue, 19 Dec 2023 11:27:20 +0000
-Subject: [PATCH] dts: rp1: Add I2C timings
-
-Signed-off-by: Phil Elwell <phil at raspberrypi.com>
----
- arch/arm/boot/dts/rp1.dtsi | 42 ++++++++++++++++++++++++++++++++++++++
- 1 file changed, 42 insertions(+)
-
---- a/arch/arm/boot/dts/rp1.dtsi
-+++ b/arch/arm/boot/dts/rp1.dtsi
-@@ -305,6 +305,12 @@
- 			compatible = "snps,designware-i2c";
- 			interrupts = <RP1_INT_I2C0 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&rp1_clocks RP1_CLK_SYS>;
-+			snps,ss_hcnt = <978>;
-+			snps,ss_lcnt = <990>;
-+			snps,fs_hcnt = <200>;
-+			snps,fs_lcnt = <268>;
-+			snps,fp_hcnt = <60>;
-+			snps,fp_lcnt = <107>;
- 			status = "disabled";
- 		};
- 
-@@ -313,6 +319,12 @@
- 			compatible = "snps,designware-i2c";
- 			interrupts = <RP1_INT_I2C1 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&rp1_clocks RP1_CLK_SYS>;
-+			snps,ss_hcnt = <978>;
-+			snps,ss_lcnt = <990>;
-+			snps,fs_hcnt = <200>;
-+			snps,fs_lcnt = <268>;
-+			snps,fp_hcnt = <60>;
-+			snps,fp_lcnt = <107>;
- 			status = "disabled";
- 		};
- 
-@@ -321,6 +333,12 @@
- 			compatible = "snps,designware-i2c";
- 			interrupts = <RP1_INT_I2C2 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&rp1_clocks RP1_CLK_SYS>;
-+			snps,ss_hcnt = <978>;
-+			snps,ss_lcnt = <990>;
-+			snps,fs_hcnt = <200>;
-+			snps,fs_lcnt = <268>;
-+			snps,fp_hcnt = <60>;
-+			snps,fp_lcnt = <107>;
- 			status = "disabled";
- 		};
- 
-@@ -329,6 +347,12 @@
- 			compatible = "snps,designware-i2c";
- 			interrupts = <RP1_INT_I2C3 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&rp1_clocks RP1_CLK_SYS>;
-+			snps,ss_hcnt = <978>;
-+			snps,ss_lcnt = <990>;
-+			snps,fs_hcnt = <200>;
-+			snps,fs_lcnt = <268>;
-+			snps,fp_hcnt = <60>;
-+			snps,fp_lcnt = <107>;
- 			status = "disabled";
- 		};
- 
-@@ -337,6 +361,12 @@
- 			compatible = "snps,designware-i2c";
- 			interrupts = <RP1_INT_I2C4 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&rp1_clocks RP1_CLK_SYS>;
-+			snps,ss_hcnt = <978>;
-+			snps,ss_lcnt = <990>;
-+			snps,fs_hcnt = <200>;
-+			snps,fs_lcnt = <268>;
-+			snps,fp_hcnt = <60>;
-+			snps,fp_lcnt = <107>;
- 			status = "disabled";
- 		};
- 
-@@ -345,6 +375,12 @@
- 			compatible = "snps,designware-i2c";
- 			interrupts = <RP1_INT_I2C5 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&rp1_clocks RP1_CLK_SYS>;
-+			snps,ss_hcnt = <978>;
-+			snps,ss_lcnt = <990>;
-+			snps,fs_hcnt = <200>;
-+			snps,fs_lcnt = <268>;
-+			snps,fp_hcnt = <60>;
-+			snps,fp_lcnt = <107>;
- 			status = "disabled";
- 		};
- 
-@@ -353,6 +389,12 @@
- 			compatible = "snps,designware-i2c";
- 			interrupts = <RP1_INT_I2C6 IRQ_TYPE_LEVEL_HIGH>;
- 			clocks = <&rp1_clocks RP1_CLK_SYS>;
-+			snps,ss_hcnt = <978>;
-+			snps,ss_lcnt = <990>;
-+			snps,fs_hcnt = <200>;
-+			snps,fs_lcnt = <268>;
-+			snps,fp_hcnt = <60>;
-+			snps,fp_lcnt = <107>;
- 			status = "disabled";
- 		};
- 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1247-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch b/target/linux/bcm27xx/patches-6.1/950-1247-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch
new file mode 100644
index 0000000000..1e2893381d
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1247-drm-vc4-Optimise-vc4_hvs_dlist_free_work-to-only-rea.patch
@@ -0,0 +1,45 @@
+From d8e53e0b83c947123c38c81d2fb5162c86d26fb5 Mon Sep 17 00:00:00 2001
+From: Dave Stevenson <dave.stevenson at raspberrypi.com>
+Date: Thu, 4 Jan 2024 12:39:33 +0000
+Subject: [PATCH 1247/1295] drm/vc4: Optimise vc4_hvs_dlist_free_work to only
+ read frcnt and active once
+
+vc4_hvs_dlist_free_work was iterating through the list of stale
+dlist entries and reading the frame count and active flags from
+the hardware for each one.
+
+Read the frame count and active flags once, and then use the
+cached value in the loop.
+
+Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
+---
+ drivers/gpu/drm/vc4/vc4_hvs.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_hvs.c
++++ b/drivers/gpu/drm/vc4/vc4_hvs.c
+@@ -796,14 +796,19 @@ static void vc4_hvs_dlist_free_work(stru
+ 	struct vc4_hvs *hvs = container_of(work, struct vc4_hvs, free_dlist_work);
+ 	struct vc4_hvs_dlist_allocation *cur, *next;
+ 	unsigned long flags;
++	bool active[3];
++	u8 frcnt[3];
++	int i;
++
+ 
+ 	spin_lock_irqsave(&hvs->mm_lock, flags);
++	for (i = 0; i < 3; i++) {
++		frcnt[i] = vc4_hvs_get_fifo_frame_count(hvs, i);
++		active[i] = vc4_hvs_check_channel_active(hvs, i);
++	}
+ 	list_for_each_entry_safe(cur, next, &hvs->stale_dlist_entries, node) {
+-		u8 frcnt;
+-
+-		frcnt = vc4_hvs_get_fifo_frame_count(hvs, cur->channel);
+-		if (vc4_hvs_check_channel_active(hvs, cur->channel) &&
+-		    !vc4_hvs_frcnt_lte(cur->target_frame_count, frcnt))
++		if (active[cur->channel] &&
++		    !vc4_hvs_frcnt_lte(cur->target_frame_count, frcnt[cur->channel]))
+ 			continue;
+ 
+ 		vc4_hvs_free_dlist_entry_locked(hvs, cur);
diff --git a/target/linux/bcm27xx/patches-6.1/950-1248-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch b/target/linux/bcm27xx/patches-6.1/950-1248-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch
new file mode 100644
index 0000000000..27497483da
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1248-drm-vc4-Flush-stale-dlist-entries-if-allocation-fail.patch
@@ -0,0 +1,69 @@
+From c0d4ab94e37991db311b0d4e955a349e359fc73a Mon Sep 17 00:00:00 2001
+From: Dave Stevenson <dave.stevenson at raspberrypi.com>
+Date: Wed, 17 Jan 2024 18:36:11 +0000
+Subject: [PATCH 1248/1295] drm/vc4: Flush stale dlist entries if allocation
+ fails
+
+This is largely for debug at present.
+For reasons unknown we are not getting the end of frame interrupts
+that should trigger a sweep of stale dlist entries.
+
+On allocation failure clear out ALL stale entries, and retry the
+allocation. Log the interrupt status so we have debug regarding
+whether the HVS believes the interrupt is enabled.
+
+Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
+---
+ drivers/gpu/drm/vc4/vc4_hvs.c | 27 ++++++++++++++++++++++++---
+ 1 file changed, 24 insertions(+), 3 deletions(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_hvs.c
++++ b/drivers/gpu/drm/vc4/vc4_hvs.c
+@@ -634,6 +634,9 @@ static void vc4_hvs_irq_clear_eof(struct
+ 	hvs->eof_irq[channel].enabled = false;
+ }
+ 
++static void vc4_hvs_free_dlist_entry_locked(struct vc4_hvs *hvs,
++					    struct vc4_hvs_dlist_allocation *alloc);
++
+ static struct vc4_hvs_dlist_allocation *
+ vc4_hvs_alloc_dlist_entry(struct vc4_hvs *hvs,
+ 			  unsigned int channel,
+@@ -642,6 +645,7 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs
+ 	struct vc4_dev *vc4 = hvs->vc4;
+ 	struct drm_device *dev = &vc4->base;
+ 	struct vc4_hvs_dlist_allocation *alloc;
++	struct vc4_hvs_dlist_allocation *cur, *next;
+ 	unsigned long flags;
+ 	int ret;
+ 
+@@ -659,9 +663,26 @@ vc4_hvs_alloc_dlist_entry(struct vc4_hvs
+ 				 dlist_count);
+ 	spin_unlock_irqrestore(&hvs->mm_lock, flags);
+ 	if (ret) {
+-		drm_err(dev, "Failed to allocate DLIST entry. Requested size=%zu. ret=%d\n",
+-			dlist_count, ret);
+-		return ERR_PTR(ret);
++		drm_err(dev, "Failed to allocate DLIST entry. Requested size=%zu. ret=%d. DISPCTRL is %08x\n",
++			dlist_count, ret, HVS_READ(SCALER_DISPCTRL));
++
++		/* This should never happen as stale entries should get released
++		 * as the frame counter interrupt triggers.
++		 * However we've seen this fail for reasons currently unknown.
++		 * Free all stale entries now so we should be able to complete
++		 * this allocation.
++		 */
++		spin_lock_irqsave(&hvs->mm_lock, flags);
++		list_for_each_entry_safe(cur, next, &hvs->stale_dlist_entries, node) {
++			vc4_hvs_free_dlist_entry_locked(hvs, cur);
++		}
++
++		ret = drm_mm_insert_node(&hvs->dlist_mm, &alloc->mm_node,
++					 dlist_count);
++		spin_unlock_irqrestore(&hvs->mm_lock, flags);
++
++		if (ret)
++			return ERR_PTR(ret);
+ 	}
+ 
+ 	alloc->channel = channel;
diff --git a/target/linux/bcm27xx/patches-6.1/950-1249-Pisound-Don-t-export-the-button-GPIO-via-sysfs-GPIO-.patch b/target/linux/bcm27xx/patches-6.1/950-1249-Pisound-Don-t-export-the-button-GPIO-via-sysfs-GPIO-.patch
new file mode 100644
index 0000000000..73f308bba3
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1249-Pisound-Don-t-export-the-button-GPIO-via-sysfs-GPIO-.patch
@@ -0,0 +1,55 @@
+From cd62562b276b5724d1c75ea1465937a5bd9037db Mon Sep 17 00:00:00 2001
+From: Giedrius <giedrius at blokas.io>
+Date: Fri, 19 Jan 2024 10:55:55 +0000
+Subject: [PATCH 1249/1295] Pisound: Don't export the button GPIO via sysfs
+ GPIO class.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Giedrius Trainavi?ius <giedrius at blokas.io>
+---
+ sound/soc/bcm/pisound.c | 9 +--------
+ 1 file changed, 1 insertion(+), 8 deletions(-)
+
+--- a/sound/soc/bcm/pisound.c
++++ b/sound/soc/bcm/pisound.c
+@@ -857,7 +857,6 @@ static int pisnd_ctl_uninit(void)
+ 
+ static struct gpio_desc *osr0, *osr1, *osr2;
+ static struct gpio_desc *reset;
+-static struct gpio_desc *button;
+ 
+ static int pisnd_hw_params(
+ 	struct snd_pcm_substream *substream,
+@@ -1016,8 +1015,6 @@ static int pisnd_init_gpio(struct device
+ 
+ 	reset = gpiod_get_index(dev, "reset", 0, GPIOD_ASIS);
+ 
+-	button = gpiod_get_index(dev, "button", 0, GPIOD_ASIS);
+-
+ 	gpiod_direction_output(osr0,  1);
+ 	gpiod_direction_output(osr1,  1);
+ 	gpiod_direction_output(osr2,  1);
+@@ -1029,8 +1026,6 @@ static int pisnd_init_gpio(struct device
+ 	gpiod_set_value(osr2,  false);
+ 	gpiod_set_value(reset,  true);
+ 
+-	gpiod_export(button, false);
+-
+ 	return 0;
+ }
+ 
+@@ -1039,11 +1034,9 @@ static int pisnd_uninit_gpio(void)
+ 	int i;
+ 
+ 	struct gpio_desc **gpios[] = {
+-		&osr0, &osr1, &osr2, &reset, &button,
++		&osr0, &osr1, &osr2, &reset,
+ 	};
+ 
+-	gpiod_unexport(button);
+-
+ 	for (i = 0; i < ARRAY_SIZE(gpios); ++i) {
+ 		if (*gpios[i] == NULL) {
+ 			printd("weird, GPIO[%d] is NULL already\n", i);
diff --git a/target/linux/bcm27xx/patches-6.1/950-1250-Pisound-Read-out-the-SPI-speed-to-use-from-the-Devic.patch b/target/linux/bcm27xx/patches-6.1/950-1250-Pisound-Read-out-the-SPI-speed-to-use-from-the-Devic.patch
new file mode 100644
index 0000000000..5da78175b1
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1250-Pisound-Read-out-the-SPI-speed-to-use-from-the-Devic.patch
@@ -0,0 +1,94 @@
+From 273139b285f7a1a825eb689943626a0172b8802b Mon Sep 17 00:00:00 2001
+From: Giedrius <giedrius at blokas.io>
+Date: Mon, 22 Jan 2024 13:26:58 +0000
+Subject: [PATCH 1250/1295] Pisound: Read out the SPI speed to use from the
+ Device Tree.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Giedrius Trainavi?ius <giedrius at blokas.io>
+---
+ sound/soc/bcm/pisound.c | 31 ++++++++++++++++++++++++++-----
+ 1 file changed, 26 insertions(+), 5 deletions(-)
+
+--- a/sound/soc/bcm/pisound.c
++++ b/sound/soc/bcm/pisound.c
+@@ -1,6 +1,6 @@
+ /*
+  * Pisound Linux kernel module.
+- * Copyright (C) 2016-2020  Vilniaus Blokas UAB, https://blokas.io/pisound
++ * Copyright (C) 2016-2024  Vilniaus Blokas UAB, https://blokas.io/pisound
+  *
+  * This program is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU General Public License
+@@ -142,14 +142,14 @@ static void pisnd_input_trigger(struct s
+ 	}
+ }
+ 
+-static struct snd_rawmidi_ops pisnd_output_ops = {
++static const struct snd_rawmidi_ops pisnd_output_ops = {
+ 	.open = pisnd_output_open,
+ 	.close = pisnd_output_close,
+ 	.trigger = pisnd_output_trigger,
+ 	.drain = pisnd_output_drain,
+ };
+ 
+-static struct snd_rawmidi_ops pisnd_input_ops = {
++static const struct snd_rawmidi_ops pisnd_input_ops = {
+ 	.open = pisnd_input_open,
+ 	.close = pisnd_input_close,
+ 	.trigger = pisnd_input_trigger,
+@@ -226,6 +226,7 @@ static char g_id[25];
+ enum { MAX_VERSION_STR_LEN = 6 };
+ static char g_fw_version[MAX_VERSION_STR_LEN];
+ static char g_hw_version[MAX_VERSION_STR_LEN];
++static u32 g_spi_speed_hz;
+ 
+ static uint8_t g_ledFlashDuration;
+ static bool    g_ledFlashDurationChanged;
+@@ -329,7 +330,7 @@ static void spi_transfer(const uint8_t *
+ 	transfer.tx_buf = txbuf;
+ 	transfer.rx_buf = rxbuf;
+ 	transfer.len = len;
+-	transfer.speed_hz = 150000;
++	transfer.speed_hz = g_spi_speed_hz;
+ 	transfer.delay.value = 10;
+ 	transfer.delay.unit = SPI_DELAY_UNIT_USECS;
+ 
+@@ -646,6 +647,26 @@ static int pisnd_spi_init(struct device
+ 	memset(g_fw_version, 0, sizeof(g_fw_version));
+ 	memset(g_hw_version, 0, sizeof(g_hw_version));
+ 
++	g_spi_speed_hz = 150000;
++	if (dev->of_node) {
++		struct device_node *spi_node;
++
++		spi_node = of_parse_phandle(
++			dev->of_node,
++			"spi-controller",
++			0
++			);
++
++		if (spi_node) {
++			ret = of_property_read_u32(spi_node, "spi-speed-hz", &g_spi_speed_hz);
++			if (ret != 0)
++				printe("Failed reading spi-speed-hz! (%d)\n", ret);
++
++			of_node_put(spi_node);
++		}
++	}
++	printi("Using SPI speed: %u\n", g_spi_speed_hz);
++
+ 	spi = pisnd_spi_find_device();
+ 
+ 	if (spi != NULL) {
+@@ -950,7 +971,7 @@ static int pisnd_startup(struct snd_pcm_
+ 	return 0;
+ }
+ 
+-static struct snd_soc_ops pisnd_ops = {
++static const struct snd_soc_ops pisnd_ops = {
+ 	.startup = pisnd_startup,
+ 	.hw_params = pisnd_hw_params,
+ };
diff --git a/target/linux/bcm27xx/patches-6.1/950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch b/target/linux/bcm27xx/patches-6.1/950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch
new file mode 100644
index 0000000000..b0ddd8f5ab
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1251-Pisound-Set-the-spi-speed-hz-for-Pisound-in-the-Devi.patch
@@ -0,0 +1,129 @@
+From 92123f0abd5e24c150b54c56261813ced432ac87 Mon Sep 17 00:00:00 2001
+From: Giedrius <giedrius at blokas.io>
+Date: Mon, 22 Jan 2024 13:29:24 +0000
+Subject: [PATCH 1251/1295] Pisound: Set the spi-speed-hz for Pisound in the
+ Device Tree overlay, and specify spi-speed-hz override for Pi 5.
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Giedrius Trainavi?ius <giedrius at blokas.io>
+---
+ arch/arm/boot/dts/overlays/Makefile           |  1 +
+ arch/arm/boot/dts/overlays/README             |  8 ++++-
+ arch/arm/boot/dts/overlays/overlay_map.dts    | 10 ++++++
+ .../arm/boot/dts/overlays/pisound-overlay.dts |  4 ++-
+ .../boot/dts/overlays/pisound-pi5-overlay.dts | 31 +++++++++++++++++++
+ 5 files changed, 52 insertions(+), 2 deletions(-)
+ create mode 100644 arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts
+
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -192,6 +192,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ 	piscreen.dtbo \
+ 	piscreen2r.dtbo \
+ 	pisound.dtbo \
++	pisound-pi5.dtbo \
+ 	pitft22.dtbo \
+ 	pitft28-capacitive.dtbo \
+ 	pitft28-resistive.dtbo \
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -3486,11 +3486,17 @@ Params: speed                   Display
+ 
+ 
+ Name:   pisound
+-Info:   Configures the Blokas Labs pisound card
++Info:   Configures the Blokas Labs Pisound card
+ Load:   dtoverlay=pisound
+ Params: <None>
+ 
+ 
++Name:   pisound-pi5
++Info:   Pi 5 specific overlay override for Blokas Labs Pisound card, see pisound
++Load:   dtoverlay=pisound-pi5
++Params: <None>
++
++
+ Name:   pitft22
+ Info:   Adafruit PiTFT 2.2" screen
+ Load:   dtoverlay=pitft22,<param>=<val>
+--- a/arch/arm/boot/dts/overlays/overlay_map.dts
++++ b/arch/arm/boot/dts/overlays/overlay_map.dts
+@@ -203,6 +203,16 @@
+ 		renamed = "miniuart-bt";
+ 	};
+ 
++	pisound {
++		bcm2835;
++		bcm2711;
++		bcm2712 = "pisound-pi5";
++	};
++
++	pisound-pi5 {
++		bcm2712;
++	};
++
+ 	pwm1 {
+ 		bcm2711;
+ 	};
+--- a/arch/arm/boot/dts/overlays/pisound-overlay.dts
++++ b/arch/arm/boot/dts/overlays/pisound-overlay.dts
+@@ -1,6 +1,6 @@
+ /*
+  * Pisound Linux kernel module.
+- * Copyright (C) 2016-2017  Vilniaus Blokas UAB, https://blokas.io/pisound
++ * Copyright (C) 2016-2024  Vilniaus Blokas UAB, https://blokas.io/pisound
+  *
+  * This program is free software; you can redistribute it and/or
+  * modify it under the terms of the GNU General Public License
+@@ -56,6 +56,7 @@
+ 				compatible = "blokaslabs,pisound-spi";
+ 				reg = <0>;
+ 				spi-max-frequency = <1000000>;
++				spi-speed-hz = <150000>;
+ 			};
+ 		};
+ 	};
+@@ -76,6 +77,7 @@
+ 		__overlay__ {
+ 			compatible = "blokaslabs,pisound";
+ 			i2s-controller = <&i2s_clk_consumer>;
++			spi-controller = <&pisound_spi>;
+ 			status = "okay";
+ 
+ 			pinctrl-names = "default";
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/pisound-pi5-overlay.dts
+@@ -0,0 +1,31 @@
++/*
++ * Pisound Linux kernel module.
++ * Copyright (C) 2016-2024  Vilniaus Blokas UAB, https://blokas.io/pisound
++ *
++ * This program is free software; you can redistribute it and/or
++ * modify it under the terms of the GNU General Public License
++ * as published by the Free Software Foundation; version 2 of the
++ * License.
++ *
++ * This program is distributed in the hope that it will be useful,
++ * but WITHOUT ANY WARRANTY; without even the implied warranty of
++ * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
++ * GNU General Public License for more details.
++ *
++ * You should have received a copy of the GNU General Public License
++ * along with this program; if not, write to the Free Software
++ * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301, USA.
++ */
++
++/dts-v1/;
++/plugin/;
++
++#include "pisound-overlay.dts"
++
++&pisound_spi {
++	spi-speed-hz = <100000>;
++};
++
++/ {
++	compatible = "brcm,bcm2712";
++};
diff --git a/target/linux/bcm27xx/patches-6.1/950-1252-Improvement-on-backup-switchover-mode-overlay-value-.patch b/target/linux/bcm27xx/patches-6.1/950-1252-Improvement-on-backup-switchover-mode-overlay-value-.patch
new file mode 100644
index 0000000000..9fabd9fd13
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1252-Improvement-on-backup-switchover-mode-overlay-value-.patch
@@ -0,0 +1,51 @@
+From f85acc3d0fb33ce5c92578dca7b1345915f744ff Mon Sep 17 00:00:00 2001
+From: Tiago Freire <41837236+tiagofreire-pt at users.noreply.github.com>
+Date: Tue, 23 Jan 2024 12:10:24 +0000
+Subject: [PATCH 1252/1295] Improvement on backup-switchover-mode overlay value
+ definitions (#5884)
+
+For the RV3028 RTC, the definitions for its `backup-switchover-mode` overlay
+were not intelligible neither complete/exhaustive.
+
+Accordingly to the https://github.com/raspberrypi/linux/issues/2912#issuecomment-477670051
+these one here proposed should be correct.
+
+`/boot/config.txt` should be as a configuration example, for rv3028, on a
+ Uputronics GPS Extension HAT:
+
+    # For GPS Expansion Board from Uputronics
+    dtparam=i2c_arm=on
+    dtoverlay=i2c-rtc,rv3028,backup-switchover-mode=3
+    dtoverlay=pps-gpio,gpiopin=18
+    init_uart_baud=115200
+
+From my tests (`sudo rmmod rtc_rv3028 && sudo i2cget -y 1 0x52 0x37`):
+
+`Default from factory`: `0x10`
+`Mode 0`: `0x10`
+`Mode 1`: `0x14`
+`Mode 2`: `0x18`
+`Mode 3`: `0x1c`
+
+`Mode 3`: `0x1c` is consistent with the manufacturer configuration script: http://store.uputronics.com/files/configure-rv3028.sh
+---
+ arch/arm/boot/dts/overlays/README | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -2106,7 +2106,13 @@ Params: abx80x                  Select o
+                                 source
+ 
+         backup-switchover-mode  Backup power supply switch mode. Must be 0 for
+-                                off or 1 for Vdd < VBackup (RV3028, RV3032)
++                                "Switchover disabled", 1 for "Direct Switching"
++                                (if Vdd < VBackup), 2 for "Standby
++                                Mode" (if Vdd < Vbackup,
++                                does not draw current) or 3 for
++                                "Level Switching" (if Vdd < Vbackup
++                                and Vdd < Vddsw and Vbackup > Vddsw)
++                                (RV3028, RV3032)
+ 
+ 
+ Name:   i2c-rtc-gpio
diff --git a/target/linux/bcm27xx/patches-6.1/950-1253-Harmonizing-the-improvement-on-backup-switchover-mod.patch b/target/linux/bcm27xx/patches-6.1/950-1253-Harmonizing-the-improvement-on-backup-switchover-mod.patch
new file mode 100644
index 0000000000..b5fe17b959
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1253-Harmonizing-the-improvement-on-backup-switchover-mod.patch
@@ -0,0 +1,30 @@
+From f2ada4aa6b1d214c67b7efe874a408be9b4eaf3f Mon Sep 17 00:00:00 2001
+From: Tiago Freire <41837236+tiagofreire-pt at users.noreply.github.com>
+Date: Wed, 24 Jan 2024 10:03:03 +0000
+Subject: [PATCH 1253/1295] Harmonizing the improvement on
+ backup-switchover-mode overlay value definitions
+
+On the followup of https://github.com/raspberrypi/linux/pull/5884, I missed a second duplicate definition. Now, harmonized the entire document.
+
+Signed-off-by: Tiago Freire <41837236+tiagofreire-pt at users.noreply.github.com>
+---
+ arch/arm/boot/dts/overlays/README | 8 +++++++-
+ 1 file changed, 7 insertions(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -2184,7 +2184,13 @@ Params: abx80x                  Select o
+                                 source
+ 
+         backup-switchover-mode  Backup power supply switch mode. Must be 0 for
+-                                off or 1 for Vdd < VBackup (RV3028, RV3032)
++                                "Switchover disabled", 1 for "Direct Switching"
++                                (if Vdd < VBackup), 2 for "Standby
++                                Mode" (if Vdd < Vbackup,
++                                does not draw current) or 3 for
++                                "Level Switching" (if Vdd < Vbackup
++                                and Vdd < Vddsw and Vbackup > Vddsw)
++                                (RV3028, RV3032)
+ 
+         i2c_gpio_sda            GPIO used for I2C data (default "23")
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1254-Add-pcie-32bit-dma-overlay-pi5-to-enable-32bit-DMA-o.patch b/target/linux/bcm27xx/patches-6.1/950-1254-Add-pcie-32bit-dma-overlay-pi5-to-enable-32bit-DMA-o.patch
new file mode 100644
index 0000000000..2127d2ca4f
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1254-Add-pcie-32bit-dma-overlay-pi5-to-enable-32bit-DMA-o.patch
@@ -0,0 +1,85 @@
+From 1cdbd99f402b76c61632d09a49b20ce90af0cc72 Mon Sep 17 00:00:00 2001
+From: Rodrigo Rosmaninho <quico.rosmaninho at gmail.com>
+Date: Tue, 23 Jan 2024 18:50:19 +0000
+Subject: [PATCH 1254/1295] Add pcie-32bit-dma-overlay-pi5 to enable 32bit DMA
+ on the Pi 5's external PCIe
+
+Changes dma-ranges in the pcie1 component of the bcm2712 dts in order to ensure that the DMA addressing space is 32bits, at the expense of having to bounce buffers.
+
+Signed-off-by: Rodrigo Rosmaninho <r.rosmaninho at ua.pt>
+---
+ arch/arm/boot/dts/overlays/Makefile           |  1 +
+ arch/arm/boot/dts/overlays/README             |  6 +++++
+ arch/arm/boot/dts/overlays/overlay_map.dts    |  5 ++++
+ .../overlays/pcie-32bit-dma-pi5-overlay.dts   | 26 +++++++++++++++++++
+ 4 files changed, 38 insertions(+)
+ create mode 100644 arch/arm/boot/dts/overlays/pcie-32bit-dma-pi5-overlay.dts
+
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -182,6 +182,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ 	pca953x.dtbo \
+ 	pcf857x.dtbo \
+ 	pcie-32bit-dma.dtbo \
++	pcie-32bit-dma-pi5.dtbo \
+ 	pibell.dtbo \
+ 	pifacedigital.dtbo \
+ 	pifi-40.dtbo \
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -3388,6 +3388,12 @@ Load:   dtoverlay=pcie-32bit-dma
+ Params: <None>
+ 
+ 
++Name:   pcie-32bit-dma-pi5
++Info:   Force PCIe config to support 32bit DMA addresses at the expense of
++        having to bounce buffers (on the Pi 5).
++Load:   dtoverlay=pcie-32bit-dma-pi5
++Params: <None>
++
+ [ The pcf2127-rtc overlay has been deleted. See i2c-rtc. ]
+ 
+ 
+--- a/arch/arm/boot/dts/overlays/overlay_map.dts
++++ b/arch/arm/boot/dts/overlays/overlay_map.dts
+@@ -185,6 +185,11 @@
+ 
+ 	pcie-32bit-dma {
+ 		bcm2711;
++		bcm2712 = "pcie-32bit-dma-pi5";
++	};
++
++	pcie-32bit-dma-pi5 {
++		bcm2712;
+ 	};
+ 
+ 	pi3-act-led {
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/pcie-32bit-dma-pi5-overlay.dts
+@@ -0,0 +1,26 @@
++/*
++ * pcie-32bit-dma-pi5-overlay.dts
++ */
++
++/dts-v1/;
++/plugin/;
++
++/ {
++	compatible = "brcm,bcm2712";
++
++	fragment at 0 {
++		target = <&pcie1>;
++		__overlay__ {
++			/*
++			 * The size of the range is rounded up to a power of 2,
++			 * so the range ends up being 0-4GB, and the MSI vector
++			 * gets pushed beyond 4GB.
++			 */
++			#address-cells = <3>;
++			#size-cells = <2>;
++			dma-ranges = <0x02000000 0x0 0x00000000 0x0 0x00000000
++				      0x0 0x80000000>;
++		};
++	};
++
++};
diff --git a/target/linux/bcm27xx/patches-6.1/950-1257-i2c-designware-Use-SCL-rise-and-fall-times-in-DT.patch b/target/linux/bcm27xx/patches-6.1/950-1257-i2c-designware-Use-SCL-rise-and-fall-times-in-DT.patch
new file mode 100644
index 0000000000..3aa719cc80
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1257-i2c-designware-Use-SCL-rise-and-fall-times-in-DT.patch
@@ -0,0 +1,91 @@
+From b660279cc83aff2018cecfc3fb55757a8d64f607 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Tue, 16 Jan 2024 15:54:22 +0000
+Subject: [PATCH 1257/1295] i2c: designware: Use SCL rise and fall times in DT
+
+Calculate the HCNT and LCNT values for all modes using the rise and
+fall times of SCL, the aim being a 50/50 mark/space ratio.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ drivers/i2c/busses/i2c-designware-master.c | 26 ++++++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+--- a/drivers/i2c/busses/i2c-designware-master.c
++++ b/drivers/i2c/busses/i2c-designware-master.c
+@@ -16,6 +16,7 @@
+ #include <linux/i2c.h>
+ #include <linux/interrupt.h>
+ #include <linux/io.h>
++#include <linux/math64.h>
+ #include <linux/module.h>
+ #include <linux/pm_runtime.h>
+ #include <linux/regmap.h>
+@@ -37,6 +38,22 @@ static void i2c_dw_configure_fifo_master
+ 	regmap_write(dev->map, DW_IC_CON, dev->master_cfg);
+ }
+ 
++static u16 clock_calc(struct dw_i2c_dev *dev, bool want_high)
++{
++	struct i2c_timings *t = &dev->timings;
++	u32 wanted_speed = t->bus_freq_hz;
++	u32 clk_khz = i2c_dw_clk_rate(dev);
++	u32 extra_ns = want_high ? t->scl_fall_ns : t->scl_rise_ns;
++	u32 extra_cycles = (u32)div_u64((u64)clk_khz * extra_ns, 1000000);
++	u32 period = div_u64((u64)clk_khz * 1000 + wanted_speed - 1, wanted_speed);
++	u32 cycles = (period + want_high)/2 - extra_cycles;
++
++	if (cycles > 0xffff)
++		cycles = 0xffff;
++
++	return (u16)cycles;
++}
++
+ static int i2c_dw_set_timings_master(struct dw_i2c_dev *dev)
+ {
+ 	u32 comp_param1;
+@@ -44,6 +61,7 @@ static int i2c_dw_set_timings_master(str
+ 	struct i2c_timings *t = &dev->timings;
+ 	const char *fp_str = "";
+ 	u32 ic_clk;
++	u32 hcnt, lcnt;
+ 	int ret;
+ 
+ 	ret = i2c_dw_acquire_lock(dev);
+@@ -59,6 +77,9 @@ static int i2c_dw_set_timings_master(str
+ 	sda_falling_time = t->sda_fall_ns ?: 300; /* ns */
+ 	scl_falling_time = t->scl_fall_ns ?: 300; /* ns */
+ 
++	hcnt = clock_calc(dev, true);
++	lcnt = clock_calc(dev, false);
++
+ 	/* Calculate SCL timing parameters for standard mode if not set */
+ 	if (!dev->ss_hcnt || !dev->ss_lcnt) {
+ 		ic_clk = i2c_dw_clk_rate(dev);
+@@ -74,6 +95,8 @@ static int i2c_dw_set_timings_master(str
+ 					scl_falling_time,
+ 					0);	/* No offset */
+ 	}
++	dev->ss_hcnt = hcnt;
++	dev->ss_lcnt = lcnt;
+ 	dev_dbg(dev->dev, "Standard Mode HCNT:LCNT = %d:%d\n",
+ 		dev->ss_hcnt, dev->ss_lcnt);
+ 
+@@ -124,6 +147,8 @@ static int i2c_dw_set_timings_master(str
+ 					scl_falling_time,
+ 					0);	/* No offset */
+ 	}
++	dev->fs_hcnt = hcnt;
++	dev->fs_lcnt = lcnt;
+ 	dev_dbg(dev->dev, "Fast Mode%s HCNT:LCNT = %d:%d\n",
+ 		fp_str, dev->fs_hcnt, dev->fs_lcnt);
+ 
+@@ -152,6 +177,8 @@ static int i2c_dw_set_timings_master(str
+ 						scl_falling_time,
+ 						0);	/* No offset */
+ 		}
++		dev->hs_hcnt = hcnt;
++		dev->hs_lcnt = lcnt;
+ 		dev_dbg(dev->dev, "High Speed Mode HCNT:LCNT = %d:%d\n",
+ 			dev->hs_hcnt, dev->hs_lcnt);
+ 	}
diff --git a/target/linux/bcm27xx/patches-6.1/950-1258-i2c-designware-Support-non-standard-bus-speeds.patch b/target/linux/bcm27xx/patches-6.1/950-1258-i2c-designware-Support-non-standard-bus-speeds.patch
new file mode 100644
index 0000000000..fc24d508e0
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1258-i2c-designware-Support-non-standard-bus-speeds.patch
@@ -0,0 +1,80 @@
+From 6868dba87e2765042ac376a4a8427b9b981cd410 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Tue, 16 Jan 2024 16:03:14 +0000
+Subject: [PATCH 1258/1295] i2c: designware: Support non-standard bus speeds
+
+Add support for non-standard bus speeds by treating them as detuned
+versions of the slowest standard speed not less than the requested
+speed.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ drivers/i2c/busses/i2c-designware-common.c | 27 ++++++++++++++++++++++
+ drivers/i2c/busses/i2c-designware-core.h   |  1 +
+ drivers/i2c/busses/i2c-designware-master.c |  2 +-
+ 3 files changed, 29 insertions(+), 1 deletion(-)
+
+--- a/drivers/i2c/busses/i2c-designware-common.c
++++ b/drivers/i2c/busses/i2c-designware-common.c
+@@ -318,6 +318,9 @@ void i2c_dw_adjust_bus_speed(struct dw_i
+ {
+ 	u32 acpi_speed = i2c_dw_acpi_round_bus_speed(dev->dev);
+ 	struct i2c_timings *t = &dev->timings;
++	u32 wanted_speed;
++	u32 legal_speed = 0;
++	int i;
+ 
+ 	/*
+ 	 * Find bus speed from the "clock-frequency" device property, ACPI
+@@ -329,6 +332,30 @@ void i2c_dw_adjust_bus_speed(struct dw_i
+ 		t->bus_freq_hz = max(t->bus_freq_hz, acpi_speed);
+ 	else
+ 		t->bus_freq_hz = I2C_MAX_FAST_MODE_FREQ;
++
++	wanted_speed = t->bus_freq_hz;
++
++	/* For unsupported speeds, scale down the lowest speed which is faster. */
++	for (i = 0; i < ARRAY_SIZE(supported_speeds); i++) {
++		/* supported speeds is in decreasing order */
++		if (wanted_speed == supported_speeds[i]) {
++			legal_speed = 0;
++			break;
++		}
++		if (wanted_speed > supported_speeds[i])
++			break;
++
++		legal_speed = supported_speeds[i];
++	}
++
++	if (legal_speed) {
++		/*
++		 * Pretend this was the requested speed, but preserve the preferred
++		 * speed so the clock counts can be scaled.
++		 */
++		t->bus_freq_hz = legal_speed;
++		dev->wanted_bus_speed = wanted_speed;
++	}
+ }
+ EXPORT_SYMBOL_GPL(i2c_dw_adjust_bus_speed);
+ 
+--- a/drivers/i2c/busses/i2c-designware-core.h
++++ b/drivers/i2c/busses/i2c-designware-core.h
+@@ -287,6 +287,7 @@ struct dw_i2c_dev {
+ 	u16			fp_lcnt;
+ 	u16			hs_hcnt;
+ 	u16			hs_lcnt;
++	u32			wanted_bus_speed;
+ 	int			(*acquire_lock)(void);
+ 	void			(*release_lock)(void);
+ 	int			semaphore_idx;
+--- a/drivers/i2c/busses/i2c-designware-master.c
++++ b/drivers/i2c/busses/i2c-designware-master.c
+@@ -41,7 +41,7 @@ static void i2c_dw_configure_fifo_master
+ static u16 clock_calc(struct dw_i2c_dev *dev, bool want_high)
+ {
+ 	struct i2c_timings *t = &dev->timings;
+-	u32 wanted_speed = t->bus_freq_hz;
++	u32 wanted_speed = dev->wanted_bus_speed ?: t->bus_freq_hz;
+ 	u32 clk_khz = i2c_dw_clk_rate(dev);
+ 	u32 extra_ns = want_high ? t->scl_fall_ns : t->scl_rise_ns;
+ 	u32 extra_cycles = (u32)div_u64((u64)clk_khz * extra_ns, 1000000);
diff --git a/target/linux/bcm27xx/patches-6.1/950-1259-ARM-dts-rp1-Add-I2C-timings.patch b/target/linux/bcm27xx/patches-6.1/950-1259-ARM-dts-rp1-Add-I2C-timings.patch
new file mode 100644
index 0000000000..adf7cc25bc
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1259-ARM-dts-rp1-Add-I2C-timings.patch
@@ -0,0 +1,78 @@
+From 4c7a8e9e40d915c61df188d6b9f82836b616bd4f Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Tue, 16 Jan 2024 16:05:18 +0000
+Subject: [PATCH 1259/1295] ARM: dts: rp1: Add I2C timings
+
+Add SCL rise and fall times, to allow the derivation of timings at
+arbitrary speeds.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ arch/arm/boot/dts/rp1.dtsi | 14 ++++++++++++++
+ 1 file changed, 14 insertions(+)
+
+--- a/arch/arm/boot/dts/rp1.dtsi
++++ b/arch/arm/boot/dts/rp1.dtsi
+@@ -305,6 +305,8 @@
+ 			compatible = "snps,designware-i2c";
+ 			interrupts = <RP1_INT_I2C0 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
++			i2c-scl-rising-time-ns = <65>;
++			i2c-scl-falling-time-ns = <100>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -313,6 +315,8 @@
+ 			compatible = "snps,designware-i2c";
+ 			interrupts = <RP1_INT_I2C1 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
++			i2c-scl-rising-time-ns = <65>;
++			i2c-scl-falling-time-ns = <100>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -321,6 +325,8 @@
+ 			compatible = "snps,designware-i2c";
+ 			interrupts = <RP1_INT_I2C2 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
++			i2c-scl-rising-time-ns = <65>;
++			i2c-scl-falling-time-ns = <100>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -329,6 +335,8 @@
+ 			compatible = "snps,designware-i2c";
+ 			interrupts = <RP1_INT_I2C3 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
++			i2c-scl-rising-time-ns = <65>;
++			i2c-scl-falling-time-ns = <100>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -337,6 +345,8 @@
+ 			compatible = "snps,designware-i2c";
+ 			interrupts = <RP1_INT_I2C4 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
++			i2c-scl-rising-time-ns = <65>;
++			i2c-scl-falling-time-ns = <100>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -345,6 +355,8 @@
+ 			compatible = "snps,designware-i2c";
+ 			interrupts = <RP1_INT_I2C5 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
++			i2c-scl-rising-time-ns = <65>;
++			i2c-scl-falling-time-ns = <100>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -353,6 +365,8 @@
+ 			compatible = "snps,designware-i2c";
+ 			interrupts = <RP1_INT_I2C6 IRQ_TYPE_LEVEL_HIGH>;
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
++			i2c-scl-rising-time-ns = <65>;
++			i2c-scl-falling-time-ns = <100>;
+ 			status = "disabled";
+ 		};
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1260-iommu-bcm2712-don-t-allow-building-as-module.patch b/target/linux/bcm27xx/patches-6.1/950-1260-iommu-bcm2712-don-t-allow-building-as-module.patch
new file mode 100644
index 0000000000..98790267f6
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1260-iommu-bcm2712-don-t-allow-building-as-module.patch
@@ -0,0 +1,28 @@
+From 86450c7dc4df99c3b16677cb00c2d3caf01a40f6 Mon Sep 17 00:00:00 2001
+From: Ratchanan Srirattanamet <peathot at hotmail.com>
+Date: Tue, 30 Jan 2024 14:09:00 +0700
+Subject: [PATCH 1260/1295] iommu/bcm2712: don't allow building as module
+
+Since bcm2712-iommu{,-cache}.c doesn't have usual module descriptors
+such as `MODULE_LICENSE`, configuring this as 'M' fails the build with
+`ERROR: modpost: missing MODULE_LICENSE() in <...>/bcm2712-iommu.o`.
+Since it seems like the code is not intended to be built as a module
+anyway (it registers the driver with `builtin_platform_driver()`), don't
+allow building this code as a module.
+
+Signed-off-by: Ratchanan Srirattanamet <peathot at hotmail.com>
+---
+ drivers/iommu/Kconfig | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/iommu/Kconfig
++++ b/drivers/iommu/Kconfig
+@@ -507,7 +507,7 @@ config SPRD_IOMMU
+ 	  Say Y here if you want to use the multimedia devices listed above.
+ 
+ config BCM2712_IOMMU
+-       tristate "BCM2712 IOMMU driver"
++       bool "BCM2712 IOMMU driver"
+        depends on ARM64 && ARCH_BCM
+        select IOMMU_API
+        help
diff --git a/target/linux/bcm27xx/patches-6.1/950-1261-drm-rp1-depends-on-instead-of-select-MFD_RP1.patch b/target/linux/bcm27xx/patches-6.1/950-1261-drm-rp1-depends-on-instead-of-select-MFD_RP1.patch
new file mode 100644
index 0000000000..9e6755b378
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1261-drm-rp1-depends-on-instead-of-select-MFD_RP1.patch
@@ -0,0 +1,59 @@
+From 57695002a68bdd4c077ea2173b64aeee6e1ef24f Mon Sep 17 00:00:00 2001
+From: Ratchanan Srirattanamet <peathot at hotmail.com>
+Date: Fri, 26 Jan 2024 18:49:42 +0700
+Subject: [PATCH 1261/1295] drm/rp1: depends on, instead of select, MFD_RP1
+
+According to kconfig-language.txt [1], select should be used only for
+"non-visible symbols ... and for symbols with no dependencies". Since
+MFD_RP1 both is visible and has a dependency, "select" should not be
+used and "depends on" should be used instead.
+
+In particular, this fixes the build of this kernel tree on NixOS, where
+its kernel config system will try to answer 'M' to as many config as
+possible.
+
+[1] https://www.kernel.org/doc/html/latest/kbuild/kconfig-language.html
+
+Signed-off-by: Ratchanan Srirattanamet <peathot at hotmail.com>
+---
+ drivers/gpu/drm/rp1/rp1-dpi/Kconfig | 3 +--
+ drivers/gpu/drm/rp1/rp1-dsi/Kconfig | 3 +--
+ drivers/gpu/drm/rp1/rp1-vec/Kconfig | 3 +--
+ 3 files changed, 3 insertions(+), 6 deletions(-)
+
+--- a/drivers/gpu/drm/rp1/rp1-dpi/Kconfig
++++ b/drivers/gpu/drm/rp1/rp1-dpi/Kconfig
+@@ -1,8 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0-only
+ config DRM_RP1_DPI
+ 	tristate "DRM Support for RP1 DPI"
+-	depends on DRM
+-	select MFD_RP1
++	depends on DRM && MFD_RP1
+ 	select DRM_GEM_DMA_HELPER
+ 	select DRM_KMS_HELPER
+ 	select DRM_VRAM_HELPER
+--- a/drivers/gpu/drm/rp1/rp1-dsi/Kconfig
++++ b/drivers/gpu/drm/rp1/rp1-dsi/Kconfig
+@@ -1,8 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0-only
+ config DRM_RP1_DSI
+ 	tristate "DRM Support for RP1 DSI"
+-	depends on DRM
+-	select MFD_RP1
++	depends on DRM && MFD_RP1
+ 	select DRM_GEM_DMA_HELPER
+ 	select DRM_KMS_HELPER
+ 	select DRM_MIPI_DSI
+--- a/drivers/gpu/drm/rp1/rp1-vec/Kconfig
++++ b/drivers/gpu/drm/rp1/rp1-vec/Kconfig
+@@ -1,8 +1,7 @@
+ # SPDX-License-Identifier: GPL-2.0-only
+ config DRM_RP1_VEC
+ 	tristate "DRM Support for RP1 VEC"
+-	depends on DRM
+-	select MFD_RP1
++	depends on DRM && MFD_RP1
+ 	select DRM_GEM_DMA_HELPER
+ 	select DRM_KMS_HELPER
+ 	select DRM_VRAM_HELPER
diff --git a/target/linux/bcm27xx/patches-6.1/950-1262-Update-touch-PiTFT-overlays.patch b/target/linux/bcm27xx/patches-6.1/950-1262-Update-touch-PiTFT-overlays.patch
new file mode 100644
index 0000000000..43c275fde1
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1262-Update-touch-PiTFT-overlays.patch
@@ -0,0 +1,435 @@
+From 1c2a93ce0e1cf6d278cf565346183d7592cfbb24 Mon Sep 17 00:00:00 2001
+From: Melissa LeBlanc-Williams <melissa at adafruit.com>
+Date: Fri, 26 Jan 2024 14:41:42 -0800
+Subject: [PATCH 1262/1295] Update touch PiTFT overlays
+
+Expose the invert and swap touch parameters on 2.8" and 3.5" resistive touchscreens. Add
+the DRM parameter to the PiTFT 2.2" and 2.8" Capacitive overlay in the same
+way it is on the resistive overlays. Change the DRM driver to `adafruit,yx240qv29`
+because the rotations are consistent with the FBTFT Driver. Fix the override size parameters
+on the 2.8" capacitive PiTFT.
+
+Signed-off-by: Melissa LeBlanc-Williams <melissa at adafruit.com>
+---
+ arch/arm/boot/dts/overlays/README             |  20 +++
+ .../arm/boot/dts/overlays/pitft22-overlay.dts | 102 +++++++-------
+ .../overlays/pitft28-capacitive-overlay.dts   | 132 +++++++++---------
+ .../overlays/pitft28-resistive-overlay.dts    |  12 +-
+ .../overlays/pitft35-resistive-overlay.dts    |  10 +-
+ 5 files changed, 156 insertions(+), 120 deletions(-)
+
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -3526,6 +3526,10 @@ Params: speed                   Display
+ 
+         debug                   Debug output level {0-7}
+ 
++        drm                     Force the use of the mi0283qt DRM driver (by
++                                default the ili9340 framebuffer driver will
++                                be used in preference if available)
++
+ 
+ Name:   pitft28-capacitive
+ Info:   Adafruit PiTFT 2.8" capacitive touch screen
+@@ -3538,6 +3542,10 @@ Params: speed                   Display
+ 
+         debug                   Debug output level {0-7}
+ 
++        drm                     Force the use of the mi0283qt DRM driver (by
++                                default the ili9340 framebuffer driver will
++                                be used in preference if available)
++
+         touch-sizex             Touchscreen size x (default 240)
+ 
+         touch-sizey             Touchscreen size y (default 320)
+@@ -3564,6 +3572,12 @@ Params: speed                   Display
+                                 default the ili9340 framebuffer driver will
+                                 be used in preference if available)
+ 
++        touch-invx              Touchscreen inverted x axis
++
++        touch-invy              Touchscreen inverted y axis
++
++        touch-swapxy            Touchscreen swapped x y axis
++
+ 
+ Name:   pitft35-resistive
+ Info:   Adafruit PiTFT 3.5" resistive touch screen
+@@ -3580,6 +3594,12 @@ Params: speed                   Display
+                                 default the fb_hx8357d framebuffer driver will
+                                 be used in preference if available)
+ 
++        touch-invx              Touchscreen inverted x axis
++
++        touch-invy              Touchscreen inverted y axis
++
++        touch-swapxy            Touchscreen swapped x y axis
++
+ 
+ Name:   pps-gpio
+ Info:   Configures the pps-gpio (pulse-per-second time signal via GPIO).
+--- a/arch/arm/boot/dts/overlays/pitft22-overlay.dts
++++ b/arch/arm/boot/dts/overlays/pitft22-overlay.dts
+@@ -7,63 +7,65 @@
+ /plugin/;
+ 
+ / {
+-        compatible = "brcm,bcm2835";
++	compatible = "brcm,bcm2835";
+ 
+-        fragment at 0 {
+-                target = <&spidev0>;
+-                __overlay__ {
+-                        status = "disabled";
+-                };
++	fragment at 0 {
++		target = <&spidev0>;
++		__overlay__ {
++			status = "disabled";
++		};
+         };
+ 
+-        fragment at 1 {
+-                target = <&spidev1>;
+-                __overlay__ {
+-                        status = "disabled";
+-                };
+-        };
+-
+-        fragment at 2 {
+-                target = <&gpio>;
+-                __overlay__ {
+-                        pitft_pins: pitft_pins {
+-                                brcm,pins = <25>;
+-                                brcm,function = <1>; /* out */
+-                                brcm,pull = <0>; /* none */
+-                        };
+-                };
+-        };
+-
+-        fragment at 3 {
+-                target = <&spi0>;
+-                __overlay__ {
+-                        /* needed to avoid dtc warning */
+-                        #address-cells = <1>;
+-                        #size-cells = <0>;
+-                        status = "okay";
+-
+-                        pitft: pitft at 0{
+-                                compatible = "ilitek,ili9340";
+-                                reg = <0>;
+-                                pinctrl-names = "default";
+-                                pinctrl-0 = <&pitft_pins>;
+-
+-                                spi-max-frequency = <32000000>;
+-                                rotate = <90>;
+-                                fps = <25>;
+-                                bgr;
+-                                buswidth = <8>;
+-                                dc-gpios = <&gpio 25 0>;
+-                                debug = <0>;
+-                        };
+-
+-                };
+-        };
+-
+-        __overrides__ {
+-                speed =   <&pitft>,"spi-max-frequency:0";
+-                rotate =  <&pitft>,"rotate:0";
+-                fps =     <&pitft>,"fps:0";
+-                debug =   <&pitft>,"debug:0";
+-        };
++	fragment at 1 {
++		target = <&spidev1>;
++		__overlay__ {
++			status = "disabled";
++		};
++	};
++
++	fragment at 2 {
++		target = <&gpio>;
++		__overlay__ {
++			pitft_pins: pitft_pins {
++				brcm,pins = <25>;
++				brcm,function = <1>; /* out */
++				brcm,pull = <0>; /* none */
++			};
++		};
++	};
++
++	fragment at 3 {
++		target = <&spi0>;
++		__overlay__ {
++			/* needed to avoid dtc warning */
++			#address-cells = <1>;
++			#size-cells = <0>;
++			status = "okay";
++
++			pitft: pitft at 0{
++				compatible = "ilitek,ili9340";
++				reg = <0>;
++				pinctrl-names = "default";
++				pinctrl-0 = <&pitft_pins>;
++
++				spi-max-frequency = <32000000>;
++				rotate = <90>;
++				fps = <25>;
++				bgr;
++				buswidth = <8>;
++				dc-gpios = <&gpio 25 0>;
++				debug = <0>;
++			};
++
++		};
++	};
++
++	__overrides__ {
++		speed =   <&pitft>,"spi-max-frequency:0";
++		rotate =  <&pitft>,"rotate:0", /* fbtft */
++				<&pitft>,"rotation:0"; /* drm */
++		fps =     <&pitft>,"fps:0";
++		debug =   <&pitft>,"debug:0";
++		drm =     <&pitft>,"compatible=adafruit,yx240qv29";
++	};
+ };
+--- a/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts
++++ b/arch/arm/boot/dts/overlays/pitft28-capacitive-overlay.dts
+@@ -7,14 +7,14 @@
+ /plugin/;
+ 
+ / {
+-        compatible = "brcm,bcm2835";
++	compatible = "brcm,bcm2835";
+ 
+-        fragment at 0 {
+-                target = <&spi0>;
+-                __overlay__ {
+-                        status = "okay";
+-                };
+-        };
++	fragment at 0 {
++		target = <&spi0>;
++		__overlay__ {
++			status = "okay";
++		};
++	};
+ 
+ 	fragment at 1 {
+ 		target = <&spidev0>;
+@@ -23,69 +23,71 @@
+ 		};
+ 	};
+ 
+-        fragment at 2 {
+-                target = <&gpio>;
+-                __overlay__ {
+-                        pitft_pins: pitft_pins {
+-                                brcm,pins = <24 25>;
+-                                brcm,function = <0 1>; /* in out */
+-                                brcm,pull = <2 0>; /* pullup none */
+-                        };
+-                };
+-        };
+-
+-        fragment at 3 {
+-                target = <&spi0>;
+-                __overlay__ {
+-                        /* needed to avoid dtc warning */
+-                        #address-cells = <1>;
+-                        #size-cells = <0>;
+-
+-                        pitft: pitft at 0{
+-                                compatible = "ilitek,ili9340";
+-                                reg = <0>;
+-                                pinctrl-names = "default";
+-                                pinctrl-0 = <&pitft_pins>;
+-
+-                                spi-max-frequency = <32000000>;
+-                                rotate = <90>;
+-                                fps = <25>;
+-                                bgr;
+-                                buswidth = <8>;
+-                                dc-gpios = <&gpio 25 0>;
+-                                debug = <0>;
+-                        };
+-                };
+-        };
+-
+-        fragment at 4 {
+-                target = <&i2c1>;
+-                __overlay__ {
+-                        /* needed to avoid dtc warning */
+-                        #address-cells = <1>;
+-                        #size-cells = <0>;
+-
+-                        ft6236: ft6236 at 38 {
+-                                compatible = "focaltech,ft6236";
+-                                reg = <0x38>;
+-
+-                                interrupt-parent = <&gpio>;
+-                                interrupts = <24 2>;
+-                                touchscreen-size-x = <240>;
+-                                touchscreen-size-y = <320>;
+-                        };
+-                };
+-        };
+-
+-        __overrides__ {
+-                speed =   <&pitft>,"spi-max-frequency:0";
+-                rotate =  <&pitft>,"rotate:0";
+-                fps =     <&pitft>,"fps:0";
+-                debug =   <&pitft>,"debug:0";
+-                touch-sizex = <&ft6236>,"touchscreen-size-x?";
+-                touch-sizey = <&ft6236>,"touchscreen-size-y?";
+-                touch-invx  = <&ft6236>,"touchscreen-inverted-x?";
+-                touch-invy  = <&ft6236>,"touchscreen-inverted-y?";
+-                touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?";
+-        };
++	fragment at 2 {
++		target = <&gpio>;
++		__overlay__ {
++			pitft_pins: pitft_pins {
++				brcm,pins = <24 25>;
++				brcm,function = <0 1>; /* in out */
++				brcm,pull = <2 0>; /* pullup none */
++			};
++		};
++	};
++
++	fragment at 3 {
++		target = <&spi0>;
++		__overlay__ {
++			/* needed to avoid dtc warning */
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			pitft: pitft at 0{
++				compatible = "ilitek,ili9340";
++				reg = <0>;
++				pinctrl-names = "default";
++				pinctrl-0 = <&pitft_pins>;
++
++				spi-max-frequency = <32000000>;
++				rotate = <90>;
++				fps = <25>;
++				bgr;
++				buswidth = <8>;
++				dc-gpios = <&gpio 25 0>;
++				debug = <0>;
++			};
++		};
++	};
++
++	fragment at 4 {
++		target = <&i2c1>;
++		__overlay__ {
++			/* needed to avoid dtc warning */
++			#address-cells = <1>;
++			#size-cells = <0>;
++
++			ft6236: ft6236 at 38 {
++				compatible = "focaltech,ft6236";
++				reg = <0x38>;
++
++				interrupt-parent = <&gpio>;
++				interrupts = <24 2>;
++				touchscreen-size-x = <240>;
++				touchscreen-size-y = <320>;
++			};
++		};
++	};
++
++	__overrides__ {
++		speed =   <&pitft>,"spi-max-frequency:0";
++		rotate =  <&pitft>,"rotate:0", /* fbtft */
++				<&pitft>,"rotation:0"; /* drm */
++		fps =     <&pitft>,"fps:0";
++		debug =   <&pitft>,"debug:0";
++		drm =     <&pitft>,"compatible=adafruit,yx240qv29";
++		touch-sizex = <&ft6236>,"touchscreen-size-x:0";
++		touch-sizey = <&ft6236>,"touchscreen-size-y:0";
++		touch-invx  = <&ft6236>,"touchscreen-inverted-x?";
++		touch-invy  = <&ft6236>,"touchscreen-inverted-y?";
++		touch-swapxy = <&ft6236>,"touchscreen-swapped-x-y?";
++	};
+ };
+--- a/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts
++++ b/arch/arm/boot/dts/overlays/pitft28-resistive-overlay.dts
+@@ -49,7 +49,7 @@
+ 			#size-cells = <0>;
+ 
+ 			pitft: pitft at 0{
+-				compatible = "ilitek,ili9340", "multi-inno,mi0283qt";
++				compatible = "ilitek,ili9340";
+ 				reg = <0>;
+ 				pinctrl-names = "default";
+ 				pinctrl-0 = <&pitft_pins>;
+@@ -64,6 +64,9 @@
+ 			};
+ 
+ 			pitft_ts at 1 {
++				/* needed to avoid dtc warning */
++				#address-cells = <1>;
++				#interrupt-cells = <1>;
+ 				compatible = "st,stmpe610";
+ 				reg = <1>;
+ 
+@@ -72,7 +75,7 @@
+ 				interrupt-parent = <&gpio>;
+ 				interrupt-controller;
+ 
+-				stmpe_touchscreen {
++				stmpe_touchscreen: stmpe_touchscreen {
+ 					compatible = "st,stmpe-ts";
+ 					st,sample-time = <4>;
+ 					st,mod-12b = <1>;
+@@ -115,6 +118,9 @@
+ 			  <&pitft>,"rotation:0"; /* drm */
+ 		fps =     <&pitft>,"fps:0";
+ 		debug =   <&pitft>,"debug:0";
+-		drm =     <&pitft>,"compatible=multi-inno,mi0283qt";
++		drm =     <&pitft>,"compatible=adafruit,yx240qv29";
++		touch-invx  = <&stmpe_touchscreen>,"touchscreen-inverted-x?";
++		touch-invy  = <&stmpe_touchscreen>,"touchscreen-inverted-y?";
++		touch-swapxy = <&stmpe_touchscreen>,"touchscreen-swapped-x-y?";
+ 	};
+ };
+--- a/arch/arm/boot/dts/overlays/pitft35-resistive-overlay.dts
++++ b/arch/arm/boot/dts/overlays/pitft35-resistive-overlay.dts
+@@ -49,7 +49,7 @@
+ 			#size-cells = <0>;
+ 
+ 			pitft: pitft at 0{
+-				compatible = "himax,hx8357d", "adafruit,yx350hv15";
++				compatible = "himax,hx8357d";
+ 				reg = <0>;
+ 				pinctrl-names = "default";
+ 				pinctrl-0 = <&pitft_pins>;
+@@ -64,6 +64,9 @@
+ 			};
+ 
+ 			pitft_ts at 1 {
++				/* needed to avoid dtc warning */
++				#address-cells = <1>;
++				#interrupt-cells = <1>;
+ 				compatible = "st,stmpe610";
+ 				reg = <1>;
+ 
+@@ -72,7 +75,7 @@
+ 				interrupt-parent = <&gpio>;
+ 				interrupt-controller;
+ 
+-				stmpe_touchscreen {
++				stmpe_touchscreen: stmpe_touchscreen {
+ 					compatible = "st,stmpe-ts";
+ 					st,sample-time = <4>;
+ 					st,mod-12b = <1>;
+@@ -117,5 +120,8 @@
+ 		debug =   <&pitft>,"debug:0";
+ 		drm =     <&pitft>,"compatible=adafruit,yx350hv15",
+ 			  <&pitft>,"backlight:0=",<&backlight>;
++		touch-invx  = <&stmpe_touchscreen>,"touchscreen-inverted-x?";
++		touch-invy  = <&stmpe_touchscreen>,"touchscreen-inverted-y?";
++		touch-swapxy = <&stmpe_touchscreen>,"touchscreen-swapped-x-y?";
+ 	};
+ };
diff --git a/target/linux/bcm27xx/patches-6.1/950-1263-ARM-dts-rp1-Boost-the-I2C-drive-strength.patch b/target/linux/bcm27xx/patches-6.1/950-1263-ARM-dts-rp1-Boost-the-I2C-drive-strength.patch
new file mode 100644
index 0000000000..55ce6523db
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1263-ARM-dts-rp1-Boost-the-I2C-drive-strength.patch
@@ -0,0 +1,95 @@
+From ea9b088747d379256e2582dd5c29638bf4ff9928 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Wed, 31 Jan 2024 17:20:07 +0000
+Subject: [PATCH 1263/1295] ARM: dts: rp1: Boost the I2C drive strength
+
+Boosting the drive strength on I2C pins allows SCL to achieve safe
+voltage swings, even at 1MHz.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ arch/arm/boot/dts/rp1.dtsi | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/arch/arm/boot/dts/rp1.dtsi
++++ b/arch/arm/boot/dts/rp1.dtsi
+@@ -650,66 +650,79 @@
+ 			rp1_i2c4_34_35: rp1_i2c4_34_35 {
+ 				function = "i2c4";
+ 				pins = "gpio34", "gpio35";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c6_38_39: rp1_i2c6_38_39 {
+ 				function = "i2c6";
+ 				pins = "gpio38", "gpio39";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c4_40_41: rp1_i2c4_40_41 {
+ 				function = "i2c4";
+ 				pins = "gpio40", "gpio41";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c5_44_45: rp1_i2c5_44_45 {
+ 				function = "i2c5";
+ 				pins = "gpio44", "gpio45";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c0_0_1: rp1_i2c0_0_1 {
+ 				function = "i2c0";
+ 				pins = "gpio0", "gpio1";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c0_8_9: rp1_i2c0_8_9 {
+ 				function = "i2c0";
+ 				pins = "gpio8", "gpio9";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c1_2_3: rp1_i2c1_2_3 {
+ 				function = "i2c1";
+ 				pins = "gpio2", "gpio3";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c1_10_11: rp1_i2c1_10_11 {
+ 				function = "i2c1";
+ 				pins = "gpio10", "gpio11";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c2_4_5: rp1_i2c2_4_5 {
+ 				function = "i2c2";
+ 				pins = "gpio4", "gpio5";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c2_12_13: rp1_i2c2_12_13 {
+ 				function = "i2c2";
+ 				pins = "gpio12", "gpio13";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c3_6_7: rp1_i2c3_6_7 {
+ 				function = "i2c3";
+ 				pins = "gpio6", "gpio7";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c3_14_15: rp1_i2c3_14_15 {
+ 				function = "i2c3";
+ 				pins = "gpio14", "gpio15";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 			rp1_i2c3_22_23: rp1_i2c3_22_23 {
+ 				function = "i2c3";
+ 				pins = "gpio22", "gpio23";
++				drive-strength = <12>;
+ 				bias-pull-up;
+ 			};
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1264-ARM-dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch b/target/linux/bcm27xx/patches-6.1/950-1264-ARM-dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch
new file mode 100644
index 0000000000..7052239224
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1264-ARM-dts-rp1-Add-a-safe-I2C-SDA-hold-time.patch
@@ -0,0 +1,75 @@
+From 15dedc2ad5a9073b8639881680672214f605a5c6 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Wed, 31 Jan 2024 17:44:02 +0000
+Subject: [PATCH 1264/1295] ARM: dts: rp1: Add a safe I2C SDA hold time
+
+Failing to set a reasonable SDA hold time can cause SDA to change too
+close to the falling edge of SCL. 300ns is the recommended minimum
+interval between the two at 100kHz and 400kHz, and also seems to
+work at 1MHz, so use that.
+
+See: https://github.com/raspberrypi/linux/issues/5914
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ arch/arm/boot/dts/rp1.dtsi | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/arch/arm/boot/dts/rp1.dtsi
++++ b/arch/arm/boot/dts/rp1.dtsi
+@@ -307,6 +307,7 @@
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
+ 			i2c-scl-rising-time-ns = <65>;
+ 			i2c-scl-falling-time-ns = <100>;
++			i2c-sda-hold-time-ns = <300>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -317,6 +318,7 @@
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
+ 			i2c-scl-rising-time-ns = <65>;
+ 			i2c-scl-falling-time-ns = <100>;
++			i2c-sda-hold-time-ns = <300>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -327,6 +329,7 @@
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
+ 			i2c-scl-rising-time-ns = <65>;
+ 			i2c-scl-falling-time-ns = <100>;
++			i2c-sda-hold-time-ns = <300>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -337,6 +340,7 @@
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
+ 			i2c-scl-rising-time-ns = <65>;
+ 			i2c-scl-falling-time-ns = <100>;
++			i2c-sda-hold-time-ns = <300>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -347,6 +351,7 @@
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
+ 			i2c-scl-rising-time-ns = <65>;
+ 			i2c-scl-falling-time-ns = <100>;
++			i2c-sda-hold-time-ns = <300>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -357,6 +362,7 @@
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
+ 			i2c-scl-rising-time-ns = <65>;
+ 			i2c-scl-falling-time-ns = <100>;
++			i2c-sda-hold-time-ns = <300>;
+ 			status = "disabled";
+ 		};
+ 
+@@ -367,6 +373,7 @@
+ 			clocks = <&rp1_clocks RP1_CLK_SYS>;
+ 			i2c-scl-rising-time-ns = <65>;
+ 			i2c-scl-falling-time-ns = <100>;
++			i2c-sda-hold-time-ns = <300>;
+ 			status = "disabled";
+ 		};
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1265-ASoC-DACplus-fix-16bit-sample-support-in-clock-consu.patch b/target/linux/bcm27xx/patches-6.1/950-1265-ASoC-DACplus-fix-16bit-sample-support-in-clock-consu.patch
new file mode 100644
index 0000000000..ba1b3edda5
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1265-ASoC-DACplus-fix-16bit-sample-support-in-clock-consu.patch
@@ -0,0 +1,33 @@
+From 89bd4e64da3345c2764a42875b99c96fa8931967 Mon Sep 17 00:00:00 2001
+From: Joerg Schambacher <joerg at hifiberry.com>
+Date: Thu, 1 Feb 2024 17:32:44 +0100
+Subject: [PATCH 1265/1295] ASoC: DACplus - fix 16bit sample support in clock
+ consumer mode
+
+The former code did not adjust the physical sample width when
+in clock consumer mode and has taken the fixed 32 bit default.
+This has caused the audio to be played at half its frequency due to
+the fixed bclk_ratio of 64.
+
+Signed-off-by: Joerg Schambacher <joerg at hifiberry.com>
+---
+ sound/soc/bcm/hifiberry_dacplus.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/sound/soc/bcm/hifiberry_dacplus.c
++++ b/sound/soc/bcm/hifiberry_dacplus.c
+@@ -279,13 +279,11 @@ static int snd_rpi_hifiberry_dacplus_hw_
+ 	int ret = 0;
+ 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ 	int channels = params_channels(params);
+-	int width = 32;
++	int width = snd_pcm_format_physical_width(params_format(params));
+ 
+ 	if (snd_rpi_hifiberry_is_dacpro) {
+ 		struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
+ 
+-		width = snd_pcm_format_physical_width(params_format(params));
+-
+ 		snd_rpi_hifiberry_dacplus_set_sclk(component,
+ 			params_rate(params));
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1266-ASoC-adds-support-for-AMP4-Pro-to-the-DAC-Plus-drive.patch b/target/linux/bcm27xx/patches-6.1/950-1266-ASoC-adds-support-for-AMP4-Pro-to-the-DAC-Plus-drive.patch
new file mode 100644
index 0000000000..84251f2800
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1266-ASoC-adds-support-for-AMP4-Pro-to-the-DAC-Plus-drive.patch
@@ -0,0 +1,114 @@
+From d58c054ba30b313bacbb7d19f559ecb4e3bb5c76 Mon Sep 17 00:00:00 2001
+From: Joerg Schambacher <joerg at hifiberry.com>
+Date: Fri, 19 Jan 2024 10:58:39 +0100
+Subject: [PATCH 1266/1295] ASoC: adds support for AMP4 Pro to the DAC Plus
+ driver
+
+The AMP4 Pro is a I2S master mode capable amplifier with
+clean onboard clock generators.
+We can share the card driver between TAS575x amplifiers
+and the PCM512x DACs as they are SW compatible.
+From a HW perspective though we need to limit the sample
+rates to the standard audio rates to avoid running the
+onboard clocks through the PLL. Using the PLL would require
+even a different HW.
+DAI/stream name are also set accordingly to allow the user
+a convenient identification of the soundcard
+
+Needs the pcm512x driver with TAS575x support (already in
+upstream kernel).
+
+Signed-off-by: Joerg Schambacher <joerg at hifiberry.com>
+---
+ sound/soc/bcm/hifiberry_dacplus.c | 41 ++++++++++++++++++++++++++++---
+ 1 file changed, 38 insertions(+), 3 deletions(-)
+
+--- a/sound/soc/bcm/hifiberry_dacplus.c
++++ b/sound/soc/bcm/hifiberry_dacplus.c
+@@ -58,10 +58,21 @@ static bool leds_off;
+ static bool auto_mute;
+ static int mute_ext_ctl;
+ static int mute_ext;
++static bool tas_device;
+ static struct gpio_desc *snd_mute_gpio;
+ static struct gpio_desc *snd_reset_gpio;
+ static struct snd_soc_card snd_rpi_hifiberry_dacplus;
+ 
++static const u32 master_dai_rates[] = {
++	44100, 48000, 88200, 96000,
++	176400, 192000, 352800, 384000,
++};
++
++static const struct snd_pcm_hw_constraint_list constraints_master = {
++	.count = ARRAY_SIZE(master_dai_rates),
++	.list  = master_dai_rates,
++};
++
+ static int snd_rpi_hifiberry_dacplus_mute_set(int mute)
+ {
+ 	gpiod_set_value_cansleep(snd_mute_gpio, mute);
+@@ -197,8 +208,13 @@ static int snd_rpi_hifiberry_dacplus_ini
+ 	if (snd_rpi_hifiberry_is_dacpro) {
+ 		struct snd_soc_dai_link *dai = rtd->dai_link;
+ 
+-		dai->name = "HiFiBerry DAC+ Pro";
+-		dai->stream_name = "HiFiBerry DAC+ Pro HiFi";
++		if (tas_device) {
++			dai->name = "HiFiBerry AMP4 Pro";
++			dai->stream_name = "HiFiBerry AMP4 Pro HiFi";
++		} else {
++			dai->name = "HiFiBerry DAC+ Pro";
++			dai->stream_name = "HiFiBerry DAC+ Pro HiFi";
++		}
+ 		dai->dai_fmt = SND_SOC_DAIFMT_I2S | SND_SOC_DAIFMT_NB_NF
+ 			| SND_SOC_DAIFMT_CBM_CFM;
+ 
+@@ -303,6 +319,18 @@ static int snd_rpi_hifiberry_dacplus_sta
+ {
+ 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ 	struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
++	int ret;
++
++	if (tas_device && !slave) {
++		ret = snd_pcm_hw_constraint_list(substream->runtime, 0,
++					  SNDRV_PCM_HW_PARAM_RATE,
++					  &constraints_master);
++		if (ret < 0) {
++			dev_err(rtd->card->dev,
++				"Cannot apply constraints for sample rates\n");
++			return ret;
++		}
++	}
+ 
+ 	if (auto_mute)
+ 		gpiod_set_value_cansleep(snd_mute_gpio, 0);
+@@ -324,7 +352,7 @@ static void snd_rpi_hifiberry_dacplus_sh
+ }
+ 
+ /* machine stream operations */
+-static struct snd_soc_ops snd_rpi_hifiberry_dacplus_ops = {
++static const struct snd_soc_ops snd_rpi_hifiberry_dacplus_ops = {
+ 	.hw_params = snd_rpi_hifiberry_dacplus_hw_params,
+ 	.startup = snd_rpi_hifiberry_dacplus_startup,
+ 	.shutdown = snd_rpi_hifiberry_dacplus_shutdown,
+@@ -394,6 +422,7 @@ static int snd_rpi_hifiberry_dacplus_pro
+ 	struct snd_soc_card *card = &snd_rpi_hifiberry_dacplus;
+ 	int len;
+ 	struct device_node *tpa_node;
++	struct device_node *tas_node;
+ 	struct property *tpa_prop;
+ 	struct of_changeset ocs;
+ 	struct property *pp;
+@@ -430,6 +459,12 @@ static int snd_rpi_hifiberry_dacplus_pro
+ 		}
+ 	}
+ 
++	tas_node = of_find_compatible_node(NULL, NULL, "ti,tas5756");
++	if (tas_node) {
++		tas_device = true;
++		dev_info(&pdev->dev, "TAS5756 device found!\n");
++	};
++
+ 	snd_rpi_hifiberry_dacplus.dev = &pdev->dev;
+ 	if (pdev->dev.of_node) {
+ 		struct device_node *i2s_node;
diff --git a/target/linux/bcm27xx/patches-6.1/950-1267-DT-overlays-adds-support-for-Hifiberry-AMP4-Pro.patch b/target/linux/bcm27xx/patches-6.1/950-1267-DT-overlays-adds-support-for-Hifiberry-AMP4-Pro.patch
new file mode 100644
index 0000000000..49429bca06
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1267-DT-overlays-adds-support-for-Hifiberry-AMP4-Pro.patch
@@ -0,0 +1,130 @@
+From 98ac9b84709dc01ee936b6fe79eaac5e3a4aa6e7 Mon Sep 17 00:00:00 2001
+From: Joerg Schambacher <joerg at hifiberry.com>
+Date: Fri, 19 Jan 2024 10:44:22 +0100
+Subject: [PATCH 1267/1295] DT-overlays: adds support for Hifiberry AMP4 Pro
+
+The AMP4 Pro uses a TI TAS5756 amplifier in master mode
+and requires the DAC Plus card driver and the
+pcm512x component driver with TAS support.
+
+Signed-off-by: Joerg Schambacher <joerg at hifiberry.com>
+---
+ arch/arm/boot/dts/overlays/Makefile           |  1 +
+ arch/arm/boot/dts/overlays/README             | 28 +++++++++
+ .../overlays/hifiberry-amp4pro-overlay.dts    | 63 +++++++++++++++++++
+ 3 files changed, 92 insertions(+)
+ create mode 100644 arch/arm/boot/dts/overlays/hifiberry-amp4pro-overlay.dts
+
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -86,6 +86,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ 	hifiberry-amp.dtbo \
+ 	hifiberry-amp100.dtbo \
+ 	hifiberry-amp3.dtbo \
++	hifiberry-amp4pro.dtbo \
+ 	hifiberry-dac.dtbo \
+ 	hifiberry-dacplus.dtbo \
+ 	hifiberry-dacplusadc.dtbo \
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -1738,6 +1738,34 @@ Load:   dtoverlay=hifiberry-amp3
+ Params: <None>
+ 
+ 
++Name:   hifiberry-amp4pro
++Info:   Configures the HifiBerry AMP4 Pro audio card
++Load:   dtoverlay=hifiberry-amp4pro,<param>=<val>
++Params: 24db_digital_gain       Allow gain to be applied via the TAS5756
++                                Digital volume control. Enable with
++                                "dtoverlay=hifiberry-amp4pro,24db_digital_gain"
++                                (The default behaviour is that the Digital
++                                volume control is limited to a maximum of
++                                0dB. ie. it can attenuate but not provide
++                                gain. For most users, this will be desired
++                                as it will prevent clipping. By appending
++                                the 24dB_digital_gain parameter, the Digital
++                                volume control will allow up to 24dB of
++                                gain. If this parameter is enabled, it is the
++                                responsibility of the user to ensure that
++                                the Digital volume control is set to a value
++                                that does not result in clipping/distortion!)
++        slave                   Force the amp into slave mode, using Pi as
++                                master for bit clock and frame clock.
++        leds_off                If set to 'true' the onboard indicator LEDs
++                                are switched off at all times.
++        auto_mute               If set to 'true' the amplifier is automatically
++                                muted when it is not playing.
++        mute_ext_ctl            The amplifier's HW mute control is enabled
++                                in ALSA mixer and set to <val>.
++                                Will be overwritten by ALSA user settings.
++
++
+ Name:   hifiberry-dac
+ Info:   Configures the HifiBerry DAC audio cards
+ Load:   dtoverlay=hifiberry-dac
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/hifiberry-amp4pro-overlay.dts
+@@ -0,0 +1,63 @@
++// Definitions for HiFiBerry AMP4PRO
++/dts-v1/;
++/plugin/;
++#include <dt-bindings/gpio/gpio.h>
++
++/ {
++	compatible = "brcm,bcm2835";
++
++	fragment at 0 {
++		target-path = "/";
++		__overlay__ {
++			dacpro_osc: dacpro_osc {
++				compatible = "hifiberry,dacpro-clk";
++				#clock-cells = <0>;
++			};
++		};
++	};
++
++	frag1: fragment at 1 {
++		target = <&i2s_clk_consumer>;
++		__overlay__ {
++			status = "okay";
++		};
++	};
++
++	fragment at 2 {
++		target = <&i2c1>;
++		__overlay__ {
++			#address-cells = <1>;
++			#size-cells = <0>;
++			status = "okay";
++
++			tas5756 at 4d {
++				#sound-dai-cells = <0>;
++				compatible = "ti,tas5756";
++				reg = <0x4d>;
++				clocks = <&dacpro_osc>;
++				status = "okay";
++			};
++		};
++	};
++
++	fragment at 3 {
++		target = <&sound>;
++		hifiberry_dacplus: __overlay__ {
++			compatible = "hifiberry,hifiberry-dacplus";
++			i2s-controller = <&i2s_clk_consumer>;
++			status = "okay";
++			mute-gpio = <&gpio 4 GPIO_ACTIVE_LOW>;
++		};
++	};
++
++	__overrides__ {
++		24db_digital_gain =
++			<&hifiberry_dacplus>,"hifiberry-amp4,24db_digital_gain?";
++		leds_off = <&hifiberry_dacplus>,"hifiberry-amp4,leds_off?";
++		mute_ext_ctl = <&hifiberry_dacplus>,"hifiberry-amp4,mute_ext_ctl:0";
++		auto_mute = <&hifiberry_dacplus>,"hifiberry-amp4,auto_mute?";
++		slave = <&hifiberry_dacplus>,"hifiberry-dacplus,slave?",
++			<&frag1>,"target:0=",<&i2s_clk_producer>,
++			<&hifiberry_dacplus>,"i2s-controller:0=",<&i2s_clk_producer>;
++	};
++};
diff --git a/target/linux/bcm27xx/patches-6.1/950-1268-ASoC-DACplusADCPro-fix-16bit-sample-support-in-clock.patch b/target/linux/bcm27xx/patches-6.1/950-1268-ASoC-DACplusADCPro-fix-16bit-sample-support-in-clock.patch
new file mode 100644
index 0000000000..f608e5ee7d
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1268-ASoC-DACplusADCPro-fix-16bit-sample-support-in-clock.patch
@@ -0,0 +1,38 @@
+From ba86793796525f8276fafbaf9d31d5156a2cfcb5 Mon Sep 17 00:00:00 2001
+From: Joerg Schambacher <joerg at hifiberry.com>
+Date: Fri, 2 Feb 2024 08:51:06 +0100
+Subject: [PATCH 1268/1295] ASoC: DACplusADCPro - fix 16bit sample support in
+ clock consumer mode
+
+The former code did not adjust the physical sample width when in
+clock consumer mode and has taken the fixed 32 bit default. This
+has caused the audio to be played at half its frequency due to
+the fixed bclk_ratio of 64.
+
+Problem appears only on PI5 as on the former PIs the I2S module
+did simply run at fixed 64x rate.
+
+Signed-off-by: Joerg Schambacher <joerg at hifiberry.com>
+---
+ sound/soc/bcm/hifiberry_dacplusadcpro.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/sound/soc/bcm/hifiberry_dacplusadcpro.c
++++ b/sound/soc/bcm/hifiberry_dacplusadcpro.c
+@@ -383,15 +383,13 @@ static int snd_rpi_hifiberry_dacplusadcp
+ 	int ret = 0;
+ 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ 	int channels = params_channels(params);
+-	int width = 32;
++	int width = snd_pcm_format_physical_width(params_format(params));
+ 	struct snd_soc_component *dac = asoc_rtd_to_codec(rtd, 0)->component;
+ 	struct snd_soc_dai *dai = asoc_rtd_to_codec(rtd, 0);
+ 	struct snd_soc_dai_driver *drv = dai->driver;
+ 	const struct snd_soc_dai_ops *ops = drv->ops;
+ 
+ 	if (snd_rpi_hifiberry_is_dacpro) {
+-		width = snd_pcm_format_physical_width(params_format(params));
+-
+ 		snd_rpi_hifiberry_dacplusadcpro_set_sclk(dac,
+ 			params_rate(params));
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1269-overlays-Correct-some-compatible-strings.patch b/target/linux/bcm27xx/patches-6.1/950-1269-overlays-Correct-some-compatible-strings.patch
new file mode 100644
index 0000000000..f29e20d7bf
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1269-overlays-Correct-some-compatible-strings.patch
@@ -0,0 +1,72 @@
+From 707f6e221946ec2025e8f0e2fedf92016ed8a5b7 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Fri, 2 Feb 2024 14:08:14 +0000
+Subject: [PATCH 1269/1295] overlays: Correct some compatible strings
+
+More thorough overlay testing has identified some Pi 4-specific
+overlays that has "brcm,bcm2835" compatible strings. Correct them.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ arch/arm/boot/dts/overlays/midi-uart2-overlay.dts  | 2 +-
+ arch/arm/boot/dts/overlays/midi-uart3-overlay.dts  | 2 +-
+ arch/arm/boot/dts/overlays/midi-uart4-overlay.dts  | 2 +-
+ arch/arm/boot/dts/overlays/midi-uart5-overlay.dts  | 2 +-
+ arch/arm/boot/dts/overlays/ramoops-pi4-overlay.dts | 2 +-
+ 5 files changed, 5 insertions(+), 5 deletions(-)
+
+--- a/arch/arm/boot/dts/overlays/midi-uart2-overlay.dts
++++ b/arch/arm/boot/dts/overlays/midi-uart2-overlay.dts
+@@ -12,7 +12,7 @@
+  */
+ 
+ /{
+-        compatible = "brcm,bcm2835";
++        compatible = "brcm,bcm2711";
+ 
+         fragment at 0 {
+                 target-path = "/";
+--- a/arch/arm/boot/dts/overlays/midi-uart3-overlay.dts
++++ b/arch/arm/boot/dts/overlays/midi-uart3-overlay.dts
+@@ -12,7 +12,7 @@
+  */
+ 
+ /{
+-        compatible = "brcm,bcm2835";
++        compatible = "brcm,bcm2711";
+ 
+         fragment at 0 {
+                 target-path = "/";
+--- a/arch/arm/boot/dts/overlays/midi-uart4-overlay.dts
++++ b/arch/arm/boot/dts/overlays/midi-uart4-overlay.dts
+@@ -12,7 +12,7 @@
+  */
+ 
+ /{
+-        compatible = "brcm,bcm2835";
++        compatible = "brcm,bcm2711";
+ 
+         fragment at 0 {
+                 target-path = "/";
+--- a/arch/arm/boot/dts/overlays/midi-uart5-overlay.dts
++++ b/arch/arm/boot/dts/overlays/midi-uart5-overlay.dts
+@@ -12,7 +12,7 @@
+  */
+ 
+ /{
+-        compatible = "brcm,bcm2835";
++        compatible = "brcm,bcm2711";
+ 
+         fragment at 0 {
+                 target-path = "/";
+--- a/arch/arm/boot/dts/overlays/ramoops-pi4-overlay.dts
++++ b/arch/arm/boot/dts/overlays/ramoops-pi4-overlay.dts
+@@ -2,7 +2,7 @@
+ /plugin/;
+ 
+ / {
+-	compatible = "brcm,bcm2835";
++	compatible = "brcm,bcm2711";
+ 
+ 	fragment at 0 {
+ 		target = <&rmem>;
diff --git a/target/linux/bcm27xx/patches-6.1/950-1270-overlays-Delete-deprecated-overlay-mpu6050.patch b/target/linux/bcm27xx/patches-6.1/950-1270-overlays-Delete-deprecated-overlay-mpu6050.patch
new file mode 100644
index 0000000000..3f1864f4ec
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1270-overlays-Delete-deprecated-overlay-mpu6050.patch
@@ -0,0 +1,57 @@
+From 223d1247c0b0c0659a65949b6b9c3de53fd14223 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Fri, 2 Feb 2024 14:14:47 +0000
+Subject: [PATCH 1270/1295] overlays: Delete deprecated overlay mpu6050
+
+The mpu6050 overlay has been deprecated for a year (when we were still
+shipping rpi-5.15.y). Delete it.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ arch/arm/boot/dts/overlays/Makefile           |  1 -
+ .../arm/boot/dts/overlays/mpu6050-overlay.dts | 29 -------------------
+ 2 files changed, 30 deletions(-)
+ delete mode 100644 arch/arm/boot/dts/overlays/mpu6050-overlay.dts
+
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -172,7 +172,6 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ 	mipi-dbi-spi.dtbo \
+ 	mlx90640.dtbo \
+ 	mmc.dtbo \
+-	mpu6050.dtbo \
+ 	mz61581.dtbo \
+ 	ov2311.dtbo \
+ 	ov5647.dtbo \
+--- a/arch/arm/boot/dts/overlays/mpu6050-overlay.dts
++++ /dev/null
+@@ -1,29 +0,0 @@
+-// Definitions for MPU6050
+-/dts-v1/;
+-/plugin/;
+-
+-/ {
+-        compatible = "brcm,bcm2835";
+-
+-        fragment at 0 {
+-                target = <&i2c1>;
+-                __overlay__ {
+-                        #address-cells = <1>;
+-                        #size-cells = <0>;
+-                        status = "okay";
+-                        clock-frequency = <400000>;
+-
+-                        mpu6050: mpu6050 at 68 {
+-                                compatible = "invensense,mpu6050";
+-                                reg = <0x68>;
+-                                interrupt-parent = <&gpio>;
+-                                interrupts = <4 1>;
+-                        };
+-                };
+-        };
+-
+-        __overrides__ {
+-                interrupt = <&mpu6050>,"interrupts:0";
+-                addr = <&mpu6050>,"reg:0";
+-        };
+-};
diff --git a/target/linux/bcm27xx/patches-6.1/950-1271-drivers-media-cfe-Increase-default-size-of-embedded-.patch b/target/linux/bcm27xx/patches-6.1/950-1271-drivers-media-cfe-Increase-default-size-of-embedded-.patch
new file mode 100644
index 0000000000..90cfdc4ebe
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1271-drivers-media-cfe-Increase-default-size-of-embedded-.patch
@@ -0,0 +1,36 @@
+From beba81b0b77268f72d717ab8ec98afe11a176ee0 Mon Sep 17 00:00:00 2001
+From: Naushir Patuck <naush at raspberrypi.com>
+Date: Mon, 5 Feb 2024 12:12:17 +0000
+Subject: [PATCH 1271/1295] drivers: media: cfe: Increase default size of
+ embedded buffer
+
+Increase the size of the default embedded buffer to 16k. This is done to
+match what is advertised by the IMX219 driver and workaround a problem
+where the embedded stream is not actually used. Without full streams API
+support, the media pipeline validation will fail in these circumstances.
+
+Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
+---
+ drivers/media/platform/raspberrypi/rp1_cfe/cfe.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
++++ b/drivers/media/platform/raspberrypi/rp1_cfe/cfe.c
+@@ -93,7 +93,7 @@ MODULE_PARM_DESC(verbose_debug, "verbose
+ #define MIN_WIDTH 16
+ #define MIN_HEIGHT 16
+ /* Default size of the embedded buffer */
+-#define DEFAULT_EMBEDDED_SIZE 8192
++#define DEFAULT_EMBEDDED_SIZE 16384
+ 
+ const struct v4l2_mbus_framefmt cfe_default_format = {
+ 	.width = 640,
+@@ -107,7 +107,7 @@ const struct v4l2_mbus_framefmt cfe_defa
+ };
+ 
+ const struct v4l2_mbus_framefmt cfe_default_meta_format = {
+-	.width = 8192,
++	.width = DEFAULT_EMBEDDED_SIZE,
+ 	.height = 1,
+ 	.code = MEDIA_BUS_FMT_SENSOR_DATA,
+ 	.field = V4L2_FIELD_NONE,
diff --git a/target/linux/bcm27xx/patches-6.1/950-1274-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch b/target/linux/bcm27xx/patches-6.1/950-1274-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch
new file mode 100644
index 0000000000..e469b44880
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1274-serial-sc16is7xx-Don-t-spin-if-no-data-received.patch
@@ -0,0 +1,26 @@
+From 58c600f728f2787e905eff2f678fa9cf09694004 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Fri, 2 Feb 2024 15:41:29 +0000
+Subject: [PATCH 1274/1295] serial: sc16is7xx: Don't spin if no data received
+
+There are multiple causes of interrupts, errors being one, and only the
+receipt of data warrants continued polling.
+
+See: https://github.com/raspberrypi/linux/issues/2676
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ drivers/tty/serial/sc16is7xx.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/drivers/tty/serial/sc16is7xx.c
++++ b/drivers/tty/serial/sc16is7xx.c
+@@ -762,6 +762,8 @@ static bool sc16is7xx_port_irq(struct sc
+ 
+ 		if (rxlen)
+ 			sc16is7xx_handle_rx(port, rxlen, iir);
++		else
++			rc = false;
+ 		break;
+ 		/* CTSRTS interrupt comes only when CTS goes inactive */
+ 	case SC16IS7XX_IIR_CTSRTS_SRC:
diff --git a/target/linux/bcm27xx/patches-6.1/950-1276-Impliment-driver-support-for-Interlude-Audio-Digital.patch b/target/linux/bcm27xx/patches-6.1/950-1276-Impliment-driver-support-for-Interlude-Audio-Digital.patch
new file mode 100644
index 0000000000..ff638aed61
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1276-Impliment-driver-support-for-Interlude-Audio-Digital.patch
@@ -0,0 +1,196 @@
+From fb21611efd7cd916646d9ab2988c3af08f139761 Mon Sep 17 00:00:00 2001
+From: Ben Payne <ben at bluerocksoft.com>
+Date: Tue, 13 Feb 2024 14:55:14 -0800
+Subject: [PATCH 1276/1295] Impliment driver support for Interlude Audio
+ Digital Hat
+
+Implementing driver support for
+Interlude audio's WM8805 based digital hat
+by leveraging existing drivers
+---
+ sound/soc/bcm/rpi-wm8804-soundcard.c | 139 +++++++++++++++++++++++++++
+ 1 file changed, 139 insertions(+)
+
+--- a/sound/soc/bcm/rpi-wm8804-soundcard.c
++++ b/sound/soc/bcm/rpi-wm8804-soundcard.c
+@@ -34,6 +34,7 @@
+ #include <linux/gpio/consumer.h>
+ #include <linux/platform_device.h>
+ #include <linux/module.h>
++#include <linux/delay.h>
+ 
+ #include <sound/core.h>
+ #include <sound/pcm.h>
+@@ -65,6 +66,10 @@ struct snd_rpi_wm8804_drvdata {
+ static struct gpio_desc *snd_clk44gpio;
+ static struct gpio_desc *snd_clk48gpio;
+ static int wm8804_samplerate = 0;
++static struct gpio_desc *led_gpio_1;
++static struct gpio_desc *led_gpio_2;
++static struct gpio_desc *led_gpio_3;
++static struct gpio_desc *custom_reset;
+ 
+ /* Forward declarations */
+ static struct snd_soc_dai_link snd_allo_digione_dai[];
+@@ -74,6 +79,37 @@ static struct snd_soc_card snd_rpi_wm880
+ #define CLK_44EN_RATE 22579200UL
+ #define CLK_48EN_RATE 24576000UL
+ 
++static const char * const wm8805_input_select_text[] = {
++	"Rx 0",
++	"Rx 1",
++	"Rx 2",
++	"Rx 3",
++	"Rx 4",
++	"Rx 5",
++	"Rx 6",
++	"Rx 7"
++};
++
++static const unsigned int wm8805_input_channel_select_value[] = {
++	0, 1, 2, 3, 4, 5, 6, 7
++};
++
++static const struct soc_enum wm8805_input_channel_sel[] = {
++	SOC_VALUE_ENUM_SINGLE(WM8804_PLL6, 0, 7, ARRAY_SIZE(wm8805_input_select_text),
++	wm8805_input_select_text, wm8805_input_channel_select_value),
++};
++
++static const struct snd_kcontrol_new wm8805_input_controls_card[] = {
++	SOC_ENUM("Select Input Channel", wm8805_input_channel_sel[0]),
++};
++
++static int wm8805_add_input_controls(struct snd_soc_component *component)
++{
++	snd_soc_add_component_controls(component, wm8805_input_controls_card,
++	ARRAY_SIZE(wm8805_input_controls_card));
++	return 0;
++}
++
+ static unsigned int snd_rpi_wm8804_enable_clock(unsigned int samplerate)
+ {
+ 	switch (samplerate) {
+@@ -187,6 +223,53 @@ static struct snd_soc_ops snd_rpi_wm8804
+ 	.hw_params = snd_rpi_wm8804_hw_params,
+ };
+ 
++static int snd_interlude_audio_hw_params(struct snd_pcm_substream *substream,
++		struct snd_pcm_hw_params *params)
++{
++	int ret = snd_rpi_wm8804_hw_params(substream, params);
++	int samplerate = params_rate(params);
++
++	switch (samplerate) {
++	case 44100:
++		gpiod_set_value_cansleep(led_gpio_1, 1);
++		gpiod_set_value_cansleep(led_gpio_2, 0);
++		gpiod_set_value_cansleep(led_gpio_3, 0);
++		break;
++	case 48000:
++		gpiod_set_value_cansleep(led_gpio_1, 1);
++		gpiod_set_value_cansleep(led_gpio_2, 0);
++		gpiod_set_value_cansleep(led_gpio_3, 0);
++		break;
++	case 88200:
++		gpiod_set_value_cansleep(led_gpio_1, 0);
++		gpiod_set_value_cansleep(led_gpio_2, 1);
++		gpiod_set_value_cansleep(led_gpio_3, 0);
++		break;
++	case 96000:
++		gpiod_set_value_cansleep(led_gpio_1, 0);
++		gpiod_set_value_cansleep(led_gpio_2, 1);
++		gpiod_set_value_cansleep(led_gpio_3, 0);
++		break;
++	case 176400:
++		gpiod_set_value_cansleep(led_gpio_1, 0);
++		gpiod_set_value_cansleep(led_gpio_2, 0);
++		gpiod_set_value_cansleep(led_gpio_3, 1);
++		break;
++	case 192000:
++		gpiod_set_value_cansleep(led_gpio_1, 0);
++		gpiod_set_value_cansleep(led_gpio_2, 0);
++		gpiod_set_value_cansleep(led_gpio_3, 1);
++		break;
++	default:
++		break;
++	}
++	return ret;
++}
++
++const struct snd_soc_ops interlude_audio_digital_dai_ops = {
++	.hw_params = snd_interlude_audio_hw_params,
++};
++
+ SND_SOC_DAILINK_DEFS(justboom_digi,
+ 	DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ 	DAILINK_COMP_ARRAY(COMP_EMPTY()),
+@@ -287,6 +370,60 @@ static struct snd_rpi_wm8804_drvdata drv
+ 	.probe     = snd_hifiberry_digi_probe,
+ };
+ 
++SND_SOC_DAILINK_DEFS(interlude_audio_digital,
++	DAILINK_COMP_ARRAY(COMP_EMPTY()),
++	DAILINK_COMP_ARRAY(COMP_EMPTY()),
++	DAILINK_COMP_ARRAY(COMP_EMPTY()));
++
++static int snd_interlude_audio_init(struct snd_soc_pcm_runtime *rtd)
++{
++	struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
++	int ret;
++
++	ret = wm8805_add_input_controls(component);
++	if (ret != 0)
++		pr_err("failed to add input controls");
++
++	return 0;
++}
++
++
++static struct snd_soc_dai_link snd_interlude_audio_digital_dai[] = {
++{
++	.name        = "Interlude Audio Digital",
++	.stream_name = "Interlude Audio Digital HiFi",
++	.init        = snd_interlude_audio_init,
++	.ops		 = &interlude_audio_digital_dai_ops,
++	SND_SOC_DAILINK_REG(interlude_audio_digital),
++},
++};
++
++
++static int snd_interlude_audio_digital_probe(struct platform_device *pdev)
++{
++	if (IS_ERR(snd_clk44gpio) || IS_ERR(snd_clk48gpio))
++		return 0;
++
++	custom_reset = devm_gpiod_get(&pdev->dev, "reset", GPIOD_OUT_LOW);
++	gpiod_set_value_cansleep(custom_reset, 0);
++	mdelay(10);
++	gpiod_set_value_cansleep(custom_reset, 1);
++
++	snd_interlude_audio_digital_dai->name = "Interlude Audio Digital";
++	snd_interlude_audio_digital_dai->stream_name = "Interlude Audio Digital HiFi";
++	led_gpio_1 = devm_gpiod_get(&pdev->dev, "led1", GPIOD_OUT_LOW);
++	led_gpio_2 = devm_gpiod_get(&pdev->dev, "led2", GPIOD_OUT_LOW);
++	led_gpio_3 = devm_gpiod_get(&pdev->dev, "led3", GPIOD_OUT_LOW);
++	return 0;
++}
++
++
++static struct snd_rpi_wm8804_drvdata drvdata_interlude_audio_digital = {
++	.card_name = "snd_IA_Digital_Hat",
++	.dai       = snd_interlude_audio_digital_dai,
++	.probe     = snd_interlude_audio_digital_probe,
++};
++
+ static const struct of_device_id snd_rpi_wm8804_of_match[] = {
+ 	{ .compatible = "justboom,justboom-digi",
+ 		.data = (void *) &drvdata_justboom_digi },
+@@ -296,6 +433,8 @@ static const struct of_device_id snd_rpi
+ 		.data = (void *) &drvdata_allo_digione },
+ 	{ .compatible = "hifiberry,hifiberry-digi",
+ 		.data = (void *) &drvdata_hifiberry_digi },
++	{ .compatible = "interludeaudio,interludeaudio-digital",
++		.data = (void *) &drvdata_interlude_audio_digital },
+ 	{},
+ };
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1277-Add-overlays-needed-for-Interlude-Audio-Digital-and-.patch b/target/linux/bcm27xx/patches-6.1/950-1277-Add-overlays-needed-for-Interlude-Audio-Digital-and-.patch
new file mode 100644
index 0000000000..2c4196ad4d
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1277-Add-overlays-needed-for-Interlude-Audio-Digital-and-.patch
@@ -0,0 +1,179 @@
+From d787ecf50d7a6ec32f8e1afcb8559600396c0f45 Mon Sep 17 00:00:00 2001
+From: Ben Payne <ben at bluerocksoft.com>
+Date: Tue, 13 Feb 2024 14:56:28 -0800
+Subject: [PATCH 1277/1295] Add overlays needed for Interlude Audio Digital and
+ Analog hats
+
+Adding 2 new overlays for use with
+Interlude Audio's Digital and Analog hats
+adding descriptions for both in README
+adding changes to Makefile to include both DT's
+---
+ arch/arm/boot/dts/overlays/Makefile           |  2 +
+ arch/arm/boot/dts/overlays/README             | 12 +++
+ .../interludeaudio-analog-overlay.dts         | 73 +++++++++++++++++++
+ .../interludeaudio-digital-overlay.dts        | 49 +++++++++++++
+ 4 files changed, 136 insertions(+)
+ create mode 100644 arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts
+ create mode 100644 arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts
+
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -131,6 +131,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ 	imx477.dtbo \
+ 	imx519.dtbo \
+ 	imx708.dtbo \
++	interludeaudio-analog.dtbo \
++	interludeaudio-digital.dtbo \
+ 	iqaudio-codec.dtbo \
+ 	iqaudio-dac.dtbo \
+ 	iqaudio-dacplus.dtbo \
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -2708,6 +2708,18 @@ Params: rotation                Mounting
+                                 450000000 (default), 447000000, 453000000.
+ 
+ 
++Name:   interludeaudio-analog
++Info:   Configures Interlude Audio Analog Hat audio card
++Load:   dtoverlay=interludeaudio-analog,<param>=<val>
++Params: gpiopin                 GPIO pin for codec reset
++
++
++Name:   interludeaudio-digital
++Info:   Configures Interlude Audio Digital Hat audio card
++Load:   dtoverlay=interludeaudio-digital
++Params: <None>
++
++
+ Name:   iqaudio-codec
+ Info:   Configures the IQaudio Codec audio card
+ Load:   dtoverlay=iqaudio-codec
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/interludeaudio-analog-overlay.dts
+@@ -0,0 +1,73 @@
++// Definitions for Interlude audio analog hat
++/dts-v1/;
++/plugin/;
++
++/ {
++	compatible = "brcm,bcm2835";
++
++	fragment at 0 {
++		target = <&sound>;
++		__overlay__ {
++			compatible = "simple-audio-card";
++			i2s-controller = <&i2s_clk_consumer>;
++			status = "okay";
++
++			simple-audio-card,name = "snd_IA_Analog_Hat";
++
++			simple-audio-card,widgets =
++				"Line", "Line In",
++				"Line", "Line Out";
++
++			simple-audio-card,routing =
++				"Line Out","AOUTA+",
++				"Line Out","AOUTA-",
++				"Line Out","AOUTB+",
++				"Line Out","AOUTB-",
++				"AINA","Line In",
++				"AINB","Line In";
++
++			simple-audio-card,format = "i2s";
++
++			simple-audio-card,bitclock-master = <&sound_master>;
++			simple-audio-card,frame-master = <&sound_master>;
++
++			simple-audio-card,cpu {
++				sound-dai = <&i2s>;
++				dai-tdm-slot-num = <2>;
++				dai-tdm-slot-width = <32>;
++			};
++
++			sound_master: simple-audio-card,codec {
++				sound-dai = <&cs4271>;
++				system-clock-frequency = <24576000>;
++			};
++		};
++	};
++
++	fragment at 1 {
++		target = <&i2s_clk_consumer>;
++		__overlay__ {
++			status = "okay";
++		};
++	};
++
++	fragment at 2 {
++		target = <&i2c1>;
++		__overlay__ {
++			#address-cells = <1>;
++			#size-cells = <0>;
++			status = "okay";
++
++			cs4271: cs4271 at 10 {
++				#sound-dai-cells = <0>;
++				compatible = "cirrus,cs4271";
++				reg = <0x10>;
++				status = "okay";
++				reset-gpio = <&gpio 24 0>; /* Pin 26, active high */
++			};
++		};
++	};
++	__overrides__ {
++		gpiopin = <&cs4271>,"reset-gpio:4";
++	};
++};
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/interludeaudio-digital-overlay.dts
+@@ -0,0 +1,49 @@
++// Definitions for Interlude Audio Digital Hat
++/dts-v1/;
++/plugin/;
++
++/ {
++	compatible = "brcm,bcm2835";
++
++	fragment at 0 {
++		target = <&i2s_clk_consumer>;
++		__overlay__ {
++			status = "okay";
++		};
++	};
++
++	fragment at 1 {
++		target = <&i2c1>;
++		__overlay__ {
++			#address-cells = <1>;
++			#size-cells = <0>;
++			status = "okay";
++
++			wm8804 at 3b {
++				#sound-dai-cells = <0>;
++				compatible = "wlf,wm8804";
++				reg = <0x3b>;
++				PVDD-supply = <&vdd_3v3_reg>;
++				DVDD-supply = <&vdd_3v3_reg>;
++				status = "okay";
++			};
++		};
++	};
++
++
++	fragment at 2 {
++		target = <&sound>;
++		__overlay__ {
++			compatible = "interludeaudio,interludeaudio-digital";
++			i2s-controller = <&i2s_clk_consumer>;
++			status = "okay";
++			clock44-gpio = <&gpio 22 0>;
++			clock48-gpio = <&gpio 27 0>;
++			led1-gpio = <&gpio 13 0>;
++			led2-gpio = <&gpio 12 0>;
++			led3-gpio = <&gpio 6 0>;
++			reset-gpio = <&gpio 23 0>;
++		};
++	};
++
++};
diff --git a/target/linux/bcm27xx/patches-6.1/950-1279-drm-v3d-Enable-V3D-to-use-different-PAGE_SIZE.patch b/target/linux/bcm27xx/patches-6.1/950-1279-drm-v3d-Enable-V3D-to-use-different-PAGE_SIZE.patch
new file mode 100644
index 0000000000..39d4ce9067
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1279-drm-v3d-Enable-V3D-to-use-different-PAGE_SIZE.patch
@@ -0,0 +1,118 @@
+From eb06d31da3e2025a2e578d8de9843e24b68137a6 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ma=C3=ADra=20Canal?= <mcanal at igalia.com>
+Date: Tue, 13 Feb 2024 15:26:44 -0300
+Subject: [PATCH 1279/1295] drm/v3d: Enable V3D to use different PAGE_SIZE
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Currently, the V3D driver uses PAGE_SHIFT over the assumption that
+PAGE_SHIFT = 12, as the PAGE_SIZE = 4KB. But, the RPi 5 is using
+PAGE_SIZE = 16KB, so the MMU PAGE_SHIFT is different than the system's
+PAGE_SHIFT.
+
+Enable V3D to be used in system's with any PAGE_SIZE by making sure that
+everything MMU-related uses the MMU page shift.
+
+Signed-off-by: Ma?ra Canal <mcanal at igalia.com>
+---
+ drivers/gpu/drm/v3d/v3d_bo.c      | 12 ++++++------
+ drivers/gpu/drm/v3d/v3d_debugfs.c |  2 +-
+ drivers/gpu/drm/v3d/v3d_drv.h     |  2 ++
+ drivers/gpu/drm/v3d/v3d_irq.c     |  2 +-
+ drivers/gpu/drm/v3d/v3d_mmu.c     |  2 --
+ 5 files changed, 10 insertions(+), 10 deletions(-)
+
+--- a/drivers/gpu/drm/v3d/v3d_bo.c
++++ b/drivers/gpu/drm/v3d/v3d_bo.c
+@@ -37,7 +37,7 @@ void v3d_free_object(struct drm_gem_obje
+ 
+ 	mutex_lock(&v3d->bo_lock);
+ 	v3d->bo_stats.num_allocated--;
+-	v3d->bo_stats.pages_allocated -= obj->size >> PAGE_SHIFT;
++	v3d->bo_stats.pages_allocated -= obj->size >> V3D_MMU_PAGE_SHIFT;
+ 	mutex_unlock(&v3d->bo_lock);
+ 
+ 	spin_lock(&v3d->mm_lock);
+@@ -106,8 +106,8 @@ v3d_bo_create_finish(struct drm_gem_obje
+ 	 * lifetime of the BO.
+ 	 */
+ 	ret = drm_mm_insert_node_generic(&v3d->mm, &bo->node,
+-					 obj->size >> PAGE_SHIFT,
+-					 GMP_GRANULARITY >> PAGE_SHIFT, 0, 0);
++					 obj->size >> V3D_MMU_PAGE_SHIFT,
++					 GMP_GRANULARITY >> V3D_MMU_PAGE_SHIFT, 0, 0);
+ 	spin_unlock(&v3d->mm_lock);
+ 	if (ret)
+ 		return ret;
+@@ -115,7 +115,7 @@ v3d_bo_create_finish(struct drm_gem_obje
+ 	/* Track stats for /debug/dri/n/bo_stats. */
+ 	mutex_lock(&v3d->bo_lock);
+ 	v3d->bo_stats.num_allocated++;
+-	v3d->bo_stats.pages_allocated += obj->size >> PAGE_SHIFT;
++	v3d->bo_stats.pages_allocated += obj->size >> V3D_MMU_PAGE_SHIFT;
+ 	mutex_unlock(&v3d->bo_lock);
+ 
+ 	v3d_mmu_insert_ptes(bo);
+@@ -183,7 +183,7 @@ int v3d_create_bo_ioctl(struct drm_devic
+ 	if (IS_ERR(bo))
+ 		return PTR_ERR(bo);
+ 
+-	args->offset = bo->node.start << PAGE_SHIFT;
++	args->offset = bo->node.start << V3D_MMU_PAGE_SHIFT;
+ 
+ 	ret = drm_gem_handle_create(file_priv, &bo->base.base, &args->handle);
+ 	drm_gem_object_put(&bo->base.base);
+@@ -228,7 +228,7 @@ int v3d_get_bo_offset_ioctl(struct drm_d
+ 	}
+ 	bo = to_v3d_bo(gem_obj);
+ 
+-	args->offset = bo->node.start << PAGE_SHIFT;
++	args->offset = bo->node.start << V3D_MMU_PAGE_SHIFT;
+ 
+ 	drm_gem_object_put(gem_obj);
+ 	return 0;
+--- a/drivers/gpu/drm/v3d/v3d_debugfs.c
++++ b/drivers/gpu/drm/v3d/v3d_debugfs.c
+@@ -220,7 +220,7 @@ static int v3d_debugfs_bo_stats(struct s
+ 	seq_printf(m, "allocated bos:          %d\n",
+ 		   v3d->bo_stats.num_allocated);
+ 	seq_printf(m, "allocated bo size (kb): %ld\n",
+-		   (long)v3d->bo_stats.pages_allocated << (PAGE_SHIFT - 10));
++		   (long)v3d->bo_stats.pages_allocated << (V3D_MMU_PAGE_SHIFT - 10));
+ 	mutex_unlock(&v3d->bo_lock);
+ 
+ 	return 0;
+--- a/drivers/gpu/drm/v3d/v3d_drv.h
++++ b/drivers/gpu/drm/v3d/v3d_drv.h
+@@ -19,6 +19,8 @@ struct reset_control;
+ 
+ #define GMP_GRANULARITY (128 * 1024)
+ 
++#define V3D_MMU_PAGE_SHIFT 12
++
+ #define V3D_MAX_QUEUES (V3D_CACHE_CLEAN + 1)
+ 
+ static inline char *
+--- a/drivers/gpu/drm/v3d/v3d_irq.c
++++ b/drivers/gpu/drm/v3d/v3d_irq.c
+@@ -70,7 +70,7 @@ v3d_overflow_mem_work(struct work_struct
+ 	list_add_tail(&bo->unref_head, &v3d->bin_job->render->unref_list);
+ 	spin_unlock_irqrestore(&v3d->job_lock, irqflags);
+ 
+-	V3D_CORE_WRITE(0, V3D_PTB_BPOA, bo->node.start << PAGE_SHIFT);
++	V3D_CORE_WRITE(0, V3D_PTB_BPOA, bo->node.start << V3D_MMU_PAGE_SHIFT);
+ 	V3D_CORE_WRITE(0, V3D_PTB_BPOS, obj->size);
+ 
+ out:
+--- a/drivers/gpu/drm/v3d/v3d_mmu.c
++++ b/drivers/gpu/drm/v3d/v3d_mmu.c
+@@ -21,8 +21,6 @@
+ #include "v3d_drv.h"
+ #include "v3d_regs.h"
+ 
+-#define V3D_MMU_PAGE_SHIFT 12
+-
+ /* Note: All PTEs for the 1MB superpage must be filled with the
+  * superpage bit set.
+  */
diff --git a/target/linux/bcm27xx/patches-6.1/950-1280-overlays-adau1977-adc-Replace-use-of-i2c-label.patch b/target/linux/bcm27xx/patches-6.1/950-1280-overlays-adau1977-adc-Replace-use-of-i2c-label.patch
new file mode 100644
index 0000000000..bb28d9369e
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1280-overlays-adau1977-adc-Replace-use-of-i2c-label.patch
@@ -0,0 +1,25 @@
+From aa00918b9562daa3b776600f48d8264b20fd54f6 Mon Sep 17 00:00:00 2001
+From: Phil Elwell <phil at raspberrypi.com>
+Date: Sun, 18 Feb 2024 15:31:50 +0000
+Subject: [PATCH 1280/1295] overlays: adau1977-adc: Replace use of i2c label
+
+The label 'i2c' is no longer created by the firmware - i2c_arm or
+i2c1 should be used instead. Replace the last occurrence of &i2c with
+&i2c1.
+
+Signed-off-by: Phil Elwell <phil at raspberrypi.com>
+---
+ arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts
++++ b/arch/arm/boot/dts/overlays/adau1977-adc-overlay.dts
+@@ -6,7 +6,7 @@
+ 	compatible = "brcm,bcm2835";
+     
+ 	fragment at 0 {
+-        	target = <&i2c>;
++		target = <&i2c1>;
+         	
+ 		__overlay__ {
+ 			#address-cells = <1>;
diff --git a/target/linux/bcm27xx/patches-6.1/950-1281-Add-IQaudio-CodecZero-to-hat_map.dts.patch b/target/linux/bcm27xx/patches-6.1/950-1281-Add-IQaudio-CodecZero-to-hat_map.dts.patch
new file mode 100644
index 0000000000..399c293e1f
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1281-Add-IQaudio-CodecZero-to-hat_map.dts.patch
@@ -0,0 +1,24 @@
+From afd5f659b0453e4c710ce5cf74c577563ff16239 Mon Sep 17 00:00:00 2001
+From: Andrew Scheller <andrew.scheller at raspberrypi.com>
+Date: Tue, 20 Feb 2024 17:53:03 +0000
+Subject: [PATCH 1281/1295] Add IQaudio CodecZero to hat_map.dts
+
+Fixes https://github.com/raspberrypi/Pi-Codec/issues/9
+---
+ arch/arm/boot/dts/overlays/hat_map.dts | 5 +++++
+ 1 file changed, 5 insertions(+)
+
+--- a/arch/arm/boot/dts/overlays/hat_map.dts
++++ b/arch/arm/boot/dts/overlays/hat_map.dts
+@@ -6,6 +6,11 @@
+ 		overlay = "iqaudio-codec";
+ 	};
+ 
++	iqaudio-pi-codeczero {
++		uuid = [ e15c739c 877d 4e29 ab36 4dc73c21127c ];
++		overlay = "iqaudio-codec";
++	};
++
+ 	pisound {
+ 		uuid = [ a7ee5d28 da03 41f5 bbd7 20438a4bec5d ];
+ 		overlay = "pisound";
diff --git a/target/linux/bcm27xx/patches-6.1/950-1282-ASOc-Add-HiFiBerry-DAC8X-to-the-simple-card-driver.patch b/target/linux/bcm27xx/patches-6.1/950-1282-ASOc-Add-HiFiBerry-DAC8X-to-the-simple-card-driver.patch
new file mode 100644
index 0000000000..dadd8123be
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1282-ASOc-Add-HiFiBerry-DAC8X-to-the-simple-card-driver.patch
@@ -0,0 +1,82 @@
+From d4acd8b7ea890c01453cdcf9b04a999ca04dfd2a Mon Sep 17 00:00:00 2001
+From: j-schambacher <joerg at hifiberry.com>
+Date: Wed, 28 Feb 2024 11:25:14 +0100
+Subject: [PATCH 1282/1295] ASOc: Add HiFiBerry DAC8X to the simple card driver
+
+Defines the settings for the 8 channel version of the standard
+DAC by overwriting the number of channels in the DAI defs.
+It can run in 8ch mode only on PI5 using the 4 lane data output
+of the designware I2S0 module.
+
+Signed-off-by: j-schambacher <joerg at hifiberry.com>
+---
+ sound/soc/bcm/Kconfig                |  5 +++--
+ sound/soc/bcm/rpi-simple-soundcard.c | 33 ++++++++++++++++++++++++++++
+ 2 files changed, 36 insertions(+), 2 deletions(-)
+
+--- a/sound/soc/bcm/Kconfig
++++ b/sound/soc/bcm/Kconfig
+@@ -40,11 +40,12 @@ config SND_BCM2708_SOC_GOOGLEVOICEHAT_SO
+           Say Y or M if you want to add support for voiceHAT soundcard.
+ 
+ config SND_BCM2708_SOC_HIFIBERRY_DAC
+-        tristate "Support for HifiBerry DAC"
++        tristate "Support for HifiBerry DAC and DAC8X"
+         select SND_SOC_PCM5102A
+         select SND_RPI_SIMPLE_SOUNDCARD
+         help
+-         Say Y or M if you want to add support for HifiBerry DAC.
++         Say Y or M if you want to add support for HifiBerry DAC and DAC8X.
++         Note: DAC8X only works on PI5
+ 
+ config SND_BCM2708_SOC_HIFIBERRY_DACPLUS
+         tristate "Support for HifiBerry DAC+"
+--- a/sound/soc/bcm/rpi-simple-soundcard.c
++++ b/sound/soc/bcm/rpi-simple-soundcard.c
+@@ -316,6 +316,37 @@ static struct snd_rpi_simple_drvdata drv
+ 	.dai       = snd_hifiberry_dac_dai,
+ };
+ 
++static int hifiberry_dac8x_init(struct snd_soc_pcm_runtime *rtd)
++{
++	struct snd_soc_dai *codec_dai = asoc_rtd_to_codec(rtd, 0);
++
++	/* override the defaults to reflect 4 x PCM5102A on the card
++	 * and limit the sample rate to 192ksps
++	 */
++	codec_dai->driver->playback.channels_max = 8;
++	codec_dai->driver->playback.rates = SNDRV_PCM_RATE_8000_192000;
++
++	return 0;
++}
++
++static struct snd_soc_dai_link snd_hifiberry_dac8x_dai[] = {
++	{
++		.name           = "HifiBerry DAC8x",
++		.stream_name    = "HifiBerry DAC8x HiFi",
++		.dai_fmt        = SND_SOC_DAIFMT_I2S |
++					SND_SOC_DAIFMT_NB_NF |
++					SND_SOC_DAIFMT_CBS_CFS,
++		.init           = hifiberry_dac8x_init,
++		SND_SOC_DAILINK_REG(hifiberry_dac),
++	},
++};
++
++static struct snd_rpi_simple_drvdata drvdata_hifiberry_dac8x = {
++	.card_name = "snd_rpi_hifiberry_dac8x",
++	.dai       = snd_hifiberry_dac8x_dai,
++	.fixed_bclk_ratio = 64,
++};
++
+ SND_SOC_DAILINK_DEFS(dionaudio_kiwi,
+ 	DAILINK_COMP_ARRAY(COMP_EMPTY()),
+ 	DAILINK_COMP_ARRAY(COMP_CODEC("pcm1794a-codec", "pcm1794a-hifi")),
+@@ -417,6 +448,8 @@ static const struct of_device_id snd_rpi
+ 		.data = (void *) &drvdata_hifiberry_amp3 },
+ 	{ .compatible = "hifiberry,hifiberry-dac",
+ 		.data = (void *) &drvdata_hifiberry_dac },
++	{ .compatible = "hifiberry,hifiberry-dac8x",
++		.data = (void *) &drvdata_hifiberry_dac8x },
+ 	{ .compatible = "dionaudio,dionaudio-kiwi",
+ 		.data = (void *) &drvdata_dionaudio_kiwi },
+ 	{ .compatible = "rpi,rpi-dac", &drvdata_rpi_dac},
diff --git a/target/linux/bcm27xx/patches-6.1/950-1283-Overlays-Add-definitions-for-HiFiBerry-8-channel-DAC.patch b/target/linux/bcm27xx/patches-6.1/950-1283-Overlays-Add-definitions-for-HiFiBerry-8-channel-DAC.patch
new file mode 100644
index 0000000000..b383b744e7
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1283-Overlays-Add-definitions-for-HiFiBerry-8-channel-DAC.patch
@@ -0,0 +1,113 @@
+From 813135a7ff3f0c2b91dc06a5b3f8deac15570466 Mon Sep 17 00:00:00 2001
+From: j-schambacher <joerg at hifiberry.com>
+Date: Wed, 28 Feb 2024 11:34:05 +0100
+Subject: [PATCH 1283/1295] Overlays: Add definitions for HiFiBerry 8 channel
+ DAC8X
+
+Dedicated overlay claiming all 4 data lanes of the designware
+I2S0 module to drive 4x PCM5102. THe devices share BCLK and
+LRCLK, therefore all outputs will always run at the same
+samplerate and format.
+
+Compatible only with PI5!
+
+Signed-off-by: j-schambacher <joerg at hifiberry.com>
+---
+ arch/arm/boot/dts/overlays/Makefile           |  1 +
+ arch/arm/boot/dts/overlays/README             |  6 +++
+ .../dts/overlays/hifiberry-dac8x-overlay.dts  | 50 +++++++++++++++++++
+ arch/arm/boot/dts/overlays/overlay_map.dts    |  4 ++
+ 4 files changed, 61 insertions(+)
+ create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
+
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -88,6 +88,7 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ 	hifiberry-amp3.dtbo \
+ 	hifiberry-amp4pro.dtbo \
+ 	hifiberry-dac.dtbo \
++	hifiberry-dac8x.dtbo \
+ 	hifiberry-dacplus.dtbo \
+ 	hifiberry-dacplusadc.dtbo \
+ 	hifiberry-dacplusadcpro.dtbo \
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -1772,6 +1772,12 @@ Load:   dtoverlay=hifiberry-dac
+ Params: <None>
+ 
+ 
++Name:   hifiberry-dac8x
++Info:   Configures the HifiBerry DAC8X audio cards (only on PI5)
++Load:   dtoverlay=hifiberry-dac8x
++Params: <None>
++
++
+ Name:   hifiberry-dacplus
+ Info:   Configures the HifiBerry DAC+ audio card
+ Load:   dtoverlay=hifiberry-dacplus,<param>=<val>
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/hifiberry-dac8x-overlay.dts
+@@ -0,0 +1,50 @@
++// Definitions for HiFiBerry DAC8x
++/dts-v1/;
++/plugin/;
++
++/ {
++	compatible = "brcm,bcm2712";
++
++	fragment at 0 {
++		target = <&gpio>;
++		__overlay__ {
++			rp1_i2s0_dac8x: rp1_i2s0_dac8x {
++				function = "i2s0";
++				pins = "gpio18", "gpio19", "gpio21",
++				       "gpio23", "gpio25", "gpio27";
++				bias-disable;
++				status = "okay";
++			};
++		};
++	};
++
++	fragment at 1 {
++		target = <&i2s_clk_producer>;
++		__overlay__ {
++			pinctrl-names = "default";
++			pinctrl-0 = <&rp1_i2s0_dac8x>;
++			status = "okay";
++		};
++	};
++
++	fragment at 2 {
++		target-path = "/";
++		__overlay__ {
++			pcm5102a-codec {
++				#sound-dai-cells = <0>;
++				compatible = "ti,pcm5102a";
++				status = "okay";
++			};
++		};
++	};
++
++	fragment at 3 {
++		target = <&sound>;
++		__overlay__ {
++			compatible = "hifiberry,hifiberry-dac8x";
++			i2s-controller = <&i2s_clk_producer>;
++			status = "okay";
++		};
++	};
++
++};
+--- a/arch/arm/boot/dts/overlays/overlay_map.dts
++++ b/arch/arm/boot/dts/overlays/overlay_map.dts
+@@ -48,6 +48,10 @@
+ 		bcm2712;
+ 	};
+ 
++	hifiberry-dac8x {
++		bcm2712;
++	};
++
+ 	highperi {
+ 		bcm2711;
+ 	};
diff --git a/target/linux/bcm27xx/patches-6.1/950-1285-vc4-hvs-Fix-lbm-size-calculation-for-yuv-6012.patch b/target/linux/bcm27xx/patches-6.1/950-1285-vc4-hvs-Fix-lbm-size-calculation-for-yuv-6012.patch
new file mode 100644
index 0000000000..cb4681909e
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1285-vc4-hvs-Fix-lbm-size-calculation-for-yuv-6012.patch
@@ -0,0 +1,31 @@
+From c0169f2c197d005aff8acfbc618de6e7f6b1ab94 Mon Sep 17 00:00:00 2001
+From: Florian Wesch <fw at dividuum.de>
+Date: Tue, 5 Mar 2024 15:17:56 +0100
+Subject: [PATCH 1285/1295] vc4/hvs: Fix lbm size calculation for yuv (#6012)
+
+The code was reducing the number of components by one when we were not
+blending with alpha. But that only makes sense if the components include
+alpha.
+
+For YUV, we were reducing the number of components for Y from one to zero
+which resulted in no lbm space being allocated.
+
+Fixes: https://github.com/raspberrypi/linux/issues/5912
+
+Signed-off-by: Dom Cobley <popcornmix at gmail.com>
+Co-authored-by: Dom Cobley <popcornmix at gmail.com>
+---
+ drivers/gpu/drm/vc4/vc4_plane.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/gpu/drm/vc4/vc4_plane.c
++++ b/drivers/gpu/drm/vc4/vc4_plane.c
+@@ -733,7 +733,7 @@ static unsigned int vc4_lbm_channel_size
+ 	if (!components)
+ 		return 0;
+ 
+-	if (state->alpha != DRM_BLEND_ALPHA_OPAQUE)
++	if (state->alpha != DRM_BLEND_ALPHA_OPAQUE && info->has_alpha)
+ 		components -= 1;
+ 
+ 	words = width * wpc * components;
diff --git a/target/linux/bcm27xx/patches-6.1/950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch b/target/linux/bcm27xx/patches-6.1/950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch
new file mode 100644
index 0000000000..4bda41a791
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1286-Driver-add-waveshare-4inch-dsi-lcd-C-driver.patch
@@ -0,0 +1,41 @@
+From 50da59d237df59b38c5e3c375b3df8fabbda1069 Mon Sep 17 00:00:00 2001
+From: Eng33 <eng33 at waveshare.net>
+Date: Fri, 8 Mar 2024 18:36:37 +0800
+Subject: [PATCH 1286/1295] Driver:add waveshare 4inch dsi lcd (C) driver
+
+Signed-off-by: Eng33 <eng33 at waveshare.net>
+---
+ drivers/gpu/drm/panel/panel-waveshare-dsi.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+--- a/drivers/gpu/drm/panel/panel-waveshare-dsi.c
++++ b/drivers/gpu/drm/panel/panel-waveshare-dsi.c
+@@ -138,6 +138,18 @@ static const struct drm_display_mode ws_
+ 	.vtotal = 1480 + 60 + 60 + 60,
+ };
+ 
++static const struct drm_display_mode ws_panel_4_mode = {
++	.clock = 50000,
++	.hdisplay = 720,
++	.hsync_start = 720 + 32,
++	.hsync_end = 720 + 32 + 200,
++	.htotal = 720 + 32 + 200 + 120,
++	.vdisplay = 720,
++	.vsync_start = 720 + 8,
++	.vsync_end = 720 + 8 + 4,
++	.vtotal = 720 + 8 + 4 + 16,
++};
++
+ static struct ws_panel *panel_to_ts(struct drm_panel *panel)
+ {
+ 	return container_of(panel, struct ws_panel, base);
+@@ -399,6 +411,9 @@ static const struct of_device_id ws_pane
+ 		.compatible = "waveshare,11.9inch-panel",
+ 		.data = &ws_panel_11_9_mode,
+ 	}, {
++		.compatible = "waveshare,4inch-panel",
++		.data = &ws_panel_4_mode,
++	}, {
+ 		/* sentinel */
+ 	}
+ };
diff --git a/target/linux/bcm27xx/patches-6.1/950-1287-Dtoverlay-add-waveshare-4inch-dsi-lcd-C-dtoverlay.patch b/target/linux/bcm27xx/patches-6.1/950-1287-Dtoverlay-add-waveshare-4inch-dsi-lcd-C-dtoverlay.patch
new file mode 100644
index 0000000000..605ad842cf
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1287-Dtoverlay-add-waveshare-4inch-dsi-lcd-C-dtoverlay.patch
@@ -0,0 +1,22 @@
+From bb2f912c94d11a0f0b5f13c91793fa9f79eb92aa Mon Sep 17 00:00:00 2001
+From: Eng33 <eng33 at waveshare.net>
+Date: Fri, 8 Mar 2024 18:37:03 +0800
+Subject: [PATCH 1287/1295] Dtoverlay:add waveshare 4inch dsi lcd (C) dtoverlay
+
+Signed-off-by: Eng33 <eng33 at waveshare.net>
+---
+ .../boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts  | 3 +++
+ 1 file changed, 3 insertions(+)
+
+--- a/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts
++++ b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts
+@@ -112,6 +112,9 @@
+ 				   <&touch>, "touchscreen-size-y:0=1480",
+ 				   <&touch>, "touchscreen-inverted-x?",
+ 				   <&touch>, "touchscreen-swapped-x-y?";
++		4_0_inchC = <&panel>, "compatible=waveshare,4inch-panel",
++				   <&touch>, "touchscreen-size-x:0=720",
++				   <&touch>, "touchscreen-size-y:0=720";
+ 		i2c1 = <&i2c_frag>, "target:0=",<&i2c1>,
+ 		       <0>, "-3-4+5";
+ 		disable_touch = <&touch>, "status=disabled";
diff --git a/target/linux/bcm27xx/patches-6.1/950-1288-Dtoverlay-fix-waveshare-11.9inch-touch-orientation-e.patch b/target/linux/bcm27xx/patches-6.1/950-1288-Dtoverlay-fix-waveshare-11.9inch-touch-orientation-e.patch
new file mode 100644
index 0000000000..868c162cc4
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1288-Dtoverlay-fix-waveshare-11.9inch-touch-orientation-e.patch
@@ -0,0 +1,22 @@
+From 29cc64d7d94f9a6ee0e97e8009b832514d2525e0 Mon Sep 17 00:00:00 2001
+From: Eng33 <eng33 at waveshare.net>
+Date: Fri, 8 Mar 2024 18:38:33 +0800
+Subject: [PATCH 1288/1295] Dtoverlay:fix waveshare 11.9inch touch orientation
+ error
+
+Signed-off-by: Eng33 <eng33 at waveshare.net>
+---
+ .../boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts   | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts
++++ b/arch/arm/boot/dts/overlays/vc4-kms-dsi-waveshare-panel-overlay.dts
+@@ -108,8 +108,6 @@
+ 				   <&touch>, "touchscreen-inverted-x?",
+ 				   <&touch>, "touchscreen-swapped-x-y?";
+ 		11_9_inch = <&panel>, "compatible=waveshare,11.9inch-panel",
+-				   <&touch>, "touchscreen-size-x:0=320",
+-				   <&touch>, "touchscreen-size-y:0=1480",
+ 				   <&touch>, "touchscreen-inverted-x?",
+ 				   <&touch>, "touchscreen-swapped-x-y?";
+ 		4_0_inchC = <&panel>, "compatible=waveshare,4inch-panel",
diff --git a/target/linux/bcm27xx/patches-6.1/950-1289-Dtoverlay-Add-waveshare-4inch-dsi-lcd-C-parameters-t.patch b/target/linux/bcm27xx/patches-6.1/950-1289-Dtoverlay-Add-waveshare-4inch-dsi-lcd-C-parameters-t.patch
new file mode 100644
index 0000000000..ea72100e52
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1289-Dtoverlay-Add-waveshare-4inch-dsi-lcd-C-parameters-t.patch
@@ -0,0 +1,21 @@
+From 8db8a2b856a24dd30b201c9af3238cedaf5f0c58 Mon Sep 17 00:00:00 2001
+From: Eng33 <eng33 at waveshare.net>
+Date: Mon, 11 Mar 2024 10:00:23 +0800
+Subject: [PATCH 1289/1295] Dtoverlay:Add waveshare 4inch dsi lcd (C)
+ parameters to the README
+
+Signed-off-by: Eng33 <eng33 at waveshare.net>
+---
+ arch/arm/boot/dts/overlays/README | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -5011,6 +5011,7 @@ Load:   dtoverlay=vc4-kms-dsi-waveshare-
+ Params: 2_8_inch                2.8" 480x640
+         3_4_inch                3.4" 800x800 round
+         4_0_inch                4.0" 480x800
++        4_0_inchC               4.0" 720x720
+         7_0_inchC               7.0" C 1024x600
+         7_9_inch                7.9" 400x1280
+         8_0_inch                8.0" 1280x800
diff --git a/target/linux/bcm27xx/patches-6.1/950-1290-Overlays-Add-specific-clk-producer-consumer-overlays.patch b/target/linux/bcm27xx/patches-6.1/950-1290-Overlays-Add-specific-clk-producer-consumer-overlays.patch
new file mode 100644
index 0000000000..477276a59a
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1290-Overlays-Add-specific-clk-producer-consumer-overlays.patch
@@ -0,0 +1,223 @@
+From 9e31e8ce44ef11cabcb1b95830e1fdd8a9655ad3 Mon Sep 17 00:00:00 2001
+From: j-schambacher <joerg at hifiberry.com>
+Date: Mon, 11 Mar 2024 15:32:28 +0100
+Subject: [PATCH 1290/1295] Overlays:Add specific clk-producer/-consumer
+ overlays for Hifiberry DAC+
+
+As the easy switching of the I2S module bewteen clock producer/consumer
+on the PI5 is not possible, two specific DT-overlays are introduced.
+The DAC+PRO boards with onboard clocks use the -PRO overlay, the boards
+without oscillators the -STD version.
+The "hifiberry-dacplus,slave" parameter in the -STD overlay disables
+the automatic clock detection inside the hifiberry-dacplus driver.
+
+The former hifiberry-dacplus overlay is kept for compatibility but
+will be deprecated.
+
+Signed-off-by: j-schambacher <joerg at hifiberry.com>
+---
+ arch/arm/boot/dts/overlays/Makefile           |  2 +
+ arch/arm/boot/dts/overlays/README             | 42 ++++++++++++
+ .../hifiberry-dacplus-pro-overlay.dts         | 64 ++++++++++++++++++
+ .../hifiberry-dacplus-std-overlay.dts         | 65 +++++++++++++++++++
+ 4 files changed, 173 insertions(+)
+ create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dacplus-pro-overlay.dts
+ create mode 100644 arch/arm/boot/dts/overlays/hifiberry-dacplus-std-overlay.dts
+
+--- a/arch/arm/boot/dts/overlays/Makefile
++++ b/arch/arm/boot/dts/overlays/Makefile
+@@ -90,6 +90,8 @@ dtbo-$(CONFIG_ARCH_BCM2835) += \
+ 	hifiberry-dac.dtbo \
+ 	hifiberry-dac8x.dtbo \
+ 	hifiberry-dacplus.dtbo \
++	hifiberry-dacplus-pro.dtbo \
++	hifiberry-dacplus-std.dtbo \
+ 	hifiberry-dacplusadc.dtbo \
+ 	hifiberry-dacplusadcpro.dtbo \
+ 	hifiberry-dacplusdsp.dtbo \
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -1801,6 +1801,48 @@ Params: 24db_digital_gain       Allow ga
+                                 are switched off at all times.
+ 
+ 
++Name:   hifiberry-dacplus-pro
++Info:   Configures the HifiBerry DAC+ PRO audio card (onboard clocks)
++Load:   dtoverlay=hifiberry-dacplus-pro,<param>=<val>
++Params: 24db_digital_gain       Allow gain to be applied via the PCM512x codec
++                                Digital volume control. Enable with
++                                "dtoverlay=hifiberry-dacplus,24db_digital_gain"
++                                (The default behaviour is that the Digital
++                                volume control is limited to a maximum of
++                                0dB. ie. it can attenuate but not provide
++                                gain. For most users, this will be desired
++                                as it will prevent clipping. By appending
++                                the 24dB_digital_gain parameter, the Digital
++                                volume control will allow up to 24dB of
++                                gain. If this parameter is enabled, it is the
++                                responsibility of the user to ensure that
++                                the Digital volume control is set to a value
++                                that does not result in clipping/distortion!)
++        leds_off                If set to 'true' the onboard indicator LEDs
++                                are switched off at all times.
++
++
++Name:   hifiberry-dacplus-std
++Info:   Configures the HifiBerry DAC+ standard audio card (no onboard clocks)
++Load:   dtoverlay=hifiberry-dacplus-std,<param>=<val>
++Params: 24db_digital_gain       Allow gain to be applied via the PCM512x codec
++                                Digital volume control. Enable with
++                                "dtoverlay=hifiberry-dacplus,24db_digital_gain"
++                                (The default behaviour is that the Digital
++                                volume control is limited to a maximum of
++                                0dB. ie. it can attenuate but not provide
++                                gain. For most users, this will be desired
++                                as it will prevent clipping. By appending
++                                the 24dB_digital_gain parameter, the Digital
++                                volume control will allow up to 24dB of
++                                gain. If this parameter is enabled, it is the
++                                responsibility of the user to ensure that
++                                the Digital volume control is set to a value
++                                that does not result in clipping/distortion!)
++        leds_off                If set to 'true' the onboard indicator LEDs
++                                are switched off at all times.
++
++
+ Name:   hifiberry-dacplusadc
+ Info:   Configures the HifiBerry DAC+ADC audio card
+ Load:   dtoverlay=hifiberry-dacplusadc,<param>=<val>
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-pro-overlay.dts
+@@ -0,0 +1,64 @@
++// Definitions for HiFiBerry DAC+ PRO, with onboard clocks
++/dts-v1/;
++/plugin/;
++
++/ {
++	compatible = "brcm,bcm2835";
++
++	fragment at 0 {
++		target-path = "/";
++		__overlay__ {
++			dacpro_osc: dacpro_osc {
++				compatible = "hifiberry,dacpro-clk";
++				#clock-cells = <0>;
++			};
++		};
++	};
++
++	frag1: fragment at 1 {
++		target = <&i2s_clk_consumer>;
++		__overlay__ {
++			status = "okay";
++		};
++	};
++
++	fragment at 2 {
++		target = <&i2c1>;
++		__overlay__ {
++			#address-cells = <1>;
++			#size-cells = <0>;
++			status = "okay";
++
++			pcm5122 at 4d {
++				#sound-dai-cells = <0>;
++				compatible = "ti,pcm5122";
++				reg = <0x4d>;
++				clocks = <&dacpro_osc>;
++				AVDD-supply = <&vdd_3v3_reg>;
++				DVDD-supply = <&vdd_3v3_reg>;
++				CPVDD-supply = <&vdd_3v3_reg>;
++				status = "okay";
++			};
++			hpamp: hpamp at 60 {
++				compatible = "ti,tpa6130a2";
++				reg = <0x60>;
++				status = "disabled";
++			};
++		};
++	};
++
++	fragment at 3 {
++		target = <&sound>;
++		hifiberry_dacplus: __overlay__ {
++			compatible = "hifiberry,hifiberry-dacplus";
++			i2s-controller = <&i2s_clk_consumer>;
++			status = "okay";
++		};
++	};
++
++	__overrides__ {
++		24db_digital_gain =
++			<&hifiberry_dacplus>,"hifiberry,24db_digital_gain?";
++		leds_off = <&hifiberry_dacplus>,"hifiberry-dacplus,leds_off?";
++	};
++};
+--- /dev/null
++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplus-std-overlay.dts
+@@ -0,0 +1,65 @@
++// Definitions for HiFiBerry DAC+ Standard w/o onboard clocks
++/dts-v1/;
++/plugin/;
++
++/ {
++	compatible = "brcm,bcm2835";
++
++	fragment at 0 {
++		target-path = "/";
++		__overlay__ {
++			dacpro_osc: dacpro_osc {
++				compatible = "hifiberry,dacpro-clk";
++				#clock-cells = <0>;
++			};
++		};
++	};
++
++	fragment at 1 {
++		target = <&i2s_clk_producer>;
++		__overlay__ {
++			status = "okay";
++		};
++	};
++
++	fragment at 2 {
++		target = <&i2c1>;
++		__overlay__ {
++			#address-cells = <1>;
++			#size-cells = <0>;
++			status = "okay";
++
++			pcm5122 at 4d {
++				#sound-dai-cells = <0>;
++				compatible = "ti,pcm5122";
++				reg = <0x4d>;
++				clocks = <&dacpro_osc>;
++				AVDD-supply = <&vdd_3v3_reg>;
++				DVDD-supply = <&vdd_3v3_reg>;
++				CPVDD-supply = <&vdd_3v3_reg>;
++				status = "okay";
++			};
++			hpamp: hpamp at 60 {
++				compatible = "ti,tpa6130a2";
++				reg = <0x60>;
++				status = "disabled";
++			};
++		};
++	};
++
++	fragment at 3 {
++		target = <&sound>;
++		hifiberry_dacplus: __overlay__ {
++			compatible = "hifiberry,hifiberry-dacplus";
++			i2s-controller = <&i2s_clk_producer>;
++			hifiberry-dacplus,slave;
++			status = "okay";
++		};
++	};
++
++	__overrides__ {
++		24db_digital_gain =
++			<&hifiberry_dacplus>,"hifiberry,24db_digital_gain?";
++		leds_off = <&hifiberry_dacplus>,"hifiberry-dacplus,leds_off?";
++	};
++};
diff --git a/target/linux/bcm27xx/patches-6.1/950-1291-overlays-hat_map-Add-Hifiberry-cards.patch b/target/linux/bcm27xx/patches-6.1/950-1291-overlays-hat_map-Add-Hifiberry-cards.patch
new file mode 100644
index 0000000000..2e25c3c302
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1291-overlays-hat_map-Add-Hifiberry-cards.patch
@@ -0,0 +1,96 @@
+From fae2848e87c2696d1eeaeb3f449ad871874b699f Mon Sep 17 00:00:00 2001
+From: j-schambacher <joerg at hifiberry.com>
+Date: Tue, 12 Mar 2024 10:59:48 +0100
+Subject: [PATCH 1291/1295] overlays:hat_map: Add Hifiberry cards
+
+Adds all available Hifberry cards' UUIDs to the hat_map file.
+
+Signed-off-by: j-schambacher <joerg at hifiberry.com>
+---
+ arch/arm/boot/dts/overlays/hat_map.dts | 75 ++++++++++++++++++++++++++
+ 1 file changed, 75 insertions(+)
+
+--- a/arch/arm/boot/dts/overlays/hat_map.dts
++++ b/arch/arm/boot/dts/overlays/hat_map.dts
+@@ -1,6 +1,81 @@
+ /dts-v1/;
+ 
+ / {
++	hifiberry-amp100-1 {
++		uuid = [ 5eb863b8 12f9 41ad 978f 4cee1b3eca62 ];
++		overlay = "hifiberry-amp100";
++	};
++
++	hifiberry-amp100-2 {
++		uuid = [ b1a57dbe 8b52 447f 939e 1baf72157d79 ];
++		overlay = "hifiberry-amp100";
++	};
++
++	hifiberry-amp4pro {
++		uuid = [ 3619722a c92d 4092 95bd 493a2903e933 ];
++		overlay = "hifiberry-amp4pro";
++	};
++
++	hifiberry-amp4 {
++		uuid = [ fcb6ec42 a182 419d a314 7eeae416f608 ];
++		overlay = "hifiberry-dacplus-std";
++	};
++
++	hifiberry-dac2proadc {
++		uuid = [ 30660215 dbb2 4c57 953f 099370b63e2e ];
++		overlay = "hifiberry-dacplusadcpro";
++	};
++
++	hifiberry-dac2hd {
++		uuid = [ 482ad277 5586 480c 88e7 85ae89c4e501 ];
++		overlay = "hifiberry-dacplushd";
++	};
++
++	hifiberry-dac2pro {
++		uuid = [ ebf9cfc4 6d77 4880 89fd 353690467dfc ];
++		overlay = "hifiberry-dacplus-pro";
++	};
++
++	hifiberry-dac8x {
++		uuid = [ f65985f9 5354 4457 ae3b 3da39ba2cf6d ];
++		overlay = "hifiberry-dac8x";
++	};
++
++	hifiberry-dacplus-amp2-1 {
++		uuid = [ 81cac43d 27c6 4a1e a0b2 c70b4e608ab6 ];
++		overlay = "hifiberry-dacplus-std";
++	};
++
++	hifiberry-dacplus-amp2-2 {
++		uuid = [ ef586afc 2efa 47a0 be2e 95a7d952fe98 ];
++		overlay = "hifiberry-dacplus-std";
++	};
++
++	hifiberry-digiplus-pro {
++		uuid = [ 2154f80b 0f92 45e4 96db c1643ec2b46b ];
++		overlay = "hifiberry-digi-pro";
++	};
++
++	hifiberry-dacplusadcpro {
++		uuid = [ 36e3d3da 1ed9 468b aea3 cd165f6820f0 ];
++		overlay = "hifiberry-dacplusadcpro";
++	};
++
++	hifiberry-digi2pro {
++		uuid = [ 5af941bb 4dcf 4eac 82a8 e36e84fcabef ];
++		overlay = "hifiberry-digi-pro";
++	};
++
++	hifiberry-digi2standard {
++		uuid = [ 7c980a0e 9d15 40af 9f40 bddfbd3aee8c ];
++		overlay = "hifiberry-digi";
++	};
++
++	hifiberry-dsp2x4 {
++		uuid = [ 8f287583 429d 4206 a751 862264bbda63 ];
++		overlay = "hifiberry-dacplus-dsp";
++	};
++
+ 	iqaudio-pi-codecplus {
+ 		uuid = [ dc1c9594 c1ab 4c6c acda a88dc59a3c5b ];
+ 		overlay = "iqaudio-codec";
diff --git a/target/linux/bcm27xx/patches-6.1/950-1292-ASoC-Fix-16bit-sample-support-for-Hifiberry-DACplusA.patch b/target/linux/bcm27xx/patches-6.1/950-1292-ASoC-Fix-16bit-sample-support-for-Hifiberry-DACplusA.patch
new file mode 100644
index 0000000000..95c954ab5c
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1292-ASoC-Fix-16bit-sample-support-for-Hifiberry-DACplusA.patch
@@ -0,0 +1,31 @@
+From f87bf7dfa65cce1d46800c0769351fef59abba55 Mon Sep 17 00:00:00 2001
+From: j-schambacher <joerg at hifiberry.com>
+Date: Wed, 13 Mar 2024 10:31:18 +0100
+Subject: [PATCH 1292/1295] ASoC: Fix 16bit sample support for Hifiberry
+ DACplusADC
+
+Same issue as #5919.
+'width' needs to be set independent of clocking mode.
+
+Signed-off-by: j-schambacher <joerg at hifiberry.com>
+---
+ sound/soc/bcm/hifiberry_dacplusadc.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/sound/soc/bcm/hifiberry_dacplusadc.c
++++ b/sound/soc/bcm/hifiberry_dacplusadc.c
+@@ -229,13 +229,11 @@ static int snd_rpi_hifiberry_dacplusadc_
+ 	int ret = 0;
+ 	struct snd_soc_pcm_runtime *rtd = substream->private_data;
+ 	int channels = params_channels(params);
+-	int width = 32;
++	int width = snd_pcm_format_width(params_format(params));
+ 
+ 	if (snd_rpi_hifiberry_is_dacpro) {
+ 		struct snd_soc_component *component = asoc_rtd_to_codec(rtd, 0)->component;
+ 
+-		width = snd_pcm_format_physical_width(params_format(params));
+-
+ 		snd_rpi_hifiberry_dacplusadc_set_sclk(component,
+ 			params_rate(params));
+ 
diff --git a/target/linux/bcm27xx/patches-6.1/950-1293-overlays-Sets-i2s_clk_producer-as-default-for-Hifibe.patch b/target/linux/bcm27xx/patches-6.1/950-1293-overlays-Sets-i2s_clk_producer-as-default-for-Hifibe.patch
new file mode 100644
index 0000000000..f1b39eb540
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1293-overlays-Sets-i2s_clk_producer-as-default-for-Hifibe.patch
@@ -0,0 +1,79 @@
+From 5d1972f99f893ac9394d2a795a3b21385b9e34a5 Mon Sep 17 00:00:00 2001
+From: j-schambacher <joerg at hifiberry.com>
+Date: Wed, 13 Mar 2024 10:11:27 +0100
+Subject: [PATCH 1293/1295] overlays: Sets i2s_clk_producer as default for
+ Hifiberry DACplusADC
+
+As we have never released a (standard) DACplusADC board with onboard
+clocks, we can simply use a fixed setup avoiding incompatibilities
+with Pi5 during driver init. Setting 'hifiberry-dacplusadc,slave' in
+the overlays disables the failing clock probing mechanism.
+
+Removes 'slave' parameter description from README which is still
+supported but not needed.
+
+Signed-off-by: j-schambacher <joerg at hifiberry.com>
+---
+ arch/arm/boot/dts/overlays/README                    |  4 +---
+ .../dts/overlays/hifiberry-dacplusadc-overlay.dts    | 12 +++++-------
+ 2 files changed, 6 insertions(+), 10 deletions(-)
+
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -1773,7 +1773,7 @@ Params: <None>
+ 
+ 
+ Name:   hifiberry-dac8x
+-Info:   Configures the HifiBerry DAC8X audio cards (only on PI5)
++Info:   Configures the HifiBerry DAC8X audio cards (only on Pi5)
+ Load:   dtoverlay=hifiberry-dac8x
+ Params: <None>
+ 
+@@ -1860,8 +1860,6 @@ Params: 24db_digital_gain       Allow ga
+                                 responsibility of the user to ensure that
+                                 the Digital volume control is set to a value
+                                 that does not result in clipping/distortion!)
+-        slave                   Force DAC+ADC into slave mode, using Pi as
+-                                master for bit clock and frame clock.
+         leds_off                If set to 'true' the onboard indicator LEDs
+                                 are switched off at all times.
+ 
+--- a/arch/arm/boot/dts/overlays/hifiberry-dacplusadc-overlay.dts
++++ b/arch/arm/boot/dts/overlays/hifiberry-dacplusadc-overlay.dts
+@@ -1,4 +1,4 @@
+-// Definitions for HiFiBerry DAC+ADC
++// Definitions for HiFiBerry DAC+ADC, no onboard clocks
+ /dts-v1/;
+ /plugin/;
+ 
+@@ -15,8 +15,8 @@
+ 		};
+ 	};
+ 
+-	frag1: fragment at 1 {
+-		target = <&i2s_clk_consumer>;
++	fragment at 1 {
++		target = <&i2s_clk_producer>;
+ 		__overlay__ {
+ 			status = "okay";
+ 		};
+@@ -58,7 +58,8 @@
+ 		target = <&sound>;
+ 		hifiberry_dacplusadc: __overlay__ {
+ 			compatible = "hifiberry,hifiberry-dacplusadc";
+-			i2s-controller = <&i2s_clk_consumer>;
++			i2s-controller = <&i2s_clk_producer>;
++			hifiberry-dacplusadc,slave;
+ 			status = "okay";
+ 		};
+ 	};
+@@ -66,9 +67,6 @@
+ 	__overrides__ {
+ 		24db_digital_gain =
+ 			<&hifiberry_dacplusadc>,"hifiberry,24db_digital_gain?";
+-		slave = <&hifiberry_dacplusadc>,"hifiberry-dacplusadc,slave?",
+-			<&frag1>,"target:0=",<&i2s_clk_producer>,
+-			<&hifiberry_dacplusadc>,"i2s-controller:0=",<&i2s_clk_producer>;
+ 		leds_off = <&hifiberry_dacplusadc>,"hifiberry-dacplusadc,leds_off?";
+ 	};
+ };
diff --git a/target/linux/bcm27xx/patches-6.1/950-1294-imx477-make-trigger-mode-more-configurable.patch b/target/linux/bcm27xx/patches-6.1/950-1294-imx477-make-trigger-mode-more-configurable.patch
new file mode 100644
index 0000000000..584782d25a
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1294-imx477-make-trigger-mode-more-configurable.patch
@@ -0,0 +1,77 @@
+From f4102d30e760482e9f2fc94dcf8ce223afef3230 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Erik=20Bot=C3=B6?= <erik.boto at gmail.com>
+Date: Fri, 9 Feb 2024 18:37:46 +0100
+Subject: [PATCH 1294/1295] imx477: make trigger-mode more configurable
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Allow trigger-mode to be overridden using device tree so that it can be
+set per camera. Previously the mode could only be changed using a module
+parameter, which would then affect all cameras.
+
+Signed-off-by: Erik Bot? <erik.boto at gmail.com>
+---
+ drivers/media/i2c/imx477.c | 19 ++++++++++++++-----
+ 1 file changed, 14 insertions(+), 5 deletions(-)
+
+--- a/drivers/media/i2c/imx477.c
++++ b/drivers/media/i2c/imx477.c
+@@ -1124,6 +1124,9 @@ struct imx477 {
+ 	/* Current mode */
+ 	const struct imx477_mode *mode;
+ 
++	/* Trigger mode */
++	int trigger_mode_of;
++
+ 	/*
+ 	 * Mutex for serialized access:
+ 	 * Protect sensor module set pad format and start/stop streaming safely.
+@@ -1711,7 +1714,7 @@ static int imx477_start_streaming(struct
+ 	struct i2c_client *client = v4l2_get_subdevdata(&imx477->sd);
+ 	const struct imx477_reg_list *reg_list;
+ 	const struct imx477_reg_list *extra_regs;
+-	int ret;
++	int ret, tm;
+ 
+ 	if (!imx477->common_regs_written) {
+ 		ret = imx477_write_regs(imx477, mode_common_regs,
+@@ -1748,14 +1751,15 @@ static int imx477_start_streaming(struct
+ 		return ret;
+ 
+ 	/* Set vsync trigger mode: 0=standalone, 1=source, 2=sink */
++	tm = (imx477->trigger_mode_of >= 0) ? imx477->trigger_mode_of : trigger_mode;
+ 	imx477_write_reg(imx477, IMX477_REG_MC_MODE,
+-			 IMX477_REG_VALUE_08BIT, (trigger_mode > 0) ? 1 : 0);
++			 IMX477_REG_VALUE_08BIT, (tm > 0) ? 1 : 0);
+ 	imx477_write_reg(imx477, IMX477_REG_MS_SEL,
+-			 IMX477_REG_VALUE_08BIT, (trigger_mode <= 1) ? 1 : 0);
++			 IMX477_REG_VALUE_08BIT, (tm <= 1) ? 1 : 0);
+ 	imx477_write_reg(imx477, IMX477_REG_XVS_IO_CTRL,
+-			 IMX477_REG_VALUE_08BIT, (trigger_mode == 1) ? 1 : 0);
++			 IMX477_REG_VALUE_08BIT, (tm == 1) ? 1 : 0);
+ 	imx477_write_reg(imx477, IMX477_REG_EXTOUT_EN,
+-			 IMX477_REG_VALUE_08BIT, (trigger_mode == 1) ? 1 : 0);
++			 IMX477_REG_VALUE_08BIT, (tm == 1) ? 1 : 0);
+ 
+ 	/* set stream on register */
+ 	return imx477_write_reg(imx477, IMX477_REG_MODE_SELECT,
+@@ -2187,6 +2191,7 @@ static int imx477_probe(struct i2c_clien
+ 	struct imx477 *imx477;
+ 	const struct of_device_id *match;
+ 	int ret;
++	u32 tm_of;
+ 
+ 	imx477 = devm_kzalloc(&client->dev, sizeof(*imx477), GFP_KERNEL);
+ 	if (!imx477)
+@@ -2204,6 +2209,10 @@ static int imx477_probe(struct i2c_clien
+ 	if (imx477_check_hwcfg(dev))
+ 		return -EINVAL;
+ 
++	/* Default the trigger mode from OF to -1, which means invalid */
++	ret = of_property_read_u32(dev->of_node, "trigger-mode", &tm_of);
++	imx477->trigger_mode_of = (ret == 0) ? tm_of : -1;
++
+ 	/* Get system clock (xclk) */
+ 	imx477->xclk = devm_clk_get(dev, NULL);
+ 	if (IS_ERR(imx477->xclk)) {
diff --git a/target/linux/bcm27xx/patches-6.1/950-1295-imx477-Update-device-tree-overlays-to-support-trigge.patch b/target/linux/bcm27xx/patches-6.1/950-1295-imx477-Update-device-tree-overlays-to-support-trigge.patch
new file mode 100644
index 0000000000..d9df79412b
--- /dev/null
+++ b/target/linux/bcm27xx/patches-6.1/950-1295-imx477-Update-device-tree-overlays-to-support-trigge.patch
@@ -0,0 +1,129 @@
+From d02bd251d7f85e3aec02e5752df2f44a35961360 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Erik=20Bot=C3=B6?= <erik.boto at gmail.com>
+Date: Fri, 9 Feb 2024 18:41:24 +0100
+Subject: [PATCH 1295/1295] imx477: Update device tree overlays to support
+ trigger-mode
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Also create generic overrides in camera-mux-N-port, that can be extended
+to configure vsync modes for cameras supporting this.
+
+Example usages (to be combined with camera_auto_detect=0):
+dtoverlay=imx477,cam0,sync-source
+dtoverlay=imx477,sync-sink
+dtoverlay=camera-mux-2port,cam1-imx477,cam1-sync-sink
+dtoverlay=camera-mux-4port,cam3-imx477,cam3-sync-sink
+
+Signed-off-by: Erik Bot? <erik.boto at gmail.com>
+---
+ arch/arm/boot/dts/overlays/README                | 16 ++++++++++++++++
+ .../dts/overlays/camera-mux-2port-overlay.dts    |  5 +++++
+ .../dts/overlays/camera-mux-4port-overlay.dts    |  9 +++++++++
+ arch/arm/boot/dts/overlays/imx378-overlay.dts    |  7 +++++++
+ arch/arm/boot/dts/overlays/imx477-overlay.dts    |  7 +++++++
+ 5 files changed, 44 insertions(+)
+
+--- a/arch/arm/boot/dts/overlays/README
++++ b/arch/arm/boot/dts/overlays/README
+@@ -862,6 +862,10 @@ Params: cam0-arducam-64mp       Select A
+         cam1-ov7251             Select OV7251 for camera on port 1
+         cam1-ov9281             Select OV9281 for camera on port 1
+         cam1-imx290-clk-freq    Set clock frequency for an IMX290 on port 1
++        cam0-sync-source        Set camera on port 0 as vsync source
++        cam0-sync-sink          Set camera on port 0 as vsync sink
++        cam1-sync-source        Set camera on port 1 as vsync source
++        cam1-sync-sink          Set camera on port 1 as vsync sink
+ 
+         cam0                    Connect the mux to CAM0 port (default is CAM1)
+ 
+@@ -923,6 +927,14 @@ Params: cam0-arducam-64mp       Select A
+         cam3-ov7251             Select OV7251 for camera on port 3
+         cam3-ov9281             Select OV9281 for camera on port 3
+         cam3-imx290-clk-freq    Set clock frequency for an IMX290 on port 3
++        cam0-sync-source        Set camera on port 0 as vsync source
++        cam0-sync-sink          Set camera on port 0 as vsync sink
++        cam1-sync-source        Set camera on port 1 as vsync source
++        cam1-sync-sink          Set camera on port 1 as vsync sink
++        cam2-sync-source        Set camera on port 2 as vsync source
++        cam2-sync-sink          Set camera on port 2 as vsync sink
++        cam3-sync-source        Set camera on port 3 as vsync source
++        cam3-sync-sink          Set camera on port 3 as vsync sink
+ 
+         cam0                    Connect the mux to CAM0 port (default is CAM1)
+ 
+@@ -2676,6 +2688,8 @@ Params: rotation                Mounting
+                                 Compute Module (CSI0, i2c_vc, and cam0_reg).
+         always-on               Leave the regulator powered up, to stop the
+                                 camera clamping I/Os such as XVS to 0V.
++        sync-source             Configure as vsync source
++        sync-sink               Configure as vsync sink
+ 
+ 
+ Name:   imx462
+@@ -2716,6 +2730,8 @@ Params: rotation                Mounting
+                                 Compute Module (CSI0, i2c_vc, and cam0_reg).
+         always-on               Leave the regulator powered up, to stop the
+                                 camera clamping I/Os such as XVS to 0V.
++        sync-source             Configure as vsync source
++        sync-sink               Configure as vsync sink
+ 
+ 
+ Name:   imx519
+--- a/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
++++ b/arch/arm/boot/dts/overlays/camera-mux-2port-overlay.dts
+@@ -536,5 +536,10 @@
+ 
+ 		cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
+ 		       <&csi_frag>, "target:0=",<&csi0>;
++
++		cam0-sync-source = <&imx477_0>, "trigger-mode:0=1";
++		cam0-sync-sink = <&imx477_0>, "trigger-mode:0=2";
++		cam1-sync-source = <&imx477_1>, "trigger-mode:0=1";
++		cam1-sync-sink = <&imx477_1>, "trigger-mode:0=2";
+ 	};
+ };
+--- a/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
++++ b/arch/arm/boot/dts/overlays/camera-mux-4port-overlay.dts
+@@ -939,5 +939,14 @@
+ 
+ 		cam0 = <&i2c_frag>, "target:0=",<&i2c_csi_dsi0>,
+ 		       <&csi_frag>, "target:0=",<&csi0>;
++
++		cam0-sync-source = <&imx477_0>, "trigger-mode:0=1";
++		cam0-sync-sink = <&imx477_0>, "trigger-mode:0=2";
++		cam1-sync-source = <&imx477_1>, "trigger-mode:0=1";
++		cam1-sync-sink = <&imx477_1>, "trigger-mode:0=2";
++		cam2-sync-source = <&imx477_2>, "trigger-mode:0=1";
++		cam2-sync-sink = <&imx477_2>, "trigger-mode:0=2";
++		cam3-sync-source = <&imx477_3>, "trigger-mode:0=1";
++		cam3-sync-sink = <&imx477_3>, "trigger-mode:0=2";
+ 	};
+ };
+--- a/arch/arm/boot/dts/overlays/imx378-overlay.dts
++++ b/arch/arm/boot/dts/overlays/imx378-overlay.dts
+@@ -8,3 +8,10 @@
+ &cam_node {
+ 	compatible = "sony,imx378";
+ };
++
++/{
++	__overrides__ {
++		sync-sink = <&cam_node>,"trigger-mode:0=2";
++		sync-source = <&cam_node>,"trigger-mode:0=1";
++	};
++};
+--- a/arch/arm/boot/dts/overlays/imx477-overlay.dts
++++ b/arch/arm/boot/dts/overlays/imx477-overlay.dts
+@@ -8,3 +8,10 @@
+ &cam_node {
+ 	compatible = "sony,imx477";
+ };
++
++/{
++	__overrides__ {
++		sync-sink = <&cam_node>,"trigger-mode:0=2";
++		sync-source = <&cam_node>,"trigger-mode:0=1";
++	};
++};



From lede-commits at lists.infradead.org  Sun Apr  7 14:30:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 17:30:18 -0400
Subject: [openwrt/openwrt]  uclient: update to Git HEAD (2024-04-05)
In-Reply-To: <171252541802.2421332.15725100644876280810@git-01.infra.openwrt.org>
References: <171252541802.2421332.15725100644876280810@git-01.infra.openwrt.org>
Message-ID: <mailman.24504.1712525423.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5e0587b8d1274096620031951f0fe0449913740d

commit 5e0587b8d1274096620031951f0fe0449913740d
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sun Apr 7 11:15:23 2024 +0200

    uclient: update to Git HEAD (2024-04-05)
    
    e209a4ced1d8 add strdupa macro for compatibility
    af1962b9a609 uclient: add helper function for getting ustream-ssl context/ops
    488f1d52cfd2 http: add helper function for checking redirect status
    b6e5548a3ecc uclient: defer read notifications to uloop timer
    352fb3eeb408 http: call ustream_poll if not enough read data is available
    e611e6d0ff0b add ucode binding
    ddb18d265757 uclient: add function for getting the amount of pending read/write data
    980220ad1762 ucode: fix a few ucode binding issues
    6c16331e4bf5 ucode: add support for using a prototype for cb, pass it to callbacks
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/uclient/Makefile | 23 ++++++++++++++++++++---
 1 file changed, 20 insertions(+), 3 deletions(-)

diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile
index 8a977a7aa7..cb679231cc 100644
--- a/package/libs/uclient/Makefile
+++ b/package/libs/uclient/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git
-PKG_MIRROR_HASH:=798f77d47695f7aaf7397072be2d2359c69ef53993e1b1910074cdacaa1d17e2
-PKG_SOURCE_DATE:=2023-04-13
-PKG_SOURCE_VERSION:=007d945467499f43656b141171d31f5643b83a6c
+PKG_MIRROR_HASH:=21c95854c60757007edacc579ce874999d2d536f682b0e636a8d19bc75e70da5
+PKG_SOURCE_DATE:=2024-04-05
+PKG_SOURCE_VERSION:=6c16331e4bf542fbb538d62a6b5bf3d286ecbf2c
 CMAKE_INSTALL:=1
 
 PKG_BUILD_DEPENDS:=ustream-ssl
@@ -16,6 +16,7 @@ PKG_LICENSE:=ISC
 PKG_LICENSE_FILES:=
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
+PKG_CONFIG_DEPENDS := CONFIG_PACKAGE_ucode-mod-uclient
 
 include $(INCLUDE_DIR)/package.mk
 include $(INCLUDE_DIR)/cmake.mk
@@ -37,6 +38,16 @@ define Package/uclient-fetch
   DEPENDS:=+libuclient
 endef
 
+define Package/ucode-mod-uclient
+  SECTION:=utils
+  CATEGORY:=Utilities
+  TITLE:=ucode uclient module
+  DEPENDS:=+libucode +libuclient
+endef
+
+CMAKE_OPTIONS += \
+	-DBUILD_UCODE=$(if $(CONFIG_PACKAGE_ucode-mod-uclient),ON,OFF)
+
 define Package/libuclient/install
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/libuclient.so $(1)/usr/lib/
@@ -47,5 +58,11 @@ define Package/uclient-fetch/install
 	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/uclient-fetch $(1)/bin/
 endef
 
+define Package/ucode-mod-uclient/install
+	$(INSTALL_DIR) $(1)/usr/lib/ucode
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/lib/ucode/*.so $(1)/usr/lib/ucode
+endef
+
 $(eval $(call BuildPackage,libuclient))
 $(eval $(call BuildPackage,uclient-fetch))
+$(eval $(call BuildPackage,ucode-mod-uclient))



From lede-commits at lists.infradead.org  Sun Apr  7 17:40:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 07 Apr 2024 20:40:51 -0400
Subject: [openwrt/openwrt]  config: select KERNEL_WERROR if building with
 default GCC version
In-Reply-To: <171253685171.2677654.7371294914858420355@git-01.infra.openwrt.org>
References: <171253685171.2677654.7371294914858420355@git-01.infra.openwrt.org>
Message-ID: <mailman.24513.1712536856.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/501ef81040baa2ee31de6dd9f75d619de0e4c9bc

commit 501ef81040baa2ee31de6dd9f75d619de0e4c9bc
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Apr 7 19:50:04 2024 +0100

    config: select KERNEL_WERROR if building with default GCC version
    
    At the moment we have to manually follow the default GCC version
    also in config/Config-kernel.in. This tends to be forgotten at GCC
    version bumps (just happened when switching from version 12 to 13).
    Instead, introduce a hidden Kconfig symbol which implies KERNEL_WERROR
    in toolchain/gcc/Config.in where it is visible for developers changing
    the default version.
    
    Also remove the explicit default on BUILDBOT to avoid a circular
    dependency and also because buildbots anyway implicitly always select
    the default GCC version.
    
    Reference: https://github.com/openwrt/openwrt/pull/15064
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 config/Config-kernel.in | 2 --
 toolchain/gcc/Config.in | 5 +++++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index f4ea6ccbe8..feabf0870e 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -1418,8 +1418,6 @@ config KERNEL_JFFS2_FS_SECURITY
 
 config KERNEL_WERROR
 	bool "Compile the kernel with warnings as errors"
-	default BUILDBOT
-	default y if GCC_USE_VERSION_12
 	help
 	  A kernel build should not cause any compiler warnings, and this
 	  enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 85abbdabb7..fd98914075 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -16,6 +16,11 @@ choice
 		bool "gcc 13.x"
 endchoice
 
+config GCC_USE_DEFAULT_VERSION
+	bool
+	default y if !TOOLCHAINOPTS || GCC_USE_VERSION_13
+	imply KERNEL_WERROR
+
 config GCC_USE_GRAPHITE
 	bool
 	prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS



From lede-commits at lists.infradead.org  Mon Apr  8 12:32:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 08 Apr 2024 15:32:36 -0400
Subject: [openwrt/openwrt]  realtek: add support for switch Zyxel GS1900-24EP
In-Reply-To: <171260475696.379081.9596632443726447481@git-01.infra.openwrt.org>
References: <171260475696.379081.9596632443726447481@git-01.infra.openwrt.org>
Message-ID: <mailman.24759.1712604774.1280.lede-commits@lists.infradead.org>

svanheule pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0688cf5aebe1dc9a2e7f3820861783c2a7a75d44

commit 0688cf5aebe1dc9a2e7f3820861783c2a7a75d44
Author: Mirko Vogt <mirko-openwrt at nanl.de>
AuthorDate: Fri Apr 5 15:31:03 2024 +0000

    realtek: add support for switch Zyxel GS1900-24EP
    
    This device is very similar to the GS1900-24E switch (added in b515ad1),
    except that the first 12 of 24 ethernet ports are capable of PoE and the
    physical jacks are in the right order - unlike for the GS1900-24E, where
    even and uneven ports are flipped (up <-> down on panel).
    
    Zyxel version code for this device (-24EP) is: ABTO
    
    Signed-off-by: Mirko Vogt <mirko-openwrt at nanl.de>
---
 .../realtek/base-files/etc/board.d/02_network      |  3 ++
 .../realtek/dts-5.15/rtl8382_zyxel_gs1900-24ep.dts | 63 ++++++++++++++++++++++
 target/linux/realtek/image/rtl838x.mk              |  9 ++++
 3 files changed, 75 insertions(+)

diff --git a/target/linux/realtek/base-files/etc/board.d/02_network b/target/linux/realtek/base-files/etc/board.d/02_network
index db1d99f4ec..fe3027879c 100644
--- a/target/linux/realtek/base-files/etc/board.d/02_network
+++ b/target/linux/realtek/base-files/etc/board.d/02_network
@@ -105,6 +105,9 @@ zyxel,gs1900-8hp-v1|\
 zyxel,gs1900-8hp-v2)
 	ucidef_set_poe 70 "$lan_list"
 	;;
+zyxel,gs1900-24ep)
+	ucidef_set_poe 130 "lan1 lan2 lan3 lan4 lan5 lan6 lan7 lan8 lan9 lan10 lan11 lan12"
+	;;
 zyxel,gs1900-24hp-v1|\
 zyxel,gs1900-24hp-v2)
 	ucidef_set_poe 170 "$(filter_port_list "$lan_list" "lan25 lan26")"
diff --git a/target/linux/realtek/dts-5.15/rtl8382_zyxel_gs1900-24ep.dts b/target/linux/realtek/dts-5.15/rtl8382_zyxel_gs1900-24ep.dts
new file mode 100644
index 0000000000..8a77121f4c
--- /dev/null
+++ b/target/linux/realtek/dts-5.15/rtl8382_zyxel_gs1900-24ep.dts
@@ -0,0 +1,63 @@
+// SPDX-License-Identifier: GPL-2.0-or-later
+
+#include "rtl8380_zyxel_gs1900.dtsi"
+
+/ {
+	compatible = "zyxel,gs1900-24ep", "realtek,rtl838x-soc";
+	model = "ZyXEL GS1900-24EP Switch";
+};
+
+&uart1 {
+	status = "okay";
+};
+
+&mdio {
+	EXTERNAL_PHY(0)
+	EXTERNAL_PHY(1)
+	EXTERNAL_PHY(2)
+	EXTERNAL_PHY(3)
+	EXTERNAL_PHY(4)
+	EXTERNAL_PHY(5)
+	EXTERNAL_PHY(6)
+	EXTERNAL_PHY(7)
+
+	EXTERNAL_PHY(16)
+	EXTERNAL_PHY(17)
+	EXTERNAL_PHY(18)
+	EXTERNAL_PHY(19)
+	EXTERNAL_PHY(20)
+	EXTERNAL_PHY(21)
+	EXTERNAL_PHY(22)
+	EXTERNAL_PHY(23)
+};
+
+&switch0 {
+	ports {
+		SWITCH_PORT(0, 1, qsgmii)
+		SWITCH_PORT(1, 2, qsgmii)
+		SWITCH_PORT(2, 3, qsgmii)
+		SWITCH_PORT(3, 4, qsgmii)
+		SWITCH_PORT(4, 5, qsgmii)
+		SWITCH_PORT(5, 6, qsgmii)
+		SWITCH_PORT(6, 7, qsgmii)
+		SWITCH_PORT(7, 8, qsgmii)
+
+		SWITCH_PORT(8, 9, internal)
+		SWITCH_PORT(9, 10, internal)
+		SWITCH_PORT(10, 11, internal)
+		SWITCH_PORT(11, 12, internal)
+		SWITCH_PORT(12, 13, internal)
+		SWITCH_PORT(13, 14, internal)
+		SWITCH_PORT(14, 15, internal)
+		SWITCH_PORT(15, 16, internal)
+
+		SWITCH_PORT(16, 17, qsgmii)
+		SWITCH_PORT(17, 18, qsgmii)
+		SWITCH_PORT(18, 19, qsgmii)
+		SWITCH_PORT(19, 20, qsgmii)
+		SWITCH_PORT(20, 21, qsgmii)
+		SWITCH_PORT(21, 22, qsgmii)
+		SWITCH_PORT(22, 23, qsgmii)
+		SWITCH_PORT(23, 24, qsgmii)
+	};
+};
diff --git a/target/linux/realtek/image/rtl838x.mk b/target/linux/realtek/image/rtl838x.mk
index dc4ddc6d1d..7c64d8d667 100644
--- a/target/linux/realtek/image/rtl838x.mk
+++ b/target/linux/realtek/image/rtl838x.mk
@@ -358,6 +358,15 @@ define Device/zyxel_gs1900-24e
 endef
 TARGET_DEVICES += zyxel_gs1900-24e
 
+define Device/zyxel_gs1900-24ep
+  $(Device/zyxel_gs1900)
+  SOC := rtl8382
+  DEVICE_MODEL := GS1900-24EP
+  ZYXEL_VERS := ABTO
+  DEVICE_PACKAGES += realtek-poe
+endef
+TARGET_DEVICES += zyxel_gs1900-24ep
+
 define Device/zyxel_gs1900-24hp-v1
   $(Device/zyxel_gs1900)
   SOC := rtl8382



From lede-commits at lists.infradead.org  Mon Apr  8 12:54:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 08 Apr 2024 15:54:05 -0400
Subject: [openwrt/openwrt]  d1: define subtarget specifically
In-Reply-To: <171260604593.417632.12213551983154689907@git-01.infra.openwrt.org>
References: <171260604593.417632.12213551983154689907@git-01.infra.openwrt.org>
Message-ID: <mailman.24760.1712606050.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3ce1e4c3d3da3885c2f42e1aa5bc97e0d421445b

commit 3ce1e4c3d3da3885c2f42e1aa5bc97e0d421445b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Mon Apr 8 07:54:45 2024 +0200

    d1: define subtarget specifically
    
    Historically it's possible to leave the `SUBTARGETS` undefined and
    automatically fallback to a "generic" subtarget. This however breaks
    various downstream scripts which may have expectations around filenames:
    
    While some targets with an explicit generic subtarget contain `generic`
    in the filenames of artifacts, implicit "subtargets" don't.
    
    Right now this breaks the CI[1], possibly also scripts using the ImageBuilders.
    
    Do to the D1 target what's done to other target, explicitly define the
    "generic" subtarget.
    
    [1]: https://github.com/openwrt/openwrt/actions/runs/8592821105/job/23548273630
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 target/linux/d1/Makefile          | 1 +
 target/linux/d1/generic/target.mk | 1 +
 2 files changed, 2 insertions(+)

diff --git a/target/linux/d1/Makefile b/target/linux/d1/Makefile
index 436ab94862..69e28d4811 100644
--- a/target/linux/d1/Makefile
+++ b/target/linux/d1/Makefile
@@ -9,6 +9,7 @@ BOARD:=d1
 BOARDNAME:=AllWinner D1 RISC-V SoC
 FEATURES:=ext4 squashfs
 KERNELNAME:=Image dtbs
+SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=6.1
 
diff --git a/target/linux/d1/generic/target.mk b/target/linux/d1/generic/target.mk
new file mode 100644
index 0000000000..f5cb1fb19b
--- /dev/null
+++ b/target/linux/d1/generic/target.mk
@@ -0,0 +1 @@
+BOARDNAME:=Generic



From lede-commits at lists.infradead.org  Mon Apr  8 12:54:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 08 Apr 2024 15:54:06 -0400
Subject: [openwrt/openwrt]  treewide: remove implicit SUBTARGET
In-Reply-To: <171260604593.417632.12213551983154689907@git-01.infra.openwrt.org>
References: <171260604593.417632.12213551983154689907@git-01.infra.openwrt.org>
Message-ID: <mailman.24761.1712606050.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d997477775bf5447000f1d300a027878b566f5d1

commit d997477775bf5447000f1d300a027878b566f5d1
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Mon Apr 8 08:05:29 2024 +0200

    treewide: remove implicit SUBTARGET
    
    Historically it's possible to leave the `SUBTARGETS` undefined and
    automatically fallback to a "generic" subtarget. This however breaks
    various downstream scripts which may have expectations around filenames:
    
    While some targets with an explicit generic subtarget contain `generic`
    in the filenames of artifacts, implicit "subtargets" don't.
    
    Right now this breaks the CI[1], possibly also scripts using the ImageBuilders.
    
    This commit removes all code that support implicit handling of
    subtargets and instead requires every target to define "SUBTARGETS".
    
    [1]: https://github.com/openwrt/openwrt/actions/runs/8592821105/job/23548273630
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/image-commands.mk              |  4 ++--
 include/image.mk                       | 12 ++++++------
 include/kernel.mk                      |  6 +++---
 include/version.mk                     |  2 +-
 package/kernel/linux/modules/crypto.mk |  2 +-
 target/imagebuilder/Makefile           |  2 +-
 target/imagebuilder/files/Makefile     |  2 +-
 7 files changed, 15 insertions(+), 15 deletions(-)

diff --git a/include/image-commands.mk b/include/image-commands.mk
index 832c85ee70..83ecf7c520 100644
--- a/include/image-commands.mk
+++ b/include/image-commands.mk
@@ -46,7 +46,7 @@ endef
 
 ifdef IB
 define Build/append-image-stage
-	dd if=$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1) >> $@
+	dd if=$(STAGING_DIR_IMAGE)/$(BOARD)-$(SUBTARGET)-$(DEVICE_NAME)-$(1) >> $@
 endef
 else
 define Build/append-image-stage
@@ -54,7 +54,7 @@ define Build/append-image-stage
 	fwtool -s /dev/null -t "$@.stripmeta" || :
 	fwtool -i /dev/null -t "$@.stripmeta" || :
 	mkdir -p "$(STAGING_DIR_IMAGE)"
-	dd if="$@.stripmeta" of="$(STAGING_DIR_IMAGE)/$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))-$(DEVICE_NAME)-$(1)"
+	dd if="$@.stripmeta" of="$(STAGING_DIR_IMAGE)/$(BOARD)-$(SUBTARGET)-$(DEVICE_NAME)-$(1)"
 	dd if="$@.stripmeta" >> "$@"
 	rm "$@.stripmeta"
 endef
diff --git a/include/image.mk b/include/image.mk
index 4b6acbe1aa..b6b796dd97 100644
--- a/include/image.mk
+++ b/include/image.mk
@@ -39,7 +39,7 @@ IMG_PREFIX_EXTRA:=$(if $(EXTRA_IMAGE_NAME),$(call sanitize,$(EXTRA_IMAGE_NAME))-
 IMG_PREFIX_VERNUM:=$(if $(CONFIG_VERSION_FILENAMES),$(call sanitize,$(VERSION_NUMBER))-)
 IMG_PREFIX_VERCODE:=$(if $(CONFIG_VERSION_CODE_FILENAMES),$(call sanitize,$(VERSION_CODE))-)
 
-IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET))
+IMG_PREFIX:=$(VERSION_DIST_SANITIZED)-$(IMG_PREFIX_VERNUM)$(IMG_PREFIX_VERCODE)$(IMG_PREFIX_EXTRA)$(BOARD)-$(SUBTARGET)
 IMG_ROOTFS:=$(IMG_PREFIX)-rootfs
 IMG_COMBINED:=$(IMG_PREFIX)-combined
 ifeq ($(DUMP),)
@@ -477,10 +477,10 @@ endef
 ifdef IB
   DEVICE_CHECK_PROFILE = $(filter $(1),DEVICE_$(PROFILE) $(PROFILE))
 else
-  DEVICE_CHECK_PROFILE = $(CONFIG_TARGET_$(if $(CONFIG_TARGET_MULTI_PROFILE),DEVICE_)$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_$(1))
+  DEVICE_CHECK_PROFILE = $(CONFIG_TARGET_$(if $(CONFIG_TARGET_MULTI_PROFILE),DEVICE_)$(call target_conf,$(BOARD)_$(SUBTARGET))_$(1))
 endif
 
-DEVICE_EXTRA_PACKAGES = $(call qstrip,$(CONFIG_TARGET_DEVICE_PACKAGES_$(call target_conf,$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET)))_DEVICE_$(1)))
+DEVICE_EXTRA_PACKAGES = $(call qstrip,$(CONFIG_TARGET_DEVICE_PACKAGES_$(call target_conf,$(BOARD)_$(SUBTARGET))_DEVICE_$(1)))
 
 define merge_packages
   $(1) :=
@@ -558,7 +558,7 @@ define Device/Build/initramfs
 	DEVICE_TITLE="$$(DEVICE_TITLE)" \
 	DEVICE_PACKAGES="$$(DEVICE_PACKAGES)" \
 	TARGET="$(BOARD)" \
-	SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
+	SUBTARGET="$(SUBTARGET)" \
 	VERSION_NUMBER="$(VERSION_NUMBER)" \
 	VERSION_CODE="$(VERSION_CODE)" \
 	SUPPORTED_DEVICES="$$(SUPPORTED_DEVICES)" \
@@ -692,7 +692,7 @@ define Device/Build/image
 	DEVICE_TITLE="$(DEVICE_TITLE)" \
 	DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
 	TARGET="$(BOARD)" \
-	SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
+	SUBTARGET="$(SUBTARGET)" \
 	VERSION_NUMBER="$(VERSION_NUMBER)" \
 	VERSION_CODE="$(VERSION_CODE)" \
 	SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \
@@ -746,7 +746,7 @@ define Device/Build/artifact
 	DEVICE_TITLE="$(DEVICE_TITLE)" \
 	DEVICE_PACKAGES="$(DEVICE_PACKAGES)" \
 	TARGET="$(BOARD)" \
-	SUBTARGET="$(if $(SUBTARGET),$(SUBTARGET),generic)" \
+	SUBTARGET="$(SUBTARGET)" \
 	VERSION_NUMBER="$(VERSION_NUMBER)" \
 	VERSION_CODE="$(VERSION_CODE)" \
 	SUPPORTED_DEVICES="$(SUPPORTED_DEVICES)" \
diff --git a/include/kernel.mk b/include/kernel.mk
index 9969c519dd..479c586ea2 100644
--- a/include/kernel.mk
+++ b/include/kernel.mk
@@ -43,7 +43,7 @@ else
     PATCH_DIR ?= $(CURDIR)/patches$(if $(wildcard ./patches-$(KERNEL_PATCHVER)),-$(KERNEL_PATCHVER))
     FILES_DIR ?= $(foreach dir,$(wildcard $(CURDIR)/files $(CURDIR)/files-$(KERNEL_PATCHVER)),"$(dir)")
   endif
-  KERNEL_BUILD_DIR ?= $(BUILD_DIR)/linux-$(BOARD)$(if $(SUBTARGET),_$(SUBTARGET))
+  KERNEL_BUILD_DIR ?= $(BUILD_DIR)/linux-$(BOARD)_$(SUBTARGET)
   LINUX_DIR ?= $(KERNEL_BUILD_DIR)/linux-$(LINUX_VERSION)
   LINUX_UAPI_DIR=uapi/
   LINUX_VERMAGIC:=$(strip $(shell cat $(LINUX_DIR)/.vermagic 2>/dev/null))
@@ -204,7 +204,7 @@ define KernelPackage
   $(eval $(call KernelPackage/Defaults))
   $(eval $(call KernelPackage/$(1)))
   $(eval $(call KernelPackage/$(1)/$(BOARD)))
-  $(eval $(call KernelPackage/$(1)/$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic)))
+  $(eval $(call KernelPackage/$(1)/$(BOARD)/$(SUBTARGET)))
 
   define Package/kmod-$(1)
     TITLE:=$(TITLE)
@@ -216,7 +216,7 @@ define KernelPackage
     PKGFLAGS:=$(PKGFLAGS)
     $(call KernelPackage/$(1))
     $(call KernelPackage/$(1)/$(BOARD))
-    $(call KernelPackage/$(1)/$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic))
+    $(call KernelPackage/$(1)/$(BOARD)/$(SUBTARGET))
   endef
 
   ifdef KernelPackage/$(1)/conffiles
diff --git a/include/version.mk b/include/version.mk
index f39e35cd09..cdee0976da 100644
--- a/include/version.mk
+++ b/include/version.mk
@@ -95,7 +95,7 @@ VERSION_SED_SCRIPT:=$(SED) 's,%U,$(call sed_escape,$(VERSION_REPO)),g' \
 	-e 's,%d,\L$(call sed_escape,$(subst $(space),_,$(VERSION_DIST))),g' \
 	-e 's,%R,$(call sed_escape,$(REVISION)),g' \
 	-e 's,%T,$(call sed_escape,$(BOARD)),g' \
-	-e 's,%S,$(call sed_escape,$(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic)),g' \
+	-e 's,%S,$(call sed_escape,$(BOARD)/$(SUBTARGET)),g' \
 	-e 's,%A,$(call sed_escape,$(ARCH_PACKAGES)),g' \
 	-e 's,%t,$(call sed_escape,$(VERSION_TAINTS)),g' \
 	-e 's,%M,$(call sed_escape,$(VERSION_MANUFACTURER)),g' \
diff --git a/package/kernel/linux/modules/crypto.mk b/package/kernel/linux/modules/crypto.mk
index be9893d453..4a8a283d37 100644
--- a/package/kernel/linux/modules/crypto.mk
+++ b/package/kernel/linux/modules/crypto.mk
@@ -11,7 +11,7 @@ CRYPTO_MODULES = \
 	ALGAPI2=crypto_algapi \
 	BLKCIPHER2=crypto_blkcipher
 
-CRYPTO_TARGET = $(BOARD)/$(if $(SUBTARGET),$(SUBTARGET),generic)
+CRYPTO_TARGET = $(BOARD)/$(SUBTARGET)
 
 crypto_confvar=CONFIG_CRYPTO_$(word 1,$(subst =,$(space),$(1)))
 crypto_file=$(LINUX_DIR)/crypto/$(word 2,$(subst =,$(space),$(1))).ko
diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index 799ac3be55..c768c992ea 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -12,7 +12,7 @@ include $(INCLUDE_DIR)/feeds.mk
 
 override MAKEFLAGS=
 
-IB_NAME:=$(VERSION_DIST_SANITIZED)-imagebuilder-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(BOARD)$(if $(SUBTARGET),-$(SUBTARGET)).$(HOST_OS)-$(HOST_ARCH)
+IB_NAME:=$(VERSION_DIST_SANITIZED)-imagebuilder-$(if $(CONFIG_VERSION_FILENAMES),$(VERSION_NUMBER)-)$(BOARD)-$(SUBTARGET).$(HOST_OS)-$(HOST_ARCH)
 PKG_BUILD_DIR:=$(BUILD_DIR)/$(IB_NAME)
 IB_KDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(KERNEL_BUILD_DIR))
 IB_LDIR:=$(patsubst $(TOPDIR)/%,$(PKG_BUILD_DIR)/%,$(LINUX_DIR))
diff --git a/target/imagebuilder/files/Makefile b/target/imagebuilder/files/Makefile
index 0466fc7dcc..78a75e96a8 100644
--- a/target/imagebuilder/files/Makefile
+++ b/target/imagebuilder/files/Makefile
@@ -103,7 +103,7 @@ PROFILE_LIST = $(foreach p,$(PROFILE_NAMES), \
 
 
 .profiles.mk: .targetinfo
-	@$(SCRIPT_DIR)/target-metadata.pl profile_mk $< '$(BOARD)$(if $(SUBTARGET),/$(SUBTARGET))' > $@
+	@$(SCRIPT_DIR)/target-metadata.pl profile_mk $< '$(BOARD)/$(SUBTARGET)' > $@
 
 staging_dir/host/.prereq-build: include/prereq-build.mk
 	mkdir -p tmp



From lede-commits at lists.infradead.org  Tue Apr  9 00:46:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 03:46:27 -0400
Subject: [openwrt/openwrt]  mac80211: backport some upstream EHT patches
In-Reply-To: <171264878740.1728247.16983239164198387787@git-01.infra.openwrt.org>
References: <171264878740.1728247.16983239164198387787@git-01.infra.openwrt.org>
Message-ID: <mailman.24883.1712648809.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/afe2ddf827af6e64d2d0972bfae00a7286d0199b

commit afe2ddf827af6e64d2d0972bfae00a7286d0199b
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Mon Apr 1 22:59:10 2024 +0200

    mac80211: backport some upstream EHT patches
    
    Those changes are needed by Wi-Fi 7 drivers.
    
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mac80211/Makefile                   |   2 +-
 ...date-Transition-Disable-policy-during-por.patch | 189 ++++++++++
 ...-support-minimal-EHT-rate-reporting-on-RX.patch | 179 ++++++++++
 ...c80211-mlme-handle-EHT-channel-puncturing.patch | 387 +++++++++++++++++++++
 ...11-move-puncturing-bitmap-validation-from.patch | 219 ++++++++++++
 ...1-validate-and-configure-puncturing-bitma.patch | 169 +++++++++
 ...11-include-puncturing-bitmap-in-channel-s.patch | 263 ++++++++++++++
 ...wifi-mac80211-configure-puncturing-bitmap.patch | 107 ++++++
 ...11-add-EHT-MU-MIMO-related-flags-in-ieee8.patch |  68 ++++
 .../500-mac80211_configure_antenna_gain.patch      |  35 +-
 .../subsys/780-avoid-crashing-missing-band.patch   |   2 +-
 11 files changed, 1600 insertions(+), 20 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index 248b48c3c1..a7472ee779 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -11,7 +11,7 @@ include $(INCLUDE_DIR)/kernel.mk
 PKG_NAME:=mac80211
 
 PKG_VERSION:=6.1.24
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 # PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.58/
 PKG_SOURCE_URL:=http://mirror2.openwrt.org/sources/
 PKG_HASH:=5d39aca7e34c33cb9b3e366117b2e86841b7bdd37933679d6b1e61be6b150648
diff --git a/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch b/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch
new file mode 100644
index 0000000000..d0551c509f
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/341-v6.2-cfg80211-Update-Transition-Disable-policy-during-por.patch
@@ -0,0 +1,189 @@
+From 0ff57171d6d225558c81a69439d5323e35b40549 Mon Sep 17 00:00:00 2001
+From: Vinayak Yadawad <vinayak.yadawad at broadcom.com>
+Date: Wed, 7 Sep 2022 18:14:48 +0530
+Subject: [PATCH] cfg80211: Update Transition Disable policy during port
+ authorization
+
+In case of 4way handshake offload, transition disable policy
+updated by the AP during EAPOL 3/4 is not updated to the upper layer.
+This results in mismatch between transition disable policy
+between the upper layer and the driver. This patch addresses this
+issue by updating transition disable policy as part of port
+authorization indication.
+
+Signed-off-by: Vinayak Yadawad <vinayak.yadawad at broadcom.com>
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ .../wireless/broadcom/brcm80211/brcmfmac/cfg80211.c  |  2 +-
+ include/net/cfg80211.h                               |  4 +++-
+ include/uapi/linux/nl80211.h                         |  3 +++
+ net/wireless/core.h                                  |  5 ++++-
+ net/wireless/nl80211.c                               |  8 +++++++-
+ net/wireless/nl80211.h                               |  3 ++-
+ net/wireless/sme.c                                   | 12 ++++++++----
+ net/wireless/util.c                                  |  4 +++-
+ 8 files changed, 31 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
++++ b/drivers/net/wireless/broadcom/brcm80211/brcmfmac/cfg80211.c
+@@ -6005,7 +6005,7 @@ done:
+ 	brcmf_dbg(CONN, "Report roaming result\n");
+ 
+ 	if (profile->use_fwsup == BRCMF_PROFILE_FWSUP_1X && profile->is_ft) {
+-		cfg80211_port_authorized(ndev, profile->bssid, GFP_KERNEL);
++		cfg80211_port_authorized(ndev, profile->bssid, NULL, 0, GFP_KERNEL);
+ 		brcmf_dbg(CONN, "Report port authorized\n");
+ 	}
+ 
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -7720,6 +7720,8 @@ void cfg80211_roamed(struct net_device *
+  *
+  * @dev: network device
+  * @bssid: the BSSID of the AP
++ * @td_bitmap: transition disable policy
++ * @td_bitmap_len: Length of transition disable policy
+  * @gfp: allocation flags
+  *
+  * This function should be called by a driver that supports 4 way handshake
+@@ -7730,7 +7732,7 @@ void cfg80211_roamed(struct net_device *
+  * indicate the 802.11 association.
+  */
+ void cfg80211_port_authorized(struct net_device *dev, const u8 *bssid,
+-			      gfp_t gfp);
++			      const u8* td_bitmap, u8 td_bitmap_len, gfp_t gfp);
+ 
+ /**
+  * cfg80211_disconnected - notify cfg80211 that connection was dropped
+--- a/include/uapi/linux/nl80211.h
++++ b/include/uapi/linux/nl80211.h
+@@ -2749,6 +2749,8 @@ enum nl80211_commands {
+  *	When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the ack RX
+  *	timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
+  *	the incoming frame RX timestamp.
++ * @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent
++ *	(re)associations.
+  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
+  * @NL80211_ATTR_MAX: highest attribute number currently defined
+  * @__NL80211_ATTR_AFTER_LAST: internal use
+@@ -3276,6 +3278,7 @@ enum nl80211_attrs {
+ 
+ 	NL80211_ATTR_TX_HW_TIMESTAMP,
+ 	NL80211_ATTR_RX_HW_TIMESTAMP,
++	NL80211_ATTR_TD_BITMAP,
+ 
+ 	/* add attributes here, update the policy in nl80211.c */
+ 
+--- a/net/wireless/core.h
++++ b/net/wireless/core.h
+@@ -271,6 +271,8 @@ struct cfg80211_event {
+ 		} ij;
+ 		struct {
+ 			u8 bssid[ETH_ALEN];
++			const u8 *td_bitmap;
++			u8 td_bitmap_len;
+ 		} pa;
+ 	};
+ };
+@@ -409,7 +411,8 @@ int cfg80211_disconnect(struct cfg80211_
+ 			bool wextev);
+ void __cfg80211_roamed(struct wireless_dev *wdev,
+ 		       struct cfg80211_roam_info *info);
+-void __cfg80211_port_authorized(struct wireless_dev *wdev, const u8 *bssid);
++void __cfg80211_port_authorized(struct wireless_dev *wdev, const u8 *bssid,
++				const u8 *td_bitmap, u8 td_bitmap_len);
+ int cfg80211_mgd_wext_connect(struct cfg80211_registered_device *rdev,
+ 			      struct wireless_dev *wdev);
+ void cfg80211_autodisconnect_wk(struct work_struct *work);
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -17936,7 +17936,8 @@ void nl80211_send_roamed(struct cfg80211
+ }
+ 
+ void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
+-				  struct net_device *netdev, const u8 *bssid)
++				  struct net_device *netdev, const u8 *bssid,
++				  const u8 *td_bitmap, u8 td_bitmap_len)
+ {
+ 	struct sk_buff *msg;
+ 	void *hdr;
+@@ -17956,6 +17957,11 @@ void nl80211_send_port_authorized(struct
+ 	    nla_put(msg, NL80211_ATTR_MAC, ETH_ALEN, bssid))
+ 		goto nla_put_failure;
+ 
++	if ((td_bitmap_len > 0) && td_bitmap)
++		if (nla_put(msg, NL80211_ATTR_TD_BITMAP,
++			    td_bitmap_len, td_bitmap))
++			goto nla_put_failure;
++
+ 	genlmsg_end(msg, hdr);
+ 
+ 	genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
+--- a/net/wireless/nl80211.h
++++ b/net/wireless/nl80211.h
+@@ -83,7 +83,8 @@ void nl80211_send_roamed(struct cfg80211
+ 			 struct net_device *netdev,
+ 			 struct cfg80211_roam_info *info, gfp_t gfp);
+ void nl80211_send_port_authorized(struct cfg80211_registered_device *rdev,
+-				  struct net_device *netdev, const u8 *bssid);
++				  struct net_device *netdev, const u8 *bssid,
++				  const u8 *td_bitmap, u8 td_bitmap_len);
+ void nl80211_send_disconnected(struct cfg80211_registered_device *rdev,
+ 			       struct net_device *netdev, u16 reason,
+ 			       const u8 *ie, size_t ie_len, bool from_ap);
+--- a/net/wireless/sme.c
++++ b/net/wireless/sme.c
+@@ -1266,7 +1266,8 @@ out:
+ }
+ EXPORT_SYMBOL(cfg80211_roamed);
+ 
+-void __cfg80211_port_authorized(struct wireless_dev *wdev, const u8 *bssid)
++void __cfg80211_port_authorized(struct wireless_dev *wdev, const u8 *bssid,
++					const u8 *td_bitmap, u8 td_bitmap_len)
+ {
+ 	ASSERT_WDEV_LOCK(wdev);
+ 
+@@ -1279,11 +1280,11 @@ void __cfg80211_port_authorized(struct w
+ 		return;
+ 
+ 	nl80211_send_port_authorized(wiphy_to_rdev(wdev->wiphy), wdev->netdev,
+-				     bssid);
++				     bssid, td_bitmap, td_bitmap_len);
+ }
+ 
+ void cfg80211_port_authorized(struct net_device *dev, const u8 *bssid,
+-			      gfp_t gfp)
++			      const u8 *td_bitmap, u8 td_bitmap_len, gfp_t gfp)
+ {
+ 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+ 	struct cfg80211_registered_device *rdev = wiphy_to_rdev(wdev->wiphy);
+@@ -1293,12 +1294,15 @@ void cfg80211_port_authorized(struct net
+ 	if (WARN_ON(!bssid))
+ 		return;
+ 
+-	ev = kzalloc(sizeof(*ev), gfp);
++	ev = kzalloc(sizeof(*ev) + td_bitmap_len, gfp);
+ 	if (!ev)
+ 		return;
+ 
+ 	ev->type = EVENT_PORT_AUTHORIZED;
+ 	memcpy(ev->pa.bssid, bssid, ETH_ALEN);
++	ev->pa.td_bitmap = ((u8 *)ev) + sizeof(*ev);
++	ev->pa.td_bitmap_len = td_bitmap_len;
++	memcpy((void *)ev->pa.td_bitmap, td_bitmap, td_bitmap_len);
+ 
+ 	/*
+ 	 * Use the wdev event list so that if there are pending
+--- a/net/wireless/util.c
++++ b/net/wireless/util.c
+@@ -1057,7 +1057,9 @@ void cfg80211_process_wdev_events(struct
+ 			__cfg80211_leave(wiphy_to_rdev(wdev->wiphy), wdev);
+ 			break;
+ 		case EVENT_PORT_AUTHORIZED:
+-			__cfg80211_port_authorized(wdev, ev->pa.bssid);
++			__cfg80211_port_authorized(wdev, ev->pa.bssid,
++						   ev->pa.td_bitmap,
++						   ev->pa.td_bitmap_len);
+ 			break;
+ 		}
+ 		wdev_unlock(wdev);
diff --git a/package/kernel/mac80211/patches/subsys/342-v6.3-mac80211-support-minimal-EHT-rate-reporting-on-RX.patch b/package/kernel/mac80211/patches/subsys/342-v6.3-mac80211-support-minimal-EHT-rate-reporting-on-RX.patch
new file mode 100644
index 0000000000..0b1111505c
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/342-v6.3-mac80211-support-minimal-EHT-rate-reporting-on-RX.patch
@@ -0,0 +1,179 @@
+From f66c48af7a110c0d694c4ac4a1257affb272a2ea Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Mon, 9 Jan 2023 13:07:21 +0200
+Subject: [PATCH] mac80211: support minimal EHT rate reporting on RX
+
+Add minimal support for RX EHT rate reporting, not yet
+adding (modifying) any radiotap headers, just statistics
+for cfg80211.
+
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ include/net/mac80211.h  | 19 ++++++++++++++++---
+ net/mac80211/rx.c       |  9 +++++++++
+ net/mac80211/sta_info.c |  9 ++++++++-
+ net/mac80211/sta_info.h | 24 ++++++++++++++++++------
+ net/mac80211/util.c     | 13 +++++++++++++
+ 5 files changed, 64 insertions(+), 10 deletions(-)
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -1468,6 +1468,7 @@ enum mac80211_rx_encoding {
+ 	RX_ENC_HT,
+ 	RX_ENC_VHT,
+ 	RX_ENC_HE,
++	RX_ENC_EHT,
+ };
+ 
+ /**
+@@ -1501,7 +1502,7 @@ enum mac80211_rx_encoding {
+  * @antenna: antenna used
+  * @rate_idx: index of data rate into band's supported rates or MCS index if
+  *	HT or VHT is used (%RX_FLAG_HT/%RX_FLAG_VHT)
+- * @nss: number of streams (VHT and HE only)
++ * @nss: number of streams (VHT, HE and EHT only)
+  * @flag: %RX_FLAG_\*
+  * @encoding: &enum mac80211_rx_encoding
+  * @bw: &enum rate_info_bw
+@@ -1509,6 +1510,8 @@ enum mac80211_rx_encoding {
+  * @he_ru: HE RU, from &enum nl80211_he_ru_alloc
+  * @he_gi: HE GI, from &enum nl80211_he_gi
+  * @he_dcm: HE DCM value
++ * @eht.ru: EHT RU, from &enum nl80211_eht_ru_alloc
++ * @eht.gi: EHT GI, from &enum nl80211_eht_gi
+  * @rx_flags: internal RX flags for mac80211
+  * @ampdu_reference: A-MPDU reference number, must be a different value for
+  *	each A-MPDU but the same for each subframe within one A-MPDU
+@@ -1530,8 +1533,18 @@ struct ieee80211_rx_status {
+ 	u32 flag;
+ 	u16 freq: 13, freq_offset: 1;
+ 	u8 enc_flags;
+-	u8 encoding:2, bw:3, he_ru:3;
+-	u8 he_gi:2, he_dcm:1;
++	u8 encoding:3, bw:4;
++	union {
++		struct {
++			u8 he_ru:3;
++			u8 he_gi:2;
++			u8 he_dcm:1;
++		};
++		struct {
++			u8 ru:4;
++			u8 gi:2;
++		} eht;
++	};
+ 	u8 rate_idx;
+ 	u8 nss;
+ 	u8 rx_flags;
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -5328,6 +5328,15 @@ void ieee80211_rx_list(struct ieee80211_
+ 				      status->rate_idx, status->nss))
+ 				goto drop;
+ 			break;
++		case RX_ENC_EHT:
++			if (WARN_ONCE(status->rate_idx > 15 ||
++				      !status->nss ||
++				      status->nss > 8 ||
++				      status->eht.gi > NL80211_RATE_INFO_EHT_GI_3_2,
++				      "Rate marked as an EHT rate but data is invalid: MCS:%d, NSS:%d, GI:%d\n",
++				      status->rate_idx, status->nss, status->eht.gi))
++				goto drop;
++			break;
+ 		default:
+ 			WARN_ON_ONCE(1);
+ 			fallthrough;
+--- a/net/mac80211/sta_info.c
++++ b/net/mac80211/sta_info.c
+@@ -4,7 +4,7 @@
+  * Copyright 2006-2007	Jiri Benc <jbenc at suse.cz>
+  * Copyright 2013-2014  Intel Mobile Communications GmbH
+  * Copyright (C) 2015 - 2017 Intel Deutschland GmbH
+- * Copyright (C) 2018-2021 Intel Corporation
++ * Copyright (C) 2018-2022 Intel Corporation
+  */
+ 
+ #include <linux/module.h>
+@@ -2385,6 +2385,13 @@ static void sta_stats_decode_rate(struct
+ 		rinfo->he_ru_alloc = STA_STATS_GET(HE_RU, rate);
+ 		rinfo->he_dcm = STA_STATS_GET(HE_DCM, rate);
+ 		break;
++	case STA_STATS_RATE_TYPE_EHT:
++		rinfo->flags = RATE_INFO_FLAGS_EHT_MCS;
++		rinfo->mcs = STA_STATS_GET(EHT_MCS, rate);
++		rinfo->nss = STA_STATS_GET(EHT_NSS, rate);
++		rinfo->eht_gi = STA_STATS_GET(EHT_GI, rate);
++		rinfo->eht_ru_alloc = STA_STATS_GET(EHT_RU, rate);
++		break;
+ 	}
+ }
+ 
+--- a/net/mac80211/sta_info.h
++++ b/net/mac80211/sta_info.h
+@@ -930,6 +930,7 @@ enum sta_stats_type {
+ 	STA_STATS_RATE_TYPE_VHT,
+ 	STA_STATS_RATE_TYPE_HE,
+ 	STA_STATS_RATE_TYPE_S1G,
++	STA_STATS_RATE_TYPE_EHT,
+ };
+ 
+ #define STA_STATS_FIELD_HT_MCS		GENMASK( 7,  0)
+@@ -939,12 +940,16 @@ enum sta_stats_type {
+ #define STA_STATS_FIELD_VHT_NSS		GENMASK( 7,  4)
+ #define STA_STATS_FIELD_HE_MCS		GENMASK( 3,  0)
+ #define STA_STATS_FIELD_HE_NSS		GENMASK( 7,  4)
+-#define STA_STATS_FIELD_BW		GENMASK(11,  8)
+-#define STA_STATS_FIELD_SGI		GENMASK(12, 12)
+-#define STA_STATS_FIELD_TYPE		GENMASK(15, 13)
+-#define STA_STATS_FIELD_HE_RU		GENMASK(18, 16)
+-#define STA_STATS_FIELD_HE_GI		GENMASK(20, 19)
+-#define STA_STATS_FIELD_HE_DCM		GENMASK(21, 21)
++#define STA_STATS_FIELD_EHT_MCS		GENMASK( 3,  0)
++#define STA_STATS_FIELD_EHT_NSS		GENMASK( 7,  4)
++#define STA_STATS_FIELD_BW		GENMASK(12,  8)
++#define STA_STATS_FIELD_SGI		GENMASK(13, 13)
++#define STA_STATS_FIELD_TYPE		GENMASK(16, 14)
++#define STA_STATS_FIELD_HE_RU		GENMASK(19, 17)
++#define STA_STATS_FIELD_HE_GI		GENMASK(21, 20)
++#define STA_STATS_FIELD_HE_DCM		GENMASK(22, 22)
++#define STA_STATS_FIELD_EHT_RU		GENMASK(20, 17)
++#define STA_STATS_FIELD_EHT_GI		GENMASK(22, 21)
+ 
+ #define STA_STATS_FIELD(_n, _v)		FIELD_PREP(STA_STATS_FIELD_ ## _n, _v)
+ #define STA_STATS_GET(_n, _v)		FIELD_GET(STA_STATS_FIELD_ ## _n, _v)
+@@ -983,6 +988,13 @@ static inline u32 sta_stats_encode_rate(
+ 		r |= STA_STATS_FIELD(HE_RU, s->he_ru);
+ 		r |= STA_STATS_FIELD(HE_DCM, s->he_dcm);
+ 		break;
++	case RX_ENC_EHT:
++		r |= STA_STATS_FIELD(TYPE, STA_STATS_RATE_TYPE_EHT);
++		r |= STA_STATS_FIELD(EHT_NSS, s->nss);
++		r |= STA_STATS_FIELD(EHT_MCS, s->rate_idx);
++		r |= STA_STATS_FIELD(EHT_GI, s->eht.gi);
++		r |= STA_STATS_FIELD(EHT_RU, s->eht.ru);
++		break;
+ 	default:
+ 		WARN_ON(1);
+ 		return STA_STATS_RATE_INVALID;
+--- a/net/mac80211/util.c
++++ b/net/mac80211/util.c
+@@ -3900,6 +3900,19 @@ u64 ieee80211_calculate_rx_timestamp(str
+ 
+ 	/* Fill cfg80211 rate info */
+ 	switch (status->encoding) {
++	case RX_ENC_EHT:
++		ri.flags |= RATE_INFO_FLAGS_EHT_MCS;
++		ri.mcs = status->rate_idx;
++		ri.nss = status->nss;
++		ri.eht_ru_alloc = status->eht.ru;
++		if (status->enc_flags & RX_ENC_FLAG_SHORT_GI)
++			ri.flags |= RATE_INFO_FLAGS_SHORT_GI;
++		/* TODO/FIXME: is this right? handle other PPDUs */
++		if (status->flag & RX_FLAG_MACTIME_PLCP_START) {
++			mpdu_offset += 2;
++			ts += 36;
++		}
++		break;
+ 	case RX_ENC_HE:
+ 		ri.flags |= RATE_INFO_FLAGS_HE_MCS;
+ 		ri.mcs = status->rate_idx;
diff --git a/package/kernel/mac80211/patches/subsys/343-v6.3-wifi-mac80211-mlme-handle-EHT-channel-puncturing.patch b/package/kernel/mac80211/patches/subsys/343-v6.3-wifi-mac80211-mlme-handle-EHT-channel-puncturing.patch
new file mode 100644
index 0000000000..b5bd501937
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/343-v6.3-wifi-mac80211-mlme-handle-EHT-channel-puncturing.patch
@@ -0,0 +1,387 @@
+From aa87cd8b35736a5183745ab0ec4b82419024dfd7 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Fri, 27 Jan 2023 12:39:31 +0100
+Subject: [PATCH] wifi: mac80211: mlme: handle EHT channel puncturing
+
+Handle the Puncturing info received from the AP in the
+EHT Operation element in beacons.
+
+If the info is invalid:
+ - during association: disable EHT connection for the AP
+ - after association: disconnect
+
+This commit includes many (internal) bugfixes and spec
+updates various people.
+
+Co-developed-by: Miri Korenblit <miriam.rachel.korenblit at intel.com>
+Signed-off-by: Miri Korenblit <miriam.rachel.korenblit at intel.com>
+Link: https://lore.kernel.org/r/20230127123930.4fbc74582331.I3547481d49f958389f59dfeba3fcc75e72b0aa6e at changeid
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ include/net/mac80211.h     |   5 +-
+ net/mac80211/cfg.c         |   2 +-
+ net/mac80211/chan.c        |   2 +-
+ net/mac80211/ieee80211_i.h |   2 +-
+ net/mac80211/mlme.c        | 224 ++++++++++++++++++++++++++++++++++++-
+ 5 files changed, 228 insertions(+), 7 deletions(-)
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -340,7 +340,7 @@ struct ieee80211_vif_chanctx_switch {
+  * @BSS_CHANGED_FILS_DISCOVERY: FILS discovery status changed.
+  * @BSS_CHANGED_UNSOL_BCAST_PROBE_RESP: Unsolicited broadcast probe response
+  *	status changed.
+- *
++ * @BSS_CHANGED_EHT_PUNCTURING: The channel puncturing bitmap changed.
+  */
+ enum ieee80211_bss_change {
+ 	BSS_CHANGED_ASSOC		= 1<<0,
+@@ -375,6 +375,7 @@ enum ieee80211_bss_change {
+ 	BSS_CHANGED_HE_BSS_COLOR	= 1<<29,
+ 	BSS_CHANGED_FILS_DISCOVERY      = 1<<30,
+ 	BSS_CHANGED_UNSOL_BCAST_PROBE_RESP = 1<<31,
++	BSS_CHANGED_EHT_PUNCTURING	= BIT_ULL(32),
+ 
+ 	/* when adding here, make sure to change ieee80211_reconfig */
+ };
+@@ -640,6 +641,7 @@ struct ieee80211_fils_discovery {
+  * @tx_pwr_env_num: number of @tx_pwr_env.
+  * @pwr_reduction: power constraint of BSS.
+  * @eht_support: does this BSS support EHT
++ * @eht_puncturing: bitmap to indicate which channels are punctured in this BSS
+  * @csa_active: marks whether a channel switch is going on. Internally it is
+  *	write-protected by sdata_lock and local->mtx so holding either is fine
+  *	for read access.
+@@ -739,6 +741,7 @@ struct ieee80211_bss_conf {
+ 	u8 tx_pwr_env_num;
+ 	u8 pwr_reduction;
+ 	bool eht_support;
++	u16 eht_puncturing;
+ 
+ 	bool csa_active;
+ 	bool mu_mimo_owner;
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -4184,7 +4184,7 @@ static int ieee80211_set_ap_chanwidth(st
+ 	struct ieee80211_sub_if_data *sdata = IEEE80211_DEV_TO_SUB_IF(dev);
+ 	struct ieee80211_link_data *link;
+ 	int ret;
+-	u32 changed = 0;
++	u64 changed = 0;
+ 
+ 	link = sdata_dereference(sdata->link[link_id], sdata);
+ 
+--- a/net/mac80211/chan.c
++++ b/net/mac80211/chan.c
+@@ -1916,7 +1916,7 @@ int ieee80211_link_use_reserved_context(
+ 
+ int ieee80211_link_change_bandwidth(struct ieee80211_link_data *link,
+ 				    const struct cfg80211_chan_def *chandef,
+-				    u32 *changed)
++				    u64 *changed)
+ {
+ 	struct ieee80211_sub_if_data *sdata = link->sdata;
+ 	struct ieee80211_bss_conf *link_conf = link->conf;
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -2491,7 +2491,7 @@ int ieee80211_link_unreserve_chanctx(str
+ int __must_check
+ ieee80211_link_change_bandwidth(struct ieee80211_link_data *link,
+ 				const struct cfg80211_chan_def *chandef,
+-				u32 *changed);
++				u64 *changed);
+ void ieee80211_link_release_channel(struct ieee80211_link_data *link);
+ void ieee80211_link_vlan_copy_chanctx(struct ieee80211_link_data *link);
+ void ieee80211_link_copy_chanctx_to_vlans(struct ieee80211_link_data *link,
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -8,7 +8,7 @@
+  * Copyright 2007, Michael Wu <flamingice at sourmilk.net>
+  * Copyright 2013-2014  Intel Mobile Communications GmbH
+  * Copyright (C) 2015 - 2017 Intel Deutschland GmbH
+- * Copyright (C) 2018 - 2022 Intel Corporation
++ * Copyright (C) 2018 - 2023 Intel Corporation
+  */
+ 
+ #include <linux/delay.h>
+@@ -88,6 +88,141 @@ MODULE_PARM_DESC(probe_wait_ms,
+  */
+ #define IEEE80211_SIGNAL_AVE_MIN_COUNT	4
+ 
++struct ieee80211_per_bw_puncturing_values {
++	u8 len;
++	const u16 *valid_values;
++};
++
++static const u16 puncturing_values_80mhz[] = {
++	0x8, 0x4, 0x2, 0x1
++};
++
++static const u16 puncturing_values_160mhz[] = {
++	 0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1, 0xc0, 0x30, 0xc, 0x3
++};
++
++static const u16 puncturing_values_320mhz[] = {
++	0xc000, 0x3000, 0xc00, 0x300, 0xc0, 0x30, 0xc, 0x3, 0xf000, 0xf00,
++	0xf0, 0xf, 0xfc00, 0xf300, 0xf0c0, 0xf030, 0xf00c, 0xf003, 0xc00f,
++	0x300f, 0xc0f, 0x30f, 0xcf, 0x3f
++};
++
++#define IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(_bw) \
++	{ \
++		.len = ARRAY_SIZE(puncturing_values_ ## _bw ## mhz), \
++		.valid_values = puncturing_values_ ## _bw ## mhz \
++	}
++
++static const struct ieee80211_per_bw_puncturing_values per_bw_puncturing[] = {
++	IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(80),
++	IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(160),
++	IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(320)
++};
++
++static bool ieee80211_valid_disable_subchannel_bitmap(u16 *bitmap,
++						      enum nl80211_chan_width bw)
++{
++	u32 idx, i;
++
++	switch (bw) {
++	case NL80211_CHAN_WIDTH_80:
++		idx = 0;
++		break;
++	case NL80211_CHAN_WIDTH_160:
++		idx = 1;
++		break;
++	case NL80211_CHAN_WIDTH_320:
++		idx = 2;
++		break;
++	default:
++		*bitmap = 0;
++		break;
++	}
++
++	if (!*bitmap)
++		return true;
++
++	for (i = 0; i < per_bw_puncturing[idx].len; i++)
++		if (per_bw_puncturing[idx].valid_values[i] == *bitmap)
++			return true;
++
++	return false;
++}
++
++/*
++ * Extract from the given disabled subchannel bitmap (raw format
++ * from the EHT Operation Element) the bits for the subchannel
++ * we're using right now.
++ */
++static u16
++ieee80211_extract_dis_subch_bmap(const struct ieee80211_eht_operation *eht_oper,
++				 struct cfg80211_chan_def *chandef, u16 bitmap)
++{
++	struct ieee80211_eht_operation_info *info = (void *)eht_oper->optional;
++	struct cfg80211_chan_def ap_chandef = *chandef;
++	u32 ap_center_freq, local_center_freq;
++	u32 ap_bw, local_bw;
++	int ap_start_freq, local_start_freq;
++	u16 shift, mask;
++
++	if (!(eht_oper->params & IEEE80211_EHT_OPER_INFO_PRESENT) ||
++	    !(eht_oper->params &
++	      IEEE80211_EHT_OPER_DISABLED_SUBCHANNEL_BITMAP_PRESENT))
++		return 0;
++
++	/* set 160/320 supported to get the full AP definition */
++	ieee80211_chandef_eht_oper(eht_oper, true, true, &ap_chandef);
++	ap_center_freq = ap_chandef.center_freq1;
++	ap_bw = 20 * BIT(u8_get_bits(info->control,
++				     IEEE80211_EHT_OPER_CHAN_WIDTH));
++	ap_start_freq = ap_center_freq - ap_bw / 2;
++	local_center_freq = chandef->center_freq1;
++	local_bw = 20 * BIT(ieee80211_chan_width_to_rx_bw(chandef->width));
++	local_start_freq = local_center_freq - local_bw / 2;
++	shift = (local_start_freq - ap_start_freq) / 20;
++	mask = BIT(local_bw / 20) - 1;
++
++	return (bitmap >> shift) & mask;
++}
++
++/*
++ * Handle the puncturing bitmap, possibly downgrading bandwidth to get a
++ * valid bitmap.
++ */
++static void
++ieee80211_handle_puncturing_bitmap(struct ieee80211_link_data *link,
++				   const struct ieee80211_eht_operation *eht_oper,
++				   u16 bitmap, u64 *changed)
++{
++	struct cfg80211_chan_def *chandef = &link->conf->chandef;
++	u16 extracted;
++	u64 _changed = 0;
++
++	if (!changed)
++		changed = &_changed;
++
++	while (chandef->width > NL80211_CHAN_WIDTH_40) {
++		extracted =
++			ieee80211_extract_dis_subch_bmap(eht_oper, chandef,
++							 bitmap);
++
++		if (ieee80211_valid_disable_subchannel_bitmap(&bitmap,
++							      chandef->width))
++			break;
++		link->u.mgd.conn_flags |=
++			ieee80211_chandef_downgrade(chandef);
++		*changed |= BSS_CHANGED_BANDWIDTH;
++	}
++
++	if (chandef->width <= NL80211_CHAN_WIDTH_40)
++		extracted = 0;
++
++	if (link->conf->eht_puncturing != extracted) {
++		link->conf->eht_puncturing = extracted;
++		*changed |= BSS_CHANGED_EHT_PUNCTURING;
++	}
++}
++
+ /*
+  * We can have multiple work items (and connection probing)
+  * scheduling this timer, but we need to take care to only
+@@ -413,7 +548,7 @@ static int ieee80211_config_bw(struct ie
+ 			       const struct ieee80211_he_operation *he_oper,
+ 			       const struct ieee80211_eht_operation *eht_oper,
+ 			       const struct ieee80211_s1g_oper_ie *s1g_oper,
+-			       const u8 *bssid, u32 *changed)
++			       const u8 *bssid, u64 *changed)
+ {
+ 	struct ieee80211_sub_if_data *sdata = link->sdata;
+ 	struct ieee80211_local *local = sdata->local;
+@@ -4111,6 +4246,7 @@ static bool ieee80211_assoc_config_link(
+ 							    link_sta);
+ 
+ 			bss_conf->eht_support = link_sta->pub->eht_cap.has_eht;
++			*changed |= BSS_CHANGED_EHT_PUNCTURING;
+ 		} else {
+ 			bss_conf->eht_support = false;
+ 		}
+@@ -5423,6 +5559,45 @@ static bool ieee80211_rx_our_beacon(cons
+ 	return ether_addr_equal(tx_bssid, bss->transmitted_bss->bssid);
+ }
+ 
++static bool ieee80211_config_puncturing(struct ieee80211_link_data *link,
++					const struct ieee80211_eht_operation *eht_oper,
++					u64 *changed)
++{
++	u16 bitmap = 0, extracted;
++
++	if ((eht_oper->params & IEEE80211_EHT_OPER_INFO_PRESENT) &&
++	    (eht_oper->params &
++	     IEEE80211_EHT_OPER_DISABLED_SUBCHANNEL_BITMAP_PRESENT)) {
++		const struct ieee80211_eht_operation_info *info =
++			(void *)eht_oper->optional;
++		const u8 *disable_subchannel_bitmap = info->optional;
++
++		bitmap = get_unaligned_le16(disable_subchannel_bitmap);
++	}
++
++	extracted = ieee80211_extract_dis_subch_bmap(eht_oper,
++						     &link->conf->chandef,
++						     bitmap);
++
++	/* accept if there are no changes */
++	if (!(*changed & BSS_CHANGED_BANDWIDTH) &&
++	    extracted == link->conf->eht_puncturing)
++		return true;
++
++	if (!ieee80211_valid_disable_subchannel_bitmap(&bitmap,
++						       link->conf->chandef.width)) {
++		link_info(link,
++			  "Got an invalid disable subchannel bitmap from AP %pM: bitmap = 0x%x, bw = 0x%x. disconnect\n",
++			  link->u.mgd.bssid,
++			  bitmap,
++			  link->conf->chandef.width);
++		return false;
++	}
++
++	ieee80211_handle_puncturing_bitmap(link, eht_oper, bitmap, changed);
++	return true;
++}
++
+ static void ieee80211_rx_mgmt_beacon(struct ieee80211_link_data *link,
+ 				     struct ieee80211_hdr *hdr, size_t len,
+ 				     struct ieee80211_rx_status *rx_status)
+@@ -5439,7 +5614,7 @@ static void ieee80211_rx_mgmt_beacon(str
+ 	struct ieee80211_channel *chan;
+ 	struct link_sta_info *link_sta;
+ 	struct sta_info *sta;
+-	u32 changed = 0;
++	u64 changed = 0;
+ 	bool erp_valid;
+ 	u8 erp_value = 0;
+ 	u32 ncrc = 0;
+@@ -5731,6 +5906,21 @@ static void ieee80211_rx_mgmt_beacon(str
+ 					       elems->pwr_constr_elem,
+ 					       elems->cisco_dtpc_elem);
+ 
++	if (elems->eht_operation &&
++	    !(link->u.mgd.conn_flags & IEEE80211_CONN_DISABLE_EHT)) {
++		if (!ieee80211_config_puncturing(link, elems->eht_operation,
++						 &changed)) {
++			ieee80211_set_disassoc(sdata, IEEE80211_STYPE_DEAUTH,
++					       WLAN_REASON_DEAUTH_LEAVING,
++					       true, deauth_buf);
++			ieee80211_report_disconnect(sdata, deauth_buf,
++						    sizeof(deauth_buf), true,
++						    WLAN_REASON_DEAUTH_LEAVING,
++						    false);
++			goto free;
++		}
++	}
++
+ 	ieee80211_link_info_change_notify(sdata, link, changed);
+ free:
+ 	kfree(elems);
+@@ -6832,9 +7022,12 @@ ieee80211_setup_assoc_link(struct ieee80
+ 		ieee80211_apply_htcap_overrides(sdata, &sta_ht_cap);
+ 	}
+ 
++	link->conf->eht_puncturing = 0;
++
+ 	rcu_read_lock();
+ 	beacon_ies = rcu_dereference(cbss->beacon_ies);
+ 	if (beacon_ies) {
++		const struct ieee80211_eht_operation *eht_oper;
+ 		const struct element *elem;
+ 		u8 dtim_count = 0;
+ 
+@@ -6863,6 +7056,31 @@ ieee80211_setup_assoc_link(struct ieee80
+ 			link->conf->ema_ap = true;
+ 		else
+ 			link->conf->ema_ap = false;
++
++		elem = cfg80211_find_ext_elem(WLAN_EID_EXT_EHT_OPERATION,
++					      beacon_ies->data, beacon_ies->len);
++		eht_oper = (const void *)(elem->data + 1);
++
++		if (elem &&
++		    ieee80211_eht_oper_size_ok((const void *)(elem->data + 1),
++					       elem->datalen - 1) &&
++		    (eht_oper->params & IEEE80211_EHT_OPER_INFO_PRESENT) &&
++		    (eht_oper->params & IEEE80211_EHT_OPER_DISABLED_SUBCHANNEL_BITMAP_PRESENT)) {
++			const struct ieee80211_eht_operation_info *info =
++				(void *)eht_oper->optional;
++			const u8 *disable_subchannel_bitmap = info->optional;
++			u16 bitmap;
++
++			bitmap = get_unaligned_le16(disable_subchannel_bitmap);
++			if (ieee80211_valid_disable_subchannel_bitmap(&bitmap,
++								      link->conf->chandef.width))
++				ieee80211_handle_puncturing_bitmap(link,
++								   eht_oper,
++								   bitmap,
++								   NULL);
++			else
++				conn_flags |= IEEE80211_CONN_DISABLE_EHT;
++		}
+ 	}
+ 	rcu_read_unlock();
+ 
diff --git a/package/kernel/mac80211/patches/subsys/344-v6.3-0001-wifi-cfg80211-move-puncturing-bitmap-validation-from.patch b/package/kernel/mac80211/patches/subsys/344-v6.3-0001-wifi-cfg80211-move-puncturing-bitmap-validation-from.patch
new file mode 100644
index 0000000000..31bc86197e
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/344-v6.3-0001-wifi-cfg80211-move-puncturing-bitmap-validation-from.patch
@@ -0,0 +1,219 @@
+From b25413fed3d43e1ed3340df4d928971bb8639f66 Mon Sep 17 00:00:00 2001
+From: Aloka Dixit <quic_alokad at quicinc.com>
+Date: Mon, 30 Jan 2023 16:12:24 -0800
+Subject: [PATCH] wifi: cfg80211: move puncturing bitmap validation from
+ mac80211
+
+- Move ieee80211_valid_disable_subchannel_bitmap() from mlme.c to
+  chan.c, rename it as cfg80211_valid_disable_subchannel_bitmap()
+  and export it.
+- Modify the prototype to include struct cfg80211_chan_def instead
+  of only bandwidth to support a check which returns false if the
+  primary channel is punctured.
+
+Signed-off-by: Aloka Dixit <quic_alokad at quicinc.com>
+Link: https://lore.kernel.org/r/20230131001227.25014-2-quic_alokad at quicinc.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ include/net/cfg80211.h | 12 +++++++
+ net/mac80211/mlme.c    | 73 ++++--------------------------------------
+ net/wireless/chan.c    | 69 +++++++++++++++++++++++++++++++++++++++
+ 3 files changed, 87 insertions(+), 67 deletions(-)
+
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -8951,4 +8951,16 @@ static inline int cfg80211_color_change_
+ 					 0, 0);
+ }
+ 
++/**
++ * cfg80211_valid_disable_subchannel_bitmap - validate puncturing bitmap
++ * @bitmap: bitmap to be validated
++ * @chandef: channel definition
++ *
++ * Validate the puncturing bitmap.
++ *
++ * Return: %true if the bitmap is valid. %false otherwise.
++ */
++bool cfg80211_valid_disable_subchannel_bitmap(u16 *bitmap,
++					      const struct cfg80211_chan_def *chandef);
++
+ #endif /* __NET_CFG80211_H */
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -88,67 +88,6 @@ MODULE_PARM_DESC(probe_wait_ms,
+  */
+ #define IEEE80211_SIGNAL_AVE_MIN_COUNT	4
+ 
+-struct ieee80211_per_bw_puncturing_values {
+-	u8 len;
+-	const u16 *valid_values;
+-};
+-
+-static const u16 puncturing_values_80mhz[] = {
+-	0x8, 0x4, 0x2, 0x1
+-};
+-
+-static const u16 puncturing_values_160mhz[] = {
+-	 0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1, 0xc0, 0x30, 0xc, 0x3
+-};
+-
+-static const u16 puncturing_values_320mhz[] = {
+-	0xc000, 0x3000, 0xc00, 0x300, 0xc0, 0x30, 0xc, 0x3, 0xf000, 0xf00,
+-	0xf0, 0xf, 0xfc00, 0xf300, 0xf0c0, 0xf030, 0xf00c, 0xf003, 0xc00f,
+-	0x300f, 0xc0f, 0x30f, 0xcf, 0x3f
+-};
+-
+-#define IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(_bw) \
+-	{ \
+-		.len = ARRAY_SIZE(puncturing_values_ ## _bw ## mhz), \
+-		.valid_values = puncturing_values_ ## _bw ## mhz \
+-	}
+-
+-static const struct ieee80211_per_bw_puncturing_values per_bw_puncturing[] = {
+-	IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(80),
+-	IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(160),
+-	IEEE80211_PER_BW_VALID_PUNCTURING_VALUES(320)
+-};
+-
+-static bool ieee80211_valid_disable_subchannel_bitmap(u16 *bitmap,
+-						      enum nl80211_chan_width bw)
+-{
+-	u32 idx, i;
+-
+-	switch (bw) {
+-	case NL80211_CHAN_WIDTH_80:
+-		idx = 0;
+-		break;
+-	case NL80211_CHAN_WIDTH_160:
+-		idx = 1;
+-		break;
+-	case NL80211_CHAN_WIDTH_320:
+-		idx = 2;
+-		break;
+-	default:
+-		*bitmap = 0;
+-		break;
+-	}
+-
+-	if (!*bitmap)
+-		return true;
+-
+-	for (i = 0; i < per_bw_puncturing[idx].len; i++)
+-		if (per_bw_puncturing[idx].valid_values[i] == *bitmap)
+-			return true;
+-
+-	return false;
+-}
+-
+ /*
+  * Extract from the given disabled subchannel bitmap (raw format
+  * from the EHT Operation Element) the bits for the subchannel
+@@ -206,8 +145,8 @@ ieee80211_handle_puncturing_bitmap(struc
+ 			ieee80211_extract_dis_subch_bmap(eht_oper, chandef,
+ 							 bitmap);
+ 
+-		if (ieee80211_valid_disable_subchannel_bitmap(&bitmap,
+-							      chandef->width))
++		if (cfg80211_valid_disable_subchannel_bitmap(&bitmap,
++							     chandef))
+ 			break;
+ 		link->u.mgd.conn_flags |=
+ 			ieee80211_chandef_downgrade(chandef);
+@@ -5584,8 +5523,8 @@ static bool ieee80211_config_puncturing(
+ 	    extracted == link->conf->eht_puncturing)
+ 		return true;
+ 
+-	if (!ieee80211_valid_disable_subchannel_bitmap(&bitmap,
+-						       link->conf->chandef.width)) {
++	if (!cfg80211_valid_disable_subchannel_bitmap(&bitmap,
++						      &link->conf->chandef)) {
+ 		link_info(link,
+ 			  "Got an invalid disable subchannel bitmap from AP %pM: bitmap = 0x%x, bw = 0x%x. disconnect\n",
+ 			  link->u.mgd.bssid,
+@@ -7072,8 +7011,8 @@ ieee80211_setup_assoc_link(struct ieee80
+ 			u16 bitmap;
+ 
+ 			bitmap = get_unaligned_le16(disable_subchannel_bitmap);
+-			if (ieee80211_valid_disable_subchannel_bitmap(&bitmap,
+-								      link->conf->chandef.width))
++			if (cfg80211_valid_disable_subchannel_bitmap(&bitmap,
++								     &link->conf->chandef))
+ 				ieee80211_handle_puncturing_bitmap(link,
+ 								   eht_oper,
+ 								   bitmap,
+--- a/net/wireless/chan.c
++++ b/net/wireless/chan.c
+@@ -1505,3 +1505,72 @@ struct cfg80211_chan_def *wdev_chandef(s
+ 	}
+ }
+ EXPORT_SYMBOL(wdev_chandef);
++
++struct cfg80211_per_bw_puncturing_values {
++	u8 len;
++	const u16 *valid_values;
++};
++
++static const u16 puncturing_values_80mhz[] = {
++	0x8, 0x4, 0x2, 0x1
++};
++
++static const u16 puncturing_values_160mhz[] = {
++	 0x80, 0x40, 0x20, 0x10, 0x8, 0x4, 0x2, 0x1, 0xc0, 0x30, 0xc, 0x3
++};
++
++static const u16 puncturing_values_320mhz[] = {
++	0xc000, 0x3000, 0xc00, 0x300, 0xc0, 0x30, 0xc, 0x3, 0xf000, 0xf00,
++	0xf0, 0xf, 0xfc00, 0xf300, 0xf0c0, 0xf030, 0xf00c, 0xf003, 0xc00f,
++	0x300f, 0xc0f, 0x30f, 0xcf, 0x3f
++};
++
++#define CFG80211_PER_BW_VALID_PUNCTURING_VALUES(_bw) \
++	{ \
++		.len = ARRAY_SIZE(puncturing_values_ ## _bw ## mhz), \
++		.valid_values = puncturing_values_ ## _bw ## mhz \
++	}
++
++static const struct cfg80211_per_bw_puncturing_values per_bw_puncturing[] = {
++	CFG80211_PER_BW_VALID_PUNCTURING_VALUES(80),
++	CFG80211_PER_BW_VALID_PUNCTURING_VALUES(160),
++	CFG80211_PER_BW_VALID_PUNCTURING_VALUES(320)
++};
++
++bool cfg80211_valid_disable_subchannel_bitmap(u16 *bitmap,
++					      const struct cfg80211_chan_def *chandef)
++{
++	u32 idx, i, start_freq;
++
++	switch (chandef->width) {
++	case NL80211_CHAN_WIDTH_80:
++		idx = 0;
++		start_freq = chandef->center_freq1 - 40;
++		break;
++	case NL80211_CHAN_WIDTH_160:
++		idx = 1;
++		start_freq = chandef->center_freq1 - 80;
++		break;
++	case NL80211_CHAN_WIDTH_320:
++		idx = 2;
++		start_freq = chandef->center_freq1 - 160;
++		break;
++	default:
++		*bitmap = 0;
++		break;
++	}
++
++	if (!*bitmap)
++		return true;
++
++	/* check if primary channel is punctured */
++	if (*bitmap & (u16)BIT((chandef->chan->center_freq - start_freq) / 20))
++		return false;
++
++	for (i = 0; i < per_bw_puncturing[idx].len; i++)
++		if (per_bw_puncturing[idx].valid_values[i] == *bitmap)
++			return true;
++
++	return false;
++}
++EXPORT_SYMBOL(cfg80211_valid_disable_subchannel_bitmap);
diff --git a/package/kernel/mac80211/patches/subsys/344-v6.3-0002-wifi-nl80211-validate-and-configure-puncturing-bitma.patch b/package/kernel/mac80211/patches/subsys/344-v6.3-0002-wifi-nl80211-validate-and-configure-puncturing-bitma.patch
new file mode 100644
index 0000000000..6a84feeeba
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/344-v6.3-0002-wifi-nl80211-validate-and-configure-puncturing-bitma.patch
@@ -0,0 +1,169 @@
+From d7c1a9a0ed180d8884798ce97afe7283622a484f Mon Sep 17 00:00:00 2001
+From: Aloka Dixit <quic_alokad at quicinc.com>
+Date: Mon, 30 Jan 2023 16:12:25 -0800
+Subject: [PATCH] wifi: nl80211: validate and configure puncturing bitmap
+
+- New feature flag, NL80211_EXT_FEATURE_PUNCT, to advertise
+  driver support for preamble puncturing in AP mode.
+- New attribute, NL80211_ATTR_PUNCT_BITMAP, to receive a puncturing
+  bitmap from the userspace during AP bring up (NL80211_CMD_START_AP)
+  and channel switch (NL80211_CMD_CHANNEL_SWITCH) operations. Each bit
+  corresponds to a 20 MHz channel in the operating bandwidth, lowest
+  bit for the lowest channel. Bit set to 1 indicates that the channel
+  is punctured. Higher 16 bits are reserved.
+- New members added to structures cfg80211_ap_settings and
+  cfg80211_csa_settings to propagate the bitmap to the driver after
+  validation.
+
+Signed-off-by: Aloka Dixit <quic_alokad at quicinc.com>
+Signed-off-by: Muna Sinada <quic_msinada at quicinc.com>
+Link: https://lore.kernel.org/r/20230131001227.25014-3-quic_alokad at quicinc.com
+[move validation against 0xffff into policy]
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ include/net/cfg80211.h       |  8 ++++++++
+ include/uapi/linux/nl80211.h | 11 +++++++++++
+ net/wireless/nl80211.c       | 32 ++++++++++++++++++++++++++++++++
+ 3 files changed, 51 insertions(+)
+
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -1330,6 +1330,9 @@ struct cfg80211_unsol_bcast_probe_resp {
+  * @fils_discovery: FILS discovery transmission parameters
+  * @unsol_bcast_probe_resp: Unsolicited broadcast probe response parameters
+  * @mbssid_config: AP settings for multiple bssid
++ * @punct_bitmap: Preamble puncturing bitmap. Each bit represents
++ *	a 20 MHz channel, lowest bit corresponding to the lowest channel.
++ *	Bit set to 1 indicates that the channel is punctured.
+  */
+ struct cfg80211_ap_settings {
+ 	struct cfg80211_chan_def chandef;
+@@ -1364,6 +1367,7 @@ struct cfg80211_ap_settings {
+ 	struct cfg80211_fils_discovery fils_discovery;
+ 	struct cfg80211_unsol_bcast_probe_resp unsol_bcast_probe_resp;
+ 	struct cfg80211_mbssid_config mbssid_config;
++	u16 punct_bitmap;
+ };
+ 
+ /**
+@@ -1381,6 +1385,9 @@ struct cfg80211_ap_settings {
+  * @radar_required: whether radar detection is required on the new channel
+  * @block_tx: whether transmissions should be blocked while changing
+  * @count: number of beacons until switch
++ * @punct_bitmap: Preamble puncturing bitmap. Each bit represents
++ *	a 20 MHz channel, lowest bit corresponding to the lowest channel.
++ *	Bit set to 1 indicates that the channel is punctured.
+  */
+ struct cfg80211_csa_settings {
+ 	struct cfg80211_chan_def chandef;
+@@ -1393,6 +1400,7 @@ struct cfg80211_csa_settings {
+ 	bool radar_required;
+ 	bool block_tx;
+ 	u8 count;
++	u16 punct_bitmap;
+ };
+ 
+ /**
+--- a/include/uapi/linux/nl80211.h
++++ b/include/uapi/linux/nl80211.h
+@@ -2751,6 +2751,12 @@ enum nl80211_commands {
+  *	the incoming frame RX timestamp.
+  * @NL80211_ATTR_TD_BITMAP: Transition Disable bitmap, for subsequent
+  *	(re)associations.
++ *
++ * @NL80211_ATTR_PUNCT_BITMAP: (u32) Preamble puncturing bitmap, lowest
++ *	bit corresponds to the lowest 20 MHz channel. Each bit set to 1
++ *	indicates that the sub-channel is punctured. Higher 16 bits are
++ *	reserved.
++ *
+  * @NUM_NL80211_ATTR: total number of nl80211_attrs available
+  * @NL80211_ATTR_MAX: highest attribute number currently defined
+  * @__NL80211_ATTR_AFTER_LAST: internal use
+@@ -3280,6 +3286,8 @@ enum nl80211_attrs {
+ 	NL80211_ATTR_RX_HW_TIMESTAMP,
+ 	NL80211_ATTR_TD_BITMAP,
+ 
++	NL80211_ATTR_PUNCT_BITMAP,
++
+ 	/* add attributes here, update the policy in nl80211.c */
+ 
+ 	__NL80211_ATTR_AFTER_LAST,
+@@ -6294,6 +6302,8 @@ enum nl80211_feature_flags {
+  *	might apply, e.g. no scans in progress, no offchannel operations
+  *	in progress, and no active connections.
+  *
++ * @NL80211_EXT_FEATURE_PUNCT: Driver supports preamble puncturing in AP mode.
++ *
+  * @NUM_NL80211_EXT_FEATURES: number of extended features.
+  * @MAX_NL80211_EXT_FEATURES: highest extended feature index.
+  */
+@@ -6362,6 +6372,7 @@ enum nl80211_ext_feature_index {
+ 	NL80211_EXT_FEATURE_FILS_CRYPTO_OFFLOAD,
+ 	NL80211_EXT_FEATURE_RADAR_BACKGROUND,
+ 	NL80211_EXT_FEATURE_POWERED_ADDR_CHANGE,
++	NL80211_EXT_FEATURE_PUNCT,
+ 
+ 	/* add new features before the definition below */
+ 	NUM_NL80211_EXT_FEATURES,
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -799,6 +799,7 @@ static const struct nla_policy nl80211_p
+ 	[NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN),
+ 	[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
+ 	[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
++	[NL80211_ATTR_PUNCT_BITMAP] = NLA_POLICY_RANGE(NLA_U8, 0, 0xffff),
+ };
+ 
+ /* policy for the key attributes */
+@@ -3167,6 +3168,21 @@ static bool nl80211_can_set_dev_channel(
+ 		wdev->iftype == NL80211_IFTYPE_P2P_GO;
+ }
+ 
++static int nl80211_parse_punct_bitmap(struct cfg80211_registered_device *rdev,
++				      struct genl_info *info,
++				      const struct cfg80211_chan_def *chandef,
++				      u16 *punct_bitmap)
++{
++	if (!wiphy_ext_feature_isset(&rdev->wiphy, NL80211_EXT_FEATURE_PUNCT))
++		return -EINVAL;
++
++	*punct_bitmap = nla_get_u32(info->attrs[NL80211_ATTR_PUNCT_BITMAP]);
++	if (!cfg80211_valid_disable_subchannel_bitmap(punct_bitmap, chandef))
++		return -EINVAL;
++
++	return 0;
++}
++
+ int nl80211_parse_chandef(struct cfg80211_registered_device *rdev,
+ 			  struct genl_info *info,
+ 			  struct cfg80211_chan_def *chandef)
+@@ -5912,6 +5928,14 @@ static int nl80211_start_ap(struct sk_bu
+ 		goto out;
+ 	}
+ 
++	if (info->attrs[NL80211_ATTR_PUNCT_BITMAP]) {
++		err = nl80211_parse_punct_bitmap(rdev, info,
++						 &params->chandef,
++						 &params->punct_bitmap);
++		if (err)
++			goto out;
++	}
++
+ 	if (!cfg80211_reg_can_beacon_relax(&rdev->wiphy, &params->chandef,
+ 					   wdev->iftype)) {
+ 		err = -EINVAL;
+@@ -10050,6 +10074,14 @@ skip_beacons:
+ 	if (info->attrs[NL80211_ATTR_CH_SWITCH_BLOCK_TX])
+ 		params.block_tx = true;
+ 
++	if (info->attrs[NL80211_ATTR_PUNCT_BITMAP]) {
++		err = nl80211_parse_punct_bitmap(rdev, info,
++						 &params.chandef,
++						 &params.punct_bitmap);
++		if (err)
++			goto free;
++	}
++
+ 	wdev_lock(wdev);
+ 	err = rdev_channel_switch(rdev, dev, &params);
+ 	wdev_unlock(wdev);
diff --git a/package/kernel/mac80211/patches/subsys/344-v6.3-0003-wifi-cfg80211-include-puncturing-bitmap-in-channel-s.patch b/package/kernel/mac80211/patches/subsys/344-v6.3-0003-wifi-cfg80211-include-puncturing-bitmap-in-channel-s.patch
new file mode 100644
index 0000000000..e3872f31f3
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/344-v6.3-0003-wifi-cfg80211-include-puncturing-bitmap-in-channel-s.patch
@@ -0,0 +1,263 @@
+From b345f0637c0042f9e6b78378a32256d90f485774 Mon Sep 17 00:00:00 2001
+From: Aloka Dixit <quic_alokad at quicinc.com>
+Date: Mon, 30 Jan 2023 16:12:26 -0800
+Subject: [PATCH] wifi: cfg80211: include puncturing bitmap in channel switch
+ events
+
+Add puncturing bitmap in channel switch notifications
+and corresponding trace functions.
+
+Signed-off-by: Aloka Dixit <quic_alokad at quicinc.com>
+Link: https://lore.kernel.org/r/20230131001227.25014-4-quic_alokad at quicinc.com
+[fix qtnfmac]
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ drivers/net/wireless/ath/ath6kl/cfg80211.c    |  2 +-
+ drivers/net/wireless/marvell/mwifiex/11h.c    |  2 +-
+ .../net/wireless/quantenna/qtnfmac/event.c    |  2 +-
+ include/net/cfg80211.h                        |  6 +++--
+ net/mac80211/cfg.c                            |  5 ++--
+ net/mac80211/mlme.c                           |  4 ++--
+ net/wireless/nl80211.c                        | 20 ++++++++++------
+ net/wireless/trace.h                          | 24 ++++++++++++-------
+ 8 files changed, 41 insertions(+), 24 deletions(-)
+
+--- a/drivers/net/wireless/ath/ath6kl/cfg80211.c
++++ b/drivers/net/wireless/ath/ath6kl/cfg80211.c
+@@ -1119,7 +1119,7 @@ void ath6kl_cfg80211_ch_switch_notify(st
+ 					NL80211_CHAN_HT20 : NL80211_CHAN_NO_HT);
+ 
+ 	mutex_lock(&vif->wdev.mtx);
+-	cfg80211_ch_switch_notify(vif->ndev, &chandef, 0);
++	cfg80211_ch_switch_notify(vif->ndev, &chandef, 0, 0);
+ 	mutex_unlock(&vif->wdev.mtx);
+ }
+ 
+--- a/drivers/net/wireless/marvell/mwifiex/11h.c
++++ b/drivers/net/wireless/marvell/mwifiex/11h.c
+@@ -292,6 +292,6 @@ void mwifiex_dfs_chan_sw_work_queue(stru
+ 	mwifiex_dbg(priv->adapter, MSG,
+ 		    "indicating channel switch completion to kernel\n");
+ 	mutex_lock(&priv->wdev.mtx);
+-	cfg80211_ch_switch_notify(priv->netdev, &priv->dfs_chandef, 0);
++	cfg80211_ch_switch_notify(priv->netdev, &priv->dfs_chandef, 0, 0);
+ 	mutex_unlock(&priv->wdev.mtx);
+ }
+--- a/drivers/net/wireless/quantenna/qtnfmac/event.c
++++ b/drivers/net/wireless/quantenna/qtnfmac/event.c
+@@ -478,7 +478,7 @@ qtnf_event_handle_freq_change(struct qtn
+ 			continue;
+ 
+ 		mutex_lock(&vif->wdev.mtx);
+-		cfg80211_ch_switch_notify(vif->netdev, &chandef, 0);
++		cfg80211_ch_switch_notify(vif->netdev, &chandef, 0, 0);
+ 		mutex_unlock(&vif->wdev.mtx);
+ 	}
+ 
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -8325,13 +8325,14 @@ bool cfg80211_reg_can_beacon_relax(struc
+  * @dev: the device which switched channels
+  * @chandef: the new channel definition
+  * @link_id: the link ID for MLO, must be 0 for non-MLO
++ * @punct_bitmap: the new puncturing bitmap
+  *
+  * Caller must acquire wdev_lock, therefore must only be called from sleepable
+  * driver context!
+  */
+ void cfg80211_ch_switch_notify(struct net_device *dev,
+ 			       struct cfg80211_chan_def *chandef,
+-			       unsigned int link_id);
++			       unsigned int link_id, u16 punct_bitmap);
+ 
+ /*
+  * cfg80211_ch_switch_started_notify - notify channel switch start
+@@ -8340,6 +8341,7 @@ void cfg80211_ch_switch_notify(struct ne
+  * @link_id: the link ID for MLO, must be 0 for non-MLO
+  * @count: the number of TBTTs until the channel switch happens
+  * @quiet: whether or not immediate quiet was requested by the AP
++ * @punct_bitmap: the future puncturing bitmap
+  *
+  * Inform the userspace about the channel switch that has just
+  * started, so that it can take appropriate actions (eg. starting
+@@ -8348,7 +8350,7 @@ void cfg80211_ch_switch_notify(struct ne
+ void cfg80211_ch_switch_started_notify(struct net_device *dev,
+ 				       struct cfg80211_chan_def *chandef,
+ 				       unsigned int link_id, u8 count,
+-				       bool quiet);
++				       bool quiet, u16 punct_bitmap);
+ 
+ /**
+  * ieee80211_operating_class_to_band - convert operating class to band
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -3600,7 +3600,8 @@ static int __ieee80211_csa_finalize(stru
+ 	if (err)
+ 		return err;
+ 
+-	cfg80211_ch_switch_notify(sdata->dev, &sdata->deflink.csa_chandef, 0);
++	cfg80211_ch_switch_notify(sdata->dev, &sdata->deflink.csa_chandef, 0,
++				  0);
+ 
+ 	return 0;
+ }
+@@ -3872,7 +3873,7 @@ __ieee80211_channel_switch(struct wiphy
+ 
+ 	cfg80211_ch_switch_started_notify(sdata->dev,
+ 					  &sdata->deflink.csa_chandef, 0,
+-					  params->count, params->block_tx);
++					  params->count, params->block_tx, 0);
+ 
+ 	if (changed) {
+ 		ieee80211_link_info_change_notify(sdata, &sdata->deflink,
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -1778,7 +1778,7 @@ static void ieee80211_chswitch_post_beac
+ 		return;
+ 	}
+ 
+-	cfg80211_ch_switch_notify(sdata->dev, &link->reserved_chandef, 0);
++	cfg80211_ch_switch_notify(sdata->dev, &link->reserved_chandef, 0, 0);
+ }
+ 
+ void ieee80211_chswitch_done(struct ieee80211_vif *vif, bool success)
+@@ -1988,7 +1988,7 @@ ieee80211_sta_process_chanswitch(struct
+ 	mutex_unlock(&local->mtx);
+ 
+ 	cfg80211_ch_switch_started_notify(sdata->dev, &csa_ie.chandef, 0,
+-					  csa_ie.count, csa_ie.mode);
++					  csa_ie.count, csa_ie.mode, 0);
+ 
+ 	if (local->ops->channel_switch) {
+ 		/* use driver's channel switch callback */
+--- a/net/wireless/nl80211.c
++++ b/net/wireless/nl80211.c
+@@ -18973,7 +18973,7 @@ static void nl80211_ch_switch_notify(str
+ 				     struct cfg80211_chan_def *chandef,
+ 				     gfp_t gfp,
+ 				     enum nl80211_commands notif,
+-				     u8 count, bool quiet)
++				     u8 count, bool quiet, u16 punct_bitmap)
+ {
+ 	struct wireless_dev *wdev = netdev->ieee80211_ptr;
+ 	struct sk_buff *msg;
+@@ -19007,6 +19007,9 @@ static void nl80211_ch_switch_notify(str
+ 			goto nla_put_failure;
+ 	}
+ 
++	if (nla_put_u32(msg, NL80211_ATTR_PUNCT_BITMAP, punct_bitmap))
++		goto nla_put_failure;
++
+ 	genlmsg_end(msg, hdr);
+ 
+ 	genlmsg_multicast_netns(&nl80211_fam, wiphy_net(&rdev->wiphy), msg, 0,
+@@ -19019,7 +19022,7 @@ static void nl80211_ch_switch_notify(str
+ 
+ void cfg80211_ch_switch_notify(struct net_device *dev,
+ 			       struct cfg80211_chan_def *chandef,
+-			       unsigned int link_id)
++			       unsigned int link_id, u16 punct_bitmap)
+ {
+ 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+ 	struct wiphy *wiphy = wdev->wiphy;
+@@ -19028,7 +19031,7 @@ void cfg80211_ch_switch_notify(struct ne
+ 	ASSERT_WDEV_LOCK(wdev);
+ 	WARN_INVALID_LINK_ID(wdev, link_id);
+ 
+-	trace_cfg80211_ch_switch_notify(dev, chandef, link_id);
++	trace_cfg80211_ch_switch_notify(dev, chandef, link_id, punct_bitmap);
+ 
+ 	switch (wdev->iftype) {
+ 	case NL80211_IFTYPE_STATION:
+@@ -19056,14 +19059,15 @@ void cfg80211_ch_switch_notify(struct ne
+ 	cfg80211_sched_dfs_chan_update(rdev);
+ 
+ 	nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL,
+-				 NL80211_CMD_CH_SWITCH_NOTIFY, 0, false);
++				 NL80211_CMD_CH_SWITCH_NOTIFY, 0, false,
++				 punct_bitmap);
+ }
+ EXPORT_SYMBOL(cfg80211_ch_switch_notify);
+ 
+ void cfg80211_ch_switch_started_notify(struct net_device *dev,
+ 				       struct cfg80211_chan_def *chandef,
+ 				       unsigned int link_id, u8 count,
+-				       bool quiet)
++				       bool quiet, u16 punct_bitmap)
+ {
+ 	struct wireless_dev *wdev = dev->ieee80211_ptr;
+ 	struct wiphy *wiphy = wdev->wiphy;
+@@ -19072,11 +19076,13 @@ void cfg80211_ch_switch_started_notify(s
+ 	ASSERT_WDEV_LOCK(wdev);
+ 	WARN_INVALID_LINK_ID(wdev, link_id);
+ 
+-	trace_cfg80211_ch_switch_started_notify(dev, chandef, link_id);
++	trace_cfg80211_ch_switch_started_notify(dev, chandef, link_id,
++						punct_bitmap);
++
+ 
+ 	nl80211_ch_switch_notify(rdev, dev, link_id, chandef, GFP_KERNEL,
+ 				 NL80211_CMD_CH_SWITCH_STARTED_NOTIFY,
+-				 count, quiet);
++				 count, quiet, punct_bitmap);
+ }
+ EXPORT_SYMBOL(cfg80211_ch_switch_started_notify);
+ 
+--- a/net/wireless/trace.h
++++ b/net/wireless/trace.h
+@@ -3245,39 +3245,47 @@ TRACE_EVENT(cfg80211_chandef_dfs_require
+ TRACE_EVENT(cfg80211_ch_switch_notify,
+ 	TP_PROTO(struct net_device *netdev,
+ 		 struct cfg80211_chan_def *chandef,
+-		 unsigned int link_id),
+-	TP_ARGS(netdev, chandef, link_id),
++		 unsigned int link_id,
++		 u16 punct_bitmap),
++	TP_ARGS(netdev, chandef, link_id, punct_bitmap),
+ 	TP_STRUCT__entry(
+ 		NETDEV_ENTRY
+ 		CHAN_DEF_ENTRY
+ 		__field(unsigned int, link_id)
++		__field(u16, punct_bitmap)
+ 	),
+ 	TP_fast_assign(
+ 		NETDEV_ASSIGN;
+ 		CHAN_DEF_ASSIGN(chandef);
+ 		__entry->link_id = link_id;
++		__entry->punct_bitmap = punct_bitmap;
+ 	),
+-	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d",
+-		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG, __entry->link_id)
++	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d, punct_bitmap:%u",
++		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG, __entry->link_id,
++		  __entry->punct_bitmap)
+ );
+ 
+ TRACE_EVENT(cfg80211_ch_switch_started_notify,
+ 	TP_PROTO(struct net_device *netdev,
+ 		 struct cfg80211_chan_def *chandef,
+-		 unsigned int link_id),
+-	TP_ARGS(netdev, chandef, link_id),
++		 unsigned int link_id,
++		 u16 punct_bitmap),
++	TP_ARGS(netdev, chandef, link_id, punct_bitmap),
+ 	TP_STRUCT__entry(
+ 		NETDEV_ENTRY
+ 		CHAN_DEF_ENTRY
+ 		__field(unsigned int, link_id)
++		__field(u16, punct_bitmap)
+ 	),
+ 	TP_fast_assign(
+ 		NETDEV_ASSIGN;
+ 		CHAN_DEF_ASSIGN(chandef);
+ 		__entry->link_id = link_id;
++		__entry->punct_bitmap = punct_bitmap;
+ 	),
+-	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d",
+-		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG, __entry->link_id)
++	TP_printk(NETDEV_PR_FMT ", " CHAN_DEF_PR_FMT ", link:%d, punct_bitmap:%u",
++		  NETDEV_PR_ARG, CHAN_DEF_PR_ARG, __entry->link_id,
++		  __entry->punct_bitmap)
+ );
+ 
+ TRACE_EVENT(cfg80211_radar_event,
diff --git a/package/kernel/mac80211/patches/subsys/344-v6.3-0004-wifi-mac80211-configure-puncturing-bitmap.patch b/package/kernel/mac80211/patches/subsys/344-v6.3-0004-wifi-mac80211-configure-puncturing-bitmap.patch
new file mode 100644
index 0000000000..06951b403d
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/344-v6.3-0004-wifi-mac80211-configure-puncturing-bitmap.patch
@@ -0,0 +1,107 @@
+From 2cc25e4b2a04cdd90dbb2916678745565cc4aeed Mon Sep 17 00:00:00 2001
+From: Aloka Dixit <quic_alokad at quicinc.com>
+Date: Mon, 30 Jan 2023 16:12:27 -0800
+Subject: [PATCH] wifi: mac80211: configure puncturing bitmap
+
+- Configure the bitmap in link_conf and notify the driver.
+- Modify 'change' in ieee80211_start_ap() from u32 to u64 to support
+BSS_CHANGED_EHT_PUNCTURING.
+- Propagate the bitmap in channel switch events to userspace.
+
+Signed-off-by: Aloka Dixit <quic_alokad at quicinc.com>
+Signed-off-by: Muna Sinada <quic_msinada at quicinc.com>
+Link: https://lore.kernel.org/r/20230131001227.25014-5-quic_alokad at quicinc.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ include/net/mac80211.h |  3 +++
+ net/mac80211/cfg.c     | 22 +++++++++++++++++++---
+ 2 files changed, 22 insertions(+), 3 deletions(-)
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -645,6 +645,7 @@ struct ieee80211_fils_discovery {
+  * @csa_active: marks whether a channel switch is going on. Internally it is
+  *	write-protected by sdata_lock and local->mtx so holding either is fine
+  *	for read access.
++ * @csa_punct_bitmap: new puncturing bitmap for channel switch
+  * @mu_mimo_owner: indicates interface owns MU-MIMO capability
+  * @chanctx_conf: The channel context this interface is assigned to, or %NULL
+  *	when it is not assigned. This pointer is RCU-protected due to the TX
+@@ -744,6 +745,8 @@ struct ieee80211_bss_conf {
+ 	u16 eht_puncturing;
+ 
+ 	bool csa_active;
++	u16 csa_punct_bitmap;
++
+ 	bool mu_mimo_owner;
+ 	struct ieee80211_chanctx_conf __rcu *chanctx_conf;
+ 
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -1220,7 +1220,7 @@ static int ieee80211_start_ap(struct wip
+ 	struct ieee80211_local *local = sdata->local;
+ 	struct beacon_data *old;
+ 	struct ieee80211_sub_if_data *vlan;
+-	u32 changed = BSS_CHANGED_BEACON_INT |
++	u64 changed = BSS_CHANGED_BEACON_INT |
+ 		      BSS_CHANGED_BEACON_ENABLED |
+ 		      BSS_CHANGED_BEACON |
+ 		      BSS_CHANGED_P2P_PS |
+@@ -1307,6 +1307,11 @@ static int ieee80211_start_ap(struct wip
+ 				IEEE80211_HE_PHY_CAP2_UL_MU_FULL_MU_MIMO;
+ 	}
+ 
++	if (params->eht_cap) {
++		link_conf->eht_puncturing = params->punct_bitmap;
++		changed |= BSS_CHANGED_EHT_PUNCTURING;
++	}
++
+ 	if (sdata->vif.type == NL80211_IFTYPE_AP &&
+ 	    params->mbssid_config.tx_wdev) {
+ 		err = ieee80211_set_ap_mbssid_options(sdata,
+@@ -3559,6 +3564,12 @@ static int __ieee80211_csa_finalize(stru
+ 	lockdep_assert_held(&local->mtx);
+ 	lockdep_assert_held(&local->chanctx_mtx);
+ 
++	if (sdata->vif.bss_conf.eht_puncturing != sdata->vif.bss_conf.csa_punct_bitmap) {
++		sdata->vif.bss_conf.eht_puncturing =
++					sdata->vif.bss_conf.csa_punct_bitmap;
++		changed |= BSS_CHANGED_EHT_PUNCTURING;
++	}
++
+ 	/*
+ 	 * using reservation isn't immediate as it may be deferred until later
+ 	 * with multi-vif. once reservation is complete it will re-schedule the
+@@ -3601,7 +3612,7 @@ static int __ieee80211_csa_finalize(stru
+ 		return err;
+ 
+ 	cfg80211_ch_switch_notify(sdata->dev, &sdata->deflink.csa_chandef, 0,
+-				  0);
++				  sdata->vif.bss_conf.eht_puncturing);
+ 
+ 	return 0;
+ }
+@@ -3863,9 +3874,13 @@ __ieee80211_channel_switch(struct wiphy
+ 		goto out;
+ 	}
+ 
++	if (params->punct_bitmap && !sdata->vif.bss_conf.eht_support)
++		goto out;
++
+ 	sdata->deflink.csa_chandef = params->chandef;
+ 	sdata->deflink.csa_block_tx = params->block_tx;
+ 	sdata->vif.bss_conf.csa_active = true;
++	sdata->vif.bss_conf.csa_punct_bitmap = params->punct_bitmap;
+ 
+ 	if (sdata->deflink.csa_block_tx)
+ 		ieee80211_stop_vif_queues(local, sdata,
+@@ -3873,7 +3888,8 @@ __ieee80211_channel_switch(struct wiphy
+ 
+ 	cfg80211_ch_switch_started_notify(sdata->dev,
+ 					  &sdata->deflink.csa_chandef, 0,
+-					  params->count, params->block_tx, 0);
++					  params->count, params->block_tx,
++					  sdata->vif.bss_conf.csa_punct_bitmap);
+ 
+ 	if (changed) {
+ 		ieee80211_link_info_change_notify(sdata, &sdata->deflink,
diff --git a/package/kernel/mac80211/patches/subsys/345-v6.4-wifi-mac80211-add-EHT-MU-MIMO-related-flags-in-ieee8.patch b/package/kernel/mac80211/patches/subsys/345-v6.4-wifi-mac80211-add-EHT-MU-MIMO-related-flags-in-ieee8.patch
new file mode 100644
index 0000000000..607f86f295
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/345-v6.4-wifi-mac80211-add-EHT-MU-MIMO-related-flags-in-ieee8.patch
@@ -0,0 +1,68 @@
+From f4d1181e4759c9c6c97c86cda2cf2d1ddb6a74d2 Mon Sep 17 00:00:00 2001
+From: Ryder Lee <ryder.lee at mediatek.com>
+Date: Sat, 18 Feb 2023 01:48:59 +0800
+Subject: [PATCH] wifi: mac80211: add EHT MU-MIMO related flags in
+ ieee80211_bss_conf
+
+Similar to VHT/HE. This is utilized to pass MU-MIMO configurations
+from user space (i.e. hostapd) to driver.
+
+Signed-off-by: Ryder Lee <ryder.lee at mediatek.com>
+Link: https://lore.kernel.org/r/8d9966c4c1e77cb1ade77d42bdc49905609192e9.1676628065.git.ryder.lee at mediatek.com
+[move into combined if statement, reset on !eht]
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ include/net/mac80211.h |  9 +++++++++
+ net/mac80211/cfg.c     | 16 ++++++++++++++++
+ 2 files changed, 25 insertions(+)
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -676,6 +676,12 @@ struct ieee80211_fils_discovery {
+  * @he_full_ul_mumimo: does this BSS support the reception (AP) or transmission
+  *	(non-AP STA) of an HE TB PPDU on an RU that spans the entire PPDU
+  *	bandwidth
++ * @eht_su_beamformer: in AP-mode, does this BSS enable operation as an EHT SU
++ *	beamformer
++ * @eht_su_beamformee: in AP-mode, does this BSS enable operation as an EHT SU
++ *	beamformee
++ * @eht_mu_beamformer: in AP-mode, does this BSS enable operation as an EHT MU
++ *	beamformer
+  */
+ struct ieee80211_bss_conf {
+ 	const u8 *bssid;
+@@ -764,6 +770,9 @@ struct ieee80211_bss_conf {
+ 	bool he_su_beamformee;
+ 	bool he_mu_beamformer;
+ 	bool he_full_ul_mumimo;
++	bool eht_su_beamformer;
++	bool eht_su_beamformee;
++	bool eht_mu_beamformer;
+ };
+ 
+ /**
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -1310,6 +1310,22 @@ static int ieee80211_start_ap(struct wip
+ 	if (params->eht_cap) {
+ 		link_conf->eht_puncturing = params->punct_bitmap;
+ 		changed |= BSS_CHANGED_EHT_PUNCTURING;
++
++		link_conf->eht_su_beamformer =
++			params->eht_cap->fixed.phy_cap_info[0] &
++				IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMER;
++		link_conf->eht_su_beamformee =
++			params->eht_cap->fixed.phy_cap_info[0] &
++				IEEE80211_EHT_PHY_CAP0_SU_BEAMFORMEE;
++		link_conf->eht_mu_beamformer =
++			params->eht_cap->fixed.phy_cap_info[7] &
++				(IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_80MHZ |
++				 IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_160MHZ |
++				 IEEE80211_EHT_PHY_CAP7_MU_BEAMFORMER_320MHZ);
++	} else {
++		link_conf->eht_su_beamformer = false;
++		link_conf->eht_su_beamformee = false;
++		link_conf->eht_mu_beamformer = false;
+ 	}
+ 
+ 	if (sdata->vif.type == NL80211_IFTYPE_AP &&
diff --git a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch
index 58a590682a..69b23acc79 100644
--- a/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch
+++ b/package/kernel/mac80211/patches/subsys/500-mac80211_configure_antenna_gain.patch
@@ -1,6 +1,6 @@
 --- a/include/net/cfg80211.h
 +++ b/include/net/cfg80211.h
-@@ -4084,6 +4084,7 @@ struct mgmt_frame_regs {
+@@ -4092,6 +4092,7 @@ struct mgmt_frame_regs {
   *	(as advertised by the nl80211 feature flag.)
   * @get_tx_power: store the current TX power into the dbm variable;
   *	return 0 if successful
@@ -8,7 +8,7 @@
   *
   * @rfkill_poll: polls the hw rfkill line, use cfg80211 reporting
   *	functions to adjust rfkill hw state
-@@ -4434,6 +4435,7 @@ struct cfg80211_ops {
+@@ -4442,6 +4443,7 @@ struct cfg80211_ops {
  				enum nl80211_tx_power_setting type, int mbm);
  	int	(*get_tx_power)(struct wiphy *wiphy, struct wireless_dev *wdev,
  				int *dbm);
@@ -18,7 +18,7 @@
  
 --- a/include/net/mac80211.h
 +++ b/include/net/mac80211.h
-@@ -1677,6 +1677,7 @@ enum ieee80211_smps_mode {
+@@ -1705,6 +1705,7 @@ enum ieee80211_smps_mode {
   *
   * @power_level: requested transmit power (in dBm), backward compatibility
   *	value only that is set to the minimum of all interfaces
@@ -26,7 +26,7 @@
   *
   * @chandef: the channel definition to tune to
   * @radar_enabled: whether radar detection is enabled
-@@ -1697,6 +1698,7 @@ enum ieee80211_smps_mode {
+@@ -1725,6 +1726,7 @@ enum ieee80211_smps_mode {
  struct ieee80211_conf {
  	u32 flags;
  	int power_level, dynamic_ps_timeout;
@@ -36,19 +36,18 @@
  	u8 ps_dtim_period;
 --- a/include/uapi/linux/nl80211.h
 +++ b/include/uapi/linux/nl80211.h
-@@ -2749,6 +2749,9 @@ enum nl80211_commands {
-  *	When used with %NL80211_CMD_FRAME_TX_STATUS, indicates the ack RX
-  *	timestamp. When used with %NL80211_CMD_FRAME RX notification, indicates
-  *	the incoming frame RX timestamp.
+@@ -2756,6 +2756,8 @@ enum nl80211_commands {
+  *	bit corresponds to the lowest 20 MHz channel. Each bit set to 1
+  *	indicates that the sub-channel is punctured. Higher 16 bits are
+  *	reserved.
 + * @NL80211_ATTR_WIPHY_ANTENNA_GAIN: Configured antenna gain. Used to reduce
 + *	transmit power to stay within regulatory limits. u32, dBi.
-+ *
+  *
   * @NUM_NL80211_ATTR: total number of nl80211_attrs available
   * @NL80211_ATTR_MAX: highest attribute number currently defined
-  * @__NL80211_ATTR_AFTER_LAST: internal use
-@@ -3277,6 +3280,8 @@ enum nl80211_attrs {
- 	NL80211_ATTR_TX_HW_TIMESTAMP,
- 	NL80211_ATTR_RX_HW_TIMESTAMP,
+@@ -3288,6 +3290,8 @@ enum nl80211_attrs {
+ 
+ 	NL80211_ATTR_PUNCT_BITMAP,
  
 +	NL80211_ATTR_WIPHY_ANTENNA_GAIN,
 +
@@ -57,7 +56,7 @@
  	__NL80211_ATTR_AFTER_LAST,
 --- a/net/mac80211/cfg.c
 +++ b/net/mac80211/cfg.c
-@@ -3046,6 +3046,19 @@ static int ieee80211_get_tx_power(struct
+@@ -3067,6 +3067,19 @@ static int ieee80211_get_tx_power(struct
  	return 0;
  }
  
@@ -77,7 +76,7 @@
  static void ieee80211_rfkill_poll(struct wiphy *wiphy)
  {
  	struct ieee80211_local *local = wiphy_priv(wiphy);
-@@ -4956,6 +4969,7 @@ const struct cfg80211_ops mac80211_confi
+@@ -4989,6 +5002,7 @@ const struct cfg80211_ops mac80211_confi
  	.set_wiphy_params = ieee80211_set_wiphy_params,
  	.set_tx_power = ieee80211_set_tx_power,
  	.get_tx_power = ieee80211_get_tx_power,
@@ -129,15 +128,15 @@
  	local->hw.max_mtu = IEEE80211_MAX_DATA_LEN;
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -799,6 +799,7 @@ static const struct nla_policy nl80211_p
- 	[NL80211_ATTR_MLD_ADDR] = NLA_POLICY_EXACT_LEN(ETH_ALEN),
+@@ -800,6 +800,7 @@ static const struct nla_policy nl80211_p
  	[NL80211_ATTR_MLO_SUPPORT] = { .type = NLA_FLAG },
  	[NL80211_ATTR_MAX_NUM_AKM_SUITES] = { .type = NLA_REJECT },
+ 	[NL80211_ATTR_PUNCT_BITMAP] = NLA_POLICY_RANGE(NLA_U8, 0, 0xffff),
 +	[NL80211_ATTR_WIPHY_ANTENNA_GAIN] = { .type = NLA_U32 },
  };
  
  /* policy for the key attributes */
-@@ -3511,6 +3512,22 @@ static int nl80211_set_wiphy(struct sk_b
+@@ -3527,6 +3528,22 @@ static int nl80211_set_wiphy(struct sk_b
  		if (result)
  			goto out;
  	}
diff --git a/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch
index 2bc11efd00..0e6e51884d 100644
--- a/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch
+++ b/package/kernel/mac80211/patches/subsys/780-avoid-crashing-missing-band.patch
@@ -18,7 +18,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -2422,6 +2422,13 @@ static void sta_stats_decode_rate(struct
+@@ -2364,6 +2364,13 @@ static void sta_stats_decode_rate(struct
  
  		sband = local->hw.wiphy->bands[band];
  



From lede-commits at lists.infradead.org  Tue Apr  9 00:46:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 03:46:28 -0400
Subject: [openwrt/openwrt]  kernel: backport upstream mediatek WED changes
In-Reply-To: <171264878740.1728247.16983239164198387787@git-01.infra.openwrt.org>
References: <171264878740.1728247.16983239164198387787@git-01.infra.openwrt.org>
Message-ID: <mailman.24886.1712648813.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/11d88dee1ceadcbe71cfc7c5598a6dd527b5dcb6

commit 11d88dee1ceadcbe71cfc7c5598a6dd527b5dcb6
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Mar 29 22:21:51 2024 +0100

    kernel: backport upstream mediatek WED changes
    
    Reorder and update existing patches
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
    (cherry picked from commit 6407ef8d2bcb4a0a6284de09cd77bd1868c1d6ea)
    [rmilecki: rebase & fix mt76 compilation]
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 package/kernel/mt76/Makefile                       |    2 +-
 ...t-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch |   24 +
 ...-ethernet-mtk_eth_wed-add-axi-bus-support.patch |   13 +-
 ...t-mtk_eth_wed-add-missing-put_device-in-m.patch |    4 +-
 ...ernet-mtk_eth_wed-add-missing-of_node_put.patch |    6 +-
 ...ethernet-mtk_wed-introduce-wed-wo-support.patch |    2 +-
 ...t-mtk_wed-rename-tx_wdma-array-in-rx_wdma.patch |    6 +-
 ...rnet-mtk_wed-add-configure-wed-wo-support.patch |   48 +-
 ...t-mtk_wed-add-wcid-overwritten-support-fo.patch |    4 +-
 ...t-mtk_wed-return-status-value-in-mtk_wdma.patch |    2 +-
 ...-net-ethernet-mtk_wed-update-mtk_wed_stop.patch |    2 +-
 ...rnet-mtk_wed-add-mtk_wed_rx_reset-routine.patch |   14 +-
 ...t-mtk_wed-add-reset-to-tx_ring_setup-call.patch |   10 +-
 ...t-mtk_wed-add-reset-to-rx_ring_setup-call.patch |    8 +-
 ...t-mtk_wed-No-need-to-clear-memory-after-a.patch |    2 +-
 ...t-mtk_wed-fix-possible-deadlock-if-mtk_we.patch |    2 +-
 ...t-mtk_eth_soc-add-version-in-mtk_soc_data.patch |    4 +-
 ...-mtk_eth_soc-add-code-for-offloading-flo.patch} |   11 +-
 ...-mediatek-mtk_ppe-prefer-newly-added-l2-.patch} |    2 +-
 ...-mtk_eth_soc-improve-keeping-track-of-of.patch} |   21 +-
 ...-mediatek-fix-ppe-flow-accounting-for-L2.patch} |   22 +-
 ...t-mtk_wed-add-some-more-info-in-wed_txinf.patch |   45 +
 ...t-mtk_wed-minor-change-in-wed_-tx-rx-info.patch |   47 +
 ...t-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch |   29 +
 ...t-mtk_wed-check-update_wo_rx_stats-in-mtk.patch |   26 +
 ...t-mtk_wed-do-not-assume-offload-callbacks.patch |   68 ++
 ...t-mtk_wed-introduce-versioning-utility-ro.patch |  232 ++++
 ...t-mtk_wed-do-not-configure-rx-offload-if-.patch |  234 ++++
 ...t-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch |   52 +
 ...t-mtk_wed-introduce-mtk_wed_buf-structure.patch |   87 ++
 ...t-mtk_wed-move-mem_region-array-out-of-mt.patch |   88 ++
 ...ernet-mtk_wed-make-memory-region-optional.patch |   71 ++
 ...t-mtk_wed-fix-EXT_INT_STATUS_RX_FBUF-defi.patch |   27 +
 ...et-mtk_wed-add-mtk_wed_soc_data-structure.patch |  217 ++++
 ...t-mtk_wed-introduce-WED-support-for-MT798.patch | 1280 ++++++++++++++++++++
 ...t-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch |   95 ++
 ...t-mtk_wed-introduce-partial-AMSDU-offload.patch |  465 +++++++
 ...t-mtk_wed-introduce-hw_rro-support-for-MT.patch |  483 ++++++++
 ...t-mtk_wed-debugfs-move-wed_v2-specific-re.patch |   78 ++
 ...t-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch |  432 +++++++
 ...thernet-mtk_wed-add-wed-3.0-reset-support.patch |  587 +++++++++
 ...-internal-delay-applied-to-the-wrong-PAD.patch} |    0
 ...-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch} |    0
 ...ove-redundant-check-in-parse_port_config.patch} |    0
 ...-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch} |    0
 ...k-remove-extra-mutex_init-in-qca8k_setup.patch} |    0
 ...a8k-move-regmap-init-in-probe-and-set-it.patch} |    0
 ...qca8k-initial-conversion-to-regmap-heper.patch} |    0
 ...sa-qca8k-add-additional-MIB-counter-and-.patch} |    0
 ...sa-qca8k-add-support-for-port-fast-aging.patch} |    0
 ...et-dsa-qca8k-add-set_ageing_time-support.patch} |    0
 ...et-dsa-qca8k-add-support-for-mdb_add-del.patch} |    0
 ...et-dsa-qca8k-add-support-for-mirror-mode.patch} |    0
 ...7-net-next-net-dsa-qca8k-add-LAG-support.patch} |    0
 ...net-dsa-qca8k-fix-warning-in-LAG-feature.patch} |    0
 ...low-live-renaming-when-an-interface-is-up.patch |    6 +-
 .../hack-5.15/721-net-add-packet-mangeling.patch   |   10 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch |    2 +-
 ...ethernet-mtk_eth_soc-enable-threaded-NAPI.patch |    6 +-
 ...t-mtk_eth_soc-work-around-issue-with-send.patch |    6 +-
 ...t-mtk_eth_soc-fix-remaining-throughput-re.patch |    4 +-
 ...t-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch |    2 +-
 ...t-mtk_eth_soc-add-paths-and-SerDes-modes-.patch |   20 +-
 ...t-mtk_eth_soc-set-coherent-mask-to-get-PP.patch |    2 +-
 ...d-optional-threading-for-backlog-processi.patch |    2 +-
 ...t-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch |    6 +-
 ...t-mtk_wed-rename-mtk_wed_get_memory_regio.patch |   23 +-
 ...t-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch |   54 +-
 ...net-mtk_wed-move-ilm-a-dedicated-dts-node.patch |   87 +-
 ...net-mtk_wed-move-dlm-a-dedicated-dts-node.patch |    4 +-
 ...t-mediatek-split-tx-and-rx-fields-in-mtk_.patch |   82 +-
 ...t-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch |   14 +-
 ...-net-ethernet-mediatek-support-net-labels.patch |    4 +-
 73 files changed, 4917 insertions(+), 269 deletions(-)

diff --git a/package/kernel/mt76/Makefile b/package/kernel/mt76/Makefile
index b0c096b8fb..500735303f 100644
--- a/package/kernel/mt76/Makefile
+++ b/package/kernel/mt76/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mt76
-PKG_RELEASE=1
+PKG_RELEASE=2
 
 PKG_LICENSE:=GPLv2
 PKG_LICENSE_FILES:=
diff --git a/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch b/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch
new file mode 100644
index 0000000000..15241c8195
--- /dev/null
+++ b/package/kernel/mt76/patches/0001-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch
@@ -0,0 +1,24 @@
+From 9c7b98c03173a1a201d74203a81b344a0cd637ac Mon Sep 17 00:00:00 2001
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:07 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: rename mtk_rxbm_desc in
+ mtk_wed_bm_desc
+
+Rename mtk_rxbm_desc structure in mtk_wed_bm_desc since it will be used
+even on tx side by MT7988 SoC.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/mt7915/mmio.c
++++ b/mt7915/mmio.c
+@@ -591,7 +591,7 @@ static void mt7915_mmio_wed_release_rx_b
+ 
+ static u32 mt7915_mmio_wed_init_rx_buf(struct mtk_wed_device *wed, int size)
+ {
+-	struct mtk_rxbm_desc *desc = wed->rx_buf_ring.desc;
++	struct mtk_wed_bm_desc *desc = wed->rx_buf_ring.desc;
+ 	struct mt76_txwi_cache *t = NULL;
+ 	struct mt7915_dev *dev;
+ 	struct mt76_queue *q;
diff --git a/target/linux/generic/backport-5.15/722-v6.0-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch b/target/linux/generic/backport-5.15/722-v6.0-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch
index 70b7bad31f..f4b78a2798 100644
--- a/target/linux/generic/backport-5.15/722-v6.0-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch
+++ b/target/linux/generic/backport-5.15/722-v6.0-net-ethernet-mtk_eth_wed-add-axi-bus-support.patch
@@ -82,7 +82,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  
  	if (!hw_list[!hw->index]->wed_dev &&
  	    hw->eth->dma_dev != hw->eth->dev)
-@@ -356,40 +380,54 @@ mtk_wed_detach(struct mtk_wed_device *de
+@@ -356,40 +380,47 @@ mtk_wed_detach(struct mtk_wed_device *de
  static void
  mtk_wed_bus_init(struct mtk_wed_device *dev)
  {
@@ -97,7 +97,6 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 +	case MTK_WED_BUS_PCIE: {
 +		struct device_node *np = dev->hw->eth->dev->of_node;
 +		struct regmap *regs;
-+		u32 val;
 +
 +		regs = syscon_regmap_lookup_by_phandle(np,
 +						       "mediatek,wed-pcie");
@@ -139,20 +138,14 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 +			FIELD_PREP(MTK_WED_PCIE_INT_CTRL_SRC_SEL, 1));
 +		wed_r32(dev, MTK_WED_PCIE_INT_CTRL);
 +
-+		val = wed_r32(dev, MTK_WED_PCIE_CFG_INTM);
-+		val = wed_r32(dev, MTK_WED_PCIE_CFG_BASE);
 +		wed_w32(dev, MTK_WED_PCIE_CFG_INTM, PCIE_BASE_ADDR0 | 0x180);
 +		wed_w32(dev, MTK_WED_PCIE_CFG_BASE, PCIE_BASE_ADDR0 | 0x184);
 +
-+		val = wed_r32(dev, MTK_WED_PCIE_CFG_INTM);
-+		val = wed_r32(dev, MTK_WED_PCIE_CFG_BASE);
-+
 +		/* pcie interrupt status trigger register */
 +		wed_w32(dev, MTK_WED_PCIE_INT_TRIGGER, BIT(24));
 +		wed_r32(dev, MTK_WED_PCIE_INT_TRIGGER);
 +
 +		/* pola setting */
-+		val = wed_r32(dev, MTK_WED_PCIE_INT_CTRL);
 +		wed_set(dev, MTK_WED_PCIE_INT_CTRL,
 +			MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA);
 +		break;
@@ -168,7 +161,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  }
  
  static void
-@@ -800,12 +838,14 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -800,12 +831,14 @@ mtk_wed_attach(struct mtk_wed_device *de
  	__releases(RCU)
  {
  	struct mtk_wed_hw *hw;
@@ -184,7 +177,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	    !try_module_get(THIS_MODULE))
  		ret = -ENODEV;
  
-@@ -823,8 +863,10 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -823,8 +856,10 @@ mtk_wed_attach(struct mtk_wed_device *de
  		goto out;
  	}
  
diff --git a/target/linux/generic/backport-5.15/728-v6.1-02-net-ethernet-mtk_eth_wed-add-missing-put_device-in-m.patch b/target/linux/generic/backport-5.15/728-v6.1-02-net-ethernet-mtk_eth_wed-add-missing-put_device-in-m.patch
index ef5374dcc5..4f0b78f110 100644
--- a/target/linux/generic/backport-5.15/728-v6.1-02-net-ethernet-mtk_eth_wed-add-missing-put_device-in-m.patch
+++ b/target/linux/generic/backport-5.15/728-v6.1-02-net-ethernet-mtk_eth_wed-add-missing-put_device-in-m.patch
@@ -16,7 +16,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1084,11 +1084,11 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1077,11 +1077,11 @@ void mtk_wed_add_hw(struct device_node *
  	get_device(&pdev->dev);
  	irq = platform_get_irq(pdev, 0);
  	if (irq < 0)
@@ -30,7 +30,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	rcu_assign_pointer(mtk_soc_wed_ops, &wed_ops);
  
-@@ -1131,8 +1131,14 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1124,8 +1124,14 @@ void mtk_wed_add_hw(struct device_node *
  
  	hw_list[index] = hw;
  
diff --git a/target/linux/generic/backport-5.15/728-v6.1-03-net-ethernet-mtk_eth_wed-add-missing-of_node_put.patch b/target/linux/generic/backport-5.15/728-v6.1-03-net-ethernet-mtk_eth_wed-add-missing-of_node_put.patch
index 0a452d4a7d..32f62aaed2 100644
--- a/target/linux/generic/backport-5.15/728-v6.1-03-net-ethernet-mtk_eth_wed-add-missing-of_node_put.patch
+++ b/target/linux/generic/backport-5.15/728-v6.1-03-net-ethernet-mtk_eth_wed-add-missing-of_node_put.patch
@@ -15,7 +15,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1079,7 +1079,7 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1072,7 +1072,7 @@ void mtk_wed_add_hw(struct device_node *
  
  	pdev = of_find_device_by_node(np);
  	if (!pdev)
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	get_device(&pdev->dev);
  	irq = platform_get_irq(pdev, 0);
-@@ -1139,6 +1139,8 @@ unlock:
+@@ -1132,6 +1132,8 @@ unlock:
  	mutex_unlock(&hw_lock);
  err_put_device:
  	put_device(&pdev->dev);
@@ -33,7 +33,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  void mtk_wed_exit(void)
-@@ -1159,6 +1161,7 @@ void mtk_wed_exit(void)
+@@ -1152,6 +1154,7 @@ void mtk_wed_exit(void)
  		hw_list[i] = NULL;
  		debugfs_remove(hw->debugfs_dir);
  		put_device(hw->dev);
diff --git a/target/linux/generic/backport-5.15/729-02-v6.1-net-ethernet-mtk_wed-introduce-wed-wo-support.patch b/target/linux/generic/backport-5.15/729-02-v6.1-net-ethernet-mtk_wed-introduce-wed-wo-support.patch
index dbd7e30fbb..fd5f45df2a 100644
--- a/target/linux/generic/backport-5.15/729-02-v6.1-net-ethernet-mtk_wed-introduce-wed-wo-support.patch
+++ b/target/linux/generic/backport-5.15/729-02-v6.1-net-ethernet-mtk_wed-introduce-wed-wo-support.patch
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	if (dev->wlan.bus_type == MTK_WED_BUS_PCIE) {
  		struct device_node *wlan_node;
-@@ -885,9 +888,11 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -878,9 +881,11 @@ mtk_wed_attach(struct mtk_wed_device *de
  	}
  
  	mtk_wed_hw_init_early(dev);
diff --git a/target/linux/generic/backport-5.15/729-03-v6.1-net-ethernet-mtk_wed-rename-tx_wdma-array-in-rx_wdma.patch b/target/linux/generic/backport-5.15/729-03-v6.1-net-ethernet-mtk_wed-rename-tx_wdma-array-in-rx_wdma.patch
index ffd6bc3589..a002a5f851 100644
--- a/target/linux/generic/backport-5.15/729-03-v6.1-net-ethernet-mtk_wed-rename-tx_wdma-array-in-rx_wdma.patch
+++ b/target/linux/generic/backport-5.15/729-03-v6.1-net-ethernet-mtk_wed-rename-tx_wdma-array-in-rx_wdma.patch
@@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -695,10 +695,10 @@ mtk_wed_ring_alloc(struct mtk_wed_device
+@@ -688,10 +688,10 @@ mtk_wed_ring_alloc(struct mtk_wed_device
  }
  
  static int
@@ -36,7 +36,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	if (mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE, desc_size))
  		return -ENOMEM;
-@@ -812,9 +812,9 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -805,9 +805,9 @@ mtk_wed_start(struct mtk_wed_device *dev
  {
  	int i;
  
@@ -49,7 +49,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	mtk_wed_hw_init(dev);
  	mtk_wed_configure_irq(dev, irq_mask);
-@@ -923,7 +923,7 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
+@@ -916,7 +916,7 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
  			       sizeof(*ring->desc)))
  		return -ENOMEM;
  
diff --git a/target/linux/generic/backport-5.15/729-04-v6.1-net-ethernet-mtk_wed-add-configure-wed-wo-support.patch b/target/linux/generic/backport-5.15/729-04-v6.1-net-ethernet-mtk_wed-add-configure-wed-wo-support.patch
index 4c34d0cb33..eca29739b4 100644
--- a/target/linux/generic/backport-5.15/729-04-v6.1-net-ethernet-mtk_wed-add-configure-wed-wo-support.patch
+++ b/target/linux/generic/backport-5.15/729-04-v6.1-net-ethernet-mtk_wed-add-configure-wed-wo-support.patch
@@ -409,7 +409,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	if (dev->wlan.bus_type == MTK_WED_BUS_PCIE) {
  		struct device_node *wlan_node;
-@@ -441,10 +667,12 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -434,10 +660,12 @@ mtk_wed_set_wpdma(struct mtk_wed_device
  	} else {
  		mtk_wed_bus_init(dev);
  
@@ -426,7 +426,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	}
  }
  
-@@ -494,6 +722,132 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
+@@ -487,6 +715,132 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
  	}
  }
  
@@ -559,7 +559,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void
  mtk_wed_hw_init(struct mtk_wed_device *dev)
  {
-@@ -505,11 +859,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -498,11 +852,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  	wed_w32(dev, MTK_WED_TX_BM_CTRL,
  		MTK_WED_TX_BM_CTRL_PAUSE |
  		FIELD_PREP(MTK_WED_TX_BM_CTRL_VLD_GRP_NUM,
@@ -573,7 +573,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE);
  
-@@ -536,9 +890,9 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -529,9 +883,9 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  		wed_w32(dev, MTK_WED_TX_TKID_CTRL,
  			MTK_WED_TX_TKID_CTRL_PAUSE |
  			FIELD_PREP(MTK_WED_TX_TKID_CTRL_VLD_GRP_NUM,
@@ -585,7 +585,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		wed_w32(dev, MTK_WED_TX_TKID_DYN_THR,
  			FIELD_PREP(MTK_WED_TX_TKID_DYN_THR_LO, 0) |
  			MTK_WED_TX_TKID_DYN_THR_HI);
-@@ -546,18 +900,28 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -539,18 +893,28 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  
  	mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
  
@@ -617,7 +617,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  {
  	void *head = (void *)ring->desc;
  	int i;
-@@ -567,7 +931,10 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
+@@ -560,7 +924,10 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
  
  		desc = (struct mtk_wdma_desc *)(head + i * ring->desc_size);
  		desc->buf0 = 0;
@@ -629,7 +629,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		desc->buf1 = 0;
  		desc->info = 0;
  	}
-@@ -623,7 +990,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -616,7 +983,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
  		if (!dev->tx_ring[i].desc)
  			continue;
  
@@ -639,7 +639,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	}
  
  	if (mtk_wed_poll_busy(dev))
-@@ -641,6 +1009,9 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -634,6 +1002,9 @@ mtk_wed_reset_dma(struct mtk_wed_device
  	wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_RX);
  	wdma_w32(dev, MTK_WDMA_RESET_IDX, 0);
  
@@ -649,7 +649,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (busy) {
  		mtk_wed_reset(dev, MTK_WED_RESET_WDMA_INT_AGENT);
  		mtk_wed_reset(dev, MTK_WED_RESET_WDMA_RX_DRV);
-@@ -675,12 +1046,11 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -668,12 +1039,11 @@ mtk_wed_reset_dma(struct mtk_wed_device
  			MTK_WED_WPDMA_RESET_IDX_RX);
  		wed_w32(dev, MTK_WED_WPDMA_RESET_IDX, 0);
  	}
@@ -663,7 +663,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  {
  	ring->desc = dma_alloc_coherent(dev->hw->dev, size * desc_size,
  					&ring->desc_phys, GFP_KERNEL);
-@@ -689,7 +1059,7 @@ mtk_wed_ring_alloc(struct mtk_wed_device
+@@ -682,7 +1052,7 @@ mtk_wed_ring_alloc(struct mtk_wed_device
  
  	ring->desc_size = desc_size;
  	ring->size = size;
@@ -672,7 +672,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return 0;
  }
-@@ -698,9 +1068,14 @@ static int
+@@ -691,9 +1061,14 @@ static int
  mtk_wed_wdma_rx_ring_setup(struct mtk_wed_device *dev, int idx, int size)
  {
  	u32 desc_size = sizeof(struct mtk_wdma_desc) * dev->hw->version;
@@ -689,7 +689,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		return -ENOMEM;
  
  	wdma_w32(dev, MTK_WDMA_RING_RX(idx) + MTK_WED_RING_OFS_BASE,
-@@ -717,6 +1092,60 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
+@@ -710,6 +1085,60 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
  	return 0;
  }
  
@@ -750,7 +750,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void
  mtk_wed_configure_irq(struct mtk_wed_device *dev, u32 irq_mask)
  {
-@@ -739,6 +1168,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -732,6 +1161,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev
  
  		wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask);
  	} else {
@@ -759,7 +759,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		/* initail tx interrupt trigger */
  		wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX,
  			MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN |
-@@ -757,6 +1188,16 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -750,6 +1181,16 @@ mtk_wed_configure_irq(struct mtk_wed_dev
  			FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_TX_FREE_DONE_TRIG,
  				   dev->wlan.txfree_tbit));
  
@@ -776,7 +776,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		wed_w32(dev, MTK_WED_WDMA_INT_CLR, wdma_mask);
  		wed_set(dev, MTK_WED_WDMA_INT_CTRL,
  			FIELD_PREP(MTK_WED_WDMA_INT_CTRL_POLL_SRC_SEL,
-@@ -794,9 +1235,15 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -787,9 +1228,15 @@ mtk_wed_dma_enable(struct mtk_wed_device
  		wdma_set(dev, MTK_WDMA_GLO_CFG,
  			 MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
  	} else {
@@ -792,7 +792,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		wed_set(dev, MTK_WED_WPDMA_GLO_CFG,
  			MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_PKT_PROC |
  			MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_CRX_SYNC);
-@@ -804,6 +1251,15 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -797,6 +1244,15 @@ mtk_wed_dma_enable(struct mtk_wed_device
  		wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
  			MTK_WED_WPDMA_GLO_CFG_TX_TKID_KEEP |
  			MTK_WED_WPDMA_GLO_CFG_TX_DMAD_DW3_PREV);
@@ -808,7 +808,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	}
  }
  
-@@ -829,7 +1285,19 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -822,7 +1278,19 @@ mtk_wed_start(struct mtk_wed_device *dev
  		val |= BIT(0) | (BIT(1) * !!dev->hw->index);
  		regmap_write(dev->hw->mirror, dev->hw->index * 4, val);
  	} else {
@@ -829,7 +829,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	}
  
  	mtk_wed_dma_enable(dev);
-@@ -863,7 +1331,7 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -856,7 +1324,7 @@ mtk_wed_attach(struct mtk_wed_device *de
  	if (!hw) {
  		module_put(THIS_MODULE);
  		ret = -ENODEV;
@@ -838,7 +838,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	}
  
  	device = dev->wlan.bus_type == MTK_WED_BUS_PCIE
-@@ -876,15 +1344,24 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -869,15 +1337,24 @@ mtk_wed_attach(struct mtk_wed_device *de
  	dev->dev = hw->dev;
  	dev->irq = hw->irq;
  	dev->wdma_idx = hw->index;
@@ -866,7 +866,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	}
  
  	mtk_wed_hw_init_early(dev);
-@@ -893,8 +1370,10 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -886,8 +1363,10 @@ mtk_wed_attach(struct mtk_wed_device *de
  				   BIT(hw->index), 0);
  	else
  		ret = mtk_wed_wo_init(hw);
@@ -878,7 +878,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	mutex_unlock(&hw_lock);
  
  	return ret;
-@@ -917,10 +1396,11 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
+@@ -910,10 +1389,11 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
  	 * WDMA RX.
  	 */
  
@@ -892,7 +892,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		return -ENOMEM;
  
  	if (mtk_wed_wdma_rx_ring_setup(dev, idx, MTK_WED_WDMA_RING_SIZE))
-@@ -967,6 +1447,37 @@ mtk_wed_txfree_ring_setup(struct mtk_wed
+@@ -960,6 +1440,37 @@ mtk_wed_txfree_ring_setup(struct mtk_wed
  	return 0;
  }
  
@@ -930,7 +930,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static u32
  mtk_wed_irq_get(struct mtk_wed_device *dev, u32 mask)
  {
-@@ -1063,7 +1574,9 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1056,7 +1567,9 @@ void mtk_wed_add_hw(struct device_node *
  	static const struct mtk_wed_ops wed_ops = {
  		.attach = mtk_wed_attach,
  		.tx_ring_setup = mtk_wed_tx_ring_setup,
@@ -940,7 +940,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		.start = mtk_wed_start,
  		.stop = mtk_wed_stop,
  		.reset_dma = mtk_wed_reset_dma,
-@@ -1072,6 +1585,7 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1065,6 +1578,7 @@ void mtk_wed_add_hw(struct device_node *
  		.irq_get = mtk_wed_irq_get,
  		.irq_set_mask = mtk_wed_irq_set_mask,
  		.detach = mtk_wed_detach,
diff --git a/target/linux/generic/backport-5.15/729-09-v6.2-net-ethernet-mtk_wed-add-wcid-overwritten-support-fo.patch b/target/linux/generic/backport-5.15/729-09-v6.2-net-ethernet-mtk_wed-add-wcid-overwritten-support-fo.patch
index d91d829911..117ccc0902 100644
--- a/target/linux/generic/backport-5.15/729-09-v6.2-net-ethernet-mtk_wed-add-wcid-overwritten-support-fo.patch
+++ b/target/linux/generic/backport-5.15/729-09-v6.2-net-ethernet-mtk_wed-add-wcid-overwritten-support-fo.patch
@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -1297,9 +1297,10 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1290,9 +1290,10 @@ mtk_wed_start(struct mtk_wed_device *dev
  		if (mtk_wed_rro_cfg(dev))
  			return;
  
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	mtk_wed_dma_enable(dev);
  	dev->running = true;
  }
-@@ -1365,11 +1366,13 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1358,11 +1359,13 @@ mtk_wed_attach(struct mtk_wed_device *de
  	}
  
  	mtk_wed_hw_init_early(dev);
diff --git a/target/linux/generic/backport-5.15/729-10-v6.2-net-ethernet-mtk_wed-return-status-value-in-mtk_wdma.patch b/target/linux/generic/backport-5.15/729-10-v6.2-net-ethernet-mtk_wed-return-status-value-in-mtk_wdma.patch
index d97bb715e0..ec58c3fc57 100644
--- a/target/linux/generic/backport-5.15/729-10-v6.2-net-ethernet-mtk_wed-return-status-value-in-mtk_wdma.patch
+++ b/target/linux/generic/backport-5.15/729-10-v6.2-net-ethernet-mtk_wed-return-status-value-in-mtk_wdma.patch
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	if (dev->wlan.bus_type == MTK_WED_BUS_PCIE) {
-@@ -1006,11 +1009,7 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -999,11 +1002,7 @@ mtk_wed_reset_dma(struct mtk_wed_device
  		wed_w32(dev, MTK_WED_RESET_IDX, 0);
  	}
  
diff --git a/target/linux/generic/backport-5.15/729-12-v6.2-net-ethernet-mtk_wed-update-mtk_wed_stop.patch b/target/linux/generic/backport-5.15/729-12-v6.2-net-ethernet-mtk_wed-update-mtk_wed_stop.patch
index dfc0f8c3f3..f4e842d515 100644
--- a/target/linux/generic/backport-5.15/729-12-v6.2-net-ethernet-mtk_wed-update-mtk_wed_stop.patch
+++ b/target/linux/generic/backport-5.15/729-12-v6.2-net-ethernet-mtk_wed-update-mtk_wed_stop.patch
@@ -67,7 +67,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	mtk_wdma_rx_reset(dev);
  	mtk_wed_reset(dev, MTK_WED_RESET_WED);
-@@ -677,7 +691,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
+@@ -670,7 +684,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
  {
  	u32 mask, set;
  
diff --git a/target/linux/generic/backport-5.15/729-13-v6.2-net-ethernet-mtk_wed-add-mtk_wed_rx_reset-routine.patch b/target/linux/generic/backport-5.15/729-13-v6.2-net-ethernet-mtk_wed-add-mtk_wed_rx_reset-routine.patch
index 2205fea513..a0fc9da99e 100644
--- a/target/linux/generic/backport-5.15/729-13-v6.2-net-ethernet-mtk_wed-add-mtk_wed_rx_reset-routine.patch
+++ b/target/linux/generic/backport-5.15/729-13-v6.2-net-ethernet-mtk_wed-add-mtk_wed_rx_reset-routine.patch
@@ -13,7 +13,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -951,42 +951,130 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
+@@ -944,42 +944,130 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
  }
  
  static u32
@@ -170,7 +170,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -1004,19 +1092,23 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -997,19 +1085,23 @@ mtk_wed_reset_dma(struct mtk_wed_device
  				   true);
  	}
  
@@ -201,7 +201,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (busy) {
  		mtk_wed_reset(dev, MTK_WED_RESET_WDMA_INT_AGENT);
-@@ -1033,6 +1125,9 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1026,6 +1118,9 @@ mtk_wed_reset_dma(struct mtk_wed_device
  			MTK_WED_WDMA_GLO_CFG_RST_INIT_COMPLETE);
  	}
  
@@ -211,7 +211,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	for (i = 0; i < 100; i++) {
  		val = wed_r32(dev, MTK_WED_TX_BM_INTF);
  		if (FIELD_GET(MTK_WED_TX_BM_INTF_TKFIFO_FDEP, val) == 0x40)
-@@ -1040,8 +1135,19 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1033,8 +1128,19 @@ mtk_wed_reset_dma(struct mtk_wed_device
  	}
  
  	mtk_wed_reset(dev, MTK_WED_RESET_TX_FREE_AGENT);
@@ -231,7 +231,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	if (busy) {
  		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_INT_AGENT);
  		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_TX_DRV);
-@@ -1052,6 +1158,17 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1045,6 +1151,17 @@ mtk_wed_reset_dma(struct mtk_wed_device
  			MTK_WED_WPDMA_RESET_IDX_RX);
  		wed_w32(dev, MTK_WED_WPDMA_RESET_IDX, 0);
  	}
@@ -249,7 +249,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static int
-@@ -1274,6 +1391,9 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1267,6 +1384,9 @@ mtk_wed_start(struct mtk_wed_device *dev
  {
  	int i;
  
@@ -259,7 +259,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	for (i = 0; i < ARRAY_SIZE(dev->rx_wdma); i++)
  		if (!dev->rx_wdma[i].desc)
  			mtk_wed_wdma_rx_ring_setup(dev, i, 16);
-@@ -1362,10 +1482,6 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1355,10 +1475,6 @@ mtk_wed_attach(struct mtk_wed_device *de
  		goto out;
  
  	if (mtk_wed_get_rx_capa(dev)) {
diff --git a/target/linux/generic/backport-5.15/729-14-v6.2-net-ethernet-mtk_wed-add-reset-to-tx_ring_setup-call.patch b/target/linux/generic/backport-5.15/729-14-v6.2-net-ethernet-mtk_wed-add-reset-to-tx_ring_setup-call.patch
index 602483bcb8..4404971cc7 100644
--- a/target/linux/generic/backport-5.15/729-14-v6.2-net-ethernet-mtk_wed-add-reset-to-tx_ring_setup-call.patch
+++ b/target/linux/generic/backport-5.15/729-14-v6.2-net-ethernet-mtk_wed-add-reset-to-tx_ring_setup-call.patch
@@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1188,7 +1188,8 @@ mtk_wed_ring_alloc(struct mtk_wed_device
+@@ -1181,7 +1181,8 @@ mtk_wed_ring_alloc(struct mtk_wed_device
  }
  
  static int
@@ -24,7 +24,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  {
  	u32 desc_size = sizeof(struct mtk_wdma_desc) * dev->hw->version;
  	struct mtk_wed_ring *wdma;
-@@ -1197,8 +1198,8 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
+@@ -1190,8 +1191,8 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
  		return -EINVAL;
  
  	wdma = &dev->rx_wdma[idx];
@@ -35,7 +35,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -ENOMEM;
  
  	wdma_w32(dev, MTK_WDMA_RING_RX(idx) + MTK_WED_RING_OFS_BASE,
-@@ -1396,7 +1397,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1389,7 +1390,7 @@ mtk_wed_start(struct mtk_wed_device *dev
  
  	for (i = 0; i < ARRAY_SIZE(dev->rx_wdma); i++)
  		if (!dev->rx_wdma[i].desc)
@@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	mtk_wed_hw_init(dev);
  	mtk_wed_configure_irq(dev, irq_mask);
-@@ -1505,7 +1506,8 @@ unlock:
+@@ -1498,7 +1499,8 @@ unlock:
  }
  
  static int
@@ -54,7 +54,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  {
  	struct mtk_wed_ring *ring = &dev->tx_ring[idx];
  
-@@ -1524,11 +1526,12 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
+@@ -1517,11 +1519,12 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
  	if (WARN_ON(idx >= ARRAY_SIZE(dev->tx_ring)))
  		return -EINVAL;
  
diff --git a/target/linux/generic/backport-5.15/729-23-v6.3-net-ethernet-mtk_wed-add-reset-to-rx_ring_setup-call.patch b/target/linux/generic/backport-5.15/729-23-v6.3-net-ethernet-mtk_wed-add-reset-to-rx_ring_setup-call.patch
index cf81acf491..c63628da99 100644
--- a/target/linux/generic/backport-5.15/729-23-v6.3-net-ethernet-mtk_wed-add-reset-to-rx_ring_setup-call.patch
+++ b/target/linux/generic/backport-5.15/729-23-v6.3-net-ethernet-mtk_wed-add-reset-to-rx_ring_setup-call.patch
@@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1259,7 +1259,8 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
+@@ -1252,7 +1252,8 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
  }
  
  static int
@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  {
  	u32 desc_size = sizeof(struct mtk_wdma_desc) * dev->hw->version;
  	struct mtk_wed_ring *wdma;
-@@ -1268,8 +1269,8 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
+@@ -1261,8 +1262,8 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
  		return -EINVAL;
  
  	wdma = &dev->tx_wdma[idx];
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		return -ENOMEM;
  
  	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE,
-@@ -1279,6 +1280,9 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
+@@ -1272,6 +1273,9 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
  	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_CPU_IDX, 0);
  	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_DMA_IDX, 0);
  
@@ -48,7 +48,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (!idx)  {
  		wed_w32(dev, MTK_WED_WDMA_RING_TX + MTK_WED_RING_OFS_BASE,
  			wdma->desc_phys);
-@@ -1618,18 +1622,20 @@ mtk_wed_txfree_ring_setup(struct mtk_wed
+@@ -1611,18 +1615,20 @@ mtk_wed_txfree_ring_setup(struct mtk_wed
  }
  
  static int
diff --git a/target/linux/generic/backport-5.15/730-15-v6.3-net-ethernet-mtk_wed-No-need-to-clear-memory-after-a.patch b/target/linux/generic/backport-5.15/730-15-v6.3-net-ethernet-mtk_wed-No-need-to-clear-memory-after-a.patch
index 74a77ddaca..a3bb1c5db7 100644
--- a/target/linux/generic/backport-5.15/730-15-v6.3-net-ethernet-mtk_wed-No-need-to-clear-memory-after-a.patch
+++ b/target/linux/generic/backport-5.15/730-15-v6.3-net-ethernet-mtk_wed-No-need-to-clear-memory-after-a.patch
@@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -786,7 +786,6 @@ mtk_wed_rro_ring_alloc(struct mtk_wed_de
+@@ -779,7 +779,6 @@ mtk_wed_rro_ring_alloc(struct mtk_wed_de
  
  	ring->desc_size = sizeof(*ring->desc);
  	ring->size = size;
diff --git a/target/linux/generic/backport-5.15/730-17-v6.3-net-ethernet-mtk_wed-fix-possible-deadlock-if-mtk_we.patch b/target/linux/generic/backport-5.15/730-17-v6.3-net-ethernet-mtk_wed-fix-possible-deadlock-if-mtk_we.patch
index d1c5fb6656..0afe7106e5 100644
--- a/target/linux/generic/backport-5.15/730-17-v6.3-net-ethernet-mtk_wed-fix-possible-deadlock-if-mtk_we.patch
+++ b/target/linux/generic/backport-5.15/730-17-v6.3-net-ethernet-mtk_wed-fix-possible-deadlock-if-mtk_we.patch
@@ -43,7 +43,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	mutex_unlock(&hw_lock);
  }
  
-@@ -1545,8 +1550,10 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1538,8 +1543,10 @@ mtk_wed_attach(struct mtk_wed_device *de
  		ret = mtk_wed_wo_init(hw);
  	}
  out:
diff --git a/target/linux/generic/backport-5.15/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch b/target/linux/generic/backport-5.15/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch
index 5875401b42..e4be17c9cb 100644
--- a/target/linux/generic/backport-5.15/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch
+++ b/target/linux/generic/backport-5.15/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch
@@ -530,7 +530,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  				pse_port = 8;
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1091,7 +1091,7 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1084,7 +1084,7 @@ mtk_wed_rx_reset(struct mtk_wed_device *
  	} else {
  		struct mtk_eth *eth = dev->hw->eth;
  
@@ -539,7 +539,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			wed_set(dev, MTK_WED_RESET_IDX,
  				MTK_WED_RESET_IDX_RX_V2);
  		else
-@@ -1813,7 +1813,7 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1806,7 +1806,7 @@ void mtk_wed_add_hw(struct device_node *
  	hw->wdma = wdma;
  	hw->index = index;
  	hw->irq = irq;
diff --git a/target/linux/generic/pending-5.15/736-01-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch b/target/linux/generic/backport-5.15/751-01-v6.4-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch
similarity index 94%
rename from target/linux/generic/pending-5.15/736-01-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch
rename to target/linux/generic/backport-5.15/751-01-v6.4-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch
index d648ba4dc7..0182526e10 100644
--- a/target/linux/generic/pending-5.15/736-01-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch
+++ b/target/linux/generic/backport-5.15/751-01-v6.4-net-ethernet-mtk_eth_soc-add-code-for-offloading-flo.patch
@@ -11,10 +11,15 @@ PPE device.
 
 Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
+ drivers/net/ethernet/mediatek/mtk_eth_soc.h   |   3 +
+ .../net/ethernet/mediatek/mtk_ppe_offload.c   |  37 ++++---
+ drivers/net/ethernet/mediatek/mtk_wed.c       | 101 ++++++++++++++++++
+ include/linux/soc/mediatek/mtk_wed.h          |   6 ++
+ 4 files changed, 133 insertions(+), 14 deletions(-)
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
-@@ -1448,6 +1448,9 @@ int mtk_gmac_rgmii_path_setup(struct mtk
+@@ -1432,6 +1432,9 @@ int mtk_gmac_rgmii_path_setup(struct mtk
  int mtk_eth_offload_init(struct mtk_eth *eth);
  int mtk_eth_setup_tc(struct net_device *dev, enum tc_setup_type type,
  		     void *type_data);
@@ -120,7 +125,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static void
  wed_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val)
  {
-@@ -1760,6 +1767,99 @@ out:
+@@ -1753,6 +1760,99 @@ out:
  	mutex_unlock(&hw_lock);
  }
  
@@ -220,7 +225,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth,
  		    void __iomem *wdma, phys_addr_t wdma_phy,
  		    int index)
-@@ -1779,6 +1879,7 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1772,6 +1872,7 @@ void mtk_wed_add_hw(struct device_node *
  		.irq_set_mask = mtk_wed_irq_set_mask,
  		.detach = mtk_wed_detach,
  		.ppe_check = mtk_wed_ppe_check,
diff --git a/target/linux/generic/pending-5.15/736-02-net-ethernet-mediatek-mtk_ppe-prefer-newly-added-l2-.patch b/target/linux/generic/backport-5.15/751-02-v6.4-net-ethernet-mediatek-mtk_ppe-prefer-newly-added-l2-.patch
similarity index 94%
rename from target/linux/generic/pending-5.15/736-02-net-ethernet-mediatek-mtk_ppe-prefer-newly-added-l2-.patch
rename to target/linux/generic/backport-5.15/751-02-v6.4-net-ethernet-mediatek-mtk_ppe-prefer-newly-added-l2-.patch
index e89d4cd97b..84b768bd79 100644
--- a/target/linux/generic/pending-5.15/736-02-net-ethernet-mediatek-mtk_ppe-prefer-newly-added-l2-.patch
+++ b/target/linux/generic/backport-5.15/751-02-v6.4-net-ethernet-mediatek-mtk_ppe-prefer-newly-added-l2-.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_ppe.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
-@@ -663,10 +663,20 @@ void mtk_foe_entry_clear(struct mtk_ppe
+@@ -662,10 +662,20 @@ void mtk_foe_entry_clear(struct mtk_ppe
  static int
  mtk_foe_entry_commit_l2(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
  {
diff --git a/target/linux/generic/pending-5.15/736-03-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch b/target/linux/generic/backport-5.15/751-03-v6.4-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch
similarity index 92%
rename from target/linux/generic/pending-5.15/736-03-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch
rename to target/linux/generic/backport-5.15/751-03-v6.4-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch
index c8be7a9e2b..a9f82ca3cb 100644
--- a/target/linux/generic/pending-5.15/736-03-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch
+++ b/target/linux/generic/backport-5.15/751-03-v6.4-net-ethernet-mtk_eth_soc-improve-keeping-track-of-of.patch
@@ -9,10 +9,13 @@ flow accounting support.
 
 Signed-off-by: Felix Fietkau <nbd at nbd.name>
 ---
+ drivers/net/ethernet/mediatek/mtk_ppe.c | 162 ++++++++++++------------
+ drivers/net/ethernet/mediatek/mtk_ppe.h |  15 +--
+ 2 files changed, 86 insertions(+), 91 deletions(-)
 
 --- a/drivers/net/ethernet/mediatek/mtk_ppe.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
-@@ -483,42 +483,43 @@ int mtk_foe_entry_set_queue(struct mtk_e
+@@ -482,42 +482,43 @@ int mtk_foe_entry_set_queue(struct mtk_e
  	return 0;
  }
  
@@ -72,7 +75,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, entry->hash);
  
  		hwe->ib1 &= ~MTK_FOE_IB1_STATE;
-@@ -538,7 +539,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
+@@ -537,7 +538,8 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
  	if (entry->type != MTK_FLOW_TYPE_L2_SUBFLOW)
  		return;
  
@@ -82,7 +85,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	kfree(entry);
  }
  
-@@ -554,66 +556,55 @@ static int __mtk_foe_entry_idle_time(str
+@@ -553,66 +555,55 @@ static int __mtk_foe_entry_idle_time(str
  		return now - timestamp;
  }
  
@@ -178,7 +181,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  static void
-@@ -656,7 +647,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
+@@ -655,7 +646,8 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
  void mtk_foe_entry_clear(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
  {
  	spin_lock_bh(&ppe_lock);
@@ -188,7 +191,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	spin_unlock_bh(&ppe_lock);
  }
  
-@@ -703,8 +695,8 @@ mtk_foe_entry_commit_subflow(struct mtk_
+@@ -702,8 +694,8 @@ mtk_foe_entry_commit_subflow(struct mtk_
  {
  	const struct mtk_soc_data *soc = ppe->eth->soc;
  	struct mtk_flow_entry *flow_info;
@@ -198,7 +201,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	u32 ib1_mask = mtk_get_ib1_pkt_type_mask(ppe->eth) | MTK_FOE_IB1_UDP;
  	int type;
  
-@@ -712,30 +704,30 @@ mtk_foe_entry_commit_subflow(struct mtk_
+@@ -711,30 +703,30 @@ mtk_foe_entry_commit_subflow(struct mtk_
  	if (!flow_info)
  		return;
  
@@ -239,7 +242,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  void __mtk_ppe_check_skb(struct mtk_ppe *ppe, struct sk_buff *skb, u16 hash)
-@@ -745,9 +737,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe
+@@ -744,9 +736,11 @@ void __mtk_ppe_check_skb(struct mtk_ppe
  	struct mtk_foe_entry *hwe = mtk_foe_get_entry(ppe, hash);
  	struct mtk_flow_entry *entry;
  	struct mtk_foe_bridge key = {};
@@ -251,7 +254,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	u8 *tag;
  
  	spin_lock_bh(&ppe_lock);
-@@ -755,20 +749,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe
+@@ -754,20 +748,14 @@ void __mtk_ppe_check_skb(struct mtk_ppe
  	if (FIELD_GET(MTK_FOE_IB1_STATE, hwe->ib1) == MTK_FOE_STATE_BIND)
  		goto out;
  
@@ -278,7 +281,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			continue;
  		}
  
-@@ -819,9 +807,17 @@ out:
+@@ -816,9 +804,17 @@ out:
  
  int mtk_foe_entry_idle_time(struct mtk_ppe *ppe, struct mtk_flow_entry *entry)
  {
diff --git a/target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch b/target/linux/generic/backport-5.15/751-04-v6.4-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
similarity index 93%
rename from target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
rename to target/linux/generic/backport-5.15/751-04-v6.4-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
index 7f04fd9fa8..832d91936b 100644
--- a/target/linux/generic/pending-5.15/736-04-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
+++ b/target/linux/generic/backport-5.15/751-04-v6.4-net-ethernet-mediatek-fix-ppe-flow-accounting-for-L2.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_ppe.c
 +++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
-@@ -80,9 +80,9 @@ static int mtk_ppe_mib_wait_busy(struct
+@@ -79,9 +79,9 @@ static int mtk_ppe_mib_wait_busy(struct
  	int ret;
  	u32 val;
  
@@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (ret)
  		dev_err(ppe->dev, "MIB table busy");
-@@ -90,17 +90,31 @@ static int mtk_ppe_mib_wait_busy(struct
+@@ -89,17 +89,31 @@ static int mtk_ppe_mib_wait_busy(struct
  	return ret;
  }
  
@@ -61,7 +61,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	cnt_r0 = readl(ppe->base + MTK_PPE_MIB_SER_R0);
  	cnt_r1 = readl(ppe->base + MTK_PPE_MIB_SER_R1);
-@@ -109,19 +123,19 @@ static int mtk_mib_entry_read(struct mtk
+@@ -108,19 +122,19 @@ static int mtk_mib_entry_read(struct mtk
  	if (mtk_is_netsys_v3_or_greater(ppe->eth)) {
  		/* 64 bit for each counter */
  		u32 cnt_r3 = readl(ppe->base + MTK_PPE_MIB_SER_R3);
@@ -86,7 +86,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  static void mtk_ppe_cache_clear(struct mtk_ppe *ppe)
-@@ -526,13 +540,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
+@@ -525,13 +539,6 @@ __mtk_foe_entry_clear(struct mtk_ppe *pp
  		hwe->ib1 |= FIELD_PREP(MTK_FOE_IB1_STATE, MTK_FOE_STATE_INVALID);
  		dma_wmb();
  		mtk_ppe_cache_clear(ppe);
@@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	}
  	entry->hash = 0xffff;
  
-@@ -557,11 +564,14 @@ static int __mtk_foe_entry_idle_time(str
+@@ -556,11 +563,14 @@ static int __mtk_foe_entry_idle_time(str
  }
  
  static bool
@@ -116,7 +116,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	int len;
  
  	if (hash == 0xffff)
-@@ -572,18 +582,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp
+@@ -571,18 +581,35 @@ mtk_flow_entry_update(struct mtk_ppe *pp
  	memcpy(&foe, hwe, len);
  
  	if (!mtk_flow_entry_match(ppe->eth, entry, &foe, len) ||
@@ -155,7 +155,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	struct mtk_flow_entry *cur;
  	struct hlist_node *tmp;
  	int idle;
-@@ -592,7 +619,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe
+@@ -591,7 +618,9 @@ mtk_flow_entry_update_l2(struct mtk_ppe
  	hlist_for_each_entry_safe(cur, tmp, &entry->l2_flows, l2_list) {
  		int cur_idle;
  
@@ -166,7 +166,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			__mtk_foe_entry_clear(ppe, entry, false);
  			continue;
  		}
-@@ -607,10 +636,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe
+@@ -606,10 +635,29 @@ mtk_flow_entry_update_l2(struct mtk_ppe
  	}
  }
  
@@ -196,7 +196,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	struct mtk_eth *eth = ppe->eth;
  	u16 timestamp = mtk_eth_timestamp(eth);
  	struct mtk_foe_entry *hwe;
-@@ -641,6 +689,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
+@@ -640,6 +688,12 @@ __mtk_foe_entry_commit(struct mtk_ppe *p
  
  	dma_wmb();
  
@@ -209,7 +209,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	mtk_ppe_cache_clear(ppe);
  }
  
-@@ -805,21 +859,6 @@ out:
+@@ -802,21 +856,6 @@ out:
  	spin_unlock_bh(&ppe_lock);
  }
  
@@ -231,7 +231,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  int mtk_ppe_prepare_reset(struct mtk_ppe *ppe)
  {
  	if (!ppe)
-@@ -847,32 +886,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe
+@@ -844,32 +883,6 @@ int mtk_ppe_prepare_reset(struct mtk_ppe
  	return mtk_ppe_wait_busy(ppe);
  }
  
diff --git a/target/linux/generic/backport-5.15/752-01-v6.6-net-ethernet-mtk_wed-add-some-more-info-in-wed_txinf.patch b/target/linux/generic/backport-5.15/752-01-v6.6-net-ethernet-mtk_wed-add-some-more-info-in-wed_txinf.patch
new file mode 100644
index 0000000000..a224b62624
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-01-v6.6-net-ethernet-mtk_wed-add-some-more-info-in-wed_txinf.patch
@@ -0,0 +1,45 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Sun, 27 Aug 2023 19:31:41 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: add some more info in wed_txinfo_show
+ handler
+
+Add some new info in Wireless Ethernet Dispatcher wed_txinfo_show
+debugfs handler useful during debugging.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Link: https://lore.kernel.org/r/3390292655d568180b73d2a25576f61aa63310e5.1693157377.git.lorenzo at kernel.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
+@@ -127,8 +127,17 @@ wed_txinfo_show(struct seq_file *s, void
+ 		DUMP_WDMA_RING(WDMA_RING_RX(0)),
+ 		DUMP_WDMA_RING(WDMA_RING_RX(1)),
+ 
+-		DUMP_STR("TX FREE"),
++		DUMP_STR("WED TX FREE"),
+ 		DUMP_WED(WED_RX_MIB(0)),
++		DUMP_WED_RING(WED_RING_RX(0)),
++		DUMP_WED(WED_WPDMA_RX_COHERENT_MIB(0)),
++		DUMP_WED(WED_RX_MIB(1)),
++		DUMP_WED_RING(WED_RING_RX(1)),
++		DUMP_WED(WED_WPDMA_RX_COHERENT_MIB(1)),
++
++		DUMP_STR("WED WPDMA TX FREE"),
++		DUMP_WED_RING(WED_WPDMA_RING_RX(0)),
++		DUMP_WED_RING(WED_WPDMA_RING_RX(1)),
+ 	};
+ 	struct mtk_wed_hw *hw = s->private;
+ 	struct mtk_wed_device *dev = hw->wed_dev;
+--- a/drivers/net/ethernet/mediatek/mtk_wed_regs.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed_regs.h
+@@ -266,6 +266,8 @@ struct mtk_wdma_desc {
+ 
+ #define MTK_WED_WPDMA_TX_MIB(_n)			(0x5a0 + (_n) * 4)
+ #define MTK_WED_WPDMA_TX_COHERENT_MIB(_n)		(0x5d0 + (_n) * 4)
++#define MTK_WED_WPDMA_RX_MIB(_n)			(0x5e0 + (_n) * 4)
++#define MTK_WED_WPDMA_RX_COHERENT_MIB(_n)		(0x5f0 + (_n) * 4)
+ 
+ #define MTK_WED_WPDMA_RING_TX(_n)			(0x600 + (_n) * 0x10)
+ #define MTK_WED_WPDMA_RING_RX(_n)			(0x700 + (_n) * 0x10)
diff --git a/target/linux/generic/backport-5.15/752-02-v6.6-net-ethernet-mtk_wed-minor-change-in-wed_-tx-rx-info.patch b/target/linux/generic/backport-5.15/752-02-v6.6-net-ethernet-mtk_wed-minor-change-in-wed_-tx-rx-info.patch
new file mode 100644
index 0000000000..df6edfdf94
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-02-v6.6-net-ethernet-mtk_wed-minor-change-in-wed_-tx-rx-info.patch
@@ -0,0 +1,47 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Sun, 27 Aug 2023 19:33:47 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: minor change in wed_{tx,rx}info_show
+
+No functional changes, just cosmetic ones.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Link: https://lore.kernel.org/r/71e046c72a978745f0435af265dda610aa9bfbcf.1693157578.git.lorenzo at kernel.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
+@@ -84,7 +84,6 @@ dump_wed_regs(struct seq_file *s, struct
+ 	}
+ }
+ 
+-
+ static int
+ wed_txinfo_show(struct seq_file *s, void *data)
+ {
+@@ -142,10 +141,8 @@ wed_txinfo_show(struct seq_file *s, void
+ 	struct mtk_wed_hw *hw = s->private;
+ 	struct mtk_wed_device *dev = hw->wed_dev;
+ 
+-	if (!dev)
+-		return 0;
+-
+-	dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
++	if (dev)
++		dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
+ 
+ 	return 0;
+ }
+@@ -217,10 +214,8 @@ wed_rxinfo_show(struct seq_file *s, void
+ 	struct mtk_wed_hw *hw = s->private;
+ 	struct mtk_wed_device *dev = hw->wed_dev;
+ 
+-	if (!dev)
+-		return 0;
+-
+-	dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
++	if (dev)
++		dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
+ 
+ 	return 0;
+ }
diff --git a/target/linux/generic/backport-5.15/752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch b/target/linux/generic/backport-5.15/752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch
new file mode 100644
index 0000000000..0bf9dea24f
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-03-v6.6-net-ethernet-mtk_eth_soc-rely-on-mtk_pse_port-defini.patch
@@ -0,0 +1,29 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Tue, 12 Sep 2023 10:22:56 +0200
+Subject: [PATCH] net: ethernet: mtk_eth_soc: rely on mtk_pse_port definitions
+ in mtk_flow_set_output_device
+
+Similar to ethernet ports, rely on mtk_pse_port definitions for
+pse wdma ports as well.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Link: https://lore.kernel.org/r/b86bdb717e963e3246c1dec5f736c810703cf056.1694506814.git.lorenzo at kernel.org
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -196,10 +196,10 @@ mtk_flow_set_output_device(struct mtk_et
+ 		if (mtk_is_netsys_v2_or_greater(eth)) {
+ 			switch (info.wdma_idx) {
+ 			case 0:
+-				pse_port = 8;
++				pse_port = PSE_WDMA0_PORT;
+ 				break;
+ 			case 1:
+-				pse_port = 9;
++				pse_port = PSE_WDMA1_PORT;
+ 				break;
+ 			default:
+ 				return -EINVAL;
diff --git a/target/linux/generic/backport-5.15/752-04-v6.6-net-ethernet-mtk_wed-check-update_wo_rx_stats-in-mtk.patch b/target/linux/generic/backport-5.15/752-04-v6.6-net-ethernet-mtk_wed-check-update_wo_rx_stats-in-mtk.patch
new file mode 100644
index 0000000000..c99e1334d4
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-04-v6.6-net-ethernet-mtk_wed-check-update_wo_rx_stats-in-mtk.patch
@@ -0,0 +1,26 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Tue, 12 Sep 2023 10:28:00 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: check update_wo_rx_stats in
+ mtk_wed_update_rx_stats()
+
+Check if update_wo_rx_stats function pointer is properly set in
+mtk_wed_update_rx_stats routine before accessing it.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Link: https://lore.kernel.org/r/b0d233386e059bccb59f18f69afb79a7806e5ded.1694507226.git.lorenzo at kernel.org
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
+@@ -68,6 +68,9 @@ mtk_wed_update_rx_stats(struct mtk_wed_d
+ 	struct mtk_wed_wo_rx_stats *stats;
+ 	int i;
+ 
++	if (!wed->wlan.update_wo_rx_stats)
++		return;
++
+ 	if (count * sizeof(*stats) > skb->len - sizeof(u32))
+ 		return;
+ 
diff --git a/target/linux/generic/backport-5.15/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch b/target/linux/generic/backport-5.15/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch
new file mode 100644
index 0000000000..cd7fb92e20
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch
@@ -0,0 +1,68 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Wed, 13 Sep 2023 20:42:47 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: do not assume offload callbacks are
+ always set
+
+Check if wlan.offload_enable and wlan.offload_disable callbacks are set
+in mtk_wed_flow_add/mtk_wed_flow_remove since mt7996 will not rely
+on them.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Reviewed-by: Simon Horman <horms at kernel.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -1712,19 +1712,20 @@ mtk_wed_irq_set_mask(struct mtk_wed_devi
+ int mtk_wed_flow_add(int index)
+ {
+ 	struct mtk_wed_hw *hw = hw_list[index];
+-	int ret;
++	int ret = 0;
+ 
+-	if (!hw || !hw->wed_dev)
+-		return -ENODEV;
++	mutex_lock(&hw_lock);
+ 
+-	if (hw->num_flows) {
+-		hw->num_flows++;
+-		return 0;
++	if (!hw || !hw->wed_dev) {
++		ret = -ENODEV;
++		goto out;
+ 	}
+ 
+-	mutex_lock(&hw_lock);
+-	if (!hw->wed_dev) {
+-		ret = -ENODEV;
++	if (!hw->wed_dev->wlan.offload_enable)
++		goto out;
++
++	if (hw->num_flows) {
++		hw->num_flows++;
+ 		goto out;
+ 	}
+ 
+@@ -1743,14 +1744,15 @@ void mtk_wed_flow_remove(int index)
+ {
+ 	struct mtk_wed_hw *hw = hw_list[index];
+ 
+-	if (!hw)
+-		return;
++	mutex_lock(&hw_lock);
+ 
+-	if (--hw->num_flows)
+-		return;
++	if (!hw || !hw->wed_dev)
++		goto out;
+ 
+-	mutex_lock(&hw_lock);
+-	if (!hw->wed_dev)
++	if (!hw->wed_dev->wlan.offload_disable)
++		goto out;
++
++	if (--hw->num_flows)
+ 		goto out;
+ 
+ 	hw->wed_dev->wlan.offload_disable(hw->wed_dev);
diff --git a/target/linux/generic/backport-5.15/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch b/target/linux/generic/backport-5.15/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch
new file mode 100644
index 0000000000..2948188650
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch
@@ -0,0 +1,232 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:05 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: introduce versioning utility routines
+
+Similar to mtk_eth_soc, introduce the following wed versioning
+utility routines:
+- mtk_wed_is_v1
+- mtk_wed_is_v2
+
+This is a preliminary patch to introduce WED support for MT7988 SoC
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -277,7 +277,7 @@ mtk_wed_assign(struct mtk_wed_device *de
+ 		if (!hw->wed_dev)
+ 			goto out;
+ 
+-		if (hw->version == 1)
++		if (mtk_wed_is_v1(hw))
+ 			return NULL;
+ 
+ 		/* MT7986 WED devices do not have any pcie slot restrictions */
+@@ -358,7 +358,7 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+ 			desc->buf0 = cpu_to_le32(buf_phys);
+ 			desc->buf1 = cpu_to_le32(buf_phys + txd_size);
+ 
+-			if (dev->hw->version == 1)
++			if (mtk_wed_is_v1(dev->hw))
+ 				ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size) |
+ 				       FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1,
+ 						  MTK_WED_BUF_SIZE - txd_size) |
+@@ -497,7 +497,7 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
+ {
+ 	u32 mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
+ 
+-	if (dev->hw->version == 1)
++	if (mtk_wed_is_v1(dev->hw))
+ 		mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR;
+ 	else
+ 		mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH |
+@@ -576,7 +576,7 @@ mtk_wed_dma_disable(struct mtk_wed_devic
+ 		 MTK_WDMA_GLO_CFG_RX_INFO1_PRERES |
+ 		 MTK_WDMA_GLO_CFG_RX_INFO2_PRERES);
+ 
+-	if (dev->hw->version == 1) {
++	if (mtk_wed_is_v1(dev->hw)) {
+ 		regmap_write(dev->hw->mirror, dev->hw->index * 4, 0);
+ 		wdma_clr(dev, MTK_WDMA_GLO_CFG,
+ 			 MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
+@@ -605,7 +605,7 @@ mtk_wed_stop(struct mtk_wed_device *dev)
+ 	wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
+ 	wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
+ 
+-	if (dev->hw->version == 1)
++	if (mtk_wed_is_v1(dev->hw))
+ 		return;
+ 
+ 	wed_w32(dev, MTK_WED_EXT_INT_MASK1, 0);
+@@ -624,7 +624,7 @@ mtk_wed_deinit(struct mtk_wed_device *de
+ 		MTK_WED_CTRL_WED_TX_BM_EN |
+ 		MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
+ 
+-	if (dev->hw->version == 1)
++	if (mtk_wed_is_v1(dev->hw))
+ 		return;
+ 
+ 	wed_clr(dev, MTK_WED_CTRL,
+@@ -730,7 +730,7 @@ mtk_wed_bus_init(struct mtk_wed_device *
+ static void
+ mtk_wed_set_wpdma(struct mtk_wed_device *dev)
+ {
+-	if (dev->hw->version == 1) {
++	if (mtk_wed_is_v1(dev->hw)) {
+ 		wed_w32(dev, MTK_WED_WPDMA_CFG_BASE,  dev->wlan.wpdma_phys);
+ 	} else {
+ 		mtk_wed_bus_init(dev);
+@@ -761,7 +761,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
+ 	      MTK_WED_WDMA_GLO_CFG_IDLE_DMAD_SUPPLY;
+ 	wed_m32(dev, MTK_WED_WDMA_GLO_CFG, mask, set);
+ 
+-	if (dev->hw->version == 1) {
++	if (mtk_wed_is_v1(dev->hw)) {
+ 		u32 offset = dev->hw->index ? 0x04000400 : 0;
+ 
+ 		wdma_set(dev, MTK_WDMA_GLO_CFG,
+@@ -934,7 +934,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+ 
+ 	wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE);
+ 
+-	if (dev->hw->version == 1) {
++	if (mtk_wed_is_v1(dev->hw)) {
+ 		wed_w32(dev, MTK_WED_TX_BM_TKID,
+ 			FIELD_PREP(MTK_WED_TX_BM_TKID_START,
+ 				   dev->wlan.token_start) |
+@@ -967,7 +967,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+ 
+ 	mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
+ 
+-	if (dev->hw->version == 1) {
++	if (mtk_wed_is_v1(dev->hw)) {
+ 		wed_set(dev, MTK_WED_CTRL,
+ 			MTK_WED_CTRL_WED_TX_BM_EN |
+ 			MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
+@@ -1217,7 +1217,7 @@ mtk_wed_reset_dma(struct mtk_wed_device
+ 	}
+ 
+ 	dev->init_done = false;
+-	if (dev->hw->version == 1)
++	if (mtk_wed_is_v1(dev->hw))
+ 		return;
+ 
+ 	if (!busy) {
+@@ -1343,7 +1343,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+ 		MTK_WED_CTRL_WED_TX_BM_EN |
+ 		MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
+ 
+-	if (dev->hw->version == 1) {
++	if (mtk_wed_is_v1(dev->hw)) {
+ 		wed_w32(dev, MTK_WED_PCIE_INT_TRIGGER,
+ 			MTK_WED_PCIE_INT_TRIGGER_STATUS);
+ 
+@@ -1416,7 +1416,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
+ 		 MTK_WDMA_GLO_CFG_RX_INFO1_PRERES |
+ 		 MTK_WDMA_GLO_CFG_RX_INFO2_PRERES);
+ 
+-	if (dev->hw->version == 1) {
++	if (mtk_wed_is_v1(dev->hw)) {
+ 		wdma_set(dev, MTK_WDMA_GLO_CFG,
+ 			 MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
+ 	} else {
+@@ -1465,7 +1465,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+ 
+ 	mtk_wed_set_ext_int(dev, true);
+ 
+-	if (dev->hw->version == 1) {
++	if (mtk_wed_is_v1(dev->hw)) {
+ 		u32 val = dev->wlan.wpdma_phys | MTK_PCIE_MIRROR_MAP_EN |
+ 			  FIELD_PREP(MTK_PCIE_MIRROR_MAP_WED_ID,
+ 				     dev->hw->index);
+@@ -1550,7 +1550,7 @@ mtk_wed_attach(struct mtk_wed_device *de
+ 	}
+ 
+ 	mtk_wed_hw_init_early(dev);
+-	if (hw->version == 1) {
++	if (mtk_wed_is_v1(hw)) {
+ 		regmap_update_bits(hw->hifsys, HIFSYS_DMA_AG_MAP,
+ 				   BIT(hw->index), 0);
+ 	} else {
+@@ -1618,7 +1618,7 @@ static int
+ mtk_wed_txfree_ring_setup(struct mtk_wed_device *dev, void __iomem *regs)
+ {
+ 	struct mtk_wed_ring *ring = &dev->txfree_ring;
+-	int i, index = dev->hw->version == 1;
++	int i, index = mtk_wed_is_v1(dev->hw);
+ 
+ 	/*
+ 	 * For txfree event handling, the same DMA ring is shared between WED
+@@ -1676,7 +1676,7 @@ mtk_wed_irq_get(struct mtk_wed_device *d
+ {
+ 	u32 val, ext_mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
+ 
+-	if (dev->hw->version == 1)
++	if (mtk_wed_is_v1(dev->hw))
+ 		ext_mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR;
+ 	else
+ 		ext_mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH |
+@@ -1843,7 +1843,7 @@ mtk_wed_setup_tc(struct mtk_wed_device *
+ {
+ 	struct mtk_wed_hw *hw = wed->hw;
+ 
+-	if (hw->version < 2)
++	if (mtk_wed_is_v1(hw))
+ 		return -EOPNOTSUPP;
+ 
+ 	switch (type) {
+@@ -1917,9 +1917,9 @@ void mtk_wed_add_hw(struct device_node *
+ 	hw->wdma = wdma;
+ 	hw->index = index;
+ 	hw->irq = irq;
+-	hw->version = mtk_is_netsys_v1(eth) ? 1 : 2;
++	hw->version = eth->soc->version;
+ 
+-	if (hw->version == 1) {
++	if (mtk_wed_is_v1(hw)) {
+ 		hw->mirror = syscon_regmap_lookup_by_phandle(eth_np,
+ 				"mediatek,pcie-mirror");
+ 		hw->hifsys = syscon_regmap_lookup_by_phandle(eth_np,
+--- a/drivers/net/ethernet/mediatek/mtk_wed.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed.h
+@@ -40,6 +40,16 @@ struct mtk_wdma_info {
+ };
+ 
+ #ifdef CONFIG_NET_MEDIATEK_SOC_WED
++static inline bool mtk_wed_is_v1(struct mtk_wed_hw *hw)
++{
++	return hw->version == 1;
++}
++
++static inline bool mtk_wed_is_v2(struct mtk_wed_hw *hw)
++{
++	return hw->version == 2;
++}
++
+ static inline void
+ wed_w32(struct mtk_wed_device *dev, u32 reg, u32 val)
+ {
+--- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
+@@ -263,7 +263,7 @@ void mtk_wed_hw_add_debugfs(struct mtk_w
+ 	debugfs_create_u32("regidx", 0600, dir, &hw->debugfs_reg);
+ 	debugfs_create_file_unsafe("regval", 0600, dir, hw, &fops_regval);
+ 	debugfs_create_file_unsafe("txinfo", 0400, dir, hw, &wed_txinfo_fops);
+-	if (hw->version != 1)
++	if (!mtk_wed_is_v1(hw))
+ 		debugfs_create_file_unsafe("rxinfo", 0400, dir, hw,
+ 					   &wed_rxinfo_fops);
+ }
+--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
+@@ -207,7 +207,7 @@ int mtk_wed_mcu_msg_update(struct mtk_we
+ {
+ 	struct mtk_wed_wo *wo = dev->hw->wed_wo;
+ 
+-	if (dev->hw->version == 1)
++	if (mtk_wed_is_v1(dev->hw))
+ 		return 0;
+ 
+ 	if (WARN_ON(!wo))
diff --git a/target/linux/generic/backport-5.15/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch b/target/linux/generic/backport-5.15/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch
new file mode 100644
index 0000000000..bc34aa33a9
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch
@@ -0,0 +1,234 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:06 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: do not configure rx offload if not
+ supported
+
+Check if rx offload is supported running mtk_wed_get_rx_capa routine
+before configuring it. This is a preliminary patch to introduce Wireless
+Ethernet Dispatcher (WED) support for MT7988 SoC.
+
+Co-developed-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -605,7 +605,7 @@ mtk_wed_stop(struct mtk_wed_device *dev)
+ 	wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
+ 	wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
+ 
+-	if (mtk_wed_is_v1(dev->hw))
++	if (!mtk_wed_get_rx_capa(dev))
+ 		return;
+ 
+ 	wed_w32(dev, MTK_WED_EXT_INT_MASK1, 0);
+@@ -732,16 +732,21 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+ {
+ 	if (mtk_wed_is_v1(dev->hw)) {
+ 		wed_w32(dev, MTK_WED_WPDMA_CFG_BASE,  dev->wlan.wpdma_phys);
+-	} else {
+-		mtk_wed_bus_init(dev);
+-
+-		wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_int);
+-		wed_w32(dev, MTK_WED_WPDMA_CFG_INT_MASK, dev->wlan.wpdma_mask);
+-		wed_w32(dev, MTK_WED_WPDMA_CFG_TX, dev->wlan.wpdma_tx);
+-		wed_w32(dev, MTK_WED_WPDMA_CFG_TX_FREE, dev->wlan.wpdma_txfree);
+-		wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
+-		wed_w32(dev, MTK_WED_WPDMA_RX_RING, dev->wlan.wpdma_rx);
++		return;
+ 	}
++
++	mtk_wed_bus_init(dev);
++
++	wed_w32(dev, MTK_WED_WPDMA_CFG_BASE, dev->wlan.wpdma_int);
++	wed_w32(dev, MTK_WED_WPDMA_CFG_INT_MASK, dev->wlan.wpdma_mask);
++	wed_w32(dev, MTK_WED_WPDMA_CFG_TX, dev->wlan.wpdma_tx);
++	wed_w32(dev, MTK_WED_WPDMA_CFG_TX_FREE, dev->wlan.wpdma_txfree);
++
++	if (!mtk_wed_get_rx_capa(dev))
++		return;
++
++	wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
++	wed_w32(dev, MTK_WED_WPDMA_RX_RING, dev->wlan.wpdma_rx);
+ }
+ 
+ static void
+@@ -973,15 +978,17 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+ 			MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
+ 	} else {
+ 		wed_clr(dev, MTK_WED_TX_TKID_CTRL, MTK_WED_TX_TKID_CTRL_PAUSE);
+-		/* rx hw init */
+-		wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX,
+-			MTK_WED_WPDMA_RX_D_RST_CRX_IDX |
+-			MTK_WED_WPDMA_RX_D_RST_DRV_IDX);
+-		wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX, 0);
+-
+-		mtk_wed_rx_buffer_hw_init(dev);
+-		mtk_wed_rro_hw_init(dev);
+-		mtk_wed_route_qm_hw_init(dev);
++		if (mtk_wed_get_rx_capa(dev)) {
++			/* rx hw init */
++			wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX,
++				MTK_WED_WPDMA_RX_D_RST_CRX_IDX |
++				MTK_WED_WPDMA_RX_D_RST_DRV_IDX);
++			wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX, 0);
++
++			mtk_wed_rx_buffer_hw_init(dev);
++			mtk_wed_rro_hw_init(dev);
++			mtk_wed_route_qm_hw_init(dev);
++		}
+ 	}
+ 
+ 	wed_clr(dev, MTK_WED_TX_BM_CTRL, MTK_WED_TX_BM_CTRL_PAUSE);
+@@ -1353,8 +1360,6 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+ 
+ 		wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask);
+ 	} else {
+-		wdma_mask |= FIELD_PREP(MTK_WDMA_INT_MASK_TX_DONE,
+-					GENMASK(1, 0));
+ 		/* initail tx interrupt trigger */
+ 		wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX,
+ 			MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN |
+@@ -1373,15 +1378,20 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+ 			FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_TX_FREE_DONE_TRIG,
+ 				   dev->wlan.txfree_tbit));
+ 
+-		wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_RX,
+-			MTK_WED_WPDMA_INT_CTRL_RX0_EN |
+-			MTK_WED_WPDMA_INT_CTRL_RX0_CLR |
+-			MTK_WED_WPDMA_INT_CTRL_RX1_EN |
+-			MTK_WED_WPDMA_INT_CTRL_RX1_CLR |
+-			FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RX0_DONE_TRIG,
+-				   dev->wlan.rx_tbit[0]) |
+-			FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RX1_DONE_TRIG,
+-				   dev->wlan.rx_tbit[1]));
++		if (mtk_wed_get_rx_capa(dev)) {
++			wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_RX,
++				MTK_WED_WPDMA_INT_CTRL_RX0_EN |
++				MTK_WED_WPDMA_INT_CTRL_RX0_CLR |
++				MTK_WED_WPDMA_INT_CTRL_RX1_EN |
++				MTK_WED_WPDMA_INT_CTRL_RX1_CLR |
++				FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RX0_DONE_TRIG,
++					   dev->wlan.rx_tbit[0]) |
++				FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RX1_DONE_TRIG,
++					   dev->wlan.rx_tbit[1]));
++
++			wdma_mask |= FIELD_PREP(MTK_WDMA_INT_MASK_TX_DONE,
++						GENMASK(1, 0));
++		}
+ 
+ 		wed_w32(dev, MTK_WED_WDMA_INT_CLR, wdma_mask);
+ 		wed_set(dev, MTK_WED_WDMA_INT_CTRL,
+@@ -1400,6 +1410,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+ static void
+ mtk_wed_dma_enable(struct mtk_wed_device *dev)
+ {
++	int i;
++
+ 	wed_set(dev, MTK_WED_WPDMA_INT_CTRL, MTK_WED_WPDMA_INT_CTRL_SUBRT_ADV);
+ 
+ 	wed_set(dev, MTK_WED_GLO_CFG,
+@@ -1419,33 +1431,33 @@ mtk_wed_dma_enable(struct mtk_wed_device
+ 	if (mtk_wed_is_v1(dev->hw)) {
+ 		wdma_set(dev, MTK_WDMA_GLO_CFG,
+ 			 MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
+-	} else {
+-		int i;
++		return;
++	}
+ 
+-		wed_set(dev, MTK_WED_WPDMA_CTRL,
+-			MTK_WED_WPDMA_CTRL_SDL1_FIXED);
++	wed_set(dev, MTK_WED_WPDMA_CTRL,
++		MTK_WED_WPDMA_CTRL_SDL1_FIXED);
++	wed_set(dev, MTK_WED_WPDMA_GLO_CFG,
++		MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_PKT_PROC |
++		MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_CRX_SYNC);
++	wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
++		MTK_WED_WPDMA_GLO_CFG_TX_TKID_KEEP |
++		MTK_WED_WPDMA_GLO_CFG_TX_DMAD_DW3_PREV);
+ 
+-		wed_set(dev, MTK_WED_WDMA_GLO_CFG,
+-			MTK_WED_WDMA_GLO_CFG_TX_DRV_EN |
+-			MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK);
++	if (!mtk_wed_get_rx_capa(dev))
++		return;
+ 
+-		wed_set(dev, MTK_WED_WPDMA_GLO_CFG,
+-			MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_PKT_PROC |
+-			MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_CRX_SYNC);
+-
+-		wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
+-			MTK_WED_WPDMA_GLO_CFG_TX_TKID_KEEP |
+-			MTK_WED_WPDMA_GLO_CFG_TX_DMAD_DW3_PREV);
++	wed_set(dev, MTK_WED_WDMA_GLO_CFG,
++		MTK_WED_WDMA_GLO_CFG_TX_DRV_EN |
++		MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK);
+ 
+-		wed_set(dev, MTK_WED_WPDMA_RX_D_GLO_CFG,
+-			MTK_WED_WPDMA_RX_D_RX_DRV_EN |
+-			FIELD_PREP(MTK_WED_WPDMA_RX_D_RXD_READ_LEN, 0x18) |
+-			FIELD_PREP(MTK_WED_WPDMA_RX_D_INIT_PHASE_RXEN_SEL,
+-				   0x2));
++	wed_set(dev, MTK_WED_WPDMA_RX_D_GLO_CFG,
++		MTK_WED_WPDMA_RX_D_RX_DRV_EN |
++		FIELD_PREP(MTK_WED_WPDMA_RX_D_RXD_READ_LEN, 0x18) |
++		FIELD_PREP(MTK_WED_WPDMA_RX_D_INIT_PHASE_RXEN_SEL,
++			   0x2));
+ 
+-		for (i = 0; i < MTK_WED_RX_QUEUES; i++)
+-			mtk_wed_check_wfdma_rx_fill(dev, i);
+-	}
++	for (i = 0; i < MTK_WED_RX_QUEUES; i++)
++		mtk_wed_check_wfdma_rx_fill(dev, i);
+ }
+ 
+ static void
+@@ -1472,7 +1484,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+ 
+ 		val |= BIT(0) | (BIT(1) * !!dev->hw->index);
+ 		regmap_write(dev->hw->mirror, dev->hw->index * 4, val);
+-	} else {
++	} else if (mtk_wed_get_rx_capa(dev)) {
+ 		/* driver set mid ready and only once */
+ 		wed_w32(dev, MTK_WED_EXT_INT_MASK1,
+ 			MTK_WED_EXT_INT_STATUS_WPDMA_MID_RDY);
+@@ -1484,7 +1496,6 @@ mtk_wed_start(struct mtk_wed_device *dev
+ 
+ 		if (mtk_wed_rro_cfg(dev))
+ 			return;
+-
+ 	}
+ 
+ 	mtk_wed_set_512_support(dev, dev->wlan.wcid_512);
+@@ -1550,13 +1561,14 @@ mtk_wed_attach(struct mtk_wed_device *de
+ 	}
+ 
+ 	mtk_wed_hw_init_early(dev);
+-	if (mtk_wed_is_v1(hw)) {
++	if (mtk_wed_is_v1(hw))
+ 		regmap_update_bits(hw->hifsys, HIFSYS_DMA_AG_MAP,
+ 				   BIT(hw->index), 0);
+-	} else {
++	else
+ 		dev->rev_id = wed_r32(dev, MTK_WED_REV_ID);
++
++	if (mtk_wed_get_rx_capa(dev))
+ 		ret = mtk_wed_wo_init(hw);
+-	}
+ out:
+ 	if (ret) {
+ 		dev_err(dev->hw->dev, "failed to attach wed device\n");
+--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
+@@ -207,7 +207,7 @@ int mtk_wed_mcu_msg_update(struct mtk_we
+ {
+ 	struct mtk_wed_wo *wo = dev->hw->wed_wo;
+ 
+-	if (mtk_wed_is_v1(dev->hw))
++	if (!mtk_wed_get_rx_capa(dev))
+ 		return 0;
+ 
+ 	if (WARN_ON(!wo))
diff --git a/target/linux/generic/backport-5.15/752-08-v6.7-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch b/target/linux/generic/backport-5.15/752-08-v6.7-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch
new file mode 100644
index 0000000000..d83434fb2c
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-08-v6.7-net-ethernet-mtk_wed-rename-mtk_rxbm_desc-in-mtk_wed.patch
@@ -0,0 +1,52 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:07 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: rename mtk_rxbm_desc in
+ mtk_wed_bm_desc
+
+Rename mtk_rxbm_desc structure in mtk_wed_bm_desc since it will be used
+even on tx side by MT7988 SoC.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -421,7 +421,7 @@ free_pagelist:
+ static int
+ mtk_wed_rx_buffer_alloc(struct mtk_wed_device *dev)
+ {
+-	struct mtk_rxbm_desc *desc;
++	struct mtk_wed_bm_desc *desc;
+ 	dma_addr_t desc_phys;
+ 
+ 	dev->rx_buf_ring.size = dev->wlan.rx_nbuf;
+@@ -441,7 +441,7 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d
+ static void
+ mtk_wed_free_rx_buffer(struct mtk_wed_device *dev)
+ {
+-	struct mtk_rxbm_desc *desc = dev->rx_buf_ring.desc;
++	struct mtk_wed_bm_desc *desc = dev->rx_buf_ring.desc;
+ 
+ 	if (!desc)
+ 		return;
+--- a/include/linux/soc/mediatek/mtk_wed.h
++++ b/include/linux/soc/mediatek/mtk_wed.h
+@@ -45,7 +45,7 @@ enum mtk_wed_wo_cmd {
+ 	MTK_WED_WO_CMD_WED_END
+ };
+ 
+-struct mtk_rxbm_desc {
++struct mtk_wed_bm_desc {
+ 	__le32 buf0;
+ 	__le32 token;
+ } __packed __aligned(4);
+@@ -105,7 +105,7 @@ struct mtk_wed_device {
+ 	struct {
+ 		int size;
+ 		struct page_frag_cache rx_page;
+-		struct mtk_rxbm_desc *desc;
++		struct mtk_wed_bm_desc *desc;
+ 		dma_addr_t desc_phys;
+ 	} rx_buf_ring;
+ 
diff --git a/target/linux/generic/backport-5.15/752-09-v6.7-net-ethernet-mtk_wed-introduce-mtk_wed_buf-structure.patch b/target/linux/generic/backport-5.15/752-09-v6.7-net-ethernet-mtk_wed-introduce-mtk_wed_buf-structure.patch
new file mode 100644
index 0000000000..8000a8759e
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-09-v6.7-net-ethernet-mtk_wed-introduce-mtk_wed_buf-structure.patch
@@ -0,0 +1,87 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:08 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: introduce mtk_wed_buf structure
+
+Introduce mtk_wed_buf structure to store both virtual and physical
+addresses allocated in mtk_wed_tx_buffer_alloc() routine. This is a
+preliminary patch to add WED support for MT7988 SoC since it relies on a
+different dma descriptor layout not storing page dma addresses.
+
+Co-developed-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -299,9 +299,9 @@ out:
+ static int
+ mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)
+ {
++	struct mtk_wed_buf *page_list;
+ 	struct mtk_wdma_desc *desc;
+ 	dma_addr_t desc_phys;
+-	void **page_list;
+ 	int token = dev->wlan.token_start;
+ 	int ring_size;
+ 	int n_pages;
+@@ -342,7 +342,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+ 			return -ENOMEM;
+ 		}
+ 
+-		page_list[page_idx++] = page;
++		page_list[page_idx].p = page;
++		page_list[page_idx++].phy_addr = page_phys;
+ 		dma_sync_single_for_cpu(dev->hw->dev, page_phys, PAGE_SIZE,
+ 					DMA_BIDIRECTIONAL);
+ 
+@@ -386,8 +387,8 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+ static void
+ mtk_wed_free_tx_buffer(struct mtk_wed_device *dev)
+ {
++	struct mtk_wed_buf *page_list = dev->tx_buf_ring.pages;
+ 	struct mtk_wdma_desc *desc = dev->tx_buf_ring.desc;
+-	void **page_list = dev->tx_buf_ring.pages;
+ 	int page_idx;
+ 	int i;
+ 
+@@ -399,13 +400,12 @@ mtk_wed_free_tx_buffer(struct mtk_wed_de
+ 
+ 	for (i = 0, page_idx = 0; i < dev->tx_buf_ring.size;
+ 	     i += MTK_WED_BUF_PER_PAGE) {
+-		void *page = page_list[page_idx++];
+-		dma_addr_t buf_addr;
++		dma_addr_t buf_addr = page_list[page_idx].phy_addr;
++		void *page = page_list[page_idx++].p;
+ 
+ 		if (!page)
+ 			break;
+ 
+-		buf_addr = le32_to_cpu(desc[i].buf0);
+ 		dma_unmap_page(dev->hw->dev, buf_addr, PAGE_SIZE,
+ 			       DMA_BIDIRECTIONAL);
+ 		__free_page(page);
+--- a/include/linux/soc/mediatek/mtk_wed.h
++++ b/include/linux/soc/mediatek/mtk_wed.h
+@@ -76,6 +76,11 @@ struct mtk_wed_wo_rx_stats {
+ 	__le32 rx_drop_cnt;
+ };
+ 
++struct mtk_wed_buf {
++	void *p;
++	dma_addr_t phy_addr;
++};
++
+ struct mtk_wed_device {
+ #ifdef CONFIG_NET_MEDIATEK_SOC_WED
+ 	const struct mtk_wed_ops *ops;
+@@ -97,7 +102,7 @@ struct mtk_wed_device {
+ 
+ 	struct {
+ 		int size;
+-		void **pages;
++		struct mtk_wed_buf *pages;
+ 		struct mtk_wdma_desc *desc;
+ 		dma_addr_t desc_phys;
+ 	} tx_buf_ring;
diff --git a/target/linux/generic/backport-5.15/752-10-v6.7-net-ethernet-mtk_wed-move-mem_region-array-out-of-mt.patch b/target/linux/generic/backport-5.15/752-10-v6.7-net-ethernet-mtk_wed-move-mem_region-array-out-of-mt.patch
new file mode 100644
index 0000000000..98d782b1d0
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-10-v6.7-net-ethernet-mtk_wed-move-mem_region-array-out-of-mt.patch
@@ -0,0 +1,88 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:09 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: move mem_region array out of
+ mtk_wed_mcu_load_firmware
+
+Remove mtk_wed_wo_memory_region boot structure in mtk_wed_wo.
+This is a preliminary patch to introduce WED support for MT7988 SoC.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
+@@ -16,14 +16,30 @@
+ #include "mtk_wed_wo.h"
+ #include "mtk_wed.h"
+ 
++static struct mtk_wed_wo_memory_region mem_region[] = {
++	[MTK_WED_WO_REGION_EMI] = {
++		.name = "wo-emi",
++	},
++	[MTK_WED_WO_REGION_ILM] = {
++		.name = "wo-ilm",
++	},
++	[MTK_WED_WO_REGION_DATA] = {
++		.name = "wo-data",
++		.shared = true,
++	},
++	[MTK_WED_WO_REGION_BOOT] = {
++		.name = "wo-boot",
++	},
++};
++
+ static u32 wo_r32(struct mtk_wed_wo *wo, u32 reg)
+ {
+-	return readl(wo->boot.addr + reg);
++	return readl(mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
+ }
+ 
+ static void wo_w32(struct mtk_wed_wo *wo, u32 reg, u32 val)
+ {
+-	writel(val, wo->boot.addr + reg);
++	writel(val, mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
+ }
+ 
+ static struct sk_buff *
+@@ -294,18 +310,6 @@ next:
+ static int
+ mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)
+ {
+-	static struct mtk_wed_wo_memory_region mem_region[] = {
+-		[MTK_WED_WO_REGION_EMI] = {
+-			.name = "wo-emi",
+-		},
+-		[MTK_WED_WO_REGION_ILM] = {
+-			.name = "wo-ilm",
+-		},
+-		[MTK_WED_WO_REGION_DATA] = {
+-			.name = "wo-data",
+-			.shared = true,
+-		},
+-	};
+ 	const struct mtk_wed_fw_trailer *trailer;
+ 	const struct firmware *fw;
+ 	const char *fw_name;
+@@ -319,11 +323,6 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 			return ret;
+ 	}
+ 
+-	wo->boot.name = "wo-boot";
+-	ret = mtk_wed_get_memory_region(wo, &wo->boot);
+-	if (ret)
+-		return ret;
+-
+ 	/* set dummy cr */
+ 	wed_w32(wo->hw->wed_dev, MTK_WED_SCR0 + 4 * MTK_WED_DUMMY_CR_FWDL,
+ 		wo->hw->index + 1);
+--- a/drivers/net/ethernet/mediatek/mtk_wed_wo.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.h
+@@ -228,7 +228,6 @@ struct mtk_wed_wo_queue {
+ 
+ struct mtk_wed_wo {
+ 	struct mtk_wed_hw *hw;
+-	struct mtk_wed_wo_memory_region boot;
+ 
+ 	struct mtk_wed_wo_queue q_tx;
+ 	struct mtk_wed_wo_queue q_rx;
diff --git a/target/linux/generic/backport-5.15/752-11-v6.7-net-ethernet-mtk_wed-make-memory-region-optional.patch b/target/linux/generic/backport-5.15/752-11-v6.7-net-ethernet-mtk_wed-make-memory-region-optional.patch
new file mode 100644
index 0000000000..48b0d02049
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-11-v6.7-net-ethernet-mtk_wed-make-memory-region-optional.patch
@@ -0,0 +1,71 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:10 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: make memory region optional
+
+Make mtk_wed_wo_memory_region optionals.
+This is a preliminary patch to introduce Wireless Ethernet Dispatcher
+support for MT7988 SoC since MT7988 WED fw image will have a different
+layout.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
+@@ -234,19 +234,13 @@ int mtk_wed_mcu_msg_update(struct mtk_we
+ }
+ 
+ static int
+-mtk_wed_get_memory_region(struct mtk_wed_wo *wo,
++mtk_wed_get_memory_region(struct mtk_wed_hw *hw, int index,
+ 			  struct mtk_wed_wo_memory_region *region)
+ {
+ 	struct reserved_mem *rmem;
+ 	struct device_node *np;
+-	int index;
+ 
+-	index = of_property_match_string(wo->hw->node, "memory-region-names",
+-					 region->name);
+-	if (index < 0)
+-		return index;
+-
+-	np = of_parse_phandle(wo->hw->node, "memory-region", index);
++	np = of_parse_phandle(hw->node, "memory-region", index);
+ 	if (!np)
+ 		return -ENODEV;
+ 
+@@ -258,7 +252,7 @@ mtk_wed_get_memory_region(struct mtk_wed
+ 
+ 	region->phy_addr = rmem->base;
+ 	region->size = rmem->size;
+-	region->addr = devm_ioremap(wo->hw->dev, region->phy_addr, region->size);
++	region->addr = devm_ioremap(hw->dev, region->phy_addr, region->size);
+ 
+ 	return !region->addr ? -EINVAL : 0;
+ }
+@@ -271,6 +265,9 @@ mtk_wed_mcu_run_firmware(struct mtk_wed_
+ 	const struct mtk_wed_fw_trailer *trailer;
+ 	const struct mtk_wed_fw_region *fw_region;
+ 
++	if (!region->phy_addr || !region->size)
++		return 0;
++
+ 	trailer_ptr = fw->data + fw->size - sizeof(*trailer);
+ 	trailer = (const struct mtk_wed_fw_trailer *)trailer_ptr;
+ 	region_ptr = trailer_ptr - trailer->num_region * sizeof(*fw_region);
+@@ -318,7 +315,13 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 
+ 	/* load firmware region metadata */
+ 	for (i = 0; i < ARRAY_SIZE(mem_region); i++) {
+-		ret = mtk_wed_get_memory_region(wo, &mem_region[i]);
++		int index = of_property_match_string(wo->hw->node,
++						     "memory-region-names",
++						     mem_region[i].name);
++		if (index < 0)
++			continue;
++
++		ret = mtk_wed_get_memory_region(wo->hw, index, &mem_region[i]);
+ 		if (ret)
+ 			return ret;
+ 	}
diff --git a/target/linux/generic/backport-5.15/752-12-v6.7-net-ethernet-mtk_wed-fix-EXT_INT_STATUS_RX_FBUF-defi.patch b/target/linux/generic/backport-5.15/752-12-v6.7-net-ethernet-mtk_wed-fix-EXT_INT_STATUS_RX_FBUF-defi.patch
new file mode 100644
index 0000000000..878e8fe996
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-12-v6.7-net-ethernet-mtk_wed-fix-EXT_INT_STATUS_RX_FBUF-defi.patch
@@ -0,0 +1,27 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:11 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: fix EXT_INT_STATUS_RX_FBUF
+ definitions for MT7986 SoC
+
+Fix MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH and
+MTK_WED_EXT_INT_STATUS_RX_FBUF_HI_TH definitions for MT7986 (MT7986 is
+the only SoC to use them).
+
+Fixes: de84a090d99a ("net: ethernet: mtk_eth_wed: add wed support for mt7986 chipset")
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_regs.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed_regs.h
+@@ -64,8 +64,8 @@ struct mtk_wdma_desc {
+ #define MTK_WED_EXT_INT_STATUS_TKID_TITO_INVALID	BIT(4)
+ #define MTK_WED_EXT_INT_STATUS_TX_FBUF_LO_TH		BIT(8)
+ #define MTK_WED_EXT_INT_STATUS_TX_FBUF_HI_TH		BIT(9)
+-#define MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH		BIT(12)
+-#define MTK_WED_EXT_INT_STATUS_RX_FBUF_HI_TH		BIT(13)
++#define MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH		BIT(10) /* wed v2 */
++#define MTK_WED_EXT_INT_STATUS_RX_FBUF_HI_TH		BIT(11) /* wed v2 */
+ #define MTK_WED_EXT_INT_STATUS_RX_DRV_R_RESP_ERR	BIT(16)
+ #define MTK_WED_EXT_INT_STATUS_RX_DRV_W_RESP_ERR	BIT(17)
+ #define MTK_WED_EXT_INT_STATUS_RX_DRV_COHERENT		BIT(18)
diff --git a/target/linux/generic/backport-5.15/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch b/target/linux/generic/backport-5.15/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch
new file mode 100644
index 0000000000..c43114fb5b
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch
@@ -0,0 +1,217 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:12 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: add mtk_wed_soc_data structure
+
+Introduce mtk_wed_soc_data utility structure to contain per-SoC
+definitions.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -48,6 +48,26 @@ struct mtk_wed_flow_block_priv {
+ 	struct net_device *dev;
+ };
+ 
++static const struct mtk_wed_soc_data mt7622_data = {
++	.regmap = {
++		.tx_bm_tkid		= 0x088,
++		.wpdma_rx_ring0		= 0x770,
++		.reset_idx_tx_mask	= GENMASK(3, 0),
++		.reset_idx_rx_mask	= GENMASK(17, 16),
++	},
++	.wdma_desc_size = sizeof(struct mtk_wdma_desc),
++};
++
++static const struct mtk_wed_soc_data mt7986_data = {
++	.regmap = {
++		.tx_bm_tkid		= 0x0c8,
++		.wpdma_rx_ring0		= 0x770,
++		.reset_idx_tx_mask	= GENMASK(1, 0),
++		.reset_idx_rx_mask	= GENMASK(7, 6),
++	},
++	.wdma_desc_size = 2 * sizeof(struct mtk_wdma_desc),
++};
++
+ static void
+ wed_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val)
+ {
+@@ -746,7 +766,7 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+ 		return;
+ 
+ 	wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
+-	wed_w32(dev, MTK_WED_WPDMA_RX_RING, dev->wlan.wpdma_rx);
++	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx);
+ }
+ 
+ static void
+@@ -940,22 +960,10 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+ 	wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE);
+ 
+ 	if (mtk_wed_is_v1(dev->hw)) {
+-		wed_w32(dev, MTK_WED_TX_BM_TKID,
+-			FIELD_PREP(MTK_WED_TX_BM_TKID_START,
+-				   dev->wlan.token_start) |
+-			FIELD_PREP(MTK_WED_TX_BM_TKID_END,
+-				   dev->wlan.token_start +
+-				   dev->wlan.nbuf - 1));
+ 		wed_w32(dev, MTK_WED_TX_BM_DYN_THR,
+ 			FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO, 1) |
+ 			MTK_WED_TX_BM_DYN_THR_HI);
+ 	} else {
+-		wed_w32(dev, MTK_WED_TX_BM_TKID_V2,
+-			FIELD_PREP(MTK_WED_TX_BM_TKID_START,
+-				   dev->wlan.token_start) |
+-			FIELD_PREP(MTK_WED_TX_BM_TKID_END,
+-				   dev->wlan.token_start +
+-				   dev->wlan.nbuf - 1));
+ 		wed_w32(dev, MTK_WED_TX_BM_DYN_THR,
+ 			FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO_V2, 0) |
+ 			MTK_WED_TX_BM_DYN_THR_HI_V2);
+@@ -970,6 +978,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+ 			MTK_WED_TX_TKID_DYN_THR_HI);
+ 	}
+ 
++	wed_w32(dev, dev->hw->soc->regmap.tx_bm_tkid,
++		FIELD_PREP(MTK_WED_TX_BM_TKID_START, dev->wlan.token_start) |
++		FIELD_PREP(MTK_WED_TX_BM_TKID_END,
++			   dev->wlan.token_start + dev->wlan.nbuf - 1));
++
+ 	mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
+ 
+ 	if (mtk_wed_is_v1(dev->hw)) {
+@@ -1104,13 +1117,8 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+ 	if (ret) {
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WED_RX_DMA);
+ 	} else {
+-		struct mtk_eth *eth = dev->hw->eth;
+-
+-		if (mtk_is_netsys_v2_or_greater(eth))
+-			wed_set(dev, MTK_WED_RESET_IDX,
+-				MTK_WED_RESET_IDX_RX_V2);
+-		else
+-			wed_set(dev, MTK_WED_RESET_IDX, MTK_WED_RESET_IDX_RX);
++		wed_set(dev, MTK_WED_RESET_IDX,
++			dev->hw->soc->regmap.reset_idx_rx_mask);
+ 		wed_w32(dev, MTK_WED_RESET_IDX, 0);
+ 	}
+ 
+@@ -1163,7 +1171,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
+ 	if (busy) {
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WED_TX_DMA);
+ 	} else {
+-		wed_w32(dev, MTK_WED_RESET_IDX, MTK_WED_RESET_IDX_TX);
++		wed_w32(dev, MTK_WED_RESET_IDX,
++			dev->hw->soc->regmap.reset_idx_tx_mask);
+ 		wed_w32(dev, MTK_WED_RESET_IDX, 0);
+ 	}
+ 
+@@ -1255,7 +1264,6 @@ static int
+ mtk_wed_wdma_rx_ring_setup(struct mtk_wed_device *dev, int idx, int size,
+ 			   bool reset)
+ {
+-	u32 desc_size = sizeof(struct mtk_wdma_desc) * dev->hw->version;
+ 	struct mtk_wed_ring *wdma;
+ 
+ 	if (idx >= ARRAY_SIZE(dev->rx_wdma))
+@@ -1263,7 +1271,7 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
+ 
+ 	wdma = &dev->rx_wdma[idx];
+ 	if (!reset && mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE,
+-					 desc_size, true))
++					 dev->hw->soc->wdma_desc_size, true))
+ 		return -ENOMEM;
+ 
+ 	wdma_w32(dev, MTK_WDMA_RING_RX(idx) + MTK_WED_RING_OFS_BASE,
+@@ -1284,7 +1292,6 @@ static int
+ mtk_wed_wdma_tx_ring_setup(struct mtk_wed_device *dev, int idx, int size,
+ 			   bool reset)
+ {
+-	u32 desc_size = sizeof(struct mtk_wdma_desc) * dev->hw->version;
+ 	struct mtk_wed_ring *wdma;
+ 
+ 	if (idx >= ARRAY_SIZE(dev->tx_wdma))
+@@ -1292,7 +1299,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
+ 
+ 	wdma = &dev->tx_wdma[idx];
+ 	if (!reset && mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE,
+-					 desc_size, true))
++					 dev->hw->soc->wdma_desc_size, true))
+ 		return -ENOMEM;
+ 
+ 	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE,
+@@ -1931,7 +1938,12 @@ void mtk_wed_add_hw(struct device_node *
+ 	hw->irq = irq;
+ 	hw->version = eth->soc->version;
+ 
+-	if (mtk_wed_is_v1(hw)) {
++	switch (hw->version) {
++	case 2:
++		hw->soc = &mt7986_data;
++		break;
++	default:
++	case 1:
+ 		hw->mirror = syscon_regmap_lookup_by_phandle(eth_np,
+ 				"mediatek,pcie-mirror");
+ 		hw->hifsys = syscon_regmap_lookup_by_phandle(eth_np,
+@@ -1945,6 +1957,8 @@ void mtk_wed_add_hw(struct device_node *
+ 			regmap_write(hw->mirror, 0, 0);
+ 			regmap_write(hw->mirror, 4, 0);
+ 		}
++		hw->soc = &mt7622_data;
++		break;
+ 	}
+ 
+ 	mtk_wed_hw_add_debugfs(hw);
+--- a/drivers/net/ethernet/mediatek/mtk_wed.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed.h
+@@ -12,7 +12,18 @@
+ struct mtk_eth;
+ struct mtk_wed_wo;
+ 
++struct mtk_wed_soc_data {
++	struct {
++		u32 tx_bm_tkid;
++		u32 wpdma_rx_ring0;
++		u32 reset_idx_tx_mask;
++		u32 reset_idx_rx_mask;
++	} regmap;
++	u32 wdma_desc_size;
++};
++
+ struct mtk_wed_hw {
++	const struct mtk_wed_soc_data *soc;
+ 	struct device_node *node;
+ 	struct mtk_eth *eth;
+ 	struct regmap *regs;
+--- a/drivers/net/ethernet/mediatek/mtk_wed_regs.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed_regs.h
+@@ -100,8 +100,6 @@ struct mtk_wdma_desc {
+ 
+ #define MTK_WED_TX_BM_BASE				0x084
+ 
+-#define MTK_WED_TX_BM_TKID				0x088
+-#define MTK_WED_TX_BM_TKID_V2				0x0c8
+ #define MTK_WED_TX_BM_TKID_START			GENMASK(15, 0)
+ #define MTK_WED_TX_BM_TKID_END				GENMASK(31, 16)
+ 
+@@ -160,9 +158,6 @@ struct mtk_wdma_desc {
+ #define MTK_WED_GLO_CFG_RX_2B_OFFSET			BIT(31)
+ 
+ #define MTK_WED_RESET_IDX				0x20c
+-#define MTK_WED_RESET_IDX_TX				GENMASK(3, 0)
+-#define MTK_WED_RESET_IDX_RX				GENMASK(17, 16)
+-#define MTK_WED_RESET_IDX_RX_V2				GENMASK(7, 6)
+ #define MTK_WED_RESET_WPDMA_IDX_RX			GENMASK(31, 30)
+ 
+ #define MTK_WED_TX_MIB(_n)				(0x2a0 + (_n) * 4)
+@@ -286,7 +281,6 @@ struct mtk_wdma_desc {
+ #define MTK_WED_WPDMA_RX_D_RST_DRV_IDX			GENMASK(25, 24)
+ 
+ #define MTK_WED_WPDMA_RX_GLO_CFG			0x76c
+-#define MTK_WED_WPDMA_RX_RING				0x770
+ 
+ #define MTK_WED_WPDMA_RX_D_MIB(_n)			(0x774 + (_n) * 4)
+ #define MTK_WED_WPDMA_RX_D_PROCESSED_MIB(_n)		(0x784 + (_n) * 4)
diff --git a/target/linux/generic/backport-5.15/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch b/target/linux/generic/backport-5.15/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch
new file mode 100644
index 0000000000..f53b822224
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch
@@ -0,0 +1,1280 @@
+From: Sujuan Chen <sujuan.chen at mediatek.com>
+Date: Mon, 18 Sep 2023 12:29:13 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: introduce WED support for MT7988
+
+Similar to MT7986 and MT7622, enable Wireless Ethernet Ditpatcher for
+MT7988 in order to offload traffic forwarded from LAN/WLAN to WLAN/LAN
+
+Co-developed-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
+@@ -195,6 +195,7 @@ static const struct mtk_reg_map mt7988_r
+ 	.wdma_base = {
+ 		[0]		= 0x4800,
+ 		[1]		= 0x4c00,
++		[2]		= 0x5000,
+ 	},
+ 	.pse_iq_sta		= 0x0180,
+ 	.pse_oq_sta		= 0x01a0,
+--- a/drivers/net/ethernet/mediatek/mtk_eth_soc.h
++++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.h
+@@ -1129,7 +1129,7 @@ struct mtk_reg_map {
+ 	u32	gdm1_cnt;
+ 	u32	gdma_to_ppe0;
+ 	u32	ppe_base;
+-	u32	wdma_base[2];
++	u32	wdma_base[3];
+ 	u32	pse_iq_sta;
+ 	u32	pse_oq_sta;
+ };
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -201,6 +201,9 @@ mtk_flow_set_output_device(struct mtk_et
+ 			case 1:
+ 				pse_port = PSE_WDMA1_PORT;
+ 				break;
++			case 2:
++				pse_port = PSE_WDMA2_PORT;
++				break;
+ 			default:
+ 				return -EINVAL;
+ 			}
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -16,17 +16,19 @@
+ #include <net/flow_offload.h>
+ #include <net/pkt_cls.h>
+ #include "mtk_eth_soc.h"
+-#include "mtk_wed_regs.h"
+ #include "mtk_wed.h"
+ #include "mtk_ppe.h"
+ #include "mtk_wed_wo.h"
+ 
+ #define MTK_PCIE_BASE(n)		(0x1a143000 + (n) * 0x2000)
+ 
+-#define MTK_WED_PKT_SIZE		1900
++#define MTK_WED_PKT_SIZE		1920
+ #define MTK_WED_BUF_SIZE		2048
++#define MTK_WED_PAGE_BUF_SIZE		128
+ #define MTK_WED_BUF_PER_PAGE		(PAGE_SIZE / 2048)
++#define MTK_WED_RX_PAGE_BUF_PER_PAGE	(PAGE_SIZE / 128)
+ #define MTK_WED_RX_RING_SIZE		1536
++#define MTK_WED_RX_PG_BM_CNT		8192
+ 
+ #define MTK_WED_TX_RING_SIZE		2048
+ #define MTK_WED_WDMA_RING_SIZE		1024
+@@ -40,7 +42,10 @@
+ #define MTK_WED_RRO_QUE_CNT		8192
+ #define MTK_WED_MIOD_ENTRY_CNT		128
+ 
+-static struct mtk_wed_hw *hw_list[2];
++#define MTK_WED_TX_BM_DMA_SIZE		65536
++#define MTK_WED_TX_BM_PKT_CNT		32768
++
++static struct mtk_wed_hw *hw_list[3];
+ static DEFINE_MUTEX(hw_lock);
+ 
+ struct mtk_wed_flow_block_priv {
+@@ -55,6 +60,7 @@ static const struct mtk_wed_soc_data mt7
+ 		.reset_idx_tx_mask	= GENMASK(3, 0),
+ 		.reset_idx_rx_mask	= GENMASK(17, 16),
+ 	},
++	.tx_ring_desc_size = sizeof(struct mtk_wdma_desc),
+ 	.wdma_desc_size = sizeof(struct mtk_wdma_desc),
+ };
+ 
+@@ -65,6 +71,18 @@ static const struct mtk_wed_soc_data mt7
+ 		.reset_idx_tx_mask	= GENMASK(1, 0),
+ 		.reset_idx_rx_mask	= GENMASK(7, 6),
+ 	},
++	.tx_ring_desc_size = sizeof(struct mtk_wdma_desc),
++	.wdma_desc_size = 2 * sizeof(struct mtk_wdma_desc),
++};
++
++static const struct mtk_wed_soc_data mt7988_data = {
++	.regmap = {
++		.tx_bm_tkid		= 0x0c8,
++		.wpdma_rx_ring0		= 0x7d0,
++		.reset_idx_tx_mask	= GENMASK(1, 0),
++		.reset_idx_rx_mask	= GENMASK(7, 6),
++	},
++	.tx_ring_desc_size = sizeof(struct mtk_wed_bm_desc),
+ 	.wdma_desc_size = 2 * sizeof(struct mtk_wdma_desc),
+ };
+ 
+@@ -319,33 +337,38 @@ out:
+ static int
+ mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)
+ {
++	u32 desc_size = dev->hw->soc->tx_ring_desc_size;
++	int i, page_idx = 0, n_pages, ring_size;
++	int token = dev->wlan.token_start;
+ 	struct mtk_wed_buf *page_list;
+-	struct mtk_wdma_desc *desc;
+ 	dma_addr_t desc_phys;
+-	int token = dev->wlan.token_start;
+-	int ring_size;
+-	int n_pages;
+-	int i, page_idx;
++	void *desc_ptr;
+ 
+-	ring_size = dev->wlan.nbuf & ~(MTK_WED_BUF_PER_PAGE - 1);
+-	n_pages = ring_size / MTK_WED_BUF_PER_PAGE;
++	if (!mtk_wed_is_v3_or_greater(dev->hw)) {
++		ring_size = dev->wlan.nbuf & ~(MTK_WED_BUF_PER_PAGE - 1);
++		dev->tx_buf_ring.size = ring_size;
++	} else {
++		dev->tx_buf_ring.size = MTK_WED_TX_BM_DMA_SIZE;
++		ring_size = MTK_WED_TX_BM_PKT_CNT;
++	}
++	n_pages = dev->tx_buf_ring.size / MTK_WED_BUF_PER_PAGE;
+ 
+ 	page_list = kcalloc(n_pages, sizeof(*page_list), GFP_KERNEL);
+ 	if (!page_list)
+ 		return -ENOMEM;
+ 
+-	dev->tx_buf_ring.size = ring_size;
+ 	dev->tx_buf_ring.pages = page_list;
+ 
+-	desc = dma_alloc_coherent(dev->hw->dev, ring_size * sizeof(*desc),
+-				  &desc_phys, GFP_KERNEL);
+-	if (!desc)
++	desc_ptr = dma_alloc_coherent(dev->hw->dev,
++				      dev->tx_buf_ring.size * desc_size,
++				      &desc_phys, GFP_KERNEL);
++	if (!desc_ptr)
+ 		return -ENOMEM;
+ 
+-	dev->tx_buf_ring.desc = desc;
++	dev->tx_buf_ring.desc = desc_ptr;
+ 	dev->tx_buf_ring.desc_phys = desc_phys;
+ 
+-	for (i = 0, page_idx = 0; i < ring_size; i += MTK_WED_BUF_PER_PAGE) {
++	for (i = 0; i < ring_size; i += MTK_WED_BUF_PER_PAGE) {
+ 		dma_addr_t page_phys, buf_phys;
+ 		struct page *page;
+ 		void *buf;
+@@ -371,28 +394,31 @@ mtk_wed_tx_buffer_alloc(struct mtk_wed_d
+ 		buf_phys = page_phys;
+ 
+ 		for (s = 0; s < MTK_WED_BUF_PER_PAGE; s++) {
+-			u32 txd_size;
+-			u32 ctrl;
+-
+-			txd_size = dev->wlan.init_buf(buf, buf_phys, token++);
++			struct mtk_wdma_desc *desc = desc_ptr;
+ 
+ 			desc->buf0 = cpu_to_le32(buf_phys);
+-			desc->buf1 = cpu_to_le32(buf_phys + txd_size);
++			if (!mtk_wed_is_v3_or_greater(dev->hw)) {
++				u32 txd_size, ctrl;
+ 
+-			if (mtk_wed_is_v1(dev->hw))
+-				ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size) |
+-				       FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1,
+-						  MTK_WED_BUF_SIZE - txd_size) |
+-				       MTK_WDMA_DESC_CTRL_LAST_SEG1;
+-			else
+-				ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size) |
+-				       FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1_V2,
+-						  MTK_WED_BUF_SIZE - txd_size) |
+-				       MTK_WDMA_DESC_CTRL_LAST_SEG0;
+-			desc->ctrl = cpu_to_le32(ctrl);
+-			desc->info = 0;
+-			desc++;
++				txd_size = dev->wlan.init_buf(buf, buf_phys,
++							      token++);
++				desc->buf1 = cpu_to_le32(buf_phys + txd_size);
++				ctrl = FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN0, txd_size);
++				if (mtk_wed_is_v1(dev->hw))
++					ctrl |= MTK_WDMA_DESC_CTRL_LAST_SEG1 |
++						FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1,
++							   MTK_WED_BUF_SIZE - txd_size);
++				else
++					ctrl |= MTK_WDMA_DESC_CTRL_LAST_SEG0 |
++						FIELD_PREP(MTK_WDMA_DESC_CTRL_LEN1_V2,
++							   MTK_WED_BUF_SIZE - txd_size);
++				desc->ctrl = cpu_to_le32(ctrl);
++				desc->info = 0;
++			} else {
++				desc->ctrl = cpu_to_le32(token << 16);
++			}
+ 
++			desc_ptr += desc_size;
+ 			buf += MTK_WED_BUF_SIZE;
+ 			buf_phys += MTK_WED_BUF_SIZE;
+ 		}
+@@ -408,31 +434,31 @@ static void
+ mtk_wed_free_tx_buffer(struct mtk_wed_device *dev)
+ {
+ 	struct mtk_wed_buf *page_list = dev->tx_buf_ring.pages;
+-	struct mtk_wdma_desc *desc = dev->tx_buf_ring.desc;
+-	int page_idx;
+-	int i;
++	struct mtk_wed_hw *hw = dev->hw;
++	int i, page_idx = 0;
+ 
+ 	if (!page_list)
+ 		return;
+ 
+-	if (!desc)
++	if (!dev->tx_buf_ring.desc)
+ 		goto free_pagelist;
+ 
+-	for (i = 0, page_idx = 0; i < dev->tx_buf_ring.size;
+-	     i += MTK_WED_BUF_PER_PAGE) {
+-		dma_addr_t buf_addr = page_list[page_idx].phy_addr;
++	for (i = 0; i < dev->tx_buf_ring.size; i += MTK_WED_BUF_PER_PAGE) {
++		dma_addr_t page_phy = page_list[page_idx].phy_addr;
+ 		void *page = page_list[page_idx++].p;
+ 
+ 		if (!page)
+ 			break;
+ 
+-		dma_unmap_page(dev->hw->dev, buf_addr, PAGE_SIZE,
++		dma_unmap_page(dev->hw->dev, page_phy, PAGE_SIZE,
+ 			       DMA_BIDIRECTIONAL);
+ 		__free_page(page);
+ 	}
+ 
+-	dma_free_coherent(dev->hw->dev, dev->tx_buf_ring.size * sizeof(*desc),
+-			  desc, dev->tx_buf_ring.desc_phys);
++	dma_free_coherent(dev->hw->dev,
++			  dev->tx_buf_ring.size * hw->soc->tx_ring_desc_size,
++			  dev->tx_buf_ring.desc,
++			  dev->tx_buf_ring.desc_phys);
+ 
+ free_pagelist:
+ 	kfree(page_list);
+@@ -517,13 +543,23 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
+ {
+ 	u32 mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
+ 
+-	if (mtk_wed_is_v1(dev->hw))
++	switch (dev->hw->version) {
++	case 1:
+ 		mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR;
+-	else
++		break;
++	case 2:
+ 		mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH |
+ 			MTK_WED_EXT_INT_STATUS_RX_FBUF_HI_TH |
+ 			MTK_WED_EXT_INT_STATUS_RX_DRV_COHERENT |
+ 			MTK_WED_EXT_INT_STATUS_TX_DMA_W_RESP_ERR;
++		break;
++	case 3:
++		mask = MTK_WED_EXT_INT_STATUS_RX_DRV_COHERENT |
++		       MTK_WED_EXT_INT_STATUS_TKID_WO_PYLD;
++		break;
++	default:
++		break;
++	}
+ 
+ 	if (!dev->hw->num_flows)
+ 		mask &= ~MTK_WED_EXT_INT_STATUS_TKID_WO_PYLD;
+@@ -535,6 +571,9 @@ mtk_wed_set_ext_int(struct mtk_wed_devic
+ static void
+ mtk_wed_set_512_support(struct mtk_wed_device *dev, bool enable)
+ {
++	if (!mtk_wed_is_v2(dev->hw))
++		return;
++
+ 	if (enable) {
+ 		wed_w32(dev, MTK_WED_TXDP_CTRL, MTK_WED_TXDP_DW9_OVERWR);
+ 		wed_w32(dev, MTK_WED_TXP_DW1,
+@@ -609,6 +648,14 @@ mtk_wed_dma_disable(struct mtk_wed_devic
+ 			MTK_WED_WPDMA_RX_D_RX_DRV_EN);
+ 		wed_clr(dev, MTK_WED_WDMA_GLO_CFG,
+ 			MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK);
++
++		if (mtk_wed_is_v3_or_greater(dev->hw) &&
++		    mtk_wed_get_rx_capa(dev)) {
++			wdma_clr(dev, MTK_WDMA_PREF_TX_CFG,
++				 MTK_WDMA_PREF_TX_CFG_PREF_EN);
++			wdma_clr(dev, MTK_WDMA_PREF_RX_CFG,
++				 MTK_WDMA_PREF_RX_CFG_PREF_EN);
++		}
+ 	}
+ 
+ 	mtk_wed_set_512_support(dev, false);
+@@ -651,6 +698,14 @@ mtk_wed_deinit(struct mtk_wed_device *de
+ 		MTK_WED_CTRL_RX_ROUTE_QM_EN |
+ 		MTK_WED_CTRL_WED_RX_BM_EN |
+ 		MTK_WED_CTRL_RX_RRO_QM_EN);
++
++	if (mtk_wed_is_v3_or_greater(dev->hw)) {
++		wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_TX_AMSDU_EN);
++		wed_clr(dev, MTK_WED_RESET, MTK_WED_RESET_TX_AMSDU);
++		wed_clr(dev, MTK_WED_PCIE_INT_CTRL,
++			MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA |
++			MTK_WED_PCIE_INT_CTRL_MSK_IRQ_FILTER);
++	}
+ }
+ 
+ static void
+@@ -700,21 +755,37 @@ mtk_wed_detach(struct mtk_wed_device *de
+ 	mutex_unlock(&hw_lock);
+ }
+ 
+-#define PCIE_BASE_ADDR0		0x11280000
+ static void
+ mtk_wed_bus_init(struct mtk_wed_device *dev)
+ {
+ 	switch (dev->wlan.bus_type) {
+ 	case MTK_WED_BUS_PCIE: {
+ 		struct device_node *np = dev->hw->eth->dev->of_node;
+-		struct regmap *regs;
+ 
+-		regs = syscon_regmap_lookup_by_phandle(np,
+-						       "mediatek,wed-pcie");
+-		if (IS_ERR(regs))
+-			break;
++		if (mtk_wed_is_v2(dev->hw)) {
++			struct regmap *regs;
++
++			regs = syscon_regmap_lookup_by_phandle(np,
++							       "mediatek,wed-pcie");
++			if (IS_ERR(regs))
++				break;
+ 
+-		regmap_update_bits(regs, 0, BIT(0), BIT(0));
++			regmap_update_bits(regs, 0, BIT(0), BIT(0));
++		}
++
++		if (dev->wlan.msi) {
++			wed_w32(dev, MTK_WED_PCIE_CFG_INTM,
++				dev->hw->pcie_base | 0xc08);
++			wed_w32(dev, MTK_WED_PCIE_CFG_BASE,
++				dev->hw->pcie_base | 0xc04);
++			wed_w32(dev, MTK_WED_PCIE_INT_TRIGGER, BIT(8));
++		} else {
++			wed_w32(dev, MTK_WED_PCIE_CFG_INTM,
++				dev->hw->pcie_base | 0x180);
++			wed_w32(dev, MTK_WED_PCIE_CFG_BASE,
++				dev->hw->pcie_base | 0x184);
++			wed_w32(dev, MTK_WED_PCIE_INT_TRIGGER, BIT(24));
++		}
+ 
+ 		wed_w32(dev, MTK_WED_PCIE_INT_CTRL,
+ 			FIELD_PREP(MTK_WED_PCIE_INT_CTRL_POLL_EN, 2));
+@@ -722,19 +793,9 @@ mtk_wed_bus_init(struct mtk_wed_device *
+ 		/* pcie interrupt control: pola/source selection */
+ 		wed_set(dev, MTK_WED_PCIE_INT_CTRL,
+ 			MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA |
+-			FIELD_PREP(MTK_WED_PCIE_INT_CTRL_SRC_SEL, 1));
+-		wed_r32(dev, MTK_WED_PCIE_INT_CTRL);
+-
+-		wed_w32(dev, MTK_WED_PCIE_CFG_INTM, PCIE_BASE_ADDR0 | 0x180);
+-		wed_w32(dev, MTK_WED_PCIE_CFG_BASE, PCIE_BASE_ADDR0 | 0x184);
+-
+-		/* pcie interrupt status trigger register */
+-		wed_w32(dev, MTK_WED_PCIE_INT_TRIGGER, BIT(24));
+-		wed_r32(dev, MTK_WED_PCIE_INT_TRIGGER);
+-
+-		/* pola setting */
+-		wed_set(dev, MTK_WED_PCIE_INT_CTRL,
+-			MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA);
++			MTK_WED_PCIE_INT_CTRL_MSK_IRQ_FILTER  |
++			FIELD_PREP(MTK_WED_PCIE_INT_CTRL_SRC_SEL,
++				   dev->hw->index));
+ 		break;
+ 	}
+ 	case MTK_WED_BUS_AXI:
+@@ -772,18 +833,19 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+ static void
+ mtk_wed_hw_init_early(struct mtk_wed_device *dev)
+ {
+-	u32 mask, set;
++	u32 set = FIELD_PREP(MTK_WED_WDMA_GLO_CFG_BT_SIZE, 2);
++	u32 mask = MTK_WED_WDMA_GLO_CFG_BT_SIZE;
+ 
+ 	mtk_wed_deinit(dev);
+ 	mtk_wed_reset(dev, MTK_WED_RESET_WED);
+ 	mtk_wed_set_wpdma(dev);
+ 
+-	mask = MTK_WED_WDMA_GLO_CFG_BT_SIZE |
+-	       MTK_WED_WDMA_GLO_CFG_DYNAMIC_DMAD_RECYCLE |
+-	       MTK_WED_WDMA_GLO_CFG_RX_DIS_FSM_AUTO_IDLE;
+-	set = FIELD_PREP(MTK_WED_WDMA_GLO_CFG_BT_SIZE, 2) |
+-	      MTK_WED_WDMA_GLO_CFG_DYNAMIC_SKIP_DMAD_PREP |
+-	      MTK_WED_WDMA_GLO_CFG_IDLE_DMAD_SUPPLY;
++	if (!mtk_wed_is_v3_or_greater(dev->hw)) {
++		mask |= MTK_WED_WDMA_GLO_CFG_DYNAMIC_DMAD_RECYCLE |
++			MTK_WED_WDMA_GLO_CFG_RX_DIS_FSM_AUTO_IDLE;
++		set |= MTK_WED_WDMA_GLO_CFG_DYNAMIC_SKIP_DMAD_PREP |
++		       MTK_WED_WDMA_GLO_CFG_IDLE_DMAD_SUPPLY;
++	}
+ 	wed_m32(dev, MTK_WED_WDMA_GLO_CFG, mask, set);
+ 
+ 	if (mtk_wed_is_v1(dev->hw)) {
+@@ -931,11 +993,18 @@ mtk_wed_route_qm_hw_init(struct mtk_wed_
+ 	}
+ 
+ 	/* configure RX_ROUTE_QM */
+-	wed_clr(dev, MTK_WED_RTQM_GLO_CFG, MTK_WED_RTQM_Q_RST);
+-	wed_clr(dev, MTK_WED_RTQM_GLO_CFG, MTK_WED_RTQM_TXDMAD_FPORT);
+-	wed_set(dev, MTK_WED_RTQM_GLO_CFG,
+-		FIELD_PREP(MTK_WED_RTQM_TXDMAD_FPORT, 0x3 + dev->hw->index));
+-	wed_clr(dev, MTK_WED_RTQM_GLO_CFG, MTK_WED_RTQM_Q_RST);
++	if (mtk_wed_is_v2(dev->hw)) {
++		wed_clr(dev, MTK_WED_RTQM_GLO_CFG, MTK_WED_RTQM_Q_RST);
++		wed_clr(dev, MTK_WED_RTQM_GLO_CFG, MTK_WED_RTQM_TXDMAD_FPORT);
++		wed_set(dev, MTK_WED_RTQM_GLO_CFG,
++			FIELD_PREP(MTK_WED_RTQM_TXDMAD_FPORT,
++				   0x3 + dev->hw->index));
++		wed_clr(dev, MTK_WED_RTQM_GLO_CFG, MTK_WED_RTQM_Q_RST);
++	} else {
++		wed_set(dev, MTK_WED_RTQM_ENQ_CFG0,
++			FIELD_PREP(MTK_WED_RTQM_ENQ_CFG_TXDMAD_FPORT,
++				   0x3 + dev->hw->index));
++	}
+ 	/* enable RX_ROUTE_QM */
+ 	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_RX_ROUTE_QM_EN);
+ }
+@@ -948,22 +1017,30 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+ 
+ 	dev->init_done = true;
+ 	mtk_wed_set_ext_int(dev, false);
+-	wed_w32(dev, MTK_WED_TX_BM_CTRL,
+-		MTK_WED_TX_BM_CTRL_PAUSE |
+-		FIELD_PREP(MTK_WED_TX_BM_CTRL_VLD_GRP_NUM,
+-			   dev->tx_buf_ring.size / 128) |
+-		FIELD_PREP(MTK_WED_TX_BM_CTRL_RSV_GRP_NUM,
+-			   MTK_WED_TX_RING_SIZE / 256));
+ 
+ 	wed_w32(dev, MTK_WED_TX_BM_BASE, dev->tx_buf_ring.desc_phys);
+-
+ 	wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE);
+ 
+ 	if (mtk_wed_is_v1(dev->hw)) {
++		wed_w32(dev, MTK_WED_TX_BM_CTRL,
++			MTK_WED_TX_BM_CTRL_PAUSE |
++			FIELD_PREP(MTK_WED_TX_BM_CTRL_VLD_GRP_NUM,
++				   dev->tx_buf_ring.size / 128) |
++			FIELD_PREP(MTK_WED_TX_BM_CTRL_RSV_GRP_NUM,
++				   MTK_WED_TX_RING_SIZE / 256));
+ 		wed_w32(dev, MTK_WED_TX_BM_DYN_THR,
+ 			FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO, 1) |
+ 			MTK_WED_TX_BM_DYN_THR_HI);
+-	} else {
++	} else if (mtk_wed_is_v2(dev->hw)) {
++		wed_w32(dev, MTK_WED_TX_BM_CTRL,
++			MTK_WED_TX_BM_CTRL_PAUSE |
++			FIELD_PREP(MTK_WED_TX_BM_CTRL_VLD_GRP_NUM,
++				   dev->tx_buf_ring.size / 128) |
++			FIELD_PREP(MTK_WED_TX_BM_CTRL_RSV_GRP_NUM,
++				   MTK_WED_TX_RING_SIZE / 256));
++		wed_w32(dev, MTK_WED_TX_TKID_DYN_THR,
++			FIELD_PREP(MTK_WED_TX_TKID_DYN_THR_LO, 0) |
++			MTK_WED_TX_TKID_DYN_THR_HI);
+ 		wed_w32(dev, MTK_WED_TX_BM_DYN_THR,
+ 			FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO_V2, 0) |
+ 			MTK_WED_TX_BM_DYN_THR_HI_V2);
+@@ -973,9 +1050,6 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+ 				   dev->tx_buf_ring.size / 128) |
+ 			FIELD_PREP(MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM,
+ 				   dev->tx_buf_ring.size / 128));
+-		wed_w32(dev, MTK_WED_TX_TKID_DYN_THR,
+-			FIELD_PREP(MTK_WED_TX_TKID_DYN_THR_LO, 0) |
+-			MTK_WED_TX_TKID_DYN_THR_HI);
+ 	}
+ 
+ 	wed_w32(dev, dev->hw->soc->regmap.tx_bm_tkid,
+@@ -985,26 +1059,62 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+ 
+ 	mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
+ 
++	if (mtk_wed_is_v3_or_greater(dev->hw)) {
++		/* switch to new bm architecture */
++		wed_clr(dev, MTK_WED_TX_BM_CTRL,
++			MTK_WED_TX_BM_CTRL_LEGACY_EN);
++
++		wed_w32(dev, MTK_WED_TX_TKID_CTRL,
++			MTK_WED_TX_TKID_CTRL_PAUSE |
++			FIELD_PREP(MTK_WED_TX_TKID_CTRL_VLD_GRP_NUM_V3,
++				   dev->wlan.nbuf / 128) |
++			FIELD_PREP(MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM_V3,
++				   dev->wlan.nbuf / 128));
++		/* return SKBID + SDP back to bm */
++		wed_set(dev, MTK_WED_TX_TKID_CTRL,
++			MTK_WED_TX_TKID_CTRL_FREE_FORMAT);
++
++		wed_w32(dev, MTK_WED_TX_BM_INIT_PTR,
++			MTK_WED_TX_BM_PKT_CNT |
++			MTK_WED_TX_BM_INIT_SW_TAIL_IDX);
++	}
++
+ 	if (mtk_wed_is_v1(dev->hw)) {
+ 		wed_set(dev, MTK_WED_CTRL,
+ 			MTK_WED_CTRL_WED_TX_BM_EN |
+ 			MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
+-	} else {
+-		wed_clr(dev, MTK_WED_TX_TKID_CTRL, MTK_WED_TX_TKID_CTRL_PAUSE);
+-		if (mtk_wed_get_rx_capa(dev)) {
+-			/* rx hw init */
+-			wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX,
+-				MTK_WED_WPDMA_RX_D_RST_CRX_IDX |
+-				MTK_WED_WPDMA_RX_D_RST_DRV_IDX);
+-			wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX, 0);
+-
+-			mtk_wed_rx_buffer_hw_init(dev);
+-			mtk_wed_rro_hw_init(dev);
+-			mtk_wed_route_qm_hw_init(dev);
+-		}
++	} else if (mtk_wed_get_rx_capa(dev)) {
++		/* rx hw init */
++		wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX,
++			MTK_WED_WPDMA_RX_D_RST_CRX_IDX |
++			MTK_WED_WPDMA_RX_D_RST_DRV_IDX);
++		wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX, 0);
++
++		/* reset prefetch index of ring */
++		wed_set(dev, MTK_WED_WPDMA_RX_D_PREF_RX0_SIDX,
++			MTK_WED_WPDMA_RX_D_PREF_SIDX_IDX_CLR);
++		wed_clr(dev, MTK_WED_WPDMA_RX_D_PREF_RX0_SIDX,
++			MTK_WED_WPDMA_RX_D_PREF_SIDX_IDX_CLR);
++
++		wed_set(dev, MTK_WED_WPDMA_RX_D_PREF_RX1_SIDX,
++			MTK_WED_WPDMA_RX_D_PREF_SIDX_IDX_CLR);
++		wed_clr(dev, MTK_WED_WPDMA_RX_D_PREF_RX1_SIDX,
++			MTK_WED_WPDMA_RX_D_PREF_SIDX_IDX_CLR);
++
++		/* reset prefetch FIFO of ring */
++		wed_set(dev, MTK_WED_WPDMA_RX_D_PREF_FIFO_CFG,
++			MTK_WED_WPDMA_RX_D_PREF_FIFO_CFG_R0_CLR |
++			MTK_WED_WPDMA_RX_D_PREF_FIFO_CFG_R1_CLR);
++		wed_w32(dev, MTK_WED_WPDMA_RX_D_PREF_FIFO_CFG, 0);
++
++		mtk_wed_rx_buffer_hw_init(dev);
++		mtk_wed_rro_hw_init(dev);
++		mtk_wed_route_qm_hw_init(dev);
+ 	}
+ 
+ 	wed_clr(dev, MTK_WED_TX_BM_CTRL, MTK_WED_TX_BM_CTRL_PAUSE);
++	if (!mtk_wed_is_v1(dev->hw))
++		wed_clr(dev, MTK_WED_TX_TKID_CTRL, MTK_WED_TX_TKID_CTRL_PAUSE);
+ }
+ 
+ static void
+@@ -1302,6 +1412,24 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
+ 					 dev->hw->soc->wdma_desc_size, true))
+ 		return -ENOMEM;
+ 
++	if (mtk_wed_is_v3_or_greater(dev->hw)) {
++		struct mtk_wdma_desc *desc = wdma->desc;
++		int i;
++
++		for (i = 0; i < MTK_WED_WDMA_RING_SIZE; i++) {
++			desc->buf0 = 0;
++			desc->ctrl = cpu_to_le32(MTK_WDMA_DESC_CTRL_DMA_DONE);
++			desc->buf1 = 0;
++			desc->info = cpu_to_le32(MTK_WDMA_TXD0_DESC_INFO_DMA_DONE);
++			desc++;
++			desc->buf0 = 0;
++			desc->ctrl = cpu_to_le32(MTK_WDMA_DESC_CTRL_DMA_DONE);
++			desc->buf1 = 0;
++			desc->info = cpu_to_le32(MTK_WDMA_TXD1_DESC_INFO_DMA_DONE);
++			desc++;
++		}
++	}
++
+ 	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE,
+ 		 wdma->desc_phys);
+ 	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_COUNT,
+@@ -1367,6 +1495,9 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+ 
+ 		wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask);
+ 	} else {
++		if (mtk_wed_is_v3_or_greater(dev->hw))
++			wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_TX_TKID_ALI_EN);
++
+ 		/* initail tx interrupt trigger */
+ 		wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX,
+ 			MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN |
+@@ -1419,33 +1550,60 @@ mtk_wed_dma_enable(struct mtk_wed_device
+ {
+ 	int i;
+ 
+-	wed_set(dev, MTK_WED_WPDMA_INT_CTRL, MTK_WED_WPDMA_INT_CTRL_SUBRT_ADV);
++	if (!mtk_wed_is_v3_or_greater(dev->hw)) {
++		wed_set(dev, MTK_WED_WPDMA_INT_CTRL,
++			MTK_WED_WPDMA_INT_CTRL_SUBRT_ADV);
++		wed_set(dev, MTK_WED_WPDMA_GLO_CFG,
++			MTK_WED_WPDMA_GLO_CFG_TX_DRV_EN |
++			MTK_WED_WPDMA_GLO_CFG_RX_DRV_EN);
++		wdma_set(dev, MTK_WDMA_GLO_CFG,
++			 MTK_WDMA_GLO_CFG_TX_DMA_EN |
++			 MTK_WDMA_GLO_CFG_RX_INFO1_PRERES |
++			 MTK_WDMA_GLO_CFG_RX_INFO2_PRERES);
++		wed_set(dev, MTK_WED_WPDMA_CTRL, MTK_WED_WPDMA_CTRL_SDL1_FIXED);
++	} else {
++		wed_set(dev, MTK_WED_WPDMA_GLO_CFG,
++			MTK_WED_WPDMA_GLO_CFG_TX_DRV_EN |
++			MTK_WED_WPDMA_GLO_CFG_RX_DRV_EN |
++			MTK_WED_WPDMA_GLO_CFG_RX_DDONE2_WR);
++		wdma_set(dev, MTK_WDMA_GLO_CFG, MTK_WDMA_GLO_CFG_TX_DMA_EN);
++	}
+ 
+ 	wed_set(dev, MTK_WED_GLO_CFG,
+ 		MTK_WED_GLO_CFG_TX_DMA_EN |
+ 		MTK_WED_GLO_CFG_RX_DMA_EN);
+-	wed_set(dev, MTK_WED_WPDMA_GLO_CFG,
+-		MTK_WED_WPDMA_GLO_CFG_TX_DRV_EN |
+-		MTK_WED_WPDMA_GLO_CFG_RX_DRV_EN);
++
+ 	wed_set(dev, MTK_WED_WDMA_GLO_CFG,
+ 		MTK_WED_WDMA_GLO_CFG_RX_DRV_EN);
+ 
+-	wdma_set(dev, MTK_WDMA_GLO_CFG,
+-		 MTK_WDMA_GLO_CFG_TX_DMA_EN |
+-		 MTK_WDMA_GLO_CFG_RX_INFO1_PRERES |
+-		 MTK_WDMA_GLO_CFG_RX_INFO2_PRERES);
+-
+ 	if (mtk_wed_is_v1(dev->hw)) {
+ 		wdma_set(dev, MTK_WDMA_GLO_CFG,
+ 			 MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
+ 		return;
+ 	}
+ 
+-	wed_set(dev, MTK_WED_WPDMA_CTRL,
+-		MTK_WED_WPDMA_CTRL_SDL1_FIXED);
+ 	wed_set(dev, MTK_WED_WPDMA_GLO_CFG,
+ 		MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_PKT_PROC |
+ 		MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_CRX_SYNC);
++
++	if (mtk_wed_is_v3_or_greater(dev->hw)) {
++		wed_set(dev, MTK_WED_WDMA_RX_PREF_CFG,
++			FIELD_PREP(MTK_WED_WDMA_RX_PREF_BURST_SIZE, 0x10) |
++			FIELD_PREP(MTK_WED_WDMA_RX_PREF_LOW_THRES, 0x8));
++		wed_clr(dev, MTK_WED_WDMA_RX_PREF_CFG,
++			MTK_WED_WDMA_RX_PREF_DDONE2_EN);
++		wed_set(dev, MTK_WED_WDMA_RX_PREF_CFG, MTK_WED_WDMA_RX_PREF_EN);
++
++		wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
++			MTK_WED_WPDMA_GLO_CFG_TX_DDONE_CHK_LAST);
++		wed_set(dev, MTK_WED_WPDMA_GLO_CFG,
++			MTK_WED_WPDMA_GLO_CFG_TX_DDONE_CHK |
++			MTK_WED_WPDMA_GLO_CFG_RX_DRV_EVENT_PKT_FMT_CHK |
++			MTK_WED_WPDMA_GLO_CFG_RX_DRV_UNS_VER_FORCE_4);
++
++		wdma_set(dev, MTK_WDMA_PREF_RX_CFG, MTK_WDMA_PREF_RX_CFG_PREF_EN);
++	}
++
+ 	wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
+ 		MTK_WED_WPDMA_GLO_CFG_TX_TKID_KEEP |
+ 		MTK_WED_WPDMA_GLO_CFG_TX_DMAD_DW3_PREV);
+@@ -1457,11 +1615,22 @@ mtk_wed_dma_enable(struct mtk_wed_device
+ 		MTK_WED_WDMA_GLO_CFG_TX_DRV_EN |
+ 		MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK);
+ 
++	wed_clr(dev, MTK_WED_WPDMA_RX_D_GLO_CFG, MTK_WED_WPDMA_RX_D_RXD_READ_LEN);
+ 	wed_set(dev, MTK_WED_WPDMA_RX_D_GLO_CFG,
+ 		MTK_WED_WPDMA_RX_D_RX_DRV_EN |
+ 		FIELD_PREP(MTK_WED_WPDMA_RX_D_RXD_READ_LEN, 0x18) |
+-		FIELD_PREP(MTK_WED_WPDMA_RX_D_INIT_PHASE_RXEN_SEL,
+-			   0x2));
++		FIELD_PREP(MTK_WED_WPDMA_RX_D_INIT_PHASE_RXEN_SEL, 0x2));
++
++	if (mtk_wed_is_v3_or_greater(dev->hw)) {
++		wed_set(dev, MTK_WED_WPDMA_RX_D_PREF_CFG,
++			MTK_WED_WPDMA_RX_D_PREF_EN |
++			FIELD_PREP(MTK_WED_WPDMA_RX_D_PREF_BURST_SIZE, 0x10) |
++			FIELD_PREP(MTK_WED_WPDMA_RX_D_PREF_LOW_THRES, 0x8));
++
++		wed_set(dev, MTK_WED_RRO_RX_D_CFG(2), MTK_WED_RRO_RX_D_DRV_EN);
++		wdma_set(dev, MTK_WDMA_PREF_TX_CFG, MTK_WDMA_PREF_TX_CFG_PREF_EN);
++		wdma_set(dev, MTK_WDMA_WRBK_TX_CFG, MTK_WDMA_WRBK_TX_CFG_WRBK_EN);
++	}
+ 
+ 	for (i = 0; i < MTK_WED_RX_QUEUES; i++)
+ 		mtk_wed_check_wfdma_rx_fill(dev, i);
+@@ -1501,6 +1670,12 @@ mtk_wed_start(struct mtk_wed_device *dev
+ 		wed_r32(dev, MTK_WED_EXT_INT_MASK1);
+ 		wed_r32(dev, MTK_WED_EXT_INT_MASK2);
+ 
++		if (mtk_wed_is_v3_or_greater(dev->hw)) {
++			wed_w32(dev, MTK_WED_EXT_INT_MASK3,
++				MTK_WED_EXT_INT_STATUS_WPDMA_MID_RDY);
++			wed_r32(dev, MTK_WED_EXT_INT_MASK3);
++		}
++
+ 		if (mtk_wed_rro_cfg(dev))
+ 			return;
+ 	}
+@@ -1552,6 +1727,7 @@ mtk_wed_attach(struct mtk_wed_device *de
+ 	dev->irq = hw->irq;
+ 	dev->wdma_idx = hw->index;
+ 	dev->version = hw->version;
++	dev->hw->pcie_base = mtk_wed_get_pcie_base(dev);
+ 
+ 	if (hw->eth->dma_dev == hw->eth->dev &&
+ 	    of_dma_is_coherent(hw->eth->dev->of_node))
+@@ -1619,6 +1795,23 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
+ 	ring->reg_base = MTK_WED_RING_TX(idx);
+ 	ring->wpdma = regs;
+ 
++	if (mtk_wed_is_v3_or_greater(dev->hw) && idx == 1) {
++		/* reset prefetch index */
++		wed_set(dev, MTK_WED_WDMA_RX_PREF_CFG,
++			MTK_WED_WDMA_RX_PREF_RX0_SIDX_CLR |
++			MTK_WED_WDMA_RX_PREF_RX1_SIDX_CLR);
++
++		wed_clr(dev, MTK_WED_WDMA_RX_PREF_CFG,
++			MTK_WED_WDMA_RX_PREF_RX0_SIDX_CLR |
++			MTK_WED_WDMA_RX_PREF_RX1_SIDX_CLR);
++
++		/* reset prefetch FIFO */
++		wed_w32(dev, MTK_WED_WDMA_RX_PREF_FIFO_CFG,
++			MTK_WED_WDMA_RX_PREF_FIFO_RX0_CLR |
++			MTK_WED_WDMA_RX_PREF_FIFO_RX1_CLR);
++		wed_w32(dev, MTK_WED_WDMA_RX_PREF_FIFO_CFG, 0);
++	}
++
+ 	/* WED -> WPDMA */
+ 	wpdma_tx_w32(dev, idx, MTK_WED_RING_OFS_BASE, ring->desc_phys);
+ 	wpdma_tx_w32(dev, idx, MTK_WED_RING_OFS_COUNT, MTK_WED_TX_RING_SIZE);
+@@ -1693,15 +1886,13 @@ mtk_wed_rx_ring_setup(struct mtk_wed_dev
+ static u32
+ mtk_wed_irq_get(struct mtk_wed_device *dev, u32 mask)
+ {
+-	u32 val, ext_mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
++	u32 val, ext_mask;
+ 
+-	if (mtk_wed_is_v1(dev->hw))
+-		ext_mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR;
++	if (mtk_wed_is_v3_or_greater(dev->hw))
++		ext_mask = MTK_WED_EXT_INT_STATUS_RX_DRV_COHERENT |
++			   MTK_WED_EXT_INT_STATUS_TKID_WO_PYLD;
+ 	else
+-		ext_mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH |
+-			    MTK_WED_EXT_INT_STATUS_RX_FBUF_HI_TH |
+-			    MTK_WED_EXT_INT_STATUS_RX_DRV_COHERENT |
+-			    MTK_WED_EXT_INT_STATUS_TX_DMA_W_RESP_ERR;
++		ext_mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
+ 
+ 	val = wed_r32(dev, MTK_WED_EXT_INT_STATUS);
+ 	wed_w32(dev, MTK_WED_EXT_INT_STATUS, val);
+@@ -1942,6 +2133,9 @@ void mtk_wed_add_hw(struct device_node *
+ 	case 2:
+ 		hw->soc = &mt7986_data;
+ 		break;
++	case 3:
++		hw->soc = &mt7988_data;
++		break;
+ 	default:
+ 	case 1:
+ 		hw->mirror = syscon_regmap_lookup_by_phandle(eth_np,
+--- a/drivers/net/ethernet/mediatek/mtk_wed.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed.h
+@@ -9,6 +9,8 @@
+ #include <linux/regmap.h>
+ #include <linux/netdevice.h>
+ 
++#include "mtk_wed_regs.h"
++
+ struct mtk_eth;
+ struct mtk_wed_wo;
+ 
+@@ -19,6 +21,7 @@ struct mtk_wed_soc_data {
+ 		u32 reset_idx_tx_mask;
+ 		u32 reset_idx_rx_mask;
+ 	} regmap;
++	u32 tx_ring_desc_size;
+ 	u32 wdma_desc_size;
+ };
+ 
+@@ -35,6 +38,7 @@ struct mtk_wed_hw {
+ 	struct dentry *debugfs_dir;
+ 	struct mtk_wed_device *wed_dev;
+ 	struct mtk_wed_wo *wed_wo;
++	u32 pcie_base;
+ 	u32 debugfs_reg;
+ 	u32 num_flows;
+ 	u8 version;
+@@ -61,6 +65,16 @@ static inline bool mtk_wed_is_v2(struct
+ 	return hw->version == 2;
+ }
+ 
++static inline bool mtk_wed_is_v3(struct mtk_wed_hw *hw)
++{
++	return hw->version == 3;
++}
++
++static inline bool mtk_wed_is_v3_or_greater(struct mtk_wed_hw *hw)
++{
++	return hw->version > 2;
++}
++
+ static inline void
+ wed_w32(struct mtk_wed_device *dev, u32 reg, u32 val)
+ {
+@@ -143,6 +157,21 @@ wpdma_txfree_w32(struct mtk_wed_device *
+ 	writel(val, dev->txfree_ring.wpdma + reg);
+ }
+ 
++static inline u32 mtk_wed_get_pcie_base(struct mtk_wed_device *dev)
++{
++	if (!mtk_wed_is_v3_or_greater(dev->hw))
++		return MTK_WED_PCIE_BASE;
++
++	switch (dev->hw->index) {
++	case 1:
++		return MTK_WED_PCIE_BASE1;
++	case 2:
++		return MTK_WED_PCIE_BASE2;
++	default:
++		return MTK_WED_PCIE_BASE0;
++	}
++}
++
+ void mtk_wed_add_hw(struct device_node *np, struct mtk_eth *eth,
+ 		    void __iomem *wdma, phys_addr_t wdma_phy,
+ 		    int index);
+--- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
+@@ -331,10 +331,22 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 		wo->hw->index + 1);
+ 
+ 	/* load firmware */
+-	if (of_device_is_compatible(wo->hw->node, "mediatek,mt7981-wed"))
+-		fw_name = MT7981_FIRMWARE_WO;
+-	else
+-		fw_name = wo->hw->index ? MT7986_FIRMWARE_WO1 : MT7986_FIRMWARE_WO0;
++	switch (wo->hw->version) {
++	case 2:
++		if (of_device_is_compatible(wo->hw->node,
++					    "mediatek,mt7981-wed"))
++			fw_name = MT7981_FIRMWARE_WO;
++		else
++			fw_name = wo->hw->index ? MT7986_FIRMWARE_WO1
++						: MT7986_FIRMWARE_WO0;
++		break;
++	case 3:
++		fw_name = wo->hw->index ? MT7988_FIRMWARE_WO1
++					: MT7988_FIRMWARE_WO0;
++		break;
++	default:
++		return -EINVAL;
++	}
+ 
+ 	ret = request_firmware(&fw, fw_name, wo->hw->dev);
+ 	if (ret)
+@@ -355,15 +367,16 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 	}
+ 
+ 	/* set the start address */
+-	boot_cr = wo->hw->index ? MTK_WO_MCU_CFG_LS_WA_BOOT_ADDR_ADDR
+-				: MTK_WO_MCU_CFG_LS_WM_BOOT_ADDR_ADDR;
++	if (!mtk_wed_is_v3_or_greater(wo->hw) && wo->hw->index)
++		boot_cr = MTK_WO_MCU_CFG_LS_WA_BOOT_ADDR_ADDR;
++	else
++		boot_cr = MTK_WO_MCU_CFG_LS_WM_BOOT_ADDR_ADDR;
+ 	wo_w32(wo, boot_cr, mem_region[MTK_WED_WO_REGION_EMI].phy_addr >> 16);
+ 	/* wo firmware reset */
+ 	wo_w32(wo, MTK_WO_MCU_CFG_LS_WF_MCCR_CLR_ADDR, 0xc00);
+ 
+-	val = wo_r32(wo, MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR);
+-	val |= wo->hw->index ? MTK_WO_MCU_CFG_LS_WF_WM_WA_WA_CPU_RSTB_MASK
+-			     : MTK_WO_MCU_CFG_LS_WF_WM_WA_WM_CPU_RSTB_MASK;
++	val = wo_r32(wo, MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR) |
++	      MTK_WO_MCU_CFG_LS_WF_WM_WA_WM_CPU_RSTB_MASK;
+ 	wo_w32(wo, MTK_WO_MCU_CFG_LS_WF_MCU_CFG_WM_WA_ADDR, val);
+ out:
+ 	release_firmware(fw);
+@@ -398,3 +411,5 @@ int mtk_wed_mcu_init(struct mtk_wed_wo *
+ MODULE_FIRMWARE(MT7981_FIRMWARE_WO);
+ MODULE_FIRMWARE(MT7986_FIRMWARE_WO0);
+ MODULE_FIRMWARE(MT7986_FIRMWARE_WO1);
++MODULE_FIRMWARE(MT7988_FIRMWARE_WO0);
++MODULE_FIRMWARE(MT7988_FIRMWARE_WO1);
+--- a/drivers/net/ethernet/mediatek/mtk_wed_regs.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed_regs.h
+@@ -13,6 +13,9 @@
+ #define MTK_WDMA_DESC_CTRL_LAST_SEG0		BIT(30)
+ #define MTK_WDMA_DESC_CTRL_DMA_DONE		BIT(31)
+ 
++#define MTK_WDMA_TXD0_DESC_INFO_DMA_DONE	BIT(29)
++#define MTK_WDMA_TXD1_DESC_INFO_DMA_DONE	BIT(31)
++
+ struct mtk_wdma_desc {
+ 	__le32 buf0;
+ 	__le32 ctrl;
+@@ -37,6 +40,7 @@ struct mtk_wdma_desc {
+ #define MTK_WED_RESET_WDMA_INT_AGENT			BIT(19)
+ #define MTK_WED_RESET_RX_RRO_QM				BIT(20)
+ #define MTK_WED_RESET_RX_ROUTE_QM			BIT(21)
++#define MTK_WED_RESET_TX_AMSDU				BIT(22)
+ #define MTK_WED_RESET_WED				BIT(31)
+ 
+ #define MTK_WED_CTRL					0x00c
+@@ -44,6 +48,9 @@ struct mtk_wdma_desc {
+ #define MTK_WED_CTRL_WPDMA_INT_AGENT_BUSY		BIT(1)
+ #define MTK_WED_CTRL_WDMA_INT_AGENT_EN			BIT(2)
+ #define MTK_WED_CTRL_WDMA_INT_AGENT_BUSY		BIT(3)
++#define MTK_WED_CTRL_WED_RX_IND_CMD_EN			BIT(5)
++#define MTK_WED_CTRL_WED_RX_PG_BM_EN			BIT(6)
++#define MTK_WED_CTRL_WED_RX_PG_BM_BUSY			BIT(7)
+ #define MTK_WED_CTRL_WED_TX_BM_EN			BIT(8)
+ #define MTK_WED_CTRL_WED_TX_BM_BUSY			BIT(9)
+ #define MTK_WED_CTRL_WED_TX_FREE_AGENT_EN		BIT(10)
+@@ -54,9 +61,14 @@ struct mtk_wdma_desc {
+ #define MTK_WED_CTRL_RX_RRO_QM_BUSY			BIT(15)
+ #define MTK_WED_CTRL_RX_ROUTE_QM_EN			BIT(16)
+ #define MTK_WED_CTRL_RX_ROUTE_QM_BUSY			BIT(17)
++#define MTK_WED_CTRL_TX_TKID_ALI_EN			BIT(20)
++#define MTK_WED_CTRL_TX_TKID_ALI_BUSY			BIT(21)
++#define MTK_WED_CTRL_TX_AMSDU_EN			BIT(22)
++#define MTK_WED_CTRL_TX_AMSDU_BUSY			BIT(23)
+ #define MTK_WED_CTRL_FINAL_DIDX_READ			BIT(24)
+ #define MTK_WED_CTRL_ETH_DMAD_FMT			BIT(25)
+ #define MTK_WED_CTRL_MIB_READ_CLEAR			BIT(28)
++#define MTK_WED_CTRL_FLD_MIB_RD_CLR			BIT(28)
+ 
+ #define MTK_WED_EXT_INT_STATUS				0x020
+ #define MTK_WED_EXT_INT_STATUS_TF_LEN_ERR		BIT(0)
+@@ -89,6 +101,7 @@ struct mtk_wdma_desc {
+ #define MTK_WED_EXT_INT_MASK				0x028
+ #define MTK_WED_EXT_INT_MASK1				0x02c
+ #define MTK_WED_EXT_INT_MASK2				0x030
++#define MTK_WED_EXT_INT_MASK3				0x034
+ 
+ #define MTK_WED_STATUS					0x060
+ #define MTK_WED_STATUS_TX				GENMASK(15, 8)
+@@ -96,9 +109,14 @@ struct mtk_wdma_desc {
+ #define MTK_WED_TX_BM_CTRL				0x080
+ #define MTK_WED_TX_BM_CTRL_VLD_GRP_NUM			GENMASK(6, 0)
+ #define MTK_WED_TX_BM_CTRL_RSV_GRP_NUM			GENMASK(22, 16)
++#define MTK_WED_TX_BM_CTRL_LEGACY_EN			BIT(26)
++#define MTK_WED_TX_TKID_CTRL_FREE_FORMAT		BIT(27)
+ #define MTK_WED_TX_BM_CTRL_PAUSE			BIT(28)
+ 
+ #define MTK_WED_TX_BM_BASE				0x084
++#define MTK_WED_TX_BM_INIT_PTR				0x088
++#define MTK_WED_TX_BM_SW_TAIL_IDX			GENMASK(16, 0)
++#define MTK_WED_TX_BM_INIT_SW_TAIL_IDX			BIT(16)
+ 
+ #define MTK_WED_TX_BM_TKID_START			GENMASK(15, 0)
+ #define MTK_WED_TX_BM_TKID_END				GENMASK(31, 16)
+@@ -122,6 +140,9 @@ struct mtk_wdma_desc {
+ #define MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM		GENMASK(22, 16)
+ #define MTK_WED_TX_TKID_CTRL_PAUSE			BIT(28)
+ 
++#define MTK_WED_TX_TKID_CTRL_VLD_GRP_NUM_V3		GENMASK(7, 0)
++#define MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM_V3		GENMASK(23, 16)
++
+ #define MTK_WED_TX_TKID_DYN_THR				0x0e0
+ #define MTK_WED_TX_TKID_DYN_THR_LO			GENMASK(6, 0)
+ #define MTK_WED_TX_TKID_DYN_THR_HI			GENMASK(22, 16)
+@@ -199,12 +220,15 @@ struct mtk_wdma_desc {
+ #define MTK_WED_WPDMA_GLO_CFG_RX_DRV_R1_PKT_PROC	BIT(5)
+ #define MTK_WED_WPDMA_GLO_CFG_RX_DRV_R0_CRX_SYNC	BIT(6)
+ #define MTK_WED_WPDMA_GLO_CFG_RX_DRV_R1_CRX_SYNC	BIT(7)
+-#define MTK_WED_WPDMA_GLO_CFG_RX_DRV_EVENT_PKT_FMT_VER	GENMASK(18, 16)
++#define MTK_WED_WPDMA_GLO_CFG_RX_DRV_EVENT_PKT_FMT_VER	GENMASK(15, 12)
++#define MTK_WED_WPDMA_GLO_CFG_RX_DRV_UNS_VER_FORCE_4	BIT(18)
+ #define MTK_WED_WPDMA_GLO_CFG_RX_DRV_UNSUPPORT_FMT	BIT(19)
+-#define MTK_WED_WPDMA_GLO_CFG_RX_DRV_UEVENT_PKT_FMT_CHK BIT(20)
++#define MTK_WED_WPDMA_GLO_CFG_RX_DRV_EVENT_PKT_FMT_CHK	BIT(20)
+ #define MTK_WED_WPDMA_GLO_CFG_RX_DDONE2_WR		BIT(21)
+ #define MTK_WED_WPDMA_GLO_CFG_TX_TKID_KEEP		BIT(24)
++#define MTK_WED_WPDMA_GLO_CFG_TX_DDONE_CHK_LAST		BIT(25)
+ #define MTK_WED_WPDMA_GLO_CFG_TX_DMAD_DW3_PREV		BIT(28)
++#define MTK_WED_WPDMA_GLO_CFG_TX_DDONE_CHK		BIT(30)
+ 
+ #define MTK_WED_WPDMA_RESET_IDX				0x50c
+ #define MTK_WED_WPDMA_RESET_IDX_TX			GENMASK(3, 0)
+@@ -250,9 +274,10 @@ struct mtk_wdma_desc {
+ #define MTK_WED_PCIE_INT_TRIGGER_STATUS			BIT(16)
+ 
+ #define MTK_WED_PCIE_INT_CTRL				0x57c
+-#define MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA		BIT(20)
+-#define MTK_WED_PCIE_INT_CTRL_SRC_SEL			GENMASK(17, 16)
+ #define MTK_WED_PCIE_INT_CTRL_POLL_EN			GENMASK(13, 12)
++#define MTK_WED_PCIE_INT_CTRL_SRC_SEL			GENMASK(17, 16)
++#define MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA		BIT(20)
++#define MTK_WED_PCIE_INT_CTRL_MSK_IRQ_FILTER		BIT(21)
+ 
+ #define MTK_WED_WPDMA_CFG_BASE				0x580
+ #define MTK_WED_WPDMA_CFG_INT_MASK			0x584
+@@ -286,6 +311,20 @@ struct mtk_wdma_desc {
+ #define MTK_WED_WPDMA_RX_D_PROCESSED_MIB(_n)		(0x784 + (_n) * 4)
+ #define MTK_WED_WPDMA_RX_D_COHERENT_MIB			0x78c
+ 
++#define MTK_WED_WPDMA_RX_D_PREF_CFG			0x7b4
++#define MTK_WED_WPDMA_RX_D_PREF_EN			BIT(0)
++#define MTK_WED_WPDMA_RX_D_PREF_BURST_SIZE		GENMASK(12, 8)
++#define MTK_WED_WPDMA_RX_D_PREF_LOW_THRES		GENMASK(21, 16)
++
++#define MTK_WED_WPDMA_RX_D_PREF_RX0_SIDX		0x7b8
++#define MTK_WED_WPDMA_RX_D_PREF_SIDX_IDX_CLR		BIT(15)
++
++#define MTK_WED_WPDMA_RX_D_PREF_RX1_SIDX		0x7bc
++
++#define MTK_WED_WPDMA_RX_D_PREF_FIFO_CFG		0x7c0
++#define MTK_WED_WPDMA_RX_D_PREF_FIFO_CFG_R0_CLR		BIT(0)
++#define MTK_WED_WPDMA_RX_D_PREF_FIFO_CFG_R1_CLR		BIT(16)
++
+ #define MTK_WED_WDMA_RING_TX				0x800
+ 
+ #define MTK_WED_WDMA_TX_MIB				0x810
+@@ -293,6 +332,18 @@ struct mtk_wdma_desc {
+ #define MTK_WED_WDMA_RING_RX(_n)			(0x900 + (_n) * 0x10)
+ #define MTK_WED_WDMA_RX_THRES(_n)			(0x940 + (_n) * 0x4)
+ 
++#define MTK_WED_WDMA_RX_PREF_CFG			0x950
++#define MTK_WED_WDMA_RX_PREF_EN				BIT(0)
++#define MTK_WED_WDMA_RX_PREF_BURST_SIZE			GENMASK(12, 8)
++#define MTK_WED_WDMA_RX_PREF_LOW_THRES			GENMASK(21, 16)
++#define MTK_WED_WDMA_RX_PREF_RX0_SIDX_CLR		BIT(24)
++#define MTK_WED_WDMA_RX_PREF_RX1_SIDX_CLR		BIT(25)
++#define MTK_WED_WDMA_RX_PREF_DDONE2_EN			BIT(26)
++
++#define MTK_WED_WDMA_RX_PREF_FIFO_CFG			0x95C
++#define MTK_WED_WDMA_RX_PREF_FIFO_RX0_CLR		BIT(0)
++#define MTK_WED_WDMA_RX_PREF_FIFO_RX1_CLR		BIT(16)
++
+ #define MTK_WED_WDMA_GLO_CFG				0xa04
+ #define MTK_WED_WDMA_GLO_CFG_TX_DRV_EN			BIT(0)
+ #define MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK		BIT(1)
+@@ -325,6 +376,7 @@ struct mtk_wdma_desc {
+ #define MTK_WED_WDMA_INT_TRIGGER_RX_DONE		GENMASK(17, 16)
+ 
+ #define MTK_WED_WDMA_INT_CTRL				0xa2c
++#define MTK_WED_WDMA_INT_POLL_PRD			GENMASK(7, 0)
+ #define MTK_WED_WDMA_INT_CTRL_POLL_SRC_SEL		GENMASK(17, 16)
+ 
+ #define MTK_WED_WDMA_CFG_BASE				0xaa0
+@@ -388,6 +440,18 @@ struct mtk_wdma_desc {
+ #define MTK_WDMA_INT_GRP1				0x250
+ #define MTK_WDMA_INT_GRP2				0x254
+ 
++#define MTK_WDMA_PREF_TX_CFG				0x2d0
++#define MTK_WDMA_PREF_TX_CFG_PREF_EN			BIT(0)
++
++#define MTK_WDMA_PREF_RX_CFG				0x2dc
++#define MTK_WDMA_PREF_RX_CFG_PREF_EN			BIT(0)
++
++#define MTK_WDMA_WRBK_TX_CFG				0x300
++#define MTK_WDMA_WRBK_TX_CFG_WRBK_EN			BIT(30)
++
++#define MTK_WDMA_WRBK_RX_CFG				0x344
++#define MTK_WDMA_WRBK_RX_CFG_WRBK_EN			BIT(30)
++
+ #define MTK_PCIE_MIRROR_MAP(n)				((n) ? 0x4 : 0x0)
+ #define MTK_PCIE_MIRROR_MAP_EN				BIT(0)
+ #define MTK_PCIE_MIRROR_MAP_WED_ID			BIT(1)
+@@ -401,6 +465,30 @@ struct mtk_wdma_desc {
+ #define MTK_WED_RTQM_Q_DBG_BYPASS			BIT(5)
+ #define MTK_WED_RTQM_TXDMAD_FPORT			GENMASK(23, 20)
+ 
++#define MTK_WED_RTQM_IGRS0_I2HW_DMAD_CNT		0xb1c
++#define MTK_WED_RTQM_IGRS0_I2H_DMAD_CNT(_n)		(0xb20 + (_n) * 0x4)
++#define	MTK_WED_RTQM_IGRS0_I2HW_PKT_CNT			0xb28
++#define MTK_WED_RTQM_IGRS0_I2H_PKT_CNT(_n)		(0xb2c + (_n) * 0x4)
++#define MTK_WED_RTQM_IGRS0_FDROP_CNT			0xb34
++
++#define MTK_WED_RTQM_IGRS1_I2HW_DMAD_CNT		0xb44
++#define MTK_WED_RTQM_IGRS1_I2H_DMAD_CNT(_n)		(0xb48 + (_n) * 0x4)
++#define MTK_WED_RTQM_IGRS1_I2HW_PKT_CNT			0xb50
++#define MTK_WED_RTQM_IGRS1_I2H_PKT_CNT(_n)		(0xb54 + (_n) * 0x4)
++#define MTK_WED_RTQM_IGRS1_FDROP_CNT			0xb5c
++
++#define MTK_WED_RTQM_IGRS2_I2HW_DMAD_CNT		0xb6c
++#define MTK_WED_RTQM_IGRS2_I2H_DMAD_CNT(_n)		(0xb70 + (_n) * 0x4)
++#define MTK_WED_RTQM_IGRS2_I2HW_PKT_CNT			0xb78
++#define MTK_WED_RTQM_IGRS2_I2H_PKT_CNT(_n)		(0xb7c + (_n) * 0x4)
++#define MTK_WED_RTQM_IGRS2_FDROP_CNT			0xb84
++
++#define MTK_WED_RTQM_IGRS3_I2HW_DMAD_CNT		0xb94
++#define MTK_WED_RTQM_IGRS3_I2H_DMAD_CNT(_n)		(0xb98 + (_n) * 0x4)
++#define MTK_WED_RTQM_IGRS3_I2HW_PKT_CNT			0xba0
++#define MTK_WED_RTQM_IGRS3_I2H_PKT_CNT(_n)		(0xba4 + (_n) * 0x4)
++#define MTK_WED_RTQM_IGRS3_FDROP_CNT			0xbac
++
+ #define MTK_WED_RTQM_R2H_MIB(_n)			(0xb70 + (_n) * 0x4)
+ #define MTK_WED_RTQM_R2Q_MIB(_n)			(0xb78 + (_n) * 0x4)
+ #define MTK_WED_RTQM_Q2N_MIB				0xb80
+@@ -409,6 +497,24 @@ struct mtk_wdma_desc {
+ #define MTK_WED_RTQM_Q2B_MIB				0xb8c
+ #define MTK_WED_RTQM_PFDBK_MIB				0xb90
+ 
++#define MTK_WED_RTQM_ENQ_CFG0				0xbb8
++#define MTK_WED_RTQM_ENQ_CFG_TXDMAD_FPORT		GENMASK(15, 12)
++
++#define MTK_WED_RTQM_FDROP_MIB				0xb84
++#define MTK_WED_RTQM_ENQ_I2Q_DMAD_CNT			0xbbc
++#define MTK_WED_RTQM_ENQ_I2N_DMAD_CNT			0xbc0
++#define MTK_WED_RTQM_ENQ_I2Q_PKT_CNT			0xbc4
++#define MTK_WED_RTQM_ENQ_I2N_PKT_CNT			0xbc8
++#define MTK_WED_RTQM_ENQ_USED_ENTRY_CNT			0xbcc
++#define MTK_WED_RTQM_ENQ_ERR_CNT			0xbd0
++
++#define MTK_WED_RTQM_DEQ_DMAD_CNT			0xbd8
++#define MTK_WED_RTQM_DEQ_Q2I_DMAD_CNT			0xbdc
++#define MTK_WED_RTQM_DEQ_PKT_CNT			0xbe0
++#define MTK_WED_RTQM_DEQ_Q2I_PKT_CNT			0xbe4
++#define MTK_WED_RTQM_DEQ_USED_PFDBK_CNT			0xbe8
++#define MTK_WED_RTQM_DEQ_ERR_CNT			0xbec
++
+ #define MTK_WED_RROQM_GLO_CFG				0xc04
+ #define MTK_WED_RROQM_RST_IDX				0xc08
+ #define MTK_WED_RROQM_RST_IDX_MIOD			BIT(0)
+@@ -458,7 +564,116 @@ struct mtk_wdma_desc {
+ #define MTK_WED_RX_BM_INTF				0xd9c
+ #define MTK_WED_RX_BM_ERR_STS				0xda8
+ 
++#define MTK_RRO_IND_CMD_SIGNATURE			0xe00
++#define MTK_RRO_IND_CMD_DMA_IDX				GENMASK(11, 0)
++#define MTK_RRO_IND_CMD_MAGIC_CNT			GENMASK(30, 28)
++
++#define MTK_WED_IND_CMD_RX_CTRL0			0xe04
++#define MTK_WED_IND_CMD_PROC_IDX			GENMASK(11, 0)
++#define MTK_WED_IND_CMD_PREFETCH_FREE_CNT		GENMASK(19, 16)
++#define MTK_WED_IND_CMD_MAGIC_CNT			GENMASK(30, 28)
++
++#define MTK_WED_IND_CMD_RX_CTRL1			0xe08
++#define MTK_WED_IND_CMD_RX_CTRL2			0xe0c
++#define MTK_WED_IND_CMD_MAX_CNT				GENMASK(11, 0)
++#define MTK_WED_IND_CMD_BASE_M				GENMASK(19, 16)
++
++#define MTK_WED_RRO_CFG0				0xe10
++#define MTK_WED_RRO_CFG1				0xe14
++#define MTK_WED_RRO_CFG1_MAX_WIN_SZ			GENMASK(31, 29)
++#define MTK_WED_RRO_CFG1_ACK_SN_BASE_M			GENMASK(19, 16)
++#define MTK_WED_RRO_CFG1_PARTICL_SE_ID			GENMASK(11, 0)
++
++#define MTK_WED_ADDR_ELEM_CFG0				0xe18
++#define MTK_WED_ADDR_ELEM_CFG1				0xe1c
++#define MTK_WED_ADDR_ELEM_PREFETCH_FREE_CNT		GENMASK(19, 16)
++
++#define MTK_WED_ADDR_ELEM_TBL_CFG			0xe20
++#define MTK_WED_ADDR_ELEM_TBL_OFFSET			GENMASK(6, 0)
++#define MTK_WED_ADDR_ELEM_TBL_RD_RDY			BIT(28)
++#define MTK_WED_ADDR_ELEM_TBL_WR_RDY			BIT(29)
++#define MTK_WED_ADDR_ELEM_TBL_RD			BIT(30)
++#define MTK_WED_ADDR_ELEM_TBL_WR			BIT(31)
++
++#define MTK_WED_RADDR_ELEM_TBL_WDATA			0xe24
++#define MTK_WED_RADDR_ELEM_TBL_RDATA			0xe28
++
++#define MTK_WED_PN_CHECK_CFG				0xe30
++#define MTK_WED_PN_CHECK_SE_ID				GENMASK(11, 0)
++#define MTK_WED_PN_CHECK_RD_RDY				BIT(28)
++#define MTK_WED_PN_CHECK_WR_RDY				BIT(29)
++#define MTK_WED_PN_CHECK_RD				BIT(30)
++#define MTK_WED_PN_CHECK_WR				BIT(31)
++
++#define MTK_WED_PN_CHECK_WDATA_M			0xe38
++#define MTK_WED_PN_CHECK_IS_FIRST			BIT(17)
++
++#define MTK_WED_RRO_MSDU_PG_RING_CFG(_n)		(0xe44 + (_n) * 0x8)
++
++#define MTK_WED_RRO_MSDU_PG_RING2_CFG			0xe58
++#define MTK_WED_RRO_MSDU_PG_DRV_CLR			BIT(26)
++#define MTK_WED_RRO_MSDU_PG_DRV_EN			BIT(31)
++
++#define MTK_WED_RRO_MSDU_PG_CTRL0(_n)			(0xe5c + (_n) * 0xc)
++#define MTK_WED_RRO_MSDU_PG_CTRL1(_n)			(0xe60 + (_n) * 0xc)
++#define MTK_WED_RRO_MSDU_PG_CTRL2(_n)			(0xe64 + (_n) * 0xc)
++
++#define MTK_WED_RRO_RX_D_RX(_n)				(0xe80 + (_n) * 0x10)
++
++#define MTK_WED_RRO_RX_MAGIC_CNT			BIT(13)
++
++#define MTK_WED_RRO_RX_D_CFG(_n)			(0xea0 + (_n) * 0x4)
++#define MTK_WED_RRO_RX_D_DRV_CLR			BIT(26)
++#define MTK_WED_RRO_RX_D_DRV_EN				BIT(31)
++
++#define MTK_WED_RRO_PG_BM_RX_DMAM			0xeb0
++#define MTK_WED_RRO_PG_BM_RX_SDL0			GENMASK(13, 0)
++
++#define MTK_WED_RRO_PG_BM_BASE				0xeb4
++#define MTK_WED_RRO_PG_BM_INIT_PTR			0xeb8
++#define MTK_WED_RRO_PG_BM_SW_TAIL_IDX			GENMASK(15, 0)
++#define MTK_WED_RRO_PG_BM_INIT_SW_TAIL_IDX		BIT(16)
++
++#define MTK_WED_WPDMA_INT_CTRL_RRO_RX			0xeec
++#define MTK_WED_WPDMA_INT_CTRL_RRO_RX0_EN		BIT(0)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_RX0_CLR		BIT(1)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_RX0_DONE_TRIG	GENMASK(6, 2)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_RX1_EN		BIT(8)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_RX1_CLR		BIT(9)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_RX1_DONE_TRIG	GENMASK(14, 10)
++
++#define MTK_WED_WPDMA_INT_CTRL_RRO_MSDU_PG		0xef4
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG0_EN		BIT(0)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG0_CLR		BIT(1)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG0_DONE_TRIG	GENMASK(6, 2)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG1_EN		BIT(8)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG1_CLR		BIT(9)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG1_DONE_TRIG	GENMASK(14, 10)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG2_EN		BIT(16)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG2_CLR		BIT(17)
++#define MTK_WED_WPDMA_INT_CTRL_RRO_PG2_DONE_TRIG	GENMASK(22, 18)
++
++#define MTK_WED_RX_IND_CMD_CNT0				0xf20
++#define MTK_WED_RX_IND_CMD_DBG_CNT_EN			BIT(31)
++
++#define MTK_WED_RX_IND_CMD_CNT(_n)			(0xf20 + (_n) * 0x4)
++#define MTK_WED_IND_CMD_MAGIC_CNT_FAIL_CNT		GENMASK(15, 0)
++
++#define MTK_WED_RX_ADDR_ELEM_CNT(_n)			(0xf48 + (_n) * 0x4)
++#define MTK_WED_ADDR_ELEM_SIG_FAIL_CNT			GENMASK(15, 0)
++#define MTK_WED_ADDR_ELEM_FIRST_SIG_FAIL_CNT		GENMASK(31, 16)
++#define MTK_WED_ADDR_ELEM_ACKSN_CNT			GENMASK(27, 0)
++
++#define MTK_WED_RX_MSDU_PG_CNT(_n)			(0xf5c + (_n) * 0x4)
++
++#define MTK_WED_RX_PN_CHK_CNT				0xf70
++#define MTK_WED_PN_CHK_FAIL_CNT				GENMASK(15, 0)
++
+ #define MTK_WED_WOCPU_VIEW_MIOD_BASE			0x8000
+ #define MTK_WED_PCIE_INT_MASK				0x0
+ 
++#define MTK_WED_PCIE_BASE			0x11280000
++#define MTK_WED_PCIE_BASE0			0x11300000
++#define MTK_WED_PCIE_BASE1			0x11310000
++#define MTK_WED_PCIE_BASE2			0x11290000
+ #endif
+--- a/drivers/net/ethernet/mediatek/mtk_wed_wo.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.h
+@@ -91,6 +91,8 @@ enum mtk_wed_dummy_cr_idx {
+ #define MT7981_FIRMWARE_WO	"mediatek/mt7981_wo.bin"
+ #define MT7986_FIRMWARE_WO0	"mediatek/mt7986_wo_0.bin"
+ #define MT7986_FIRMWARE_WO1	"mediatek/mt7986_wo_1.bin"
++#define MT7988_FIRMWARE_WO0	"mediatek/mt7988_wo_0.bin"
++#define MT7988_FIRMWARE_WO1	"mediatek/mt7988_wo_1.bin"
+ 
+ #define MTK_WO_MCU_CFG_LS_BASE				0
+ #define MTK_WO_MCU_CFG_LS_HW_VER_ADDR			(MTK_WO_MCU_CFG_LS_BASE + 0x000)
+--- a/include/linux/soc/mediatek/mtk_wed.h
++++ b/include/linux/soc/mediatek/mtk_wed.h
+@@ -139,6 +139,8 @@ struct mtk_wed_device {
+ 		u32 wpdma_rx;
+ 
+ 		bool wcid_512;
++		bool hw_rro;
++		bool msi;
+ 
+ 		u16 token_start;
+ 		unsigned int nbuf;
+@@ -212,10 +214,12 @@ mtk_wed_device_attach(struct mtk_wed_dev
+ 	return ret;
+ }
+ 
+-static inline bool
+-mtk_wed_get_rx_capa(struct mtk_wed_device *dev)
++static inline bool mtk_wed_get_rx_capa(struct mtk_wed_device *dev)
+ {
+ #ifdef CONFIG_NET_MEDIATEK_SOC_WED
++	if (dev->version == 3)
++		return dev->wlan.hw_rro;
++
+ 	return dev->version != 1;
+ #else
+ 	return false;
diff --git a/target/linux/generic/backport-5.15/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch b/target/linux/generic/backport-5.15/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch
new file mode 100644
index 0000000000..e91ae69d08
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch
@@ -0,0 +1,95 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:14 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: refactor mtk_wed_check_wfdma_rx_fill
+ routine
+
+Refactor mtk_wed_check_wfdma_rx_fill() in order to be reused adding HW
+receive offload support for MT7988 SoC.
+
+Co-developed-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -585,22 +585,15 @@ mtk_wed_set_512_support(struct mtk_wed_d
+ 	}
+ }
+ 
+-#define MTK_WFMDA_RX_DMA_EN	BIT(2)
+-static void
+-mtk_wed_check_wfdma_rx_fill(struct mtk_wed_device *dev, int idx)
++static int
++mtk_wed_check_wfdma_rx_fill(struct mtk_wed_device *dev,
++			    struct mtk_wed_ring *ring)
+ {
+-	u32 val;
+ 	int i;
+ 
+-	if (!(dev->rx_ring[idx].flags & MTK_WED_RING_CONFIGURED))
+-		return; /* queue is not configured by mt76 */
+-
+ 	for (i = 0; i < 3; i++) {
+-		u32 cur_idx;
++		u32 cur_idx = readl(ring->wpdma + MTK_WED_RING_OFS_CPU_IDX);
+ 
+-		cur_idx = wed_r32(dev,
+-				  MTK_WED_WPDMA_RING_RX_DATA(idx) +
+-				  MTK_WED_RING_OFS_CPU_IDX);
+ 		if (cur_idx == MTK_WED_RX_RING_SIZE - 1)
+ 			break;
+ 
+@@ -609,12 +602,10 @@ mtk_wed_check_wfdma_rx_fill(struct mtk_w
+ 
+ 	if (i == 3) {
+ 		dev_err(dev->hw->dev, "rx dma enable failed\n");
+-		return;
++		return -ETIMEDOUT;
+ 	}
+ 
+-	val = wifi_r32(dev, dev->wlan.wpdma_rx_glo - dev->wlan.phy_base) |
+-	      MTK_WFMDA_RX_DMA_EN;
+-	wifi_w32(dev, dev->wlan.wpdma_rx_glo - dev->wlan.phy_base, val);
++	return 0;
+ }
+ 
+ static void
+@@ -1545,6 +1536,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+ 	wed_w32(dev, MTK_WED_INT_MASK, irq_mask);
+ }
+ 
++#define MTK_WFMDA_RX_DMA_EN	BIT(2)
+ static void
+ mtk_wed_dma_enable(struct mtk_wed_device *dev)
+ {
+@@ -1632,8 +1624,26 @@ mtk_wed_dma_enable(struct mtk_wed_device
+ 		wdma_set(dev, MTK_WDMA_WRBK_TX_CFG, MTK_WDMA_WRBK_TX_CFG_WRBK_EN);
+ 	}
+ 
+-	for (i = 0; i < MTK_WED_RX_QUEUES; i++)
+-		mtk_wed_check_wfdma_rx_fill(dev, i);
++	for (i = 0; i < MTK_WED_RX_QUEUES; i++) {
++		struct mtk_wed_ring *ring = &dev->rx_ring[i];
++		u32 val;
++
++		if (!(ring->flags & MTK_WED_RING_CONFIGURED))
++			continue; /* queue is not configured by mt76 */
++
++		if (mtk_wed_check_wfdma_rx_fill(dev, ring)) {
++			dev_err(dev->hw->dev,
++				"rx_ring(%d) dma enable failed\n", i);
++			continue;
++		}
++
++		val = wifi_r32(dev,
++			       dev->wlan.wpdma_rx_glo -
++			       dev->wlan.phy_base) | MTK_WFMDA_RX_DMA_EN;
++		wifi_w32(dev,
++			 dev->wlan.wpdma_rx_glo - dev->wlan.phy_base,
++			 val);
++	}
+ }
+ 
+ static void
diff --git a/target/linux/generic/backport-5.15/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch b/target/linux/generic/backport-5.15/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch
new file mode 100644
index 0000000000..21a4e0759f
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch
@@ -0,0 +1,465 @@
+From: Sujuan Chen <sujuan.chen at mediatek.com>
+Date: Mon, 18 Sep 2023 12:29:15 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: introduce partial AMSDU offload
+ support for MT7988
+
+Introduce partial AMSDU offload support for MT7988 SoC in order to merge
+in hw packets belonging to the same AMSDU before passing them to the
+WLAN nic.
+
+Co-developed-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_ppe.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
+@@ -438,7 +438,8 @@ int mtk_foe_entry_set_pppoe(struct mtk_e
+ }
+ 
+ int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry,
+-			   int wdma_idx, int txq, int bss, int wcid)
++			   int wdma_idx, int txq, int bss, int wcid,
++			   bool amsdu_en)
+ {
+ 	struct mtk_foe_mac_info *l2 = mtk_foe_entry_l2(eth, entry);
+ 	u32 *ib2 = mtk_foe_entry_ib2(eth, entry);
+@@ -450,6 +451,7 @@ int mtk_foe_entry_set_wdma(struct mtk_et
+ 			 MTK_FOE_IB2_WDMA_WINFO_V2;
+ 		l2->w3info = FIELD_PREP(MTK_FOE_WINFO_WCID_V3, wcid) |
+ 			     FIELD_PREP(MTK_FOE_WINFO_BSS_V3, bss);
++		l2->amsdu = FIELD_PREP(MTK_FOE_WINFO_AMSDU_EN, amsdu_en);
+ 		break;
+ 	case 2:
+ 		*ib2 &= ~MTK_FOE_IB2_PORT_MG_V2;
+--- a/drivers/net/ethernet/mediatek/mtk_ppe.h
++++ b/drivers/net/ethernet/mediatek/mtk_ppe.h
+@@ -88,13 +88,13 @@ enum {
+ #define MTK_FOE_WINFO_BSS_V3		GENMASK(23, 16)
+ #define MTK_FOE_WINFO_WCID_V3		GENMASK(15, 0)
+ 
+-#define MTK_FOE_WINFO_PAO_USR_INFO	GENMASK(15, 0)
+-#define MTK_FOE_WINFO_PAO_TID		GENMASK(19, 16)
+-#define MTK_FOE_WINFO_PAO_IS_FIXEDRATE	BIT(20)
+-#define MTK_FOE_WINFO_PAO_IS_PRIOR	BIT(21)
+-#define MTK_FOE_WINFO_PAO_IS_SP		BIT(22)
+-#define MTK_FOE_WINFO_PAO_HF		BIT(23)
+-#define MTK_FOE_WINFO_PAO_AMSDU_EN	BIT(24)
++#define MTK_FOE_WINFO_AMSDU_USR_INFO	GENMASK(15, 0)
++#define MTK_FOE_WINFO_AMSDU_TID		GENMASK(19, 16)
++#define MTK_FOE_WINFO_AMSDU_IS_FIXEDRATE	BIT(20)
++#define MTK_FOE_WINFO_AMSDU_IS_PRIOR	BIT(21)
++#define MTK_FOE_WINFO_AMSDU_IS_SP	BIT(22)
++#define MTK_FOE_WINFO_AMSDU_HF		BIT(23)
++#define MTK_FOE_WINFO_AMSDU_EN		BIT(24)
+ 
+ enum {
+ 	MTK_FOE_STATE_INVALID,
+@@ -123,7 +123,7 @@ struct mtk_foe_mac_info {
+ 
+ 	/* netsys_v3 */
+ 	u32 w3info;
+-	u32 wpao;
++	u32 amsdu;
+ };
+ 
+ /* software-only entry type */
+@@ -393,7 +393,8 @@ int mtk_foe_entry_set_vlan(struct mtk_et
+ int mtk_foe_entry_set_pppoe(struct mtk_eth *eth, struct mtk_foe_entry *entry,
+ 			    int sid);
+ int mtk_foe_entry_set_wdma(struct mtk_eth *eth, struct mtk_foe_entry *entry,
+-			   int wdma_idx, int txq, int bss, int wcid);
++			   int wdma_idx, int txq, int bss, int wcid,
++			   bool amsdu_en);
+ int mtk_foe_entry_set_queue(struct mtk_eth *eth, struct mtk_foe_entry *entry,
+ 			    unsigned int queue);
+ int mtk_foe_entry_commit(struct mtk_ppe *ppe, struct mtk_flow_entry *entry);
+--- a/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
++++ b/drivers/net/ethernet/mediatek/mtk_ppe_offload.c
+@@ -111,6 +111,7 @@ mtk_flow_get_wdma_info(struct net_device
+ 	info->queue = path->mtk_wdma.queue;
+ 	info->bss = path->mtk_wdma.bss;
+ 	info->wcid = path->mtk_wdma.wcid;
++	info->amsdu = path->mtk_wdma.amsdu;
+ 
+ 	return 0;
+ }
+@@ -192,7 +193,7 @@ mtk_flow_set_output_device(struct mtk_et
+ 
+ 	if (mtk_flow_get_wdma_info(dev, dest_mac, &info) == 0) {
+ 		mtk_foe_entry_set_wdma(eth, foe, info.wdma_idx, info.queue,
+-				       info.bss, info.wcid);
++				       info.bss, info.wcid, info.amsdu);
+ 		if (mtk_is_netsys_v2_or_greater(eth)) {
+ 			switch (info.wdma_idx) {
+ 			case 0:
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -29,6 +29,8 @@
+ #define MTK_WED_RX_PAGE_BUF_PER_PAGE	(PAGE_SIZE / 128)
+ #define MTK_WED_RX_RING_SIZE		1536
+ #define MTK_WED_RX_PG_BM_CNT		8192
++#define MTK_WED_AMSDU_BUF_SIZE		(PAGE_SIZE << 4)
++#define MTK_WED_AMSDU_NPAGES		32
+ 
+ #define MTK_WED_TX_RING_SIZE		2048
+ #define MTK_WED_WDMA_RING_SIZE		1024
+@@ -172,6 +174,23 @@ mtk_wdma_rx_reset(struct mtk_wed_device
+ 	return ret;
+ }
+ 
++static u32
++mtk_wed_check_busy(struct mtk_wed_device *dev, u32 reg, u32 mask)
++{
++	return !!(wed_r32(dev, reg) & mask);
++}
++
++static int
++mtk_wed_poll_busy(struct mtk_wed_device *dev, u32 reg, u32 mask)
++{
++	int sleep = 15000;
++	int timeout = 100 * sleep;
++	u32 val;
++
++	return read_poll_timeout(mtk_wed_check_busy, val, !val, sleep,
++				 timeout, false, dev, reg, mask);
++}
++
+ static void
+ mtk_wdma_tx_reset(struct mtk_wed_device *dev)
+ {
+@@ -335,6 +354,118 @@ out:
+ }
+ 
+ static int
++mtk_wed_amsdu_buffer_alloc(struct mtk_wed_device *dev)
++{
++	struct mtk_wed_hw *hw = dev->hw;
++	struct mtk_wed_amsdu *wed_amsdu;
++	int i;
++
++	if (!mtk_wed_is_v3_or_greater(hw))
++		return 0;
++
++	wed_amsdu = devm_kcalloc(hw->dev, MTK_WED_AMSDU_NPAGES,
++				 sizeof(*wed_amsdu), GFP_KERNEL);
++	if (!wed_amsdu)
++		return -ENOMEM;
++
++	for (i = 0; i < MTK_WED_AMSDU_NPAGES; i++) {
++		void *ptr;
++
++		/* each segment is 64K */
++		ptr = (void *)__get_free_pages(GFP_KERNEL | __GFP_NOWARN |
++					       __GFP_ZERO | __GFP_COMP |
++					       GFP_DMA32,
++					       get_order(MTK_WED_AMSDU_BUF_SIZE));
++		if (!ptr)
++			goto error;
++
++		wed_amsdu[i].txd = ptr;
++		wed_amsdu[i].txd_phy = dma_map_single(hw->dev, ptr,
++						      MTK_WED_AMSDU_BUF_SIZE,
++						      DMA_TO_DEVICE);
++		if (dma_mapping_error(hw->dev, wed_amsdu[i].txd_phy))
++			goto error;
++	}
++	dev->hw->wed_amsdu = wed_amsdu;
++
++	return 0;
++
++error:
++	for (i--; i >= 0; i--)
++		dma_unmap_single(hw->dev, wed_amsdu[i].txd_phy,
++				 MTK_WED_AMSDU_BUF_SIZE, DMA_TO_DEVICE);
++	return -ENOMEM;
++}
++
++static void
++mtk_wed_amsdu_free_buffer(struct mtk_wed_device *dev)
++{
++	struct mtk_wed_amsdu *wed_amsdu = dev->hw->wed_amsdu;
++	int i;
++
++	if (!wed_amsdu)
++		return;
++
++	for (i = 0; i < MTK_WED_AMSDU_NPAGES; i++) {
++		dma_unmap_single(dev->hw->dev, wed_amsdu[i].txd_phy,
++				 MTK_WED_AMSDU_BUF_SIZE, DMA_TO_DEVICE);
++		free_pages((unsigned long)wed_amsdu[i].txd,
++			   get_order(MTK_WED_AMSDU_BUF_SIZE));
++	}
++}
++
++static int
++mtk_wed_amsdu_init(struct mtk_wed_device *dev)
++{
++	struct mtk_wed_amsdu *wed_amsdu = dev->hw->wed_amsdu;
++	int i, ret;
++
++	if (!wed_amsdu)
++		return 0;
++
++	for (i = 0; i < MTK_WED_AMSDU_NPAGES; i++)
++		wed_w32(dev, MTK_WED_AMSDU_HIFTXD_BASE_L(i),
++			wed_amsdu[i].txd_phy);
++
++	/* init all sta parameter */
++	wed_w32(dev, MTK_WED_AMSDU_STA_INFO_INIT, MTK_WED_AMSDU_STA_RMVL |
++		MTK_WED_AMSDU_STA_WTBL_HDRT_MODE |
++		FIELD_PREP(MTK_WED_AMSDU_STA_MAX_AMSDU_LEN,
++			   dev->wlan.amsdu_max_len >> 8) |
++		FIELD_PREP(MTK_WED_AMSDU_STA_MAX_AMSDU_NUM,
++			   dev->wlan.amsdu_max_subframes));
++
++	wed_w32(dev, MTK_WED_AMSDU_STA_INFO, MTK_WED_AMSDU_STA_INFO_DO_INIT);
++
++	ret = mtk_wed_poll_busy(dev, MTK_WED_AMSDU_STA_INFO,
++				MTK_WED_AMSDU_STA_INFO_DO_INIT);
++	if (ret) {
++		dev_err(dev->hw->dev, "amsdu initialization failed\n");
++		return ret;
++	}
++
++	/* init partial amsdu offload txd src */
++	wed_set(dev, MTK_WED_AMSDU_HIFTXD_CFG,
++		FIELD_PREP(MTK_WED_AMSDU_HIFTXD_SRC, dev->hw->index));
++
++	/* init qmem */
++	wed_set(dev, MTK_WED_AMSDU_PSE, MTK_WED_AMSDU_PSE_RESET);
++	ret = mtk_wed_poll_busy(dev, MTK_WED_MON_AMSDU_QMEM_STS1, BIT(29));
++	if (ret) {
++		pr_info("%s: amsdu qmem initialization failed\n", __func__);
++		return ret;
++	}
++
++	/* eagle E1 PCIE1 tx ring 22 flow control issue */
++	if (dev->wlan.id == 0x7991)
++		wed_clr(dev, MTK_WED_AMSDU_FIFO, MTK_WED_AMSDU_IS_PRIOR0_RING);
++
++	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_TX_AMSDU_EN);
++
++	return 0;
++}
++
++static int
+ mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)
+ {
+ 	u32 desc_size = dev->hw->soc->tx_ring_desc_size;
+@@ -708,6 +839,7 @@ __mtk_wed_detach(struct mtk_wed_device *
+ 
+ 	mtk_wdma_rx_reset(dev);
+ 	mtk_wed_reset(dev, MTK_WED_RESET_WED);
++	mtk_wed_amsdu_free_buffer(dev);
+ 	mtk_wed_free_tx_buffer(dev);
+ 	mtk_wed_free_tx_rings(dev);
+ 
+@@ -1128,23 +1260,6 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
+ 	}
+ }
+ 
+-static u32
+-mtk_wed_check_busy(struct mtk_wed_device *dev, u32 reg, u32 mask)
+-{
+-	return !!(wed_r32(dev, reg) & mask);
+-}
+-
+-static int
+-mtk_wed_poll_busy(struct mtk_wed_device *dev, u32 reg, u32 mask)
+-{
+-	int sleep = 15000;
+-	int timeout = 100 * sleep;
+-	u32 val;
+-
+-	return read_poll_timeout(mtk_wed_check_busy, val, !val, sleep,
+-				 timeout, false, dev, reg, mask);
+-}
+-
+ static int
+ mtk_wed_rx_reset(struct mtk_wed_device *dev)
+ {
+@@ -1691,6 +1806,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+ 	}
+ 
+ 	mtk_wed_set_512_support(dev, dev->wlan.wcid_512);
++	mtk_wed_amsdu_init(dev);
+ 
+ 	mtk_wed_dma_enable(dev);
+ 	dev->running = true;
+@@ -1747,6 +1863,10 @@ mtk_wed_attach(struct mtk_wed_device *de
+ 	if (ret)
+ 		goto out;
+ 
++	ret = mtk_wed_amsdu_buffer_alloc(dev);
++	if (ret)
++		goto out;
++
+ 	if (mtk_wed_get_rx_capa(dev)) {
+ 		ret = mtk_wed_rro_alloc(dev);
+ 		if (ret)
+--- a/drivers/net/ethernet/mediatek/mtk_wed.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed.h
+@@ -25,6 +25,11 @@ struct mtk_wed_soc_data {
+ 	u32 wdma_desc_size;
+ };
+ 
++struct mtk_wed_amsdu {
++	void *txd;
++	dma_addr_t txd_phy;
++};
++
+ struct mtk_wed_hw {
+ 	const struct mtk_wed_soc_data *soc;
+ 	struct device_node *node;
+@@ -38,6 +43,7 @@ struct mtk_wed_hw {
+ 	struct dentry *debugfs_dir;
+ 	struct mtk_wed_device *wed_dev;
+ 	struct mtk_wed_wo *wed_wo;
++	struct mtk_wed_amsdu *wed_amsdu;
+ 	u32 pcie_base;
+ 	u32 debugfs_reg;
+ 	u32 num_flows;
+@@ -52,6 +58,7 @@ struct mtk_wdma_info {
+ 	u8 queue;
+ 	u16 wcid;
+ 	u8 bss;
++	u8 amsdu;
+ };
+ 
+ #ifdef CONFIG_NET_MEDIATEK_SOC_WED
+--- a/drivers/net/ethernet/mediatek/mtk_wed_regs.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed_regs.h
+@@ -672,6 +672,82 @@ struct mtk_wdma_desc {
+ #define MTK_WED_WOCPU_VIEW_MIOD_BASE			0x8000
+ #define MTK_WED_PCIE_INT_MASK				0x0
+ 
++#define MTK_WED_AMSDU_FIFO				0x1800
++#define MTK_WED_AMSDU_IS_PRIOR0_RING			BIT(10)
++
++#define MTK_WED_AMSDU_STA_INFO				0x01810
++#define MTK_WED_AMSDU_STA_INFO_DO_INIT			BIT(0)
++#define MTK_WED_AMSDU_STA_INFO_SET_INIT			BIT(1)
++
++#define MTK_WED_AMSDU_STA_INFO_INIT			0x01814
++#define MTK_WED_AMSDU_STA_WTBL_HDRT_MODE		BIT(0)
++#define MTK_WED_AMSDU_STA_RMVL				BIT(1)
++#define MTK_WED_AMSDU_STA_MAX_AMSDU_LEN			GENMASK(7, 2)
++#define MTK_WED_AMSDU_STA_MAX_AMSDU_NUM			GENMASK(11, 8)
++
++#define MTK_WED_AMSDU_HIFTXD_BASE_L(_n)			(0x1980 + (_n) * 0x4)
++
++#define MTK_WED_AMSDU_PSE				0x1910
++#define MTK_WED_AMSDU_PSE_RESET				BIT(16)
++
++#define MTK_WED_AMSDU_HIFTXD_CFG			0x1968
++#define MTK_WED_AMSDU_HIFTXD_SRC			GENMASK(16, 15)
++
++#define MTK_WED_MON_AMSDU_FIFO_DMAD			0x1a34
++
++#define MTK_WED_MON_AMSDU_ENG_DMAD(_n)			(0x1a80 + (_n) * 0x50)
++#define MTK_WED_MON_AMSDU_ENG_QFPL(_n)			(0x1a84 + (_n) * 0x50)
++#define MTK_WED_MON_AMSDU_ENG_QENI(_n)			(0x1a88 + (_n) * 0x50)
++#define MTK_WED_MON_AMSDU_ENG_QENO(_n)			(0x1a8c + (_n) * 0x50)
++#define MTK_WED_MON_AMSDU_ENG_MERG(_n)			(0x1a90 + (_n) * 0x50)
++
++#define MTK_WED_MON_AMSDU_ENG_CNT8(_n)			(0x1a94 + (_n) * 0x50)
++#define MTK_WED_AMSDU_ENG_MAX_QGPP_CNT			GENMASK(10, 0)
++#define MTK_WED_AMSDU_ENG_MAX_PL_CNT			GENMASK(27, 16)
++
++#define MTK_WED_MON_AMSDU_ENG_CNT9(_n)			(0x1a98 + (_n) * 0x50)
++#define MTK_WED_AMSDU_ENG_CUR_ENTRY			GENMASK(10, 0)
++#define MTK_WED_AMSDU_ENG_MAX_BUF_MERGED		GENMASK(20, 16)
++#define MTK_WED_AMSDU_ENG_MAX_MSDU_MERGED		GENMASK(28, 24)
++
++#define MTK_WED_MON_AMSDU_QMEM_STS1			0x1e04
++
++#define MTK_WED_MON_AMSDU_QMEM_CNT(_n)			(0x1e0c + (_n) * 0x4)
++#define MTK_WED_AMSDU_QMEM_FQ_CNT			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_SP_QCNT			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID0_QCNT			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID1_QCNT			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID2_QCNT			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID3_QCNT			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID4_QCNT			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID5_QCNT			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID6_QCNT			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID7_QCNT			GENMASK(11, 0)
++
++#define MTK_WED_MON_AMSDU_QMEM_PTR(_n)			(0x1e20 + (_n) * 0x4)
++#define MTK_WED_AMSDU_QMEM_FQ_HEAD			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_SP_QHEAD			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID0_QHEAD			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID1_QHEAD			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID2_QHEAD			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID3_QHEAD			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID4_QHEAD			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID5_QHEAD			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID6_QHEAD			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID7_QHEAD			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_FQ_TAIL			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_SP_QTAIL			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID0_QTAIL			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID1_QTAIL			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID2_QTAIL			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID3_QTAIL			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID4_QTAIL			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID5_QTAIL			GENMASK(11, 0)
++#define MTK_WED_AMSDU_QMEM_TID6_QTAIL			GENMASK(27, 16)
++#define MTK_WED_AMSDU_QMEM_TID7_QTAIL			GENMASK(11, 0)
++
++#define MTK_WED_MON_AMSDU_HIFTXD_FETCH_MSDU(_n)		(0x1ec4 + (_n) * 0x4)
++
+ #define MTK_WED_PCIE_BASE			0x11280000
+ #define MTK_WED_PCIE_BASE0			0x11300000
+ #define MTK_WED_PCIE_BASE1			0x11310000
+--- a/include/linux/netdevice.h
++++ b/include/linux/netdevice.h
+@@ -906,6 +906,7 @@ struct net_device_path {
+ 			u8 queue;
+ 			u16 wcid;
+ 			u8 bss;
++			u8 amsdu;
+ 		} mtk_wdma;
+ 	};
+ };
+--- a/include/linux/soc/mediatek/mtk_wed.h
++++ b/include/linux/soc/mediatek/mtk_wed.h
+@@ -129,6 +129,7 @@ struct mtk_wed_device {
+ 		enum mtk_wed_bus_tye bus_type;
+ 		void __iomem *base;
+ 		u32 phy_base;
++		u32 id;
+ 
+ 		u32 wpdma_phys;
+ 		u32 wpdma_int;
+@@ -147,10 +148,12 @@ struct mtk_wed_device {
+ 		unsigned int rx_nbuf;
+ 		unsigned int rx_npkt;
+ 		unsigned int rx_size;
++		unsigned int amsdu_max_len;
+ 
+ 		u8 tx_tbit[MTK_WED_TX_QUEUES];
+ 		u8 rx_tbit[MTK_WED_RX_QUEUES];
+ 		u8 txfree_tbit;
++		u8 amsdu_max_subframes;
+ 
+ 		u32 (*init_buf)(void *ptr, dma_addr_t phys, int token_id);
+ 		int (*offload_enable)(struct mtk_wed_device *wed);
+@@ -224,6 +227,15 @@ static inline bool mtk_wed_get_rx_capa(s
+ #else
+ 	return false;
+ #endif
++}
++
++static inline bool mtk_wed_is_amsdu_supported(struct mtk_wed_device *dev)
++{
++#ifdef CONFIG_NET_MEDIATEK_SOC_WED
++	return dev->version == 3;
++#else
++	return false;
++#endif
+ }
+ 
+ #ifdef CONFIG_NET_MEDIATEK_SOC_WED
diff --git a/target/linux/generic/backport-5.15/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch b/target/linux/generic/backport-5.15/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch
new file mode 100644
index 0000000000..0cf4c18875
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch
@@ -0,0 +1,483 @@
+From: Sujuan Chen <sujuan.chen at mediatek.com>
+Date: Mon, 18 Sep 2023 12:29:16 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: introduce hw_rro support for MT7988
+
+MT7988 SoC support 802.11 receive reordering offload in hw while
+MT7986 SoC implements it through the firmware running on the mcu.
+
+Co-developed-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -26,7 +26,7 @@
+ #define MTK_WED_BUF_SIZE		2048
+ #define MTK_WED_PAGE_BUF_SIZE		128
+ #define MTK_WED_BUF_PER_PAGE		(PAGE_SIZE / 2048)
+-#define MTK_WED_RX_PAGE_BUF_PER_PAGE	(PAGE_SIZE / 128)
++#define MTK_WED_RX_BUF_PER_PAGE		(PAGE_SIZE / MTK_WED_PAGE_BUF_SIZE)
+ #define MTK_WED_RX_RING_SIZE		1536
+ #define MTK_WED_RX_PG_BM_CNT		8192
+ #define MTK_WED_AMSDU_BUF_SIZE		(PAGE_SIZE << 4)
+@@ -596,6 +596,68 @@ free_pagelist:
+ }
+ 
+ static int
++mtk_wed_hwrro_buffer_alloc(struct mtk_wed_device *dev)
++{
++	int n_pages = MTK_WED_RX_PG_BM_CNT / MTK_WED_RX_BUF_PER_PAGE;
++	struct mtk_wed_buf *page_list;
++	struct mtk_wed_bm_desc *desc;
++	dma_addr_t desc_phys;
++	int i, page_idx = 0;
++
++	if (!dev->wlan.hw_rro)
++		return 0;
++
++	page_list = kcalloc(n_pages, sizeof(*page_list), GFP_KERNEL);
++	if (!page_list)
++		return -ENOMEM;
++
++	dev->hw_rro.size = dev->wlan.rx_nbuf & ~(MTK_WED_BUF_PER_PAGE - 1);
++	dev->hw_rro.pages = page_list;
++	desc = dma_alloc_coherent(dev->hw->dev,
++				  dev->wlan.rx_nbuf * sizeof(*desc),
++				  &desc_phys, GFP_KERNEL);
++	if (!desc)
++		return -ENOMEM;
++
++	dev->hw_rro.desc = desc;
++	dev->hw_rro.desc_phys = desc_phys;
++
++	for (i = 0; i < MTK_WED_RX_PG_BM_CNT; i += MTK_WED_RX_BUF_PER_PAGE) {
++		dma_addr_t page_phys, buf_phys;
++		struct page *page;
++		int s;
++
++		page = __dev_alloc_page(GFP_KERNEL);
++		if (!page)
++			return -ENOMEM;
++
++		page_phys = dma_map_page(dev->hw->dev, page, 0, PAGE_SIZE,
++					 DMA_BIDIRECTIONAL);
++		if (dma_mapping_error(dev->hw->dev, page_phys)) {
++			__free_page(page);
++			return -ENOMEM;
++		}
++
++		page_list[page_idx].p = page;
++		page_list[page_idx++].phy_addr = page_phys;
++		dma_sync_single_for_cpu(dev->hw->dev, page_phys, PAGE_SIZE,
++					DMA_BIDIRECTIONAL);
++
++		buf_phys = page_phys;
++		for (s = 0; s < MTK_WED_RX_BUF_PER_PAGE; s++) {
++			desc->buf0 = cpu_to_le32(buf_phys);
++			buf_phys += MTK_WED_PAGE_BUF_SIZE;
++			desc++;
++		}
++
++		dma_sync_single_for_device(dev->hw->dev, page_phys, PAGE_SIZE,
++					   DMA_BIDIRECTIONAL);
++	}
++
++	return 0;
++}
++
++static int
+ mtk_wed_rx_buffer_alloc(struct mtk_wed_device *dev)
+ {
+ 	struct mtk_wed_bm_desc *desc;
+@@ -612,7 +674,42 @@ mtk_wed_rx_buffer_alloc(struct mtk_wed_d
+ 	dev->rx_buf_ring.desc_phys = desc_phys;
+ 	dev->wlan.init_rx_buf(dev, dev->wlan.rx_npkt);
+ 
+-	return 0;
++	return mtk_wed_hwrro_buffer_alloc(dev);
++}
++
++static void
++mtk_wed_hwrro_free_buffer(struct mtk_wed_device *dev)
++{
++	struct mtk_wed_buf *page_list = dev->hw_rro.pages;
++	struct mtk_wed_bm_desc *desc = dev->hw_rro.desc;
++	int i, page_idx = 0;
++
++	if (!dev->wlan.hw_rro)
++		return;
++
++	if (!page_list)
++		return;
++
++	if (!desc)
++		goto free_pagelist;
++
++	for (i = 0; i < MTK_WED_RX_PG_BM_CNT; i += MTK_WED_RX_BUF_PER_PAGE) {
++		dma_addr_t buf_addr = page_list[page_idx].phy_addr;
++		void *page = page_list[page_idx++].p;
++
++		if (!page)
++			break;
++
++		dma_unmap_page(dev->hw->dev, buf_addr, PAGE_SIZE,
++			       DMA_BIDIRECTIONAL);
++		__free_page(page);
++	}
++
++	dma_free_coherent(dev->hw->dev, dev->hw_rro.size * sizeof(*desc),
++			  desc, dev->hw_rro.desc_phys);
++
++free_pagelist:
++	kfree(page_list);
+ }
+ 
+ static void
+@@ -626,6 +723,28 @@ mtk_wed_free_rx_buffer(struct mtk_wed_de
+ 	dev->wlan.release_rx_buf(dev);
+ 	dma_free_coherent(dev->hw->dev, dev->rx_buf_ring.size * sizeof(*desc),
+ 			  desc, dev->rx_buf_ring.desc_phys);
++
++	mtk_wed_hwrro_free_buffer(dev);
++}
++
++static void
++mtk_wed_hwrro_init(struct mtk_wed_device *dev)
++{
++	if (!mtk_wed_get_rx_capa(dev) || !dev->wlan.hw_rro)
++		return;
++
++	wed_set(dev, MTK_WED_RRO_PG_BM_RX_DMAM,
++		FIELD_PREP(MTK_WED_RRO_PG_BM_RX_SDL0, 128));
++
++	wed_w32(dev, MTK_WED_RRO_PG_BM_BASE, dev->hw_rro.desc_phys);
++
++	wed_w32(dev, MTK_WED_RRO_PG_BM_INIT_PTR,
++		MTK_WED_RRO_PG_BM_INIT_SW_TAIL_IDX |
++		FIELD_PREP(MTK_WED_RRO_PG_BM_SW_TAIL_IDX,
++			   MTK_WED_RX_PG_BM_CNT));
++
++	/* enable rx_page_bm to fetch dmad */
++	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_RX_PG_BM_EN);
+ }
+ 
+ static void
+@@ -639,6 +758,8 @@ mtk_wed_rx_buffer_hw_init(struct mtk_wed
+ 	wed_w32(dev, MTK_WED_RX_BM_DYN_ALLOC_TH,
+ 		FIELD_PREP(MTK_WED_RX_BM_DYN_ALLOC_TH_H, 0xffff));
+ 	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_RX_BM_EN);
++
++	mtk_wed_hwrro_init(dev);
+ }
+ 
+ static void
+@@ -934,6 +1055,8 @@ mtk_wed_bus_init(struct mtk_wed_device *
+ static void
+ mtk_wed_set_wpdma(struct mtk_wed_device *dev)
+ {
++	int i;
++
+ 	if (mtk_wed_is_v1(dev->hw)) {
+ 		wed_w32(dev, MTK_WED_WPDMA_CFG_BASE,  dev->wlan.wpdma_phys);
+ 		return;
+@@ -951,6 +1074,15 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+ 
+ 	wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
+ 	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx);
++
++	if (!dev->wlan.hw_rro)
++		return;
++
++	wed_w32(dev, MTK_WED_RRO_RX_D_CFG(0), dev->wlan.wpdma_rx_rro[0]);
++	wed_w32(dev, MTK_WED_RRO_RX_D_CFG(1), dev->wlan.wpdma_rx_rro[1]);
++	for (i = 0; i < MTK_WED_RX_PAGE_QUEUES; i++)
++		wed_w32(dev, MTK_WED_RRO_MSDU_PG_RING_CFG(i),
++			dev->wlan.wpdma_rx_pg + i * 0x10);
+ }
+ 
+ static void
+@@ -1762,6 +1894,165 @@ mtk_wed_dma_enable(struct mtk_wed_device
+ }
+ 
+ static void
++mtk_wed_start_hw_rro(struct mtk_wed_device *dev, u32 irq_mask, bool reset)
++{
++	int i;
++
++	wed_w32(dev, MTK_WED_WPDMA_INT_MASK, irq_mask);
++	wed_w32(dev, MTK_WED_INT_MASK, irq_mask);
++
++	if (!mtk_wed_get_rx_capa(dev) || !dev->wlan.hw_rro)
++		return;
++
++	wed_set(dev, MTK_WED_RRO_RX_D_CFG(2), MTK_WED_RRO_MSDU_PG_DRV_CLR);
++	wed_w32(dev, MTK_WED_RRO_MSDU_PG_RING2_CFG,
++		MTK_WED_RRO_MSDU_PG_DRV_CLR);
++
++	wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_RRO_RX,
++		MTK_WED_WPDMA_INT_CTRL_RRO_RX0_EN |
++		MTK_WED_WPDMA_INT_CTRL_RRO_RX0_CLR |
++		MTK_WED_WPDMA_INT_CTRL_RRO_RX1_EN |
++		MTK_WED_WPDMA_INT_CTRL_RRO_RX1_CLR |
++		FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RRO_RX0_DONE_TRIG,
++			   dev->wlan.rro_rx_tbit[0]) |
++		FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RRO_RX1_DONE_TRIG,
++			   dev->wlan.rro_rx_tbit[1]));
++
++	wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_RRO_MSDU_PG,
++		MTK_WED_WPDMA_INT_CTRL_RRO_PG0_EN |
++		MTK_WED_WPDMA_INT_CTRL_RRO_PG0_CLR |
++		MTK_WED_WPDMA_INT_CTRL_RRO_PG1_EN |
++		MTK_WED_WPDMA_INT_CTRL_RRO_PG1_CLR |
++		MTK_WED_WPDMA_INT_CTRL_RRO_PG2_EN |
++		MTK_WED_WPDMA_INT_CTRL_RRO_PG2_CLR |
++		FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RRO_PG0_DONE_TRIG,
++			   dev->wlan.rx_pg_tbit[0]) |
++		FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RRO_PG1_DONE_TRIG,
++			   dev->wlan.rx_pg_tbit[1]) |
++		FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_RRO_PG2_DONE_TRIG,
++			   dev->wlan.rx_pg_tbit[2]));
++
++	/* RRO_MSDU_PG_RING2_CFG1_FLD_DRV_EN should be enabled after
++	 * WM FWDL completed, otherwise RRO_MSDU_PG ring may broken
++	 */
++	wed_set(dev, MTK_WED_RRO_MSDU_PG_RING2_CFG,
++		MTK_WED_RRO_MSDU_PG_DRV_EN);
++
++	for (i = 0; i < MTK_WED_RX_QUEUES; i++) {
++		struct mtk_wed_ring *ring = &dev->rx_rro_ring[i];
++
++		if (!(ring->flags & MTK_WED_RING_CONFIGURED))
++			continue;
++
++		if (mtk_wed_check_wfdma_rx_fill(dev, ring))
++			dev_err(dev->hw->dev,
++				"rx_rro_ring(%d) initialization failed\n", i);
++	}
++
++	for (i = 0; i < MTK_WED_RX_PAGE_QUEUES; i++) {
++		struct mtk_wed_ring *ring = &dev->rx_page_ring[i];
++
++		if (!(ring->flags & MTK_WED_RING_CONFIGURED))
++			continue;
++
++		if (mtk_wed_check_wfdma_rx_fill(dev, ring))
++			dev_err(dev->hw->dev,
++				"rx_page_ring(%d) initialization failed\n", i);
++	}
++}
++
++static void
++mtk_wed_rro_rx_ring_setup(struct mtk_wed_device *dev, int idx,
++			  void __iomem *regs)
++{
++	struct mtk_wed_ring *ring = &dev->rx_rro_ring[idx];
++
++	ring->wpdma = regs;
++	wed_w32(dev, MTK_WED_RRO_RX_D_RX(idx) + MTK_WED_RING_OFS_BASE,
++		readl(regs));
++	wed_w32(dev, MTK_WED_RRO_RX_D_RX(idx) + MTK_WED_RING_OFS_COUNT,
++		readl(regs + MTK_WED_RING_OFS_COUNT));
++	ring->flags |= MTK_WED_RING_CONFIGURED;
++}
++
++static void
++mtk_wed_msdu_pg_rx_ring_setup(struct mtk_wed_device *dev, int idx, void __iomem *regs)
++{
++	struct mtk_wed_ring *ring = &dev->rx_page_ring[idx];
++
++	ring->wpdma = regs;
++	wed_w32(dev, MTK_WED_RRO_MSDU_PG_CTRL0(idx) + MTK_WED_RING_OFS_BASE,
++		readl(regs));
++	wed_w32(dev, MTK_WED_RRO_MSDU_PG_CTRL0(idx) + MTK_WED_RING_OFS_COUNT,
++		readl(regs + MTK_WED_RING_OFS_COUNT));
++	ring->flags |= MTK_WED_RING_CONFIGURED;
++}
++
++static int
++mtk_wed_ind_rx_ring_setup(struct mtk_wed_device *dev, void __iomem *regs)
++{
++	struct mtk_wed_ring *ring = &dev->ind_cmd_ring;
++	u32 val = readl(regs + MTK_WED_RING_OFS_COUNT);
++	int i, count = 0;
++
++	ring->wpdma = regs;
++	wed_w32(dev, MTK_WED_IND_CMD_RX_CTRL1 + MTK_WED_RING_OFS_BASE,
++		readl(regs) & 0xfffffff0);
++
++	wed_w32(dev, MTK_WED_IND_CMD_RX_CTRL1 + MTK_WED_RING_OFS_COUNT,
++		readl(regs + MTK_WED_RING_OFS_COUNT));
++
++	/* ack sn cr */
++	wed_w32(dev, MTK_WED_RRO_CFG0, dev->wlan.phy_base +
++		dev->wlan.ind_cmd.ack_sn_addr);
++	wed_w32(dev, MTK_WED_RRO_CFG1,
++		FIELD_PREP(MTK_WED_RRO_CFG1_MAX_WIN_SZ,
++			   dev->wlan.ind_cmd.win_size) |
++		FIELD_PREP(MTK_WED_RRO_CFG1_PARTICL_SE_ID,
++			   dev->wlan.ind_cmd.particular_sid));
++
++	/* particular session addr element */
++	wed_w32(dev, MTK_WED_ADDR_ELEM_CFG0,
++		dev->wlan.ind_cmd.particular_se_phys);
++
++	for (i = 0; i < dev->wlan.ind_cmd.se_group_nums; i++) {
++		wed_w32(dev, MTK_WED_RADDR_ELEM_TBL_WDATA,
++			dev->wlan.ind_cmd.addr_elem_phys[i] >> 4);
++		wed_w32(dev, MTK_WED_ADDR_ELEM_TBL_CFG,
++			MTK_WED_ADDR_ELEM_TBL_WR | (i & 0x7f));
++
++		val = wed_r32(dev, MTK_WED_ADDR_ELEM_TBL_CFG);
++		while (!(val & MTK_WED_ADDR_ELEM_TBL_WR_RDY) && count++ < 100)
++			val = wed_r32(dev, MTK_WED_ADDR_ELEM_TBL_CFG);
++		if (count >= 100)
++			dev_err(dev->hw->dev,
++				"write ba session base failed\n");
++	}
++
++	/* pn check init */
++	for (i = 0; i < dev->wlan.ind_cmd.particular_sid; i++) {
++		wed_w32(dev, MTK_WED_PN_CHECK_WDATA_M,
++			MTK_WED_PN_CHECK_IS_FIRST);
++
++		wed_w32(dev, MTK_WED_PN_CHECK_CFG, MTK_WED_PN_CHECK_WR |
++			FIELD_PREP(MTK_WED_PN_CHECK_SE_ID, i));
++
++		count = 0;
++		val = wed_r32(dev, MTK_WED_PN_CHECK_CFG);
++		while (!(val & MTK_WED_PN_CHECK_WR_RDY) && count++ < 100)
++			val = wed_r32(dev, MTK_WED_PN_CHECK_CFG);
++		if (count >= 100)
++			dev_err(dev->hw->dev,
++				"session(%d) initialization failed\n", i);
++	}
++
++	wed_w32(dev, MTK_WED_RX_IND_CMD_CNT0, MTK_WED_RX_IND_CMD_DBG_CNT_EN);
++	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_RX_IND_CMD_EN);
++
++	return 0;
++}
++
++static void
+ mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)
+ {
+ 	int i;
+@@ -2215,6 +2506,10 @@ void mtk_wed_add_hw(struct device_node *
+ 		.detach = mtk_wed_detach,
+ 		.ppe_check = mtk_wed_ppe_check,
+ 		.setup_tc = mtk_wed_setup_tc,
++		.start_hw_rro = mtk_wed_start_hw_rro,
++		.rro_rx_ring_setup = mtk_wed_rro_rx_ring_setup,
++		.msdu_pg_rx_ring_setup = mtk_wed_msdu_pg_rx_ring_setup,
++		.ind_rx_ring_setup = mtk_wed_ind_rx_ring_setup,
+ 	};
+ 	struct device_node *eth_np = eth->dev->of_node;
+ 	struct platform_device *pdev;
+--- a/include/linux/soc/mediatek/mtk_wed.h
++++ b/include/linux/soc/mediatek/mtk_wed.h
+@@ -10,6 +10,7 @@
+ 
+ #define MTK_WED_TX_QUEUES		2
+ #define MTK_WED_RX_QUEUES		2
++#define MTK_WED_RX_PAGE_QUEUES		3
+ 
+ #define WED_WO_STA_REC			0x6
+ 
+@@ -99,6 +100,9 @@ struct mtk_wed_device {
+ 	struct mtk_wed_ring txfree_ring;
+ 	struct mtk_wed_ring tx_wdma[MTK_WED_TX_QUEUES];
+ 	struct mtk_wed_ring rx_wdma[MTK_WED_RX_QUEUES];
++	struct mtk_wed_ring rx_rro_ring[MTK_WED_RX_QUEUES];
++	struct mtk_wed_ring rx_page_ring[MTK_WED_RX_PAGE_QUEUES];
++	struct mtk_wed_ring ind_cmd_ring;
+ 
+ 	struct {
+ 		int size;
+@@ -120,6 +124,13 @@ struct mtk_wed_device {
+ 		dma_addr_t fdbk_phys;
+ 	} rro;
+ 
++	struct {
++		int size;
++		struct mtk_wed_buf *pages;
++		struct mtk_wed_bm_desc *desc;
++		dma_addr_t desc_phys;
++	} hw_rro;
++
+ 	/* filled by driver: */
+ 	struct {
+ 		union {
+@@ -138,6 +149,8 @@ struct mtk_wed_device {
+ 		u32 wpdma_txfree;
+ 		u32 wpdma_rx_glo;
+ 		u32 wpdma_rx;
++		u32 wpdma_rx_rro[MTK_WED_RX_QUEUES];
++		u32 wpdma_rx_pg;
+ 
+ 		bool wcid_512;
+ 		bool hw_rro;
+@@ -152,9 +165,20 @@ struct mtk_wed_device {
+ 
+ 		u8 tx_tbit[MTK_WED_TX_QUEUES];
+ 		u8 rx_tbit[MTK_WED_RX_QUEUES];
++		u8 rro_rx_tbit[MTK_WED_RX_QUEUES];
++		u8 rx_pg_tbit[MTK_WED_RX_PAGE_QUEUES];
+ 		u8 txfree_tbit;
+ 		u8 amsdu_max_subframes;
+ 
++		struct {
++			u8 se_group_nums;
++			u16 win_size;
++			u16 particular_sid;
++			u32 ack_sn_addr;
++			dma_addr_t particular_se_phys;
++			dma_addr_t addr_elem_phys[1024];
++		} ind_cmd;
++
+ 		u32 (*init_buf)(void *ptr, dma_addr_t phys, int token_id);
+ 		int (*offload_enable)(struct mtk_wed_device *wed);
+ 		void (*offload_disable)(struct mtk_wed_device *wed);
+@@ -193,6 +217,14 @@ struct mtk_wed_ops {
+ 	void (*irq_set_mask)(struct mtk_wed_device *dev, u32 mask);
+ 	int (*setup_tc)(struct mtk_wed_device *wed, struct net_device *dev,
+ 			enum tc_setup_type type, void *type_data);
++	void (*start_hw_rro)(struct mtk_wed_device *dev, u32 irq_mask,
++			     bool reset);
++	void (*rro_rx_ring_setup)(struct mtk_wed_device *dev, int ring,
++				  void __iomem *regs);
++	void (*msdu_pg_rx_ring_setup)(struct mtk_wed_device *dev, int ring,
++				      void __iomem *regs);
++	int (*ind_rx_ring_setup)(struct mtk_wed_device *dev,
++				 void __iomem *regs);
+ };
+ 
+ extern const struct mtk_wed_ops __rcu *mtk_soc_wed_ops;
+@@ -264,6 +296,15 @@ static inline bool mtk_wed_is_amsdu_supp
+ #define mtk_wed_device_dma_reset(_dev) (_dev)->ops->reset_dma(_dev)
+ #define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data) \
+ 	(_dev)->ops->setup_tc(_dev, _netdev, _type, _type_data)
++#define mtk_wed_device_start_hw_rro(_dev, _mask, _reset) \
++	(_dev)->ops->start_hw_rro(_dev, _mask, _reset)
++#define mtk_wed_device_rro_rx_ring_setup(_dev, _ring, _regs) \
++	(_dev)->ops->rro_rx_ring_setup(_dev, _ring, _regs)
++#define mtk_wed_device_msdu_pg_rx_ring_setup(_dev, _ring, _regs) \
++	(_dev)->ops->msdu_pg_rx_ring_setup(_dev, _ring, _regs)
++#define mtk_wed_device_ind_rx_ring_setup(_dev, _regs) \
++	(_dev)->ops->ind_rx_ring_setup(_dev, _regs)
++
+ #else
+ static inline bool mtk_wed_device_active(struct mtk_wed_device *dev)
+ {
+@@ -283,6 +324,10 @@ static inline bool mtk_wed_device_active
+ #define mtk_wed_device_stop(_dev) do {} while (0)
+ #define mtk_wed_device_dma_reset(_dev) do {} while (0)
+ #define mtk_wed_device_setup_tc(_dev, _netdev, _type, _type_data) -EOPNOTSUPP
++#define mtk_wed_device_start_hw_rro(_dev, _mask, _reset) do {} while (0)
++#define mtk_wed_device_rro_rx_ring_setup(_dev, _ring, _regs) -ENODEV
++#define mtk_wed_device_msdu_pg_rx_ring_setup(_dev, _ring, _regs) -ENODEV
++#define mtk_wed_device_ind_rx_ring_setup(_dev, _regs) -ENODEV
+ #endif
+ 
+ #endif
diff --git a/target/linux/generic/backport-5.15/752-18-v6.7-net-ethernet-mtk_wed-debugfs-move-wed_v2-specific-re.patch b/target/linux/generic/backport-5.15/752-18-v6.7-net-ethernet-mtk_wed-debugfs-move-wed_v2-specific-re.patch
new file mode 100644
index 0000000000..5ea43a4445
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-18-v6.7-net-ethernet-mtk_wed-debugfs-move-wed_v2-specific-re.patch
@@ -0,0 +1,78 @@
+From: Lorenzo Bianconi <lorenzo at kernel.org>
+Date: Mon, 18 Sep 2023 12:29:17 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: debugfs: move wed_v2 specific regs
+ out of regs array
+
+Move specific WED2.0 debugfs entries out of regs array. This is a
+preliminary patch to introduce WED 3.0 debugfs info.
+
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
+@@ -151,7 +151,7 @@ DEFINE_SHOW_ATTRIBUTE(wed_txinfo);
+ static int
+ wed_rxinfo_show(struct seq_file *s, void *data)
+ {
+-	static const struct reg_dump regs[] = {
++	static const struct reg_dump regs_common[] = {
+ 		DUMP_STR("WPDMA RX"),
+ 		DUMP_WPDMA_RX_RING(0),
+ 		DUMP_WPDMA_RX_RING(1),
+@@ -169,7 +169,7 @@ wed_rxinfo_show(struct seq_file *s, void
+ 		DUMP_WED_RING(WED_RING_RX_DATA(0)),
+ 		DUMP_WED_RING(WED_RING_RX_DATA(1)),
+ 
+-		DUMP_STR("WED RRO"),
++		DUMP_STR("WED WO RRO"),
+ 		DUMP_WED_RRO_RING(WED_RROQM_MIOD_CTRL0),
+ 		DUMP_WED(WED_RROQM_MID_MIB),
+ 		DUMP_WED(WED_RROQM_MOD_MIB),
+@@ -180,17 +180,6 @@ wed_rxinfo_show(struct seq_file *s, void
+ 		DUMP_WED(WED_RROQM_FDBK_ANC_MIB),
+ 		DUMP_WED(WED_RROQM_FDBK_ANC2H_MIB),
+ 
+-		DUMP_STR("WED Route QM"),
+-		DUMP_WED(WED_RTQM_R2H_MIB(0)),
+-		DUMP_WED(WED_RTQM_R2Q_MIB(0)),
+-		DUMP_WED(WED_RTQM_Q2H_MIB(0)),
+-		DUMP_WED(WED_RTQM_R2H_MIB(1)),
+-		DUMP_WED(WED_RTQM_R2Q_MIB(1)),
+-		DUMP_WED(WED_RTQM_Q2H_MIB(1)),
+-		DUMP_WED(WED_RTQM_Q2N_MIB),
+-		DUMP_WED(WED_RTQM_Q2B_MIB),
+-		DUMP_WED(WED_RTQM_PFDBK_MIB),
+-
+ 		DUMP_STR("WED WDMA TX"),
+ 		DUMP_WED(WED_WDMA_TX_MIB),
+ 		DUMP_WED_RING(WED_WDMA_RING_TX),
+@@ -211,11 +200,25 @@ wed_rxinfo_show(struct seq_file *s, void
+ 		DUMP_WED(WED_RX_BM_INTF),
+ 		DUMP_WED(WED_RX_BM_ERR_STS),
+ 	};
++	static const struct reg_dump regs_wed_v2[] = {
++		DUMP_STR("WED Route QM"),
++		DUMP_WED(WED_RTQM_R2H_MIB(0)),
++		DUMP_WED(WED_RTQM_R2Q_MIB(0)),
++		DUMP_WED(WED_RTQM_Q2H_MIB(0)),
++		DUMP_WED(WED_RTQM_R2H_MIB(1)),
++		DUMP_WED(WED_RTQM_R2Q_MIB(1)),
++		DUMP_WED(WED_RTQM_Q2H_MIB(1)),
++		DUMP_WED(WED_RTQM_Q2N_MIB),
++		DUMP_WED(WED_RTQM_Q2B_MIB),
++		DUMP_WED(WED_RTQM_PFDBK_MIB),
++	};
+ 	struct mtk_wed_hw *hw = s->private;
+ 	struct mtk_wed_device *dev = hw->wed_dev;
+ 
+-	if (dev)
+-		dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
++	if (dev) {
++		dump_wed_regs(s, dev, regs_common, ARRAY_SIZE(regs_common));
++		dump_wed_regs(s, dev, regs_wed_v2, ARRAY_SIZE(regs_wed_v2));
++	}
+ 
+ 	return 0;
+ }
diff --git a/target/linux/generic/backport-5.15/752-19-v6.7-net-ethernet-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch b/target/linux/generic/backport-5.15/752-19-v6.7-net-ethernet-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch
new file mode 100644
index 0000000000..f491d2fd80
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-19-v6.7-net-ethernet-mtk_wed-debugfs-add-WED-3.0-debugfs-ent.patch
@@ -0,0 +1,432 @@
+From: Sujuan Chen <sujuan.chen at mediatek.com>
+Date: Mon, 18 Sep 2023 12:29:18 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: debugfs: add WED 3.0 debugfs entries
+
+Introduce WED3.0 debugfs entries useful for debugging.
+
+Co-developed-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed_debugfs.c
+@@ -11,6 +11,7 @@ struct reg_dump {
+ 	u16 offset;
+ 	u8 type;
+ 	u8 base;
++	u32 mask;
+ };
+ 
+ enum {
+@@ -25,6 +26,8 @@ enum {
+ 
+ #define DUMP_STR(_str) { _str, 0, DUMP_TYPE_STRING }
+ #define DUMP_REG(_reg, ...) { #_reg, MTK_##_reg, __VA_ARGS__ }
++#define DUMP_REG_MASK(_reg, _mask)	\
++	{ #_mask, MTK_##_reg, DUMP_TYPE_WED, 0, MTK_##_mask }
+ #define DUMP_RING(_prefix, _base, ...)				\
+ 	{ _prefix " BASE", _base, __VA_ARGS__ },		\
+ 	{ _prefix " CNT",  _base + 0x4, __VA_ARGS__ },	\
+@@ -32,6 +35,7 @@ enum {
+ 	{ _prefix " DIDX", _base + 0xc, __VA_ARGS__ }
+ 
+ #define DUMP_WED(_reg) DUMP_REG(_reg, DUMP_TYPE_WED)
++#define DUMP_WED_MASK(_reg, _mask) DUMP_REG_MASK(_reg, _mask)
+ #define DUMP_WED_RING(_base) DUMP_RING(#_base, MTK_##_base, DUMP_TYPE_WED)
+ 
+ #define DUMP_WDMA(_reg) DUMP_REG(_reg, DUMP_TYPE_WDMA)
+@@ -212,12 +216,58 @@ wed_rxinfo_show(struct seq_file *s, void
+ 		DUMP_WED(WED_RTQM_Q2B_MIB),
+ 		DUMP_WED(WED_RTQM_PFDBK_MIB),
+ 	};
++	static const struct reg_dump regs_wed_v3[] = {
++		DUMP_STR("WED RX RRO DATA"),
++		DUMP_WED_RING(WED_RRO_RX_D_RX(0)),
++		DUMP_WED_RING(WED_RRO_RX_D_RX(1)),
++
++		DUMP_STR("WED RX MSDU PAGE"),
++		DUMP_WED_RING(WED_RRO_MSDU_PG_CTRL0(0)),
++		DUMP_WED_RING(WED_RRO_MSDU_PG_CTRL0(1)),
++		DUMP_WED_RING(WED_RRO_MSDU_PG_CTRL0(2)),
++
++		DUMP_STR("WED RX IND CMD"),
++		DUMP_WED(WED_IND_CMD_RX_CTRL1),
++		DUMP_WED_MASK(WED_IND_CMD_RX_CTRL2, WED_IND_CMD_MAX_CNT),
++		DUMP_WED_MASK(WED_IND_CMD_RX_CTRL0, WED_IND_CMD_PROC_IDX),
++		DUMP_WED_MASK(RRO_IND_CMD_SIGNATURE, RRO_IND_CMD_DMA_IDX),
++		DUMP_WED_MASK(WED_IND_CMD_RX_CTRL0, WED_IND_CMD_MAGIC_CNT),
++		DUMP_WED_MASK(RRO_IND_CMD_SIGNATURE, RRO_IND_CMD_MAGIC_CNT),
++		DUMP_WED_MASK(WED_IND_CMD_RX_CTRL0,
++			      WED_IND_CMD_PREFETCH_FREE_CNT),
++		DUMP_WED_MASK(WED_RRO_CFG1, WED_RRO_CFG1_PARTICL_SE_ID),
++
++		DUMP_STR("WED ADDR ELEM"),
++		DUMP_WED(WED_ADDR_ELEM_CFG0),
++		DUMP_WED_MASK(WED_ADDR_ELEM_CFG1,
++			      WED_ADDR_ELEM_PREFETCH_FREE_CNT),
++
++		DUMP_STR("WED Route QM"),
++		DUMP_WED(WED_RTQM_ENQ_I2Q_DMAD_CNT),
++		DUMP_WED(WED_RTQM_ENQ_I2N_DMAD_CNT),
++		DUMP_WED(WED_RTQM_ENQ_I2Q_PKT_CNT),
++		DUMP_WED(WED_RTQM_ENQ_I2N_PKT_CNT),
++		DUMP_WED(WED_RTQM_ENQ_USED_ENTRY_CNT),
++		DUMP_WED(WED_RTQM_ENQ_ERR_CNT),
++
++		DUMP_WED(WED_RTQM_DEQ_DMAD_CNT),
++		DUMP_WED(WED_RTQM_DEQ_Q2I_DMAD_CNT),
++		DUMP_WED(WED_RTQM_DEQ_PKT_CNT),
++		DUMP_WED(WED_RTQM_DEQ_Q2I_PKT_CNT),
++		DUMP_WED(WED_RTQM_DEQ_USED_PFDBK_CNT),
++		DUMP_WED(WED_RTQM_DEQ_ERR_CNT),
++	};
+ 	struct mtk_wed_hw *hw = s->private;
+ 	struct mtk_wed_device *dev = hw->wed_dev;
+ 
+ 	if (dev) {
+ 		dump_wed_regs(s, dev, regs_common, ARRAY_SIZE(regs_common));
+-		dump_wed_regs(s, dev, regs_wed_v2, ARRAY_SIZE(regs_wed_v2));
++		if (mtk_wed_is_v2(hw))
++			dump_wed_regs(s, dev,
++				      regs_wed_v2, ARRAY_SIZE(regs_wed_v2));
++		else
++			dump_wed_regs(s, dev,
++				      regs_wed_v3, ARRAY_SIZE(regs_wed_v3));
+ 	}
+ 
+ 	return 0;
+@@ -225,6 +275,314 @@ wed_rxinfo_show(struct seq_file *s, void
+ DEFINE_SHOW_ATTRIBUTE(wed_rxinfo);
+ 
+ static int
++wed_amsdu_show(struct seq_file *s, void *data)
++{
++	static const struct reg_dump regs[] = {
++		DUMP_STR("WED AMDSU INFO"),
++		DUMP_WED(WED_MON_AMSDU_FIFO_DMAD),
++
++		DUMP_STR("WED AMDSU ENG0 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(0)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(0)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(0)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(0)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(0)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(0),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(0),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(0),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(0),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(0),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED AMDSU ENG1 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(1)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(1)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(1)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(1)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(1)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(1),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(1),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(1),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(2),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(2),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED AMDSU ENG2 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(2)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(2)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(2)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(2)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(2)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(2),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(2),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(2),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(2),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(2),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED AMDSU ENG3 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(3)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(3)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(3)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(3)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(3)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(3),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(3),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(3),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(3),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(3),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED AMDSU ENG4 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(4)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(4)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(4)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(4)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(4)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(4),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(4),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(4),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(4),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(4),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED AMDSU ENG5 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(5)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(5)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(5)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(5)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(5)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(5),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(5),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(5),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(5),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(5),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED AMDSU ENG6 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(6)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(6)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(6)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(6)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(6)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(6),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(6),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(6),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(6),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(6),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED AMDSU ENG7 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(7)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(7)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(7)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(7)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(7)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(7),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(7),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(7),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(7),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(4),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED AMDSU ENG8 INFO"),
++		DUMP_WED(WED_MON_AMSDU_ENG_DMAD(8)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QFPL(8)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENI(8)),
++		DUMP_WED(WED_MON_AMSDU_ENG_QENO(8)),
++		DUMP_WED(WED_MON_AMSDU_ENG_MERG(8)),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(8),
++			      WED_AMSDU_ENG_MAX_PL_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT8(8),
++			      WED_AMSDU_ENG_MAX_QGPP_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(8),
++			      WED_AMSDU_ENG_CUR_ENTRY),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(8),
++			      WED_AMSDU_ENG_MAX_BUF_MERGED),
++		DUMP_WED_MASK(WED_MON_AMSDU_ENG_CNT9(8),
++			      WED_AMSDU_ENG_MAX_MSDU_MERGED),
++
++		DUMP_STR("WED QMEM INFO"),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(0), WED_AMSDU_QMEM_FQ_CNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(0), WED_AMSDU_QMEM_SP_QCNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(1), WED_AMSDU_QMEM_TID0_QCNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(1), WED_AMSDU_QMEM_TID1_QCNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(2), WED_AMSDU_QMEM_TID2_QCNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(2), WED_AMSDU_QMEM_TID3_QCNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(3), WED_AMSDU_QMEM_TID4_QCNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(3), WED_AMSDU_QMEM_TID5_QCNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(4), WED_AMSDU_QMEM_TID6_QCNT),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_CNT(4), WED_AMSDU_QMEM_TID7_QCNT),
++
++		DUMP_STR("WED QMEM HEAD INFO"),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(0), WED_AMSDU_QMEM_FQ_HEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(0), WED_AMSDU_QMEM_SP_QHEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(1), WED_AMSDU_QMEM_TID0_QHEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(1), WED_AMSDU_QMEM_TID1_QHEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(2), WED_AMSDU_QMEM_TID2_QHEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(2), WED_AMSDU_QMEM_TID3_QHEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(3), WED_AMSDU_QMEM_TID4_QHEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(3), WED_AMSDU_QMEM_TID5_QHEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(4), WED_AMSDU_QMEM_TID6_QHEAD),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(4), WED_AMSDU_QMEM_TID7_QHEAD),
++
++		DUMP_STR("WED QMEM TAIL INFO"),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(5), WED_AMSDU_QMEM_FQ_TAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(5), WED_AMSDU_QMEM_SP_QTAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(6), WED_AMSDU_QMEM_TID0_QTAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(6), WED_AMSDU_QMEM_TID1_QTAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(7), WED_AMSDU_QMEM_TID2_QTAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(7), WED_AMSDU_QMEM_TID3_QTAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(8), WED_AMSDU_QMEM_TID4_QTAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(8), WED_AMSDU_QMEM_TID5_QTAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(9), WED_AMSDU_QMEM_TID6_QTAIL),
++		DUMP_WED_MASK(WED_MON_AMSDU_QMEM_PTR(9), WED_AMSDU_QMEM_TID7_QTAIL),
++
++		DUMP_STR("WED HIFTXD MSDU INFO"),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(1)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(2)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(3)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(4)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(5)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(6)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(7)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(8)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(9)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(10)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(11)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(12)),
++		DUMP_WED(WED_MON_AMSDU_HIFTXD_FETCH_MSDU(13)),
++	};
++	struct mtk_wed_hw *hw = s->private;
++	struct mtk_wed_device *dev = hw->wed_dev;
++
++	if (dev)
++		dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
++
++	return 0;
++}
++DEFINE_SHOW_ATTRIBUTE(wed_amsdu);
++
++static int
++wed_rtqm_show(struct seq_file *s, void *data)
++{
++	static const struct reg_dump regs[] = {
++		DUMP_STR("WED Route QM IGRS0(N2H + Recycle)"),
++		DUMP_WED(WED_RTQM_IGRS0_I2HW_DMAD_CNT),
++		DUMP_WED(WED_RTQM_IGRS0_I2H_DMAD_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS0_I2H_DMAD_CNT(1)),
++		DUMP_WED(WED_RTQM_IGRS0_I2HW_PKT_CNT),
++		DUMP_WED(WED_RTQM_IGRS0_I2H_PKT_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS0_I2H_PKT_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS0_FDROP_CNT),
++
++		DUMP_STR("WED Route QM IGRS1(Legacy)"),
++		DUMP_WED(WED_RTQM_IGRS1_I2HW_DMAD_CNT),
++		DUMP_WED(WED_RTQM_IGRS1_I2H_DMAD_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS1_I2H_DMAD_CNT(1)),
++		DUMP_WED(WED_RTQM_IGRS1_I2HW_PKT_CNT),
++		DUMP_WED(WED_RTQM_IGRS1_I2H_PKT_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS1_I2H_PKT_CNT(1)),
++		DUMP_WED(WED_RTQM_IGRS1_FDROP_CNT),
++
++		DUMP_STR("WED Route QM IGRS2(RRO3.0)"),
++		DUMP_WED(WED_RTQM_IGRS2_I2HW_DMAD_CNT),
++		DUMP_WED(WED_RTQM_IGRS2_I2H_DMAD_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS2_I2H_DMAD_CNT(1)),
++		DUMP_WED(WED_RTQM_IGRS2_I2HW_PKT_CNT),
++		DUMP_WED(WED_RTQM_IGRS2_I2H_PKT_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS2_I2H_PKT_CNT(1)),
++		DUMP_WED(WED_RTQM_IGRS2_FDROP_CNT),
++
++		DUMP_STR("WED Route QM IGRS3(DEBUG)"),
++		DUMP_WED(WED_RTQM_IGRS2_I2HW_DMAD_CNT),
++		DUMP_WED(WED_RTQM_IGRS3_I2H_DMAD_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS3_I2H_DMAD_CNT(1)),
++		DUMP_WED(WED_RTQM_IGRS3_I2HW_PKT_CNT),
++		DUMP_WED(WED_RTQM_IGRS3_I2H_PKT_CNT(0)),
++		DUMP_WED(WED_RTQM_IGRS3_I2H_PKT_CNT(1)),
++		DUMP_WED(WED_RTQM_IGRS3_FDROP_CNT),
++	};
++	struct mtk_wed_hw *hw = s->private;
++	struct mtk_wed_device *dev = hw->wed_dev;
++
++	if (dev)
++		dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
++
++	return 0;
++}
++DEFINE_SHOW_ATTRIBUTE(wed_rtqm);
++
++static int
++wed_rro_show(struct seq_file *s, void *data)
++{
++	static const struct reg_dump regs[] = {
++		DUMP_STR("RRO/IND CMD CNT"),
++		DUMP_WED(WED_RX_IND_CMD_CNT(1)),
++		DUMP_WED(WED_RX_IND_CMD_CNT(2)),
++		DUMP_WED(WED_RX_IND_CMD_CNT(3)),
++		DUMP_WED(WED_RX_IND_CMD_CNT(4)),
++		DUMP_WED(WED_RX_IND_CMD_CNT(5)),
++		DUMP_WED(WED_RX_IND_CMD_CNT(6)),
++		DUMP_WED(WED_RX_IND_CMD_CNT(7)),
++		DUMP_WED(WED_RX_IND_CMD_CNT(8)),
++		DUMP_WED_MASK(WED_RX_IND_CMD_CNT(9),
++			      WED_IND_CMD_MAGIC_CNT_FAIL_CNT),
++
++		DUMP_WED(WED_RX_ADDR_ELEM_CNT(0)),
++		DUMP_WED_MASK(WED_RX_ADDR_ELEM_CNT(1),
++			      WED_ADDR_ELEM_SIG_FAIL_CNT),
++		DUMP_WED(WED_RX_MSDU_PG_CNT(1)),
++		DUMP_WED(WED_RX_MSDU_PG_CNT(2)),
++		DUMP_WED(WED_RX_MSDU_PG_CNT(3)),
++		DUMP_WED(WED_RX_MSDU_PG_CNT(4)),
++		DUMP_WED(WED_RX_MSDU_PG_CNT(5)),
++		DUMP_WED_MASK(WED_RX_PN_CHK_CNT,
++			      WED_PN_CHK_FAIL_CNT),
++	};
++	struct mtk_wed_hw *hw = s->private;
++	struct mtk_wed_device *dev = hw->wed_dev;
++
++	if (dev)
++		dump_wed_regs(s, dev, regs, ARRAY_SIZE(regs));
++
++	return 0;
++}
++DEFINE_SHOW_ATTRIBUTE(wed_rro);
++
++static int
+ mtk_wed_reg_set(void *data, u64 val)
+ {
+ 	struct mtk_wed_hw *hw = data;
+@@ -266,7 +624,16 @@ void mtk_wed_hw_add_debugfs(struct mtk_w
+ 	debugfs_create_u32("regidx", 0600, dir, &hw->debugfs_reg);
+ 	debugfs_create_file_unsafe("regval", 0600, dir, hw, &fops_regval);
+ 	debugfs_create_file_unsafe("txinfo", 0400, dir, hw, &wed_txinfo_fops);
+-	if (!mtk_wed_is_v1(hw))
++	if (!mtk_wed_is_v1(hw)) {
+ 		debugfs_create_file_unsafe("rxinfo", 0400, dir, hw,
+ 					   &wed_rxinfo_fops);
++		if (mtk_wed_is_v3_or_greater(hw)) {
++			debugfs_create_file_unsafe("amsdu", 0400, dir, hw,
++						   &wed_amsdu_fops);
++			debugfs_create_file_unsafe("rtqm", 0400, dir, hw,
++						   &wed_rtqm_fops);
++			debugfs_create_file_unsafe("rro", 0400, dir, hw,
++						   &wed_rro_fops);
++		}
++	}
+ }
diff --git a/target/linux/generic/backport-5.15/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch b/target/linux/generic/backport-5.15/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch
new file mode 100644
index 0000000000..aaaabf05e8
--- /dev/null
+++ b/target/linux/generic/backport-5.15/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch
@@ -0,0 +1,587 @@
+From: Sujuan Chen <sujuan.chen at mediatek.com>
+Date: Mon, 18 Sep 2023 12:29:19 +0200
+Subject: [PATCH] net: ethernet: mtk_wed: add wed 3.0 reset support
+
+Introduce support for resetting Wireless Ethernet Dispatcher 3.0
+available on MT988 SoC.
+
+Co-developed-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
+Signed-off-by: Sujuan Chen <sujuan.chen at mediatek.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+
+--- a/drivers/net/ethernet/mediatek/mtk_wed.c
++++ b/drivers/net/ethernet/mediatek/mtk_wed.c
+@@ -148,6 +148,90 @@ mtk_wdma_read_reset(struct mtk_wed_devic
+ 	return wdma_r32(dev, MTK_WDMA_GLO_CFG);
+ }
+ 
++static void
++mtk_wdma_v3_rx_reset(struct mtk_wed_device *dev)
++{
++	u32 status;
++
++	if (!mtk_wed_is_v3_or_greater(dev->hw))
++		return;
++
++	wdma_clr(dev, MTK_WDMA_PREF_TX_CFG, MTK_WDMA_PREF_TX_CFG_PREF_EN);
++	wdma_clr(dev, MTK_WDMA_PREF_RX_CFG, MTK_WDMA_PREF_RX_CFG_PREF_EN);
++
++	if (read_poll_timeout(wdma_r32, status,
++			      !(status & MTK_WDMA_PREF_TX_CFG_PREF_BUSY),
++			      0, 10000, false, dev, MTK_WDMA_PREF_TX_CFG))
++		dev_err(dev->hw->dev, "rx reset failed\n");
++
++	if (read_poll_timeout(wdma_r32, status,
++			      !(status & MTK_WDMA_PREF_RX_CFG_PREF_BUSY),
++			      0, 10000, false, dev, MTK_WDMA_PREF_RX_CFG))
++		dev_err(dev->hw->dev, "rx reset failed\n");
++
++	wdma_clr(dev, MTK_WDMA_WRBK_TX_CFG, MTK_WDMA_WRBK_TX_CFG_WRBK_EN);
++	wdma_clr(dev, MTK_WDMA_WRBK_RX_CFG, MTK_WDMA_WRBK_RX_CFG_WRBK_EN);
++
++	if (read_poll_timeout(wdma_r32, status,
++			      !(status & MTK_WDMA_WRBK_TX_CFG_WRBK_BUSY),
++			      0, 10000, false, dev, MTK_WDMA_WRBK_TX_CFG))
++		dev_err(dev->hw->dev, "rx reset failed\n");
++
++	if (read_poll_timeout(wdma_r32, status,
++			      !(status & MTK_WDMA_WRBK_RX_CFG_WRBK_BUSY),
++			      0, 10000, false, dev, MTK_WDMA_WRBK_RX_CFG))
++		dev_err(dev->hw->dev, "rx reset failed\n");
++
++	/* prefetch FIFO */
++	wdma_w32(dev, MTK_WDMA_PREF_RX_FIFO_CFG,
++		 MTK_WDMA_PREF_RX_FIFO_CFG_RING0_CLEAR |
++		 MTK_WDMA_PREF_RX_FIFO_CFG_RING1_CLEAR);
++	wdma_clr(dev, MTK_WDMA_PREF_RX_FIFO_CFG,
++		 MTK_WDMA_PREF_RX_FIFO_CFG_RING0_CLEAR |
++		 MTK_WDMA_PREF_RX_FIFO_CFG_RING1_CLEAR);
++
++	/* core FIFO */
++	wdma_w32(dev, MTK_WDMA_XDMA_RX_FIFO_CFG,
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_PAR_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_CMD_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_DMAD_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_ARR_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_LEN_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_WID_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_BID_FIFO_CLEAR);
++	wdma_clr(dev, MTK_WDMA_XDMA_RX_FIFO_CFG,
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_PAR_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_CMD_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_DMAD_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_ARR_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_LEN_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_WID_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_RX_FIFO_CFG_RX_BID_FIFO_CLEAR);
++
++	/* writeback FIFO */
++	wdma_w32(dev, MTK_WDMA_WRBK_RX_FIFO_CFG(0),
++		 MTK_WDMA_WRBK_RX_FIFO_CFG_RING_CLEAR);
++	wdma_w32(dev, MTK_WDMA_WRBK_RX_FIFO_CFG(1),
++		 MTK_WDMA_WRBK_RX_FIFO_CFG_RING_CLEAR);
++
++	wdma_clr(dev, MTK_WDMA_WRBK_RX_FIFO_CFG(0),
++		 MTK_WDMA_WRBK_RX_FIFO_CFG_RING_CLEAR);
++	wdma_clr(dev, MTK_WDMA_WRBK_RX_FIFO_CFG(1),
++		 MTK_WDMA_WRBK_RX_FIFO_CFG_RING_CLEAR);
++
++	/* prefetch ring status */
++	wdma_w32(dev, MTK_WDMA_PREF_SIDX_CFG,
++		 MTK_WDMA_PREF_SIDX_CFG_RX_RING_CLEAR);
++	wdma_clr(dev, MTK_WDMA_PREF_SIDX_CFG,
++		 MTK_WDMA_PREF_SIDX_CFG_RX_RING_CLEAR);
++
++	/* writeback ring status */
++	wdma_w32(dev, MTK_WDMA_WRBK_SIDX_CFG,
++		 MTK_WDMA_WRBK_SIDX_CFG_RX_RING_CLEAR);
++	wdma_clr(dev, MTK_WDMA_WRBK_SIDX_CFG,
++		 MTK_WDMA_WRBK_SIDX_CFG_RX_RING_CLEAR);
++}
++
+ static int
+ mtk_wdma_rx_reset(struct mtk_wed_device *dev)
+ {
+@@ -160,6 +244,7 @@ mtk_wdma_rx_reset(struct mtk_wed_device
+ 	if (ret)
+ 		dev_err(dev->hw->dev, "rx reset failed\n");
+ 
++	mtk_wdma_v3_rx_reset(dev);
+ 	wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_RX);
+ 	wdma_w32(dev, MTK_WDMA_RESET_IDX, 0);
+ 
+@@ -192,6 +277,84 @@ mtk_wed_poll_busy(struct mtk_wed_device
+ }
+ 
+ static void
++mtk_wdma_v3_tx_reset(struct mtk_wed_device *dev)
++{
++	u32 status;
++
++	if (!mtk_wed_is_v3_or_greater(dev->hw))
++		return;
++
++	wdma_clr(dev, MTK_WDMA_PREF_TX_CFG, MTK_WDMA_PREF_TX_CFG_PREF_EN);
++	wdma_clr(dev, MTK_WDMA_PREF_RX_CFG, MTK_WDMA_PREF_RX_CFG_PREF_EN);
++
++	if (read_poll_timeout(wdma_r32, status,
++			      !(status & MTK_WDMA_PREF_TX_CFG_PREF_BUSY),
++			      0, 10000, false, dev, MTK_WDMA_PREF_TX_CFG))
++		dev_err(dev->hw->dev, "tx reset failed\n");
++
++	if (read_poll_timeout(wdma_r32, status,
++			      !(status & MTK_WDMA_PREF_RX_CFG_PREF_BUSY),
++			      0, 10000, false, dev, MTK_WDMA_PREF_RX_CFG))
++		dev_err(dev->hw->dev, "tx reset failed\n");
++
++	wdma_clr(dev, MTK_WDMA_WRBK_TX_CFG, MTK_WDMA_WRBK_TX_CFG_WRBK_EN);
++	wdma_clr(dev, MTK_WDMA_WRBK_RX_CFG, MTK_WDMA_WRBK_RX_CFG_WRBK_EN);
++
++	if (read_poll_timeout(wdma_r32, status,
++			      !(status & MTK_WDMA_WRBK_TX_CFG_WRBK_BUSY),
++			      0, 10000, false, dev, MTK_WDMA_WRBK_TX_CFG))
++		dev_err(dev->hw->dev, "tx reset failed\n");
++
++	if (read_poll_timeout(wdma_r32, status,
++			      !(status & MTK_WDMA_WRBK_RX_CFG_WRBK_BUSY),
++			      0, 10000, false, dev, MTK_WDMA_WRBK_RX_CFG))
++		dev_err(dev->hw->dev, "tx reset failed\n");
++
++	/* prefetch FIFO */
++	wdma_w32(dev, MTK_WDMA_PREF_TX_FIFO_CFG,
++		 MTK_WDMA_PREF_TX_FIFO_CFG_RING0_CLEAR |
++		 MTK_WDMA_PREF_TX_FIFO_CFG_RING1_CLEAR);
++	wdma_clr(dev, MTK_WDMA_PREF_TX_FIFO_CFG,
++		 MTK_WDMA_PREF_TX_FIFO_CFG_RING0_CLEAR |
++		 MTK_WDMA_PREF_TX_FIFO_CFG_RING1_CLEAR);
++
++	/* core FIFO */
++	wdma_w32(dev, MTK_WDMA_XDMA_TX_FIFO_CFG,
++		 MTK_WDMA_XDMA_TX_FIFO_CFG_TX_PAR_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_TX_FIFO_CFG_TX_CMD_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_TX_FIFO_CFG_TX_DMAD_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_TX_FIFO_CFG_TX_ARR_FIFO_CLEAR);
++	wdma_clr(dev, MTK_WDMA_XDMA_TX_FIFO_CFG,
++		 MTK_WDMA_XDMA_TX_FIFO_CFG_TX_PAR_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_TX_FIFO_CFG_TX_CMD_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_TX_FIFO_CFG_TX_DMAD_FIFO_CLEAR |
++		 MTK_WDMA_XDMA_TX_FIFO_CFG_TX_ARR_FIFO_CLEAR);
++
++	/* writeback FIFO */
++	wdma_w32(dev, MTK_WDMA_WRBK_TX_FIFO_CFG(0),
++		 MTK_WDMA_WRBK_TX_FIFO_CFG_RING_CLEAR);
++	wdma_w32(dev, MTK_WDMA_WRBK_TX_FIFO_CFG(1),
++		 MTK_WDMA_WRBK_TX_FIFO_CFG_RING_CLEAR);
++
++	wdma_clr(dev, MTK_WDMA_WRBK_TX_FIFO_CFG(0),
++		 MTK_WDMA_WRBK_TX_FIFO_CFG_RING_CLEAR);
++	wdma_clr(dev, MTK_WDMA_WRBK_TX_FIFO_CFG(1),
++		 MTK_WDMA_WRBK_TX_FIFO_CFG_RING_CLEAR);
++
++	/* prefetch ring status */
++	wdma_w32(dev, MTK_WDMA_PREF_SIDX_CFG,
++		 MTK_WDMA_PREF_SIDX_CFG_TX_RING_CLEAR);
++	wdma_clr(dev, MTK_WDMA_PREF_SIDX_CFG,
++		 MTK_WDMA_PREF_SIDX_CFG_TX_RING_CLEAR);
++
++	/* writeback ring status */
++	wdma_w32(dev, MTK_WDMA_WRBK_SIDX_CFG,
++		 MTK_WDMA_WRBK_SIDX_CFG_TX_RING_CLEAR);
++	wdma_clr(dev, MTK_WDMA_WRBK_SIDX_CFG,
++		 MTK_WDMA_WRBK_SIDX_CFG_TX_RING_CLEAR);
++}
++
++static void
+ mtk_wdma_tx_reset(struct mtk_wed_device *dev)
+ {
+ 	u32 status, mask = MTK_WDMA_GLO_CFG_TX_DMA_BUSY;
+@@ -202,6 +365,7 @@ mtk_wdma_tx_reset(struct mtk_wed_device
+ 			       !(status & mask), 0, 10000))
+ 		dev_err(dev->hw->dev, "tx reset failed\n");
+ 
++	mtk_wdma_v3_tx_reset(dev);
+ 	wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_TX);
+ 	wdma_w32(dev, MTK_WDMA_RESET_IDX, 0);
+ 
+@@ -1405,13 +1569,33 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+ 	if (ret)
+ 		return ret;
+ 
++	if (dev->wlan.hw_rro) {
++		wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_RX_IND_CMD_EN);
++		mtk_wed_poll_busy(dev, MTK_WED_RRO_RX_HW_STS,
++				  MTK_WED_RX_IND_CMD_BUSY);
++		mtk_wed_reset(dev, MTK_WED_RESET_RRO_RX_TO_PG);
++	}
++
+ 	wed_clr(dev, MTK_WED_WPDMA_RX_D_GLO_CFG, MTK_WED_WPDMA_RX_D_RX_DRV_EN);
+ 	ret = mtk_wed_poll_busy(dev, MTK_WED_WPDMA_RX_D_GLO_CFG,
+ 				MTK_WED_WPDMA_RX_D_RX_DRV_BUSY);
++	if (!ret && mtk_wed_is_v3_or_greater(dev->hw))
++		ret = mtk_wed_poll_busy(dev, MTK_WED_WPDMA_RX_D_PREF_CFG,
++					MTK_WED_WPDMA_RX_D_PREF_BUSY);
+ 	if (ret) {
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_INT_AGENT);
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_RX_D_DRV);
+ 	} else {
++		if (mtk_wed_is_v3_or_greater(dev->hw)) {
++			/* 1.a. disable prefetch HW */
++			wed_clr(dev, MTK_WED_WPDMA_RX_D_PREF_CFG,
++				MTK_WED_WPDMA_RX_D_PREF_EN);
++			mtk_wed_poll_busy(dev, MTK_WED_WPDMA_RX_D_PREF_CFG,
++					  MTK_WED_WPDMA_RX_D_PREF_BUSY);
++			wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX,
++				MTK_WED_WPDMA_RX_D_RST_DRV_IDX_ALL);
++		}
++
+ 		wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX,
+ 			MTK_WED_WPDMA_RX_D_RST_CRX_IDX |
+ 			MTK_WED_WPDMA_RX_D_RST_DRV_IDX);
+@@ -1439,23 +1623,52 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+ 		wed_w32(dev, MTK_WED_RROQM_RST_IDX, 0);
+ 	}
+ 
++	if (dev->wlan.hw_rro) {
++		/* disable rro msdu page drv */
++		wed_clr(dev, MTK_WED_RRO_MSDU_PG_RING2_CFG,
++			MTK_WED_RRO_MSDU_PG_DRV_EN);
++
++		/* disable rro data drv */
++		wed_clr(dev, MTK_WED_RRO_RX_D_CFG(2), MTK_WED_RRO_RX_D_DRV_EN);
++
++		/* rro msdu page drv reset */
++		wed_w32(dev, MTK_WED_RRO_MSDU_PG_RING2_CFG,
++			MTK_WED_RRO_MSDU_PG_DRV_CLR);
++		mtk_wed_poll_busy(dev, MTK_WED_RRO_MSDU_PG_RING2_CFG,
++				  MTK_WED_RRO_MSDU_PG_DRV_CLR);
++
++		/* rro data drv reset */
++		wed_w32(dev, MTK_WED_RRO_RX_D_CFG(2),
++			MTK_WED_RRO_RX_D_DRV_CLR);
++		mtk_wed_poll_busy(dev, MTK_WED_RRO_RX_D_CFG(2),
++				  MTK_WED_RRO_RX_D_DRV_CLR);
++	}
++
+ 	/* reset route qm */
+ 	wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_RX_ROUTE_QM_EN);
+ 	ret = mtk_wed_poll_busy(dev, MTK_WED_CTRL,
+ 				MTK_WED_CTRL_RX_ROUTE_QM_BUSY);
+-	if (ret)
++	if (ret) {
+ 		mtk_wed_reset(dev, MTK_WED_RESET_RX_ROUTE_QM);
+-	else
+-		wed_set(dev, MTK_WED_RTQM_GLO_CFG,
+-			MTK_WED_RTQM_Q_RST);
++	} else if (mtk_wed_is_v3_or_greater(dev->hw)) {
++		wed_set(dev, MTK_WED_RTQM_RST, BIT(0));
++		wed_clr(dev, MTK_WED_RTQM_RST, BIT(0));
++		mtk_wed_reset(dev, MTK_WED_RESET_RX_ROUTE_QM);
++	} else {
++		wed_set(dev, MTK_WED_RTQM_GLO_CFG, MTK_WED_RTQM_Q_RST);
++	}
+ 
+ 	/* reset tx wdma */
+ 	mtk_wdma_tx_reset(dev);
+ 
+ 	/* reset tx wdma drv */
+ 	wed_clr(dev, MTK_WED_WDMA_GLO_CFG, MTK_WED_WDMA_GLO_CFG_TX_DRV_EN);
+-	mtk_wed_poll_busy(dev, MTK_WED_CTRL,
+-			  MTK_WED_CTRL_WDMA_INT_AGENT_BUSY);
++	if (mtk_wed_is_v3_or_greater(dev->hw))
++		mtk_wed_poll_busy(dev, MTK_WED_WPDMA_STATUS,
++				  MTK_WED_WPDMA_STATUS_TX_DRV);
++	else
++		mtk_wed_poll_busy(dev, MTK_WED_CTRL,
++				  MTK_WED_CTRL_WDMA_INT_AGENT_BUSY);
+ 	mtk_wed_reset(dev, MTK_WED_RESET_WDMA_TX_DRV);
+ 
+ 	/* reset wed rx dma */
+@@ -1476,6 +1689,14 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+ 			  MTK_WED_CTRL_WED_RX_BM_BUSY);
+ 	mtk_wed_reset(dev, MTK_WED_RESET_RX_BM);
+ 
++	if (dev->wlan.hw_rro) {
++		wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_RX_PG_BM_EN);
++		mtk_wed_poll_busy(dev, MTK_WED_CTRL,
++				  MTK_WED_CTRL_WED_RX_PG_BM_BUSY);
++		wed_set(dev, MTK_WED_RESET, MTK_WED_RESET_RX_PG_BM);
++		wed_clr(dev, MTK_WED_RESET, MTK_WED_RESET_RX_PG_BM);
++	}
++
+ 	/* wo change to enable state */
+ 	val = MTK_WED_WO_STATE_ENABLE;
+ 	ret = mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO,
+@@ -1493,6 +1714,7 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+ 				   false);
+ 	}
+ 	mtk_wed_free_rx_buffer(dev);
++	mtk_wed_hwrro_free_buffer(dev);
+ 
+ 	return 0;
+ }
+@@ -1526,15 +1748,41 @@ mtk_wed_reset_dma(struct mtk_wed_device
+ 
+ 	/* 2. reset WDMA rx DMA */
+ 	busy = !!mtk_wdma_rx_reset(dev);
+-	wed_clr(dev, MTK_WED_WDMA_GLO_CFG, MTK_WED_WDMA_GLO_CFG_RX_DRV_EN);
++	if (mtk_wed_is_v3_or_greater(dev->hw)) {
++		val = MTK_WED_WDMA_GLO_CFG_RX_DIS_FSM_AUTO_IDLE |
++		      wed_r32(dev, MTK_WED_WDMA_GLO_CFG);
++		val &= ~MTK_WED_WDMA_GLO_CFG_RX_DRV_EN;
++		wed_w32(dev, MTK_WED_WDMA_GLO_CFG, val);
++	} else {
++		wed_clr(dev, MTK_WED_WDMA_GLO_CFG,
++			MTK_WED_WDMA_GLO_CFG_RX_DRV_EN);
++	}
++
+ 	if (!busy)
+ 		busy = mtk_wed_poll_busy(dev, MTK_WED_WDMA_GLO_CFG,
+ 					 MTK_WED_WDMA_GLO_CFG_RX_DRV_BUSY);
++	if (!busy && mtk_wed_is_v3_or_greater(dev->hw))
++		busy = mtk_wed_poll_busy(dev, MTK_WED_WDMA_RX_PREF_CFG,
++					 MTK_WED_WDMA_RX_PREF_BUSY);
+ 
+ 	if (busy) {
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WDMA_INT_AGENT);
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WDMA_RX_DRV);
+ 	} else {
++		if (mtk_wed_is_v3_or_greater(dev->hw)) {
++			/* 1.a. disable prefetch HW */
++			wed_clr(dev, MTK_WED_WDMA_RX_PREF_CFG,
++				MTK_WED_WDMA_RX_PREF_EN);
++			mtk_wed_poll_busy(dev, MTK_WED_WDMA_RX_PREF_CFG,
++					  MTK_WED_WDMA_RX_PREF_BUSY);
++			wed_clr(dev, MTK_WED_WDMA_RX_PREF_CFG,
++				MTK_WED_WDMA_RX_PREF_DDONE2_EN);
++
++			/* 2. Reset dma index */
++			wed_w32(dev, MTK_WED_WDMA_RESET_IDX,
++				MTK_WED_WDMA_RESET_IDX_RX_ALL);
++		}
++
+ 		wed_w32(dev, MTK_WED_WDMA_RESET_IDX,
+ 			MTK_WED_WDMA_RESET_IDX_RX | MTK_WED_WDMA_RESET_IDX_DRV);
+ 		wed_w32(dev, MTK_WED_WDMA_RESET_IDX, 0);
+@@ -1550,8 +1798,13 @@ mtk_wed_reset_dma(struct mtk_wed_device
+ 	wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
+ 
+ 	for (i = 0; i < 100; i++) {
+-		val = wed_r32(dev, MTK_WED_TX_BM_INTF);
+-		if (FIELD_GET(MTK_WED_TX_BM_INTF_TKFIFO_FDEP, val) == 0x40)
++		if (mtk_wed_is_v1(dev->hw))
++			val = FIELD_GET(MTK_WED_TX_BM_INTF_TKFIFO_FDEP,
++					wed_r32(dev, MTK_WED_TX_BM_INTF));
++		else
++			val = FIELD_GET(MTK_WED_TX_TKID_INTF_TKFIFO_FDEP,
++					wed_r32(dev, MTK_WED_TX_TKID_INTF));
++		if (val == 0x40)
+ 			break;
+ 	}
+ 
+@@ -1573,6 +1826,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_INT_AGENT);
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_TX_DRV);
+ 		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_RX_DRV);
++		if (mtk_wed_is_v3_or_greater(dev->hw))
++			wed_w32(dev, MTK_WED_RX1_CTRL2, 0);
+ 	} else {
+ 		wed_w32(dev, MTK_WED_WPDMA_RESET_IDX,
+ 			MTK_WED_WPDMA_RESET_IDX_TX |
+@@ -1589,7 +1844,14 @@ mtk_wed_reset_dma(struct mtk_wed_device
+ 		wed_w32(dev, MTK_WED_RESET_IDX, 0);
+ 	}
+ 
+-	mtk_wed_rx_reset(dev);
++	if (mtk_wed_is_v3_or_greater(dev->hw)) {
++		/* reset amsdu engine */
++		wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_TX_AMSDU_EN);
++		mtk_wed_reset(dev, MTK_WED_RESET_TX_AMSDU);
++	}
++
++	if (mtk_wed_get_rx_capa(dev))
++		mtk_wed_rx_reset(dev);
+ }
+ 
+ static int
+@@ -1841,6 +2103,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
+ 			MTK_WED_WPDMA_GLO_CFG_RX_DRV_UNS_VER_FORCE_4);
+ 
+ 		wdma_set(dev, MTK_WDMA_PREF_RX_CFG, MTK_WDMA_PREF_RX_CFG_PREF_EN);
++		wdma_set(dev, MTK_WDMA_WRBK_RX_CFG, MTK_WDMA_WRBK_RX_CFG_WRBK_EN);
+ 	}
+ 
+ 	wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
+@@ -1904,6 +2167,12 @@ mtk_wed_start_hw_rro(struct mtk_wed_devi
+ 	if (!mtk_wed_get_rx_capa(dev) || !dev->wlan.hw_rro)
+ 		return;
+ 
++	if (reset) {
++		wed_set(dev, MTK_WED_RRO_MSDU_PG_RING2_CFG,
++			MTK_WED_RRO_MSDU_PG_DRV_EN);
++		return;
++	}
++
+ 	wed_set(dev, MTK_WED_RRO_RX_D_CFG(2), MTK_WED_RRO_MSDU_PG_DRV_CLR);
+ 	wed_w32(dev, MTK_WED_RRO_MSDU_PG_RING2_CFG,
+ 		MTK_WED_RRO_MSDU_PG_DRV_CLR);
+--- a/drivers/net/ethernet/mediatek/mtk_wed_regs.h
++++ b/drivers/net/ethernet/mediatek/mtk_wed_regs.h
+@@ -28,6 +28,8 @@ struct mtk_wdma_desc {
+ #define MTK_WED_RESET					0x008
+ #define MTK_WED_RESET_TX_BM				BIT(0)
+ #define MTK_WED_RESET_RX_BM				BIT(1)
++#define MTK_WED_RESET_RX_PG_BM				BIT(2)
++#define MTK_WED_RESET_RRO_RX_TO_PG			BIT(3)
+ #define MTK_WED_RESET_TX_FREE_AGENT			BIT(4)
+ #define MTK_WED_RESET_WPDMA_TX_DRV			BIT(8)
+ #define MTK_WED_RESET_WPDMA_RX_DRV			BIT(9)
+@@ -106,6 +108,9 @@ struct mtk_wdma_desc {
+ #define MTK_WED_STATUS					0x060
+ #define MTK_WED_STATUS_TX				GENMASK(15, 8)
+ 
++#define MTK_WED_WPDMA_STATUS				0x068
++#define MTK_WED_WPDMA_STATUS_TX_DRV			GENMASK(15, 8)
++
+ #define MTK_WED_TX_BM_CTRL				0x080
+ #define MTK_WED_TX_BM_CTRL_VLD_GRP_NUM			GENMASK(6, 0)
+ #define MTK_WED_TX_BM_CTRL_RSV_GRP_NUM			GENMASK(22, 16)
+@@ -140,6 +145,9 @@ struct mtk_wdma_desc {
+ #define MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM		GENMASK(22, 16)
+ #define MTK_WED_TX_TKID_CTRL_PAUSE			BIT(28)
+ 
++#define MTK_WED_TX_TKID_INTF				0x0dc
++#define MTK_WED_TX_TKID_INTF_TKFIFO_FDEP		GENMASK(25, 16)
++
+ #define MTK_WED_TX_TKID_CTRL_VLD_GRP_NUM_V3		GENMASK(7, 0)
+ #define MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM_V3		GENMASK(23, 16)
+ 
+@@ -190,6 +198,7 @@ struct mtk_wdma_desc {
+ #define MTK_WED_RING_RX_DATA(_n)			(0x420 + (_n) * 0x10)
+ 
+ #define MTK_WED_SCR0					0x3c0
++#define MTK_WED_RX1_CTRL2				0x418
+ #define MTK_WED_WPDMA_INT_TRIGGER			0x504
+ #define MTK_WED_WPDMA_INT_TRIGGER_RX_DONE		BIT(1)
+ #define MTK_WED_WPDMA_INT_TRIGGER_TX_DONE		GENMASK(5, 4)
+@@ -303,6 +312,7 @@ struct mtk_wdma_desc {
+ 
+ #define MTK_WED_WPDMA_RX_D_RST_IDX			0x760
+ #define MTK_WED_WPDMA_RX_D_RST_CRX_IDX			GENMASK(17, 16)
++#define MTK_WED_WPDMA_RX_D_RST_DRV_IDX_ALL		BIT(20)
+ #define MTK_WED_WPDMA_RX_D_RST_DRV_IDX			GENMASK(25, 24)
+ 
+ #define MTK_WED_WPDMA_RX_GLO_CFG			0x76c
+@@ -313,6 +323,7 @@ struct mtk_wdma_desc {
+ 
+ #define MTK_WED_WPDMA_RX_D_PREF_CFG			0x7b4
+ #define MTK_WED_WPDMA_RX_D_PREF_EN			BIT(0)
++#define MTK_WED_WPDMA_RX_D_PREF_BUSY			BIT(1)
+ #define MTK_WED_WPDMA_RX_D_PREF_BURST_SIZE		GENMASK(12, 8)
+ #define MTK_WED_WPDMA_RX_D_PREF_LOW_THRES		GENMASK(21, 16)
+ 
+@@ -334,11 +345,13 @@ struct mtk_wdma_desc {
+ 
+ #define MTK_WED_WDMA_RX_PREF_CFG			0x950
+ #define MTK_WED_WDMA_RX_PREF_EN				BIT(0)
++#define MTK_WED_WDMA_RX_PREF_BUSY			BIT(1)
+ #define MTK_WED_WDMA_RX_PREF_BURST_SIZE			GENMASK(12, 8)
+ #define MTK_WED_WDMA_RX_PREF_LOW_THRES			GENMASK(21, 16)
+ #define MTK_WED_WDMA_RX_PREF_RX0_SIDX_CLR		BIT(24)
+ #define MTK_WED_WDMA_RX_PREF_RX1_SIDX_CLR		BIT(25)
+ #define MTK_WED_WDMA_RX_PREF_DDONE2_EN			BIT(26)
++#define MTK_WED_WDMA_RX_PREF_DDONE2_BUSY		BIT(27)
+ 
+ #define MTK_WED_WDMA_RX_PREF_FIFO_CFG			0x95C
+ #define MTK_WED_WDMA_RX_PREF_FIFO_RX0_CLR		BIT(0)
+@@ -367,6 +380,7 @@ struct mtk_wdma_desc {
+ 
+ #define MTK_WED_WDMA_RESET_IDX				0xa08
+ #define MTK_WED_WDMA_RESET_IDX_RX			GENMASK(17, 16)
++#define MTK_WED_WDMA_RESET_IDX_RX_ALL			BIT(20)
+ #define MTK_WED_WDMA_RESET_IDX_DRV			GENMASK(25, 24)
+ 
+ #define MTK_WED_WDMA_INT_CLR				0xa24
+@@ -437,21 +451,62 @@ struct mtk_wdma_desc {
+ #define MTK_WDMA_INT_MASK_RX_DELAY			BIT(30)
+ #define MTK_WDMA_INT_MASK_RX_COHERENT			BIT(31)
+ 
++#define MTK_WDMA_XDMA_TX_FIFO_CFG			0x238
++#define MTK_WDMA_XDMA_TX_FIFO_CFG_TX_PAR_FIFO_CLEAR	BIT(0)
++#define MTK_WDMA_XDMA_TX_FIFO_CFG_TX_CMD_FIFO_CLEAR	BIT(4)
++#define MTK_WDMA_XDMA_TX_FIFO_CFG_TX_DMAD_FIFO_CLEAR	BIT(8)
++#define MTK_WDMA_XDMA_TX_FIFO_CFG_TX_ARR_FIFO_CLEAR	BIT(12)
++
++#define MTK_WDMA_XDMA_RX_FIFO_CFG			0x23c
++#define MTK_WDMA_XDMA_RX_FIFO_CFG_RX_PAR_FIFO_CLEAR	BIT(0)
++#define MTK_WDMA_XDMA_RX_FIFO_CFG_RX_CMD_FIFO_CLEAR	BIT(4)
++#define MTK_WDMA_XDMA_RX_FIFO_CFG_RX_DMAD_FIFO_CLEAR	BIT(8)
++#define MTK_WDMA_XDMA_RX_FIFO_CFG_RX_ARR_FIFO_CLEAR	BIT(12)
++#define MTK_WDMA_XDMA_RX_FIFO_CFG_RX_LEN_FIFO_CLEAR	BIT(15)
++#define MTK_WDMA_XDMA_RX_FIFO_CFG_RX_WID_FIFO_CLEAR	BIT(18)
++#define MTK_WDMA_XDMA_RX_FIFO_CFG_RX_BID_FIFO_CLEAR	BIT(21)
++
+ #define MTK_WDMA_INT_GRP1				0x250
+ #define MTK_WDMA_INT_GRP2				0x254
+ 
+ #define MTK_WDMA_PREF_TX_CFG				0x2d0
+ #define MTK_WDMA_PREF_TX_CFG_PREF_EN			BIT(0)
++#define MTK_WDMA_PREF_TX_CFG_PREF_BUSY			BIT(1)
+ 
+ #define MTK_WDMA_PREF_RX_CFG				0x2dc
+ #define MTK_WDMA_PREF_RX_CFG_PREF_EN			BIT(0)
++#define MTK_WDMA_PREF_RX_CFG_PREF_BUSY			BIT(1)
++
++#define MTK_WDMA_PREF_RX_FIFO_CFG			0x2e0
++#define MTK_WDMA_PREF_RX_FIFO_CFG_RING0_CLEAR		BIT(0)
++#define MTK_WDMA_PREF_RX_FIFO_CFG_RING1_CLEAR		BIT(16)
++
++#define MTK_WDMA_PREF_TX_FIFO_CFG			0x2d4
++#define MTK_WDMA_PREF_TX_FIFO_CFG_RING0_CLEAR		BIT(0)
++#define MTK_WDMA_PREF_TX_FIFO_CFG_RING1_CLEAR		BIT(16)
++
++#define MTK_WDMA_PREF_SIDX_CFG				0x2e4
++#define MTK_WDMA_PREF_SIDX_CFG_TX_RING_CLEAR		GENMASK(3, 0)
++#define MTK_WDMA_PREF_SIDX_CFG_RX_RING_CLEAR		GENMASK(5, 4)
+ 
+ #define MTK_WDMA_WRBK_TX_CFG				0x300
++#define MTK_WDMA_WRBK_TX_CFG_WRBK_BUSY			BIT(0)
+ #define MTK_WDMA_WRBK_TX_CFG_WRBK_EN			BIT(30)
+ 
++#define MTK_WDMA_WRBK_TX_FIFO_CFG(_n)			(0x304 + (_n) * 0x4)
++#define MTK_WDMA_WRBK_TX_FIFO_CFG_RING_CLEAR		BIT(0)
++
+ #define MTK_WDMA_WRBK_RX_CFG				0x344
++#define MTK_WDMA_WRBK_RX_CFG_WRBK_BUSY			BIT(0)
+ #define MTK_WDMA_WRBK_RX_CFG_WRBK_EN			BIT(30)
+ 
++#define MTK_WDMA_WRBK_RX_FIFO_CFG(_n)			(0x348 + (_n) * 0x4)
++#define MTK_WDMA_WRBK_RX_FIFO_CFG_RING_CLEAR		BIT(0)
++
++#define MTK_WDMA_WRBK_SIDX_CFG				0x388
++#define MTK_WDMA_WRBK_SIDX_CFG_TX_RING_CLEAR		GENMASK(3, 0)
++#define MTK_WDMA_WRBK_SIDX_CFG_RX_RING_CLEAR		GENMASK(5, 4)
++
+ #define MTK_PCIE_MIRROR_MAP(n)				((n) ? 0x4 : 0x0)
+ #define MTK_PCIE_MIRROR_MAP_EN				BIT(0)
+ #define MTK_PCIE_MIRROR_MAP_WED_ID			BIT(1)
+@@ -465,6 +520,8 @@ struct mtk_wdma_desc {
+ #define MTK_WED_RTQM_Q_DBG_BYPASS			BIT(5)
+ #define MTK_WED_RTQM_TXDMAD_FPORT			GENMASK(23, 20)
+ 
++#define MTK_WED_RTQM_RST				0xb04
++
+ #define MTK_WED_RTQM_IGRS0_I2HW_DMAD_CNT		0xb1c
+ #define MTK_WED_RTQM_IGRS0_I2H_DMAD_CNT(_n)		(0xb20 + (_n) * 0x4)
+ #define	MTK_WED_RTQM_IGRS0_I2HW_PKT_CNT			0xb28
+@@ -653,6 +710,9 @@ struct mtk_wdma_desc {
+ #define MTK_WED_WPDMA_INT_CTRL_RRO_PG2_CLR		BIT(17)
+ #define MTK_WED_WPDMA_INT_CTRL_RRO_PG2_DONE_TRIG	GENMASK(22, 18)
+ 
++#define MTK_WED_RRO_RX_HW_STS				0xf00
++#define MTK_WED_RX_IND_CMD_BUSY				GENMASK(31, 0)
++
+ #define MTK_WED_RX_IND_CMD_CNT0				0xf20
+ #define MTK_WED_RX_IND_CMD_DBG_CNT_EN			BIT(31)
+ 
diff --git a/target/linux/generic/backport-5.15/751-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch b/target/linux/generic/backport-5.15/764-01-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/751-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch
rename to target/linux/generic/backport-5.15/764-01-v5.16-net-dsa-qca8k-fix-internal-delay-applied-to-the-wrong-PAD.patch
diff --git a/target/linux/generic/backport-5.15/752-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch b/target/linux/generic/backport-5.15/764-02-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/752-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch
rename to target/linux/generic/backport-5.15/764-02-v5.16-net-dsa-qca8k-fix-MTU-calculation.patch
diff --git a/target/linux/generic/backport-5.15/753-v5.17-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch b/target/linux/generic/backport-5.15/764-03-v5.17-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/753-v5.17-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch
rename to target/linux/generic/backport-5.15/764-03-v5.17-net-next-net-dsa-qca8k-remove-redundant-check-in-parse_port_config.patch
diff --git a/target/linux/generic/backport-5.15/754-v5.17-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch b/target/linux/generic/backport-5.15/764-04-v5.17-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/754-v5.17-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch
rename to target/linux/generic/backport-5.15/764-04-v5.17-net-next-net-dsa-qca8k-convert-to-GENMASK_FIELD_PREP_FIELD_GET.patch
diff --git a/target/linux/generic/backport-5.15/755-v5.17-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch b/target/linux/generic/backport-5.15/764-05-v5.17-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/755-v5.17-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch
rename to target/linux/generic/backport-5.15/764-05-v5.17-net-next-net-dsa-qca8k-remove-extra-mutex_init-in-qca8k_setup.patch
diff --git a/target/linux/generic/backport-5.15/756-v5.17-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch b/target/linux/generic/backport-5.15/764-06-v5.17-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/756-v5.17-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch
rename to target/linux/generic/backport-5.15/764-06-v5.17-net-next-net-dsa-qca8k-move-regmap-init-in-probe-and-set-it.patch
diff --git a/target/linux/generic/backport-5.15/757-v5.17-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch b/target/linux/generic/backport-5.15/764-07-v5.17-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/757-v5.17-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch
rename to target/linux/generic/backport-5.15/764-07-v5.17-net-next-net-dsa-qca8k-initial-conversion-to-regmap-heper.patch
diff --git a/target/linux/generic/backport-5.15/758-v5.17-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch b/target/linux/generic/backport-5.15/764-08-v5.17-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/758-v5.17-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch
rename to target/linux/generic/backport-5.15/764-08-v5.17-net-next-net-dsa-qca8k-add-additional-MIB-counter-and-.patch
diff --git a/target/linux/generic/backport-5.15/759-v5.17-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch b/target/linux/generic/backport-5.15/764-09-v5.17-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/759-v5.17-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch
rename to target/linux/generic/backport-5.15/764-09-v5.17-net-next-net-dsa-qca8k-add-support-for-port-fast-aging.patch
diff --git a/target/linux/generic/backport-5.15/760-v5.17-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch b/target/linux/generic/backport-5.15/764-10-v5.17-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/760-v5.17-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch
rename to target/linux/generic/backport-5.15/764-10-v5.17-net-next-net-dsa-qca8k-add-set_ageing_time-support.patch
diff --git a/target/linux/generic/backport-5.15/761-v5.17-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch b/target/linux/generic/backport-5.15/764-11-v5.17-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/761-v5.17-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch
rename to target/linux/generic/backport-5.15/764-11-v5.17-net-next-net-dsa-qca8k-add-support-for-mdb_add-del.patch
diff --git a/target/linux/generic/backport-5.15/762-v5.17-net-next-net-dsa-qca8k-add-support-for-mirror-mode.patch b/target/linux/generic/backport-5.15/764-12-v5.17-net-next-net-dsa-qca8k-add-support-for-mirror-mode.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/762-v5.17-net-next-net-dsa-qca8k-add-support-for-mirror-mode.patch
rename to target/linux/generic/backport-5.15/764-12-v5.17-net-next-net-dsa-qca8k-add-support-for-mirror-mode.patch
diff --git a/target/linux/generic/backport-5.15/763-v5.17-net-next-net-dsa-qca8k-add-LAG-support.patch b/target/linux/generic/backport-5.15/764-13-v5.17-net-next-net-dsa-qca8k-add-LAG-support.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/763-v5.17-net-next-net-dsa-qca8k-add-LAG-support.patch
rename to target/linux/generic/backport-5.15/764-13-v5.17-net-next-net-dsa-qca8k-add-LAG-support.patch
diff --git a/target/linux/generic/backport-5.15/764-v5.17-net-next-net-dsa-qca8k-fix-warning-in-LAG-feature.patch b/target/linux/generic/backport-5.15/764-14-v5.17-net-next-net-dsa-qca8k-fix-warning-in-LAG-feature.patch
similarity index 100%
rename from target/linux/generic/backport-5.15/764-v5.17-net-next-net-dsa-qca8k-fix-warning-in-LAG-feature.patch
rename to target/linux/generic/backport-5.15/764-14-v5.17-net-next-net-dsa-qca8k-fix-warning-in-LAG-feature.patch
diff --git a/target/linux/generic/backport-5.15/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch b/target/linux/generic/backport-5.15/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch
index 582e1ce2ef..b0860db266 100644
--- a/target/linux/generic/backport-5.15/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch
+++ b/target/linux/generic/backport-5.15/794-v6.2-net-core-Allow-live-renaming-when-an-interface-is-up.patch
@@ -46,7 +46,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -1642,7 +1642,6 @@ struct net_device_ops {
+@@ -1643,7 +1643,6 @@ struct net_device_ops {
   * @IFF_FAILOVER: device is a failover master device
   * @IFF_FAILOVER_SLAVE: device is lower dev of a failover master device
   * @IFF_L3MDEV_RX_HANDLER: only invoke the rx handler of L3 master device
@@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * @IFF_TX_SKB_NO_LINEAR: device/driver is capable of xmitting frames with
   *	skb_headlen(skb) == 0 (data starts from frag0)
   */
-@@ -1677,7 +1676,7 @@ enum netdev_priv_flags {
+@@ -1678,7 +1677,7 @@ enum netdev_priv_flags {
  	IFF_FAILOVER			= 1<<27,
  	IFF_FAILOVER_SLAVE		= 1<<28,
  	IFF_L3MDEV_RX_HANDLER		= 1<<29,
@@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	IFF_TX_SKB_NO_LINEAR		= BIT_ULL(31),
  };
  
-@@ -1711,7 +1710,6 @@ enum netdev_priv_flags {
+@@ -1712,7 +1711,6 @@ enum netdev_priv_flags {
  #define IFF_FAILOVER			IFF_FAILOVER
  #define IFF_FAILOVER_SLAVE		IFF_FAILOVER_SLAVE
  #define IFF_L3MDEV_RX_HANDLER		IFF_L3MDEV_RX_HANDLER
diff --git a/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch
index b5a20de21b..b03b4a674f 100644
--- a/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-5.15/721-net-add-packet-mangeling.patch
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -1681,6 +1681,10 @@ enum netdev_priv_flags {
+@@ -1682,6 +1682,10 @@ enum netdev_priv_flags {
  	IFF_TX_SKB_NO_LINEAR		= BIT_ULL(31),
  };
  
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #define IFF_802_1Q_VLAN			IFF_802_1Q_VLAN
  #define IFF_EBRIDGE			IFF_EBRIDGE
  #define IFF_BONDING			IFF_BONDING
-@@ -1712,6 +1716,7 @@ enum netdev_priv_flags {
+@@ -1713,6 +1717,7 @@ enum netdev_priv_flags {
  #define IFF_FAILOVER_SLAVE		IFF_FAILOVER_SLAVE
  #define IFF_L3MDEV_RX_HANDLER		IFF_L3MDEV_RX_HANDLER
  #define IFF_TX_SKB_NO_LINEAR		IFF_TX_SKB_NO_LINEAR
@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  /* Specifies the type of the struct net_device::ml_priv pointer */
  enum netdev_ml_priv_type {
-@@ -2012,6 +2017,7 @@ struct net_device {
+@@ -2013,6 +2018,7 @@ struct net_device {
  	/* Read-mostly cache-line for fast-path access */
  	unsigned int		flags;
  	unsigned int		priv_flags;
@@ -46,7 +46,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	const struct net_device_ops *netdev_ops;
  	int			ifindex;
  	unsigned short		gflags;
-@@ -2072,6 +2078,11 @@ struct net_device {
+@@ -2073,6 +2079,11 @@ struct net_device {
  	const struct tlsdev_ops *tlsdev_ops;
  #endif
  
@@ -58,7 +58,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	const struct header_ops *header_ops;
  
  	unsigned char		operstate;
-@@ -2143,6 +2154,10 @@ struct net_device {
+@@ -2144,6 +2155,10 @@ struct net_device {
  	struct mctp_dev __rcu	*mctp_ptr;
  #endif
  
diff --git a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index e4946e6e5b..66fd6efed5 100644
--- a/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-5.15/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -11,7 +11,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -2098,6 +2098,8 @@ struct net_device {
+@@ -2099,6 +2099,8 @@ struct net_device {
  	struct netdev_hw_addr_list	mc;
  	struct netdev_hw_addr_list	dev_addrs;
  
diff --git a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
index 9b5d9798a6..0580cf1a84 100644
--- a/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
+++ b/target/linux/generic/pending-5.15/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3097,8 +3097,8 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -3098,8 +3098,8 @@ static irqreturn_t mtk_handle_irq_rx(int
  
  	eth->rx_events++;
  	if (likely(napi_schedule_prep(&eth->rx_napi))) {
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	}
  
  	return IRQ_HANDLED;
-@@ -3110,8 +3110,8 @@ static irqreturn_t mtk_handle_irq_tx(int
+@@ -3111,8 +3111,8 @@ static irqreturn_t mtk_handle_irq_tx(int
  
  	eth->tx_events++;
  	if (likely(napi_schedule_prep(&eth->tx_napi))) {
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	}
  
  	return IRQ_HANDLED;
-@@ -4885,6 +4885,8 @@ static int mtk_probe(struct platform_dev
+@@ -4886,6 +4886,8 @@ static int mtk_probe(struct platform_dev
  	 * for NAPI to work
  	 */
  	init_dummy_netdev(&eth->dummy_dev);
diff --git a/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
index 9df011fbec..56edb63234 100644
--- a/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
+++ b/target/linux/generic/pending-5.15/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1515,12 +1515,28 @@ static void mtk_wake_queue(struct mtk_et
+@@ -1516,12 +1516,28 @@ static void mtk_wake_queue(struct mtk_et
  	}
  }
  
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	bool gso = false;
  	int tx_num;
  
-@@ -1542,6 +1558,18 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1543,6 +1559,18 @@ static netdev_tx_t mtk_start_xmit(struct
  		return NETDEV_TX_BUSY;
  	}
  
@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	/* TSO: fill MSS info in tcp checksum field */
  	if (skb_is_gso(skb)) {
  		if (skb_cow_head(skb, 0)) {
-@@ -1557,8 +1585,14 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1558,8 +1586,14 @@ static netdev_tx_t mtk_start_xmit(struct
  		}
  	}
  
diff --git a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch b/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
index 243e2f9d0e..2de28b11dd 100644
--- a/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
+++ b/target/linux/generic/pending-5.15/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -722,6 +722,7 @@ static void mtk_mac_link_up(struct phyli
+@@ -723,6 +723,7 @@ static void mtk_mac_link_up(struct phyli
  		 MAC_MCR_FORCE_RX_FC);
  
  	/* Configure speed */
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	switch (speed) {
  	case SPEED_2500:
  	case SPEED_1000:
-@@ -3290,6 +3291,9 @@ found:
+@@ -3291,6 +3292,9 @@ found:
  	if (dp->index >= MTK_QDMA_NUM_QUEUES)
  		return NOTIFY_DONE;
  
diff --git a/target/linux/generic/pending-5.15/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch b/target/linux/generic/pending-5.15/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch
index 104ce00b7e..ed0a544228 100644
--- a/target/linux/generic/pending-5.15/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch
+++ b/target/linux/generic/pending-5.15/734-net-ethernet-mtk_eth_soc-ppe-fix-L2-offloading-with-.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #include <net/dsa.h>
  #include "mtk_eth_soc.h"
  #include "mtk_ppe.h"
-@@ -781,7 +782,9 @@ void __mtk_ppe_check_skb(struct mtk_ppe
+@@ -835,7 +836,9 @@ void __mtk_ppe_check_skb(struct mtk_ppe
  		    skb->dev->dsa_ptr->tag_ops->proto != DSA_TAG_PROTO_MTK)
  			goto out;
  
diff --git a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
index bf17462921..fba50f0e06 100644
--- a/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
+++ b/target/linux/generic/pending-5.15/737-net-ethernet-mtk_eth_soc-add-paths-and-SerDes-modes-.patch
@@ -249,7 +249,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 -
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -431,6 +431,30 @@ static void mtk_setup_bridge_switch(stru
+@@ -432,6 +432,30 @@ static void mtk_setup_bridge_switch(stru
  		MTK_GSW_CFG);
  }
  
@@ -280,7 +280,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static struct phylink_pcs *mtk_mac_select_pcs(struct phylink_config *config,
  					      phy_interface_t interface)
  {
-@@ -439,12 +463,20 @@ static struct phylink_pcs *mtk_mac_selec
+@@ -440,12 +464,20 @@ static struct phylink_pcs *mtk_mac_selec
  	struct mtk_eth *eth = mac->hw;
  	unsigned int sid;
  
@@ -307,7 +307,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	}
  
  	return NULL;
-@@ -500,7 +532,22 @@ static void mtk_mac_config(struct phylin
+@@ -501,7 +533,22 @@ static void mtk_mac_config(struct phylin
  					goto init_err;
  			}
  			break;
@@ -330,7 +330,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  			break;
  		default:
  			goto err_phy;
-@@ -555,8 +602,6 @@ static void mtk_mac_config(struct phylin
+@@ -556,8 +603,6 @@ static void mtk_mac_config(struct phylin
  		val &= ~SYSCFG0_GE_MODE(SYSCFG0_GE_MASK, mac->id);
  		val |= SYSCFG0_GE_MODE(ge_mode, mac->id);
  		regmap_write(eth->ethsys, ETHSYS_SYSCFG0, val);
@@ -339,7 +339,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	}
  
  	/* SGMII */
-@@ -573,21 +618,40 @@ static void mtk_mac_config(struct phylin
+@@ -574,21 +619,40 @@ static void mtk_mac_config(struct phylin
  
  		/* Save the syscfg0 value for mac_finish */
  		mac->syscfg0 = val;
@@ -387,7 +387,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	return;
  
  err_phy:
-@@ -632,10 +696,14 @@ static void mtk_mac_link_down(struct phy
+@@ -633,10 +697,14 @@ static void mtk_mac_link_down(struct phy
  {
  	struct mtk_mac *mac = container_of(config, struct mtk_mac,
  					   phylink_config);
@@ -405,7 +405,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  }
  
  static void mtk_set_queue_speed(struct mtk_eth *eth, unsigned int idx,
-@@ -707,13 +775,11 @@ static void mtk_set_queue_speed(struct m
+@@ -708,13 +776,11 @@ static void mtk_set_queue_speed(struct m
  	mtk_w32(eth, val, soc->reg_map->qdma.qtx_sch + ofs);
  }
  
@@ -423,7 +423,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	u32 mcr;
  
  	mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
-@@ -747,6 +813,55 @@ static void mtk_mac_link_up(struct phyli
+@@ -748,6 +814,55 @@ static void mtk_mac_link_up(struct phyli
  	mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
  }
  
@@ -479,7 +479,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  static const struct phylink_mac_ops mtk_phylink_ops = {
  	.validate = phylink_generic_validate,
  	.mac_select_pcs = mtk_mac_select_pcs,
-@@ -4560,8 +4675,21 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4561,8 +4676,21 @@ static int mtk_add_mac(struct mtk_eth *e
  		phy_interface_zero(mac->phylink_config.supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  mac->phylink_config.supported_interfaces);
@@ -501,7 +501,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	phylink = phylink_create(&mac->phylink_config,
  				 of_fwnode_handle(mac->of_node),
  				 phy_mode, &mtk_phylink_ops);
-@@ -4754,6 +4882,13 @@ static int mtk_probe(struct platform_dev
+@@ -4755,6 +4883,13 @@ static int mtk_probe(struct platform_dev
  
  		if (err)
  			return err;
diff --git a/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch b/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch
index 29dca26018..cb67dd5973 100644
--- a/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch
+++ b/target/linux/generic/pending-5.15/738-net-ethernet-mtk_eth_soc-set-coherent-mask-to-get-PP.patch
@@ -32,7 +32,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4830,7 +4830,10 @@ static int mtk_probe(struct platform_dev
+@@ -4831,7 +4831,10 @@ static int mtk_probe(struct platform_dev
  	}
  
  	if (MTK_HAS_CAPS(eth->soc->caps, MTK_36BIT_DMA)) {
diff --git a/target/linux/generic/pending-5.15/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-5.15/760-net-core-add-optional-threading-for-backlog-processi.patch
index a8634afba8..a10a867d60 100644
--- a/target/linux/generic/pending-5.15/760-net-core-add-optional-threading-for-backlog-processi.patch
+++ b/target/linux/generic/pending-5.15/760-net-core-add-optional-threading-for-backlog-processi.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  /**
   *	napi_disable - prevent NAPI from scheduling
-@@ -3363,6 +3364,7 @@ struct softnet_data {
+@@ -3364,6 +3365,7 @@ struct softnet_data {
  	unsigned int		processed;
  	unsigned int		time_squeeze;
  	unsigned int		received_rps;
diff --git a/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch b/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch
index 4c144a7b1c..3f73277aa6 100644
--- a/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch
+++ b/target/linux/mediatek/patches-5.15/703-v5.17-net-ethernet-mtk_eth_soc-implement-Clause-45-MDIO-ac.patch
@@ -20,7 +20,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -323,13 +323,35 @@ static int _mtk_mdio_write(struct mtk_et
+@@ -324,13 +324,35 @@ static int _mtk_mdio_write(struct mtk_et
  	if (ret < 0)
  		return ret;
  
@@ -63,7 +63,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = mtk_mdio_busy_wait(eth);
  	if (ret < 0)
-@@ -346,12 +368,33 @@ static int _mtk_mdio_read(struct mtk_eth
+@@ -347,12 +369,33 @@ static int _mtk_mdio_read(struct mtk_eth
  	if (ret < 0)
  		return ret;
  
@@ -103,7 +103,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = mtk_mdio_busy_wait(eth);
  	if (ret < 0)
-@@ -898,6 +941,7 @@ static int mtk_mdio_init(struct mtk_eth
+@@ -899,6 +942,7 @@ static int mtk_mdio_init(struct mtk_eth
  	eth->mii_bus->name = "mdio";
  	eth->mii_bus->read = mtk_mdio_read;
  	eth->mii_bus->write = mtk_mdio_write;
diff --git a/target/linux/mediatek/patches-5.15/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch b/target/linux/mediatek/patches-5.15/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch
index 2fe565f3b2..30be53518a 100644
--- a/target/linux/mediatek/patches-5.15/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch
+++ b/target/linux/mediatek/patches-5.15/940-net-ethernet-mtk_wed-rename-mtk_wed_get_memory_regio.patch
@@ -15,30 +15,23 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
-@@ -215,8 +215,8 @@ int mtk_wed_mcu_msg_update(struct mtk_we
+@@ -234,8 +234,8 @@ int mtk_wed_mcu_msg_update(struct mtk_we
  }
  
  static int
--mtk_wed_get_memory_region(struct mtk_wed_wo *wo,
+-mtk_wed_get_memory_region(struct mtk_wed_hw *hw, int index,
 -			  struct mtk_wed_wo_memory_region *region)
-+mtk_wed_get_reserved_memory_region(struct mtk_wed_wo *wo,
++mtk_wed_get_reserved_memory_region(struct mtk_wed_hw *hw, int index,
 +				   struct mtk_wed_wo_memory_region *region)
  {
  	struct reserved_mem *rmem;
  	struct device_node *np;
-@@ -311,13 +311,13 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+@@ -321,7 +321,7 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 		if (index < 0)
+ 			continue;
  
- 	/* load firmware region metadata */
- 	for (i = 0; i < ARRAY_SIZE(mem_region); i++) {
--		ret = mtk_wed_get_memory_region(wo, &mem_region[i]);
-+		ret = mtk_wed_get_reserved_memory_region(wo, &mem_region[i]);
+-		ret = mtk_wed_get_memory_region(wo->hw, index, &mem_region[i]);
++		ret = mtk_wed_get_reserved_memory_region(wo->hw, index, &mem_region[i]);
  		if (ret)
  			return ret;
  	}
- 
- 	wo->boot.name = "wo-boot";
--	ret = mtk_wed_get_memory_region(wo, &wo->boot);
-+	ret = mtk_wed_get_reserved_memory_region(wo, &wo->boot);
- 	if (ret)
- 		return ret;
- 
diff --git a/target/linux/mediatek/patches-5.15/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch b/target/linux/mediatek/patches-5.15/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch
index 9de4ffa433..b4bea2087b 100644
--- a/target/linux/mediatek/patches-5.15/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch
+++ b/target/linux/mediatek/patches-5.15/942-net-ethernet-mtk_wed-move-cpuboot-in-a-dedicated-dts.patch
@@ -23,15 +23,15 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
-@@ -18,12 +18,23 @@
+@@ -34,12 +34,23 @@ static struct mtk_wed_wo_memory_region m
  
  static u32 wo_r32(struct mtk_wed_wo *wo, u32 reg)
  {
--	return readl(wo->boot.addr + reg);
+-	return readl(mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
 +	u32 val;
 +
 +	if (!wo->boot_regmap)
-+		return readl(wo->boot.addr + reg);
++		return readl(mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
 +
 +	if (regmap_read(wo->boot_regmap, reg, &val))
 +		val = ~0;
@@ -41,49 +41,41 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  
  static void wo_w32(struct mtk_wed_wo *wo, u32 reg, u32 val)
  {
--	writel(val, wo->boot.addr + reg);
+-	writel(val, mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
 +	if (wo->boot_regmap)
 +		regmap_write(wo->boot_regmap, reg, val);
 +	else
-+		writel(val, wo->boot.addr + reg);
++		writel(val, mem_region[MTK_WED_WO_REGION_BOOT].addr + reg);
  }
  
  static struct sk_buff *
-@@ -316,10 +327,21 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
- 			return ret;
- 	}
+@@ -313,6 +324,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 	u32 val, boot_cr;
+ 	int ret, i;
  
--	wo->boot.name = "wo-boot";
--	ret = mtk_wed_get_reserved_memory_region(wo, &wo->boot);
--	if (ret)
--		return ret;
 +	wo->boot_regmap = syscon_regmap_lookup_by_phandle(wo->hw->node,
 +							  "mediatek,wo-cpuboot");
-+	if (IS_ERR(wo->boot_regmap)) {
-+		if (wo->boot_regmap != ERR_PTR(-ENODEV))
-+			return PTR_ERR(wo->boot_regmap);
 +
-+		/* For backward compatibility, we need to check if cpu_boot
-+		 * is defined through reserved memory property.
-+		 */
-+		wo->boot_regmap = NULL;
-+		wo->boot.name = "wo-boot";
-+		ret = mtk_wed_get_reserved_memory_region(wo, &wo->boot);
-+		if (ret)
-+			return ret;
-+	}
+ 	/* load firmware region metadata */
+ 	for (i = 0; i < ARRAY_SIZE(mem_region); i++) {
+ 		int index = of_property_match_string(wo->hw->node,
+@@ -321,6 +335,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 		if (index < 0)
+ 			continue;
  
- 	/* set dummy cr */
- 	wed_w32(wo->hw->wed_dev, MTK_WED_SCR0 + 4 * MTK_WED_DUMMY_CR_FWDL,
++		if (index == MTK_WED_WO_REGION_BOOT && !IS_ERR(wo->boot_regmap))
++			continue;
++
+ 		ret = mtk_wed_get_reserved_memory_region(wo->hw, index, &mem_region[i]);
+ 		if (ret)
+ 			return ret;
 --- a/drivers/net/ethernet/mediatek/mtk_wed_wo.h
 +++ b/drivers/net/ethernet/mediatek/mtk_wed_wo.h
-@@ -228,7 +228,8 @@ struct mtk_wed_wo_queue {
- 
+@@ -231,6 +231,7 @@ struct mtk_wed_wo_queue {
  struct mtk_wed_wo {
  	struct mtk_wed_hw *hw;
--	struct mtk_wed_wo_memory_region boot;
-+	struct mtk_wed_wo_memory_region boot; /* backward compatibility */
-+	struct regmap *boot_regmap;
  
++	struct regmap *boot_regmap;
  	struct mtk_wed_wo_queue q_tx;
  	struct mtk_wed_wo_queue q_rx;
+ 
diff --git a/target/linux/mediatek/patches-5.15/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch b/target/linux/mediatek/patches-5.15/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch
index 7b6c5d1e27..b4ba5b0d2d 100644
--- a/target/linux/mediatek/patches-5.15/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch
+++ b/target/linux/mediatek/patches-5.15/943-net-ethernet-mtk_wed-move-ilm-a-dedicated-dts-node.patch
@@ -20,72 +20,67 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed_mcu.c
-@@ -300,6 +300,52 @@ next:
+@@ -316,6 +316,39 @@ next:
  }
  
  static int
-+mtk_wed_mcu_load_memory_regions(struct mtk_wed_wo *wo,
-+				struct mtk_wed_wo_memory_region *region)
++mtk_wed_mcu_load_ilm(struct mtk_wed_wo *wo)
 +{
++	struct mtk_wed_wo_memory_region *ilm_region;
++	struct resource res;
 +	struct device_node *np;
 +	int ret;
 +
-+	/* firmware EMI memory region */
-+	ret = mtk_wed_get_reserved_memory_region(wo,
-+			&region[MTK_WED_WO_REGION_EMI]);
-+	if (ret)
-+		return ret;
-+
-+	/* firmware DATA memory region */
-+	ret = mtk_wed_get_reserved_memory_region(wo,
-+			&region[MTK_WED_WO_REGION_DATA]);
-+	if (ret)
-+		return ret;
-+
 +	np = of_parse_phandle(wo->hw->node, "mediatek,wo-ilm", 0);
-+	if (np) {
-+		struct mtk_wed_wo_memory_region *ilm_region;
-+		struct resource res;
++	if (!np)
++		return 0;
++
++	ret = of_address_to_resource(np, 0, &res);
++	of_node_put(np);
 +
-+		ret = of_address_to_resource(np, 0, &res);
-+		of_node_put(np);
++	if (ret < 0)
++		return ret;
 +
-+		if (ret < 0)
-+			return ret;
++	ilm_region = &mem_region[MTK_WED_WO_REGION_ILM];
++	ilm_region->phy_addr = res.start;
++	ilm_region->size = resource_size(&res);
++	ilm_region->addr = devm_ioremap(wo->hw->dev, res.start,
++					resource_size(&res));
 +
-+		ilm_region = &region[MTK_WED_WO_REGION_ILM];
-+		ilm_region->phy_addr = res.start;
-+		ilm_region->size = resource_size(&res);
-+		ilm_region->addr = devm_ioremap(wo->hw->dev, res.start,
-+						resource_size(&res));
++	if (!IS_ERR(ilm_region->addr))
++		return 0;
 +
-+		return IS_ERR(ilm_region->addr) ? PTR_ERR(ilm_region->addr) : 0;
-+	}
++	ret = PTR_ERR(ilm_region->addr);
++	ilm_region->addr = NULL;
 +
-+	/* For backward compatibility, we need to check if ILM
-+	 * node is defined through reserved memory property.
-+	 */
-+	return mtk_wed_get_reserved_memory_region(wo,
-+			&region[MTK_WED_WO_REGION_ILM]);
++	return ret;
 +}
 +
 +static int
  mtk_wed_mcu_load_firmware(struct mtk_wed_wo *wo)
  {
- 	static struct mtk_wed_wo_memory_region mem_region[] = {
-@@ -320,12 +366,9 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
+ 	const struct mtk_wed_fw_trailer *trailer;
+@@ -324,14 +357,20 @@ mtk_wed_mcu_load_firmware(struct mtk_wed
  	u32 val, boot_cr;
  	int ret, i;
  
--	/* load firmware region metadata */
--	for (i = 0; i < ARRAY_SIZE(mem_region); i++) {
--		ret = mtk_wed_get_reserved_memory_region(wo, &mem_region[i]);
--		if (ret)
--			return ret;
--	}
-+	ret = mtk_wed_mcu_load_memory_regions(wo, mem_region);
-+	if (ret)
-+		return ret;
- 
++	mtk_wed_mcu_load_ilm(wo);
  	wo->boot_regmap = syscon_regmap_lookup_by_phandle(wo->hw->node,
  							  "mediatek,wo-cpuboot");
+ 
+ 	/* load firmware region metadata */
+ 	for (i = 0; i < ARRAY_SIZE(mem_region); i++) {
+-		int index = of_property_match_string(wo->hw->node,
+-						     "memory-region-names",
+-						     mem_region[i].name);
++		int index;
++
++		if (mem_region[i].addr)
++			continue;
++
++		index = of_property_match_string(wo->hw->node,
++						 "memory-region-names",
++						 mem_region[i].name);
+ 		if (index < 0)
+ 			continue;
+ 
diff --git a/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch b/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
index eed97b4769..c92fcd43ce 100644
--- a/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
+++ b/target/linux/mediatek/patches-5.15/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
@@ -22,7 +22,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -821,6 +821,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device
+@@ -1320,6 +1320,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device
  	struct device_node *np;
  	int index;
  
@@ -47,7 +47,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	index = of_property_match_string(dev->hw->node, "memory-region-names",
  					 "wo-dlm");
  	if (index < 0)
-@@ -837,6 +855,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device
+@@ -1336,6 +1354,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device
  		return -ENODEV;
  
  	dev->rro.miod_phys = rmem->base;
diff --git a/target/linux/mediatek/patches-5.15/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch b/target/linux/mediatek/patches-5.15/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
index af95dcf8d2..ef9a33116f 100644
--- a/target/linux/mediatek/patches-5.15/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
+++ b/target/linux/mediatek/patches-5.15/961-net-ethernet-mediatek-split-tx-and-rx-fields-in-mtk_.patch
@@ -15,7 +15,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1238,7 +1238,7 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -1239,7 +1239,7 @@ static int mtk_init_fq_dma(struct mtk_et
  		eth->scratch_ring = eth->sram_base;
  	else
  		eth->scratch_ring = dma_alloc_coherent(eth->dma_dev,
@@ -24,7 +24,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  						       &eth->phy_scratch_ring,
  						       GFP_KERNEL);
  	if (unlikely(!eth->scratch_ring))
-@@ -1254,16 +1254,16 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -1255,16 +1255,16 @@ static int mtk_init_fq_dma(struct mtk_et
  	if (unlikely(dma_mapping_error(eth->dma_dev, dma_addr)))
  		return -ENOMEM;
  
@@ -44,7 +44,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  
  		txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE);
  		txd->txd4 = 0;
-@@ -1510,7 +1510,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1511,7 +1511,7 @@ static int mtk_tx_map(struct sk_buff *sk
  	if (itxd == ring->last_free)
  		return -ENOMEM;
  
@@ -53,7 +53,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	memset(itx_buf, 0, sizeof(*itx_buf));
  
  	txd_info.addr = dma_map_single(eth->dma_dev, skb->data, txd_info.size,
-@@ -1551,7 +1551,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1552,7 +1552,7 @@ static int mtk_tx_map(struct sk_buff *sk
  
  			memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
  			txd_info.size = min_t(unsigned int, frag_size,
@@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			txd_info.qid = queue;
  			txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 &&
  					!(frag_size - txd_info.size);
-@@ -1564,7 +1564,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1565,7 +1565,7 @@ static int mtk_tx_map(struct sk_buff *sk
  			mtk_tx_set_dma_desc(dev, txd, &txd_info);
  
  			tx_buf = mtk_desc_to_tx_buf(ring, txd,
@@ -71,7 +71,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			if (new_desc)
  				memset(tx_buf, 0, sizeof(*tx_buf));
  			tx_buf->data = (void *)MTK_DMA_DUMMY_DESC;
-@@ -1607,7 +1607,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1608,7 +1608,7 @@ static int mtk_tx_map(struct sk_buff *sk
  	} else {
  		int next_idx;
  
@@ -80,7 +80,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  					 ring->dma_size);
  		mtk_w32(eth, next_idx, MT7628_TX_CTX_IDX0);
  	}
-@@ -1616,7 +1616,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1617,7 +1617,7 @@ static int mtk_tx_map(struct sk_buff *sk
  
  err_dma:
  	do {
@@ -89,7 +89,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  
  		/* unmap dma */
  		mtk_tx_unmap(eth, tx_buf, false);
-@@ -1641,7 +1641,7 @@ static int mtk_cal_txd_req(struct mtk_et
+@@ -1642,7 +1642,7 @@ static int mtk_cal_txd_req(struct mtk_et
  		for (i = 0; i < skb_shinfo(skb)->nr_frags; i++) {
  			frag = &skb_shinfo(skb)->frags[i];
  			nfrags += DIV_ROUND_UP(skb_frag_size(frag),
@@ -98,7 +98,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		}
  	} else {
  		nfrags += skb_shinfo(skb)->nr_frags;
-@@ -1782,7 +1782,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri
+@@ -1783,7 +1783,7 @@ static struct mtk_rx_ring *mtk_get_rx_ri
  
  		ring = &eth->rx_ring[i];
  		idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
@@ -107,7 +107,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		if (rxd->rxd2 & RX_DMA_DONE) {
  			ring->calc_idx_update = true;
  			return ring;
-@@ -1950,7 +1950,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -1951,7 +1951,7 @@ static int mtk_xdp_submit_frame(struct m
  	}
  	htxd = txd;
  
@@ -116,7 +116,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	memset(tx_buf, 0, sizeof(*tx_buf));
  	htx_buf = tx_buf;
  
-@@ -1970,7 +1970,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -1971,7 +1971,7 @@ static int mtk_xdp_submit_frame(struct m
  				goto unmap;
  
  			tx_buf = mtk_desc_to_tx_buf(ring, txd,
@@ -125,7 +125,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			memset(tx_buf, 0, sizeof(*tx_buf));
  			n_desc++;
  		}
-@@ -2007,7 +2007,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -2008,7 +2008,7 @@ static int mtk_xdp_submit_frame(struct m
  	} else {
  		int idx;
  
@@ -134,7 +134,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		mtk_w32(eth, NEXT_DESP_IDX(idx, ring->dma_size),
  			MT7628_TX_CTX_IDX0);
  	}
-@@ -2019,7 +2019,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -2020,7 +2020,7 @@ static int mtk_xdp_submit_frame(struct m
  unmap:
  	while (htxd != txd) {
  		txd_pdma = qdma_to_pdma(ring, htxd);
@@ -143,7 +143,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		mtk_tx_unmap(eth, tx_buf, false);
  
  		htxd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
-@@ -2147,7 +2147,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2148,7 +2148,7 @@ static int mtk_poll_rx(struct napi_struc
  			goto rx_done;
  
  		idx = NEXT_DESP_IDX(ring->calc_idx, ring->dma_size);
@@ -152,7 +152,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		data = ring->data[idx];
  
  		if (!mtk_rx_get_desc(eth, &trxd, rxd))
-@@ -2282,7 +2282,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2283,7 +2283,7 @@ static int mtk_poll_rx(struct napi_struc
  			rxdcsum = &trxd.rxd4;
  		}
  
@@ -161,7 +161,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			skb->ip_summed = CHECKSUM_UNNECESSARY;
  		else
  			skb_checksum_none_assert(skb);
-@@ -2403,7 +2403,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -2404,7 +2404,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
  			break;
  
  		tx_buf = mtk_desc_to_tx_buf(ring, desc,
@@ -170,7 +170,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		if (!tx_buf->data)
  			break;
  
-@@ -2451,7 +2451,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -2452,7 +2452,7 @@ static int mtk_poll_tx_pdma(struct mtk_e
  		}
  		mtk_tx_unmap(eth, tx_buf, true);
  
@@ -179,7 +179,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		ring->last_free = desc;
  		atomic_inc(&ring->free_count);
  
-@@ -2540,7 +2540,7 @@ static int mtk_napi_rx(struct napi_struc
+@@ -2541,7 +2541,7 @@ static int mtk_napi_rx(struct napi_struc
  	do {
  		int rx_done;
  
@@ -188,7 +188,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			reg_map->pdma.irq_status);
  		rx_done = mtk_poll_rx(napi, budget - rx_done_total, eth);
  		rx_done_total += rx_done;
-@@ -2556,10 +2556,10 @@ static int mtk_napi_rx(struct napi_struc
+@@ -2557,10 +2557,10 @@ static int mtk_napi_rx(struct napi_struc
  			return budget;
  
  	} while (mtk_r32(eth, reg_map->pdma.irq_status) &
@@ -201,7 +201,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  
  	return rx_done_total;
  }
-@@ -2568,7 +2568,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2569,7 +2569,7 @@ static int mtk_tx_alloc(struct mtk_eth *
  {
  	const struct mtk_soc_data *soc = eth->soc;
  	struct mtk_tx_ring *ring = &eth->tx_ring;
@@ -210,7 +210,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	struct mtk_tx_dma_v2 *txd;
  	int ring_size;
  	u32 ofs, val;
-@@ -2691,14 +2691,14 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -2692,14 +2692,14 @@ static void mtk_tx_clean(struct mtk_eth
  	}
  	if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && ring->dma) {
  		dma_free_coherent(eth->dma_dev,
@@ -227,7 +227,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  				  ring->dma_pdma, ring->phys_pdma);
  		ring->dma_pdma = NULL;
  	}
-@@ -2753,15 +2753,15 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2754,15 +2754,15 @@ static int mtk_rx_alloc(struct mtk_eth *
  	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SRAM) ||
  	    rx_flag != MTK_RX_FLAGS_NORMAL) {
  		ring->dma = dma_alloc_coherent(eth->dma_dev,
@@ -247,7 +247,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	}
  
  	if (!ring->dma)
-@@ -2772,7 +2772,7 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2773,7 +2773,7 @@ static int mtk_rx_alloc(struct mtk_eth *
  		dma_addr_t dma_addr;
  		void *data;
  
@@ -256,7 +256,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		if (ring->page_pool) {
  			data = mtk_page_pool_get_buff(ring->page_pool,
  						      &dma_addr, GFP_KERNEL);
-@@ -2861,7 +2861,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -2862,7 +2862,7 @@ static void mtk_rx_clean(struct mtk_eth
  			if (!ring->data[i])
  				continue;
  
@@ -265,7 +265,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			if (!rxd->rxd1)
  				continue;
  
-@@ -2878,7 +2878,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -2879,7 +2879,7 @@ static void mtk_rx_clean(struct mtk_eth
  
  	if (!in_sram && ring->dma) {
  		dma_free_coherent(eth->dma_dev,
@@ -274,7 +274,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  				  ring->dma, ring->phys);
  		ring->dma = NULL;
  	}
-@@ -3241,7 +3241,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -3242,7 +3242,7 @@ static void mtk_dma_free(struct mtk_eth
  			netdev_reset_queue(eth->netdev[i]);
  	if (!MTK_HAS_CAPS(soc->caps, MTK_SRAM) && eth->scratch_ring) {
  		dma_free_coherent(eth->dma_dev,
@@ -283,7 +283,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  				  eth->scratch_ring, eth->phy_scratch_ring);
  		eth->scratch_ring = NULL;
  		eth->phy_scratch_ring = 0;
-@@ -3291,7 +3291,7 @@ static irqreturn_t mtk_handle_irq_rx(int
+@@ -3292,7 +3292,7 @@ static irqreturn_t mtk_handle_irq_rx(int
  
  	eth->rx_events++;
  	if (likely(napi_schedule_prep(&eth->rx_napi))) {
@@ -292,7 +292,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		__napi_schedule(&eth->rx_napi);
  	}
  
-@@ -3317,9 +3317,9 @@ static irqreturn_t mtk_handle_irq(int ir
+@@ -3318,9 +3318,9 @@ static irqreturn_t mtk_handle_irq(int ir
  	const struct mtk_reg_map *reg_map = eth->soc->reg_map;
  
  	if (mtk_r32(eth, reg_map->pdma.irq_mask) &
@@ -304,7 +304,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mtk_handle_irq_rx(irq, _eth);
  	}
  	if (mtk_r32(eth, reg_map->tx_irq_mask) & MTK_TX_DONE_INT) {
-@@ -3337,10 +3337,10 @@ static void mtk_poll_controller(struct n
+@@ -3338,10 +3338,10 @@ static void mtk_poll_controller(struct n
  	struct mtk_eth *eth = mac->hw;
  
  	mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -317,7 +317,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  }
  #endif
  
-@@ -3505,7 +3505,7 @@ static int mtk_open(struct net_device *d
+@@ -3506,7 +3506,7 @@ static int mtk_open(struct net_device *d
  		napi_enable(&eth->tx_napi);
  		napi_enable(&eth->rx_napi);
  		mtk_tx_irq_enable(eth, MTK_TX_DONE_INT);
@@ -326,7 +326,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		refcount_set(&eth->dma_refcnt, 1);
  	}
  	else
-@@ -3588,7 +3588,7 @@ static int mtk_stop(struct net_device *d
+@@ -3589,7 +3589,7 @@ static int mtk_stop(struct net_device *d
  	mtk_gdm_config(eth, MTK_GDMA_DROP_ALL);
  
  	mtk_tx_irq_disable(eth, MTK_TX_DONE_INT);
@@ -335,7 +335,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	napi_disable(&eth->tx_napi);
  	napi_disable(&eth->rx_napi);
  
-@@ -4064,9 +4064,9 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -4065,9 +4065,9 @@ static int mtk_hw_init(struct mtk_eth *e
  
  	/* FE int grouping */
  	mtk_w32(eth, MTK_TX_DONE_INT, reg_map->pdma.int_grp);
@@ -347,7 +347,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
  
  	if (mtk_is_netsys_v3_or_greater(eth)) {
-@@ -5166,11 +5166,15 @@ static const struct mtk_soc_data mt2701_
+@@ -5167,11 +5167,15 @@ static const struct mtk_soc_data mt2701_
  	.required_clks = MT7623_CLKS_BITMAP,
  	.required_pctl = true,
  	.version = 1,
@@ -368,7 +368,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5186,11 +5190,15 @@ static const struct mtk_soc_data mt7621_
+@@ -5187,11 +5191,15 @@ static const struct mtk_soc_data mt7621_
  	.offload_version = 1,
  	.hash_offset = 2,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@@ -389,7 +389,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5208,11 +5216,15 @@ static const struct mtk_soc_data mt7622_
+@@ -5209,11 +5217,15 @@ static const struct mtk_soc_data mt7622_
  	.hash_offset = 2,
  	.has_accounting = true,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
@@ -410,7 +410,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5229,11 +5241,15 @@ static const struct mtk_soc_data mt7623_
+@@ -5230,11 +5242,15 @@ static const struct mtk_soc_data mt7623_
  	.hash_offset = 2,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
  	.disable_pll_modes = true,
@@ -431,7 +431,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5248,11 +5264,15 @@ static const struct mtk_soc_data mt7629_
+@@ -5249,11 +5265,15 @@ static const struct mtk_soc_data mt7629_
  	.required_pctl = false,
  	.has_accounting = true,
  	.version = 1,
@@ -452,7 +452,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN,
  		.dma_len_offset = 16,
  	},
-@@ -5270,11 +5290,15 @@ static const struct mtk_soc_data mt7981_
+@@ -5271,11 +5291,15 @@ static const struct mtk_soc_data mt7981_
  	.hash_offset = 4,
  	.has_accounting = true,
  	.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
@@ -473,7 +473,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
  		.dma_len_offset = 8,
  	},
-@@ -5292,11 +5316,15 @@ static const struct mtk_soc_data mt7986_
+@@ -5293,11 +5317,15 @@ static const struct mtk_soc_data mt7986_
  	.hash_offset = 4,
  	.has_accounting = true,
  	.foe_entry_size = MTK_FOE_ENTRY_V2_SIZE,
@@ -494,7 +494,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
  		.dma_len_offset = 8,
  	},
-@@ -5314,11 +5342,15 @@ static const struct mtk_soc_data mt7988_
+@@ -5315,11 +5343,15 @@ static const struct mtk_soc_data mt7988_
  	.hash_offset = 4,
  	.has_accounting = true,
  	.foe_entry_size = MTK_FOE_ENTRY_V3_SIZE,
@@ -515,7 +515,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		.dma_max_len = MTK_TX_DMA_BUF_LEN_V2,
  		.dma_len_offset = 8,
  	},
-@@ -5331,11 +5363,15 @@ static const struct mtk_soc_data rt5350_
+@@ -5332,11 +5364,15 @@ static const struct mtk_soc_data rt5350_
  	.required_clks = MT7628_CLKS_BITMAP,
  	.required_pctl = false,
  	.version = 1,
diff --git a/target/linux/mediatek/patches-5.15/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch b/target/linux/mediatek/patches-5.15/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
index ea94bb5e05..b93aa99f2d 100644
--- a/target/linux/mediatek/patches-5.15/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
+++ b/target/linux/mediatek/patches-5.15/962-net-ethernet-mediatek-use-QDMA-instead-of-ADMAv2-on-.patch
@@ -44,7 +44,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	},
  	.qdma = {
  		.qtx_cfg	= 0x4400,
-@@ -1206,7 +1206,7 @@ static bool mtk_rx_get_desc(struct mtk_e
+@@ -1207,7 +1207,7 @@ static bool mtk_rx_get_desc(struct mtk_e
  	rxd->rxd1 = READ_ONCE(dma_rxd->rxd1);
  	rxd->rxd3 = READ_ONCE(dma_rxd->rxd3);
  	rxd->rxd4 = READ_ONCE(dma_rxd->rxd4);
@@ -53,7 +53,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		rxd->rxd5 = READ_ONCE(dma_rxd->rxd5);
  		rxd->rxd6 = READ_ONCE(dma_rxd->rxd6);
  	}
-@@ -2154,7 +2154,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2155,7 +2155,7 @@ static int mtk_poll_rx(struct napi_struc
  			break;
  
  		/* find out which mac the packet come from. values start at 1 */
@@ -62,7 +62,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  			u32 val = RX_DMA_GET_SPORT_V2(trxd.rxd5);
  
  			switch (val) {
-@@ -2266,7 +2266,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2267,7 +2267,7 @@ static int mtk_poll_rx(struct napi_struc
  		skb->dev = netdev;
  		bytes += skb->len;
  
@@ -71,7 +71,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  			reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5);
  			hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY;
  			if (hash != MTK_RXD5_FOE_ENTRY)
-@@ -2807,7 +2807,7 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2808,7 +2808,7 @@ static int mtk_rx_alloc(struct mtk_eth *
  
  		rxd->rxd3 = 0;
  		rxd->rxd4 = 0;
@@ -80,7 +80,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  			rxd->rxd5 = 0;
  			rxd->rxd6 = 0;
  			rxd->rxd7 = 0;
-@@ -4010,7 +4010,7 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -4011,7 +4011,7 @@ static int mtk_hw_init(struct mtk_eth *e
  	else
  		mtk_hw_reset(eth);
  
@@ -89,7 +89,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  		/* Set FE to PDMAv2 if necessary */
  		val = mtk_r32(eth, MTK_FE_GLO_MISC);
  		mtk_w32(eth,  val | BIT(4), MTK_FE_GLO_MISC);
-@@ -5296,11 +5296,11 @@ static const struct mtk_soc_data mt7981_
+@@ -5297,11 +5297,11 @@ static const struct mtk_soc_data mt7981_
  		.dma_len_offset = 8,
  	},
  	.rx = {
@@ -105,7 +105,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	},
  };
  
-@@ -5322,11 +5322,11 @@ static const struct mtk_soc_data mt7986_
+@@ -5323,11 +5323,11 @@ static const struct mtk_soc_data mt7986_
  		.dma_len_offset = 8,
  	},
  	.rx = {
diff --git a/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch b/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch
index 044a97ab2b..ff492e7f6c 100644
--- a/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch
+++ b/target/linux/ramips/patches-5.15/700-net-ethernet-mediatek-support-net-labels.patch
@@ -14,7 +14,7 @@ Signed-off-by: Ren? van Dorst <opensource at vdorst.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4556,6 +4556,7 @@ static const struct net_device_ops mtk_n
+@@ -4557,6 +4557,7 @@ static const struct net_device_ops mtk_n
  
  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
  {
@@ -22,7 +22,7 @@ Signed-off-by: Ren? van Dorst <opensource at vdorst.com>
  	const __be32 *_id = of_get_property(np, "reg", NULL);
  	phy_interface_t phy_mode;
  	struct phylink *phylink;
-@@ -4727,6 +4728,9 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4728,6 +4729,9 @@ static int mtk_add_mac(struct mtk_eth *e
  		register_netdevice_notifier(&mac->device_notifier);
  	}
  



From lede-commits at lists.infradead.org  Tue Apr  9 01:41:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 04:41:32 -0400
Subject: [openwrt/openwrt]  qualcommax: Skip compiling unnecessary dtbs
In-Reply-To: <171265209209.1854797.3244085105320188243@git-01.infra.openwrt.org>
References: <171265209209.1854797.3244085105320188243@git-01.infra.openwrt.org>
Message-ID: <mailman.24913.1712652096.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d606b84c4ebf6561168b23df51a294dc9e25c451

commit d606b84c4ebf6561168b23df51a294dc9e25c451
Author: Sean Khan <datapronix at protonmail.com>
AuthorDate: Mon Apr 8 16:24:12 2024 -0400

    qualcommax: Skip compiling unnecessary dtbs
    
    Currently the compile phase of the kernel builds `Image dtbs modules`.
    However, none of the dtbs that get built are used for the final image.
    
    This ends up unnecessarily taking CPU cycles and produces a lot of
    `WARNINGS` that can lead users to believe there's cause for concern. I
    believe the same principle can be applied to other targets.
    
    ```
    DTC     arch/arm64/boot/dts/qcom/msm8996-mtp.dtb
    arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
    /soc/clock-controller at 6400000: Missing property '#clock-cells' in node
    /soc/mailbox at 9820000 or bad phandle (referred from clocks[2])
    
    DTC     arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-dora.dtb
    arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
    /soc/clock-controller at 6400000: Missing property '#clock-cells' in node
    /soc/mailbox at 9820000 or bad phandle (referred from clocks[2])
    
    DTC     arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-kagura.dtb
    arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
    /soc/clock-controller at 6400000: Missing property '#clock-cells' in node
    /soc/mailbox at 9820000 or bad phandle (referred from clocks[2])
    
    DTC     arch/arm64/boot/dts/qcom/msm8996-sony-xperia-tone-keyaki.dtb
    arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
    /soc/clock-controller at 6400000: Missing property '#clock-cells' in node
    /soc/mailbox at 9820000 or bad phandle (referred from clocks[2])
    
    DTC     arch/arm64/boot/dts/qcom/msm8996-xiaomi-gemini.dtb
    arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
    /soc/clock-controller at 6400000: Missing property '#clock-cells' in node
    /soc/mailbox at 9820000 or bad phandle (referred from clocks[2])
    
    DTC     arch/arm64/boot/dts/qcom/msm8996-xiaomi-natrium.dtb
    arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
    /soc/clock-controller at 6400000: Missing property '#clock-cells' in node
    /soc/mailbox at 9820000 or bad phandle (referred from clocks[2])
    
    DTC     arch/arm64/boot/dts/qcom/msm8996-xiaomi-scorpio.dtb
    arch/arm64/boot/dts/qcom/msm8996.dtsi:2954.36-2962.5: Warning (clocks_property):
    /soc/clock-controller at 6400000: Missing property '#clock-cells' in node
    /soc/mailbox at 9820000 or bad phandle (referred from clocks[2])
    ```
    
    Signed-off-by: Sean Khan <datapronix at protonmail.com>
---
 target/linux/qualcommax/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/qualcommax/Makefile b/target/linux/qualcommax/Makefile
index ab7f52ae04..3c9bb840e3 100644
--- a/target/linux/qualcommax/Makefile
+++ b/target/linux/qualcommax/Makefile
@@ -4,7 +4,7 @@ ARCH:=aarch64
 BOARD:=qualcommax
 BOARDNAME:=Qualcomm Atheros 802.11ax WiSoC-s
 FEATURES:=squashfs ramdisk fpu nand rtc emmc
-KERNELNAME:=Image dtbs
+KERNELNAME:=Image
 CPU_TYPE:=cortex-a53
 SUBTARGETS:=ipq807x ipq60xx
 



From lede-commits at lists.infradead.org  Tue Apr  9 02:19:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 05:19:20 -0400
Subject: [openwrt/openwrt]  sdk: include lib/crtsavres.o for powerpc
In-Reply-To: <171265436051.1930517.401247371867290772@git-01.infra.openwrt.org>
References: <171265436051.1930517.401247371867290772@git-01.infra.openwrt.org>
Message-ID: <mailman.24923.1712654365.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7c39a95a2f6ae638f173833dc8d4c120e25475c8

commit 7c39a95a2f6ae638f173833dc8d4c120e25475c8
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 8 17:52:22 2024 +0200

    sdk: include lib/crtsavres.o for powerpc
    
    Trying to link certain kernel modules like dahdi-linux when building with
    the OpenWrt SDK will fail with:
    openwrt-sdk-apm821xx-sata_gcc-13.2.0_musl.Linux-x86_64/staging_dir/toolchain-powerpc_464fp_gcc-13.2.0_musl/bin/powerpc-openwrt-linux-musl-ld: cannot find arch/powerpc/lib/crtsavres.o: No such file or directory
    
    Previously this worked with the PowerPC SDK since we carried a hack that
    was passing --save-restore-funcs to module LDFLAGS so the linker provided
    the required functions automatically as without --save-restore-funcs it
    doesnt do so automatically on relocatable links and as a sideffect did not
    require the kernel provided crtsaves.o to link against.
    
    Now that hack has been removed as upstream kernel now compiles crtsaves.o
    by default so it can be linked against but its not included in the SDK.
    
    So, lets include lib/crtsavres.o when SDK is generated for PowerPC.
    
    Fixes: 99c9d8abd677 ("kernel: bump 5.15 to 5.15.148")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/sdk/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index c57a451617..d0c0ab7a2b 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -68,6 +68,10 @@ KERNEL_FILES_ARCH = \
 	kernel/asm-offsets.s \
 	kernel/module.lds
 
+ifeq ($(LINUX_KARCH),powerpc)
+  KERNEL_FILES_ARCH += lib/crtsavres.o
+endif
+
 KERNEL_FILES_BASE := \
 	.config \
 	Makefile \



From lede-commits at lists.infradead.org  Tue Apr  9 03:59:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 06:59:02 -0400
Subject: [openwrt/openwrt]  sdk: include lib/crtsavres.o for powerpc
In-Reply-To: <171266034285.2146380.18080382724392353700@git-01.infra.openwrt.org>
References: <171266034285.2146380.18080382724392353700@git-01.infra.openwrt.org>
Message-ID: <mailman.25002.1712660353.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/817a1cb2bf09786990f4a5aa7247e42a78e4281f

commit 817a1cb2bf09786990f4a5aa7247e42a78e4281f
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 8 17:52:22 2024 +0200

    sdk: include lib/crtsavres.o for powerpc
    
    Trying to link certain kernel modules like dahdi-linux when building with
    the OpenWrt SDK will fail with:
    openwrt-sdk-apm821xx-sata_gcc-13.2.0_musl.Linux-x86_64/staging_dir/toolchain-powerpc_464fp_gcc-13.2.0_musl/bin/powerpc-openwrt-linux-musl-ld: cannot find arch/powerpc/lib/crtsavres.o: No such file or directory
    
    Previously this worked with the PowerPC SDK since we carried a hack that
    was passing --save-restore-funcs to module LDFLAGS so the linker provided
    the required functions automatically as without --save-restore-funcs it
    doesnt do so automatically on relocatable links and as a sideffect did not
    require the kernel provided crtsaves.o to link against.
    
    Now that hack has been removed as upstream kernel now compiles crtsaves.o
    by default so it can be linked against but its not included in the SDK.
    
    So, lets include lib/crtsavres.o when SDK is generated for PowerPC.
    
    Fixes: 1c28058710fd ("kernel: bump 5.15 to 5.15.148")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/sdk/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index 667d00b43f..aaafed0715 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -68,6 +68,10 @@ KERNEL_FILES_ARCH = \
 	kernel/asm-offsets.s \
 	kernel/module.lds
 
+ifeq ($(LINUX_KARCH),powerpc)
+  KERNEL_FILES_ARCH += lib/crtsavres.o
+endif
+
 KERNEL_FILES_BASE := \
 	.config \
 	Makefile \



From lede-commits at lists.infradead.org  Tue Apr  9 07:02:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 10:02:10 -0400
Subject: [openwrt/openwrt]  mvebu: puzzle-m90x: wipe rootfs_data on sysupgrade
In-Reply-To: <171267133038.2597777.7298979023697383039@git-01.infra.openwrt.org>
References: <171267133038.2597777.7298979023697383039@git-01.infra.openwrt.org>
Message-ID: <mailman.25152.1712671340.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d4e8653e1e9ec90404d12ea24fb0f8e507b337d5

commit d4e8653e1e9ec90404d12ea24fb0f8e507b337d5
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Jan 9 19:54:51 2024 +0000

    mvebu: puzzle-m90x: wipe rootfs_data on sysupgrade
    
    The sysupgrade formware of the Puzzle series is a slightly strange
    dual-boot approach while remaining compatible with Marvell's SDK
    firmware upgrade binary format -- which happens to be a full-disk
    image with GPT partition table. Hence that /lib/upgrade/emmc-puzzle.sh
    script is like an exotic disease which results from those decisions,
    and as we also want to somehow stay compatible with the IEI-World
    stock firmware we got to use it in that same way (we are not
    compatible with the QNAP-branded identical hardware device anyway).
    
    Currently, on sysupgrade the result is that one ends up with the old
    content of rootfs_data (a GPT partition on those devices) as nothing
    ever wipes or in any way re-creates the filesystem there. As a simple
    work-around, let's kill the filesystem on rootfs_data so fstools
    re-formats it on the next boot.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
index 5e5c356ed6..9a33b7714c 100755
--- a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
+++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
@@ -32,5 +32,7 @@ platform_do_upgrade_emmc() {
 	v "Writing new UUID to /dev/$diskdev..."
 	get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
 
+	dd if=/dev/zero of=$(find_mmc_part rootfs_data) bs=512 count=8
+
 	sleep 1
 }



From lede-commits at lists.infradead.org  Tue Apr  9 07:08:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 10:08:42 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: switch TP-LINK XDR series to
 fitblk
In-Reply-To: <171267172286.2615775.2557659633860089913@git-01.infra.openwrt.org>
References: <171267172286.2615775.2557659633860089913@git-01.infra.openwrt.org>
Message-ID: <mailman.25153.1712671727.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1ae3c53466942e05d2ab91c9432c65156f7228a1

commit 1ae3c53466942e05d2ab91c9432c65156f7228a1
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri Feb 23 16:03:00 2024 +0000

    mediatek: filogic: switch TP-LINK XDR series to fitblk
    
    Instead of using the deprecated FIT partition parser, use the new
    fitblk driver instead.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi   | 11 ++++++++++-
 .../linux/mediatek/filogic/base-files/lib/upgrade/platform.sh |  6 +++---
 target/linux/mediatek/image/filogic.mk                        |  2 +-
 3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
index c851853286..1649b0775d 100644
--- a/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
+++ b/target/linux/mediatek/dts/mt7986a-tplink-tl-xdr-common.dtsi
@@ -17,6 +17,8 @@
 	};
 
 	chosen {
+		bootargs = "root=/dev/fit0 rootwait";
+		rootdisk = <&ubi_rootdisk>;
 		stdout-path = "serial0:115200n8";
 	};
 
@@ -217,8 +219,15 @@
 			};
 
 			partition at 580000 {
-				label = "ubi";
+				compatible = "linux,ubi";
 				reg = <0x580000 0x7800000>;
+				label = "ubi";
+
+				volumes {
+					ubi_rootdisk: ubi-volume-fit {
+						volname = "fit";
+					};
+				};
 			};
 		};
 	};
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 380606412d..6f69706d79 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -83,6 +83,9 @@ platform_do_upgrade() {
 	bananapi,bpi-r3|\
 	bananapi,bpi-r3-mini|\
 	bananapi,bpi-r4|\
+	tplink,tl-xdr4288|\
+	tplink,tl-xdr6086|\
+	tplink,tl-xdr6088|\
 	xiaomi,redmi-router-ax6000-ubootmod)
 		[ -e /dev/fit0 ] && fitblk /dev/fit0
 		[ -e /dev/fitrw ] && fitblk /dev/fitrw
@@ -132,9 +135,6 @@ platform_do_upgrade() {
 	mediatek,mt7981-rfb|\
 	netcore,n60|\
 	qihoo,360t7|\
-	tplink,tl-xdr4288|\
-	tplink,tl-xdr6086|\
-	tplink,tl-xdr6088|\
 	xiaomi,mi-router-ax3000t-ubootmod|\
 	xiaomi,mi-router-wr30u-ubootmod)
 		CI_KERNPART="fit"
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index c3de23f5e8..818a7cef95 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -930,7 +930,7 @@ define Device/tplink_tl-xdr-common
         fit lzma $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb with-initrd | pad-to 64k
   IMAGE/sysupgrade.itb := append-kernel | \
         fit gzip $$(KDIR)/image-$$(firstword $$(DEVICE_DTS)).dtb external-with-rootfs | append-metadata
-  DEVICE_PACKAGES := kmod-usb3 kmod-mt7986-firmware mt7986-wo-firmware
+  DEVICE_PACKAGES := fitblk kmod-usb3 kmod-mt7986-firmware mt7986-wo-firmware
   ARTIFACTS := preloader.bin bl31-uboot.fip
   ARTIFACT/preloader.bin := mt7986-bl2 spim-nand-ddr3
 endef



From lede-commits at lists.infradead.org  Tue Apr  9 09:39:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 12:39:41 -0400
Subject: [openwrt/openwrt]  tools: zstd: dont override CLI max level
In-Reply-To: <171268077999.2999743.12237734337267542242@git-01.infra.openwrt.org>
References: <171268077999.2999743.12237734337267542242@git-01.infra.openwrt.org>
Message-ID: <mailman.25210.1712680785.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e65800d9484e49e81c5d226cc64f2bb47782c089

commit e65800d9484e49e81c5d226cc64f2bb47782c089
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 8 18:35:45 2024 +0200

    tools: zstd: dont override CLI max level
    
    Now that instead of relying on env variables for the GH download script
    invoking ZSTD tarball compression it passes the full arguments via tar -I
    we can drop the CLI max compression level override.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/zstd/Makefile | 3 ---
 1 file changed, 3 deletions(-)

diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index 728cef26b8..0264ac2422 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -17,9 +17,6 @@ include $(INCLUDE_DIR)/host-build.mk
 
 HOSTCC:= $(HOSTCC_NOCACHE)
 
-HOST_CFLAGS += \
-	-DZSTDCLI_CLEVEL_MAX=20
-
 HOST_MAKE_FLAGS += \
 	BACKTRACE=0 \
 	HAVE_THREAD=1 \



From lede-commits at lists.infradead.org  Tue Apr  9 09:39:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 12:39:40 -0400
Subject: [openwrt/openwrt]  scripts/dl_github_archive: use tar -I for ZSTD
In-Reply-To: <171268077999.2999743.12237734337267542242@git-01.infra.openwrt.org>
References: <171268077999.2999743.12237734337267542242@git-01.infra.openwrt.org>
Message-ID: <mailman.25211.1712680785.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/204823ac287998c8725329ab75333ed1098d3cd8

commit 204823ac287998c8725329ab75333ed1098d3cd8
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 8 18:38:51 2024 +0200

    scripts/dl_github_archive: use tar -I for ZSTD
    
    Instead of relying on env variables for setting the ZSTD compression
    configuration we can simply do what we do for IB, SDK and the rest and
    use tar -I to pass "zstd -T0 --ultra -20" directly.
    
    This makes it rather clear what is being done and allows to drop the
    zstd CLI max level override as its usually capped at level 19.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 scripts/dl_github_archive.py | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/scripts/dl_github_archive.py b/scripts/dl_github_archive.py
index 744c441ca7..570ed3c629 100755
--- a/scripts/dl_github_archive.py
+++ b/scripts/dl_github_archive.py
@@ -139,9 +139,7 @@ class Path(object):
         if ts is not None:
             args.append('--mtime=@%d' % ts)
         if into.endswith('.zst'):
-            envs['ZSTD_CLEVEL'] = '20'
-            envs['ZSTD_NBTHREADS'] = '0'
-            args.append('--zstd')
+            args.append('-I zstd -T0 --ultra -20')
         elif into.endswith('.xz'):
             envs['XZ_OPT'] = '-7e'
             args.append('-J')



From lede-commits at lists.infradead.org  Tue Apr  9 09:54:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 12:54:16 -0400
Subject: [openwrt/openwrt]  generic: add missing patch headers
In-Reply-To: <171268165693.3036952.13897092275971054993@git-01.infra.openwrt.org>
References: <171268165693.3036952.13897092275971054993@git-01.infra.openwrt.org>
Message-ID: <mailman.25214.1712681661.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a68eb991911794b1c3814acb17ca829cb311fdcd

commit a68eb991911794b1c3814acb17ca829cb311fdcd
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Apr 9 17:39:46 2024 +0100

    generic: add missing patch headers
    
    Make sure all patches can be applied to a git tree using 'git am'
    by adding missing patch headers where needed.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../generic/hack-5.15/781-usb-net-rndis-support-asr.patch   | 13 +++++++++++++
 .../generic/hack-6.1/781-usb-net-rndis-support-asr.patch    | 13 +++++++++++++
 .../generic/hack-6.6/781-usb-net-rndis-support-asr.patch    | 13 +++++++++++++
 .../731-net-phy-realtek-support-interrupt-of-RTL8221B.patch | 12 ++++++++++++
 .../741-net-phy-realtek-support-interrupt-of-RTL8221B.patch | 12 ++++++++++++
 .../741-net-phy-realtek-support-interrupt-of-RTL8221B.patch | 12 ++++++++++++
 6 files changed, 75 insertions(+)

diff --git a/target/linux/generic/hack-5.15/781-usb-net-rndis-support-asr.patch b/target/linux/generic/hack-5.15/781-usb-net-rndis-support-asr.patch
index 9934bb8078..47339b6c22 100644
--- a/target/linux/generic/hack-5.15/781-usb-net-rndis-support-asr.patch
+++ b/target/linux/generic/hack-5.15/781-usb-net-rndis-support-asr.patch
@@ -1,3 +1,16 @@
+From 9fabf60187f1fa19e6f6bb5441587d485bd534b0 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Tue, 9 Apr 2024 17:06:38 +0100
+Subject: [PATCH] rndis_host: add a bunch of USB IDs
+
+Add a bunch of USB IDs found in various places online to the
+RNDIS USB network driver.
+
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+---
+ drivers/net/usb/rndis_host.c | 40 ++++++++++++++++++++++
+ 1 file changed, 40 insertions(+)
+
 --- a/drivers/net/usb/rndis_host.c
 +++ b/drivers/net/usb/rndis_host.c
 @@ -630,6 +630,16 @@ static const struct driver_info	zte_rndi
diff --git a/target/linux/generic/hack-6.1/781-usb-net-rndis-support-asr.patch b/target/linux/generic/hack-6.1/781-usb-net-rndis-support-asr.patch
index 9934bb8078..47339b6c22 100644
--- a/target/linux/generic/hack-6.1/781-usb-net-rndis-support-asr.patch
+++ b/target/linux/generic/hack-6.1/781-usb-net-rndis-support-asr.patch
@@ -1,3 +1,16 @@
+From 9fabf60187f1fa19e6f6bb5441587d485bd534b0 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Tue, 9 Apr 2024 17:06:38 +0100
+Subject: [PATCH] rndis_host: add a bunch of USB IDs
+
+Add a bunch of USB IDs found in various places online to the
+RNDIS USB network driver.
+
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+---
+ drivers/net/usb/rndis_host.c | 40 ++++++++++++++++++++++
+ 1 file changed, 40 insertions(+)
+
 --- a/drivers/net/usb/rndis_host.c
 +++ b/drivers/net/usb/rndis_host.c
 @@ -630,6 +630,16 @@ static const struct driver_info	zte_rndi
diff --git a/target/linux/generic/hack-6.6/781-usb-net-rndis-support-asr.patch b/target/linux/generic/hack-6.6/781-usb-net-rndis-support-asr.patch
index 9934bb8078..47339b6c22 100644
--- a/target/linux/generic/hack-6.6/781-usb-net-rndis-support-asr.patch
+++ b/target/linux/generic/hack-6.6/781-usb-net-rndis-support-asr.patch
@@ -1,3 +1,16 @@
+From 9fabf60187f1fa19e6f6bb5441587d485bd534b0 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Tue, 9 Apr 2024 17:06:38 +0100
+Subject: [PATCH] rndis_host: add a bunch of USB IDs
+
+Add a bunch of USB IDs found in various places online to the
+RNDIS USB network driver.
+
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+---
+ drivers/net/usb/rndis_host.c | 40 ++++++++++++++++++++++
+ 1 file changed, 40 insertions(+)
+
 --- a/drivers/net/usb/rndis_host.c
 +++ b/drivers/net/usb/rndis_host.c
 @@ -630,6 +630,16 @@ static const struct driver_info	zte_rndi
diff --git a/target/linux/generic/pending-5.15/731-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-5.15/731-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index b2b41d9c61..bf0e0aa66d 100644
--- a/target/linux/generic/pending-5.15/731-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-5.15/731-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -1,3 +1,15 @@
+From d7943c31d57c11e1a517aa3ce2006fca44866870 Mon Sep 17 00:00:00 2001
+From: Jianhui Zhao <zhaojh329 at gmail.com>
+Date: Sun, 24 Sep 2023 22:15:00 +0800
+Subject: [PATCH] net: phy: realtek: add interrupt support for RTL8221B
+
+This commit introduces interrupt support for RTL8221B.
+
+Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
+---
+ drivers/net/phy/realtek.c | 47 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 47 insertions(+)
+
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
 @@ -971,6 +971,51 @@ static int rtl8221b_config_init(struct p
diff --git a/target/linux/generic/pending-6.1/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.1/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index 51cd98c883..82cd419a7e 100644
--- a/target/linux/generic/pending-6.1/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.1/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -1,3 +1,15 @@
+From d7943c31d57c11e1a517aa3ce2006fca44866870 Mon Sep 17 00:00:00 2001
+From: Jianhui Zhao <zhaojh329 at gmail.com>
+Date: Sun, 24 Sep 2023 22:15:00 +0800
+Subject: [PATCH] net: phy: realtek: add interrupt support for RTL8221B
+
+This commit introduces interrupt support for RTL8221B.
+
+Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
+---
+ drivers/net/phy/realtek.c | 47 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 47 insertions(+)
+
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
 @@ -981,6 +981,51 @@ static int rtl8221b_config_init(struct p
diff --git a/target/linux/generic/pending-6.6/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch b/target/linux/generic/pending-6.6/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
index aab0d3f7d5..e4fbf1f870 100644
--- a/target/linux/generic/pending-6.6/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
+++ b/target/linux/generic/pending-6.6/741-net-phy-realtek-support-interrupt-of-RTL8221B.patch
@@ -1,3 +1,15 @@
+From d7943c31d57c11e1a517aa3ce2006fca44866870 Mon Sep 17 00:00:00 2001
+From: Jianhui Zhao <zhaojh329 at gmail.com>
+Date: Sun, 24 Sep 2023 22:15:00 +0800
+Subject: [PATCH] net: phy: realtek: add interrupt support for RTL8221B
+
+This commit introduces interrupt support for RTL8221B.
+
+Signed-off-by: Jianhui Zhao <zhaojh329 at gmail.com>
+---
+ drivers/net/phy/realtek.c | 47 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 47 insertions(+)
+
 --- a/drivers/net/phy/realtek.c
 +++ b/drivers/net/phy/realtek.c
 @@ -1026,6 +1026,51 @@ static int rtl8221b_config_init(struct p



From lede-commits at lists.infradead.org  Tue Apr  9 10:32:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 13:32:32 -0400
Subject: [openwrt/openwrt]  config: fix CONFIG_GDB appearing in main
 menuconfig menu
In-Reply-To: <171268395294.3123828.8306104753888862805@git-01.infra.openwrt.org>
References: <171268395294.3123828.8306104753888862805@git-01.infra.openwrt.org>
Message-ID: <mailman.25228.1712683957.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/12b2cb2ec3f1366b65caa0dbbdd83846c1c88d4e

commit 12b2cb2ec3f1366b65caa0dbbdd83846c1c88d4e
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 8 22:05:19 2024 +0200

    config: fix CONFIG_GDB appearing in main menuconfig menu
    
    I noticed that CONFIG_GDB was suddenly appearing in the main menuconfig
    menu despite the fact that it should be visible only when TOOLCHAINOPTS
    is selected and under a dedicated menu.
    
    After some trial and error, it seems that this was caused by the recent
    addition of GCC_USE_DEFAULT_VERSION, and after even more trial and error
    it gets fixed as soon GCC_USE_DEFAULT_VERSION is placed after GCC_VERSION.
    
    So, lets simply put GCC_USE_DEFAULT_VERSION after GCC_VERSION.
    
    Fixes: 501ef81040ba ("config: select KERNEL_WERROR if building with default GCC version")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 toolchain/gcc/Config.in      | 5 -----
 toolchain/gcc/Config.version | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index fd98914075..85abbdabb7 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -16,11 +16,6 @@ choice
 		bool "gcc 13.x"
 endchoice
 
-config GCC_USE_DEFAULT_VERSION
-	bool
-	default y if !TOOLCHAINOPTS || GCC_USE_VERSION_13
-	imply KERNEL_WERROR
-
 config GCC_USE_GRAPHITE
 	bool
 	prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 54bb4445b3..fe956d65b7 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -12,3 +12,8 @@ config GCC_VERSION
 	default "11.3.0"	if GCC_VERSION_11
 	default "12.3.0"	if GCC_VERSION_12
 	default "13.2.0"
+
+config GCC_USE_DEFAULT_VERSION
+	bool
+	default y if !TOOLCHAINOPTS || GCC_USE_VERSION_13
+	imply KERNEL_WERROR



From lede-commits at lists.infradead.org  Tue Apr  9 12:33:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 09 Apr 2024 15:33:41 -0400
Subject: [openwrt/openwrt]  ucode: update to Git HEAD (2024-04-07)
In-Reply-To: <171269122140.3370708.8828609928268399022@git-01.infra.openwrt.org>
References: <171269122140.3370708.8828609928268399022@git-01.infra.openwrt.org>
Message-ID: <mailman.25250.1712691233.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/08639a5e47d8ec2d78693493924081d841601028

commit 08639a5e47d8ec2d78693493924081d841601028
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Apr 9 11:21:39 2024 +0200

    ucode: update to Git HEAD (2024-04-07)
    
    1220992631d5 ubus: automatically clear error information
    d6fd94014eea uci: automatically clear error information
    99837f280b61 uloop: automatically clear error information
    be767ae197ba vm: rework `in` operator semantics
    4ade84e8fb81 ubus: add explicit support for deferring incoming requests
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/utils/ucode/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/utils/ucode/Makefile b/package/utils/ucode/Makefile
index fdaafdddcc..f9db6b060e 100644
--- a/package/utils/ucode/Makefile
+++ b/package/utils/ucode/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/jow-/ucode.git
-PKG_SOURCE_DATE:=2024-02-21
-PKG_SOURCE_VERSION:=ba3855ae3775197f3594fc2615cac539075bd2fb
-PKG_MIRROR_HASH:=f585447ebbb5ef56ada3a9f8dbe71d5310cc8185d0e90676b512849eaf60f77c
+PKG_SOURCE_DATE:=2024-04-07
+PKG_SOURCE_VERSION:=5507654a498a339c44b642f62e203e1d5fb1f725
+PKG_MIRROR_HASH:=40d3df5308faaf3cddfca4ebbcd9ee7fff98cf7e7d406dc177972a7abf0ca16b
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=ISC
 



From lede-commits at lists.infradead.org  Wed Apr 10 01:50:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 10 Apr 2024 04:50:21 -0400
Subject: [openwrt/openwrt]  kernel: add kmod-hwmon-emc2305 support
In-Reply-To: <171273902127.780879.5841634857590489344@git-01.infra.openwrt.org>
References: <171273902127.780879.5841634857590489344@git-01.infra.openwrt.org>
Message-ID: <mailman.25446.1712739026.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d668c74fe6efb546f0fd65f0334a3f0bd7bf5df4

commit d668c74fe6efb546f0fd65f0334a3f0bd7bf5df4
Author: Oleg S <remittor at gmail.com>
AuthorDate: Sun Mar 24 21:26:08 2024 +0300

    kernel: add kmod-hwmon-emc2305 support
    
    This module supports the Microchip Technology Inc (SMSC)
    EMC2301/EMC2302/EMC2303/EMC2305 fan speed PWM controller chips.
    
    Signed-off-by: Oleg S <remittor at gmail.com>
---
 package/kernel/linux/modules/hwmon.mk | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/package/kernel/linux/modules/hwmon.mk b/package/kernel/linux/modules/hwmon.mk
index be38a6071a..ba393ab8fa 100644
--- a/package/kernel/linux/modules/hwmon.mk
+++ b/package/kernel/linux/modules/hwmon.mk
@@ -125,6 +125,21 @@ endef
 $(eval $(call KernelPackage,hwmon-drivetemp))
 
 
+define KernelPackage/hwmon-emc2305
+  TITLE:=Microchip EMC2301/2/3/5 fan controller
+  KCONFIG:=CONFIG_SENSORS_EMC2305
+  FILES:=$(LINUX_DIR)/drivers/hwmon/emc2305.ko
+  AUTOLOAD:=$(call AutoProbe,emc2305)
+  $(call AddDepends/hwmon,+kmod-i2c-core +PACKAGE_kmod-thermal:kmod-thermal +kmod-regmap-i2c @LINUX_6_1||LINUX_6_6)
+endef
+
+define KernelPackage/hwmon-emc2305/description
+ Kernel module for Microchip EMC2301/EMC2302/EMC2303/EMC2305 fan controllers
+endef
+
+$(eval $(call KernelPackage,hwmon-emc2305))
+
+
 define KernelPackage/hwmon-gsc
   TITLE:=Gateworks System Controller support
   KCONFIG:=CONFIG_MFD_GATEWORKS_GSC \



From lede-commits at lists.infradead.org  Wed Apr 10 11:16:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 10 Apr 2024 14:16:54 -0400
Subject: [openwrt/openwrt]  generic: 6.1,
 6.6: import two pending patches for mt7530 DSA driver
In-Reply-To: <171277301268.2136345.15486158673926487330@git-01.infra.openwrt.org>
References: <171277301268.2136345.15486158673926487330@git-01.infra.openwrt.org>
Message-ID: <mailman.25740.1712773027.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/98f9154316fe8371c709bd11ae8f263e22075ec6

commit 98f9154316fe8371c709bd11ae8f263e22075ec6
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Apr 10 15:53:11 2024 +0100

    generic: 6.1, 6.6: import two pending patches for mt7530 DSA driver
    
    First patch allows to inquire and modify Energy-Efficient-Ethernet
    (EEE) settings via ethtool and thereby override the default setting of
    a board done via bootstrap pins.
    
    The second patch fixes a long-standing issue with STP (and similar
    protocols) when using boards (or SoCs) governed by the mt7530 DSA
    driver.
    
    Both patches could also be (dirty-)applied to Linux 5.15, but I'd
    rather just wait for that to happen via linux-stable to avoid the
    mess.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...530-fix-enabling-EEE-on-MT7531-switch-on-.patch |  92 ++++
 ...530-trap-link-local-frames-regardless-of-.patch | 483 +++++++++++++++++++++
 ...530-fix-enabling-EEE-on-MT7531-switch-on-.patch |  92 ++++
 ...530-trap-link-local-frames-regardless-of-.patch | 483 +++++++++++++++++++++
 4 files changed, 1150 insertions(+)

diff --git a/target/linux/generic/pending-6.1/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch b/target/linux/generic/pending-6.1/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
new file mode 100644
index 0000000000..dc202a55e6
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
@@ -0,0 +1,92 @@
+From ef972fc9f5743da589ce9546dd565d6c56e679b8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 8 Apr 2024 10:08:53 +0300
+Subject: [PATCH 1/2] net: dsa: mt7530: fix enabling EEE on MT7531 switch on
+ all boards
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The commit 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
+brought EEE support but did not enable EEE on MT7531 switch MACs. EEE is
+enabled on MT7531 switch MACs by pulling the LAN2LED0 pin low on the board
+(bootstrapping), unsetting the EEE_DIS bit on the trap register, or setting
+the internal EEE switch bit on the CORE_PLL_GROUP4 register. Thanks to
+SkyLake Huang (???) from MediaTek for providing information on the
+internal EEE switch bit.
+
+There are existing boards that were not designed to pull the pin low.
+Because of that, the EEE status currently depends on the board design.
+
+The EEE_DIS bit on the trap pertains to the LAN2LED0 pin which is usually
+used to control an LED. Once the bit is unset, the pin will be low. That
+will make the active low LED turn on. The pin is controlled by the switch
+PHY. It seems that the PHY controls the pin in the way that it inverts the
+pin state. That means depending on the wiring of the LED connected to
+LAN2LED0 on the board, the LED may be on without an active link.
+
+To not cause this unwanted behaviour whilst enabling EEE on all boards, set
+the internal EEE switch bit on the CORE_PLL_GROUP4 register.
+
+My testing on MT7531 shows a certain amount of traffic loss when EEE is
+enabled. That said, I haven't come across a board that enables EEE. So
+enable EEE on the switch MACs but disable EEE advertisement on the switch
+PHYs. This way, we don't change the behaviour of the majority of the boards
+that have this switch. The mediatek-ge PHY driver already disables EEE
+advertisement on the switch PHYs but my testing shows that it is somehow
+enabled afterwards. Disabling EEE advertisement before the PHY driver
+initialises keeps it off.
+
+With this change, EEE can now be enabled using ethtool.
+
+Fixes: 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 17 ++++++++++++-----
+ drivers/net/dsa/mt7530.h |  1 +
+ 2 files changed, 13 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2496,18 +2496,25 @@ mt7531_setup(struct dsa_switch *ds)
+ 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
+ 		   MT7531_GPIO0_INTERRUPT);
+ 
+-	/* Enable PHY core PLL, since phy_device has not yet been created
+-	 * provided for phy_[read,write]_mmd_indirect is called, we provide
+-	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
+-	 * function.
++	/* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since
++	 * phy_device has not yet been created provided for
++	 * phy_[read,write]_mmd_indirect is called, we provide our own
++	 * mt7531_ind_mmd_phy_[read,write] to complete this function.
+ 	 */
+ 	val = mt7531_ind_c45_phy_read(priv, MT753X_CTRL_PHY_ADDR,
+ 				      MDIO_MMD_VEND2, CORE_PLL_GROUP4);
+-	val |= MT7531_PHY_PLL_BYPASS_MODE;
++	val |= MT7531_RG_SYSPLL_DMY2 | MT7531_PHY_PLL_BYPASS_MODE;
+ 	val &= ~MT7531_PHY_PLL_OFF;
+ 	mt7531_ind_c45_phy_write(priv, MT753X_CTRL_PHY_ADDR, MDIO_MMD_VEND2,
+ 				 CORE_PLL_GROUP4, val);
+ 
++	/* Disable EEE advertisement on the switch PHYs. */
++	for (i = MT753X_CTRL_PHY_ADDR;
++	     i < MT753X_CTRL_PHY_ADDR + MT7530_NUM_PHYS; i++) {
++		mt7531_ind_c45_phy_write(priv, i, MDIO_MMD_AN, MDIO_AN_EEE_ADV,
++					 0);
++	}
++
+ 	mt7531_setup_common(ds);
+ 
+ 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -616,6 +616,7 @@ enum mt7531_clk_skew {
+ #define  RG_SYSPLL_DDSFBK_EN		BIT(12)
+ #define  RG_SYSPLL_BIAS_EN		BIT(11)
+ #define  RG_SYSPLL_BIAS_LPF_EN		BIT(10)
++#define  MT7531_RG_SYSPLL_DMY2		BIT(6)
+ #define  MT7531_PHY_PLL_OFF		BIT(5)
+ #define  MT7531_PHY_PLL_BYPASS_MODE	BIT(4)
+ 
diff --git a/target/linux/generic/pending-6.1/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch b/target/linux/generic/pending-6.1/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
new file mode 100644
index 0000000000..4d70e774a4
--- /dev/null
+++ b/target/linux/generic/pending-6.1/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
@@ -0,0 +1,483 @@
+From b7427d66cb3d6dca5165de5f7d80d59f08c2795b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 9 Apr 2024 18:01:14 +0300
+Subject: [PATCH 2/2] net: dsa: mt7530: trap link-local frames regardless of ST
+ Port State
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer
+(DLL) of the Open Systems Interconnection basic reference model (OSI/RM)
+are described; the medium access control (MAC) and logical link control
+(LLC) sublayers. The MAC sublayer is the one facing the physical layer.
+
+In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A
+Bridge component comprises a MAC Relay Entity for interconnecting the Ports
+of the Bridge, at least two Ports, and higher layer entities with at least
+a Spanning Tree Protocol Entity included.
+
+Each Bridge Port also functions as an end station and shall provide the MAC
+Service to an LLC Entity. Each instance of the MAC Service is provided to a
+distinct LLC Entity that supports protocol identification, multiplexing,
+and demultiplexing, for protocol data unit (PDU) transmission and reception
+by one or more higher layer entities.
+
+It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC
+Entity associated with each Bridge Port is modeled as being directly
+connected to the attached Local Area Network (LAN).
+
+On the switch with CPU port architecture, CPU port functions as Management
+Port, and the Management Port functionality is provided by software which
+functions as an end station. Software is connected to an IEEE 802 LAN that
+is wholly contained within the system that incorporates the Bridge.
+Software provides access to the LLC Entity associated with each Bridge Port
+by the value of the source port field on the special tag on the frame
+received by software.
+
+We call frames that carry control information to determine the active
+topology and current extent of each Virtual Local Area Network (VLAN),
+i.e., spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN
+Registration Protocol Data Units (MVRPDUs), and frames from other link
+constrained protocols, such as Extensible Authentication Protocol over LAN
+(EAPOL) and Link Layer Discovery Protocol (LLDP), link-local frames. They
+are not forwarded by a Bridge. Permanently configured entries in the
+filtering database (FDB) ensure that such frames are discarded by the
+Forwarding Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in
+detail:
+
+Each of the reserved MAC addresses specified in Table 8-1
+(01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be
+permanently configured in the FDB in C-VLAN components and ERs.
+
+Each of the reserved MAC addresses specified in Table 8-2
+(01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently
+configured in the FDB in S-VLAN components.
+
+Each of the reserved MAC addresses specified in Table 8-3
+(01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB
+in TPMR components.
+
+The FDB entries for reserved MAC addresses shall specify filtering for all
+Bridge Ports and all VIDs. Management shall not provide the capability to
+modify or remove entries for reserved MAC addresses.
+
+The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of
+propagation of PDUs within a Bridged Network, as follows:
+
+  The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that
+  no conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN)
+  component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward.
+  PDUs transmitted using this destination address, or any other addresses
+  that appear in Table 8-1, Table 8-2, and Table 8-3
+  (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can
+  therefore travel no further than those stations that can be reached via a
+  single individual LAN from the originating station.
+
+  The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an
+  address that no conformant S-VLAN component, C-VLAN component, or MAC
+  Bridge can forward; however, this address is relayed by a TPMR component.
+  PDUs using this destination address, or any of the other addresses that
+  appear in both Table 8-1 and Table 8-2 but not in Table 8-3
+  (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed
+  by any TPMRs but will propagate no further than the nearest S-VLAN
+  component, C-VLAN component, or MAC Bridge.
+
+  The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an
+  address that no conformant C-VLAN component, MAC Bridge can forward;
+  however, it is relayed by TPMR components and S-VLAN components. PDUs
+  using this destination address, or any of the other addresses that appear
+  in Table 8-1 but not in either Table 8-2 or Table 8-3
+  (01-80-C2-00-00-[00,0B,0C,0D,0F]), will be relayed by TPMR components and
+  S-VLAN components but will propagate no further than the nearest C-VLAN
+  component or MAC Bridge.
+
+Because the LLC Entity associated with each Bridge Port is provided via CPU
+port, we must not filter these frames but forward them to CPU port.
+
+In a Bridge, the transmission Port is majorly decided by ingress and egress
+rules, FDB, and spanning tree Port State functions of the Forwarding
+Process. For link-local frames, only CPU port should be designated as
+destination port in the FDB, and the other functions of the Forwarding
+Process must not interfere with the decision of the transmission Port. We
+call this process trapping frames to CPU port.
+
+Therefore, on the switch with CPU port architecture, link-local frames must
+be trapped to CPU port, and certain link-local frames received by a Port of
+a Bridge comprising a TPMR component or an S-VLAN component must be
+excluded from it.
+
+A Bridge of the switch with CPU port architecture cannot comprise a
+Two-Port MAC Relay (TPMR) component as a TPMR component supports only a
+subset of the functionality of a MAC Bridge. A Bridge comprising two Ports
+(Management Port doesn't count) of this architecture will either function
+as a standard MAC Bridge or a standard VLAN Bridge.
+
+Therefore, a Bridge of this architecture can only comprise S-VLAN
+components, C-VLAN components, or MAC Bridge components. Since there's no
+TPMR component, we don't need to relay PDUs using the destination addresses
+specified on the Nearest non-TPMR section, and the proportion of the
+Nearest Customer Bridge section where they must be relayed by TPMR
+components.
+
+One option to trap link-local frames to CPU port is to add static FDB
+entries with CPU port designated as destination port. However, because that
+Independent VLAN Learning (IVL) is being used on every VID, each entry only
+applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC
+Bridge component or a C-VLAN component, there would have to be 16 times
+4096 entries. This switch intellectual property can only hold a maximum of
+2048 entries. Using this option, there also isn't a mechanism to prevent
+link-local frames from being discarded when the spanning tree Port State of
+the reception Port is discarding.
+
+The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4
+registers. Whilst this applies to every VID, it doesn't contain all of the
+reserved MAC addresses without affecting the remaining Standard Group MAC
+Addresses. The REV_UN frame tag utilised using the RGAC4 register covers
+the remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination
+addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF
+destination addresses which may be relayed by MAC Bridges or VLAN Bridges.
+The latter option provides better but not complete conformance.
+
+This switch intellectual property also does not provide a mechanism to trap
+link-local frames with specific destination addresses to CPU port by
+Bridge, to conform to the filtering rules for the distinct Bridge
+components.
+
+Therefore, regardless of the type of the Bridge component, link-local
+frames with these destination addresses will be trapped to CPU port:
+
+01-80-C2-00-00-[00,01,02,03,0E]
+
+In a Bridge comprising a MAC Bridge component or a C-VLAN component:
+
+  Link-local frames with these destination addresses won't be trapped to
+  CPU port which won't conform to IEEE Std 802.1Q-2022:
+
+  01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F]
+
+In a Bridge comprising an S-VLAN component:
+
+  Link-local frames with these destination addresses will be trapped to CPU
+  port which won't conform to IEEE Std 802.1Q-2022:
+
+  01-80-C2-00-00-00
+
+  Link-local frames with these destination addresses won't be trapped to
+  CPU port which won't conform to IEEE Std 802.1Q-2022:
+
+  01-80-C2-00-00-[04,05,06,07,08,09,0A]
+
+Currently on this switch intellectual property, if the spanning tree Port
+State of the reception Port is discarding, link-local frames will be
+discarded.
+
+To trap link-local frames regardless of the spanning tree Port State, make
+the switch regard them as Bridge Protocol Data Units (BPDUs). This switch
+intellectual property only lets the frames regarded as BPDUs bypass the
+spanning tree Port State function of the Forwarding Process.
+
+With this change, the only remaining interference is the ingress rules.
+When the reception Port has no PVID assigned on software, VLAN-untagged
+frames won't be allowed in. There doesn't seem to be a mechanism on the
+switch intellectual property to have link-local frames bypass this function
+of the Forwarding Process.
+
+Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 229 +++++++++++++++++++++++++++++++++------
+ drivers/net/dsa/mt7530.h |   5 +
+ 2 files changed, 200 insertions(+), 34 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -943,20 +943,173 @@ static void mt7530_setup_port5(struct ds
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+ 
+-/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std
+- * 802.1Q?-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA
+- * must only be propagated to C-VLAN and MAC Bridge components. That means
+- * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
+- * these frames are supposed to be processed by the CPU (software). So we make
+- * the switch only forward them to the CPU port. And if received from a CPU
+- * port, forward to a single port. The software is responsible of making the
+- * switch conform to the latter by setting a single port as destination port on
+- * the special tag.
+- *
+- * This switch intellectual property cannot conform to this part of the standard
+- * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC
+- * DAs, it also includes :22-FF which the scope of propagation is not supposed
+- * to be restricted for these MAC DAs.
++/* In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer (DLL)
++ * of the Open Systems Interconnection basic reference model (OSI/RM) are
++ * described; the medium access control (MAC) and logical link control (LLC)
++ * sublayers. The MAC sublayer is the one facing the physical layer.
++ *
++ * In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A
++ * Bridge component comprises a MAC Relay Entity for interconnecting the Ports
++ * of the Bridge, at least two Ports, and higher layer entities with at least a
++ * Spanning Tree Protocol Entity included.
++ *
++ * Each Bridge Port also functions as an end station and shall provide the MAC
++ * Service to an LLC Entity. Each instance of the MAC Service is provided to a
++ * distinct LLC Entity that supports protocol identification, multiplexing, and
++ * demultiplexing, for protocol data unit (PDU) transmission and reception by
++ * one or more higher layer entities.
++ *
++ * It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC
++ * Entity associated with each Bridge Port is modeled as being directly
++ * connected to the attached Local Area Network (LAN).
++ *
++ * On the switch with CPU port architecture, CPU port functions as Management
++ * Port, and the Management Port functionality is provided by software which
++ * functions as an end station. Software is connected to an IEEE 802 LAN that is
++ * wholly contained within the system that incorporates the Bridge. Software
++ * provides access to the LLC Entity associated with each Bridge Port by the
++ * value of the source port field on the special tag on the frame received by
++ * software.
++ *
++ * We call frames that carry control information to determine the active
++ * topology and current extent of each Virtual Local Area Network (VLAN), i.e.,
++ * spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN Registration
++ * Protocol Data Units (MVRPDUs), and frames from other link constrained
++ * protocols, such as Extensible Authentication Protocol over LAN (EAPOL) and
++ * Link Layer Discovery Protocol (LLDP), link-local frames. They are not
++ * forwarded by a Bridge. Permanently configured entries in the filtering
++ * database (FDB) ensure that such frames are discarded by the Forwarding
++ * Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in detail:
++ *
++ * Each of the reserved MAC addresses specified in Table 8-1
++ * (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be
++ * permanently configured in the FDB in C-VLAN components and ERs.
++ *
++ * Each of the reserved MAC addresses specified in Table 8-2
++ * (01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently
++ * configured in the FDB in S-VLAN components.
++ *
++ * Each of the reserved MAC addresses specified in Table 8-3
++ * (01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB in
++ * TPMR components.
++ *
++ * The FDB entries for reserved MAC addresses shall specify filtering for all
++ * Bridge Ports and all VIDs. Management shall not provide the capability to
++ * modify or remove entries for reserved MAC addresses.
++ *
++ * The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of
++ * propagation of PDUs within a Bridged Network, as follows:
++ *
++ *   The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that no
++ *   conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN)
++ *   component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward.
++ *   PDUs transmitted using this destination address, or any other addresses
++ *   that appear in Table 8-1, Table 8-2, and Table 8-3
++ *   (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can
++ *   therefore travel no further than those stations that can be reached via a
++ *   single individual LAN from the originating station.
++ *
++ *   The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an
++ *   address that no conformant S-VLAN component, C-VLAN component, or MAC
++ *   Bridge can forward; however, this address is relayed by a TPMR component.
++ *   PDUs using this destination address, or any of the other addresses that
++ *   appear in both Table 8-1 and Table 8-2 but not in Table 8-3
++ *   (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed by
++ *   any TPMRs but will propagate no further than the nearest S-VLAN component,
++ *   C-VLAN component, or MAC Bridge.
++ *
++ *   The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an address
++ *   that no conformant C-VLAN component, MAC Bridge can forward; however, it is
++ *   relayed by TPMR components and S-VLAN components. PDUs using this
++ *   destination address, or any of the other addresses that appear in Table 8-1
++ *   but not in either Table 8-2 or Table 8-3 (01-80-C2-00-00-[00,0B,0C,0D,0F]),
++ *   will be relayed by TPMR components and S-VLAN components but will propagate
++ *   no further than the nearest C-VLAN component or MAC Bridge.
++ *
++ * Because the LLC Entity associated with each Bridge Port is provided via CPU
++ * port, we must not filter these frames but forward them to CPU port.
++ *
++ * In a Bridge, the transmission Port is majorly decided by ingress and egress
++ * rules, FDB, and spanning tree Port State functions of the Forwarding Process.
++ * For link-local frames, only CPU port should be designated as destination port
++ * in the FDB, and the other functions of the Forwarding Process must not
++ * interfere with the decision of the transmission Port. We call this process
++ * trapping frames to CPU port.
++ *
++ * Therefore, on the switch with CPU port architecture, link-local frames must
++ * be trapped to CPU port, and certain link-local frames received by a Port of a
++ * Bridge comprising a TPMR component or an S-VLAN component must be excluded
++ * from it.
++ *
++ * A Bridge of the switch with CPU port architecture cannot comprise a Two-Port
++ * MAC Relay (TPMR) component as a TPMR component supports only a subset of the
++ * functionality of a MAC Bridge. A Bridge comprising two Ports (Management Port
++ * doesn't count) of this architecture will either function as a standard MAC
++ * Bridge or a standard VLAN Bridge.
++ *
++ * Therefore, a Bridge of this architecture can only comprise S-VLAN components,
++ * C-VLAN components, or MAC Bridge components. Since there's no TPMR component,
++ * we don't need to relay PDUs using the destination addresses specified on the
++ * Nearest non-TPMR section, and the proportion of the Nearest Customer Bridge
++ * section where they must be relayed by TPMR components.
++ *
++ * One option to trap link-local frames to CPU port is to add static FDB entries
++ * with CPU port designated as destination port. However, because that
++ * Independent VLAN Learning (IVL) is being used on every VID, each entry only
++ * applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC
++ * Bridge component or a C-VLAN component, there would have to be 16 times 4096
++ * entries. This switch intellectual property can only hold a maximum of 2048
++ * entries. Using this option, there also isn't a mechanism to prevent
++ * link-local frames from being discarded when the spanning tree Port State of
++ * the reception Port is discarding.
++ *
++ * The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4
++ * registers. Whilst this applies to every VID, it doesn't contain all of the
++ * reserved MAC addresses without affecting the remaining Standard Group MAC
++ * Addresses. The REV_UN frame tag utilised using the RGAC4 register covers the
++ * remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination
++ * addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF
++ * destination addresses which may be relayed by MAC Bridges or VLAN Bridges.
++ * The latter option provides better but not complete conformance.
++ *
++ * This switch intellectual property also does not provide a mechanism to trap
++ * link-local frames with specific destination addresses to CPU port by Bridge,
++ * to conform to the filtering rules for the distinct Bridge components.
++ *
++ * Therefore, regardless of the type of the Bridge component, link-local frames
++ * with these destination addresses will be trapped to CPU port:
++ *
++ * 01-80-C2-00-00-[00,01,02,03,0E]
++ *
++ * In a Bridge comprising a MAC Bridge component or a C-VLAN component:
++ *
++ *   Link-local frames with these destination addresses won't be trapped to CPU
++ *   port which won't conform to IEEE Std 802.1Q-2022:
++ *
++ *   01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F]
++ *
++ * In a Bridge comprising an S-VLAN component:
++ *
++ *   Link-local frames with these destination addresses will be trapped to CPU
++ *   port which won't conform to IEEE Std 802.1Q-2022:
++ *
++ *   01-80-C2-00-00-00
++ *
++ *   Link-local frames with these destination addresses won't be trapped to CPU
++ *   port which won't conform to IEEE Std 802.1Q-2022:
++ *
++ *   01-80-C2-00-00-[04,05,06,07,08,09,0A]
++ *
++ * To trap link-local frames to CPU port as conformant as this switch
++ * intellectual property can allow, link-local frames are made to be regarded as
++ * Bridge Protocol Data Units (BPDUs). This is because this switch intellectual
++ * property only lets the frames regarded as BPDUs bypass the spanning tree Port
++ * State function of the Forwarding Process.
++ *
++ * The only remaining interference is the ingress rules. When the reception Port
++ * has no PVID assigned on software, VLAN-untagged frames won't be allowed in.
++ * There doesn't seem to be a mechanism on the switch intellectual property to
++ * have link-local frames bypass this function of the Forwarding Process.
+  */
+ static void
+ mt753x_trap_frames(struct mt7530_priv *priv)
+@@ -964,35 +1117,43 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 	/* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them
+ 	 * VLAN-untagged.
+ 	 */
+-	mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK |
+-		   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
+-		   MT753X_BPDU_PORT_FW_MASK,
+-		   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-		   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_BPDU_CPU_ONLY);
++	mt7530_rmw(priv, MT753X_BPC,
++		   MT753X_PAE_BPDU_FR | MT753X_PAE_EG_TAG_MASK |
++			   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
++			   MT753X_BPDU_PORT_FW_MASK,
++		   MT753X_PAE_BPDU_FR |
++			   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++			   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_BPDU_CPU_ONLY);
+ 
+ 	/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress
+ 	 * them VLAN-untagged.
+ 	 */
+-	mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK |
+-		   MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK |
+-		   MT753X_R01_PORT_FW_MASK,
+-		   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-		   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_BPDU_CPU_ONLY);
++	mt7530_rmw(priv, MT753X_RGAC1,
++		   MT753X_R02_BPDU_FR | MT753X_R02_EG_TAG_MASK |
++			   MT753X_R02_PORT_FW_MASK | MT753X_R01_BPDU_FR |
++			   MT753X_R01_EG_TAG_MASK | MT753X_R01_PORT_FW_MASK,
++		   MT753X_R02_BPDU_FR |
++			   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++			   MT753X_R01_BPDU_FR |
++			   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_BPDU_CPU_ONLY);
+ 
+ 	/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress
+ 	 * them VLAN-untagged.
+ 	 */
+-	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK |
+-		   MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK |
+-		   MT753X_R03_PORT_FW_MASK,
+-		   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-		   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_BPDU_CPU_ONLY);
++	mt7530_rmw(priv, MT753X_RGAC2,
++		   MT753X_R0E_BPDU_FR | MT753X_R0E_EG_TAG_MASK |
++			   MT753X_R0E_PORT_FW_MASK | MT753X_R03_BPDU_FR |
++			   MT753X_R03_EG_TAG_MASK | MT753X_R03_PORT_FW_MASK,
++		   MT753X_R0E_BPDU_FR |
++			   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++			   MT753X_R03_BPDU_FR |
++			   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_BPDU_CPU_ONLY);
+ }
+ 
+ static void
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -65,6 +65,7 @@ enum mt753x_id {
+ 
+ /* Registers for BPDU and PAE frame control*/
+ #define MT753X_BPC			0x24
++#define  MT753X_PAE_BPDU_FR		BIT(25)
+ #define  MT753X_PAE_EG_TAG_MASK		GENMASK(24, 22)
+ #define  MT753X_PAE_EG_TAG(x)		FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x)
+ #define  MT753X_PAE_PORT_FW_MASK	GENMASK(18, 16)
+@@ -75,20 +76,24 @@ enum mt753x_id {
+ 
+ /* Register for :01 and :02 MAC DA frame control */
+ #define MT753X_RGAC1			0x28
++#define  MT753X_R02_BPDU_FR		BIT(25)
+ #define  MT753X_R02_EG_TAG_MASK		GENMASK(24, 22)
+ #define  MT753X_R02_EG_TAG(x)		FIELD_PREP(MT753X_R02_EG_TAG_MASK, x)
+ #define  MT753X_R02_PORT_FW_MASK	GENMASK(18, 16)
+ #define  MT753X_R02_PORT_FW(x)		FIELD_PREP(MT753X_R02_PORT_FW_MASK, x)
++#define  MT753X_R01_BPDU_FR		BIT(9)
+ #define  MT753X_R01_EG_TAG_MASK		GENMASK(8, 6)
+ #define  MT753X_R01_EG_TAG(x)		FIELD_PREP(MT753X_R01_EG_TAG_MASK, x)
+ #define  MT753X_R01_PORT_FW_MASK	GENMASK(2, 0)
+ 
+ /* Register for :03 and :0E MAC DA frame control */
+ #define MT753X_RGAC2			0x2c
++#define  MT753X_R0E_BPDU_FR		BIT(25)
+ #define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
+ #define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
+ #define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
+ #define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
++#define  MT753X_R03_BPDU_FR		BIT(9)
+ #define  MT753X_R03_EG_TAG_MASK		GENMASK(8, 6)
+ #define  MT753X_R03_EG_TAG(x)		FIELD_PREP(MT753X_R03_EG_TAG_MASK, x)
+ #define  MT753X_R03_PORT_FW_MASK	GENMASK(2, 0)
diff --git a/target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch b/target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
new file mode 100644
index 0000000000..17f03b48a4
--- /dev/null
+++ b/target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
@@ -0,0 +1,92 @@
+From ef972fc9f5743da589ce9546dd565d6c56e679b8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 8 Apr 2024 10:08:53 +0300
+Subject: [PATCH 1/2] net: dsa: mt7530: fix enabling EEE on MT7531 switch on
+ all boards
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The commit 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
+brought EEE support but did not enable EEE on MT7531 switch MACs. EEE is
+enabled on MT7531 switch MACs by pulling the LAN2LED0 pin low on the board
+(bootstrapping), unsetting the EEE_DIS bit on the trap register, or setting
+the internal EEE switch bit on the CORE_PLL_GROUP4 register. Thanks to
+SkyLake Huang (???) from MediaTek for providing information on the
+internal EEE switch bit.
+
+There are existing boards that were not designed to pull the pin low.
+Because of that, the EEE status currently depends on the board design.
+
+The EEE_DIS bit on the trap pertains to the LAN2LED0 pin which is usually
+used to control an LED. Once the bit is unset, the pin will be low. That
+will make the active low LED turn on. The pin is controlled by the switch
+PHY. It seems that the PHY controls the pin in the way that it inverts the
+pin state. That means depending on the wiring of the LED connected to
+LAN2LED0 on the board, the LED may be on without an active link.
+
+To not cause this unwanted behaviour whilst enabling EEE on all boards, set
+the internal EEE switch bit on the CORE_PLL_GROUP4 register.
+
+My testing on MT7531 shows a certain amount of traffic loss when EEE is
+enabled. That said, I haven't come across a board that enables EEE. So
+enable EEE on the switch MACs but disable EEE advertisement on the switch
+PHYs. This way, we don't change the behaviour of the majority of the boards
+that have this switch. The mediatek-ge PHY driver already disables EEE
+advertisement on the switch PHYs but my testing shows that it is somehow
+enabled afterwards. Disabling EEE advertisement before the PHY driver
+initialises keeps it off.
+
+With this change, EEE can now be enabled using ethtool.
+
+Fixes: 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 17 ++++++++++++-----
+ drivers/net/dsa/mt7530.h |  1 +
+ 2 files changed, 13 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2505,18 +2505,25 @@ mt7531_setup(struct dsa_switch *ds)
+ 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
+ 		   MT7531_GPIO0_INTERRUPT);
+ 
+-	/* Enable PHY core PLL, since phy_device has not yet been created
+-	 * provided for phy_[read,write]_mmd_indirect is called, we provide
+-	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
+-	 * function.
++	/* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since
++	 * phy_device has not yet been created provided for
++	 * phy_[read,write]_mmd_indirect is called, we provide our own
++	 * mt7531_ind_mmd_phy_[read,write] to complete this function.
+ 	 */
+ 	val = mt7531_ind_c45_phy_read(priv, MT753X_CTRL_PHY_ADDR,
+ 				      MDIO_MMD_VEND2, CORE_PLL_GROUP4);
+-	val |= MT7531_PHY_PLL_BYPASS_MODE;
++	val |= MT7531_RG_SYSPLL_DMY2 | MT7531_PHY_PLL_BYPASS_MODE;
+ 	val &= ~MT7531_PHY_PLL_OFF;
+ 	mt7531_ind_c45_phy_write(priv, MT753X_CTRL_PHY_ADDR, MDIO_MMD_VEND2,
+ 				 CORE_PLL_GROUP4, val);
+ 
++	/* Disable EEE advertisement on the switch PHYs. */
++	for (i = MT753X_CTRL_PHY_ADDR;
++	     i < MT753X_CTRL_PHY_ADDR + MT7530_NUM_PHYS; i++) {
++		mt7531_ind_c45_phy_write(priv, i, MDIO_MMD_AN, MDIO_AN_EEE_ADV,
++					 0);
++	}
++
+ 	mt7531_setup_common(ds);
+ 
+ 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -616,6 +616,7 @@ enum mt7531_clk_skew {
+ #define  RG_SYSPLL_DDSFBK_EN		BIT(12)
+ #define  RG_SYSPLL_BIAS_EN		BIT(11)
+ #define  RG_SYSPLL_BIAS_LPF_EN		BIT(10)
++#define  MT7531_RG_SYSPLL_DMY2		BIT(6)
+ #define  MT7531_PHY_PLL_OFF		BIT(5)
+ #define  MT7531_PHY_PLL_BYPASS_MODE	BIT(4)
+ 
diff --git a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
new file mode 100644
index 0000000000..d88060896b
--- /dev/null
+++ b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
@@ -0,0 +1,483 @@
+From b7427d66cb3d6dca5165de5f7d80d59f08c2795b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 9 Apr 2024 18:01:14 +0300
+Subject: [PATCH 2/2] net: dsa: mt7530: trap link-local frames regardless of ST
+ Port State
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer
+(DLL) of the Open Systems Interconnection basic reference model (OSI/RM)
+are described; the medium access control (MAC) and logical link control
+(LLC) sublayers. The MAC sublayer is the one facing the physical layer.
+
+In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A
+Bridge component comprises a MAC Relay Entity for interconnecting the Ports
+of the Bridge, at least two Ports, and higher layer entities with at least
+a Spanning Tree Protocol Entity included.
+
+Each Bridge Port also functions as an end station and shall provide the MAC
+Service to an LLC Entity. Each instance of the MAC Service is provided to a
+distinct LLC Entity that supports protocol identification, multiplexing,
+and demultiplexing, for protocol data unit (PDU) transmission and reception
+by one or more higher layer entities.
+
+It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC
+Entity associated with each Bridge Port is modeled as being directly
+connected to the attached Local Area Network (LAN).
+
+On the switch with CPU port architecture, CPU port functions as Management
+Port, and the Management Port functionality is provided by software which
+functions as an end station. Software is connected to an IEEE 802 LAN that
+is wholly contained within the system that incorporates the Bridge.
+Software provides access to the LLC Entity associated with each Bridge Port
+by the value of the source port field on the special tag on the frame
+received by software.
+
+We call frames that carry control information to determine the active
+topology and current extent of each Virtual Local Area Network (VLAN),
+i.e., spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN
+Registration Protocol Data Units (MVRPDUs), and frames from other link
+constrained protocols, such as Extensible Authentication Protocol over LAN
+(EAPOL) and Link Layer Discovery Protocol (LLDP), link-local frames. They
+are not forwarded by a Bridge. Permanently configured entries in the
+filtering database (FDB) ensure that such frames are discarded by the
+Forwarding Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in
+detail:
+
+Each of the reserved MAC addresses specified in Table 8-1
+(01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be
+permanently configured in the FDB in C-VLAN components and ERs.
+
+Each of the reserved MAC addresses specified in Table 8-2
+(01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently
+configured in the FDB in S-VLAN components.
+
+Each of the reserved MAC addresses specified in Table 8-3
+(01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB
+in TPMR components.
+
+The FDB entries for reserved MAC addresses shall specify filtering for all
+Bridge Ports and all VIDs. Management shall not provide the capability to
+modify or remove entries for reserved MAC addresses.
+
+The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of
+propagation of PDUs within a Bridged Network, as follows:
+
+  The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that
+  no conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN)
+  component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward.
+  PDUs transmitted using this destination address, or any other addresses
+  that appear in Table 8-1, Table 8-2, and Table 8-3
+  (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can
+  therefore travel no further than those stations that can be reached via a
+  single individual LAN from the originating station.
+
+  The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an
+  address that no conformant S-VLAN component, C-VLAN component, or MAC
+  Bridge can forward; however, this address is relayed by a TPMR component.
+  PDUs using this destination address, or any of the other addresses that
+  appear in both Table 8-1 and Table 8-2 but not in Table 8-3
+  (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed
+  by any TPMRs but will propagate no further than the nearest S-VLAN
+  component, C-VLAN component, or MAC Bridge.
+
+  The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an
+  address that no conformant C-VLAN component, MAC Bridge can forward;
+  however, it is relayed by TPMR components and S-VLAN components. PDUs
+  using this destination address, or any of the other addresses that appear
+  in Table 8-1 but not in either Table 8-2 or Table 8-3
+  (01-80-C2-00-00-[00,0B,0C,0D,0F]), will be relayed by TPMR components and
+  S-VLAN components but will propagate no further than the nearest C-VLAN
+  component or MAC Bridge.
+
+Because the LLC Entity associated with each Bridge Port is provided via CPU
+port, we must not filter these frames but forward them to CPU port.
+
+In a Bridge, the transmission Port is majorly decided by ingress and egress
+rules, FDB, and spanning tree Port State functions of the Forwarding
+Process. For link-local frames, only CPU port should be designated as
+destination port in the FDB, and the other functions of the Forwarding
+Process must not interfere with the decision of the transmission Port. We
+call this process trapping frames to CPU port.
+
+Therefore, on the switch with CPU port architecture, link-local frames must
+be trapped to CPU port, and certain link-local frames received by a Port of
+a Bridge comprising a TPMR component or an S-VLAN component must be
+excluded from it.
+
+A Bridge of the switch with CPU port architecture cannot comprise a
+Two-Port MAC Relay (TPMR) component as a TPMR component supports only a
+subset of the functionality of a MAC Bridge. A Bridge comprising two Ports
+(Management Port doesn't count) of this architecture will either function
+as a standard MAC Bridge or a standard VLAN Bridge.
+
+Therefore, a Bridge of this architecture can only comprise S-VLAN
+components, C-VLAN components, or MAC Bridge components. Since there's no
+TPMR component, we don't need to relay PDUs using the destination addresses
+specified on the Nearest non-TPMR section, and the proportion of the
+Nearest Customer Bridge section where they must be relayed by TPMR
+components.
+
+One option to trap link-local frames to CPU port is to add static FDB
+entries with CPU port designated as destination port. However, because that
+Independent VLAN Learning (IVL) is being used on every VID, each entry only
+applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC
+Bridge component or a C-VLAN component, there would have to be 16 times
+4096 entries. This switch intellectual property can only hold a maximum of
+2048 entries. Using this option, there also isn't a mechanism to prevent
+link-local frames from being discarded when the spanning tree Port State of
+the reception Port is discarding.
+
+The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4
+registers. Whilst this applies to every VID, it doesn't contain all of the
+reserved MAC addresses without affecting the remaining Standard Group MAC
+Addresses. The REV_UN frame tag utilised using the RGAC4 register covers
+the remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination
+addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF
+destination addresses which may be relayed by MAC Bridges or VLAN Bridges.
+The latter option provides better but not complete conformance.
+
+This switch intellectual property also does not provide a mechanism to trap
+link-local frames with specific destination addresses to CPU port by
+Bridge, to conform to the filtering rules for the distinct Bridge
+components.
+
+Therefore, regardless of the type of the Bridge component, link-local
+frames with these destination addresses will be trapped to CPU port:
+
+01-80-C2-00-00-[00,01,02,03,0E]
+
+In a Bridge comprising a MAC Bridge component or a C-VLAN component:
+
+  Link-local frames with these destination addresses won't be trapped to
+  CPU port which won't conform to IEEE Std 802.1Q-2022:
+
+  01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F]
+
+In a Bridge comprising an S-VLAN component:
+
+  Link-local frames with these destination addresses will be trapped to CPU
+  port which won't conform to IEEE Std 802.1Q-2022:
+
+  01-80-C2-00-00-00
+
+  Link-local frames with these destination addresses won't be trapped to
+  CPU port which won't conform to IEEE Std 802.1Q-2022:
+
+  01-80-C2-00-00-[04,05,06,07,08,09,0A]
+
+Currently on this switch intellectual property, if the spanning tree Port
+State of the reception Port is discarding, link-local frames will be
+discarded.
+
+To trap link-local frames regardless of the spanning tree Port State, make
+the switch regard them as Bridge Protocol Data Units (BPDUs). This switch
+intellectual property only lets the frames regarded as BPDUs bypass the
+spanning tree Port State function of the Forwarding Process.
+
+With this change, the only remaining interference is the ingress rules.
+When the reception Port has no PVID assigned on software, VLAN-untagged
+frames won't be allowed in. There doesn't seem to be a mechanism on the
+switch intellectual property to have link-local frames bypass this function
+of the Forwarding Process.
+
+Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 229 +++++++++++++++++++++++++++++++++------
+ drivers/net/dsa/mt7530.h |   5 +
+ 2 files changed, 200 insertions(+), 34 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -950,20 +950,173 @@ static void mt7530_setup_port5(struct ds
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+ 
+-/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std
+- * 802.1Q?-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA
+- * must only be propagated to C-VLAN and MAC Bridge components. That means
+- * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
+- * these frames are supposed to be processed by the CPU (software). So we make
+- * the switch only forward them to the CPU port. And if received from a CPU
+- * port, forward to a single port. The software is responsible of making the
+- * switch conform to the latter by setting a single port as destination port on
+- * the special tag.
+- *
+- * This switch intellectual property cannot conform to this part of the standard
+- * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC
+- * DAs, it also includes :22-FF which the scope of propagation is not supposed
+- * to be restricted for these MAC DAs.
++/* In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer (DLL)
++ * of the Open Systems Interconnection basic reference model (OSI/RM) are
++ * described; the medium access control (MAC) and logical link control (LLC)
++ * sublayers. The MAC sublayer is the one facing the physical layer.
++ *
++ * In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A
++ * Bridge component comprises a MAC Relay Entity for interconnecting the Ports
++ * of the Bridge, at least two Ports, and higher layer entities with at least a
++ * Spanning Tree Protocol Entity included.
++ *
++ * Each Bridge Port also functions as an end station and shall provide the MAC
++ * Service to an LLC Entity. Each instance of the MAC Service is provided to a
++ * distinct LLC Entity that supports protocol identification, multiplexing, and
++ * demultiplexing, for protocol data unit (PDU) transmission and reception by
++ * one or more higher layer entities.
++ *
++ * It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC
++ * Entity associated with each Bridge Port is modeled as being directly
++ * connected to the attached Local Area Network (LAN).
++ *
++ * On the switch with CPU port architecture, CPU port functions as Management
++ * Port, and the Management Port functionality is provided by software which
++ * functions as an end station. Software is connected to an IEEE 802 LAN that is
++ * wholly contained within the system that incorporates the Bridge. Software
++ * provides access to the LLC Entity associated with each Bridge Port by the
++ * value of the source port field on the special tag on the frame received by
++ * software.
++ *
++ * We call frames that carry control information to determine the active
++ * topology and current extent of each Virtual Local Area Network (VLAN), i.e.,
++ * spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN Registration
++ * Protocol Data Units (MVRPDUs), and frames from other link constrained
++ * protocols, such as Extensible Authentication Protocol over LAN (EAPOL) and
++ * Link Layer Discovery Protocol (LLDP), link-local frames. They are not
++ * forwarded by a Bridge. Permanently configured entries in the filtering
++ * database (FDB) ensure that such frames are discarded by the Forwarding
++ * Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in detail:
++ *
++ * Each of the reserved MAC addresses specified in Table 8-1
++ * (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be
++ * permanently configured in the FDB in C-VLAN components and ERs.
++ *
++ * Each of the reserved MAC addresses specified in Table 8-2
++ * (01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently
++ * configured in the FDB in S-VLAN components.
++ *
++ * Each of the reserved MAC addresses specified in Table 8-3
++ * (01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB in
++ * TPMR components.
++ *
++ * The FDB entries for reserved MAC addresses shall specify filtering for all
++ * Bridge Ports and all VIDs. Management shall not provide the capability to
++ * modify or remove entries for reserved MAC addresses.
++ *
++ * The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of
++ * propagation of PDUs within a Bridged Network, as follows:
++ *
++ *   The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that no
++ *   conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN)
++ *   component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward.
++ *   PDUs transmitted using this destination address, or any other addresses
++ *   that appear in Table 8-1, Table 8-2, and Table 8-3
++ *   (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can
++ *   therefore travel no further than those stations that can be reached via a
++ *   single individual LAN from the originating station.
++ *
++ *   The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an
++ *   address that no conformant S-VLAN component, C-VLAN component, or MAC
++ *   Bridge can forward; however, this address is relayed by a TPMR component.
++ *   PDUs using this destination address, or any of the other addresses that
++ *   appear in both Table 8-1 and Table 8-2 but not in Table 8-3
++ *   (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed by
++ *   any TPMRs but will propagate no further than the nearest S-VLAN component,
++ *   C-VLAN component, or MAC Bridge.
++ *
++ *   The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an address
++ *   that no conformant C-VLAN component, MAC Bridge can forward; however, it is
++ *   relayed by TPMR components and S-VLAN components. PDUs using this
++ *   destination address, or any of the other addresses that appear in Table 8-1
++ *   but not in either Table 8-2 or Table 8-3 (01-80-C2-00-00-[00,0B,0C,0D,0F]),
++ *   will be relayed by TPMR components and S-VLAN components but will propagate
++ *   no further than the nearest C-VLAN component or MAC Bridge.
++ *
++ * Because the LLC Entity associated with each Bridge Port is provided via CPU
++ * port, we must not filter these frames but forward them to CPU port.
++ *
++ * In a Bridge, the transmission Port is majorly decided by ingress and egress
++ * rules, FDB, and spanning tree Port State functions of the Forwarding Process.
++ * For link-local frames, only CPU port should be designated as destination port
++ * in the FDB, and the other functions of the Forwarding Process must not
++ * interfere with the decision of the transmission Port. We call this process
++ * trapping frames to CPU port.
++ *
++ * Therefore, on the switch with CPU port architecture, link-local frames must
++ * be trapped to CPU port, and certain link-local frames received by a Port of a
++ * Bridge comprising a TPMR component or an S-VLAN component must be excluded
++ * from it.
++ *
++ * A Bridge of the switch with CPU port architecture cannot comprise a Two-Port
++ * MAC Relay (TPMR) component as a TPMR component supports only a subset of the
++ * functionality of a MAC Bridge. A Bridge comprising two Ports (Management Port
++ * doesn't count) of this architecture will either function as a standard MAC
++ * Bridge or a standard VLAN Bridge.
++ *
++ * Therefore, a Bridge of this architecture can only comprise S-VLAN components,
++ * C-VLAN components, or MAC Bridge components. Since there's no TPMR component,
++ * we don't need to relay PDUs using the destination addresses specified on the
++ * Nearest non-TPMR section, and the proportion of the Nearest Customer Bridge
++ * section where they must be relayed by TPMR components.
++ *
++ * One option to trap link-local frames to CPU port is to add static FDB entries
++ * with CPU port designated as destination port. However, because that
++ * Independent VLAN Learning (IVL) is being used on every VID, each entry only
++ * applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC
++ * Bridge component or a C-VLAN component, there would have to be 16 times 4096
++ * entries. This switch intellectual property can only hold a maximum of 2048
++ * entries. Using this option, there also isn't a mechanism to prevent
++ * link-local frames from being discarded when the spanning tree Port State of
++ * the reception Port is discarding.
++ *
++ * The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4
++ * registers. Whilst this applies to every VID, it doesn't contain all of the
++ * reserved MAC addresses without affecting the remaining Standard Group MAC
++ * Addresses. The REV_UN frame tag utilised using the RGAC4 register covers the
++ * remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination
++ * addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF
++ * destination addresses which may be relayed by MAC Bridges or VLAN Bridges.
++ * The latter option provides better but not complete conformance.
++ *
++ * This switch intellectual property also does not provide a mechanism to trap
++ * link-local frames with specific destination addresses to CPU port by Bridge,
++ * to conform to the filtering rules for the distinct Bridge components.
++ *
++ * Therefore, regardless of the type of the Bridge component, link-local frames
++ * with these destination addresses will be trapped to CPU port:
++ *
++ * 01-80-C2-00-00-[00,01,02,03,0E]
++ *
++ * In a Bridge comprising a MAC Bridge component or a C-VLAN component:
++ *
++ *   Link-local frames with these destination addresses won't be trapped to CPU
++ *   port which won't conform to IEEE Std 802.1Q-2022:
++ *
++ *   01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F]
++ *
++ * In a Bridge comprising an S-VLAN component:
++ *
++ *   Link-local frames with these destination addresses will be trapped to CPU
++ *   port which won't conform to IEEE Std 802.1Q-2022:
++ *
++ *   01-80-C2-00-00-00
++ *
++ *   Link-local frames with these destination addresses won't be trapped to CPU
++ *   port which won't conform to IEEE Std 802.1Q-2022:
++ *
++ *   01-80-C2-00-00-[04,05,06,07,08,09,0A]
++ *
++ * To trap link-local frames to CPU port as conformant as this switch
++ * intellectual property can allow, link-local frames are made to be regarded as
++ * Bridge Protocol Data Units (BPDUs). This is because this switch intellectual
++ * property only lets the frames regarded as BPDUs bypass the spanning tree Port
++ * State function of the Forwarding Process.
++ *
++ * The only remaining interference is the ingress rules. When the reception Port
++ * has no PVID assigned on software, VLAN-untagged frames won't be allowed in.
++ * There doesn't seem to be a mechanism on the switch intellectual property to
++ * have link-local frames bypass this function of the Forwarding Process.
+  */
+ static void
+ mt753x_trap_frames(struct mt7530_priv *priv)
+@@ -971,35 +1124,43 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 	/* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them
+ 	 * VLAN-untagged.
+ 	 */
+-	mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK |
+-		   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
+-		   MT753X_BPDU_PORT_FW_MASK,
+-		   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-		   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_BPDU_CPU_ONLY);
++	mt7530_rmw(priv, MT753X_BPC,
++		   MT753X_PAE_BPDU_FR | MT753X_PAE_EG_TAG_MASK |
++			   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
++			   MT753X_BPDU_PORT_FW_MASK,
++		   MT753X_PAE_BPDU_FR |
++			   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++			   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_BPDU_CPU_ONLY);
+ 
+ 	/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress
+ 	 * them VLAN-untagged.
+ 	 */
+-	mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK |
+-		   MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK |
+-		   MT753X_R01_PORT_FW_MASK,
+-		   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-		   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_BPDU_CPU_ONLY);
++	mt7530_rmw(priv, MT753X_RGAC1,
++		   MT753X_R02_BPDU_FR | MT753X_R02_EG_TAG_MASK |
++			   MT753X_R02_PORT_FW_MASK | MT753X_R01_BPDU_FR |
++			   MT753X_R01_EG_TAG_MASK | MT753X_R01_PORT_FW_MASK,
++		   MT753X_R02_BPDU_FR |
++			   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++			   MT753X_R01_BPDU_FR |
++			   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_BPDU_CPU_ONLY);
+ 
+ 	/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress
+ 	 * them VLAN-untagged.
+ 	 */
+-	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK |
+-		   MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK |
+-		   MT753X_R03_PORT_FW_MASK,
+-		   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-		   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_BPDU_CPU_ONLY);
++	mt7530_rmw(priv, MT753X_RGAC2,
++		   MT753X_R0E_BPDU_FR | MT753X_R0E_EG_TAG_MASK |
++			   MT753X_R0E_PORT_FW_MASK | MT753X_R03_BPDU_FR |
++			   MT753X_R03_EG_TAG_MASK | MT753X_R03_PORT_FW_MASK,
++		   MT753X_R0E_BPDU_FR |
++			   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++			   MT753X_R03_BPDU_FR |
++			   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   MT753X_BPDU_CPU_ONLY);
+ }
+ 
+ static void
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -65,6 +65,7 @@ enum mt753x_id {
+ 
+ /* Registers for BPDU and PAE frame control*/
+ #define MT753X_BPC			0x24
++#define  MT753X_PAE_BPDU_FR		BIT(25)
+ #define  MT753X_PAE_EG_TAG_MASK		GENMASK(24, 22)
+ #define  MT753X_PAE_EG_TAG(x)		FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x)
+ #define  MT753X_PAE_PORT_FW_MASK	GENMASK(18, 16)
+@@ -75,20 +76,24 @@ enum mt753x_id {
+ 
+ /* Register for :01 and :02 MAC DA frame control */
+ #define MT753X_RGAC1			0x28
++#define  MT753X_R02_BPDU_FR		BIT(25)
+ #define  MT753X_R02_EG_TAG_MASK		GENMASK(24, 22)
+ #define  MT753X_R02_EG_TAG(x)		FIELD_PREP(MT753X_R02_EG_TAG_MASK, x)
+ #define  MT753X_R02_PORT_FW_MASK	GENMASK(18, 16)
+ #define  MT753X_R02_PORT_FW(x)		FIELD_PREP(MT753X_R02_PORT_FW_MASK, x)
++#define  MT753X_R01_BPDU_FR		BIT(9)
+ #define  MT753X_R01_EG_TAG_MASK		GENMASK(8, 6)
+ #define  MT753X_R01_EG_TAG(x)		FIELD_PREP(MT753X_R01_EG_TAG_MASK, x)
+ #define  MT753X_R01_PORT_FW_MASK	GENMASK(2, 0)
+ 
+ /* Register for :03 and :0E MAC DA frame control */
+ #define MT753X_RGAC2			0x2c
++#define  MT753X_R0E_BPDU_FR		BIT(25)
+ #define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
+ #define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
+ #define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
+ #define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
++#define  MT753X_R03_BPDU_FR		BIT(9)
+ #define  MT753X_R03_EG_TAG_MASK		GENMASK(8, 6)
+ #define  MT753X_R03_EG_TAG(x)		FIELD_PREP(MT753X_R03_EG_TAG_MASK, x)
+ #define  MT753X_R03_PORT_FW_MASK	GENMASK(2, 0)



From lede-commits at lists.infradead.org  Wed Apr 10 11:16:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 10 Apr 2024 14:16:53 -0400
Subject: [openwrt/openwrt]  generic: 6.6: sync mt7530 DSA driver with upstream
In-Reply-To: <171277301268.2136345.15486158673926487330@git-01.infra.openwrt.org>
References: <171277301268.2136345.15486158673926487330@git-01.infra.openwrt.org>
Message-ID: <mailman.25743.1712773028.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4354b34f6fc5a36842112191732dadd9a2f4bea4

commit 4354b34f6fc5a36842112191732dadd9a2f4bea4
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Apr 10 15:14:32 2024 +0100

    generic: 6.6: sync mt7530 DSA driver with upstream
    
    Backport lots upstream changes, many of them fixes, for the mt7530 DSA
    driver, similar to how it was done for Linux 6.1 in the previous commit.
    
    The remaining differences compared to the upstream driver are only
    the 'slave' -> 'user', 'master' -> 'conduit' language change in DSA
    and the rename of 'struct ethtool_eee' to 'struct ethtool_keee' as
    well as tree-wide replacement of ethtool_sprintf with ethtool_puts,
    all of them do not have any functional impact.
    
    Apart from some minor bug fixes and style improvements the switch
    should now behave more conformant when it comes to link-local frames,
    and we will again be able to cleanly pick patches from upstream.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...530-Convert-to-platform-remove-callback-r.patch |  58 ++++
 ...-mt753x-remove-mt753x_phylink_pcs_link_up.patch |  51 ++++
 ...530-replace-deprecated-strncpy-with-ethto.patch |  40 +++
 ...530-support-OF-based-registration-of-swit.patch | 116 ++++++++
 ...530-always-trap-frames-to-active-CPU-port.patch | 125 +++++++++
 ...530-use-p5_interface_select-as-data-type-.patch |  45 +++
 ...530-store-port-5-SGMII-capability-of-MT75.patch | 227 +++++++++++++++
 ...530-improve-comments-regarding-switch-por.patch | 133 +++++++++
 ...530-improve-code-path-for-setting-up-port.patch |  95 +++++++
 ...530-do-not-set-priv-p5_interface-on-mt753.patch |  42 +++
 ...530-do-not-run-mt7530_setup_port5-if-port.patch |  62 +++++
 ...530-empty-default-case-on-mt7530_setup_po.patch |  58 ++++
 ...sa-mt7530-move-XTAL-check-to-mt7530_setup.patch |  53 ++++
 ...-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch | 146 ++++++++++
 ...530-call-port-6-setup-from-mt7530_mac_con.patch |  97 +++++++
 ...-mt7530-remove-pad_setup-function-pointer.patch | 148 ++++++++++
 ...t7530-correct-port-capabilities-of-MT7988.patch |  36 +++
 ...530-do-not-clear-config-supported_interfa.patch |  38 +++
 ...530-remove-.mac_port_config-for-MT7988-an.patch |  81 ++++++
 ...530-set-interrupt-register-only-for-MT753.patch |  31 +++
 ...530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch |  41 +++
 ...530-get-rid-of-useless-error-returns-on-p.patch | 217 +++++++++++++++
 ...7530-get-rid-of-priv-info-cpu_port_config.patch | 305 +++++++++++++++++++++
 ...t-dsa-mt7530-get-rid-of-mt753x_mac_config.patch |  48 ++++
 ...530-put-initialising-PCS-devices-code-bac.patch |  57 ++++
 ...530-sort-link-settings-ops-and-force-link.patch |  68 +++++
 ...9-net-dsa-mt7530-simplify-link-operations.patch |  83 ++++++
 ...-net-dsa-mt7530-disable-LEDs-before-reset.patch |  94 +++++++
 ...530-fix-improper-frames-on-all-25MHz-and-.patch |  74 +++++
 ...530-prevent-possible-incorrect-XTAL-frequ.patch | 154 +++++++++++
 ...ensure-all-MACs-are-powered-down-before-r.patch |  28 --
 ...30-register-OF-node-for-internal-MDIO-bus.patch |  43 ---
 32 files changed, 2823 insertions(+), 71 deletions(-)

diff --git a/target/linux/generic/backport-6.6/790-01-v6.7-net-dsa-mt7530-Convert-to-platform-remove-callback-r.patch b/target/linux/generic/backport-6.6/790-01-v6.7-net-dsa-mt7530-Convert-to-platform-remove-callback-r.patch
new file mode 100644
index 0000000000..95c6957596
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-01-v6.7-net-dsa-mt7530-Convert-to-platform-remove-callback-r.patch
@@ -0,0 +1,58 @@
+From b91ef50f70e7c092c50c1b92e63ef3fb0041cdd4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig at pengutronix.de>
+Date: Mon, 18 Sep 2023 21:19:12 +0200
+Subject: [PATCH 01/30] net: dsa: mt7530: Convert to platform remove callback
+ returning void
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The .remove() callback for a platform driver returns an int which makes
+many driver authors wrongly assume it's possible to do error handling by
+returning an error code. However the value returned is ignored (apart
+from emitting a warning) and this typically results in resource leaks.
+To improve here there is a quest to make the remove callback return
+void. In the first step of this quest all drivers are converted to
+.remove_new() which already returns void. Eventually after all drivers
+are converted, .remove_new() is renamed to .remove().
+
+Trivially convert this driver from always returning zero in the remove
+callback to the void returning variant.
+
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mt7530-mmio.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/dsa/mt7530-mmio.c
++++ b/drivers/net/dsa/mt7530-mmio.c
+@@ -63,15 +63,12 @@ mt7988_probe(struct platform_device *pde
+ 	return dsa_register_switch(priv->ds);
+ }
+ 
+-static int
+-mt7988_remove(struct platform_device *pdev)
++static void mt7988_remove(struct platform_device *pdev)
+ {
+ 	struct mt7530_priv *priv = platform_get_drvdata(pdev);
+ 
+ 	if (priv)
+ 		mt7530_remove_common(priv);
+-
+-	return 0;
+ }
+ 
+ static void mt7988_shutdown(struct platform_device *pdev)
+@@ -88,7 +85,7 @@ static void mt7988_shutdown(struct platf
+ 
+ static struct platform_driver mt7988_platform_driver = {
+ 	.probe  = mt7988_probe,
+-	.remove = mt7988_remove,
++	.remove_new = mt7988_remove,
+ 	.shutdown = mt7988_shutdown,
+ 	.driver = {
+ 		.name = "mt7530-mmio",
diff --git a/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch b/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
new file mode 100644
index 0000000000..9f0937b810
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
@@ -0,0 +1,51 @@
+From d22c85764665af931c5c61bbe282b4116a88e792 Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Wed, 27 Sep 2023 13:13:56 +0100
+Subject: [PATCH 02/30] net: dsa: mt753x: remove mt753x_phylink_pcs_link_up()
+
+Remove the mt753x_phylink_pcs_link_up() function for two reasons:
+
+1) priv->pcs[i].pcs.neg_mode is set true, meaning it doesn't take a
+   MLO_AN_FIXED anymore, but one of PHYLINK_PCS_NEG_*. However, this
+   is inconsequential due to...
+2) priv->pcs[port].pcs.ops is always initialised to point at
+   mt7530_pcs_ops, which does not have a pcs_link_up() member.
+
+So, let's remove mt753x_phylink_pcs_link_up() entirely.
+
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Link: https://lore.kernel.org/r/E1qlTQS-008BWe-Va at rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2860,15 +2860,6 @@ static void mt753x_phylink_mac_link_down
+ 	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
+ }
+ 
+-static void mt753x_phylink_pcs_link_up(struct phylink_pcs *pcs,
+-				       unsigned int mode,
+-				       phy_interface_t interface,
+-				       int speed, int duplex)
+-{
+-	if (pcs->ops->pcs_link_up)
+-		pcs->ops->pcs_link_up(pcs, mode, interface, speed, duplex);
+-}
+-
+ static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
+ 				       unsigned int mode,
+ 				       phy_interface_t interface,
+@@ -2956,8 +2947,6 @@ mt7531_cpu_port_config(struct dsa_switch
+ 		return ret;
+ 	mt7530_write(priv, MT7530_PMCR_P(port),
+ 		     PMCR_CPU_PORT_SETTING(priv->id));
+-	mt753x_phylink_pcs_link_up(&priv->pcs[port].pcs, MLO_AN_FIXED,
+-				   interface, speed, DUPLEX_FULL);
+ 	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
+ 				   speed, DUPLEX_FULL, true, true);
+ 
diff --git a/target/linux/generic/backport-6.6/790-03-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch b/target/linux/generic/backport-6.6/790-03-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch
new file mode 100644
index 0000000000..2da610ea42
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-03-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch
@@ -0,0 +1,40 @@
+From 9b4f1f5a0801652056670a38503b4049eb413caf Mon Sep 17 00:00:00 2001
+From: Justin Stitt <justinstitt at google.com>
+Date: Mon, 9 Oct 2023 18:29:19 +0000
+Subject: [PATCH 03/30] net: dsa: mt7530: replace deprecated strncpy with
+ ethtool_sprintf
+
+`strncpy` is deprecated for use on NUL-terminated destination strings
+[1] and as such we should prefer more robust and less ambiguous string
+interfaces.
+
+ethtool_sprintf() is designed specifically for get_strings() usage.
+Let's replace strncpy in favor of this more robust and easier to
+understand interface.
+
+Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
+Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
+Link: https://github.com/KSPP/linux/issues/90
+Signed-off-by: Justin Stitt <justinstitt at google.com>
+Reviewed-by: Kees Cook <keescook at chromium.org>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Link: https://lore.kernel.org/r/20231009-strncpy-drivers-net-dsa-mt7530-c-v1-1-ec6677a6436a at google.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -836,8 +836,7 @@ mt7530_get_strings(struct dsa_switch *ds
+ 		return;
+ 
+ 	for (i = 0; i < ARRAY_SIZE(mt7530_mib); i++)
+-		strncpy(data + i * ETH_GSTRING_LEN, mt7530_mib[i].name,
+-			ETH_GSTRING_LEN);
++		ethtool_sprintf(&data, "%s", mt7530_mib[i].name);
+ }
+ 
+ static void
diff --git a/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch b/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
new file mode 100644
index 0000000000..83738408eb
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
@@ -0,0 +1,116 @@
+From af26b0d1bf934bbaa7cafb871a51e95087a088a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:34:31 +0300
+Subject: [PATCH 04/30] net: dsa: mt7530: support OF-based registration of
+ switch MDIO bus
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Currently the MDIO bus of the switches the MT7530 DSA subdriver controls
+can only be registered as non-OF-based. Bring support for registering the
+bus OF-based.
+
+The subdrivers that control switches [with MDIO bus] probed on OF must
+follow this logic to support all cases properly:
+
+No switch MDIO bus defined: Populate ds->user_mii_bus, register the MDIO
+bus, set the interrupts for PHYs if "interrupt-controller" is defined at
+the switch node. This case should only be covered for the switches which
+their dt-bindings documentation didn't document the MDIO bus from the
+start. This is to keep supporting the device trees that do not describe the
+MDIO bus on the device tree but the MDIO bus is being used nonetheless.
+
+Switch MDIO bus defined: Don't populate ds->user_mii_bus, register the MDIO
+bus, set the interrupts for PHYs if ["interrupt-controller" is defined at
+the switch node and "interrupts" is defined at the PHY nodes under the
+switch MDIO bus node].
+
+Switch MDIO bus defined but explicitly disabled: If the device tree says
+status = "disabled" for the MDIO bus, we shouldn't need an MDIO bus at all.
+Instead, just exit as early as possible and do not call any MDIO API.
+
+The use of ds->user_mii_bus is inappropriate when the MDIO bus of the
+switch is described on the device tree [1], which is why we don't populate
+ds->user_mii_bus in that case.
+
+Link: https://lore.kernel.org/netdev/20231213120656.x46fyad6ls7sqyzv at skbuf/ [1]
+Suggested-by: David Bauer <mail at david-bauer.net>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122053431.7751-1-arinc.unal at arinc9.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 34 ++++++++++++++++++++++++++--------
+ 1 file changed, 26 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2182,24 +2182,40 @@ mt7530_free_irq_common(struct mt7530_pri
+ static void
+ mt7530_free_irq(struct mt7530_priv *priv)
+ {
+-	mt7530_free_mdio_irq(priv);
++	struct device_node *mnp, *np = priv->dev->of_node;
++
++	mnp = of_get_child_by_name(np, "mdio");
++	if (!mnp)
++		mt7530_free_mdio_irq(priv);
++	of_node_put(mnp);
++
+ 	mt7530_free_irq_common(priv);
+ }
+ 
+ static int
+ mt7530_setup_mdio(struct mt7530_priv *priv)
+ {
++	struct device_node *mnp, *np = priv->dev->of_node;
+ 	struct dsa_switch *ds = priv->ds;
+ 	struct device *dev = priv->dev;
+ 	struct mii_bus *bus;
+ 	static int idx;
+-	int ret;
++	int ret = 0;
++
++	mnp = of_get_child_by_name(np, "mdio");
++
++	if (mnp && !of_device_is_available(mnp))
++		goto out;
+ 
+ 	bus = devm_mdiobus_alloc(dev);
+-	if (!bus)
+-		return -ENOMEM;
++	if (!bus) {
++		ret = -ENOMEM;
++		goto out;
++	}
++
++	if (!mnp)
++		ds->slave_mii_bus = bus;
+ 
+-	ds->slave_mii_bus = bus;
+ 	bus->priv = priv;
+ 	bus->name = KBUILD_MODNAME "-mii";
+ 	snprintf(bus->id, MII_BUS_ID_SIZE, KBUILD_MODNAME "-%d", idx++);
+@@ -2210,16 +2226,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+ 	bus->parent = dev;
+ 	bus->phy_mask = ~ds->phys_mii_mask;
+ 
+-	if (priv->irq)
++	if (priv->irq && !mnp)
+ 		mt7530_setup_mdio_irq(priv);
+ 
+-	ret = devm_mdiobus_register(dev, bus);
++	ret = devm_of_mdiobus_register(dev, bus, mnp);
+ 	if (ret) {
+ 		dev_err(dev, "failed to register MDIO bus: %d\n", ret);
+-		if (priv->irq)
++		if (priv->irq && !mnp)
+ 			mt7530_free_mdio_irq(priv);
+ 	}
+ 
++out:
++	of_node_put(mnp);
+ 	return ret;
+ }
+ 
diff --git a/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch b/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
new file mode 100644
index 0000000000..56953fb364
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
@@ -0,0 +1,125 @@
+From 617b07e08bcb1f69a72a085a7d847d1ca2999830 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:52 +0300
+Subject: [PATCH 05/30] net: dsa: mt7530: always trap frames to active CPU port
+ on MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On the MT7530 switch, the CPU_PORT field indicates which CPU port to trap
+frames to, regardless of the affinity of the inbound user port.
+
+When multiple CPU ports are in use, if the DSA conduit interface is down,
+trapped frames won't be passed to the conduit interface.
+
+To make trapping frames work including this case, implement
+ds->ops->conduit_state_change() on this subdriver and set the CPU_PORT
+field to the numerically smallest CPU port whose conduit interface is up.
+Introduce the active_cpu_ports field to store the information of the active
+CPU ports. Correct the macros, CPU_PORT is bits 4 through 6 of the
+register.
+
+Add a comment to explain frame trapping for this switch.
+
+Currently, the driver doesn't support the use of multiple CPU ports so this
+is not necessarily a bug fix.
+
+Suggested-by: Vladimir Oltean <olteanv at gmail.com>
+Suggested-by: Russell King (Oracle) <linux at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-1-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 35 +++++++++++++++++++++++++++++++----
+ drivers/net/dsa/mt7530.h |  6 ++++--
+ 2 files changed, 35 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1071,10 +1071,6 @@ mt753x_cpu_port_enable(struct dsa_switch
+ 	mt7530_set(priv, MT7530_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
+ 		   UNU_FFP(BIT(port)));
+ 
+-	/* Set CPU port number */
+-	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)
+-		mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port));
+-
+ 	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
+ 	 * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that
+ 	 * is affine to the inbound user port.
+@@ -3128,6 +3124,36 @@ static int mt753x_set_mac_eee(struct dsa
+ 	return 0;
+ }
+ 
++static void
++mt753x_conduit_state_change(struct dsa_switch *ds,
++			    const struct net_device *conduit,
++			    bool operational)
++{
++	struct dsa_port *cpu_dp = conduit->dsa_ptr;
++	struct mt7530_priv *priv = ds->priv;
++	int val = 0;
++	u8 mask;
++
++	/* Set the CPU port to trap frames to for MT7530. Trapped frames will be
++	 * forwarded to the numerically smallest CPU port whose conduit
++	 * interface is up.
++	 */
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return;
++
++	mask = BIT(cpu_dp->index);
++
++	if (operational)
++		priv->active_cpu_ports |= mask;
++	else
++		priv->active_cpu_ports &= ~mask;
++
++	if (priv->active_cpu_ports)
++		val = CPU_EN | CPU_PORT(__ffs(priv->active_cpu_ports));
++
++	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
++}
++
+ static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
+ {
+ 	return 0;
+@@ -3183,6 +3209,7 @@ const struct dsa_switch_ops mt7530_switc
+ 	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
+ 	.get_mac_eee		= mt753x_get_mac_eee,
+ 	.set_mac_eee		= mt753x_set_mac_eee,
++	.master_state_change	= mt753x_conduit_state_change,
+ };
+ EXPORT_SYMBOL_GPL(mt7530_switch_ops);
+ 
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -41,8 +41,8 @@ enum mt753x_id {
+ #define  UNU_FFP(x)			(((x) & 0xff) << 8)
+ #define  UNU_FFP_MASK			UNU_FFP(~0)
+ #define  CPU_EN				BIT(7)
+-#define  CPU_PORT(x)			((x) << 4)
+-#define  CPU_MASK			(0xf << 4)
++#define  CPU_PORT_MASK			GENMASK(6, 4)
++#define  CPU_PORT(x)			FIELD_PREP(CPU_PORT_MASK, x)
+ #define  MIRROR_EN			BIT(3)
+ #define  MIRROR_PORT(x)			((x) & 0x7)
+ #define  MIRROR_MASK			0x7
+@@ -780,6 +780,7 @@ struct mt753x_info {
+  * @irq_domain:		IRQ domain of the switch irq_chip
+  * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
+  * @create_sgmii:	Pointer to function creating SGMII PCS instance(s)
++ * @active_cpu_ports:	Holding the active CPU ports
+  */
+ struct mt7530_priv {
+ 	struct device		*dev;
+@@ -806,6 +807,7 @@ struct mt7530_priv {
+ 	struct irq_domain *irq_domain;
+ 	u32 irq_enable;
+ 	int (*create_sgmii)(struct mt7530_priv *priv, bool dual_sgmii);
++	u8 active_cpu_ports;
+ };
+ 
+ struct mt7530_hw_vlan_entry {
diff --git a/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch b/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
new file mode 100644
index 0000000000..5e6f8c22ff
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
@@ -0,0 +1,45 @@
+From 07f411e26f82d75723df1c0c072e5602d06f4e30 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:53 +0300
+Subject: [PATCH 06/30] net: dsa: mt7530: use p5_interface_select as data type
+ for p5_intf_sel
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use the p5_interface_select enumeration as the data type for the
+p5_intf_sel field. This ensures p5_intf_sel can only take the values
+defined in the p5_interface_select enumeration.
+
+Remove the explicit assignment of 0 to P5_DISABLED as the first enum item
+is automatically assigned 0.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-2-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -703,7 +703,7 @@ struct mt7530_port {
+ 
+ /* Port 5 interface select definitions */
+ enum p5_interface_select {
+-	P5_DISABLED = 0,
++	P5_DISABLED,
+ 	P5_INTF_SEL_PHY_P0,
+ 	P5_INTF_SEL_PHY_P4,
+ 	P5_INTF_SEL_GMAC5,
+@@ -796,7 +796,7 @@ struct mt7530_priv {
+ 	bool			mcm;
+ 	phy_interface_t		p6_interface;
+ 	phy_interface_t		p5_interface;
+-	unsigned int		p5_intf_sel;
++	enum p5_interface_select p5_intf_sel;
+ 	u8			mirror_rx;
+ 	u8			mirror_tx;
+ 	struct mt7530_port	ports[MT7530_NUM_PORTS];
diff --git a/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch b/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
new file mode 100644
index 0000000000..5bbdc6d0e0
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
@@ -0,0 +1,227 @@
+From 8f7db12efc189eedd196ed8d053236ce27add484 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:54 +0300
+Subject: [PATCH 07/30] net: dsa: mt7530: store port 5 SGMII capability of
+ MT7531
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Introduce the p5_sgmii field to store the information for whether port 5
+has got SGMII or not. Instead of reading the MT7531_TOP_SIG_SR register
+multiple times, the register will be read once and the value will be
+stored on the p5_sgmii field. This saves unnecessary reads of the
+register.
+
+Move the comment about MT7531AE and MT7531BE to mt7531_setup(), where the
+switch is identified.
+
+Get rid of mt7531_dual_sgmii_supported() now that priv->p5_sgmii stores the
+information. Address the code where mt7531_dual_sgmii_supported() is used.
+
+Get rid of mt7531_is_rgmii_port() which just prints the opposite of
+priv->p5_sgmii.
+
+Instead of calling mt7531_pll_setup() then returning, do not call it if
+port 5 is SGMII.
+
+Remove P5_INTF_SEL_GMAC5_SGMII. The p5_interface_select enum is supposed to
+represent the mode that port 5 is being used in, not the hardware
+information of port 5. Set p5_intf_sel to P5_INTF_SEL_GMAC5 instead, if
+port 5 is not dsa_is_unused_port().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-3-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530-mdio.c |  7 ++---
+ drivers/net/dsa/mt7530.c      | 48 ++++++++++++-----------------------
+ drivers/net/dsa/mt7530.h      |  6 +++--
+ 3 files changed, 22 insertions(+), 39 deletions(-)
+
+--- a/drivers/net/dsa/mt7530-mdio.c
++++ b/drivers/net/dsa/mt7530-mdio.c
+@@ -81,17 +81,14 @@ static const struct regmap_bus mt7530_re
+ };
+ 
+ static int
+-mt7531_create_sgmii(struct mt7530_priv *priv, bool dual_sgmii)
++mt7531_create_sgmii(struct mt7530_priv *priv)
+ {
+ 	struct regmap_config *mt7531_pcs_config[2] = {};
+ 	struct phylink_pcs *pcs;
+ 	struct regmap *regmap;
+ 	int i, ret = 0;
+ 
+-	/* MT7531AE has two SGMII units for port 5 and port 6
+-	 * MT7531BE has only one SGMII unit for port 6
+-	 */
+-	for (i = dual_sgmii ? 0 : 1; i < 2; i++) {
++	for (i = priv->p5_sgmii ? 0 : 1; i < 2; i++) {
+ 		mt7531_pcs_config[i] = devm_kzalloc(priv->dev,
+ 						    sizeof(struct regmap_config),
+ 						    GFP_KERNEL);
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -487,15 +487,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ 	return 0;
+ }
+ 
+-static bool mt7531_dual_sgmii_supported(struct mt7530_priv *priv)
+-{
+-	u32 val;
+-
+-	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
+-
+-	return (val & PAD_DUAL_SGMII_EN) != 0;
+-}
+-
+ static int
+ mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
+ {
+@@ -510,9 +501,6 @@ mt7531_pll_setup(struct mt7530_priv *pri
+ 	u32 xtal;
+ 	u32 val;
+ 
+-	if (mt7531_dual_sgmii_supported(priv))
+-		return;
+-
+ 	val = mt7530_read(priv, MT7531_CREV);
+ 	top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR);
+ 	hwstrap = mt7530_read(priv, MT7531_HWTRAP);
+@@ -920,8 +908,6 @@ static const char *p5_intf_modes(unsigne
+ 		return "PHY P4";
+ 	case P5_INTF_SEL_GMAC5:
+ 		return "GMAC5";
+-	case P5_INTF_SEL_GMAC5_SGMII:
+-		return "GMAC5_SGMII";
+ 	default:
+ 		return "unknown";
+ 	}
+@@ -2524,6 +2510,12 @@ mt7531_setup(struct dsa_switch *ds)
+ 		return -ENODEV;
+ 	}
+ 
++	/* MT7531AE has got two SGMII units. One for port 5, one for port 6.
++	 * MT7531BE has got only one SGMII unit which is for port 6.
++	 */
++	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
++	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
++
+ 	/* all MACs must be forced link-down before sw reset */
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++)
+ 		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
+@@ -2533,21 +2525,18 @@ mt7531_setup(struct dsa_switch *ds)
+ 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
+ 		     SYS_CTRL_REG_RST);
+ 
+-	mt7531_pll_setup(priv);
+-
+-	if (mt7531_dual_sgmii_supported(priv)) {
+-		priv->p5_intf_sel = P5_INTF_SEL_GMAC5_SGMII;
+-
++	if (!priv->p5_sgmii) {
++		mt7531_pll_setup(priv);
++	} else {
+ 		/* Let ds->slave_mii_bus be able to access external phy. */
+ 		mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO11_RG_RXD2_MASK,
+ 			   MT7531_EXT_P_MDC_11);
+ 		mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO12_RG_RXD3_MASK,
+ 			   MT7531_EXT_P_MDIO_12);
+-	} else {
+-		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+ 	}
+-	dev_dbg(ds->dev, "P5 support %s interface\n",
+-		p5_intf_modes(priv->p5_intf_sel));
++
++	if (!dsa_is_unused_port(ds, 5))
++		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+ 
+ 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
+ 		   MT7531_GPIO0_INTERRUPT);
+@@ -2607,11 +2596,6 @@ static void mt7530_mac_port_get_caps(str
+ 	}
+ }
+ 
+-static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
+-{
+-	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
+-}
+-
+ static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port,
+ 				     struct phylink_config *config)
+ {
+@@ -2624,7 +2608,7 @@ static void mt7531_mac_port_get_caps(str
+ 		break;
+ 
+ 	case 5: /* 2nd cpu port supports either rgmii or sgmii/8023z */
+-		if (mt7531_is_rgmii_port(priv, port)) {
++		if (!priv->p5_sgmii) {
+ 			phy_interface_set_rgmii(config->supported_interfaces);
+ 			break;
+ 		}
+@@ -2691,7 +2675,7 @@ static int mt7531_rgmii_setup(struct mt7
+ {
+ 	u32 val;
+ 
+-	if (!mt7531_is_rgmii_port(priv, port)) {
++	if (priv->p5_sgmii) {
+ 		dev_err(priv->dev, "RGMII mode is not available for port %d\n",
+ 			port);
+ 		return -EINVAL;
+@@ -2934,7 +2918,7 @@ mt7531_cpu_port_config(struct dsa_switch
+ 
+ 	switch (port) {
+ 	case 5:
+-		if (mt7531_is_rgmii_port(priv, port))
++		if (!priv->p5_sgmii)
+ 			interface = PHY_INTERFACE_MODE_RGMII;
+ 		else
+ 			interface = PHY_INTERFACE_MODE_2500BASEX;
+@@ -3086,7 +3070,7 @@ mt753x_setup(struct dsa_switch *ds)
+ 		mt7530_free_irq_common(priv);
+ 
+ 	if (priv->create_sgmii) {
+-		ret = priv->create_sgmii(priv, mt7531_dual_sgmii_supported(priv));
++		ret = priv->create_sgmii(priv);
+ 		if (ret && priv->irq)
+ 			mt7530_free_irq(priv);
+ 	}
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -707,7 +707,6 @@ enum p5_interface_select {
+ 	P5_INTF_SEL_PHY_P0,
+ 	P5_INTF_SEL_PHY_P4,
+ 	P5_INTF_SEL_GMAC5,
+-	P5_INTF_SEL_GMAC5_SGMII,
+ };
+ 
+ struct mt7530_priv;
+@@ -776,6 +775,8 @@ struct mt753x_info {
+  *			registers
+  * @p6_interface	Holding the current port 6 interface
+  * @p5_intf_sel:	Holding the current port 5 interface select
++ * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
++ *			has got SGMII
+  * @irq:		IRQ number of the switch
+  * @irq_domain:		IRQ domain of the switch irq_chip
+  * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
+@@ -797,6 +798,7 @@ struct mt7530_priv {
+ 	phy_interface_t		p6_interface;
+ 	phy_interface_t		p5_interface;
+ 	enum p5_interface_select p5_intf_sel;
++	bool			p5_sgmii;
+ 	u8			mirror_rx;
+ 	u8			mirror_tx;
+ 	struct mt7530_port	ports[MT7530_NUM_PORTS];
+@@ -806,7 +808,7 @@ struct mt7530_priv {
+ 	int irq;
+ 	struct irq_domain *irq_domain;
+ 	u32 irq_enable;
+-	int (*create_sgmii)(struct mt7530_priv *priv, bool dual_sgmii);
++	int (*create_sgmii)(struct mt7530_priv *priv);
+ 	u8 active_cpu_ports;
+ };
+ 
diff --git a/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch b/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
new file mode 100644
index 0000000000..c23074a030
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
@@ -0,0 +1,133 @@
+From c91b7fb8fbb2e18ebb497e67f4252cec78e3a29b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:55 +0300
+Subject: [PATCH 08/30] net: dsa: mt7530: improve comments regarding switch
+ ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There's no logic to numerically order the CPU ports. Just state the port
+number instead.
+
+Remove the irrelevant PHY muxing information from
+mt7530_mac_port_get_caps(). Explain the supported MII modes instead.
+
+Remove the out of place PHY muxing information from
+mt753x_phylink_mac_config(). The function is for MT7530, MT7531, and the
+switch on the MT7988 SoC but there's no PHY muxing on MT7531 or the switch
+on the MT7988 SoC.
+
+These comments were gradually introduced with the commits below.
+commit ca366d6c889b ("net: dsa: mt7530: Convert to PHYLINK API")
+commit 38f790a80560 ("net: dsa: mt7530: Add support for port 5")
+commit 88bdef8be9f6 ("net: dsa: mt7530: Extend device data ready for adding
+a new hardware")
+commit c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch")
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-4-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 30 ++++++++++++++++++++----------
+ 1 file changed, 20 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2574,12 +2574,14 @@ static void mt7530_mac_port_get_caps(str
+ 				     struct phylink_config *config)
+ {
+ 	switch (port) {
+-	case 0 ... 4: /* Internal phy */
++	/* Ports which are connected to switch PHYs. There is no MII pinout. */
++	case 0 ... 4:
+ 		__set_bit(PHY_INTERFACE_MODE_GMII,
+ 			  config->supported_interfaces);
+ 		break;
+ 
+-	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
++	/* Port 5 supports rgmii with delays, mii, and gmii. */
++	case 5:
+ 		phy_interface_set_rgmii(config->supported_interfaces);
+ 		__set_bit(PHY_INTERFACE_MODE_MII,
+ 			  config->supported_interfaces);
+@@ -2587,7 +2589,8 @@ static void mt7530_mac_port_get_caps(str
+ 			  config->supported_interfaces);
+ 		break;
+ 
+-	case 6: /* 1st cpu port */
++	/* Port 6 supports rgmii and trgmii. */
++	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_RGMII,
+ 			  config->supported_interfaces);
+ 		__set_bit(PHY_INTERFACE_MODE_TRGMII,
+@@ -2602,19 +2605,24 @@ static void mt7531_mac_port_get_caps(str
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+ 	switch (port) {
+-	case 0 ... 4: /* Internal phy */
++	/* Ports which are connected to switch PHYs. There is no MII pinout. */
++	case 0 ... 4:
+ 		__set_bit(PHY_INTERFACE_MODE_GMII,
+ 			  config->supported_interfaces);
+ 		break;
+ 
+-	case 5: /* 2nd cpu port supports either rgmii or sgmii/8023z */
++	/* Port 5 supports rgmii with delays on MT7531BE, sgmii/802.3z on
++	 * MT7531AE.
++	 */
++	case 5:
+ 		if (!priv->p5_sgmii) {
+ 			phy_interface_set_rgmii(config->supported_interfaces);
+ 			break;
+ 		}
+ 		fallthrough;
+ 
+-	case 6: /* 1st cpu port supports sgmii/8023z only */
++	/* Port 6 supports sgmii/802.3z. */
++	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_SGMII,
+ 			  config->supported_interfaces);
+ 		__set_bit(PHY_INTERFACE_MODE_1000BASEX,
+@@ -2633,11 +2641,13 @@ static void mt7988_mac_port_get_caps(str
+ 	phy_interface_zero(config->supported_interfaces);
+ 
+ 	switch (port) {
+-	case 0 ... 4: /* Internal phy */
++	/* Ports which are connected to switch PHYs. There is no MII pinout. */
++	case 0 ... 4:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+ 		break;
+ 
++	/* Port 6 is connected to SoC's XGMII MAC. There is no MII pinout. */
+ 	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+@@ -2801,12 +2811,12 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	u32 mcr_cur, mcr_new;
+ 
+ 	switch (port) {
+-	case 0 ... 4: /* Internal phy */
++	case 0 ... 4:
+ 		if (state->interface != PHY_INTERFACE_MODE_GMII &&
+ 		    state->interface != PHY_INTERFACE_MODE_INTERNAL)
+ 			goto unsupported;
+ 		break;
+-	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
++	case 5:
+ 		if (priv->p5_interface == state->interface)
+ 			break;
+ 
+@@ -2816,7 +2826,7 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 		if (priv->p5_intf_sel != P5_DISABLED)
+ 			priv->p5_interface = state->interface;
+ 		break;
+-	case 6: /* 1st cpu port */
++	case 6:
+ 		if (priv->p6_interface == state->interface)
+ 			break;
+ 
diff --git a/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch b/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
new file mode 100644
index 0000000000..a0f565906b
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
@@ -0,0 +1,95 @@
+From c1b2294a9b4b9b6c0cbe58666cb86e0a9cb0abfd Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:56 +0300
+Subject: [PATCH 09/30] net: dsa: mt7530: improve code path for setting up port
+ 5
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There're two code paths for setting up port 5:
+
+mt7530_setup()
+-> mt7530_setup_port5()
+
+mt753x_phylink_mac_config()
+-> mt753x_mac_config()
+   -> mt7530_mac_config()
+      -> mt7530_setup_port5()
+
+Currently mt7530_setup_port5() from mt7530_setup() always runs. If port 5
+is used as a CPU, DSA, or user port, mt7530_setup_port5() from
+mt753x_phylink_mac_config() won't run. That is because priv->p5_interface
+set on mt7530_setup_port5() will match state->interface on
+mt753x_phylink_mac_config() which will stop running mt7530_setup_port5()
+again.
+
+Therefore, mt7530_setup_port5() will never run from
+mt753x_phylink_mac_config().
+
+Address this by not running mt7530_setup_port5() from mt7530_setup() if
+port 5 is used as a CPU, DSA, or user port. This driver isn't in the
+dsa_switches_apply_workarounds[] array so phylink will always be present.
+
+To keep the cases where port 5 isn't controlled by phylink working as
+before, preserve the mt7530_setup_port5() call from mt7530_setup().
+
+Do not set priv->p5_intf_sel to P5_DISABLED. It is already set to that when
+"priv" is allocated.
+
+Move setting the interface to a more specific location. It's supposed to be
+overwritten if PHY muxing is detected.
+
+Improve the comment which explains the process.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-5-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2362,16 +2362,15 @@ mt7530_setup(struct dsa_switch *ds)
+ 		return ret;
+ 
+ 	/* Setup port 5 */
+-	priv->p5_intf_sel = P5_DISABLED;
+-	interface = PHY_INTERFACE_MODE_NA;
+-
+ 	if (!dsa_is_unused_port(ds, 5)) {
+ 		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+-		ret = of_get_phy_mode(dsa_to_port(ds, 5)->dn, &interface);
+-		if (ret && ret != -ENODEV)
+-			return ret;
+ 	} else {
+-		/* Scan the ethernet nodes. look for GMAC1, lookup used phy */
++		/* Scan the ethernet nodes. Look for GMAC1, lookup the used PHY.
++		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
++		 * is detected.
++		 */
++		interface = PHY_INTERFACE_MODE_NA;
++
+ 		for_each_child_of_node(dn, mac_np) {
+ 			if (!of_device_is_compatible(mac_np,
+ 						     "mediatek,eth-mac"))
+@@ -2402,6 +2401,8 @@ mt7530_setup(struct dsa_switch *ds)
+ 			of_node_put(phy_node);
+ 			break;
+ 		}
++
++		mt7530_setup_port5(ds, interface);
+ 	}
+ 
+ #ifdef CONFIG_GPIOLIB
+@@ -2412,8 +2413,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 	}
+ #endif /* CONFIG_GPIOLIB */
+ 
+-	mt7530_setup_port5(ds, interface);
+-
+ 	/* Flush the FDB table */
+ 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
+ 	if (ret < 0)
diff --git a/target/linux/generic/backport-6.6/790-10-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch b/target/linux/generic/backport-6.6/790-10-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch
new file mode 100644
index 0000000000..0b021f07c6
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-10-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch
@@ -0,0 +1,42 @@
+From cd1cee68e57eedb460a68d1f42abf9f740b17e94 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:57 +0300
+Subject: [PATCH 10/30] net: dsa: mt7530: do not set priv->p5_interface on
+ mt7530_setup_port5()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Running mt7530_setup_port5() from mt7530_setup() used to handle all cases
+of configuring port 5, including phylink.
+
+Setting priv->p5_interface under mt7530_setup_port5() makes sure that
+mt7530_setup_port5() from mt753x_phylink_mac_config() won't run.
+
+The commit ("net: dsa: mt7530: improve code path for setting up port 5")
+makes so that mt7530_setup_port5() from mt7530_setup() runs only on
+non-phylink cases.
+
+Get rid of unnecessarily setting priv->p5_interface under
+mt7530_setup_port5() as port 5 phylink configuration will be done by
+running mt7530_setup_port5() from mt753x_phylink_mac_config() now.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-6-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -978,8 +978,6 @@ static void mt7530_setup_port5(struct ds
+ 	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n",
+ 		val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface));
+ 
+-	priv->p5_interface = interface;
+-
+ unlock_exit:
+ 	mutex_unlock(&priv->reg_mutex);
+ }
diff --git a/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch b/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
new file mode 100644
index 0000000000..9eecede95e
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
@@ -0,0 +1,62 @@
+From e55a68aeb0f8b9c74b582b7a5e92b82988832bf8 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:58 +0300
+Subject: [PATCH 11/30] net: dsa: mt7530: do not run mt7530_setup_port5() if
+ port 5 is disabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There's no need to run all the code on mt7530_setup_port5() if port 5 is
+disabled. The only case for calling mt7530_setup_port5() from
+mt7530_setup() is when PHY muxing is enabled. That is because port 5 is not
+defined as a port on the devicetree, therefore, it cannot be controlled by
+phylink.
+
+Because of this, run mt7530_setup_port5() if priv->p5_intf_sel is
+P5_INTF_SEL_PHY_P0 or P5_INTF_SEL_PHY_P4. Remove the P5_DISABLED case from
+mt7530_setup_port5().
+
+Stop initialising the interface variable as the remaining cases will always
+call mt7530_setup_port5() with it initialised.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-7-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -942,9 +942,6 @@ static void mt7530_setup_port5(struct ds
+ 		/* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */
+ 		val &= ~MHWTRAP_P5_DIS;
+ 		break;
+-	case P5_DISABLED:
+-		interface = PHY_INTERFACE_MODE_NA;
+-		break;
+ 	default:
+ 		dev_err(ds->dev, "Unsupported p5_intf_sel %d\n",
+ 			priv->p5_intf_sel);
+@@ -2367,8 +2364,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
+ 		 * is detected.
+ 		 */
+-		interface = PHY_INTERFACE_MODE_NA;
+-
+ 		for_each_child_of_node(dn, mac_np) {
+ 			if (!of_device_is_compatible(mac_np,
+ 						     "mediatek,eth-mac"))
+@@ -2400,7 +2395,9 @@ mt7530_setup(struct dsa_switch *ds)
+ 			break;
+ 		}
+ 
+-		mt7530_setup_port5(ds, interface);
++		if (priv->p5_intf_sel == P5_INTF_SEL_PHY_P0 ||
++		    priv->p5_intf_sel == P5_INTF_SEL_PHY_P4)
++			mt7530_setup_port5(ds, interface);
+ 	}
+ 
+ #ifdef CONFIG_GPIOLIB
diff --git a/target/linux/generic/backport-6.6/790-12-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch b/target/linux/generic/backport-6.6/790-12-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch
new file mode 100644
index 0000000000..c9a57e36a3
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-12-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch
@@ -0,0 +1,58 @@
+From 1f538cda24bcb69919da2fcac0211b66281d3d4e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:02 +0300
+Subject: [PATCH 12/30] net: dsa: mt7530: empty default case on
+ mt7530_setup_port5()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There're two code paths for setting up port 5:
+
+mt7530_setup()
+-> mt7530_setup_port5()
+
+mt753x_phylink_mac_config()
+-> mt753x_mac_config()
+   -> mt7530_mac_config()
+      -> mt7530_setup_port5()
+
+On the first code path, priv->p5_intf_sel is either set to
+P5_INTF_SEL_PHY_P0 or P5_INTF_SEL_PHY_P4 when mt7530_setup_port5() is run.
+
+On the second code path, priv->p5_intf_sel is set to P5_INTF_SEL_GMAC5 when
+mt7530_setup_port5() is run.
+
+Empty the default case which will never run but is needed nonetheless to
+handle all the remaining enumeration values.
+
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-1-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -943,9 +943,7 @@ static void mt7530_setup_port5(struct ds
+ 		val &= ~MHWTRAP_P5_DIS;
+ 		break;
+ 	default:
+-		dev_err(ds->dev, "Unsupported p5_intf_sel %d\n",
+-			priv->p5_intf_sel);
+-		goto unlock_exit;
++		break;
+ 	}
+ 
+ 	/* Setup RGMII settings */
+@@ -975,7 +973,6 @@ static void mt7530_setup_port5(struct ds
+ 	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n",
+ 		val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface));
+ 
+-unlock_exit:
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+ 
diff --git a/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch b/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
new file mode 100644
index 0000000000..575352dbb1
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
@@ -0,0 +1,53 @@
+From 12c511cd31c2dc6bd96e4a89f7709d515aa8a76b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:03 +0300
+Subject: [PATCH 13/30] net: dsa: mt7530: move XTAL check to mt7530_setup()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The crystal frequency concerns the switch core. The frequency should be
+checked when the switch is being set up so the driver can reject the
+unsupported hardware earlier and without requiring port 6 to be used.
+
+Move it to mt7530_setup(). Drop the unnecessary function printing.
+
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-2-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -422,13 +422,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ 
+ 	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
+ 
+-	if (xtal == HWTRAP_XTAL_20MHZ) {
+-		dev_err(priv->dev,
+-			"%s: MT7530 with a 20MHz XTAL is not supported!\n",
+-			__func__);
+-		return -EINVAL;
+-	}
+-
+ 	switch (interface) {
+ 	case PHY_INTERFACE_MODE_RGMII:
+ 		trgint = 0;
+@@ -2295,6 +2288,12 @@ mt7530_setup(struct dsa_switch *ds)
+ 		return -ENODEV;
+ 	}
+ 
++	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_20MHZ) {
++		dev_err(priv->dev,
++			"MT7530 with a 20MHz XTAL is not supported!\n");
++		return -EINVAL;
++	}
++
+ 	/* Reset the switch through internal reset */
+ 	mt7530_write(priv, MT7530_SYS_CTRL,
+ 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
diff --git a/target/linux/generic/backport-6.6/790-14-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch b/target/linux/generic/backport-6.6/790-14-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch
new file mode 100644
index 0000000000..75c90b9ad5
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-14-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch
@@ -0,0 +1,146 @@
+From c33899a6a8c1a5723afbfc075600aba2e2bdbea7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:04 +0300
+Subject: [PATCH 14/30] net: dsa: mt7530: simplify mt7530_pad_clk_setup()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This code is from before this driver was converted to phylink API. Phylink
+deals with the unsupported interface cases before mt7530_pad_clk_setup() is
+run. Therefore, the default case would never run. However, it must be
+defined nonetheless to handle all the remaining enumeration values, the
+phy-modes.
+
+Switch to if statement for RGMII and return which simplifies the code and
+saves an indent.
+
+Set P6_INTF_MODE, which is the three least significant bits of the
+MT7530_P6ECR register, to 0 for RGMII even though it will already be 0
+after reset. This is to keep supporting dynamic reconfiguration of the port
+in the case the interface changes from TRGMII to RGMII.
+
+Disable the TRGMII clocks for all cases. They will be enabled if TRGMII is
+being used.
+
+Read XTAL after checking for RGMII as it's only needed for the TRGMII
+interface mode.
+
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-3-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 91 ++++++++++++++++++----------------------
+ 1 file changed, 40 insertions(+), 51 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -418,65 +418,54 @@ static int
+ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	u32 ncpo1, ssc_delta, trgint, xtal;
++	u32 ncpo1, ssc_delta, xtal;
+ 
+-	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
++	/* Disable the MT7530 TRGMII clocks */
++	core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
+ 
+-	switch (interface) {
+-	case PHY_INTERFACE_MODE_RGMII:
+-		trgint = 0;
+-		break;
+-	case PHY_INTERFACE_MODE_TRGMII:
+-		trgint = 1;
+-		if (xtal == HWTRAP_XTAL_25MHZ)
+-			ssc_delta = 0x57;
+-		else
+-			ssc_delta = 0x87;
+-		if (priv->id == ID_MT7621) {
+-			/* PLL frequency: 125MHz: 1.0GBit */
+-			if (xtal == HWTRAP_XTAL_40MHZ)
+-				ncpo1 = 0x0640;
+-			if (xtal == HWTRAP_XTAL_25MHZ)
+-				ncpo1 = 0x0a00;
+-		} else { /* PLL frequency: 250MHz: 2.0Gbit */
+-			if (xtal == HWTRAP_XTAL_40MHZ)
+-				ncpo1 = 0x0c80;
+-			if (xtal == HWTRAP_XTAL_25MHZ)
+-				ncpo1 = 0x1400;
+-		}
+-		break;
+-	default:
+-		dev_err(priv->dev, "xMII interface %d not supported\n",
+-			interface);
+-		return -EINVAL;
++	if (interface == PHY_INTERFACE_MODE_RGMII) {
++		mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
++			   P6_INTF_MODE(0));
++		return 0;
+ 	}
+ 
+-	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
+-		   P6_INTF_MODE(trgint));
++	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1));
+ 
+-	if (trgint) {
+-		/* Disable the MT7530 TRGMII clocks */
+-		core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
+-
+-		/* Setup the MT7530 TRGMII Tx Clock */
+-		core_write(priv, CORE_PLL_GROUP5, RG_LCDDS_PCW_NCPO1(ncpo1));
+-		core_write(priv, CORE_PLL_GROUP6, RG_LCDDS_PCW_NCPO0(0));
+-		core_write(priv, CORE_PLL_GROUP10, RG_LCDDS_SSC_DELTA(ssc_delta));
+-		core_write(priv, CORE_PLL_GROUP11, RG_LCDDS_SSC_DELTA1(ssc_delta));
+-		core_write(priv, CORE_PLL_GROUP4,
+-			   RG_SYSPLL_DDSFBK_EN | RG_SYSPLL_BIAS_EN |
+-			   RG_SYSPLL_BIAS_LPF_EN);
+-		core_write(priv, CORE_PLL_GROUP2,
+-			   RG_SYSPLL_EN_NORMAL | RG_SYSPLL_VODEN |
+-			   RG_SYSPLL_POSDIV(1));
+-		core_write(priv, CORE_PLL_GROUP7,
+-			   RG_LCDDS_PCW_NCPO_CHG | RG_LCCDS_C(3) |
+-			   RG_LCDDS_PWDB | RG_LCDDS_ISO_EN);
++	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
+ 
+-		/* Enable the MT7530 TRGMII clocks */
+-		core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
++	if (xtal == HWTRAP_XTAL_25MHZ)
++		ssc_delta = 0x57;
++	else
++		ssc_delta = 0x87;
++
++	if (priv->id == ID_MT7621) {
++		/* PLL frequency: 125MHz: 1.0GBit */
++		if (xtal == HWTRAP_XTAL_40MHZ)
++			ncpo1 = 0x0640;
++		if (xtal == HWTRAP_XTAL_25MHZ)
++			ncpo1 = 0x0a00;
++	} else { /* PLL frequency: 250MHz: 2.0Gbit */
++		if (xtal == HWTRAP_XTAL_40MHZ)
++			ncpo1 = 0x0c80;
++		if (xtal == HWTRAP_XTAL_25MHZ)
++			ncpo1 = 0x1400;
+ 	}
+ 
++	/* Setup the MT7530 TRGMII Tx Clock */
++	core_write(priv, CORE_PLL_GROUP5, RG_LCDDS_PCW_NCPO1(ncpo1));
++	core_write(priv, CORE_PLL_GROUP6, RG_LCDDS_PCW_NCPO0(0));
++	core_write(priv, CORE_PLL_GROUP10, RG_LCDDS_SSC_DELTA(ssc_delta));
++	core_write(priv, CORE_PLL_GROUP11, RG_LCDDS_SSC_DELTA1(ssc_delta));
++	core_write(priv, CORE_PLL_GROUP4, RG_SYSPLL_DDSFBK_EN |
++		   RG_SYSPLL_BIAS_EN | RG_SYSPLL_BIAS_LPF_EN);
++	core_write(priv, CORE_PLL_GROUP2, RG_SYSPLL_EN_NORMAL |
++		   RG_SYSPLL_VODEN | RG_SYSPLL_POSDIV(1));
++	core_write(priv, CORE_PLL_GROUP7, RG_LCDDS_PCW_NCPO_CHG |
++		   RG_LCCDS_C(3) | RG_LCDDS_PWDB | RG_LCDDS_ISO_EN);
++
++	/* Enable the MT7530 TRGMII clocks */
++	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
++
+ 	return 0;
+ }
+ 
diff --git a/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch b/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
new file mode 100644
index 0000000000..dd886adaa2
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
@@ -0,0 +1,97 @@
+From e612922de7070a28802216650ee88128a57290de Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:05 +0300
+Subject: [PATCH 15/30] net: dsa: mt7530: call port 6 setup from
+ mt7530_mac_config()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+mt7530_pad_clk_setup() is called if port 6 is enabled. It used to do more
+things than setting up port 6. That part was moved to more appropriate
+locations, mt7530_setup() and mt7530_pll_setup().
+
+Now that all it does is set up port 6, rename it to mt7530_setup_port6(),
+and move it to a more appropriate location, under mt7530_mac_config().
+
+Change mt7530_setup_port6() to void as there're no error cases.
+
+Leave an empty mt7530_pad_clk_setup() to satisfy the pad_setup function
+pointer.
+
+This is the code path for setting up the ports before:
+
+dsa_switch_ops :: phylink_mac_config() -> mt753x_phylink_mac_config()
+-> mt753x_mac_config()
+   -> mt753x_info :: mac_port_config() -> mt7530_mac_config()
+      -> mt7530_setup_port5()
+-> mt753x_pad_setup()
+   -> mt753x_info :: pad_setup() -> mt7530_pad_clk_setup()
+
+This is after:
+
+dsa_switch_ops :: phylink_mac_config() -> mt753x_phylink_mac_config()
+-> mt753x_mac_config()
+   -> mt753x_info :: mac_port_config() -> mt7530_mac_config()
+      -> mt7530_setup_port5()
+      -> mt7530_setup_port6()
+
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-4-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -414,8 +414,8 @@ mt753x_preferred_default_local_cpu_port(
+ }
+ 
+ /* Setup port 6 interface mode and TRGMII TX circuit */
+-static int
+-mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
++static void
++mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 	u32 ncpo1, ssc_delta, xtal;
+@@ -426,7 +426,7 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ 	if (interface == PHY_INTERFACE_MODE_RGMII) {
+ 		mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
+ 			   P6_INTF_MODE(0));
+-		return 0;
++		return;
+ 	}
+ 
+ 	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1));
+@@ -465,7 +465,11 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ 
+ 	/* Enable the MT7530 TRGMII clocks */
+ 	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
++}
+ 
++static int
++mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
++{
+ 	return 0;
+ }
+ 
+@@ -2649,11 +2653,10 @@ mt7530_mac_config(struct dsa_switch *ds,
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+-	/* Only need to setup port5. */
+-	if (port != 5)
+-		return 0;
+-
+-	mt7530_setup_port5(priv->ds, interface);
++	if (port == 5)
++		mt7530_setup_port5(priv->ds, interface);
++	else if (port == 6)
++		mt7530_setup_port6(priv->ds, interface);
+ 
+ 	return 0;
+ }
diff --git a/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch b/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
new file mode 100644
index 0000000000..efe554b292
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
@@ -0,0 +1,148 @@
+From af83e0c7d766078fcd5580c0c81b9e5b55ff5906 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:06 +0300
+Subject: [PATCH 16/30] net: dsa: mt7530: remove pad_setup function pointer
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The pad_setup function pointer was introduced with 88bdef8be9f6 ("net: dsa:
+mt7530: Extend device data ready for adding a new hardware"). It was being
+used to set up the core clock and port 6 of the MT7530 switch, and pll of
+the MT7531 switch.
+
+All of these were moved to more appropriate locations, and it was never
+used for the switch on the MT7988 SoC. Therefore, this function pointer
+hasn't got a use anymore. Remove it.
+
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-5-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 36 ++----------------------------------
+ drivers/net/dsa/mt7530.h |  3 ---
+ 2 files changed, 2 insertions(+), 37 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -467,18 +467,6 @@ mt7530_setup_port6(struct dsa_switch *ds
+ 	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
+ }
+ 
+-static int
+-mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
+-{
+-	return 0;
+-}
+-
+-static int
+-mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
+-{
+-	return 0;
+-}
+-
+ static void
+ mt7531_pll_setup(struct mt7530_priv *priv)
+ {
+@@ -2640,14 +2628,6 @@ static void mt7988_mac_port_get_caps(str
+ }
+ 
+ static int
+-mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
+-{
+-	struct mt7530_priv *priv = ds->priv;
+-
+-	return priv->info->pad_setup(ds, state->interface);
+-}
+-
+-static int
+ mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  phy_interface_t interface)
+ {
+@@ -2812,8 +2792,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 		if (priv->p6_interface == state->interface)
+ 			break;
+ 
+-		mt753x_pad_setup(ds, state);
+-
+ 		if (mt753x_mac_config(ds, port, mode, state) < 0)
+ 			goto unsupported;
+ 
+@@ -3130,11 +3108,6 @@ mt753x_conduit_state_change(struct dsa_s
+ 	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
+ }
+ 
+-static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
+-{
+-	return 0;
+-}
+-
+ static int mt7988_setup(struct dsa_switch *ds)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+@@ -3198,7 +3171,6 @@ const struct mt753x_info mt753x_table[]
+ 		.phy_write_c22 = mt7530_phy_write_c22,
+ 		.phy_read_c45 = mt7530_phy_read_c45,
+ 		.phy_write_c45 = mt7530_phy_write_c45,
+-		.pad_setup = mt7530_pad_clk_setup,
+ 		.mac_port_get_caps = mt7530_mac_port_get_caps,
+ 		.mac_port_config = mt7530_mac_config,
+ 	},
+@@ -3210,7 +3182,6 @@ const struct mt753x_info mt753x_table[]
+ 		.phy_write_c22 = mt7530_phy_write_c22,
+ 		.phy_read_c45 = mt7530_phy_read_c45,
+ 		.phy_write_c45 = mt7530_phy_write_c45,
+-		.pad_setup = mt7530_pad_clk_setup,
+ 		.mac_port_get_caps = mt7530_mac_port_get_caps,
+ 		.mac_port_config = mt7530_mac_config,
+ 	},
+@@ -3222,7 +3193,6 @@ const struct mt753x_info mt753x_table[]
+ 		.phy_write_c22 = mt7531_ind_c22_phy_write,
+ 		.phy_read_c45 = mt7531_ind_c45_phy_read,
+ 		.phy_write_c45 = mt7531_ind_c45_phy_write,
+-		.pad_setup = mt7531_pad_setup,
+ 		.cpu_port_config = mt7531_cpu_port_config,
+ 		.mac_port_get_caps = mt7531_mac_port_get_caps,
+ 		.mac_port_config = mt7531_mac_config,
+@@ -3235,7 +3205,6 @@ const struct mt753x_info mt753x_table[]
+ 		.phy_write_c22 = mt7531_ind_c22_phy_write,
+ 		.phy_read_c45 = mt7531_ind_c45_phy_read,
+ 		.phy_write_c45 = mt7531_ind_c45_phy_write,
+-		.pad_setup = mt7988_pad_setup,
+ 		.cpu_port_config = mt7988_cpu_port_config,
+ 		.mac_port_get_caps = mt7988_mac_port_get_caps,
+ 		.mac_port_config = mt7988_mac_config,
+@@ -3265,9 +3234,8 @@ mt7530_probe_common(struct mt7530_priv *
+ 	/* Sanity check if these required device operations are filled
+ 	 * properly.
+ 	 */
+-	if (!priv->info->sw_setup || !priv->info->pad_setup ||
+-	    !priv->info->phy_read_c22 || !priv->info->phy_write_c22 ||
+-	    !priv->info->mac_port_get_caps ||
++	if (!priv->info->sw_setup || !priv->info->phy_read_c22 ||
++	    !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps ||
+ 	    !priv->info->mac_port_config)
+ 		return -EINVAL;
+ 
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -724,8 +724,6 @@ struct mt753x_pcs {
+  * @phy_write_c22:	Holding the way writing PHY port using C22
+  * @phy_read_c45:	Holding the way reading PHY port using C45
+  * @phy_write_c45:	Holding the way writing PHY port using C45
+- * @pad_setup:		Holding the way setting up the bus pad for a certain
+- *			MAC port
+  * @phy_mode_supported:	Check if the PHY type is being supported on a certain
+  *			port
+  * @mac_port_validate:	Holding the way to set addition validate type for a
+@@ -746,7 +744,6 @@ struct mt753x_info {
+ 			    int regnum);
+ 	int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad,
+ 			     int regnum, u16 val);
+-	int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface);
+ 	int (*cpu_port_config)(struct dsa_switch *ds, int port);
+ 	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
+ 				  struct phylink_config *config);
diff --git a/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch b/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
new file mode 100644
index 0000000000..b707c3f6e9
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
@@ -0,0 +1,36 @@
+From 9716e3e2c21547c97a9d79119da8fdce5659c2cc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:07 +0300
+Subject: [PATCH 17/30] net: dsa: mt7530: correct port capabilities of MT7988
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On the switch on the MT7988 SoC, as shown in Block Diagram 8.1.1.3 on page
+125 of "MT7988A Wi-Fi 7 Generation Router Platform: Datasheet (Open
+Version) v0.1", there are only 4 PHYs. That's port 0 to 3. Set the case for
+ports which connect to switch PHYs to '0 ... 3'.
+
+Port 4 and 5 are not used at all in this design.
+
+Link: https://wiki.banana-pi.org/Banana_Pi_BPI-R4#Documents [1]
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-6-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2613,7 +2613,7 @@ static void mt7988_mac_port_get_caps(str
+ 
+ 	switch (port) {
+ 	/* Ports which are connected to switch PHYs. There is no MII pinout. */
+-	case 0 ... 4:
++	case 0 ... 3:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+ 		break;
diff --git a/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch b/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
new file mode 100644
index 0000000000..4d781836da
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
@@ -0,0 +1,38 @@
+From 4d7b17712513710778c0f2f83ea5d9b55ed58c36 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:08 +0300
+Subject: [PATCH 18/30] net: dsa: mt7530: do not clear
+ config->supported_interfaces
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There's no need to clear the config->supported_interfaces bitmap before
+reporting the supported interfaces as all bits in the bitmap will already
+be initialized to zero when the phylink_config structure is allocated. The
+"config" pointer points to &dp->phylink_config, and "dp" is allocated by
+dsa_port_touch() with kzalloc(), so all its fields are filled with zeroes.
+
+There's no code that would change the bitmap beforehand. Remove it.
+
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-7-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2609,8 +2609,6 @@ static void mt7531_mac_port_get_caps(str
+ static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port,
+ 				     struct phylink_config *config)
+ {
+-	phy_interface_zero(config->supported_interfaces);
+-
+ 	switch (port) {
+ 	/* Ports which are connected to switch PHYs. There is no MII pinout. */
+ 	case 0 ... 3:
diff --git a/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch b/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
new file mode 100644
index 0000000000..d05b8ea5b9
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
@@ -0,0 +1,81 @@
+From 69e689e28191f9a242de6821a85f2c5ae4dbd5ae Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:42:57 +0200
+Subject: [PATCH 19/30] net: dsa: mt7530: remove .mac_port_config for MT7988
+ and make it optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For the switch on the MT7988 SoC, the mac_port_config member for ID_MT7988
+in mt753x_table is not needed as the interfaces of all MACs are already
+handled on mt7988_mac_port_get_caps().
+
+Therefore, remove the mac_port_config member from ID_MT7988 in
+mt753x_table. Before calling priv->info->mac_port_config(), if there's no
+mac_port_config member in mt753x_table, exit mt753x_mac_config()
+successfully.
+
+Remove calling priv->info->mac_port_config() from the sanity check as the
+sanity check requires a pointer to a mac_port_config function to be
+non-NULL. This will fail for MT7988 as mac_port_config won't be a member of
+its info table.
+
+Co-developed-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 18 ++++--------------
+ 1 file changed, 4 insertions(+), 14 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2692,17 +2692,6 @@ static bool mt753x_is_mac_port(u32 port)
+ }
+ 
+ static int
+-mt7988_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+-		  phy_interface_t interface)
+-{
+-	if (dsa_is_cpu_port(ds, port) &&
+-	    interface == PHY_INTERFACE_MODE_INTERNAL)
+-		return 0;
+-
+-	return -EINVAL;
+-}
+-
+-static int
+ mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  phy_interface_t interface)
+ {
+@@ -2742,6 +2731,9 @@ mt753x_mac_config(struct dsa_switch *ds,
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
++	if (!priv->info->mac_port_config)
++		return 0;
++
+ 	return priv->info->mac_port_config(ds, port, mode, state->interface);
+ }
+ 
+@@ -3205,7 +3197,6 @@ const struct mt753x_info mt753x_table[]
+ 		.phy_write_c45 = mt7531_ind_c45_phy_write,
+ 		.cpu_port_config = mt7988_cpu_port_config,
+ 		.mac_port_get_caps = mt7988_mac_port_get_caps,
+-		.mac_port_config = mt7988_mac_config,
+ 	},
+ };
+ EXPORT_SYMBOL_GPL(mt753x_table);
+@@ -3233,8 +3224,7 @@ mt7530_probe_common(struct mt7530_priv *
+ 	 * properly.
+ 	 */
+ 	if (!priv->info->sw_setup || !priv->info->phy_read_c22 ||
+-	    !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps ||
+-	    !priv->info->mac_port_config)
++	    !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps)
+ 		return -EINVAL;
+ 
+ 	priv->id = priv->info->id;
diff --git a/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch b/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
new file mode 100644
index 0000000000..143dd0dc1a
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
@@ -0,0 +1,31 @@
+From f8faa3a04ca860b31f22d7d526c5e3f3de511a8f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:42:58 +0200
+Subject: [PATCH 20/30] net: dsa: mt7530: set interrupt register only for
+ MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Setting this register related to interrupts is only needed for the MT7530
+switch. Make an exclusive check to ensure this.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Tested-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2091,7 +2091,7 @@ mt7530_setup_irq(struct mt7530_priv *pri
+ 	}
+ 
+ 	/* This register must be set for MT7530 to properly fire interrupts */
+-	if (priv->id != ID_MT7531)
++	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)
+ 		mt7530_set(priv, MT7530_TOP_SIG_CTRL, TOP_SIG_CTRL_NORMAL);
+ 
+ 	ret = request_threaded_irq(priv->irq, NULL, mt7530_irq_thread_fn,
diff --git a/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch b/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
new file mode 100644
index 0000000000..24d0ab1633
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
@@ -0,0 +1,41 @@
+From 80f4f866d7dad41b12cf37476c38766a89b8b5c4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:42:59 +0200
+Subject: [PATCH 21/30] net: dsa: mt7530: do not use SW_PHY_RST to reset MT7531
+ switch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+According to the document MT7531 Reference Manual for Development Board
+v1.0, the SW_PHY_RST bit on the SYS_CTRL register doesn't exist for
+MT7531. This is likely why forcing link down on all ports is necessary for
+MT7531.
+
+Therefore, do not set SW_PHY_RST on mt7531_setup().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2487,14 +2487,12 @@ mt7531_setup(struct dsa_switch *ds)
+ 	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
+ 	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
+ 
+-	/* all MACs must be forced link-down before sw reset */
++	/* Force link down on all ports before internal reset */
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++)
+ 		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
+ 
+ 	/* Reset the switch through internal reset */
+-	mt7530_write(priv, MT7530_SYS_CTRL,
+-		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
+-		     SYS_CTRL_REG_RST);
++	mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_SW_RST | SYS_CTRL_REG_RST);
+ 
+ 	if (!priv->p5_sgmii) {
+ 		mt7531_pll_setup(priv);
diff --git a/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch b/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
new file mode 100644
index 0000000000..e311a9314f
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
@@ -0,0 +1,217 @@
+From 58670652cacb7c5752e01f29979d0ca4cdbfcc0a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:00 +0200
+Subject: [PATCH 22/30] net: dsa: mt7530: get rid of useless error returns on
+ phylink code path
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Remove error returns on the cases where they are already handled with the
+function the mac_port_get_caps member in mt753x_table points to.
+
+mt7531_mac_config() is also called from mt7531_cpu_port_config() outside of
+phylink but the port and interface modes are already handled there.
+
+Change the functions and the mac_port_config function pointer to void now
+that there're no error returns anymore.
+
+Remove mt753x_is_mac_port() that used to help the said error returns.
+
+On mt7531_mac_config(), switch to if statements to simplify the code.
+
+Remove internal phy cases from mt753x_phylink_mac_config(), there is no
+need to check the interface mode as that's already handled with the
+function the mac_port_get_caps member in mt753x_table points to.
+
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Tested-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 81 ++++++++--------------------------------
+ drivers/net/dsa/mt7530.h |  6 +--
+ 2 files changed, 19 insertions(+), 68 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2623,7 +2623,7 @@ static void mt7988_mac_port_get_caps(str
+ 	}
+ }
+ 
+-static int
++static void
+ mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  phy_interface_t interface)
+ {
+@@ -2633,22 +2633,14 @@ mt7530_mac_config(struct dsa_switch *ds,
+ 		mt7530_setup_port5(priv->ds, interface);
+ 	else if (port == 6)
+ 		mt7530_setup_port6(priv->ds, interface);
+-
+-	return 0;
+ }
+ 
+-static int mt7531_rgmii_setup(struct mt7530_priv *priv, u32 port,
+-			      phy_interface_t interface,
+-			      struct phy_device *phydev)
++static void mt7531_rgmii_setup(struct mt7530_priv *priv, u32 port,
++			       phy_interface_t interface,
++			       struct phy_device *phydev)
+ {
+ 	u32 val;
+ 
+-	if (priv->p5_sgmii) {
+-		dev_err(priv->dev, "RGMII mode is not available for port %d\n",
+-			port);
+-		return -EINVAL;
+-	}
+-
+ 	val = mt7530_read(priv, MT7531_CLKGEN_CTRL);
+ 	val |= GP_CLK_EN;
+ 	val &= ~GP_MODE_MASK;
+@@ -2676,20 +2668,14 @@ static int mt7531_rgmii_setup(struct mt7
+ 		case PHY_INTERFACE_MODE_RGMII_ID:
+ 			break;
+ 		default:
+-			return -EINVAL;
++			break;
+ 		}
+ 	}
+-	mt7530_write(priv, MT7531_CLKGEN_CTRL, val);
+ 
+-	return 0;
+-}
+-
+-static bool mt753x_is_mac_port(u32 port)
+-{
+-	return (port == 5 || port == 6);
++	mt7530_write(priv, MT7531_CLKGEN_CTRL, val);
+ }
+ 
+-static int
++static void
+ mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  phy_interface_t interface)
+ {
+@@ -2697,42 +2683,21 @@ mt7531_mac_config(struct dsa_switch *ds,
+ 	struct phy_device *phydev;
+ 	struct dsa_port *dp;
+ 
+-	if (!mt753x_is_mac_port(port)) {
+-		dev_err(priv->dev, "port %d is not a MAC port\n", port);
+-		return -EINVAL;
+-	}
+-
+-	switch (interface) {
+-	case PHY_INTERFACE_MODE_RGMII:
+-	case PHY_INTERFACE_MODE_RGMII_ID:
+-	case PHY_INTERFACE_MODE_RGMII_RXID:
+-	case PHY_INTERFACE_MODE_RGMII_TXID:
++	if (phy_interface_mode_is_rgmii(interface)) {
+ 		dp = dsa_to_port(ds, port);
+ 		phydev = dp->slave->phydev;
+-		return mt7531_rgmii_setup(priv, port, interface, phydev);
+-	case PHY_INTERFACE_MODE_SGMII:
+-	case PHY_INTERFACE_MODE_NA:
+-	case PHY_INTERFACE_MODE_1000BASEX:
+-	case PHY_INTERFACE_MODE_2500BASEX:
+-		/* handled in SGMII PCS driver */
+-		return 0;
+-	default:
+-		return -EINVAL;
++		mt7531_rgmii_setup(priv, port, interface, phydev);
+ 	}
+-
+-	return -EINVAL;
+ }
+ 
+-static int
++static void
+ mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  const struct phylink_link_state *state)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+-	if (!priv->info->mac_port_config)
+-		return 0;
+-
+-	return priv->info->mac_port_config(ds, port, mode, state->interface);
++	if (priv->info->mac_port_config)
++		priv->info->mac_port_config(ds, port, mode, state->interface);
+ }
+ 
+ static struct phylink_pcs *
+@@ -2761,17 +2726,11 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	u32 mcr_cur, mcr_new;
+ 
+ 	switch (port) {
+-	case 0 ... 4:
+-		if (state->interface != PHY_INTERFACE_MODE_GMII &&
+-		    state->interface != PHY_INTERFACE_MODE_INTERNAL)
+-			goto unsupported;
+-		break;
+ 	case 5:
+ 		if (priv->p5_interface == state->interface)
+ 			break;
+ 
+-		if (mt753x_mac_config(ds, port, mode, state) < 0)
+-			goto unsupported;
++		mt753x_mac_config(ds, port, mode, state);
+ 
+ 		if (priv->p5_intf_sel != P5_DISABLED)
+ 			priv->p5_interface = state->interface;
+@@ -2780,16 +2739,10 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 		if (priv->p6_interface == state->interface)
+ 			break;
+ 
+-		if (mt753x_mac_config(ds, port, mode, state) < 0)
+-			goto unsupported;
++		mt753x_mac_config(ds, port, mode, state);
+ 
+ 		priv->p6_interface = state->interface;
+ 		break;
+-	default:
+-unsupported:
+-		dev_err(ds->dev, "%s: unsupported %s port: %i\n",
+-			__func__, phy_modes(state->interface), port);
+-		return;
+ 	}
+ 
+ 	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
+@@ -2872,7 +2825,6 @@ mt7531_cpu_port_config(struct dsa_switch
+ 	struct mt7530_priv *priv = ds->priv;
+ 	phy_interface_t interface;
+ 	int speed;
+-	int ret;
+ 
+ 	switch (port) {
+ 	case 5:
+@@ -2897,9 +2849,8 @@ mt7531_cpu_port_config(struct dsa_switch
+ 	else
+ 		speed = SPEED_1000;
+ 
+-	ret = mt7531_mac_config(ds, port, MLO_AN_FIXED, interface);
+-	if (ret)
+-		return ret;
++	mt7531_mac_config(ds, port, MLO_AN_FIXED, interface);
++
+ 	mt7530_write(priv, MT7530_PMCR_P(port),
+ 		     PMCR_CPU_PORT_SETTING(priv->id));
+ 	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -750,9 +750,9 @@ struct mt753x_info {
+ 	void (*mac_port_validate)(struct dsa_switch *ds, int port,
+ 				  phy_interface_t interface,
+ 				  unsigned long *supported);
+-	int (*mac_port_config)(struct dsa_switch *ds, int port,
+-			       unsigned int mode,
+-			       phy_interface_t interface);
++	void (*mac_port_config)(struct dsa_switch *ds, int port,
++				unsigned int mode,
++				phy_interface_t interface);
+ };
+ 
+ /* struct mt7530_priv -	This is the main data structure for holding the state
diff --git a/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch b/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
new file mode 100644
index 0000000000..e07a7ee71b
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
@@ -0,0 +1,305 @@
+From 859df5cf6ff07a9c930be4681284346aa73dd1fb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:01 +0200
+Subject: [PATCH 23/30] net: dsa: mt7530: get rid of
+ priv->info->cpu_port_config()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+priv->info->cpu_port_config() is used for MT7531 and the switch on the
+MT7988 SoC. It sets up the ports described as a CPU port earlier than the
+phylink code path would do.
+
+This function is useless as:
+- Configuring the MACs can be done from the phylink_mac_config code path
+  instead.
+- All the link configuration it does on the CPU ports are later undone with
+  the port_enable, phylink_mac_config, and then phylink_mac_link_up code
+  path [1].
+
+priv->p5_interface and priv->p6_interface were being used to prevent
+configuring the MACs from the phylink_mac_config code path. Remove them now
+that they hold no purpose.
+
+Remove priv->info->cpu_port_config(). On mt753x_phylink_mac_config, switch
+to if statements to simplify the code.
+
+Remove the overwriting of the speed and duplex interfaces for certain
+interface modes. Phylink already provides the speed and duplex variables
+with proper values. Phylink already sets the max speed of TRGMII to
+SPEED_1000. Add SPEED_2500 for PHY_INTERFACE_MODE_2500BASEX to where the
+speed and EEE bits are set instead.
+
+On the switch on the MT7988 SoC, PHY_INTERFACE_MODE_INTERNAL is being used
+to describe the interface mode of the 10G MAC, which is of port 6. On
+mt7988_cpu_port_config() PMCR_FORCE_SPEED_1000 was set via the
+PMCR_CPU_PORT_SETTING() mask. Add SPEED_10000 case to where the speed bits
+are set to cover this. No need to add it to where the EEE bits are set as
+the "MT7988A Wi-Fi 7 Generation Router Platform: Datasheet (Open Version)
+v0.1" document shows that these bits don't exist on the MT7530_PMCR_P(6)
+register.
+
+Remove the definition of PMCR_CPU_PORT_SETTING() now that it holds no
+purpose.
+
+Change mt753x_cpu_port_enable() to void now that there're no error cases
+left.
+
+Link: https://lore.kernel.org/netdev/ZHy2jQLesdYFMQtO at shell.armlinux.org.uk/ [1]
+Suggested-by: Russell King (Oracle) <linux at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 114 +++------------------------------------
+ drivers/net/dsa/mt7530.h |  11 ----
+ 2 files changed, 7 insertions(+), 118 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1002,18 +1002,10 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 		   MT753X_BPDU_CPU_ONLY);
+ }
+ 
+-static int
++static void
+ mt753x_cpu_port_enable(struct dsa_switch *ds, int port)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	int ret;
+-
+-	/* Setup max capability of CPU port at first */
+-	if (priv->info->cpu_port_config) {
+-		ret = priv->info->cpu_port_config(ds, port);
+-		if (ret)
+-			return ret;
+-	}
+ 
+ 	/* Enable Mediatek header mode on the cpu port */
+ 	mt7530_write(priv, MT7530_PVC_P(port),
+@@ -1039,8 +1031,6 @@ mt753x_cpu_port_enable(struct dsa_switch
+ 	/* Set to fallback mode for independent VLAN learning */
+ 	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK,
+ 		   MT7530_PORT_FALLBACK_MODE);
+-
+-	return 0;
+ }
+ 
+ static int
+@@ -2297,8 +2287,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 	val |= MHWTRAP_MANUAL;
+ 	mt7530_write(priv, MT7530_MHWTRAP, val);
+ 
+-	priv->p6_interface = PHY_INTERFACE_MODE_NA;
+-
+ 	mt753x_trap_frames(priv);
+ 
+ 	/* Enable and reset MIB counters */
+@@ -2313,9 +2301,7 @@ mt7530_setup(struct dsa_switch *ds)
+ 		mt7530_set(priv, MT7530_PSC_P(i), SA_DIS);
+ 
+ 		if (dsa_is_cpu_port(ds, i)) {
+-			ret = mt753x_cpu_port_enable(ds, i);
+-			if (ret)
+-				return ret;
++			mt753x_cpu_port_enable(ds, i);
+ 		} else {
+ 			mt7530_port_disable(ds, i);
+ 
+@@ -2419,9 +2405,7 @@ mt7531_setup_common(struct dsa_switch *d
+ 		mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR);
+ 
+ 		if (dsa_is_cpu_port(ds, i)) {
+-			ret = mt753x_cpu_port_enable(ds, i);
+-			if (ret)
+-				return ret;
++			mt753x_cpu_port_enable(ds, i);
+ 		} else {
+ 			mt7530_port_disable(ds, i);
+ 
+@@ -2510,10 +2494,6 @@ mt7531_setup(struct dsa_switch *ds)
+ 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
+ 		   MT7531_GPIO0_INTERRUPT);
+ 
+-	/* Let phylink decide the interface later. */
+-	priv->p5_interface = PHY_INTERFACE_MODE_NA;
+-	priv->p6_interface = PHY_INTERFACE_MODE_NA;
+-
+ 	/* Enable PHY core PLL, since phy_device has not yet been created
+ 	 * provided for phy_[read,write]_mmd_indirect is called, we provide
+ 	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
+@@ -2725,26 +2705,9 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	struct mt7530_priv *priv = ds->priv;
+ 	u32 mcr_cur, mcr_new;
+ 
+-	switch (port) {
+-	case 5:
+-		if (priv->p5_interface == state->interface)
+-			break;
+-
++	if (port == 5 || port == 6)
+ 		mt753x_mac_config(ds, port, mode, state);
+ 
+-		if (priv->p5_intf_sel != P5_DISABLED)
+-			priv->p5_interface = state->interface;
+-		break;
+-	case 6:
+-		if (priv->p6_interface == state->interface)
+-			break;
+-
+-		mt753x_mac_config(ds, port, mode, state);
+-
+-		priv->p6_interface = state->interface;
+-		break;
+-	}
+-
+ 	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
+ 	mcr_new = mcr_cur;
+ 	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
+@@ -2780,17 +2743,10 @@ static void mt753x_phylink_mac_link_up(s
+ 
+ 	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
+ 
+-	/* MT753x MAC works in 1G full duplex mode for all up-clocked
+-	 * variants.
+-	 */
+-	if (interface == PHY_INTERFACE_MODE_TRGMII ||
+-	    (phy_interface_mode_is_8023z(interface))) {
+-		speed = SPEED_1000;
+-		duplex = DUPLEX_FULL;
+-	}
+-
+ 	switch (speed) {
+ 	case SPEED_1000:
++	case SPEED_2500:
++	case SPEED_10000:
+ 		mcr |= PMCR_FORCE_SPEED_1000;
+ 		break;
+ 	case SPEED_100:
+@@ -2808,6 +2764,7 @@ static void mt753x_phylink_mac_link_up(s
+ 	if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
+ 		switch (speed) {
+ 		case SPEED_1000:
++		case SPEED_2500:
+ 			mcr |= PMCR_FORCE_EEE1G;
+ 			break;
+ 		case SPEED_100:
+@@ -2819,61 +2776,6 @@ static void mt753x_phylink_mac_link_up(s
+ 	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
+ }
+ 
+-static int
+-mt7531_cpu_port_config(struct dsa_switch *ds, int port)
+-{
+-	struct mt7530_priv *priv = ds->priv;
+-	phy_interface_t interface;
+-	int speed;
+-
+-	switch (port) {
+-	case 5:
+-		if (!priv->p5_sgmii)
+-			interface = PHY_INTERFACE_MODE_RGMII;
+-		else
+-			interface = PHY_INTERFACE_MODE_2500BASEX;
+-
+-		priv->p5_interface = interface;
+-		break;
+-	case 6:
+-		interface = PHY_INTERFACE_MODE_2500BASEX;
+-
+-		priv->p6_interface = interface;
+-		break;
+-	default:
+-		return -EINVAL;
+-	}
+-
+-	if (interface == PHY_INTERFACE_MODE_2500BASEX)
+-		speed = SPEED_2500;
+-	else
+-		speed = SPEED_1000;
+-
+-	mt7531_mac_config(ds, port, MLO_AN_FIXED, interface);
+-
+-	mt7530_write(priv, MT7530_PMCR_P(port),
+-		     PMCR_CPU_PORT_SETTING(priv->id));
+-	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
+-				   speed, DUPLEX_FULL, true, true);
+-
+-	return 0;
+-}
+-
+-static int
+-mt7988_cpu_port_config(struct dsa_switch *ds, int port)
+-{
+-	struct mt7530_priv *priv = ds->priv;
+-
+-	mt7530_write(priv, MT7530_PMCR_P(port),
+-		     PMCR_CPU_PORT_SETTING(priv->id));
+-
+-	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED,
+-				   PHY_INTERFACE_MODE_INTERNAL, NULL,
+-				   SPEED_10000, DUPLEX_FULL, true, true);
+-
+-	return 0;
+-}
+-
+ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
+ 				    struct phylink_config *config)
+ {
+@@ -3132,7 +3034,6 @@ const struct mt753x_info mt753x_table[]
+ 		.phy_write_c22 = mt7531_ind_c22_phy_write,
+ 		.phy_read_c45 = mt7531_ind_c45_phy_read,
+ 		.phy_write_c45 = mt7531_ind_c45_phy_write,
+-		.cpu_port_config = mt7531_cpu_port_config,
+ 		.mac_port_get_caps = mt7531_mac_port_get_caps,
+ 		.mac_port_config = mt7531_mac_config,
+ 	},
+@@ -3144,7 +3045,6 @@ const struct mt753x_info mt753x_table[]
+ 		.phy_write_c22 = mt7531_ind_c22_phy_write,
+ 		.phy_read_c45 = mt7531_ind_c45_phy_read,
+ 		.phy_write_c45 = mt7531_ind_c45_phy_write,
+-		.cpu_port_config = mt7988_cpu_port_config,
+ 		.mac_port_get_caps = mt7988_mac_port_get_caps,
+ 	},
+ };
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -331,13 +331,6 @@ enum mt7530_vlan_port_acc_frm {
+ 					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
+ 					 PMCR_FORCE_FDX | PMCR_FORCE_LNK | \
+ 					 PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100)
+-#define  PMCR_CPU_PORT_SETTING(id)	(PMCR_FORCE_MODE_ID((id)) | \
+-					 PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | \
+-					 PMCR_BACKOFF_EN | PMCR_BACKPR_EN | \
+-					 PMCR_TX_EN | PMCR_RX_EN | \
+-					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
+-					 PMCR_FORCE_SPEED_1000 | \
+-					 PMCR_FORCE_FDX | PMCR_FORCE_LNK)
+ 
+ #define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
+ #define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
+@@ -744,7 +737,6 @@ struct mt753x_info {
+ 			    int regnum);
+ 	int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad,
+ 			     int regnum, u16 val);
+-	int (*cpu_port_config)(struct dsa_switch *ds, int port);
+ 	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
+ 				  struct phylink_config *config);
+ 	void (*mac_port_validate)(struct dsa_switch *ds, int port,
+@@ -770,7 +762,6 @@ struct mt753x_info {
+  * @ports:		Holding the state among ports
+  * @reg_mutex:		The lock for protecting among process accessing
+  *			registers
+- * @p6_interface	Holding the current port 6 interface
+  * @p5_intf_sel:	Holding the current port 5 interface select
+  * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
+  *			has got SGMII
+@@ -792,8 +783,6 @@ struct mt7530_priv {
+ 	const struct mt753x_info *info;
+ 	unsigned int		id;
+ 	bool			mcm;
+-	phy_interface_t		p6_interface;
+-	phy_interface_t		p5_interface;
+ 	enum p5_interface_select p5_intf_sel;
+ 	bool			p5_sgmii;
+ 	u8			mirror_rx;
diff --git a/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch b/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
new file mode 100644
index 0000000000..95226ace49
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
@@ -0,0 +1,48 @@
+From c74a98baa8d098157975b3f94e496dd3a73e0864 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:02 +0200
+Subject: [PATCH 24/30] net: dsa: mt7530: get rid of mt753x_mac_config()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There is no need for a separate function to call
+priv->info->mac_port_config(). Call it from mt753x_phylink_mac_config()
+instead and remove mt753x_mac_config().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2670,16 +2670,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+ 	}
+ }
+ 
+-static void
+-mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+-		  const struct phylink_link_state *state)
+-{
+-	struct mt7530_priv *priv = ds->priv;
+-
+-	if (priv->info->mac_port_config)
+-		priv->info->mac_port_config(ds, port, mode, state->interface);
+-}
+-
+ static struct phylink_pcs *
+ mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
+ 			      phy_interface_t interface)
+@@ -2705,8 +2695,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	struct mt7530_priv *priv = ds->priv;
+ 	u32 mcr_cur, mcr_new;
+ 
+-	if (port == 5 || port == 6)
+-		mt753x_mac_config(ds, port, mode, state);
++	if ((port == 5 || port == 6) && priv->info->mac_port_config)
++		priv->info->mac_port_config(ds, port, mode, state->interface);
+ 
+ 	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
+ 	mcr_new = mcr_cur;
diff --git a/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch b/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
new file mode 100644
index 0000000000..44668444cf
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
@@ -0,0 +1,57 @@
+From ab1ddb241bc1cb3d80aa51207810edd5cb0bbdc5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:03 +0200
+Subject: [PATCH 25/30] net: dsa: mt7530: put initialising PCS devices code
+ back to original order
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The commit fae463084032 ("net: dsa: mt753x: fix pcs conversion regression")
+fixes regression caused by cpu_port_config manually calling phylink
+operations. cpu_port_config was deemed useless and was removed. Therefore,
+put initialising PCS devices code back to its original order.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2848,17 +2848,9 @@ static int
+ mt753x_setup(struct dsa_switch *ds)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	int i, ret;
++	int ret = priv->info->sw_setup(ds);
++	int i;
+ 
+-	/* Initialise the PCS devices */
+-	for (i = 0; i < priv->ds->num_ports; i++) {
+-		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
+-		priv->pcs[i].pcs.neg_mode = true;
+-		priv->pcs[i].priv = priv;
+-		priv->pcs[i].port = i;
+-	}
+-
+-	ret = priv->info->sw_setup(ds);
+ 	if (ret)
+ 		return ret;
+ 
+@@ -2870,6 +2862,14 @@ mt753x_setup(struct dsa_switch *ds)
+ 	if (ret && priv->irq)
+ 		mt7530_free_irq_common(priv);
+ 
++	/* Initialise the PCS devices */
++	for (i = 0; i < priv->ds->num_ports; i++) {
++		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
++		priv->pcs[i].pcs.neg_mode = true;
++		priv->pcs[i].priv = priv;
++		priv->pcs[i].port = i;
++	}
++
+ 	if (priv->create_sgmii) {
+ 		ret = priv->create_sgmii(priv);
+ 		if (ret && priv->irq)
diff --git a/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch b/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
new file mode 100644
index 0000000000..4992230dc5
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
@@ -0,0 +1,68 @@
+From aa474698f75f4790a4de2052dd487736d2361b2e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:04 +0200
+Subject: [PATCH 26/30] net: dsa: mt7530: sort link settings ops and force link
+ down on all ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+port_enable and port_disable clears the link settings. Move that to
+mt7530_setup() and mt7531_setup_common() which set up the switches. This
+way, the link settings are cleared on all ports at setup, and then only
+once with phylink_mac_link_down() when a link goes down.
+
+Enable force mode at setup to apply the force part of the link settings.
+This ensures that disabled ports will have their link down.
+
+Suggested-by: Vladimir Oltean <olteanv at gmail.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1054,7 +1054,6 @@ mt7530_port_enable(struct dsa_switch *ds
+ 	priv->ports[port].enable = true;
+ 	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
+ 		   priv->ports[port].pm);
+-	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ 
+@@ -1074,7 +1073,6 @@ mt7530_port_disable(struct dsa_switch *d
+ 	priv->ports[port].enable = false;
+ 	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
+ 		   PCR_MATRIX_CLR);
+-	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+@@ -2293,6 +2291,12 @@ mt7530_setup(struct dsa_switch *ds)
+ 	mt7530_mib_reset(ds);
+ 
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++		/* Clear link settings and enable force mode to force link down
++		 * on all ports until they're enabled later.
++		 */
++		mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
++			   PMCR_FORCE_MODE, PMCR_FORCE_MODE);
++
+ 		/* Disable forwarding by default on all ports */
+ 		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
+ 			   PCR_MATRIX_CLR);
+@@ -2395,6 +2399,12 @@ mt7531_setup_common(struct dsa_switch *d
+ 		     UNU_FFP_MASK);
+ 
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++		/* Clear link settings and enable force mode to force link down
++		 * on all ports until they're enabled later.
++		 */
++		mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
++			   MT7531_FORCE_MODE, MT7531_FORCE_MODE);
++
+ 		/* Disable forwarding by default on all ports */
+ 		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
+ 			   PCR_MATRIX_CLR);
diff --git a/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch b/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch
new file mode 100644
index 0000000000..ee5353673c
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch
@@ -0,0 +1,83 @@
+From 1ca89c2e349d7c5e045911d741dacf4c83d029e7 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:05 +0200
+Subject: [PATCH 27/30] net: dsa: mt7530: simplify link operations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The "MT7621 Giga Switch Programming Guide v0.3", "MT7531 Reference Manual
+for Development Board v1.0", and "MT7988A Wi-Fi 7 Generation Router
+Platform: Datasheet (Open Version) v0.1" documents show that these bits are
+enabled at reset:
+
+PMCR_IFG_XMIT(1) (not part of PMCR_LINK_SETTINGS_MASK)
+PMCR_MAC_MODE (not part of PMCR_LINK_SETTINGS_MASK)
+PMCR_TX_EN
+PMCR_RX_EN
+PMCR_BACKOFF_EN (not part of PMCR_LINK_SETTINGS_MASK)
+PMCR_BACKPR_EN (not part of PMCR_LINK_SETTINGS_MASK)
+PMCR_TX_FC_EN
+PMCR_RX_FC_EN
+
+These bits also don't exist on the MT7530_PMCR_P(6) register of the switch
+on the MT7988 SoC:
+
+PMCR_IFG_XMIT()
+PMCR_MAC_MODE
+PMCR_BACKOFF_EN
+PMCR_BACKPR_EN
+
+Remove the setting of the bits not part of PMCR_LINK_SETTINGS_MASK on
+phylink_mac_config as they're already set.
+
+The bit for setting the port on force mode is already done on
+mt7530_setup() and mt7531_setup_common(). So get rid of
+PMCR_FORCE_MODE_ID() which helped determine which bit to use for the switch
+model.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 12 +-----------
+ drivers/net/dsa/mt7530.h |  2 --
+ 2 files changed, 1 insertion(+), 13 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2703,23 +2703,13 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 			  const struct phylink_link_state *state)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	u32 mcr_cur, mcr_new;
+ 
+ 	if ((port == 5 || port == 6) && priv->info->mac_port_config)
+ 		priv->info->mac_port_config(ds, port, mode, state->interface);
+ 
+-	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
+-	mcr_new = mcr_cur;
+-	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
+-	mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN |
+-		   PMCR_BACKPR_EN | PMCR_FORCE_MODE_ID(priv->id);
+-
+ 	/* Are we connected to external phy */
+ 	if (port == 5 && dsa_is_user_port(ds, 5))
+-		mcr_new |= PMCR_EXT_PHY;
+-
+-	if (mcr_new != mcr_cur)
+-		mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
++		mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY);
+ }
+ 
+ static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -324,8 +324,6 @@ enum mt7530_vlan_port_acc_frm {
+ 					 MT7531_FORCE_DPX | \
+ 					 MT7531_FORCE_RX_FC | \
+ 					 MT7531_FORCE_TX_FC)
+-#define  PMCR_FORCE_MODE_ID(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+-					 MT7531_FORCE_MODE : PMCR_FORCE_MODE)
+ #define  PMCR_LINK_SETTINGS_MASK	(PMCR_TX_EN | PMCR_FORCE_SPEED_1000 | \
+ 					 PMCR_RX_EN | PMCR_FORCE_SPEED_100 | \
+ 					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
diff --git a/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch b/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch
new file mode 100644
index 0000000000..19a04a7164
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch
@@ -0,0 +1,94 @@
+From de16cf680331cd0bd7db97c3f8d376f5eac39cae Mon Sep 17 00:00:00 2001
+From: Justin Swartz <justin.swartz at risingedge.co.za>
+Date: Tue, 5 Mar 2024 06:39:51 +0200
+Subject: [PATCH 28/30] net: dsa: mt7530: disable LEDs before reset
+
+Disable LEDs just before resetting the MT7530 to avoid
+situations where the ESW_P4_LED_0 and ESW_P3_LED_0 pin
+states may cause an unintended external crystal frequency
+to be selected.
+
+The HT_XTAL_FSEL (External Crystal Frequency Selection)
+field of HWTRAP (the Hardware Trap register) stores a
+2-bit value that represents the state of the ESW_P4_LED_0
+and ESW_P4_LED_0 pins (seemingly) sampled just after the
+MT7530 has been reset, as:
+
+    ESW_P4_LED_0    ESW_P3_LED_0    Frequency
+    -----------------------------------------
+    0               1               20MHz
+    1               0               40MHz
+    1               1               25MHz
+
+The value of HT_XTAL_FSEL is bootstrapped by pulling
+ESW_P4_LED_0 and ESW_P3_LED_0 up or down accordingly,
+but:
+
+  if a 40MHz crystal has been selected and
+  the ESW_P3_LED_0 pin is high during reset,
+
+  or a 20MHz crystal has been selected and
+  the ESW_P4_LED_0 pin is high during reset,
+
+  then the value of HT_XTAL_FSEL will indicate
+  that a 25MHz crystal is present.
+
+By default, the state of the LED pins is PHY controlled
+to reflect the link state.
+
+To illustrate, if a board has:
+
+  5 ports with active low LED control,
+  and HT_XTAL_FSEL bootstrapped for 40MHz.
+
+When the MT7530 is powered up without any external
+connection, only the LED associated with Port 3 is
+illuminated as ESW_P3_LED_0 is low.
+
+In this state, directly after mt7530_setup()'s reset
+is performed, the HWTRAP register (0x7800) reflects
+the intended HT_XTAL_FSEL (HWTRAP bits 10:9) of 40MHz:
+
+  mt7530-mdio mdio-bus:1f: mt7530_read: 00007800 == 00007dcf
+
+  >>> bin(0x7dcf >> 9 & 0b11)
+  '0b10'
+
+But if a cable is connected to Port 3 and the link
+is active before mt7530_setup()'s reset takes place,
+then HT_XTAL_FSEL seems to be set for 25MHz:
+
+  mt7530-mdio mdio-bus:1f: mt7530_read: 00007800 == 00007fcf
+
+  >>> bin(0x7fcf >> 9 & 0b11)
+  '0b11'
+
+Once HT_XTAL_FSEL reflects 25MHz, none of the ports
+are functional until the MT7621 (or MT7530 itself)
+is reset.
+
+By disabling the LED pins just before reset, the chance
+of an unintended HT_XTAL_FSEL value is reduced.
+
+Signed-off-by: Justin Swartz <justin.swartz at risingedge.co.za>
+Link: https://lore.kernel.org/r/20240305043952.21590-1-justin.swartz at risingedge.co.za
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2228,6 +2228,12 @@ mt7530_setup(struct dsa_switch *ds)
+ 		}
+ 	}
+ 
++	/* Disable LEDs before reset to prevent the MT7530 sampling a
++	 * potentially incorrect HT_XTAL_FSEL value.
++	 */
++	mt7530_write(priv, MT7530_LED_EN, 0);
++	usleep_range(1000, 1100);
++
+ 	/* Reset whole chip through gpio pin or memory-mapped registers for
+ 	 * different type of hardware
+ 	 */
diff --git a/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch b/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
new file mode 100644
index 0000000000..57a775da39
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
@@ -0,0 +1,74 @@
+From fa14c96eab3ec5b7cb44b06c0a54a851849a9810 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Wed, 20 Mar 2024 23:45:30 +0300
+Subject: [PATCH 29/30] net: dsa: mt7530: fix improper frames on all 25MHz and
+ 40MHz XTAL MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530 switch after reset initialises with a core clock frequency that
+works with a 25MHz XTAL connected to it. For 40MHz XTAL, the core clock
+frequency must be set to 500MHz.
+
+The mt7530_pll_setup() function is responsible of setting the core clock
+frequency. Currently, it runs on MT7530 with 25MHz and 40MHz XTAL. This
+causes MT7530 switch with 25MHz XTAL to egress and ingress frames
+improperly.
+
+Introduce a check to run it only on MT7530 with 40MHz XTAL.
+
+The core clock frequency is set by writing to a switch PHY's register.
+Access to the PHY's register is done via the MDIO bus the switch is also
+on. Therefore, it works only when the switch makes switch PHYs listen on
+the MDIO bus the switch is on. This is controlled either by the state of
+the ESW_P1_LED_1 pin after reset deassertion or modifying bit 5 of the
+modifiable trap register.
+
+When ESW_P1_LED_1 is pulled high, PHY indirect access is used. That means
+accessing PHY registers via the PHY indirect access control register of the
+switch.
+
+When ESW_P1_LED_1 is pulled low, PHY direct access is used. That means
+accessing PHY registers via the MDIO bus the switch is on.
+
+For MT7530 switch with 40MHz XTAL on a board with ESW_P1_LED_1 pulled high,
+the core clock frequency won't be set to 500MHz, causing the switch to
+egress and ingress frames improperly.
+
+Run mt7530_pll_setup() after PHY direct access is set on the modifiable
+trap register.
+
+With these two changes, all MT7530 switches with 25MHz and 40MHz, and
+P1_LED_1 pulled high or low, will egress and ingress frames properly.
+
+Link: https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/4a5dd143f2172ec97a2872fa29c7c4cd520f45b5/linux-mt/drivers/net/ethernet/mediatek/gsw_mt7623.c#L1039
+Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240320-for-net-mt7530-fix-25mhz-xtal-with-direct-phy-access-v1-1-d92f605f1160 at arinc9.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2274,8 +2274,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
+ 		     SYS_CTRL_REG_RST);
+ 
+-	mt7530_pll_setup(priv);
+-
+ 	/* Lower Tx driving for TRGMII path */
+ 	for (i = 0; i < NUM_TRGMII_CTRL; i++)
+ 		mt7530_write(priv, MT7530_TRGMII_TD_ODT(i),
+@@ -2291,6 +2289,9 @@ mt7530_setup(struct dsa_switch *ds)
+ 	val |= MHWTRAP_MANUAL;
+ 	mt7530_write(priv, MT7530_MHWTRAP, val);
+ 
++	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ)
++		mt7530_pll_setup(priv);
++
+ 	mt753x_trap_frames(priv);
+ 
+ 	/* Enable and reset MIB counters */
diff --git a/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch b/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
new file mode 100644
index 0000000000..f1c4db49dc
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
@@ -0,0 +1,154 @@
+From b9547109205c5e0a27e5bed568b0fc183fff906b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 14 Mar 2024 12:28:35 +0300
+Subject: [PATCH 30/30] net: dsa: mt7530: prevent possible incorrect XTAL
+ frequency selection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On MT7530, the HT_XTAL_FSEL field of the HWTRAP register stores a 2-bit
+value that represents the frequency of the crystal oscillator connected to
+the switch IC. The field is populated by the state of the ESW_P4_LED_0 and
+ESW_P4_LED_0 pins, which is done right after reset is deasserted.
+
+  ESW_P4_LED_0    ESW_P3_LED_0    Frequency
+  -----------------------------------------
+  0               0               Reserved
+  0               1               20MHz
+  1               0               40MHz
+  1               1               25MHz
+
+On MT7531, the XTAL25 bit of the STRAP register stores this. The LAN0LED0
+pin is used to populate the bit. 25MHz when the pin is high, 40MHz when
+it's low.
+
+These pins are also used with LEDs, therefore, their state can be set to
+something other than the bootstrapping configuration. For example, a link
+may be established on port 3 before the DSA subdriver takes control of the
+switch which would set ESW_P3_LED_0 to high.
+
+Currently on mt7530_setup() and mt7531_setup(), 1000 - 1100 usec delay is
+described between reset assertion and deassertion. Some switch ICs in real
+life conditions cannot always have these pins set back to the bootstrapping
+configuration before reset deassertion in this amount of delay. This causes
+wrong crystal frequency to be selected which puts the switch in a
+nonfunctional state after reset deassertion.
+
+The tests below are conducted on an MT7530 with a 40MHz crystal oscillator
+by Justin Swartz.
+
+With a cable from an active peer connected to port 3 before reset, an
+incorrect crystal frequency (0b11 = 25MHz) is selected:
+
+                      [1]                  [3]     [5]
+                      :                    :       :
+              _____________________________         __________________
+ESW_P4_LED_0                               |_______|
+              _____________________________
+ESW_P3_LED_0                               |__________________________
+
+                       :                  : :     :
+                       :                  : [4]...:
+                       :                  :
+                       [2]................:
+
+[1] Reset is asserted.
+[2] Period of 1000 - 1100 usec.
+[3] Reset is deasserted.
+[4] Period of 315 usec. HWTRAP register is populated with incorrect
+    XTAL frequency.
+[5] Signals reflect the bootstrapped configuration.
+
+Increase the delay between reset_control_assert() and
+reset_control_deassert(), and gpiod_set_value_cansleep(priv->reset, 0) and
+gpiod_set_value_cansleep(priv->reset, 1) to 5000 - 5100 usec. This amount
+ensures a higher possibility that the switch IC will have these pins back
+to the bootstrapping configuration before reset deassertion.
+
+With a cable from an active peer connected to port 3 before reset, the
+correct crystal frequency (0b10 = 40MHz) is selected:
+
+                      [1]        [2-1]     [3]     [5]
+                      :          :         :       :
+              _____________________________         __________________
+ESW_P4_LED_0                               |_______|
+              ___________________           _______
+ESW_P3_LED_0                     |_________|       |__________________
+
+                       :          :       : :     :
+                       :          [2-2]...: [4]...:
+                       [2]................:
+
+[1] Reset is asserted.
+[2] Period of 5000 - 5100 usec.
+[2-1] ESW_P3_LED_0 goes low.
+[2-2] Remaining period of 5000 - 5100 usec.
+[3] Reset is deasserted.
+[4] Period of 310 usec. HWTRAP register is populated with bootstrapped
+    XTAL frequency.
+[5] Signals reflect the bootstrapped configuration.
+
+ESW_P3_LED_0 low period before reset deassertion:
+
+              5000 usec
+            - 5100 usec
+    TEST     RESET HOLD
+       #         (usec)
+  ---------------------
+       1           5410
+       2           5440
+       3           4375
+       4           5490
+       5           5475
+       6           4335
+       7           4370
+       8           5435
+       9           4205
+      10           4335
+      11           3750
+      12           3170
+      13           4395
+      14           4375
+      15           3515
+      16           4335
+      17           4220
+      18           4175
+      19           4175
+      20           4350
+
+     Min           3170
+     Max           5490
+
+  Median       4342.500
+     Avg       4466.500
+
+Revert commit 2920dd92b980 ("net: dsa: mt7530: disable LEDs before reset").
+Changing the state of pins via reset assertion is simpler and more
+efficient than doing so by setting the LED controller off.
+
+Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
+Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch")
+Co-developed-by: Justin Swartz <justin.swartz at risingedge.co.za>
+Signed-off-by: Justin Swartz <justin.swartz at risingedge.co.za>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mt7530.c | 6 ------
+ 1 file changed, 6 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2228,12 +2228,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 		}
+ 	}
+ 
+-	/* Disable LEDs before reset to prevent the MT7530 sampling a
+-	 * potentially incorrect HT_XTAL_FSEL value.
+-	 */
+-	mt7530_write(priv, MT7530_LED_EN, 0);
+-	usleep_range(1000, 1100);
+-
+ 	/* Reset whole chip through gpio pin or memory-mapped registers for
+ 	 * different type of hardware
+ 	 */
diff --git a/target/linux/generic/pending-6.6/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-6.6/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
deleted file mode 100644
index 8028dc826f..0000000000
--- a/target/linux/generic/pending-6.6/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3fb8841513c4ec3a2e5d366df86230c45f239a57 Mon Sep 17 00:00:00 2001
-From: Alexander Couzens <lynxis at fe80.eu>
-Date: Sat, 13 Aug 2022 13:08:22 +0200
-Subject: [PATCH 03/10] net: mt7531: ensure all MACs are powered down before
- reset
-
-The datasheet [1] explicit describes it as requirement for a reset.
-
-[1] MT7531 Reference Manual for Development Board rev 1.0, page 735
-
-Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
----
- drivers/net/dsa/mt7530.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2304,6 +2304,10 @@ mt7530_setup(struct dsa_switch *ds)
- 		return -ENODEV;
- 	}
- 
-+	/* all MACs must be forced link-down before sw reset */
-+	for (i = 0; i < MT7530_NUM_PORTS; i++)
-+		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
-+
- 	/* Reset the switch through internal reset */
- 	mt7530_write(priv, MT7530_SYS_CTRL,
- 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
diff --git a/target/linux/generic/pending-6.6/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-6.6/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
deleted file mode 100644
index 4fa5c4ea96..0000000000
--- a/target/linux/generic/pending-6.6/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 1d81e51d6d79d9098013b2e8cdd677bae998c5d8 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Fri, 28 Apr 2023 02:22:59 +0200
-Subject: [PATCH 1/2] mt7530: register OF node for internal MDIO bus
-
-The MT753x switches provide a switch-internal MDIO bus for the embedded
-PHYs.
-
-Register a OF sub-node on the switch OF-node for this internal MDIO bus.
-This allows to configure the embedded PHYs using device-tree.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
----
- drivers/net/dsa/mt7530.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2192,10 +2192,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
- {
- 	struct dsa_switch *ds = priv->ds;
- 	struct device *dev = priv->dev;
-+	struct device_node *np, *mnp;
- 	struct mii_bus *bus;
- 	static int idx;
- 	int ret;
- 
-+	np = priv->dev->of_node;
-+
- 	bus = devm_mdiobus_alloc(dev);
- 	if (!bus)
- 		return -ENOMEM;
-@@ -2214,7 +2217,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
- 	if (priv->irq)
- 		mt7530_setup_mdio_irq(priv);
- 
--	ret = devm_mdiobus_register(dev, bus);
-+	mnp = of_get_child_by_name(np, "mdio");
-+	ret = devm_of_mdiobus_register(dev, bus, mnp);
-+	of_node_put(mnp);
- 	if (ret) {
- 		dev_err(dev, "failed to register MDIO bus: %d\n", ret);
- 		if (priv->irq)



From lede-commits at lists.infradead.org  Wed Apr 10 11:16:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 10 Apr 2024 14:16:52 -0400
Subject: [openwrt/openwrt]  generic: 6.1: sync mt7530 DSA driver with upstream
In-Reply-To: <171277301268.2136345.15486158673926487330@git-01.infra.openwrt.org>
References: <171277301268.2136345.15486158673926487330@git-01.infra.openwrt.org>
Message-ID: <mailman.25746.1712773031.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/401a6ccfaf835da0008f1d7a01b7757e063777ff

commit 401a6ccfaf835da0008f1d7a01b7757e063777ff
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Apr 9 23:33:05 2024 +0100

    generic: 6.1: sync mt7530 DSA driver with upstream
    
    Backport lots upstream changes, many of them fixes, for the mt7530 DSA
    driver. Some of them may or may not find they way into Linux 6.1
    stable, some certainly won't because they are fixes for backported
    commits which aren't even present in Linux 6.1 upstream.
    
    Apart from adding new patches, also remove mutated patch
    723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
    which should never have been added for Linux 6.1 -- it was applied
    already upstream but coincidentally would fuzzy-apply in the wrong
    place as well (for MT7530 instead of MT7531). While that didn't really
    hurt anyone it is just unneeded.
    
    The other deleted patch
    795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
    has been replaced by an equivalent commit with a more complete patch
    description by upstream maintainer Ar?n? ?nal.
    
    The remaining differences compared to the upstream driver are:
     * C22/C45 MDIO ops aren't split
       Upstream did that, backporting it would require making changes to
       *all* DSA drivers
     * 'slave' -> 'user', 'master' -> 'conduit' language change in DSA
     * support for selecting preferred CPU port on MT7531
       Also this would require too many DSA framework changes potentially
       affecting other devices. If we ever really use Linux 6.1 in a
       release (I hope not) we can still reconsider to make the effort to
       backport that.
    
    In addition to some minor bug fixes and style improvements the switch
    should now behave more conformant when it comes to link-local frames,
    and we will again be able to cleanly pick patches from upstream.
    
    MAINTAIERS NOTE:
    Three patches are already part of Linux stable and should be removed with
    the next minor kernel version bump:
    789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
    789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch
    789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...530-prevent-possible-incorrect-XTAL-frequ.patch | 172 ++++++++++++
 ...530-fix-link-local-frames-that-ingress-vl.patch | 173 ++++++++++++
 ...530-fix-handling-of-all-link-local-frames.patch | 133 +++++++++
 ...et-dsa-mt7530-remove-redundant-assignment.patch |  32 +++
 ...4-net-dsa-mt7530-use-external-PCS-driver.patch} |  81 ++----
 ...30-make-some-noise-if-register-read-fail.patch} |   4 +-
 ...t-dsa-mt7530-refactor-SGMII-PCS-creation.patch} |   8 +-
 ...dsa-mt7530-use-unlocked-regmap-accessors.patch} |  10 +-
 ...30-use-regmap-to-access-switch-register-.patch} |  18 +-
 ...30-move-SGMII-PCS-creation-to-mt7530_pro.patch} |  10 +-
 ...4-net-dsa-mt7530-introduce-mutex-helpers.patch} |  16 +-
 ...30-move-p5_intf_modes-function-to-mt7530.patch} |   6 +-
 ...30-introduce-mt7530_probe_common-helper-.patch} |  10 +-
 ...30-introduce-mt7530_remove_common-helper.patch} |   8 +-
 ...sa-mt7530-introduce-separate-MDIO-driver.patch} |  32 ++-
 ...30-skip-locking-if-MDIO-bus-isn-t-presen.patch} |   4 +-
 ...30-introduce-driver-for-MT7988-built-in-.patch} |  28 +-
 ...-net-dsa-mt7530-fix-support-for-MT7531BE.patch} |  12 +-
 ...7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch |  79 ++++++
 ...-mt7530-update-PCS-driver-to-use-neg_mode.patch |  35 +++
 ...530-Convert-to-platform-remove-callback-r.patch |  58 ++++
 ...-mt753x-remove-mt753x_phylink_pcs_link_up.patch |  51 ++++
 ...530-replace-deprecated-strncpy-with-ethto.patch |  40 +++
 ...530-support-OF-based-registration-of-swit.patch | 116 ++++++++
 ...t7530-fix-10M-100M-speed-on-MT7988-switch.patch |  34 +++
 ...530-always-trap-frames-to-active-CPU-port.patch | 125 +++++++++
 ...530-use-p5_interface_select-as-data-type-.patch |  45 +++
 ...530-store-port-5-SGMII-capability-of-MT75.patch | 227 +++++++++++++++
 ...530-improve-comments-regarding-switch-por.patch | 133 +++++++++
 ...530-improve-code-path-for-setting-up-port.patch |  95 +++++++
 ...530-do-not-set-priv-p5_interface-on-mt753.patch |  42 +++
 ...530-do-not-run-mt7530_setup_port5-if-port.patch |  62 +++++
 ...530-empty-default-case-on-mt7530_setup_po.patch |  58 ++++
 ...sa-mt7530-move-XTAL-check-to-mt7530_setup.patch |  53 ++++
 ...-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch | 146 ++++++++++
 ...530-call-port-6-setup-from-mt7530_mac_con.patch |  97 +++++++
 ...-mt7530-remove-pad_setup-function-pointer.patch | 148 ++++++++++
 ...t7530-correct-port-capabilities-of-MT7988.patch |  36 +++
 ...530-do-not-clear-config-supported_interfa.patch |  38 +++
 ...530-remove-.mac_port_config-for-MT7988-an.patch |  81 ++++++
 ...530-set-interrupt-register-only-for-MT753.patch |  31 +++
 ...530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch |  41 +++
 ...530-get-rid-of-useless-error-returns-on-p.patch | 217 +++++++++++++++
 ...7530-get-rid-of-priv-info-cpu_port_config.patch | 305 +++++++++++++++++++++
 ...t-dsa-mt7530-get-rid-of-mt753x_mac_config.patch |  48 ++++
 ...530-put-initialising-PCS-devices-code-bac.patch |  57 ++++
 ...530-sort-link-settings-ops-and-force-link.patch |  68 +++++
 ...9-net-dsa-mt7530-simplify-link-operations.patch |  83 ++++++
 ...530-fix-improper-frames-on-all-25MHz-and-.patch |  74 +++++
 ...ensure-all-MACs-are-powered-down-before-r.patch |  28 --
 ...30-register-OF-node-for-internal-MDIO-bus.patch |  43 ---
 ...t7530-fix-10M-100M-speed-on-MT7988-switch.patch |  45 ---
 52 files changed, 3340 insertions(+), 256 deletions(-)

diff --git a/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch b/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
new file mode 100644
index 0000000000..1b91663d39
--- /dev/null
+++ b/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
@@ -0,0 +1,172 @@
+From be4512b9ac6fc53e1ca8daccbda84f643215c547 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 14 Mar 2024 12:28:35 +0300
+Subject: [PATCH 1/3] net: dsa: mt7530: prevent possible incorrect XTAL
+ frequency selection
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[ Upstream commit f490c492e946d8ffbe65ad4efc66de3c5ede30a4 ]
+
+On MT7530, the HT_XTAL_FSEL field of the HWTRAP register stores a 2-bit
+value that represents the frequency of the crystal oscillator connected to
+the switch IC. The field is populated by the state of the ESW_P4_LED_0 and
+ESW_P4_LED_0 pins, which is done right after reset is deasserted.
+
+  ESW_P4_LED_0    ESW_P3_LED_0    Frequency
+  -----------------------------------------
+  0               0               Reserved
+  0               1               20MHz
+  1               0               40MHz
+  1               1               25MHz
+
+On MT7531, the XTAL25 bit of the STRAP register stores this. The LAN0LED0
+pin is used to populate the bit. 25MHz when the pin is high, 40MHz when
+it's low.
+
+These pins are also used with LEDs, therefore, their state can be set to
+something other than the bootstrapping configuration. For example, a link
+may be established on port 3 before the DSA subdriver takes control of the
+switch which would set ESW_P3_LED_0 to high.
+
+Currently on mt7530_setup() and mt7531_setup(), 1000 - 1100 usec delay is
+described between reset assertion and deassertion. Some switch ICs in real
+life conditions cannot always have these pins set back to the bootstrapping
+configuration before reset deassertion in this amount of delay. This causes
+wrong crystal frequency to be selected which puts the switch in a
+nonfunctional state after reset deassertion.
+
+The tests below are conducted on an MT7530 with a 40MHz crystal oscillator
+by Justin Swartz.
+
+With a cable from an active peer connected to port 3 before reset, an
+incorrect crystal frequency (0b11 = 25MHz) is selected:
+
+                      [1]                  [3]     [5]
+                      :                    :       :
+              _____________________________         __________________
+ESW_P4_LED_0                               |_______|
+              _____________________________
+ESW_P3_LED_0                               |__________________________
+
+                       :                  : :     :
+                       :                  : [4]...:
+                       :                  :
+                       [2]................:
+
+[1] Reset is asserted.
+[2] Period of 1000 - 1100 usec.
+[3] Reset is deasserted.
+[4] Period of 315 usec. HWTRAP register is populated with incorrect
+    XTAL frequency.
+[5] Signals reflect the bootstrapped configuration.
+
+Increase the delay between reset_control_assert() and
+reset_control_deassert(), and gpiod_set_value_cansleep(priv->reset, 0) and
+gpiod_set_value_cansleep(priv->reset, 1) to 5000 - 5100 usec. This amount
+ensures a higher possibility that the switch IC will have these pins back
+to the bootstrapping configuration before reset deassertion.
+
+With a cable from an active peer connected to port 3 before reset, the
+correct crystal frequency (0b10 = 40MHz) is selected:
+
+                      [1]        [2-1]     [3]     [5]
+                      :          :         :       :
+              _____________________________         __________________
+ESW_P4_LED_0                               |_______|
+              ___________________           _______
+ESW_P3_LED_0                     |_________|       |__________________
+
+                       :          :       : :     :
+                       :          [2-2]...: [4]...:
+                       [2]................:
+
+[1] Reset is asserted.
+[2] Period of 5000 - 5100 usec.
+[2-1] ESW_P3_LED_0 goes low.
+[2-2] Remaining period of 5000 - 5100 usec.
+[3] Reset is deasserted.
+[4] Period of 310 usec. HWTRAP register is populated with bootstrapped
+    XTAL frequency.
+[5] Signals reflect the bootstrapped configuration.
+
+ESW_P3_LED_0 low period before reset deassertion:
+
+              5000 usec
+            - 5100 usec
+    TEST     RESET HOLD
+       #         (usec)
+  ---------------------
+       1           5410
+       2           5440
+       3           4375
+       4           5490
+       5           5475
+       6           4335
+       7           4370
+       8           5435
+       9           4205
+      10           4335
+      11           3750
+      12           3170
+      13           4395
+      14           4375
+      15           3515
+      16           4335
+      17           4220
+      18           4175
+      19           4175
+      20           4350
+
+     Min           3170
+     Max           5490
+
+  Median       4342.500
+     Avg       4466.500
+
+Revert commit 2920dd92b980 ("net: dsa: mt7530: disable LEDs before reset").
+Changing the state of pins via reset assertion is simpler and more
+efficient than doing so by setting the LED controller off.
+
+Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
+Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch")
+Co-developed-by: Justin Swartz <justin.swartz at risingedge.co.za>
+Signed-off-by: Justin Swartz <justin.swartz at risingedge.co.za>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+Signed-off-by: Sasha Levin <sashal at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2187,11 +2187,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 	 */
+ 	if (priv->mcm) {
+ 		reset_control_assert(priv->rstc);
+-		usleep_range(1000, 1100);
++		usleep_range(5000, 5100);
+ 		reset_control_deassert(priv->rstc);
+ 	} else {
+ 		gpiod_set_value_cansleep(priv->reset, 0);
+-		usleep_range(1000, 1100);
++		usleep_range(5000, 5100);
+ 		gpiod_set_value_cansleep(priv->reset, 1);
+ 	}
+ 
+@@ -2401,11 +2401,11 @@ mt7531_setup(struct dsa_switch *ds)
+ 	 */
+ 	if (priv->mcm) {
+ 		reset_control_assert(priv->rstc);
+-		usleep_range(1000, 1100);
++		usleep_range(5000, 5100);
+ 		reset_control_deassert(priv->rstc);
+ 	} else {
+ 		gpiod_set_value_cansleep(priv->reset, 0);
+-		usleep_range(1000, 1100);
++		usleep_range(5000, 5100);
+ 		gpiod_set_value_cansleep(priv->reset, 1);
+ 	}
+ 
diff --git a/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch b/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch
new file mode 100644
index 0000000000..0cc6bf7525
--- /dev/null
+++ b/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch
@@ -0,0 +1,173 @@
+From f1fa919ea59655f73cb3972264e157b8831ba546 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 14 Mar 2024 12:33:41 +0300
+Subject: [PATCH 2/3] net: dsa: mt7530: fix link-local frames that ingress vlan
+ filtering ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[ Upstream commit e8bf353577f382c7066c661fed41b2adc0fc7c40 ]
+
+Whether VLAN-aware or not, on every VID VLAN table entry that has the CPU
+port as a member of it, frames are set to egress the CPU port with the VLAN
+tag stacked. This is so that VLAN tags can be appended after hardware
+special tag (called DSA tag in the context of Linux drivers).
+
+For user ports on a VLAN-unaware bridge, frame ingressing the user port
+egresses CPU port with only the special tag.
+
+For user ports on a VLAN-aware bridge, frame ingressing the user port
+egresses CPU port with the special tag and the VLAN tag.
+
+This causes issues with link-local frames, specifically BPDUs, because the
+software expects to receive them VLAN-untagged.
+
+There are two options to make link-local frames egress untagged. Setting
+CONSISTENT or UNTAGGED on the EG_TAG bits on the relevant register.
+CONSISTENT means frames egress exactly as they ingress. That means
+egressing with the VLAN tag they had at ingress or egressing untagged if
+they ingressed untagged. Although link-local frames are not supposed to be
+transmitted VLAN-tagged, if they are done so, when egressing through a CPU
+port, the special tag field will be broken.
+
+BPDU egresses CPU port with VLAN tag egressing stacked, received on
+software:
+
+00:01:25.104821 AF Unknown (382365846), length 106:
+                                     | STAG  | | VLAN  |
+        0x0000:  0000 6c27 614d 4143 0001 0000 8100 0001  ..l'aMAC........
+        0x0010:  0026 4242 0300 0000 0000 0000 6c27 614d  .&BB........l'aM
+        0x0020:  4143 0000 0000 0000 6c27 614d 4143 0000  AC......l'aMAC..
+        0x0030:  0000 1400 0200 0f00 0000 0000 0000 0000  ................
+
+BPDU egresses CPU port with VLAN tag egressing untagged, received on
+software:
+
+00:23:56.628708 AF Unknown (25215488), length 64:
+                                     | STAG  |
+        0x0000:  0000 6c27 614d 4143 0001 0000 0026 4242  ..l'aMAC.....&BB
+        0x0010:  0300 0000 0000 0000 6c27 614d 4143 0000  ........l'aMAC..
+        0x0020:  0000 0000 6c27 614d 4143 0000 0000 1400  ....l'aMAC......
+        0x0030:  0200 0f00 0000 0000 0000 0000            ............
+
+BPDU egresses CPU port with VLAN tag egressing tagged, received on
+software:
+
+00:01:34.311963 AF Unknown (25215488), length 64:
+                                     | Mess  |
+        0x0000:  0000 6c27 614d 4143 0001 0001 0026 4242  ..l'aMAC.....&BB
+        0x0010:  0300 0000 0000 0000 6c27 614d 4143 0000  ........l'aMAC..
+        0x0020:  0000 0000 6c27 614d 4143 0000 0000 1400  ....l'aMAC......
+        0x0030:  0200 0f00 0000 0000 0000 0000            ............
+
+To prevent confusing the software, force the frame to egress UNTAGGED
+instead of CONSISTENT. This way, frames can't possibly be received TAGGED
+by software which would have the special tag field broken.
+
+VLAN Tag Egress Procedure
+
+   For all frames, one of these options set the earliest in this order will
+   apply to the frame:
+
+   - EG_TAG in certain registers for certain frames.
+     This will apply to frame with matching MAC DA or EtherType.
+
+   - EG_TAG in the address table.
+     This will apply to frame at its incoming port.
+
+   - EG_TAG in the PVC register.
+     This will apply to frame at its incoming port.
+
+   - EG_CON and [EG_TAG per port] in the VLAN table.
+     This will apply to frame at its outgoing port.
+
+   - EG_TAG in the PCR register.
+     This will apply to frame at its outgoing port.
+
+   EG_TAG in certain registers for certain frames:
+
+   PPPoE Discovery_ARP/RARP: PPP_EG_TAG and ARP_EG_TAG in the APC register.
+   IGMP_MLD: IGMP_EG_TAG and MLD_EG_TAG in the IMC register.
+   BPDU and PAE: BPDU_EG_TAG and PAE_EG_TAG in the BPC register.
+   REV_01 and REV_02: R01_EG_TAG and R02_EG_TAG in the RGAC1 register.
+   REV_03 and REV_0E: R03_EG_TAG and R0E_EG_TAG in the RGAC2 register.
+   REV_10 and REV_20: R10_EG_TAG and R20_EG_TAG in the RGAC3 register.
+   REV_21 and REV_UN: R21_EG_TAG and RUN_EG_TAG in the RGAC4 register.
+
+With this change, it can be observed that a bridge interface with stp_state
+and vlan_filtering enabled will properly block ports now.
+
+Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+Signed-off-by: Sasha Levin <sashal at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 23 +++++++++++++++--------
+ drivers/net/dsa/mt7530.h |  9 ++++++++-
+ 2 files changed, 23 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1001,16 +1001,23 @@ unlock_exit:
+ static void
+ mt753x_trap_frames(struct mt7530_priv *priv)
+ {
+-	/* Trap BPDUs to the CPU port(s) */
+-	mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK,
++	/* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them
++	 * VLAN-untagged.
++	 */
++	mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK |
++		   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
++		   MT753X_BPDU_PORT_FW_MASK,
++		   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++		   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++		   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+ 		   MT753X_BPDU_CPU_ONLY);
+ 
+-	/* Trap 802.1X PAE frames to the CPU port(s) */
+-	mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_PORT_FW_MASK,
+-		   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY));
+-
+-	/* Trap LLDP frames with :0E MAC DA to the CPU port(s) */
+-	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_PORT_FW_MASK,
++	/* Trap LLDP frames with :0E MAC DA to the CPU port(s) and egress them
++	 * VLAN-untagged.
++	 */
++	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK |
++		   MT753X_R0E_PORT_FW_MASK,
++		   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+ 		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY));
+ }
+ 
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -63,12 +63,18 @@ enum mt753x_id {
+ 
+ /* Registers for BPDU and PAE frame control*/
+ #define MT753X_BPC			0x24
+-#define  MT753X_BPDU_PORT_FW_MASK	GENMASK(2, 0)
++#define  MT753X_PAE_EG_TAG_MASK		GENMASK(24, 22)
++#define  MT753X_PAE_EG_TAG(x)		FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x)
+ #define  MT753X_PAE_PORT_FW_MASK	GENMASK(18, 16)
+ #define  MT753X_PAE_PORT_FW(x)		FIELD_PREP(MT753X_PAE_PORT_FW_MASK, x)
++#define  MT753X_BPDU_EG_TAG_MASK	GENMASK(8, 6)
++#define  MT753X_BPDU_EG_TAG(x)		FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x)
++#define  MT753X_BPDU_PORT_FW_MASK	GENMASK(2, 0)
+ 
+ /* Register for :03 and :0E MAC DA frame control */
+ #define MT753X_RGAC2			0x2c
++#define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
++#define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
+ #define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
+ #define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
+ 
+@@ -251,6 +257,7 @@ enum mt7530_port_mode {
+ enum mt7530_vlan_port_eg_tag {
+ 	MT7530_VLAN_EG_DISABLED = 0,
+ 	MT7530_VLAN_EG_CONSISTENT = 1,
++	MT7530_VLAN_EG_UNTAGGED = 4,
+ };
+ 
+ enum mt7530_vlan_port_attr {
diff --git a/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch b/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch
new file mode 100644
index 0000000000..cf7a3c1283
--- /dev/null
+++ b/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch
@@ -0,0 +1,133 @@
+From 86c0c154a759f2af9612a04bdf29110f02dce956 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 14 Mar 2024 12:33:42 +0300
+Subject: [PATCH 3/3] net: dsa: mt7530: fix handling of all link-local frames
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+[ Upstream commit 69ddba9d170bdaee1dc0eb4ced38d7e4bb7b92af ]
+
+Currently, the MT753X switches treat frames with :01-0D and :0F MAC DAs as
+regular multicast frames, therefore flooding them to user ports.
+
+On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE
+Std 802.1Q?-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC
+DA must only be propagated to C-VLAN and MAC Bridge components. That means
+VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
+these frames are supposed to be processed by the CPU (software). So we make
+the switch only forward them to the CPU port. And if received from a CPU
+port, forward to a single port. The software is responsible of making the
+switch conform to the latter by setting a single port as destination port
+on the special tag.
+
+This switch intellectual property cannot conform to this part of the
+standard fully. Whilst the REV_UN frame tag covers the remaining :04-0D and
+:0F MAC DAs, it also includes :22-FF which the scope of propagation is not
+supposed to be restricted for these MAC DAs.
+
+Set frames with :01-03 MAC DAs to be trapped to the CPU port(s). Add a
+comment for the remaining MAC DAs.
+
+Note that the ingress port must have a PVID assigned to it for the switch
+to forward untagged frames. A PVID is set by default on VLAN-aware and
+VLAN-unaware ports. However, when the network interface that pertains to
+the ingress port is attached to a vlan_filtering enabled bridge, the user
+can remove the PVID assignment from it which would prevent the link-local
+frames from being trapped to the CPU port. I am yet to see a way to forward
+link-local frames while preventing other untagged frames from being
+forwarded too.
+
+Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+Signed-off-by: Sasha Levin <sashal at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 37 +++++++++++++++++++++++++++++++++----
+ drivers/net/dsa/mt7530.h | 13 +++++++++++++
+ 2 files changed, 46 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -998,6 +998,21 @@ unlock_exit:
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+ 
++/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std
++ * 802.1Q?-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA
++ * must only be propagated to C-VLAN and MAC Bridge components. That means
++ * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
++ * these frames are supposed to be processed by the CPU (software). So we make
++ * the switch only forward them to the CPU port. And if received from a CPU
++ * port, forward to a single port. The software is responsible of making the
++ * switch conform to the latter by setting a single port as destination port on
++ * the special tag.
++ *
++ * This switch intellectual property cannot conform to this part of the standard
++ * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC
++ * DAs, it also includes :22-FF which the scope of propagation is not supposed
++ * to be restricted for these MAC DAs.
++ */
+ static void
+ mt753x_trap_frames(struct mt7530_priv *priv)
+ {
+@@ -1012,13 +1027,27 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 		   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+ 		   MT753X_BPDU_CPU_ONLY);
+ 
+-	/* Trap LLDP frames with :0E MAC DA to the CPU port(s) and egress them
+-	 * VLAN-untagged.
++	/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress
++	 * them VLAN-untagged.
++	 */
++	mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK |
++		   MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK |
++		   MT753X_R01_PORT_FW_MASK,
++		   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++		   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++		   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++		   MT753X_BPDU_CPU_ONLY);
++
++	/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress
++	 * them VLAN-untagged.
+ 	 */
+ 	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK |
+-		   MT753X_R0E_PORT_FW_MASK,
++		   MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK |
++		   MT753X_R03_PORT_FW_MASK,
+ 		   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY));
++		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
++		   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++		   MT753X_BPDU_CPU_ONLY);
+ }
+ 
+ static int
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -71,12 +71,25 @@ enum mt753x_id {
+ #define  MT753X_BPDU_EG_TAG(x)		FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x)
+ #define  MT753X_BPDU_PORT_FW_MASK	GENMASK(2, 0)
+ 
++/* Register for :01 and :02 MAC DA frame control */
++#define MT753X_RGAC1			0x28
++#define  MT753X_R02_EG_TAG_MASK		GENMASK(24, 22)
++#define  MT753X_R02_EG_TAG(x)		FIELD_PREP(MT753X_R02_EG_TAG_MASK, x)
++#define  MT753X_R02_PORT_FW_MASK	GENMASK(18, 16)
++#define  MT753X_R02_PORT_FW(x)		FIELD_PREP(MT753X_R02_PORT_FW_MASK, x)
++#define  MT753X_R01_EG_TAG_MASK		GENMASK(8, 6)
++#define  MT753X_R01_EG_TAG(x)		FIELD_PREP(MT753X_R01_EG_TAG_MASK, x)
++#define  MT753X_R01_PORT_FW_MASK	GENMASK(2, 0)
++
+ /* Register for :03 and :0E MAC DA frame control */
+ #define MT753X_RGAC2			0x2c
+ #define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
+ #define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
+ #define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
+ #define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
++#define  MT753X_R03_EG_TAG_MASK		GENMASK(8, 6)
++#define  MT753X_R03_EG_TAG(x)		FIELD_PREP(MT753X_R03_EG_TAG_MASK, x)
++#define  MT753X_R03_PORT_FW_MASK	GENMASK(2, 0)
+ 
+ enum mt753x_bpdu_port_fw {
+ 	MT753X_BPDU_FOLLOW_MFC,
diff --git a/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch b/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch
new file mode 100644
index 0000000000..f662a76368
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch
@@ -0,0 +1,32 @@
+From 27b692012840f658c84a3102c0aeca2676f03132 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Thu, 15 Dec 2022 03:47:59 +0000
+Subject: [PATCH 01/48] net: dsa: mt7530: remove redundant assignment
+
+Russell King correctly pointed out that the MAC_2500FD capability is
+already added for port 5 (if not in RGMII mode) and port 6 (which only
+supports SGMII) by mt7531_mac_port_get_caps. Remove the reduntant
+setting of this capability flag which was added by a previous commit.
+
+Fixes: e19de30d2080 ("net: dsa: mt7530: add support for in-band link status")
+Reported-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+Link: https://lore.kernel.org/r/Y5qY7x6la5TxZxzX at makrotopia.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 3 ---
+ 1 file changed, 3 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -3010,9 +3010,6 @@ static void mt753x_phylink_get_caps(stru
+ 	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
+ 				   MAC_10 | MAC_100 | MAC_1000FD;
+ 
+-	if ((priv->id == ID_MT7531) && mt753x_is_mac_port(port))
+-		config->mac_capabilities |= MAC_2500FD;
+-
+ 	/* This driver does not make use of the speed, duplex, pause or the
+ 	 * advertisement in its mac_config, so it is safe to mark this driver
+ 	 * as non-legacy.
diff --git a/target/linux/generic/backport-6.1/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch
similarity index 83%
rename from target/linux/generic/backport-6.1/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
rename to target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch
index 8010076fc0..36ff3549e9 100644
--- a/target/linux/generic/backport-6.1/788-v6.3-net-dsa-mt7530-use-external-PCS-driver.patch
+++ b/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch
@@ -1,60 +1,23 @@
-From patchwork Thu Mar  9 10:57:44 2023
-Content-Type: text/plain; charset="utf-8"
-MIME-Version: 1.0
-Content-Transfer-Encoding: 8bit
-X-Patchwork-Submitter: Daniel Golle <daniel at makrotopia.org>
-X-Patchwork-Id: 13167235
-X-Patchwork-Delegate: kuba at kernel.org
-Return-Path: <netdev-owner at vger.kernel.org>
-Date: Thu, 9 Mar 2023 10:57:44 +0000
+From 05dc5ea089f947a69a5db092ef4cad6a0f3c96ce Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
-To: netdev at vger.kernel.org, linux-mediatek at lists.infradead.org,
-        linux-arm-kernel at lists.infradead.org, linux-kernel at vger.kernel.org,
-        Russell King <linux at armlinux.org.uk>,
-        Heiner Kallweit <hkallweit1 at gmail.com>,
-        Lorenzo Bianconi <lorenzo at kernel.org>,
-        Mark Lee <Mark-MC.Lee at mediatek.com>,
-        John Crispin <john at phrozen.org>, Felix Fietkau <nbd at nbd.name>,
-        AngeloGioacchino Del Regno
-        <angelogioacchino.delregno at collabora.com>,
-        Matthias Brugger <matthias.bgg at gmail.com>,
-        DENG Qingfang <dqfext at gmail.com>,
-        Landen Chao <Landen.Chao at mediatek.com>,
-        Sean Wang <sean.wang at mediatek.com>,
-        Paolo Abeni <pabeni at redhat.com>,
-        Jakub Kicinski <kuba at kernel.org>,
-        Eric Dumazet <edumazet at google.com>,
-        "David S. Miller" <davem at davemloft.net>,
-        Vladimir Oltean <olteanv at gmail.com>,
-        Florian Fainelli <f.fainelli at gmail.com>,
-        Andrew Lunn <andrew at lunn.ch>,
-        Vladimir Oltean <vladimir.oltean at nxp.com>
-Cc: =?iso-8859-1?q?Bj=F8rn?= Mork <bjorn at mork.no>,
- Frank Wunderlich <frank-w at public-files.de>,
- Alexander Couzens <lynxis at fe80.eu>
-Subject: [PATCH net-next v13 11/16] net: dsa: mt7530: use external PCS driver
-Message-ID: 
- <2ac2ee40d3b0e705461b50613fda6a7edfdbc4b3.1678357225.git.daniel at makrotopia.org>
-References: <cover.1678357225.git.daniel at makrotopia.org>
+Date: Sun, 19 Mar 2023 12:58:43 +0000
+Subject: [PATCH 02/48] net: dsa: mt7530: use external PCS driver
 MIME-Version: 1.0
-Content-Disposition: inline
-In-Reply-To: <cover.1678357225.git.daniel at makrotopia.org>
-Precedence: bulk
-List-ID: <netdev.vger.kernel.org>
-X-Mailing-List: netdev at vger.kernel.org
-X-Patchwork-Delegate: kuba at kernel.org
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
 
 Implement regmap access wrappers, for now only to be used by the
-pcs-mtk driver.
-Make use of external PCS driver and drop the reduntant implementation
-in mt7530.c.
+pcs-mtk-lynxi driver.
+Make use of this external PCS driver and drop the now reduntant
+implementation in mt7530.c.
 As a nice side effect the SGMII registers can now also more easily be
 inspected for debugging via /sys/kernel/debug/regmap.
 
-Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
 Tested-by: Bj?rn Mork <bjorn at mork.no>
 Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 Tested-by: Frank Wunderlich <frank-w at public-files.de>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 ---
  drivers/net/dsa/Kconfig  |   1 +
  drivers/net/dsa/mt7530.c | 277 ++++++++++-----------------------------
@@ -81,7 +44,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  #include <linux/phylink.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
-@@ -2615,128 +2616,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2651,128 +2652,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -210,7 +173,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
-@@ -2759,11 +2643,11 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2795,11 +2679,11 @@ mt7531_mac_config(struct dsa_switch *ds,
  		phydev = dp->slave->phydev;
  		return mt7531_rgmii_setup(priv, port, interface, phydev);
  	case PHY_INTERFACE_MODE_SGMII:
@@ -224,7 +187,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return -EINVAL;
  	}
-@@ -2788,11 +2672,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
+@@ -2824,11 +2708,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
  
  	switch (interface) {
  	case PHY_INTERFACE_MODE_TRGMII:
@@ -238,7 +201,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	default:
  		return NULL;
  	}
-@@ -3033,86 +2917,6 @@ static void mt7530_pcs_get_state(struct
+@@ -3066,86 +2950,6 @@ static void mt7530_pcs_get_state(struct
  		state->pause |= MLO_PAUSE_TX;
  }
  
@@ -325,7 +288,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
  			     phy_interface_t interface,
  			     const unsigned long *advertising,
-@@ -3132,18 +2936,57 @@ static const struct phylink_pcs_ops mt75
+@@ -3165,18 +2969,57 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -389,7 +352,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3151,8 +2994,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3184,8 +3027,6 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -398,7 +361,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	}
  
  	ret = priv->info->sw_setup(ds);
-@@ -3167,6 +3008,16 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3200,6 +3041,16 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -415,7 +378,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  	return ret;
  }
  
-@@ -3258,7 +3109,7 @@ static const struct mt753x_info mt753x_t
+@@ -3291,7 +3142,7 @@ static const struct mt753x_info mt753x_t
  	},
  	[ID_MT7531] = {
  		.id = ID_MT7531,
@@ -424,7 +387,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  		.sw_setup = mt7531_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
-@@ -3366,7 +3217,7 @@ static void
+@@ -3399,7 +3250,7 @@ static void
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
@@ -433,7 +396,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  	if (!priv)
  		return;
-@@ -3385,6 +3236,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3418,6 +3269,10 @@ mt7530_remove(struct mdio_device *mdiode
  		mt7530_free_irq(priv);
  
  	dsa_unregister_switch(priv->ds);
@@ -446,7 +409,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -371,47 +371,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -391,47 +391,8 @@ enum mt7530_vlan_port_acc_frm {
  					 CCR_TX_OCT_CNT_BAD)
  
  /* MT7531 SGMII register group */
@@ -496,7 +459,7 @@ Tested-by: Frank Wunderlich <frank-w at public-files.de>
  
  /* Register for system reset */
  #define MT7530_SYS_CTRL			0x7000
-@@ -710,13 +671,13 @@ struct mt7530_fdb {
+@@ -730,13 +691,13 @@ struct mt7530_fdb {
   * @pm:		The matrix used to show all connections with the port.
   * @pvid:	The VLAN specified is to be considered a PVID at ingress.  Any
   *		untagged frames will be assigned to the related VLAN.
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0001-net-dsa-mt7530-make-some-noise-if-register-read-fail.patch b/target/linux/generic/backport-6.1/790-03-v6.4-net-dsa-mt7530-make-some-noise-if-register-read-fail.patch
similarity index 88%
rename from target/linux/generic/backport-6.1/790-v6.4-0001-net-dsa-mt7530-make-some-noise-if-register-read-fail.patch
rename to target/linux/generic/backport-6.1/790-03-v6.4-net-dsa-mt7530-make-some-noise-if-register-read-fail.patch
index 4d024b063a..d8f559b416 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0001-net-dsa-mt7530-make-some-noise-if-register-read-fail.patch
+++ b/target/linux/generic/backport-6.1/790-03-v6.4-net-dsa-mt7530-make-some-noise-if-register-read-fail.patch
@@ -1,7 +1,7 @@
-From c3552d3f85f06cf4b4818bd84c4fcc09d8d45165 Mon Sep 17 00:00:00 2001
+From cafbb70e148e7a4e318dcc1e36a96643815b6245 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:17:19 +0100
-Subject: [PATCH 01/13] net: dsa: mt7530: make some noise if register read
+Subject: [PATCH 03/48] net: dsa: mt7530: make some noise if register read
  fails
 
 Simply returning the negative error value instead of the read value
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
similarity index 92%
rename from target/linux/generic/backport-6.1/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
rename to target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
index 5667449296..ed24c452e2 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0002-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
+++ b/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
@@ -1,7 +1,7 @@
-From b896355fc4988216d4f38582d07add9252a795ae Mon Sep 17 00:00:00 2001
+From 8f83ad87e2df26ddf9b8afd4d2873644a872d929 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:17:30 +0100
-Subject: [PATCH 02/13] net: dsa: mt7530: refactor SGMII PCS creation
+Subject: [PATCH 04/48] net: dsa: mt7530: refactor SGMII PCS creation
 
 Instead of macro templates use a dedidated function and allocated
 regmap_config when creating the regmaps for the pcs-mtk-lynxi
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2968,26 +2968,56 @@ static const struct regmap_bus mt7531_re
+@@ -3001,26 +3001,56 @@ static const struct regmap_bus mt7531_re
  	.reg_update_bits = mt7530_regmap_update_bits,
  };
  
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3009,15 +3039,11 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3042,15 +3072,11 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
similarity index 86%
rename from target/linux/generic/backport-6.1/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
rename to target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
index 3b4689fb19..0298ebd274 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0003-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
+++ b/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
@@ -1,7 +1,7 @@
-From 33396408776385f3d2f6069646169a6b5b28e3b3 Mon Sep 17 00:00:00 2001
+From efb41b8e9b7bbb08ace1930373bff63d4f5cc6e2 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:17:40 +0100
-Subject: [PATCH 03/13] net: dsa: mt7530: use unlocked regmap accessors
+Subject: [PATCH 05/48] net: dsa: mt7530: use unlocked regmap accessors
 
 Instead of wrapping the locked register accessor functions, use the
 unlocked variants and add locking wrapper functions to let regmap
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2941,7 +2941,7 @@ static int mt7530_regmap_read(void *cont
+@@ -2974,7 +2974,7 @@ static int mt7530_regmap_read(void *cont
  {
  	struct mt7530_priv *priv = context;
  
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  };
  
-@@ -2949,23 +2949,25 @@ static int mt7530_regmap_write(void *con
+@@ -2982,23 +2982,25 @@ static int mt7530_regmap_write(void *con
  {
  	struct mt7530_priv *priv = context;
  
@@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  static int
-@@ -2991,6 +2993,9 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3024,6 +3026,9 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->reg_stride = 4;
  		mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
  		mt7531_pcs_config[i]->max_register = 0x17c;
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
similarity index 90%
rename from target/linux/generic/backport-6.1/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
rename to target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
index 04033f14f4..e5625f67de 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0004-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
+++ b/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
@@ -1,7 +1,7 @@
-From 743cba4345cb366248f9d375c6a9e50243dc0677 Mon Sep 17 00:00:00 2001
+From c7945d11a060797c31b3f47d9c9e515b0bf2082f Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:17:52 +0100
-Subject: [PATCH 04/13] net: dsa: mt7530: use regmap to access switch register
+Subject: [PATCH 06/48] net: dsa: mt7530: use regmap to access switch register
  space
 
 Use regmap API to access the switch register space.
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2937,22 +2958,6 @@ static const struct phylink_pcs_ops mt75
+@@ -2970,22 +2991,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void
  mt7530_mdio_regmap_lock(void *mdio_lock)
  {
-@@ -2965,7 +2970,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
+@@ -2998,7 +3003,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
  	mutex_unlock(mdio_lock);
  }
  
@@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.reg_write = mt7530_regmap_write,
  	.reg_read = mt7530_regmap_read,
  };
-@@ -2998,7 +3003,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3031,7 +3036,7 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
  
  		regmap = devm_regmap_init(priv->dev,
@@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					  mt7531_pcs_config[i]);
  		if (IS_ERR(regmap)) {
  			ret = PTR_ERR(regmap);
-@@ -3163,6 +3168,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
+@@ -3196,6 +3201,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
  static int
  mt7530_probe(struct mdio_device *mdiodev)
  {
@@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv;
  	struct device_node *dn;
  
-@@ -3242,6 +3248,21 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3275,6 +3281,21 @@ mt7530_probe(struct mdio_device *mdiodev
  	mutex_init(&priv->reg_mutex);
  	dev_set_drvdata(&mdiodev->dev, priv);
  
@@ -206,7 +206,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -754,6 +754,7 @@ struct mt753x_info {
+@@ -774,6 +774,7 @@ struct mt753x_info {
   * @dev:		The device pointer
   * @ds:			The pointer to the dsa core structure
   * @bus:		The bus used for the device and built-in PHY
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * @rstc:		The pointer to reset control used by MCM
   * @core_pwr:		The power supplied into the core
   * @io_pwr:		The power supplied into the I/O
-@@ -774,6 +775,7 @@ struct mt7530_priv {
+@@ -794,6 +795,7 @@ struct mt7530_priv {
  	struct device		*dev;
  	struct dsa_switch	*ds;
  	struct mii_bus		*bus;
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
similarity index 79%
rename from target/linux/generic/backport-6.1/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
rename to target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
index 6c5bebdd80..ca1f38f9c2 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0005-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
+++ b/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
@@ -1,7 +1,7 @@
-From f3cf1d06e2aef644b426c23b4bb570780b1f8d47 Mon Sep 17 00:00:00 2001
+From 6b64b5bc3045a7e1ee5278df4f4ff315cd43d88a Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:18:04 +0100
-Subject: [PATCH 05/13] net: dsa: mt7530: move SGMII PCS creation to
+Subject: [PATCH 07/48] net: dsa: mt7530: move SGMII PCS creation to
  mt7530_probe function
 
 Move creating the SGMII PCS from mt753x_setup() to the more appropriate
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3049,12 +3049,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3082,12 +3082,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return ret;
  }
  
-@@ -3171,6 +3165,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3204,6 +3198,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	static struct regmap_config *regmap_config;
  	struct mt7530_priv *priv;
  	struct device_node *dn;
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	dn = mdiodev->dev.of_node;
  
-@@ -3263,6 +3258,12 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3296,6 +3291,12 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (IS_ERR(priv->regmap))
  		return PTR_ERR(priv->regmap);
  
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch
similarity index 93%
rename from target/linux/generic/backport-6.1/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
rename to target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch
index a8933d2cf4..813e976810 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0006-net-dsa-mt7530-introduce-mutex-helpers.patch
+++ b/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch
@@ -1,7 +1,7 @@
-From e4729ae7c095c0c87794bff47ea43e35d69de986 Mon Sep 17 00:00:00 2001
+From 504d39cbda402df3e6fd123d040520393b6a6297 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:18:16 +0100
-Subject: [PATCH 06/13] net: dsa: mt7530: introduce mutex helpers
+Subject: [PATCH 08/48] net: dsa: mt7530: introduce mutex helpers
 
 As the MDIO bus lock only needs to be involved if actually operating
 on an MDIO-connected switch we will need to skip locking for built-in
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -1125,7 +1125,6 @@ static int
+@@ -1161,7 +1161,6 @@ static int
  mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int length;
  	u32 val;
  
-@@ -1136,7 +1135,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1172,7 +1171,7 @@ mt7530_port_change_mtu(struct dsa_switch
  	if (!dsa_is_cpu_port(ds, port))
  		return 0;
  
@@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	val = mt7530_mii_read(priv, MT7530_GMACCR);
  	val &= ~MAX_RX_PKT_LEN_MASK;
-@@ -1157,7 +1156,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1193,7 +1192,7 @@ mt7530_port_change_mtu(struct dsa_switch
  
  	mt7530_mii_write(priv, MT7530_GMACCR, val);
  
@@ -240,7 +240,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return 0;
  }
-@@ -1958,10 +1957,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
+@@ -1994,10 +1993,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
  	u32 val;
  	int p;
  
@@ -253,7 +253,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	for (p = 0; p < MT7530_NUM_PHYS; p++) {
  		if (BIT(p) & val) {
-@@ -1997,7 +1996,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
+@@ -2033,7 +2032,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
  {
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
@@ -262,7 +262,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2006,7 +2005,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
+@@ -2042,7 +2041,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
  	mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
similarity index 91%
rename from target/linux/generic/backport-6.1/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
rename to target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
index 6c68dc0c4f..177f6af780 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0007-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
+++ b/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
@@ -1,7 +1,7 @@
-From 0d7ae94a0c581f86939bebec0b6ccd66e640d1d8 Mon Sep 17 00:00:00 2001
+From dbef24b66807eef7498740fa8b8441bee64a96c4 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:18:28 +0100
-Subject: [PATCH 07/13] net: dsa: mt7530: move p5_intf_modes() function to
+Subject: [PATCH 09/48] net: dsa: mt7530: move p5_intf_modes() function to
  mt7530.c
 
 In preparation of splitting mt7530.c into a driver for MDIO-connected
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv = ds->priv;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -689,24 +689,6 @@ enum p5_interface_select {
+@@ -709,24 +709,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_GMAC5_SGMII,
  };
  
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
similarity index 93%
rename from target/linux/generic/backport-6.1/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
rename to target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
index dc4fcb6aa1..8950caaaef 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0008-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
+++ b/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
@@ -1,7 +1,7 @@
-From 4d632005c90e253c000d0db73b7cdb9d8dc2e2dd Mon Sep 17 00:00:00 2001
+From a0c6527a38d518ff175c1b6ce248e9b06cc98d3b Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:18:39 +0100
-Subject: [PATCH 08/13] net: dsa: mt7530: introduce mt7530_probe_common helper
+Subject: [PATCH 10/48] net: dsa: mt7530: introduce mt7530_probe_common helper
  function
 
 Move commonly used parts from mt7530_probe into new mt7530_probe_common
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3177,44 +3177,21 @@ static const struct of_device_id mt7530_
+@@ -3210,44 +3210,21 @@ static const struct of_device_id mt7530_
  MODULE_DEVICE_TABLE(of, mt7530_of_match);
  
  static int
@@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->info)
  		return -EINVAL;
  
-@@ -3228,23 +3205,53 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3261,23 +3238,53 @@ mt7530_probe(struct mdio_device *mdiodev
  		return -EINVAL;
  
  	priv->id = priv->info->id;
@@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
  						      GPIOD_OUT_LOW);
  		if (IS_ERR(priv->reset)) {
-@@ -3253,12 +3260,15 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3286,12 +3293,15 @@ mt7530_probe(struct mdio_device *mdiodev
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
similarity index 83%
rename from target/linux/generic/backport-6.1/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
rename to target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
index 5df859d2df..24eadb589e 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0009-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
+++ b/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
@@ -1,7 +1,7 @@
-From 69b838d2629e6b82bcd9e0ab3c1c03f46e5e01d3 Mon Sep 17 00:00:00 2001
+From a7783b0b6f3b38abd34cecf515811691714dee57 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:18:50 +0100
-Subject: [PATCH 09/13] net: dsa: mt7530: introduce mt7530_remove_common helper
+Subject: [PATCH 11/48] net: dsa: mt7530: introduce mt7530_remove_common helper
  function
 
 Move commonly used parts from mt7530_remove into new
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3295,6 +3295,17 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3328,6 +3328,17 @@ mt7530_probe(struct mdio_device *mdiodev
  }
  
  static void
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
-@@ -3313,15 +3324,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3346,15 +3357,10 @@ mt7530_remove(struct mdio_device *mdiode
  		dev_err(priv->dev, "Failed to disable io pwr: %d\n",
  			ret);
  
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0010-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
similarity index 95%
rename from target/linux/generic/backport-6.1/790-v6.4-0010-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
rename to target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
index f57a1bf06a..a6bb7d9e7b 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0010-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
+++ b/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
@@ -1,7 +1,7 @@
-From 8eceed6dbd74067dbf4d8e39f14734f4d2f35176 Mon Sep 17 00:00:00 2001
+From 5313432ca1e1a0677ad7b4f17a7e0186473f47aa Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:19:13 +0100
-Subject: [PATCH 10/13] net: dsa: mt7530: introduce separate MDIO driver
+Subject: [PATCH 12/48] net: dsa: mt7530: introduce separate MDIO driver
 
 Split MT7530 switch driver into a common part and a part specific
 for MDIO connected switches and multi-chip modules.
@@ -15,12 +15,12 @@ Reviewed-by: Andrew Lunn <andrew at lunn.ch>
 Signed-off-by: David S. Miller <davem at davemloft.net>
 ---
  MAINTAINERS                   |   1 +
- drivers/net/dsa/Kconfig       |  16 +-
+ drivers/net/dsa/Kconfig       |  18 ++-
  drivers/net/dsa/Makefile      |   1 +
  drivers/net/dsa/mt7530-mdio.c | 271 ++++++++++++++++++++++++++++++++++
  drivers/net/dsa/mt7530.c      | 264 +--------------------------------
  drivers/net/dsa/mt7530.h      |   6 +
- 6 files changed, 301 insertions(+), 258 deletions(-)
+ 6 files changed, 302 insertions(+), 259 deletions(-)
  create mode 100644 drivers/net/dsa/mt7530-mdio.c
 
 --- a/MAINTAINERS
@@ -35,10 +35,13 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/Kconfig
 +++ b/drivers/net/dsa/Kconfig
-@@ -37,10 +37,22 @@ config NET_DSA_MT7530
- 	tristate "MediaTek MT753x and MT7621 Ethernet switch support"
+@@ -34,13 +34,25 @@ config NET_DSA_LANTIQ_GSWIP
+ 	  the xrx200 / VR9 SoC.
+ 
+ config NET_DSA_MT7530
+-	tristate "MediaTek MT753x and MT7621 Ethernet switch support"
++	tristate "MediaTek MT7530 and MT7531 Ethernet switch support"
  	select NET_DSA_TAG_MTK
- 	select MEDIATEK_GE_PHY
 +	imply NET_DSA_MT7530_MDIO
 +	help
 +	  This enables support for the MediaTek MT7530 and MT7531 Ethernet
@@ -49,6 +52,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +config NET_DSA_MT7530_MDIO
 +	tristate "MediaTek MT7530 MDIO interface driver"
 +	depends on NET_DSA_MT7530
+ 	select MEDIATEK_GE_PHY
  	select PCS_MTK_LYNXI
  	help
 -	  This enables support for the MediaTek MT7530, MT7531, and MT7621
@@ -416,7 +420,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static u32
  mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
  {
-@@ -2975,72 +2926,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3008,72 +2959,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -489,7 +493,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_setup(struct dsa_switch *ds)
  {
-@@ -3099,7 +2984,7 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3132,7 +3017,7 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -498,7 +502,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
  	.get_strings		= mt7530_get_strings,
-@@ -3133,8 +3018,9 @@ static const struct dsa_switch_ops mt753
+@@ -3166,8 +3051,9 @@ static const struct dsa_switch_ops mt753
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
  };
@@ -509,7 +513,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	[ID_MT7621] = {
  		.id = ID_MT7621,
  		.pcs_ops = &mt7530_pcs_ops,
-@@ -3167,16 +3053,9 @@ static const struct mt753x_info mt753x_t
+@@ -3200,16 +3086,9 @@ static const struct mt753x_info mt753x_t
  		.mac_port_config = mt7531_mac_config,
  	},
  };
@@ -528,7 +532,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_probe_common(struct mt7530_priv *priv)
  {
  	struct device *dev = priv->dev;
-@@ -3213,88 +3092,9 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3246,88 +3125,9 @@ mt7530_probe_common(struct mt7530_priv *
  
  	return 0;
  }
@@ -619,7 +623,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove_common(struct mt7530_priv *priv)
  {
  	if (priv->irq)
-@@ -3304,55 +3104,7 @@ mt7530_remove_common(struct mt7530_priv
+@@ -3337,55 +3137,7 @@ mt7530_remove_common(struct mt7530_priv
  
  	mutex_destroy(&priv->reg_mutex);
  }
@@ -678,7 +682,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch");
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -814,4 +814,10 @@ static inline void INIT_MT7530_DUMMY_POL
+@@ -834,4 +834,10 @@ static inline void INIT_MT7530_DUMMY_POL
  	p->reg = reg;
  }
  
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0011-net-dsa-mt7530-skip-locking-if-MDIO-bus-isn-t-presen.patch b/target/linux/generic/backport-6.1/790-13-v6.4-net-dsa-mt7530-skip-locking-if-MDIO-bus-isn-t-presen.patch
similarity index 91%
rename from target/linux/generic/backport-6.1/790-v6.4-0011-net-dsa-mt7530-skip-locking-if-MDIO-bus-isn-t-presen.patch
rename to target/linux/generic/backport-6.1/790-13-v6.4-net-dsa-mt7530-skip-locking-if-MDIO-bus-isn-t-presen.patch
index 01011ed1a0..dae7dd4a48 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0011-net-dsa-mt7530-skip-locking-if-MDIO-bus-isn-t-presen.patch
+++ b/target/linux/generic/backport-6.1/790-13-v6.4-net-dsa-mt7530-skip-locking-if-MDIO-bus-isn-t-presen.patch
@@ -1,7 +1,7 @@
-From a52cadbf76593f8fcb2f4f62cb006e3f2a22ad06 Mon Sep 17 00:00:00 2001
+From 86e1168a214b7ab0883acf1e7a6885a7a949e3e7 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:19:28 +0100
-Subject: [PATCH 11/13] net: dsa: mt7530: skip locking if MDIO bus isn't
+Subject: [PATCH 13/48] net: dsa: mt7530: skip locking if MDIO bus isn't
  present
 
 As MT7530 and MT7531 internally use 32-bit wide registers, each access
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0012-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
similarity index 93%
rename from target/linux/generic/backport-6.1/790-v6.4-0012-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
rename to target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
index 05adccf517..9bc3f54c23 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0012-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
+++ b/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
@@ -1,7 +1,7 @@
-From b361015763fedea439f13b336b15ef7bdf1f7d4f Mon Sep 17 00:00:00 2001
+From a1b87b6322db9186c8689710fe3e98f59e540949 Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Mon, 3 Apr 2023 02:19:40 +0100
-Subject: [PATCH 12/13] net: dsa: mt7530: introduce driver for MT7988 built-in
+Subject: [PATCH 14/48] net: dsa: mt7530: introduce driver for MT7988 built-in
  switch
 
 Add driver for the built-in Gigabit Ethernet switch which can be found
@@ -42,9 +42,9 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/Kconfig
 +++ b/drivers/net/dsa/Kconfig
-@@ -38,6 +38,7 @@ config NET_DSA_MT7530
+@@ -37,6 +37,7 @@ config NET_DSA_MT7530
+ 	tristate "MediaTek MT7530 and MT7531 Ethernet switch support"
  	select NET_DSA_TAG_MTK
- 	select MEDIATEK_GE_PHY
  	imply NET_DSA_MT7530_MDIO
 +	imply NET_DSA_MT7530_MMIO
  	help
@@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2005,6 +2005,47 @@ static const struct irq_domain_ops mt753
+@@ -2041,6 +2041,47 @@ static const struct irq_domain_ops mt753
  };
  
  static void
@@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_setup_mdio_irq(struct mt7530_priv *priv)
  {
  	struct dsa_switch *ds = priv->ds;
-@@ -2038,8 +2079,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2074,8 +2115,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
  		return priv->irq ? : -EINVAL;
  	}
  
@@ -250,7 +250,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->irq_domain) {
  		dev_err(dev, "failed to create IRQ domain\n");
  		return -ENOMEM;
-@@ -2538,6 +2586,25 @@ static void mt7531_mac_port_get_caps(str
+@@ -2574,6 +2622,25 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -276,7 +276,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -2614,6 +2681,17 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2650,6 +2717,17 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -294,7 +294,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2683,7 +2761,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2719,7 +2797,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			goto unsupported;
  		break;
  	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
-@@ -2761,7 +2840,8 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2797,7 +2876,8 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
@@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	    (phy_interface_mode_is_8023z(interface))) {
  		speed = SPEED_1000;
  		duplex = DUPLEX_FULL;
-@@ -2841,6 +2921,21 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -2877,6 +2957,21 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -336,7 +336,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -2986,6 +3081,27 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3019,6 +3114,27 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -364,7 +364,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
-@@ -3054,6 +3170,17 @@ const struct mt753x_info mt753x_table[]
+@@ -3087,6 +3203,17 @@ const struct mt753x_info mt753x_table[]
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
@@ -407,7 +407,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					 MT7531_MIRROR_MASK : MIRROR_MASK)
  
  /* Registers for BPDU and PAE frame control*/
-@@ -302,9 +303,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -322,9 +323,8 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-6.1/790-v6.4-0013-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch
similarity index 92%
rename from target/linux/generic/backport-6.1/790-v6.4-0013-net-dsa-mt7530-fix-support-for-MT7531BE.patch
rename to target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch
index 5b5f25e7af..ef2d07ab79 100644
--- a/target/linux/generic/backport-6.1/790-v6.4-0013-net-dsa-mt7530-fix-support-for-MT7531BE.patch
+++ b/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch
@@ -1,7 +1,7 @@
-From eb1dd407b4be7ca38166a38c56c8edf52c6a399f Mon Sep 17 00:00:00 2001
+From ed01748319b25456c5226ed0cb5e49e970da0e4f Mon Sep 17 00:00:00 2001
 From: Daniel Golle <daniel at makrotopia.org>
 Date: Sun, 16 Apr 2023 13:08:14 +0100
-Subject: [PATCH 13/13] net: dsa: mt7530: fix support for MT7531BE
+Subject: [PATCH 15/48] net: dsa: mt7530: fix support for MT7531BE
 MIME-Version: 1.0
 Content-Type: text/plain; charset=UTF-8
 Content-Transfer-Encoding: 8bit
@@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3048,6 +3048,12 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3081,6 +3081,12 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -748,10 +748,10 @@ struct mt753x_info {
+@@ -768,10 +768,10 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -770,7 +770,6 @@ struct mt7530_priv {
+@@ -790,7 +790,6 @@ struct mt7530_priv {
  	unsigned int		p5_intf_sel;
  	u8			mirror_rx;
  	u8			mirror_tx;
@@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
  	struct mt753x_pcs	pcs[MT7530_NUM_PORTS];
  	/* protect among processes for registers access*/
-@@ -778,6 +777,7 @@ struct mt7530_priv {
+@@ -798,6 +797,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch b/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch
new file mode 100644
index 0000000000..068fb38a4e
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch
@@ -0,0 +1,79 @@
+From 4b11e3eb0eb7245a0d22a5dc4161c54eea42910c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Sat, 17 Jun 2023 09:26:44 +0300
+Subject: [PATCH 16/48] net: dsa: mt7530: set all CPU ports in MT7531_CPU_PMAP
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+MT7531_CPU_PMAP represents the destination port mask for trapped-to-CPU
+frames (further restricted by PCR_MATRIX).
+
+Currently the driver sets the first CPU port as the single port in this bit
+mask, which works fine regardless of whether the device tree defines port
+5, 6 or 5+6 as CPU ports. This is because the logic coincides with DSA's
+logic of picking the first CPU port as the CPU port that all user ports are
+affine to, by default.
+
+An upcoming change would like to influence DSA's selection of the default
+CPU port to no longer be the first one, and in that case, this logic needs
+adaptation.
+
+Since there is no observed leakage or duplication of frames if all CPU
+ports are defined in this bit mask, simply include them all.
+
+Suggested-by: Russell King (Oracle) <linux at armlinux.org.uk>
+Suggested-by: Vladimir Oltean <olteanv at gmail.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mt7530.c | 15 +++++++--------
+ drivers/net/dsa/mt7530.h |  1 +
+ 2 files changed, 8 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1069,6 +1069,13 @@ mt753x_cpu_port_enable(struct dsa_switch
+ 	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)
+ 		mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port));
+ 
++	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
++	 * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that
++	 * is affine to the inbound user port.
++	 */
++	if (priv->id == ID_MT7531 || priv->id == ID_MT7988)
++		mt7530_set(priv, MT7531_CFC, MT7531_CPU_PMAP(BIT(port)));
++
+ 	/* CPU port gets connected to all user ports of
+ 	 * the switch.
+ 	 */
+@@ -2411,16 +2418,8 @@ static int
+ mt7531_setup_common(struct dsa_switch *ds)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	struct dsa_port *cpu_dp;
+ 	int ret, i;
+ 
+-	/* BPDU to CPU port */
+-	dsa_switch_for_each_cpu_port(cpu_dp, ds) {
+-		mt7530_rmw(priv, MT7531_CFC, MT7531_CPU_PMAP_MASK,
+-			   BIT(cpu_dp->index));
+-		break;
+-	}
+-
+ 	mt753x_trap_frames(priv);
+ 
+ 	/* Enable and reset MIB counters */
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -54,6 +54,7 @@ enum mt753x_id {
+ #define  MT7531_MIRROR_PORT_GET(x)	(((x) >> 16) & MIRROR_MASK)
+ #define  MT7531_MIRROR_PORT_SET(x)	(((x) & MIRROR_MASK) << 16)
+ #define  MT7531_CPU_PMAP_MASK		GENMASK(7, 0)
++#define  MT7531_CPU_PMAP(x)		FIELD_PREP(MT7531_CPU_PMAP_MASK, x)
+ 
+ #define MT753X_MIRROR_REG(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+ 					 MT7531_CFC : MT7530_MFC)
diff --git a/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch b/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch
new file mode 100644
index 0000000000..bbf6d9b16f
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch
@@ -0,0 +1,35 @@
+From fb6858e2c3b931433ea4d25871c272ee4c01bd99 Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Fri, 16 Jun 2023 13:07:29 +0100
+Subject: [PATCH 17/48] net: dsa: mt7530: update PCS driver to use neg_mode
+
+Update mt7530's embedded PCS driver to use neg_mode, even though it
+makes no use of it or the "mode" argument. This makes the driver
+consistent with converted drivers.
+
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Link: https://lore.kernel.org/r/E1qA8Ej-00EaGR-Fk at rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 3 ++-
+ 1 file changed, 2 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -3036,7 +3036,7 @@ static void mt7530_pcs_get_state(struct
+ 		state->pause |= MLO_PAUSE_TX;
+ }
+ 
+-static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
++static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int neg_mode,
+ 			     phy_interface_t interface,
+ 			     const unsigned long *advertising,
+ 			     bool permit_pause_to_mac)
+@@ -3064,6 +3064,7 @@ mt753x_setup(struct dsa_switch *ds)
+ 	/* Initialise the PCS devices */
+ 	for (i = 0; i < priv->ds->num_ports; i++) {
+ 		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
++		priv->pcs[i].pcs.neg_mode = true;
+ 		priv->pcs[i].priv = priv;
+ 		priv->pcs[i].port = i;
+ 	}
diff --git a/target/linux/generic/backport-6.1/790-18-v6.7-net-dsa-mt7530-Convert-to-platform-remove-callback-r.patch b/target/linux/generic/backport-6.1/790-18-v6.7-net-dsa-mt7530-Convert-to-platform-remove-callback-r.patch
new file mode 100644
index 0000000000..ffcf51dab5
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-18-v6.7-net-dsa-mt7530-Convert-to-platform-remove-callback-r.patch
@@ -0,0 +1,58 @@
+From 03ede98ecc29b59fb364f735d6de0e6a4c1735fc Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Uwe=20Kleine-K=C3=B6nig?= <u.kleine-koenig at pengutronix.de>
+Date: Mon, 18 Sep 2023 21:19:12 +0200
+Subject: [PATCH 18/48] net: dsa: mt7530: Convert to platform remove callback
+ returning void
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The .remove() callback for a platform driver returns an int which makes
+many driver authors wrongly assume it's possible to do error handling by
+returning an error code. However the value returned is ignored (apart
+from emitting a warning) and this typically results in resource leaks.
+To improve here there is a quest to make the remove callback return
+void. In the first step of this quest all drivers are converted to
+.remove_new() which already returns void. Eventually after all drivers
+are converted, .remove_new() is renamed to .remove().
+
+Trivially convert this driver from always returning zero in the remove
+callback to the void returning variant.
+
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mt7530-mmio.c | 7 ++-----
+ 1 file changed, 2 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/dsa/mt7530-mmio.c
++++ b/drivers/net/dsa/mt7530-mmio.c
+@@ -62,15 +62,12 @@ mt7988_probe(struct platform_device *pde
+ 	return dsa_register_switch(priv->ds);
+ }
+ 
+-static int
+-mt7988_remove(struct platform_device *pdev)
++static void mt7988_remove(struct platform_device *pdev)
+ {
+ 	struct mt7530_priv *priv = platform_get_drvdata(pdev);
+ 
+ 	if (priv)
+ 		mt7530_remove_common(priv);
+-
+-	return 0;
+ }
+ 
+ static void mt7988_shutdown(struct platform_device *pdev)
+@@ -87,7 +84,7 @@ static void mt7988_shutdown(struct platf
+ 
+ static struct platform_driver mt7988_platform_driver = {
+ 	.probe  = mt7988_probe,
+-	.remove = mt7988_remove,
++	.remove_new = mt7988_remove,
+ 	.shutdown = mt7988_shutdown,
+ 	.driver = {
+ 		.name = "mt7530-mmio",
diff --git a/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch b/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
new file mode 100644
index 0000000000..e9a36eea41
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
@@ -0,0 +1,51 @@
+From 1a1a723d47c046d6c251651c9ade589040dafacf Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Wed, 27 Sep 2023 13:13:56 +0100
+Subject: [PATCH 19/48] net: dsa: mt753x: remove mt753x_phylink_pcs_link_up()
+
+Remove the mt753x_phylink_pcs_link_up() function for two reasons:
+
+1) priv->pcs[i].pcs.neg_mode is set true, meaning it doesn't take a
+   MLO_AN_FIXED anymore, but one of PHYLINK_PCS_NEG_*. However, this
+   is inconsequential due to...
+2) priv->pcs[port].pcs.ops is always initialised to point at
+   mt7530_pcs_ops, which does not have a pcs_link_up() member.
+
+So, let's remove mt753x_phylink_pcs_link_up() entirely.
+
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Vladimir Oltean <vladimir.oltean at nxp.com>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Link: https://lore.kernel.org/r/E1qlTQS-008BWe-Va at rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 11 -----------
+ 1 file changed, 11 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2851,15 +2851,6 @@ static void mt753x_phylink_mac_link_down
+ 	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
+ }
+ 
+-static void mt753x_phylink_pcs_link_up(struct phylink_pcs *pcs,
+-				       unsigned int mode,
+-				       phy_interface_t interface,
+-				       int speed, int duplex)
+-{
+-	if (pcs->ops->pcs_link_up)
+-		pcs->ops->pcs_link_up(pcs, mode, interface, speed, duplex);
+-}
+-
+ static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
+ 				       unsigned int mode,
+ 				       phy_interface_t interface,
+@@ -2948,8 +2939,6 @@ mt7531_cpu_port_config(struct dsa_switch
+ 		return ret;
+ 	mt7530_write(priv, MT7530_PMCR_P(port),
+ 		     PMCR_CPU_PORT_SETTING(priv->id));
+-	mt753x_phylink_pcs_link_up(&priv->pcs[port].pcs, MLO_AN_FIXED,
+-				   interface, speed, DUPLEX_FULL);
+ 	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
+ 				   speed, DUPLEX_FULL, true, true);
+ 
diff --git a/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch b/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch
new file mode 100644
index 0000000000..e8fec3f6a1
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch
@@ -0,0 +1,40 @@
+From 51e9c79a4d40fa3a64c0fbdab1ebbebf7cce2dba Mon Sep 17 00:00:00 2001
+From: Justin Stitt <justinstitt at google.com>
+Date: Mon, 9 Oct 2023 18:29:19 +0000
+Subject: [PATCH 20/48] net: dsa: mt7530: replace deprecated strncpy with
+ ethtool_sprintf
+
+`strncpy` is deprecated for use on NUL-terminated destination strings
+[1] and as such we should prefer more robust and less ambiguous string
+interfaces.
+
+ethtool_sprintf() is designed specifically for get_strings() usage.
+Let's replace strncpy in favor of this more robust and easier to
+understand interface.
+
+Link: https://www.kernel.org/doc/html/latest/process/deprecated.html#strncpy-on-nul-terminated-strings [1]
+Link: https://manpages.debian.org/testing/linux-manual-4.8/strscpy.9.en.html [2]
+Link: https://github.com/KSPP/linux/issues/90
+Signed-off-by: Justin Stitt <justinstitt at google.com>
+Reviewed-by: Kees Cook <keescook at chromium.org>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Link: https://lore.kernel.org/r/20231009-strncpy-drivers-net-dsa-mt7530-c-v1-1-ec6677a6436a at google.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -829,8 +829,7 @@ mt7530_get_strings(struct dsa_switch *ds
+ 		return;
+ 
+ 	for (i = 0; i < ARRAY_SIZE(mt7530_mib); i++)
+-		strncpy(data + i * ETH_GSTRING_LEN, mt7530_mib[i].name,
+-			ETH_GSTRING_LEN);
++		ethtool_sprintf(&data, "%s", mt7530_mib[i].name);
+ }
+ 
+ static void
diff --git a/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch b/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
new file mode 100644
index 0000000000..8b374679ca
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
@@ -0,0 +1,116 @@
+From 38be6fdf7e93431e91aac3884837b22236325f68 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:34:31 +0300
+Subject: [PATCH 21/48] net: dsa: mt7530: support OF-based registration of
+ switch MDIO bus
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Currently the MDIO bus of the switches the MT7530 DSA subdriver controls
+can only be registered as non-OF-based. Bring support for registering the
+bus OF-based.
+
+The subdrivers that control switches [with MDIO bus] probed on OF must
+follow this logic to support all cases properly:
+
+No switch MDIO bus defined: Populate ds->user_mii_bus, register the MDIO
+bus, set the interrupts for PHYs if "interrupt-controller" is defined at
+the switch node. This case should only be covered for the switches which
+their dt-bindings documentation didn't document the MDIO bus from the
+start. This is to keep supporting the device trees that do not describe the
+MDIO bus on the device tree but the MDIO bus is being used nonetheless.
+
+Switch MDIO bus defined: Don't populate ds->user_mii_bus, register the MDIO
+bus, set the interrupts for PHYs if ["interrupt-controller" is defined at
+the switch node and "interrupts" is defined at the PHY nodes under the
+switch MDIO bus node].
+
+Switch MDIO bus defined but explicitly disabled: If the device tree says
+status = "disabled" for the MDIO bus, we shouldn't need an MDIO bus at all.
+Instead, just exit as early as possible and do not call any MDIO API.
+
+The use of ds->user_mii_bus is inappropriate when the MDIO bus of the
+switch is described on the device tree [1], which is why we don't populate
+ds->user_mii_bus in that case.
+
+Link: https://lore.kernel.org/netdev/20231213120656.x46fyad6ls7sqyzv at skbuf/ [1]
+Suggested-by: David Bauer <mail at david-bauer.net>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122053431.7751-1-arinc.unal at arinc9.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 34 ++++++++++++++++++++++++++--------
+ 1 file changed, 26 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2175,24 +2175,40 @@ mt7530_free_irq_common(struct mt7530_pri
+ static void
+ mt7530_free_irq(struct mt7530_priv *priv)
+ {
+-	mt7530_free_mdio_irq(priv);
++	struct device_node *mnp, *np = priv->dev->of_node;
++
++	mnp = of_get_child_by_name(np, "mdio");
++	if (!mnp)
++		mt7530_free_mdio_irq(priv);
++	of_node_put(mnp);
++
+ 	mt7530_free_irq_common(priv);
+ }
+ 
+ static int
+ mt7530_setup_mdio(struct mt7530_priv *priv)
+ {
++	struct device_node *mnp, *np = priv->dev->of_node;
+ 	struct dsa_switch *ds = priv->ds;
+ 	struct device *dev = priv->dev;
+ 	struct mii_bus *bus;
+ 	static int idx;
+-	int ret;
++	int ret = 0;
++
++	mnp = of_get_child_by_name(np, "mdio");
++
++	if (mnp && !of_device_is_available(mnp))
++		goto out;
+ 
+ 	bus = devm_mdiobus_alloc(dev);
+-	if (!bus)
+-		return -ENOMEM;
++	if (!bus) {
++		ret = -ENOMEM;
++		goto out;
++	}
++
++	if (!mnp)
++		ds->slave_mii_bus = bus;
+ 
+-	ds->slave_mii_bus = bus;
+ 	bus->priv = priv;
+ 	bus->name = KBUILD_MODNAME "-mii";
+ 	snprintf(bus->id, MII_BUS_ID_SIZE, KBUILD_MODNAME "-%d", idx++);
+@@ -2201,16 +2217,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+ 	bus->parent = dev;
+ 	bus->phy_mask = ~ds->phys_mii_mask;
+ 
+-	if (priv->irq)
++	if (priv->irq && !mnp)
+ 		mt7530_setup_mdio_irq(priv);
+ 
+-	ret = devm_mdiobus_register(dev, bus);
++	ret = devm_of_mdiobus_register(dev, bus, mnp);
+ 	if (ret) {
+ 		dev_err(dev, "failed to register MDIO bus: %d\n", ret);
+-		if (priv->irq)
++		if (priv->irq && !mnp)
+ 			mt7530_free_mdio_irq(priv);
+ 	}
+ 
++out:
++	of_node_put(mnp);
+ 	return ret;
+ }
+ 
diff --git a/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
new file mode 100644
index 0000000000..381902472c
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
@@ -0,0 +1,34 @@
+From 022a254fafce88367914dfc8168fe687fc528cdb Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Wed, 24 Jan 2024 05:17:25 +0000
+Subject: [PATCH 22/48] net: dsa: mt7530: fix 10M/100M speed on MT7988 switch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Setup PMCR port register for actual speed and duplex on internally
+connected PHYs of the MT7988 built-in switch. This fixes links with
+speeds other than 1000M.
+
+Fixes: 110c18bfed41 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch")
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Acked-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/a5b04dfa8256d8302f402545a51ac4c626fdba25.1706071272.git.daniel at makrotopia.org
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 3 +--
+ 1 file changed, 1 insertion(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2883,8 +2883,7 @@ static void mt753x_phylink_mac_link_up(s
+ 	/* MT753x MAC works in 1G full duplex mode for all up-clocked
+ 	 * variants.
+ 	 */
+-	if (interface == PHY_INTERFACE_MODE_INTERNAL ||
+-	    interface == PHY_INTERFACE_MODE_TRGMII ||
++	if (interface == PHY_INTERFACE_MODE_TRGMII ||
+ 	    (phy_interface_mode_is_8023z(interface))) {
+ 		speed = SPEED_1000;
+ 		duplex = DUPLEX_FULL;
diff --git a/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch b/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
new file mode 100644
index 0000000000..c3f55f8106
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
@@ -0,0 +1,125 @@
+From a385398f77fad9eabe7cdc253e1a356484acc316 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:52 +0300
+Subject: [PATCH 23/48] net: dsa: mt7530: always trap frames to active CPU port
+ on MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On the MT7530 switch, the CPU_PORT field indicates which CPU port to trap
+frames to, regardless of the affinity of the inbound user port.
+
+When multiple CPU ports are in use, if the DSA conduit interface is down,
+trapped frames won't be passed to the conduit interface.
+
+To make trapping frames work including this case, implement
+ds->ops->conduit_state_change() on this subdriver and set the CPU_PORT
+field to the numerically smallest CPU port whose conduit interface is up.
+Introduce the active_cpu_ports field to store the information of the active
+CPU ports. Correct the macros, CPU_PORT is bits 4 through 6 of the
+register.
+
+Add a comment to explain frame trapping for this switch.
+
+Currently, the driver doesn't support the use of multiple CPU ports so this
+is not necessarily a bug fix.
+
+Suggested-by: Vladimir Oltean <olteanv at gmail.com>
+Suggested-by: Russell King (Oracle) <linux at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-1-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 35 +++++++++++++++++++++++++++++++----
+ drivers/net/dsa/mt7530.h |  6 ++++--
+ 2 files changed, 35 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1064,10 +1064,6 @@ mt753x_cpu_port_enable(struct dsa_switch
+ 	mt7530_set(priv, MT7530_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
+ 		   UNU_FFP(BIT(port)));
+ 
+-	/* Set CPU port number */
+-	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)
+-		mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port));
+-
+ 	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
+ 	 * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that
+ 	 * is affine to the inbound user port.
+@@ -3125,6 +3121,36 @@ static int mt753x_set_mac_eee(struct dsa
+ 	return 0;
+ }
+ 
++static void
++mt753x_conduit_state_change(struct dsa_switch *ds,
++			    const struct net_device *conduit,
++			    bool operational)
++{
++	struct dsa_port *cpu_dp = conduit->dsa_ptr;
++	struct mt7530_priv *priv = ds->priv;
++	int val = 0;
++	u8 mask;
++
++	/* Set the CPU port to trap frames to for MT7530. Trapped frames will be
++	 * forwarded to the numerically smallest CPU port whose conduit
++	 * interface is up.
++	 */
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return;
++
++	mask = BIT(cpu_dp->index);
++
++	if (operational)
++		priv->active_cpu_ports |= mask;
++	else
++		priv->active_cpu_ports &= ~mask;
++
++	if (priv->active_cpu_ports)
++		val = CPU_EN | CPU_PORT(__ffs(priv->active_cpu_ports));
++
++	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
++}
++
+ static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
+ {
+ 	return 0;
+@@ -3179,6 +3205,7 @@ const struct dsa_switch_ops mt7530_switc
+ 	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
+ 	.get_mac_eee		= mt753x_get_mac_eee,
+ 	.set_mac_eee		= mt753x_set_mac_eee,
++	.master_state_change	= mt753x_conduit_state_change,
+ };
+ EXPORT_SYMBOL_GPL(mt7530_switch_ops);
+ 
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -41,8 +41,8 @@ enum mt753x_id {
+ #define  UNU_FFP(x)			(((x) & 0xff) << 8)
+ #define  UNU_FFP_MASK			UNU_FFP(~0)
+ #define  CPU_EN				BIT(7)
+-#define  CPU_PORT(x)			((x) << 4)
+-#define  CPU_MASK			(0xf << 4)
++#define  CPU_PORT_MASK			GENMASK(6, 4)
++#define  CPU_PORT(x)			FIELD_PREP(CPU_PORT_MASK, x)
+ #define  MIRROR_EN			BIT(3)
+ #define  MIRROR_PORT(x)			((x) & 0x7)
+ #define  MIRROR_MASK			0x7
+@@ -773,6 +773,7 @@ struct mt753x_info {
+  * @irq_domain:		IRQ domain of the switch irq_chip
+  * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
+  * @create_sgmii:	Pointer to function creating SGMII PCS instance(s)
++ * @active_cpu_ports:	Holding the active CPU ports
+  */
+ struct mt7530_priv {
+ 	struct device		*dev;
+@@ -799,6 +800,7 @@ struct mt7530_priv {
+ 	struct irq_domain *irq_domain;
+ 	u32 irq_enable;
+ 	int (*create_sgmii)(struct mt7530_priv *priv, bool dual_sgmii);
++	u8 active_cpu_ports;
+ };
+ 
+ struct mt7530_hw_vlan_entry {
diff --git a/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch b/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
new file mode 100644
index 0000000000..35abed6b03
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
@@ -0,0 +1,45 @@
+From e3c8f69af69e6c4022094309445c009faf5e8cef Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:53 +0300
+Subject: [PATCH 24/48] net: dsa: mt7530: use p5_interface_select as data type
+ for p5_intf_sel
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use the p5_interface_select enumeration as the data type for the
+p5_intf_sel field. This ensures p5_intf_sel can only take the values
+defined in the p5_interface_select enumeration.
+
+Remove the explicit assignment of 0 to P5_DISABLED as the first enum item
+is automatically assigned 0.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-2-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.h | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -703,7 +703,7 @@ struct mt7530_port {
+ 
+ /* Port 5 interface select definitions */
+ enum p5_interface_select {
+-	P5_DISABLED = 0,
++	P5_DISABLED,
+ 	P5_INTF_SEL_PHY_P0,
+ 	P5_INTF_SEL_PHY_P4,
+ 	P5_INTF_SEL_GMAC5,
+@@ -789,7 +789,7 @@ struct mt7530_priv {
+ 	bool			mcm;
+ 	phy_interface_t		p6_interface;
+ 	phy_interface_t		p5_interface;
+-	unsigned int		p5_intf_sel;
++	enum p5_interface_select p5_intf_sel;
+ 	u8			mirror_rx;
+ 	u8			mirror_tx;
+ 	struct mt7530_port	ports[MT7530_NUM_PORTS];
diff --git a/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch b/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
new file mode 100644
index 0000000000..03329f8ba8
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
@@ -0,0 +1,227 @@
+From b0d590a5cdd95ed863717b279751d6166083889f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:54 +0300
+Subject: [PATCH 25/48] net: dsa: mt7530: store port 5 SGMII capability of
+ MT7531
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Introduce the p5_sgmii field to store the information for whether port 5
+has got SGMII or not. Instead of reading the MT7531_TOP_SIG_SR register
+multiple times, the register will be read once and the value will be
+stored on the p5_sgmii field. This saves unnecessary reads of the
+register.
+
+Move the comment about MT7531AE and MT7531BE to mt7531_setup(), where the
+switch is identified.
+
+Get rid of mt7531_dual_sgmii_supported() now that priv->p5_sgmii stores the
+information. Address the code where mt7531_dual_sgmii_supported() is used.
+
+Get rid of mt7531_is_rgmii_port() which just prints the opposite of
+priv->p5_sgmii.
+
+Instead of calling mt7531_pll_setup() then returning, do not call it if
+port 5 is SGMII.
+
+Remove P5_INTF_SEL_GMAC5_SGMII. The p5_interface_select enum is supposed to
+represent the mode that port 5 is being used in, not the hardware
+information of port 5. Set p5_intf_sel to P5_INTF_SEL_GMAC5 instead, if
+port 5 is not dsa_is_unused_port().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-3-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530-mdio.c |  7 ++---
+ drivers/net/dsa/mt7530.c      | 48 ++++++++++++-----------------------
+ drivers/net/dsa/mt7530.h      |  6 +++--
+ 3 files changed, 22 insertions(+), 39 deletions(-)
+
+--- a/drivers/net/dsa/mt7530-mdio.c
++++ b/drivers/net/dsa/mt7530-mdio.c
+@@ -81,17 +81,14 @@ static const struct regmap_bus mt7530_re
+ };
+ 
+ static int
+-mt7531_create_sgmii(struct mt7530_priv *priv, bool dual_sgmii)
++mt7531_create_sgmii(struct mt7530_priv *priv)
+ {
+ 	struct regmap_config *mt7531_pcs_config[2] = {};
+ 	struct phylink_pcs *pcs;
+ 	struct regmap *regmap;
+ 	int i, ret = 0;
+ 
+-	/* MT7531AE has two SGMII units for port 5 and port 6
+-	 * MT7531BE has only one SGMII unit for port 6
+-	 */
+-	for (i = dual_sgmii ? 0 : 1; i < 2; i++) {
++	for (i = priv->p5_sgmii ? 0 : 1; i < 2; i++) {
+ 		mt7531_pcs_config[i] = devm_kzalloc(priv->dev,
+ 						    sizeof(struct regmap_config),
+ 						    GFP_KERNEL);
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -473,15 +473,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ 	return 0;
+ }
+ 
+-static bool mt7531_dual_sgmii_supported(struct mt7530_priv *priv)
+-{
+-	u32 val;
+-
+-	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
+-
+-	return (val & PAD_DUAL_SGMII_EN) != 0;
+-}
+-
+ static int
+ mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
+ {
+@@ -496,9 +487,6 @@ mt7531_pll_setup(struct mt7530_priv *pri
+ 	u32 xtal;
+ 	u32 val;
+ 
+-	if (mt7531_dual_sgmii_supported(priv))
+-		return;
+-
+ 	val = mt7530_read(priv, MT7531_CREV);
+ 	top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR);
+ 	hwstrap = mt7530_read(priv, MT7531_HWTRAP);
+@@ -913,8 +901,6 @@ static const char *p5_intf_modes(unsigne
+ 		return "PHY P4";
+ 	case P5_INTF_SEL_GMAC5:
+ 		return "GMAC5";
+-	case P5_INTF_SEL_GMAC5_SGMII:
+-		return "GMAC5_SGMII";
+ 	default:
+ 		return "unknown";
+ 	}
+@@ -2515,6 +2501,12 @@ mt7531_setup(struct dsa_switch *ds)
+ 		return -ENODEV;
+ 	}
+ 
++	/* MT7531AE has got two SGMII units. One for port 5, one for port 6.
++	 * MT7531BE has got only one SGMII unit which is for port 6.
++	 */
++	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
++	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
++
+ 	/* all MACs must be forced link-down before sw reset */
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++)
+ 		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
+@@ -2524,21 +2516,18 @@ mt7531_setup(struct dsa_switch *ds)
+ 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
+ 		     SYS_CTRL_REG_RST);
+ 
+-	mt7531_pll_setup(priv);
+-
+-	if (mt7531_dual_sgmii_supported(priv)) {
+-		priv->p5_intf_sel = P5_INTF_SEL_GMAC5_SGMII;
+-
++	if (!priv->p5_sgmii) {
++		mt7531_pll_setup(priv);
++	} else {
+ 		/* Let ds->slave_mii_bus be able to access external phy. */
+ 		mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO11_RG_RXD2_MASK,
+ 			   MT7531_EXT_P_MDC_11);
+ 		mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO12_RG_RXD3_MASK,
+ 			   MT7531_EXT_P_MDIO_12);
+-	} else {
+-		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+ 	}
+-	dev_dbg(ds->dev, "P5 support %s interface\n",
+-		p5_intf_modes(priv->p5_intf_sel));
++
++	if (!dsa_is_unused_port(ds, 5))
++		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+ 
+ 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
+ 		   MT7531_GPIO0_INTERRUPT);
+@@ -2598,11 +2587,6 @@ static void mt7530_mac_port_get_caps(str
+ 	}
+ }
+ 
+-static bool mt7531_is_rgmii_port(struct mt7530_priv *priv, u32 port)
+-{
+-	return (port == 5) && (priv->p5_intf_sel != P5_INTF_SEL_GMAC5_SGMII);
+-}
+-
+ static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port,
+ 				     struct phylink_config *config)
+ {
+@@ -2615,7 +2599,7 @@ static void mt7531_mac_port_get_caps(str
+ 		break;
+ 
+ 	case 5: /* 2nd cpu port supports either rgmii or sgmii/8023z */
+-		if (mt7531_is_rgmii_port(priv, port)) {
++		if (!priv->p5_sgmii) {
+ 			phy_interface_set_rgmii(config->supported_interfaces);
+ 			break;
+ 		}
+@@ -2682,7 +2666,7 @@ static int mt7531_rgmii_setup(struct mt7
+ {
+ 	u32 val;
+ 
+-	if (!mt7531_is_rgmii_port(priv, port)) {
++	if (priv->p5_sgmii) {
+ 		dev_err(priv->dev, "RGMII mode is not available for port %d\n",
+ 			port);
+ 		return -EINVAL;
+@@ -2925,7 +2909,7 @@ mt7531_cpu_port_config(struct dsa_switch
+ 
+ 	switch (port) {
+ 	case 5:
+-		if (mt7531_is_rgmii_port(priv, port))
++		if (!priv->p5_sgmii)
+ 			interface = PHY_INTERFACE_MODE_RGMII;
+ 		else
+ 			interface = PHY_INTERFACE_MODE_2500BASEX;
+@@ -3083,7 +3067,7 @@ mt753x_setup(struct dsa_switch *ds)
+ 		mt7530_free_irq_common(priv);
+ 
+ 	if (priv->create_sgmii) {
+-		ret = priv->create_sgmii(priv, mt7531_dual_sgmii_supported(priv));
++		ret = priv->create_sgmii(priv);
+ 		if (ret && priv->irq)
+ 			mt7530_free_irq(priv);
+ 	}
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -707,7 +707,6 @@ enum p5_interface_select {
+ 	P5_INTF_SEL_PHY_P0,
+ 	P5_INTF_SEL_PHY_P4,
+ 	P5_INTF_SEL_GMAC5,
+-	P5_INTF_SEL_GMAC5_SGMII,
+ };
+ 
+ struct mt7530_priv;
+@@ -769,6 +768,8 @@ struct mt753x_info {
+  *			registers
+  * @p6_interface	Holding the current port 6 interface
+  * @p5_intf_sel:	Holding the current port 5 interface select
++ * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
++ *			has got SGMII
+  * @irq:		IRQ number of the switch
+  * @irq_domain:		IRQ domain of the switch irq_chip
+  * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
+@@ -790,6 +791,7 @@ struct mt7530_priv {
+ 	phy_interface_t		p6_interface;
+ 	phy_interface_t		p5_interface;
+ 	enum p5_interface_select p5_intf_sel;
++	bool			p5_sgmii;
+ 	u8			mirror_rx;
+ 	u8			mirror_tx;
+ 	struct mt7530_port	ports[MT7530_NUM_PORTS];
+@@ -799,7 +801,7 @@ struct mt7530_priv {
+ 	int irq;
+ 	struct irq_domain *irq_domain;
+ 	u32 irq_enable;
+-	int (*create_sgmii)(struct mt7530_priv *priv, bool dual_sgmii);
++	int (*create_sgmii)(struct mt7530_priv *priv);
+ 	u8 active_cpu_ports;
+ };
+ 
diff --git a/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch b/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
new file mode 100644
index 0000000000..1489c4f2f3
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
@@ -0,0 +1,133 @@
+From 0dcde4c1e7c47822a6b00d6f96b7f19e51536026 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:55 +0300
+Subject: [PATCH 26/48] net: dsa: mt7530: improve comments regarding switch
+ ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There's no logic to numerically order the CPU ports. Just state the port
+number instead.
+
+Remove the irrelevant PHY muxing information from
+mt7530_mac_port_get_caps(). Explain the supported MII modes instead.
+
+Remove the out of place PHY muxing information from
+mt753x_phylink_mac_config(). The function is for MT7530, MT7531, and the
+switch on the MT7988 SoC but there's no PHY muxing on MT7531 or the switch
+on the MT7988 SoC.
+
+These comments were gradually introduced with the commits below.
+commit ca366d6c889b ("net: dsa: mt7530: Convert to PHYLINK API")
+commit 38f790a80560 ("net: dsa: mt7530: Add support for port 5")
+commit 88bdef8be9f6 ("net: dsa: mt7530: Extend device data ready for adding
+a new hardware")
+commit c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch")
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-4-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 30 ++++++++++++++++++++----------
+ 1 file changed, 20 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2565,12 +2565,14 @@ static void mt7530_mac_port_get_caps(str
+ 				     struct phylink_config *config)
+ {
+ 	switch (port) {
+-	case 0 ... 4: /* Internal phy */
++	/* Ports which are connected to switch PHYs. There is no MII pinout. */
++	case 0 ... 4:
+ 		__set_bit(PHY_INTERFACE_MODE_GMII,
+ 			  config->supported_interfaces);
+ 		break;
+ 
+-	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
++	/* Port 5 supports rgmii with delays, mii, and gmii. */
++	case 5:
+ 		phy_interface_set_rgmii(config->supported_interfaces);
+ 		__set_bit(PHY_INTERFACE_MODE_MII,
+ 			  config->supported_interfaces);
+@@ -2578,7 +2580,8 @@ static void mt7530_mac_port_get_caps(str
+ 			  config->supported_interfaces);
+ 		break;
+ 
+-	case 6: /* 1st cpu port */
++	/* Port 6 supports rgmii and trgmii. */
++	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_RGMII,
+ 			  config->supported_interfaces);
+ 		__set_bit(PHY_INTERFACE_MODE_TRGMII,
+@@ -2593,19 +2596,24 @@ static void mt7531_mac_port_get_caps(str
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+ 	switch (port) {
+-	case 0 ... 4: /* Internal phy */
++	/* Ports which are connected to switch PHYs. There is no MII pinout. */
++	case 0 ... 4:
+ 		__set_bit(PHY_INTERFACE_MODE_GMII,
+ 			  config->supported_interfaces);
+ 		break;
+ 
+-	case 5: /* 2nd cpu port supports either rgmii or sgmii/8023z */
++	/* Port 5 supports rgmii with delays on MT7531BE, sgmii/802.3z on
++	 * MT7531AE.
++	 */
++	case 5:
+ 		if (!priv->p5_sgmii) {
+ 			phy_interface_set_rgmii(config->supported_interfaces);
+ 			break;
+ 		}
+ 		fallthrough;
+ 
+-	case 6: /* 1st cpu port supports sgmii/8023z only */
++	/* Port 6 supports sgmii/802.3z. */
++	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_SGMII,
+ 			  config->supported_interfaces);
+ 		__set_bit(PHY_INTERFACE_MODE_1000BASEX,
+@@ -2624,11 +2632,13 @@ static void mt7988_mac_port_get_caps(str
+ 	phy_interface_zero(config->supported_interfaces);
+ 
+ 	switch (port) {
+-	case 0 ... 4: /* Internal phy */
++	/* Ports which are connected to switch PHYs. There is no MII pinout. */
++	case 0 ... 4:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+ 		break;
+ 
++	/* Port 6 is connected to SoC's XGMII MAC. There is no MII pinout. */
+ 	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+@@ -2792,12 +2802,12 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	u32 mcr_cur, mcr_new;
+ 
+ 	switch (port) {
+-	case 0 ... 4: /* Internal phy */
++	case 0 ... 4:
+ 		if (state->interface != PHY_INTERFACE_MODE_GMII &&
+ 		    state->interface != PHY_INTERFACE_MODE_INTERNAL)
+ 			goto unsupported;
+ 		break;
+-	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
++	case 5:
+ 		if (priv->p5_interface == state->interface)
+ 			break;
+ 
+@@ -2807,7 +2817,7 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 		if (priv->p5_intf_sel != P5_DISABLED)
+ 			priv->p5_interface = state->interface;
+ 		break;
+-	case 6: /* 1st cpu port */
++	case 6:
+ 		if (priv->p6_interface == state->interface)
+ 			break;
+ 
diff --git a/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch b/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
new file mode 100644
index 0000000000..6fbf259735
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
@@ -0,0 +1,95 @@
+From 0f03d9bfa1da1d26cb950e4b35b1ff7b9be1828f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:56 +0300
+Subject: [PATCH 27/48] net: dsa: mt7530: improve code path for setting up port
+ 5
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There're two code paths for setting up port 5:
+
+mt7530_setup()
+-> mt7530_setup_port5()
+
+mt753x_phylink_mac_config()
+-> mt753x_mac_config()
+   -> mt7530_mac_config()
+      -> mt7530_setup_port5()
+
+Currently mt7530_setup_port5() from mt7530_setup() always runs. If port 5
+is used as a CPU, DSA, or user port, mt7530_setup_port5() from
+mt753x_phylink_mac_config() won't run. That is because priv->p5_interface
+set on mt7530_setup_port5() will match state->interface on
+mt753x_phylink_mac_config() which will stop running mt7530_setup_port5()
+again.
+
+Therefore, mt7530_setup_port5() will never run from
+mt753x_phylink_mac_config().
+
+Address this by not running mt7530_setup_port5() from mt7530_setup() if
+port 5 is used as a CPU, DSA, or user port. This driver isn't in the
+dsa_switches_apply_workarounds[] array so phylink will always be present.
+
+To keep the cases where port 5 isn't controlled by phylink working as
+before, preserve the mt7530_setup_port5() call from mt7530_setup().
+
+Do not set priv->p5_intf_sel to P5_DISABLED. It is already set to that when
+"priv" is allocated.
+
+Move setting the interface to a more specific location. It's supposed to be
+overwritten if PHY muxing is detected.
+
+Improve the comment which explains the process.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-5-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 17 ++++++++---------
+ 1 file changed, 8 insertions(+), 9 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2353,16 +2353,15 @@ mt7530_setup(struct dsa_switch *ds)
+ 		return ret;
+ 
+ 	/* Setup port 5 */
+-	priv->p5_intf_sel = P5_DISABLED;
+-	interface = PHY_INTERFACE_MODE_NA;
+-
+ 	if (!dsa_is_unused_port(ds, 5)) {
+ 		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+-		ret = of_get_phy_mode(dsa_to_port(ds, 5)->dn, &interface);
+-		if (ret && ret != -ENODEV)
+-			return ret;
+ 	} else {
+-		/* Scan the ethernet nodes. look for GMAC1, lookup used phy */
++		/* Scan the ethernet nodes. Look for GMAC1, lookup the used PHY.
++		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
++		 * is detected.
++		 */
++		interface = PHY_INTERFACE_MODE_NA;
++
+ 		for_each_child_of_node(dn, mac_np) {
+ 			if (!of_device_is_compatible(mac_np,
+ 						     "mediatek,eth-mac"))
+@@ -2393,6 +2392,8 @@ mt7530_setup(struct dsa_switch *ds)
+ 			of_node_put(phy_node);
+ 			break;
+ 		}
++
++		mt7530_setup_port5(ds, interface);
+ 	}
+ 
+ #ifdef CONFIG_GPIOLIB
+@@ -2403,8 +2404,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 	}
+ #endif /* CONFIG_GPIOLIB */
+ 
+-	mt7530_setup_port5(ds, interface);
+-
+ 	/* Flush the FDB table */
+ 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
+ 	if (ret < 0)
diff --git a/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch b/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch
new file mode 100644
index 0000000000..94692d948f
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch
@@ -0,0 +1,42 @@
+From 120581c81ad19704a9325505c83a82b7e760e96e Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:57 +0300
+Subject: [PATCH 28/48] net: dsa: mt7530: do not set priv->p5_interface on
+ mt7530_setup_port5()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Running mt7530_setup_port5() from mt7530_setup() used to handle all cases
+of configuring port 5, including phylink.
+
+Setting priv->p5_interface under mt7530_setup_port5() makes sure that
+mt7530_setup_port5() from mt753x_phylink_mac_config() won't run.
+
+The commit ("net: dsa: mt7530: improve code path for setting up port 5")
+makes so that mt7530_setup_port5() from mt7530_setup() runs only on
+non-phylink cases.
+
+Get rid of unnecessarily setting priv->p5_interface under
+mt7530_setup_port5() as port 5 phylink configuration will be done by
+running mt7530_setup_port5() from mt753x_phylink_mac_config() now.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-6-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -971,8 +971,6 @@ static void mt7530_setup_port5(struct ds
+ 	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n",
+ 		val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface));
+ 
+-	priv->p5_interface = interface;
+-
+ unlock_exit:
+ 	mutex_unlock(&priv->reg_mutex);
+ }
diff --git a/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch b/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
new file mode 100644
index 0000000000..c121eb4a35
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
@@ -0,0 +1,62 @@
+From 3b423061eb3a62e59b57939ae1e1234756a0f6a1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Jan 2024 08:35:58 +0300
+Subject: [PATCH 29/48] net: dsa: mt7530: do not run mt7530_setup_port5() if
+ port 5 is disabled
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There's no need to run all the code on mt7530_setup_port5() if port 5 is
+disabled. The only case for calling mt7530_setup_port5() from
+mt7530_setup() is when PHY muxing is enabled. That is because port 5 is not
+defined as a port on the devicetree, therefore, it cannot be controlled by
+phylink.
+
+Because of this, run mt7530_setup_port5() if priv->p5_intf_sel is
+P5_INTF_SEL_PHY_P0 or P5_INTF_SEL_PHY_P4. Remove the P5_DISABLED case from
+mt7530_setup_port5().
+
+Stop initialising the interface variable as the remaining cases will always
+call mt7530_setup_port5() with it initialised.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240122-for-netnext-mt7530-improvements-1-v3-7-042401f2b279 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 9 +++------
+ 1 file changed, 3 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -935,9 +935,6 @@ static void mt7530_setup_port5(struct ds
+ 		/* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */
+ 		val &= ~MHWTRAP_P5_DIS;
+ 		break;
+-	case P5_DISABLED:
+-		interface = PHY_INTERFACE_MODE_NA;
+-		break;
+ 	default:
+ 		dev_err(ds->dev, "Unsupported p5_intf_sel %d\n",
+ 			priv->p5_intf_sel);
+@@ -2358,8 +2355,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
+ 		 * is detected.
+ 		 */
+-		interface = PHY_INTERFACE_MODE_NA;
+-
+ 		for_each_child_of_node(dn, mac_np) {
+ 			if (!of_device_is_compatible(mac_np,
+ 						     "mediatek,eth-mac"))
+@@ -2391,7 +2386,9 @@ mt7530_setup(struct dsa_switch *ds)
+ 			break;
+ 		}
+ 
+-		mt7530_setup_port5(ds, interface);
++		if (priv->p5_intf_sel == P5_INTF_SEL_PHY_P0 ||
++		    priv->p5_intf_sel == P5_INTF_SEL_PHY_P4)
++			mt7530_setup_port5(ds, interface);
+ 	}
+ 
+ #ifdef CONFIG_GPIOLIB
diff --git a/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch b/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch
new file mode 100644
index 0000000000..9b610e0bdb
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch
@@ -0,0 +1,58 @@
+From 959f4ac4940bebb84bdd25ac61470b3965e1e475 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:02 +0300
+Subject: [PATCH 30/48] net: dsa: mt7530: empty default case on
+ mt7530_setup_port5()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There're two code paths for setting up port 5:
+
+mt7530_setup()
+-> mt7530_setup_port5()
+
+mt753x_phylink_mac_config()
+-> mt753x_mac_config()
+   -> mt7530_mac_config()
+      -> mt7530_setup_port5()
+
+On the first code path, priv->p5_intf_sel is either set to
+P5_INTF_SEL_PHY_P0 or P5_INTF_SEL_PHY_P4 when mt7530_setup_port5() is run.
+
+On the second code path, priv->p5_intf_sel is set to P5_INTF_SEL_GMAC5 when
+mt7530_setup_port5() is run.
+
+Empty the default case which will never run but is needed nonetheless to
+handle all the remaining enumeration values.
+
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-1-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 5 +----
+ 1 file changed, 1 insertion(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -936,9 +936,7 @@ static void mt7530_setup_port5(struct ds
+ 		val &= ~MHWTRAP_P5_DIS;
+ 		break;
+ 	default:
+-		dev_err(ds->dev, "Unsupported p5_intf_sel %d\n",
+-			priv->p5_intf_sel);
+-		goto unlock_exit;
++		break;
+ 	}
+ 
+ 	/* Setup RGMII settings */
+@@ -968,7 +966,6 @@ static void mt7530_setup_port5(struct ds
+ 	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n",
+ 		val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface));
+ 
+-unlock_exit:
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+ 
diff --git a/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch b/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
new file mode 100644
index 0000000000..dba1cb734e
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
@@ -0,0 +1,53 @@
+From 9ec0a800c8e0850e1358b7402d6af557af81cb38 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:03 +0300
+Subject: [PATCH 31/48] net: dsa: mt7530: move XTAL check to mt7530_setup()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The crystal frequency concerns the switch core. The frequency should be
+checked when the switch is being set up so the driver can reject the
+unsupported hardware earlier and without requiring port 6 to be used.
+
+Move it to mt7530_setup(). Drop the unnecessary function printing.
+
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-2-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 13 ++++++-------
+ 1 file changed, 6 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -408,13 +408,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ 
+ 	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
+ 
+-	if (xtal == HWTRAP_XTAL_20MHZ) {
+-		dev_err(priv->dev,
+-			"%s: MT7530 with a 20MHz XTAL is not supported!\n",
+-			__func__);
+-		return -EINVAL;
+-	}
+-
+ 	switch (interface) {
+ 	case PHY_INTERFACE_MODE_RGMII:
+ 		trgint = 0;
+@@ -2286,6 +2279,12 @@ mt7530_setup(struct dsa_switch *ds)
+ 		return -ENODEV;
+ 	}
+ 
++	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_20MHZ) {
++		dev_err(priv->dev,
++			"MT7530 with a 20MHz XTAL is not supported!\n");
++		return -EINVAL;
++	}
++
+ 	/* Reset the switch through internal reset */
+ 	mt7530_write(priv, MT7530_SYS_CTRL,
+ 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
diff --git a/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch b/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch
new file mode 100644
index 0000000000..90f8e095ef
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch
@@ -0,0 +1,146 @@
+From 7199c736aa8cd9c69ae681a9c733408372c2ce76 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:04 +0300
+Subject: [PATCH 32/48] net: dsa: mt7530: simplify mt7530_pad_clk_setup()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This code is from before this driver was converted to phylink API. Phylink
+deals with the unsupported interface cases before mt7530_pad_clk_setup() is
+run. Therefore, the default case would never run. However, it must be
+defined nonetheless to handle all the remaining enumeration values, the
+phy-modes.
+
+Switch to if statement for RGMII and return which simplifies the code and
+saves an indent.
+
+Set P6_INTF_MODE, which is the three least significant bits of the
+MT7530_P6ECR register, to 0 for RGMII even though it will already be 0
+after reset. This is to keep supporting dynamic reconfiguration of the port
+in the case the interface changes from TRGMII to RGMII.
+
+Disable the TRGMII clocks for all cases. They will be enabled if TRGMII is
+being used.
+
+Read XTAL after checking for RGMII as it's only needed for the TRGMII
+interface mode.
+
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-3-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 91 ++++++++++++++++++----------------------
+ 1 file changed, 40 insertions(+), 51 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -404,65 +404,54 @@ static int
+ mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	u32 ncpo1, ssc_delta, trgint, xtal;
++	u32 ncpo1, ssc_delta, xtal;
+ 
+-	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
++	/* Disable the MT7530 TRGMII clocks */
++	core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
+ 
+-	switch (interface) {
+-	case PHY_INTERFACE_MODE_RGMII:
+-		trgint = 0;
+-		break;
+-	case PHY_INTERFACE_MODE_TRGMII:
+-		trgint = 1;
+-		if (xtal == HWTRAP_XTAL_25MHZ)
+-			ssc_delta = 0x57;
+-		else
+-			ssc_delta = 0x87;
+-		if (priv->id == ID_MT7621) {
+-			/* PLL frequency: 125MHz: 1.0GBit */
+-			if (xtal == HWTRAP_XTAL_40MHZ)
+-				ncpo1 = 0x0640;
+-			if (xtal == HWTRAP_XTAL_25MHZ)
+-				ncpo1 = 0x0a00;
+-		} else { /* PLL frequency: 250MHz: 2.0Gbit */
+-			if (xtal == HWTRAP_XTAL_40MHZ)
+-				ncpo1 = 0x0c80;
+-			if (xtal == HWTRAP_XTAL_25MHZ)
+-				ncpo1 = 0x1400;
+-		}
+-		break;
+-	default:
+-		dev_err(priv->dev, "xMII interface %d not supported\n",
+-			interface);
+-		return -EINVAL;
++	if (interface == PHY_INTERFACE_MODE_RGMII) {
++		mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
++			   P6_INTF_MODE(0));
++		return 0;
+ 	}
+ 
+-	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
+-		   P6_INTF_MODE(trgint));
++	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1));
+ 
+-	if (trgint) {
+-		/* Disable the MT7530 TRGMII clocks */
+-		core_clear(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
+-
+-		/* Setup the MT7530 TRGMII Tx Clock */
+-		core_write(priv, CORE_PLL_GROUP5, RG_LCDDS_PCW_NCPO1(ncpo1));
+-		core_write(priv, CORE_PLL_GROUP6, RG_LCDDS_PCW_NCPO0(0));
+-		core_write(priv, CORE_PLL_GROUP10, RG_LCDDS_SSC_DELTA(ssc_delta));
+-		core_write(priv, CORE_PLL_GROUP11, RG_LCDDS_SSC_DELTA1(ssc_delta));
+-		core_write(priv, CORE_PLL_GROUP4,
+-			   RG_SYSPLL_DDSFBK_EN | RG_SYSPLL_BIAS_EN |
+-			   RG_SYSPLL_BIAS_LPF_EN);
+-		core_write(priv, CORE_PLL_GROUP2,
+-			   RG_SYSPLL_EN_NORMAL | RG_SYSPLL_VODEN |
+-			   RG_SYSPLL_POSDIV(1));
+-		core_write(priv, CORE_PLL_GROUP7,
+-			   RG_LCDDS_PCW_NCPO_CHG | RG_LCCDS_C(3) |
+-			   RG_LCDDS_PWDB | RG_LCDDS_ISO_EN);
++	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
+ 
+-		/* Enable the MT7530 TRGMII clocks */
+-		core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
++	if (xtal == HWTRAP_XTAL_25MHZ)
++		ssc_delta = 0x57;
++	else
++		ssc_delta = 0x87;
++
++	if (priv->id == ID_MT7621) {
++		/* PLL frequency: 125MHz: 1.0GBit */
++		if (xtal == HWTRAP_XTAL_40MHZ)
++			ncpo1 = 0x0640;
++		if (xtal == HWTRAP_XTAL_25MHZ)
++			ncpo1 = 0x0a00;
++	} else { /* PLL frequency: 250MHz: 2.0Gbit */
++		if (xtal == HWTRAP_XTAL_40MHZ)
++			ncpo1 = 0x0c80;
++		if (xtal == HWTRAP_XTAL_25MHZ)
++			ncpo1 = 0x1400;
+ 	}
+ 
++	/* Setup the MT7530 TRGMII Tx Clock */
++	core_write(priv, CORE_PLL_GROUP5, RG_LCDDS_PCW_NCPO1(ncpo1));
++	core_write(priv, CORE_PLL_GROUP6, RG_LCDDS_PCW_NCPO0(0));
++	core_write(priv, CORE_PLL_GROUP10, RG_LCDDS_SSC_DELTA(ssc_delta));
++	core_write(priv, CORE_PLL_GROUP11, RG_LCDDS_SSC_DELTA1(ssc_delta));
++	core_write(priv, CORE_PLL_GROUP4, RG_SYSPLL_DDSFBK_EN |
++		   RG_SYSPLL_BIAS_EN | RG_SYSPLL_BIAS_LPF_EN);
++	core_write(priv, CORE_PLL_GROUP2, RG_SYSPLL_EN_NORMAL |
++		   RG_SYSPLL_VODEN | RG_SYSPLL_POSDIV(1));
++	core_write(priv, CORE_PLL_GROUP7, RG_LCDDS_PCW_NCPO_CHG |
++		   RG_LCCDS_C(3) | RG_LCDDS_PWDB | RG_LCDDS_ISO_EN);
++
++	/* Enable the MT7530 TRGMII clocks */
++	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
++
+ 	return 0;
+ }
+ 
diff --git a/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch b/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
new file mode 100644
index 0000000000..93eccc8637
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
@@ -0,0 +1,97 @@
+From 921a7deee767aa157b5372863a4c1cac53e5c53a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:05 +0300
+Subject: [PATCH 33/48] net: dsa: mt7530: call port 6 setup from
+ mt7530_mac_config()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+mt7530_pad_clk_setup() is called if port 6 is enabled. It used to do more
+things than setting up port 6. That part was moved to more appropriate
+locations, mt7530_setup() and mt7530_pll_setup().
+
+Now that all it does is set up port 6, rename it to mt7530_setup_port6(),
+and move it to a more appropriate location, under mt7530_mac_config().
+
+Change mt7530_setup_port6() to void as there're no error cases.
+
+Leave an empty mt7530_pad_clk_setup() to satisfy the pad_setup function
+pointer.
+
+This is the code path for setting up the ports before:
+
+dsa_switch_ops :: phylink_mac_config() -> mt753x_phylink_mac_config()
+-> mt753x_mac_config()
+   -> mt753x_info :: mac_port_config() -> mt7530_mac_config()
+      -> mt7530_setup_port5()
+-> mt753x_pad_setup()
+   -> mt753x_info :: pad_setup() -> mt7530_pad_clk_setup()
+
+This is after:
+
+dsa_switch_ops :: phylink_mac_config() -> mt753x_phylink_mac_config()
+-> mt753x_mac_config()
+   -> mt753x_info :: mac_port_config() -> mt7530_mac_config()
+      -> mt7530_setup_port5()
+      -> mt7530_setup_port6()
+
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-4-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 19 +++++++++++--------
+ 1 file changed, 11 insertions(+), 8 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -400,8 +400,8 @@ static void mt7530_pll_setup(struct mt75
+ }
+ 
+ /* Setup port 6 interface mode and TRGMII TX circuit */
+-static int
+-mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
++static void
++mt7530_setup_port6(struct dsa_switch *ds, phy_interface_t interface)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 	u32 ncpo1, ssc_delta, xtal;
+@@ -412,7 +412,7 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ 	if (interface == PHY_INTERFACE_MODE_RGMII) {
+ 		mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
+ 			   P6_INTF_MODE(0));
+-		return 0;
++		return;
+ 	}
+ 
+ 	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1));
+@@ -451,7 +451,11 @@ mt7530_pad_clk_setup(struct dsa_switch *
+ 
+ 	/* Enable the MT7530 TRGMII clocks */
+ 	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
++}
+ 
++static int
++mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
++{
+ 	return 0;
+ }
+ 
+@@ -2640,11 +2644,10 @@ mt7530_mac_config(struct dsa_switch *ds,
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+-	/* Only need to setup port5. */
+-	if (port != 5)
+-		return 0;
+-
+-	mt7530_setup_port5(priv->ds, interface);
++	if (port == 5)
++		mt7530_setup_port5(priv->ds, interface);
++	else if (port == 6)
++		mt7530_setup_port6(priv->ds, interface);
+ 
+ 	return 0;
+ }
diff --git a/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch b/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
new file mode 100644
index 0000000000..a423c0899c
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
@@ -0,0 +1,148 @@
+From fcbc5d900fa53f79963fe4626069739ee5567b4b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:06 +0300
+Subject: [PATCH 34/48] net: dsa: mt7530: remove pad_setup function pointer
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The pad_setup function pointer was introduced with 88bdef8be9f6 ("net: dsa:
+mt7530: Extend device data ready for adding a new hardware"). It was being
+used to set up the core clock and port 6 of the MT7530 switch, and pll of
+the MT7531 switch.
+
+All of these were moved to more appropriate locations, and it was never
+used for the switch on the MT7988 SoC. Therefore, this function pointer
+hasn't got a use anymore. Remove it.
+
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-5-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 36 ++----------------------------------
+ drivers/net/dsa/mt7530.h |  3 ---
+ 2 files changed, 2 insertions(+), 37 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -453,18 +453,6 @@ mt7530_setup_port6(struct dsa_switch *ds
+ 	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
+ }
+ 
+-static int
+-mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
+-{
+-	return 0;
+-}
+-
+-static int
+-mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
+-{
+-	return 0;
+-}
+-
+ static void
+ mt7531_pll_setup(struct mt7530_priv *priv)
+ {
+@@ -2631,14 +2619,6 @@ static void mt7988_mac_port_get_caps(str
+ }
+ 
+ static int
+-mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
+-{
+-	struct mt7530_priv *priv = ds->priv;
+-
+-	return priv->info->pad_setup(ds, state->interface);
+-}
+-
+-static int
+ mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  phy_interface_t interface)
+ {
+@@ -2803,8 +2783,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 		if (priv->p6_interface == state->interface)
+ 			break;
+ 
+-		mt753x_pad_setup(ds, state);
+-
+ 		if (mt753x_mac_config(ds, port, mode, state) < 0)
+ 			goto unsupported;
+ 
+@@ -3127,11 +3105,6 @@ mt753x_conduit_state_change(struct dsa_s
+ 	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
+ }
+ 
+-static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
+-{
+-	return 0;
+-}
+-
+ static int mt7988_setup(struct dsa_switch *ds)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+@@ -3192,7 +3165,6 @@ const struct mt753x_info mt753x_table[]
+ 		.sw_setup = mt7530_setup,
+ 		.phy_read = mt7530_phy_read,
+ 		.phy_write = mt7530_phy_write,
+-		.pad_setup = mt7530_pad_clk_setup,
+ 		.mac_port_get_caps = mt7530_mac_port_get_caps,
+ 		.mac_port_config = mt7530_mac_config,
+ 	},
+@@ -3202,7 +3174,6 @@ const struct mt753x_info mt753x_table[]
+ 		.sw_setup = mt7530_setup,
+ 		.phy_read = mt7530_phy_read,
+ 		.phy_write = mt7530_phy_write,
+-		.pad_setup = mt7530_pad_clk_setup,
+ 		.mac_port_get_caps = mt7530_mac_port_get_caps,
+ 		.mac_port_config = mt7530_mac_config,
+ 	},
+@@ -3212,7 +3183,6 @@ const struct mt753x_info mt753x_table[]
+ 		.sw_setup = mt7531_setup,
+ 		.phy_read = mt7531_ind_phy_read,
+ 		.phy_write = mt7531_ind_phy_write,
+-		.pad_setup = mt7531_pad_setup,
+ 		.cpu_port_config = mt7531_cpu_port_config,
+ 		.mac_port_get_caps = mt7531_mac_port_get_caps,
+ 		.mac_port_config = mt7531_mac_config,
+@@ -3223,7 +3193,6 @@ const struct mt753x_info mt753x_table[]
+ 		.sw_setup = mt7988_setup,
+ 		.phy_read = mt7531_ind_phy_read,
+ 		.phy_write = mt7531_ind_phy_write,
+-		.pad_setup = mt7988_pad_setup,
+ 		.cpu_port_config = mt7988_cpu_port_config,
+ 		.mac_port_get_caps = mt7988_mac_port_get_caps,
+ 		.mac_port_config = mt7988_mac_config,
+@@ -3253,9 +3222,8 @@ mt7530_probe_common(struct mt7530_priv *
+ 	/* Sanity check if these required device operations are filled
+ 	 * properly.
+ 	 */
+-	if (!priv->info->sw_setup || !priv->info->pad_setup ||
+-	    !priv->info->phy_read || !priv->info->phy_write ||
+-	    !priv->info->mac_port_get_caps ||
++	if (!priv->info->sw_setup || !priv->info->phy_read ||
++	    !priv->info->phy_write || !priv->info->mac_port_get_caps ||
+ 	    !priv->info->mac_port_config)
+ 		return -EINVAL;
+ 
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -722,8 +722,6 @@ struct mt753x_pcs {
+  * @sw_setup:		Holding the handler to a device initialization
+  * @phy_read:		Holding the way reading PHY port
+  * @phy_write:		Holding the way writing PHY port
+- * @pad_setup:		Holding the way setting up the bus pad for a certain
+- *			MAC port
+  * @phy_mode_supported:	Check if the PHY type is being supported on a certain
+  *			port
+  * @mac_port_validate:	Holding the way to set addition validate type for a
+@@ -739,7 +737,6 @@ struct mt753x_info {
+ 	int (*sw_setup)(struct dsa_switch *ds);
+ 	int (*phy_read)(struct mt7530_priv *priv, int port, int regnum);
+ 	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
+-	int (*pad_setup)(struct dsa_switch *ds, phy_interface_t interface);
+ 	int (*cpu_port_config)(struct dsa_switch *ds, int port);
+ 	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
+ 				  struct phylink_config *config);
diff --git a/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch b/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
new file mode 100644
index 0000000000..3667dbf54a
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
@@ -0,0 +1,36 @@
+From 58a94eb63233bb2ede13b183b6a6a03aa0a2dfc3 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:07 +0300
+Subject: [PATCH 35/48] net: dsa: mt7530: correct port capabilities of MT7988
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On the switch on the MT7988 SoC, as shown in Block Diagram 8.1.1.3 on page
+125 of "MT7988A Wi-Fi 7 Generation Router Platform: Datasheet (Open
+Version) v0.1", there are only 4 PHYs. That's port 0 to 3. Set the case for
+ports which connect to switch PHYs to '0 ... 3'.
+
+Port 4 and 5 are not used at all in this design.
+
+Link: https://wiki.banana-pi.org/Banana_Pi_BPI-R4#Documents [1]
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-6-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2604,7 +2604,7 @@ static void mt7988_mac_port_get_caps(str
+ 
+ 	switch (port) {
+ 	/* Ports which are connected to switch PHYs. There is no MII pinout. */
+-	case 0 ... 4:
++	case 0 ... 3:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+ 		break;
diff --git a/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch b/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
new file mode 100644
index 0000000000..48433705f6
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
@@ -0,0 +1,38 @@
+From 4440ce33074be6bd55d1a0c8b5f4b6d433ae2c74 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Tue, 6 Feb 2024 01:08:08 +0300
+Subject: [PATCH 36/48] net: dsa: mt7530: do not clear
+ config->supported_interfaces
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There's no need to clear the config->supported_interfaces bitmap before
+reporting the supported interfaces as all bits in the bitmap will already
+be initialized to zero when the phylink_config structure is allocated. The
+"config" pointer points to &dp->phylink_config, and "dp" is allocated by
+dsa_port_touch() with kzalloc(), so all its fields are filled with zeroes.
+
+There's no code that would change the bitmap beforehand. Remove it.
+
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240206-for-netnext-mt7530-improvements-2-v5-7-d7d92a185cb1 at arinc9.com
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ drivers/net/dsa/mt7530.c | 2 --
+ 1 file changed, 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2600,8 +2600,6 @@ static void mt7531_mac_port_get_caps(str
+ static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port,
+ 				     struct phylink_config *config)
+ {
+-	phy_interface_zero(config->supported_interfaces);
+-
+ 	switch (port) {
+ 	/* Ports which are connected to switch PHYs. There is no MII pinout. */
+ 	case 0 ... 3:
diff --git a/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch b/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
new file mode 100644
index 0000000000..b707de87ed
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
@@ -0,0 +1,81 @@
+From 2f507aaeb1a12044f2376a255c2afff1f7432b0b Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:42:57 +0200
+Subject: [PATCH 37/48] net: dsa: mt7530: remove .mac_port_config for MT7988
+ and make it optional
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+For the switch on the MT7988 SoC, the mac_port_config member for ID_MT7988
+in mt753x_table is not needed as the interfaces of all MACs are already
+handled on mt7988_mac_port_get_caps().
+
+Therefore, remove the mac_port_config member from ID_MT7988 in
+mt753x_table. Before calling priv->info->mac_port_config(), if there's no
+mac_port_config member in mt753x_table, exit mt753x_mac_config()
+successfully.
+
+Remove calling priv->info->mac_port_config() from the sanity check as the
+sanity check requires a pointer to a mac_port_config function to be
+non-NULL. This will fail for MT7988 as mac_port_config won't be a member of
+its info table.
+
+Co-developed-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 18 ++++--------------
+ 1 file changed, 4 insertions(+), 14 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2683,17 +2683,6 @@ static bool mt753x_is_mac_port(u32 port)
+ }
+ 
+ static int
+-mt7988_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+-		  phy_interface_t interface)
+-{
+-	if (dsa_is_cpu_port(ds, port) &&
+-	    interface == PHY_INTERFACE_MODE_INTERNAL)
+-		return 0;
+-
+-	return -EINVAL;
+-}
+-
+-static int
+ mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  phy_interface_t interface)
+ {
+@@ -2733,6 +2722,9 @@ mt753x_mac_config(struct dsa_switch *ds,
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
++	if (!priv->info->mac_port_config)
++		return 0;
++
+ 	return priv->info->mac_port_config(ds, port, mode, state->interface);
+ }
+ 
+@@ -3193,7 +3185,6 @@ const struct mt753x_info mt753x_table[]
+ 		.phy_write = mt7531_ind_phy_write,
+ 		.cpu_port_config = mt7988_cpu_port_config,
+ 		.mac_port_get_caps = mt7988_mac_port_get_caps,
+-		.mac_port_config = mt7988_mac_config,
+ 	},
+ };
+ EXPORT_SYMBOL_GPL(mt753x_table);
+@@ -3221,8 +3212,7 @@ mt7530_probe_common(struct mt7530_priv *
+ 	 * properly.
+ 	 */
+ 	if (!priv->info->sw_setup || !priv->info->phy_read ||
+-	    !priv->info->phy_write || !priv->info->mac_port_get_caps ||
+-	    !priv->info->mac_port_config)
++	    !priv->info->phy_write || !priv->info->mac_port_get_caps)
+ 		return -EINVAL;
+ 
+ 	priv->id = priv->info->id;
diff --git a/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch b/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
new file mode 100644
index 0000000000..5dfb8bddbb
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
@@ -0,0 +1,31 @@
+From 0e297b1c662825f7dcd97272323c81f502987e0f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:42:58 +0200
+Subject: [PATCH 38/48] net: dsa: mt7530: set interrupt register only for
+ MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Setting this register related to interrupts is only needed for the MT7530
+switch. Make an exclusive check to ensure this.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Tested-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2084,7 +2084,7 @@ mt7530_setup_irq(struct mt7530_priv *pri
+ 	}
+ 
+ 	/* This register must be set for MT7530 to properly fire interrupts */
+-	if (priv->id != ID_MT7531)
++	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)
+ 		mt7530_set(priv, MT7530_TOP_SIG_CTRL, TOP_SIG_CTRL_NORMAL);
+ 
+ 	ret = request_threaded_irq(priv->irq, NULL, mt7530_irq_thread_fn,
diff --git a/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch b/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
new file mode 100644
index 0000000000..565f16a47f
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
@@ -0,0 +1,41 @@
+From 0eb6bc551371070325b6606cc3bed6734ecad87d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:42:59 +0200
+Subject: [PATCH 39/48] net: dsa: mt7530: do not use SW_PHY_RST to reset MT7531
+ switch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+According to the document MT7531 Reference Manual for Development Board
+v1.0, the SW_PHY_RST bit on the SYS_CTRL register doesn't exist for
+MT7531. This is likely why forcing link down on all ports is necessary for
+MT7531.
+
+Therefore, do not set SW_PHY_RST on mt7531_setup().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 6 ++----
+ 1 file changed, 2 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2478,14 +2478,12 @@ mt7531_setup(struct dsa_switch *ds)
+ 	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
+ 	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
+ 
+-	/* all MACs must be forced link-down before sw reset */
++	/* Force link down on all ports before internal reset */
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++)
+ 		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
+ 
+ 	/* Reset the switch through internal reset */
+-	mt7530_write(priv, MT7530_SYS_CTRL,
+-		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
+-		     SYS_CTRL_REG_RST);
++	mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_SW_RST | SYS_CTRL_REG_RST);
+ 
+ 	if (!priv->p5_sgmii) {
+ 		mt7531_pll_setup(priv);
diff --git a/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch b/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
new file mode 100644
index 0000000000..d636e2d564
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
@@ -0,0 +1,217 @@
+From bb20b1b4d832de4eb98ec7c22906db7c04e3f7c5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:00 +0200
+Subject: [PATCH 40/48] net: dsa: mt7530: get rid of useless error returns on
+ phylink code path
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Remove error returns on the cases where they are already handled with the
+function the mac_port_get_caps member in mt753x_table points to.
+
+mt7531_mac_config() is also called from mt7531_cpu_port_config() outside of
+phylink but the port and interface modes are already handled there.
+
+Change the functions and the mac_port_config function pointer to void now
+that there're no error returns anymore.
+
+Remove mt753x_is_mac_port() that used to help the said error returns.
+
+On mt7531_mac_config(), switch to if statements to simplify the code.
+
+Remove internal phy cases from mt753x_phylink_mac_config(), there is no
+need to check the interface mode as that's already handled with the
+function the mac_port_get_caps member in mt753x_table points to.
+
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Tested-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 81 ++++++++--------------------------------
+ drivers/net/dsa/mt7530.h |  6 +--
+ 2 files changed, 19 insertions(+), 68 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2614,7 +2614,7 @@ static void mt7988_mac_port_get_caps(str
+ 	}
+ }
+ 
+-static int
++static void
+ mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  phy_interface_t interface)
+ {
+@@ -2624,22 +2624,14 @@ mt7530_mac_config(struct dsa_switch *ds,
+ 		mt7530_setup_port5(priv->ds, interface);
+ 	else if (port == 6)
+ 		mt7530_setup_port6(priv->ds, interface);
+-
+-	return 0;
+ }
+ 
+-static int mt7531_rgmii_setup(struct mt7530_priv *priv, u32 port,
+-			      phy_interface_t interface,
+-			      struct phy_device *phydev)
++static void mt7531_rgmii_setup(struct mt7530_priv *priv, u32 port,
++			       phy_interface_t interface,
++			       struct phy_device *phydev)
+ {
+ 	u32 val;
+ 
+-	if (priv->p5_sgmii) {
+-		dev_err(priv->dev, "RGMII mode is not available for port %d\n",
+-			port);
+-		return -EINVAL;
+-	}
+-
+ 	val = mt7530_read(priv, MT7531_CLKGEN_CTRL);
+ 	val |= GP_CLK_EN;
+ 	val &= ~GP_MODE_MASK;
+@@ -2667,20 +2659,14 @@ static int mt7531_rgmii_setup(struct mt7
+ 		case PHY_INTERFACE_MODE_RGMII_ID:
+ 			break;
+ 		default:
+-			return -EINVAL;
++			break;
+ 		}
+ 	}
+-	mt7530_write(priv, MT7531_CLKGEN_CTRL, val);
+ 
+-	return 0;
+-}
+-
+-static bool mt753x_is_mac_port(u32 port)
+-{
+-	return (port == 5 || port == 6);
++	mt7530_write(priv, MT7531_CLKGEN_CTRL, val);
+ }
+ 
+-static int
++static void
+ mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  phy_interface_t interface)
+ {
+@@ -2688,42 +2674,21 @@ mt7531_mac_config(struct dsa_switch *ds,
+ 	struct phy_device *phydev;
+ 	struct dsa_port *dp;
+ 
+-	if (!mt753x_is_mac_port(port)) {
+-		dev_err(priv->dev, "port %d is not a MAC port\n", port);
+-		return -EINVAL;
+-	}
+-
+-	switch (interface) {
+-	case PHY_INTERFACE_MODE_RGMII:
+-	case PHY_INTERFACE_MODE_RGMII_ID:
+-	case PHY_INTERFACE_MODE_RGMII_RXID:
+-	case PHY_INTERFACE_MODE_RGMII_TXID:
++	if (phy_interface_mode_is_rgmii(interface)) {
+ 		dp = dsa_to_port(ds, port);
+ 		phydev = dp->slave->phydev;
+-		return mt7531_rgmii_setup(priv, port, interface, phydev);
+-	case PHY_INTERFACE_MODE_SGMII:
+-	case PHY_INTERFACE_MODE_NA:
+-	case PHY_INTERFACE_MODE_1000BASEX:
+-	case PHY_INTERFACE_MODE_2500BASEX:
+-		/* handled in SGMII PCS driver */
+-		return 0;
+-	default:
+-		return -EINVAL;
++		mt7531_rgmii_setup(priv, port, interface, phydev);
+ 	}
+-
+-	return -EINVAL;
+ }
+ 
+-static int
++static void
+ mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+ 		  const struct phylink_link_state *state)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+-	if (!priv->info->mac_port_config)
+-		return 0;
+-
+-	return priv->info->mac_port_config(ds, port, mode, state->interface);
++	if (priv->info->mac_port_config)
++		priv->info->mac_port_config(ds, port, mode, state->interface);
+ }
+ 
+ static struct phylink_pcs *
+@@ -2752,17 +2717,11 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	u32 mcr_cur, mcr_new;
+ 
+ 	switch (port) {
+-	case 0 ... 4:
+-		if (state->interface != PHY_INTERFACE_MODE_GMII &&
+-		    state->interface != PHY_INTERFACE_MODE_INTERNAL)
+-			goto unsupported;
+-		break;
+ 	case 5:
+ 		if (priv->p5_interface == state->interface)
+ 			break;
+ 
+-		if (mt753x_mac_config(ds, port, mode, state) < 0)
+-			goto unsupported;
++		mt753x_mac_config(ds, port, mode, state);
+ 
+ 		if (priv->p5_intf_sel != P5_DISABLED)
+ 			priv->p5_interface = state->interface;
+@@ -2771,16 +2730,10 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 		if (priv->p6_interface == state->interface)
+ 			break;
+ 
+-		if (mt753x_mac_config(ds, port, mode, state) < 0)
+-			goto unsupported;
++		mt753x_mac_config(ds, port, mode, state);
+ 
+ 		priv->p6_interface = state->interface;
+ 		break;
+-	default:
+-unsupported:
+-		dev_err(ds->dev, "%s: unsupported %s port: %i\n",
+-			__func__, phy_modes(state->interface), port);
+-		return;
+ 	}
+ 
+ 	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
+@@ -2863,7 +2816,6 @@ mt7531_cpu_port_config(struct dsa_switch
+ 	struct mt7530_priv *priv = ds->priv;
+ 	phy_interface_t interface;
+ 	int speed;
+-	int ret;
+ 
+ 	switch (port) {
+ 	case 5:
+@@ -2888,9 +2840,8 @@ mt7531_cpu_port_config(struct dsa_switch
+ 	else
+ 		speed = SPEED_1000;
+ 
+-	ret = mt7531_mac_config(ds, port, MLO_AN_FIXED, interface);
+-	if (ret)
+-		return ret;
++	mt7531_mac_config(ds, port, MLO_AN_FIXED, interface);
++
+ 	mt7530_write(priv, MT7530_PMCR_P(port),
+ 		     PMCR_CPU_PORT_SETTING(priv->id));
+ 	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -743,9 +743,9 @@ struct mt753x_info {
+ 	void (*mac_port_validate)(struct dsa_switch *ds, int port,
+ 				  phy_interface_t interface,
+ 				  unsigned long *supported);
+-	int (*mac_port_config)(struct dsa_switch *ds, int port,
+-			       unsigned int mode,
+-			       phy_interface_t interface);
++	void (*mac_port_config)(struct dsa_switch *ds, int port,
++				unsigned int mode,
++				phy_interface_t interface);
+ };
+ 
+ /* struct mt7530_priv -	This is the main data structure for holding the state
diff --git a/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch b/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
new file mode 100644
index 0000000000..60b369c8f8
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
@@ -0,0 +1,305 @@
+From 8554f6a7914d28b179671540f527897d85c88809 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:01 +0200
+Subject: [PATCH 41/48] net: dsa: mt7530: get rid of
+ priv->info->cpu_port_config()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+priv->info->cpu_port_config() is used for MT7531 and the switch on the
+MT7988 SoC. It sets up the ports described as a CPU port earlier than the
+phylink code path would do.
+
+This function is useless as:
+- Configuring the MACs can be done from the phylink_mac_config code path
+  instead.
+- All the link configuration it does on the CPU ports are later undone with
+  the port_enable, phylink_mac_config, and then phylink_mac_link_up code
+  path [1].
+
+priv->p5_interface and priv->p6_interface were being used to prevent
+configuring the MACs from the phylink_mac_config code path. Remove them now
+that they hold no purpose.
+
+Remove priv->info->cpu_port_config(). On mt753x_phylink_mac_config, switch
+to if statements to simplify the code.
+
+Remove the overwriting of the speed and duplex interfaces for certain
+interface modes. Phylink already provides the speed and duplex variables
+with proper values. Phylink already sets the max speed of TRGMII to
+SPEED_1000. Add SPEED_2500 for PHY_INTERFACE_MODE_2500BASEX to where the
+speed and EEE bits are set instead.
+
+On the switch on the MT7988 SoC, PHY_INTERFACE_MODE_INTERNAL is being used
+to describe the interface mode of the 10G MAC, which is of port 6. On
+mt7988_cpu_port_config() PMCR_FORCE_SPEED_1000 was set via the
+PMCR_CPU_PORT_SETTING() mask. Add SPEED_10000 case to where the speed bits
+are set to cover this. No need to add it to where the EEE bits are set as
+the "MT7988A Wi-Fi 7 Generation Router Platform: Datasheet (Open Version)
+v0.1" document shows that these bits don't exist on the MT7530_PMCR_P(6)
+register.
+
+Remove the definition of PMCR_CPU_PORT_SETTING() now that it holds no
+purpose.
+
+Change mt753x_cpu_port_enable() to void now that there're no error cases
+left.
+
+Link: https://lore.kernel.org/netdev/ZHy2jQLesdYFMQtO at shell.armlinux.org.uk/ [1]
+Suggested-by: Russell King (Oracle) <linux at armlinux.org.uk>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 114 +++------------------------------------
+ drivers/net/dsa/mt7530.h |  11 ----
+ 2 files changed, 7 insertions(+), 118 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -995,18 +995,10 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 		   MT753X_BPDU_CPU_ONLY);
+ }
+ 
+-static int
++static void
+ mt753x_cpu_port_enable(struct dsa_switch *ds, int port)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	int ret;
+-
+-	/* Setup max capability of CPU port at first */
+-	if (priv->info->cpu_port_config) {
+-		ret = priv->info->cpu_port_config(ds, port);
+-		if (ret)
+-			return ret;
+-	}
+ 
+ 	/* Enable Mediatek header mode on the cpu port */
+ 	mt7530_write(priv, MT7530_PVC_P(port),
+@@ -1032,8 +1024,6 @@ mt753x_cpu_port_enable(struct dsa_switch
+ 	/* Set to fallback mode for independent VLAN learning */
+ 	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK,
+ 		   MT7530_PORT_FALLBACK_MODE);
+-
+-	return 0;
+ }
+ 
+ static int
+@@ -2288,8 +2278,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 	val |= MHWTRAP_MANUAL;
+ 	mt7530_write(priv, MT7530_MHWTRAP, val);
+ 
+-	priv->p6_interface = PHY_INTERFACE_MODE_NA;
+-
+ 	mt753x_trap_frames(priv);
+ 
+ 	/* Enable and reset MIB counters */
+@@ -2304,9 +2292,7 @@ mt7530_setup(struct dsa_switch *ds)
+ 		mt7530_set(priv, MT7530_PSC_P(i), SA_DIS);
+ 
+ 		if (dsa_is_cpu_port(ds, i)) {
+-			ret = mt753x_cpu_port_enable(ds, i);
+-			if (ret)
+-				return ret;
++			mt753x_cpu_port_enable(ds, i);
+ 		} else {
+ 			mt7530_port_disable(ds, i);
+ 
+@@ -2410,9 +2396,7 @@ mt7531_setup_common(struct dsa_switch *d
+ 		mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR);
+ 
+ 		if (dsa_is_cpu_port(ds, i)) {
+-			ret = mt753x_cpu_port_enable(ds, i);
+-			if (ret)
+-				return ret;
++			mt753x_cpu_port_enable(ds, i);
+ 		} else {
+ 			mt7530_port_disable(ds, i);
+ 
+@@ -2501,10 +2485,6 @@ mt7531_setup(struct dsa_switch *ds)
+ 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
+ 		   MT7531_GPIO0_INTERRUPT);
+ 
+-	/* Let phylink decide the interface later. */
+-	priv->p5_interface = PHY_INTERFACE_MODE_NA;
+-	priv->p6_interface = PHY_INTERFACE_MODE_NA;
+-
+ 	/* Enable PHY core PLL, since phy_device has not yet been created
+ 	 * provided for phy_[read,write]_mmd_indirect is called, we provide
+ 	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
+@@ -2716,26 +2696,9 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	struct mt7530_priv *priv = ds->priv;
+ 	u32 mcr_cur, mcr_new;
+ 
+-	switch (port) {
+-	case 5:
+-		if (priv->p5_interface == state->interface)
+-			break;
+-
++	if (port == 5 || port == 6)
+ 		mt753x_mac_config(ds, port, mode, state);
+ 
+-		if (priv->p5_intf_sel != P5_DISABLED)
+-			priv->p5_interface = state->interface;
+-		break;
+-	case 6:
+-		if (priv->p6_interface == state->interface)
+-			break;
+-
+-		mt753x_mac_config(ds, port, mode, state);
+-
+-		priv->p6_interface = state->interface;
+-		break;
+-	}
+-
+ 	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
+ 	mcr_new = mcr_cur;
+ 	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
+@@ -2771,17 +2734,10 @@ static void mt753x_phylink_mac_link_up(s
+ 
+ 	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
+ 
+-	/* MT753x MAC works in 1G full duplex mode for all up-clocked
+-	 * variants.
+-	 */
+-	if (interface == PHY_INTERFACE_MODE_TRGMII ||
+-	    (phy_interface_mode_is_8023z(interface))) {
+-		speed = SPEED_1000;
+-		duplex = DUPLEX_FULL;
+-	}
+-
+ 	switch (speed) {
+ 	case SPEED_1000:
++	case SPEED_2500:
++	case SPEED_10000:
+ 		mcr |= PMCR_FORCE_SPEED_1000;
+ 		break;
+ 	case SPEED_100:
+@@ -2799,6 +2755,7 @@ static void mt753x_phylink_mac_link_up(s
+ 	if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
+ 		switch (speed) {
+ 		case SPEED_1000:
++		case SPEED_2500:
+ 			mcr |= PMCR_FORCE_EEE1G;
+ 			break;
+ 		case SPEED_100:
+@@ -2810,61 +2767,6 @@ static void mt753x_phylink_mac_link_up(s
+ 	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
+ }
+ 
+-static int
+-mt7531_cpu_port_config(struct dsa_switch *ds, int port)
+-{
+-	struct mt7530_priv *priv = ds->priv;
+-	phy_interface_t interface;
+-	int speed;
+-
+-	switch (port) {
+-	case 5:
+-		if (!priv->p5_sgmii)
+-			interface = PHY_INTERFACE_MODE_RGMII;
+-		else
+-			interface = PHY_INTERFACE_MODE_2500BASEX;
+-
+-		priv->p5_interface = interface;
+-		break;
+-	case 6:
+-		interface = PHY_INTERFACE_MODE_2500BASEX;
+-
+-		priv->p6_interface = interface;
+-		break;
+-	default:
+-		return -EINVAL;
+-	}
+-
+-	if (interface == PHY_INTERFACE_MODE_2500BASEX)
+-		speed = SPEED_2500;
+-	else
+-		speed = SPEED_1000;
+-
+-	mt7531_mac_config(ds, port, MLO_AN_FIXED, interface);
+-
+-	mt7530_write(priv, MT7530_PMCR_P(port),
+-		     PMCR_CPU_PORT_SETTING(priv->id));
+-	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
+-				   speed, DUPLEX_FULL, true, true);
+-
+-	return 0;
+-}
+-
+-static int
+-mt7988_cpu_port_config(struct dsa_switch *ds, int port)
+-{
+-	struct mt7530_priv *priv = ds->priv;
+-
+-	mt7530_write(priv, MT7530_PMCR_P(port),
+-		     PMCR_CPU_PORT_SETTING(priv->id));
+-
+-	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED,
+-				   PHY_INTERFACE_MODE_INTERNAL, NULL,
+-				   SPEED_10000, DUPLEX_FULL, true, true);
+-
+-	return 0;
+-}
+-
+ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
+ 				    struct phylink_config *config)
+ {
+@@ -3122,7 +3024,6 @@ const struct mt753x_info mt753x_table[]
+ 		.sw_setup = mt7531_setup,
+ 		.phy_read = mt7531_ind_phy_read,
+ 		.phy_write = mt7531_ind_phy_write,
+-		.cpu_port_config = mt7531_cpu_port_config,
+ 		.mac_port_get_caps = mt7531_mac_port_get_caps,
+ 		.mac_port_config = mt7531_mac_config,
+ 	},
+@@ -3132,7 +3033,6 @@ const struct mt753x_info mt753x_table[]
+ 		.sw_setup = mt7988_setup,
+ 		.phy_read = mt7531_ind_phy_read,
+ 		.phy_write = mt7531_ind_phy_write,
+-		.cpu_port_config = mt7988_cpu_port_config,
+ 		.mac_port_get_caps = mt7988_mac_port_get_caps,
+ 	},
+ };
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -331,13 +331,6 @@ enum mt7530_vlan_port_acc_frm {
+ 					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
+ 					 PMCR_FORCE_FDX | PMCR_FORCE_LNK | \
+ 					 PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100)
+-#define  PMCR_CPU_PORT_SETTING(id)	(PMCR_FORCE_MODE_ID((id)) | \
+-					 PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | \
+-					 PMCR_BACKOFF_EN | PMCR_BACKPR_EN | \
+-					 PMCR_TX_EN | PMCR_RX_EN | \
+-					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
+-					 PMCR_FORCE_SPEED_1000 | \
+-					 PMCR_FORCE_FDX | PMCR_FORCE_LNK)
+ 
+ #define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
+ #define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
+@@ -737,7 +730,6 @@ struct mt753x_info {
+ 	int (*sw_setup)(struct dsa_switch *ds);
+ 	int (*phy_read)(struct mt7530_priv *priv, int port, int regnum);
+ 	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
+-	int (*cpu_port_config)(struct dsa_switch *ds, int port);
+ 	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
+ 				  struct phylink_config *config);
+ 	void (*mac_port_validate)(struct dsa_switch *ds, int port,
+@@ -763,7 +755,6 @@ struct mt753x_info {
+  * @ports:		Holding the state among ports
+  * @reg_mutex:		The lock for protecting among process accessing
+  *			registers
+- * @p6_interface	Holding the current port 6 interface
+  * @p5_intf_sel:	Holding the current port 5 interface select
+  * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
+  *			has got SGMII
+@@ -785,8 +776,6 @@ struct mt7530_priv {
+ 	const struct mt753x_info *info;
+ 	unsigned int		id;
+ 	bool			mcm;
+-	phy_interface_t		p6_interface;
+-	phy_interface_t		p5_interface;
+ 	enum p5_interface_select p5_intf_sel;
+ 	bool			p5_sgmii;
+ 	u8			mirror_rx;
diff --git a/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch b/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
new file mode 100644
index 0000000000..f14634c17a
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
@@ -0,0 +1,48 @@
+From 0c282205ef8c6dd6d2c145fac1fb6aba3e65c02d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:02 +0200
+Subject: [PATCH 42/48] net: dsa: mt7530: get rid of mt753x_mac_config()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+There is no need for a separate function to call
+priv->info->mac_port_config(). Call it from mt753x_phylink_mac_config()
+instead and remove mt753x_mac_config().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 14 ++------------
+ 1 file changed, 2 insertions(+), 12 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2661,16 +2661,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+ 	}
+ }
+ 
+-static void
+-mt753x_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
+-		  const struct phylink_link_state *state)
+-{
+-	struct mt7530_priv *priv = ds->priv;
+-
+-	if (priv->info->mac_port_config)
+-		priv->info->mac_port_config(ds, port, mode, state->interface);
+-}
+-
+ static struct phylink_pcs *
+ mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
+ 			      phy_interface_t interface)
+@@ -2696,8 +2686,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	struct mt7530_priv *priv = ds->priv;
+ 	u32 mcr_cur, mcr_new;
+ 
+-	if (port == 5 || port == 6)
+-		mt753x_mac_config(ds, port, mode, state);
++	if ((port == 5 || port == 6) && priv->info->mac_port_config)
++		priv->info->mac_port_config(ds, port, mode, state->interface);
+ 
+ 	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
+ 	mcr_new = mcr_cur;
diff --git a/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch b/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
new file mode 100644
index 0000000000..2fa17d4558
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
@@ -0,0 +1,57 @@
+From d55c300aa1fe240aa3eba18550ba6c4e2c4bd157 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:03 +0200
+Subject: [PATCH 43/48] net: dsa: mt7530: put initialising PCS devices code
+ back to original order
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The commit fae463084032 ("net: dsa: mt753x: fix pcs conversion regression")
+fixes regression caused by cpu_port_config manually calling phylink
+operations. cpu_port_config was deemed useless and was removed. Therefore,
+put initialising PCS devices code back to its original order.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 20 ++++++++++----------
+ 1 file changed, 10 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2845,17 +2845,9 @@ static int
+ mt753x_setup(struct dsa_switch *ds)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	int i, ret;
++	int ret = priv->info->sw_setup(ds);
++	int i;
+ 
+-	/* Initialise the PCS devices */
+-	for (i = 0; i < priv->ds->num_ports; i++) {
+-		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
+-		priv->pcs[i].pcs.neg_mode = true;
+-		priv->pcs[i].priv = priv;
+-		priv->pcs[i].port = i;
+-	}
+-
+-	ret = priv->info->sw_setup(ds);
+ 	if (ret)
+ 		return ret;
+ 
+@@ -2867,6 +2859,14 @@ mt753x_setup(struct dsa_switch *ds)
+ 	if (ret && priv->irq)
+ 		mt7530_free_irq_common(priv);
+ 
++	/* Initialise the PCS devices */
++	for (i = 0; i < priv->ds->num_ports; i++) {
++		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
++		priv->pcs[i].pcs.neg_mode = true;
++		priv->pcs[i].priv = priv;
++		priv->pcs[i].port = i;
++	}
++
+ 	if (priv->create_sgmii) {
+ 		ret = priv->create_sgmii(priv);
+ 		if (ret && priv->irq)
diff --git a/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch b/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
new file mode 100644
index 0000000000..d7c8180c8a
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
@@ -0,0 +1,68 @@
+From a9544caa482a7ed215117a902f04185216997831 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:04 +0200
+Subject: [PATCH 44/48] net: dsa: mt7530: sort link settings ops and force link
+ down on all ports
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+port_enable and port_disable clears the link settings. Move that to
+mt7530_setup() and mt7531_setup_common() which set up the switches. This
+way, the link settings are cleared on all ports at setup, and then only
+once with phylink_mac_link_down() when a link goes down.
+
+Enable force mode at setup to apply the force part of the link settings.
+This ensures that disabled ports will have their link down.
+
+Suggested-by: Vladimir Oltean <olteanv at gmail.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 14 ++++++++++++--
+ 1 file changed, 12 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1047,7 +1047,6 @@ mt7530_port_enable(struct dsa_switch *ds
+ 	priv->ports[port].enable = true;
+ 	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
+ 		   priv->ports[port].pm);
+-	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ 
+@@ -1067,7 +1066,6 @@ mt7530_port_disable(struct dsa_switch *d
+ 	priv->ports[port].enable = false;
+ 	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
+ 		   PCR_MATRIX_CLR);
+-	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+@@ -2284,6 +2282,12 @@ mt7530_setup(struct dsa_switch *ds)
+ 	mt7530_mib_reset(ds);
+ 
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++		/* Clear link settings and enable force mode to force link down
++		 * on all ports until they're enabled later.
++		 */
++		mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
++			   PMCR_FORCE_MODE, PMCR_FORCE_MODE);
++
+ 		/* Disable forwarding by default on all ports */
+ 		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
+ 			   PCR_MATRIX_CLR);
+@@ -2386,6 +2390,12 @@ mt7531_setup_common(struct dsa_switch *d
+ 		     UNU_FFP_MASK);
+ 
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++		/* Clear link settings and enable force mode to force link down
++		 * on all ports until they're enabled later.
++		 */
++		mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
++			   MT7531_FORCE_MODE, MT7531_FORCE_MODE);
++
+ 		/* Disable forwarding by default on all ports */
+ 		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
+ 			   PCR_MATRIX_CLR);
diff --git a/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch b/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch
new file mode 100644
index 0000000000..d29b183be1
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch
@@ -0,0 +1,83 @@
+From 89017cac5f6fbaab23955818c31b3c7f1eb26f4a Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Fri, 1 Mar 2024 12:43:05 +0200
+Subject: [PATCH 45/48] net: dsa: mt7530: simplify link operations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The "MT7621 Giga Switch Programming Guide v0.3", "MT7531 Reference Manual
+for Development Board v1.0", and "MT7988A Wi-Fi 7 Generation Router
+Platform: Datasheet (Open Version) v0.1" documents show that these bits are
+enabled at reset:
+
+PMCR_IFG_XMIT(1) (not part of PMCR_LINK_SETTINGS_MASK)
+PMCR_MAC_MODE (not part of PMCR_LINK_SETTINGS_MASK)
+PMCR_TX_EN
+PMCR_RX_EN
+PMCR_BACKOFF_EN (not part of PMCR_LINK_SETTINGS_MASK)
+PMCR_BACKPR_EN (not part of PMCR_LINK_SETTINGS_MASK)
+PMCR_TX_FC_EN
+PMCR_RX_FC_EN
+
+These bits also don't exist on the MT7530_PMCR_P(6) register of the switch
+on the MT7988 SoC:
+
+PMCR_IFG_XMIT()
+PMCR_MAC_MODE
+PMCR_BACKOFF_EN
+PMCR_BACKPR_EN
+
+Remove the setting of the bits not part of PMCR_LINK_SETTINGS_MASK on
+phylink_mac_config as they're already set.
+
+The bit for setting the port on force mode is already done on
+mt7530_setup() and mt7531_setup_common(). So get rid of
+PMCR_FORCE_MODE_ID() which helped determine which bit to use for the switch
+model.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 12 +-----------
+ drivers/net/dsa/mt7530.h |  2 --
+ 2 files changed, 1 insertion(+), 13 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2694,23 +2694,13 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 			  const struct phylink_link_state *state)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	u32 mcr_cur, mcr_new;
+ 
+ 	if ((port == 5 || port == 6) && priv->info->mac_port_config)
+ 		priv->info->mac_port_config(ds, port, mode, state->interface);
+ 
+-	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
+-	mcr_new = mcr_cur;
+-	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
+-	mcr_new |= PMCR_IFG_XMIT(1) | PMCR_MAC_MODE | PMCR_BACKOFF_EN |
+-		   PMCR_BACKPR_EN | PMCR_FORCE_MODE_ID(priv->id);
+-
+ 	/* Are we connected to external phy */
+ 	if (port == 5 && dsa_is_user_port(ds, 5))
+-		mcr_new |= PMCR_EXT_PHY;
+-
+-	if (mcr_new != mcr_cur)
+-		mt7530_write(priv, MT7530_PMCR_P(port), mcr_new);
++		mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY);
+ }
+ 
+ static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -324,8 +324,6 @@ enum mt7530_vlan_port_acc_frm {
+ 					 MT7531_FORCE_DPX | \
+ 					 MT7531_FORCE_RX_FC | \
+ 					 MT7531_FORCE_TX_FC)
+-#define  PMCR_FORCE_MODE_ID(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+-					 MT7531_FORCE_MODE : PMCR_FORCE_MODE)
+ #define  PMCR_LINK_SETTINGS_MASK	(PMCR_TX_EN | PMCR_FORCE_SPEED_1000 | \
+ 					 PMCR_RX_EN | PMCR_FORCE_SPEED_100 | \
+ 					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
diff --git a/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch b/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
new file mode 100644
index 0000000000..e00615d540
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
@@ -0,0 +1,74 @@
+From cfa7c85f92cd3814ad9748eb1ab25658c7f7cc67 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Wed, 20 Mar 2024 23:45:30 +0300
+Subject: [PATCH 48/48] net: dsa: mt7530: fix improper frames on all 25MHz and
+ 40MHz XTAL MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530 switch after reset initialises with a core clock frequency that
+works with a 25MHz XTAL connected to it. For 40MHz XTAL, the core clock
+frequency must be set to 500MHz.
+
+The mt7530_pll_setup() function is responsible of setting the core clock
+frequency. Currently, it runs on MT7530 with 25MHz and 40MHz XTAL. This
+causes MT7530 switch with 25MHz XTAL to egress and ingress frames
+improperly.
+
+Introduce a check to run it only on MT7530 with 40MHz XTAL.
+
+The core clock frequency is set by writing to a switch PHY's register.
+Access to the PHY's register is done via the MDIO bus the switch is also
+on. Therefore, it works only when the switch makes switch PHYs listen on
+the MDIO bus the switch is on. This is controlled either by the state of
+the ESW_P1_LED_1 pin after reset deassertion or modifying bit 5 of the
+modifiable trap register.
+
+When ESW_P1_LED_1 is pulled high, PHY indirect access is used. That means
+accessing PHY registers via the PHY indirect access control register of the
+switch.
+
+When ESW_P1_LED_1 is pulled low, PHY direct access is used. That means
+accessing PHY registers via the MDIO bus the switch is on.
+
+For MT7530 switch with 40MHz XTAL on a board with ESW_P1_LED_1 pulled high,
+the core clock frequency won't be set to 500MHz, causing the switch to
+egress and ingress frames improperly.
+
+Run mt7530_pll_setup() after PHY direct access is set on the modifiable
+trap register.
+
+With these two changes, all MT7530 switches with 25MHz and 40MHz, and
+P1_LED_1 pulled high or low, will egress and ingress frames properly.
+
+Link: https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/4a5dd143f2172ec97a2872fa29c7c4cd520f45b5/linux-mt/drivers/net/ethernet/mediatek/gsw_mt7623.c#L1039
+Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/20240320-for-net-mt7530-fix-25mhz-xtal-with-direct-phy-access-v1-1-d92f605f1160 at arinc9.com
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2259,8 +2259,6 @@ mt7530_setup(struct dsa_switch *ds)
+ 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
+ 		     SYS_CTRL_REG_RST);
+ 
+-	mt7530_pll_setup(priv);
+-
+ 	/* Lower Tx driving for TRGMII path */
+ 	for (i = 0; i < NUM_TRGMII_CTRL; i++)
+ 		mt7530_write(priv, MT7530_TRGMII_TD_ODT(i),
+@@ -2276,6 +2274,9 @@ mt7530_setup(struct dsa_switch *ds)
+ 	val |= MHWTRAP_MANUAL;
+ 	mt7530_write(priv, MT7530_MHWTRAP, val);
+ 
++	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ)
++		mt7530_pll_setup(priv);
++
+ 	mt753x_trap_frames(priv);
+ 
+ 	/* Enable and reset MIB counters */
diff --git a/target/linux/generic/pending-6.1/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch b/target/linux/generic/pending-6.1/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
deleted file mode 100644
index a18d1ad717..0000000000
--- a/target/linux/generic/pending-6.1/723-net-mt7531-ensure-all-MACs-are-powered-down-before-r.patch
+++ /dev/null
@@ -1,28 +0,0 @@
-From 3fb8841513c4ec3a2e5d366df86230c45f239a57 Mon Sep 17 00:00:00 2001
-From: Alexander Couzens <lynxis at fe80.eu>
-Date: Sat, 13 Aug 2022 13:08:22 +0200
-Subject: [PATCH 03/10] net: mt7531: ensure all MACs are powered down before
- reset
-
-The datasheet [1] explicit describes it as requirement for a reset.
-
-[1] MT7531 Reference Manual for Development Board rev 1.0, page 735
-
-Signed-off-by: Alexander Couzens <lynxis at fe80.eu>
----
- drivers/net/dsa/mt7530.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2252,6 +2252,10 @@ mt7530_setup(struct dsa_switch *ds)
- 		return -ENODEV;
- 	}
- 
-+	/* all MACs must be forced link-down before sw reset */
-+	for (i = 0; i < MT7530_NUM_PORTS; i++)
-+		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
-+
- 	/* Reset the switch through internal reset */
- 	mt7530_write(priv, MT7530_SYS_CTRL,
- 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
diff --git a/target/linux/generic/pending-6.1/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch b/target/linux/generic/pending-6.1/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
deleted file mode 100644
index d333f3f489..0000000000
--- a/target/linux/generic/pending-6.1/795-mt7530-register-OF-node-for-internal-MDIO-bus.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From 1d81e51d6d79d9098013b2e8cdd677bae998c5d8 Mon Sep 17 00:00:00 2001
-From: David Bauer <mail at david-bauer.net>
-Date: Fri, 28 Apr 2023 02:22:59 +0200
-Subject: [PATCH 1/2] mt7530: register OF node for internal MDIO bus
-
-The MT753x switches provide a switch-internal MDIO bus for the embedded
-PHYs.
-
-Register a OF sub-node on the switch OF-node for this internal MDIO bus.
-This allows to configure the embedded PHYs using device-tree.
-
-Signed-off-by: David Bauer <mail at david-bauer.net>
----
- drivers/net/dsa/mt7530.c | 7 ++++++-
- 1 file changed, 6 insertions(+), 1 deletion(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2142,10 +2142,13 @@ mt7530_setup_mdio(struct mt7530_priv *pr
- {
- 	struct dsa_switch *ds = priv->ds;
- 	struct device *dev = priv->dev;
-+	struct device_node *np, *mnp;
- 	struct mii_bus *bus;
- 	static int idx;
- 	int ret;
- 
-+	np = priv->dev->of_node;
-+
- 	bus = devm_mdiobus_alloc(dev);
- 	if (!bus)
- 		return -ENOMEM;
-@@ -2162,7 +2165,9 @@ mt7530_setup_mdio(struct mt7530_priv *pr
- 	if (priv->irq)
- 		mt7530_setup_mdio_irq(priv);
- 
--	ret = devm_mdiobus_register(dev, bus);
-+	mnp = of_get_child_by_name(np, "mdio");
-+	ret = devm_of_mdiobus_register(dev, bus, mnp);
-+	of_node_put(mnp);
- 	if (ret) {
- 		dev_err(dev, "failed to register MDIO bus: %d\n", ret);
- 		if (priv->irq)
diff --git a/target/linux/generic/pending-6.1/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/pending-6.1/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
deleted file mode 100644
index 47e3b140c8..0000000000
--- a/target/linux/generic/pending-6.1/796-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From a444877c10a665cd8a869e6d37facdb89fd95f79 Mon Sep 17 00:00:00 2001
-Message-ID: <a444877c10a665cd8a869e6d37facdb89fd95f79.1706070008.git.daniel at makrotopia.org>
-From: Daniel Golle <daniel at makrotopia.org>
-Date: Wed, 24 Jan 2024 04:17:11 +0000
-Subject: [PATCH net] net: dsa: mt7530: fix 10M/100M speed on MT7988 switch
-To: Ar?n? ?NAL <arinc.unal at arinc9.com>,
-    Daniel Golle <daniel at makrotopia.org>,
-    DENG Qingfang <dqfext at gmail.com>,
-    Sean Wang <sean.wang at mediatek.com>,
-    Andrew Lunn <andrew at lunn.ch>,
-    Florian Fainelli <f.fainelli at gmail.com>,
-    Vladimir Oltean <olteanv at gmail.com>,
-    David S. Miller <davem at davemloft.net>,
-    Eric Dumazet <edumazet at google.com>,
-    Jakub Kicinski <kuba at kernel.org>,
-    Paolo Abeni <pabeni at redhat.com>,
-    Matthias Brugger <matthias.bgg at gmail.com>,
-    AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>,
-    netdev at vger.kernel.org,
-    linux-kernel at vger.kernel.org,
-    linux-arm-kernel at lists.infradead.org,
-    linux-mediatek at lists.infradead.org
-
-Setup PMCR port register for actual speed and duplex on internally
-connected PHYs of the MT7988 built-in switch. This fixes links with
-speeds other than 1000M.
-
-Fixes: ("110c18bfed414 net: dsa: mt7530: introduce driver for MT7988 built-in switch")
-Signed-off-by: Daniel Golle <daniel at makrotopia.org>
----
- drivers/net/dsa/mt7530.c | 3 +--
- 1 file changed, 1 insertion(+), 2 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2849,8 +2849,7 @@ static void mt753x_phylink_mac_link_up(s
- 	/* MT753x MAC works in 1G full duplex mode for all up-clocked
- 	 * variants.
- 	 */
--	if (interface == PHY_INTERFACE_MODE_INTERNAL ||
--	    interface == PHY_INTERFACE_MODE_TRGMII ||
-+	if (interface == PHY_INTERFACE_MODE_TRGMII ||
- 	    (phy_interface_mode_is_8023z(interface))) {
- 		speed = SPEED_1000;
- 		duplex = DUPLEX_FULL;



From lede-commits at lists.infradead.org  Thu Apr 11 06:34:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 11 Apr 2024 09:34:03 -0400
Subject: [openwrt/openwrt]  mediatek: filogic: add support for Edgecore EAP111
In-Reply-To: <171284244227.483460.2355369026818210890@git-01.infra.openwrt.org>
References: <171284244227.483460.2355369026818210890@git-01.infra.openwrt.org>
Message-ID: <mailman.26045.1712842451.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/923d7c553137d4a80aba230c2bd4744ddeb08359

commit 923d7c553137d4a80aba230c2bd4744ddeb08359
Author: Robert Marko <robert.marko at sartura.hr>
AuthorDate: Sat Mar 23 20:03:34 2024 +0100

    mediatek: filogic: add support for Edgecore EAP111
    
    HW specifications:
    * Mediatek MT7981A
    * 256MB SPI-NAND
    * 512MB DRAM
    * Uplink: 1 x 10/100/1000Base-T Ethernet, Auto MDIX, RJ-45 with 802.3at
    PoE (Built-in GBe PHY)
    * LAN: 1 x 10/100/1000Base-T Ethernet, Auto MDIX, RJ-45 (Airoha EN8801SC)
    * 1 Tricolor LED
    * Reset button
    * 12V/2.0A DC input
    
    Installation:
    Board comes with OpenWifi/TIP which is OpenWrt based, so sysupgrade can
    be used directly over SSH.
    
    Signed-off-by: Robert Marko <robert.marko at sartura.hr>
---
 package/boot/uboot-envtools/files/mediatek_filogic |   1 +
 .../linux/mediatek/dts/mt7981a-edgecore-eap111.dts | 201 +++++++++++++++++++++
 .../filogic/base-files/etc/board.d/02_network      |   3 +-
 target/linux/mediatek/filogic/config-6.1           |   2 +-
 target/linux/mediatek/filogic/config-6.6           |   2 +-
 target/linux/mediatek/image/filogic.mk             |  18 ++
 6 files changed, 224 insertions(+), 3 deletions(-)

diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic
index 753c8ca064..02f43ebc7f 100644
--- a/package/boot/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-envtools/files/mediatek_filogic
@@ -68,6 +68,7 @@ comfast,cf-e393ax)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x20000" "0x80000"
 	;;
 cetron,ct3003|\
+edgecore,eap111|\
 netgear,wax220|\
 zbtlink,zbt-z8102ax|\
 zbtlink,zbt-z8103ax)
diff --git a/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts b/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts
new file mode 100644
index 0000000000..c306a5eb7b
--- /dev/null
+++ b/target/linux/mediatek/dts/mt7981a-edgecore-eap111.dts
@@ -0,0 +1,201 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include <dt-bindings/leds/common.h>
+#include "mt7981.dtsi"
+
+/ {
+	model = "Edgecore EAP111";
+	compatible = "edgecore,eap111", "mediatek,mt7981";
+
+	aliases {
+		serial0 = &uart0;
+		led-boot = &led_green;
+		led-failsafe = &led_green;
+		led-running = &led_green;
+		led-upgrade = &led_green;
+	};
+
+	chosen {
+		bootargs-override = "console=ttyS0,115200n8";
+		stdout-path = "serial0:115200n8";
+	};
+
+	gpio-keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&pio 1 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_green: led-green {
+			gpios = <&pio 9 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_INDICATOR;
+		};
+
+		led_orange: led-orange {
+			gpios = <&pio 34 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_ORANGE>;
+			function = LED_FUNCTION_INDICATOR;
+		};
+
+		led_blue: led-blue {
+			gpios = <&pio 35 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_INDICATOR;
+		};
+	};
+};
+
+&uart0 {
+	status = "okay";
+};
+
+&watchdog {
+	status = "okay";
+};
+
+&pio {
+	spi0_flash_pins: spi0-pins {
+		mux {
+			function = "spi";
+			groups = "spi0", "spi0_wp_hold";
+		};
+	};
+};
+
+&spi0 {
+	pinctrl-names = "default";
+	pinctrl-0 = <&spi0_flash_pins>;
+	cs-gpios = <0>, <0>;
+	#address-cells = <1>;
+	#size-cells = <0>;
+	status = "okay";
+	#address-cells = <1>;
+	#size-cells = <0>;
+
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+		compatible = "spi-nand";
+		reg = <0>;
+		spi-max-frequency = <52000000>;
+
+		spi-cal-enable;
+		spi-cal-mode = "read-data";
+		spi-cal-datalen = <7>;
+		spi-cal-data = /bits/ 8 <0x53 0x50 0x49 0x4E 0x41 0x4E 0x44>;
+		spi-cal-addrlen = <5>;
+		spi-cal-addr = /bits/ 32 <0x0 0x0 0x0 0x0 0x0>;
+
+		spi-tx-bus-width = <4>;
+		spi-rx-bus-width = <4>;
+		mediatek,nmbm;
+		mediatek,bmt-max-ratio = <1>;
+		mediatek,bmt-max-reserved-blocks = <64>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "BL2";
+				reg = <0x00000 0x100000>;
+				read-only;
+			};
+
+			partition at 100000 {
+				label = "u-boot-env";
+				reg = <0x100000 0x80000>;
+			};
+
+			partition at 180000 {
+				label = "Factory";
+				reg = <0x180000 0x200000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					eeprom_factory: eeprom at 0 {
+						reg = <0x0 0x1000>;
+					};
+
+					macaddr_wan: macaddr at 2a {
+						reg = <0x2a 0x6>;
+					};
+
+					macaddr_lan: macaddr at 24 {
+						reg = <0x24 0x6>;
+					};
+				};
+			};
+
+			partition at 380000 {
+				label = "FIP";
+				reg = <0x380000 0x200000>;
+				read-only;
+			};
+
+			partition at 580000 {
+				label = "ubi";
+				reg = <0x580000 0x4000000>;
+				compatible = "linux,ubi";
+			};
+		};
+	};
+};
+
+&mdio_bus {
+	reset-gpios = <&pio 39 GPIO_ACTIVE_LOW>;
+	reset-delay-us = <10000>;
+	reset-post-delay-us = <10000>;
+
+	en8801sc: ethernet-phy at 24 {
+		reg = <24>;
+		compatible = "ethernet-phy-id03a2.9471";
+		phy-mode = "sgmii";
+	};
+};
+
+&eth {
+	pinctrl-names = "default";
+	pinctrl-0 = <&mdio_pins>;
+	status = "okay";
+
+	gmac0: mac at 0 {
+		compatible = "mediatek,eth-mac";
+		reg = <0>;
+		phy-mode = "sgmii";
+		phy-handle = <&en8801sc>;
+		managed = "in-band-status";
+		nvmem-cells = <&macaddr_lan>;
+		nvmem-cell-names = "mac-address";
+	};
+
+	gmac1: mac at 1 {
+		compatible = "mediatek,eth-mac";
+		reg = <1>;
+		phy-mode = "gmii";
+		phy-handle = <&int_gbe_phy>;
+		nvmem-cells = <&macaddr_wan>;
+		nvmem-cell-names = "mac-address";
+	};
+};
+
+&wifi {
+	nvmem-cells = <&eeprom_factory>;
+	nvmem-cell-names = "eeprom";
+	status = "okay";
+};
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index 8b6504fa1c..51e02efb39 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -37,7 +37,8 @@ mediatek_setup_interfaces()
 	bananapi,bpi-r3)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4 sfp2" "eth1 wan"
 		;;
-	bananapi,bpi-r3-mini)
+	bananapi,bpi-r3-mini|\
+	edgecore,eap111)
 		ucidef_set_interfaces_lan_wan eth0 eth1
 		;;
 	bananapi,bpi-r4)
diff --git a/target/linux/mediatek/filogic/config-6.1 b/target/linux/mediatek/filogic/config-6.1
index ce6a2f8ddf..663bb054a2 100644
--- a/target/linux/mediatek/filogic/config-6.1
+++ b/target/linux/mediatek/filogic/config-6.1
@@ -1,6 +1,6 @@
 CONFIG_64BIT=y
 # CONFIG_AHCI_MTK is not set
-# CONFIG_AIROHA_EN8801SC_PHY is not set
+CONFIG_AIROHA_EN8801SC_PHY=y
 CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
 CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
diff --git a/target/linux/mediatek/filogic/config-6.6 b/target/linux/mediatek/filogic/config-6.6
index a87fdc9bc8..110f6e7550 100644
--- a/target/linux/mediatek/filogic/config-6.6
+++ b/target/linux/mediatek/filogic/config-6.6
@@ -1,6 +1,6 @@
 CONFIG_64BIT=y
 # CONFIG_AHCI_MTK is not set
-# CONFIG_AIROHA_EN8801SC_PHY is not set
+CONFIG_AIROHA_EN8801SC_PHY=y
 CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
 CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
 CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y
diff --git a/target/linux/mediatek/image/filogic.mk b/target/linux/mediatek/image/filogic.mk
index 818a7cef95..f99a73ac74 100644
--- a/target/linux/mediatek/image/filogic.mk
+++ b/target/linux/mediatek/image/filogic.mk
@@ -506,6 +506,24 @@ define Device/dlink_aquila-pro-ai-m30-a1
 endef
 TARGET_DEVICES += dlink_aquila-pro-ai-m30-a1
 
+define Device/edgecore_eap111
+  DEVICE_VENDOR := Edgecore
+  DEVICE_MODEL := EAP111
+  DEVICE_DTS := mt7981a-edgecore-eap111
+  DEVICE_DTS_DIR := ../dts
+  DEVICE_DTS_LOADADDR := 0x47000000
+  BLOCKSIZE := 128k
+  PAGESIZE := 2048
+  UBINIZE_OPTS := -E 5
+  KERNEL_IN_UBI := 1
+  IMAGE_SIZE := 65536k
+  IMAGES := sysupgrade.bin factory.bin
+  IMAGE/factory.bin := append-ubi | check-size $$$$(IMAGE_SIZE)
+  IMAGE/sysupgrade.bin := sysupgrade-tar | append-metadata
+  DEVICE_PACKAGES := kmod-mt7981-firmware mt7981-wo-firmware
+endef
+TARGET_DEVICES += edgecore_eap111
+
 define Device/glinet_gl-mt2500
   DEVICE_VENDOR := GL.iNet
   DEVICE_MODEL := GL-MT2500



From lede-commits at lists.infradead.org  Thu Apr 11 06:34:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 11 Apr 2024 09:34:02 -0400
Subject: [openwrt/openwrt]  mediatek: add Airoha EN8801SC PHY driver
In-Reply-To: <171284244227.483460.2355369026818210890@git-01.infra.openwrt.org>
References: <171284244227.483460.2355369026818210890@git-01.infra.openwrt.org>
Message-ID: <mailman.26046.1712842460.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2dba4308d10d638d3da6ca354d82e3e469865ed5

commit 2dba4308d10d638d3da6ca354d82e3e469865ed5
Author: Robert Marko <robert.marko at sartura.hr>
AuthorDate: Thu Apr 11 13:09:56 2024 +0200

    mediatek: add Airoha EN8801SC PHY driver
    
    Airoha EN8801SC PHY is a gigabit PHY used on Edgecore EAP111 so, include
    the MTK driver with some cleanups.
    
    Unfortunatelly, there is no specification sheet nor datasheet available
    in order to demistify the magic PBUS writes and work on upstreaming
    this driver.
    
    Signed-off-by: Robert Marko <robert.marko at sartura.hr>
---
 .../mediatek/files/drivers/net/phy/en8801sc.c      | 1117 ++++++++++++++++++++
 .../mediatek/files/drivers/net/phy/en8801sc.h      |  250 +++++
 target/linux/mediatek/filogic/config-6.1           |    1 +
 target/linux/mediatek/filogic/config-6.6           |    1 +
 target/linux/mediatek/mt7622/config-6.1            |    1 +
 target/linux/mediatek/mt7622/config-6.6            |    1 +
 target/linux/mediatek/mt7623/config-6.1            |    1 +
 target/linux/mediatek/mt7623/config-6.6            |    1 +
 target/linux/mediatek/mt7629/config-6.1            |    1 +
 target/linux/mediatek/mt7629/config-6.6            |    1 +
 .../735-net-phy-add-Airoha-EN8801SC-PHY.patch      |   38 +
 .../734-net-phy-add-Airoha-EN8801SC-PHY.patch      |   38 +
 12 files changed, 1451 insertions(+)

diff --git a/target/linux/mediatek/files/drivers/net/phy/en8801sc.c b/target/linux/mediatek/files/drivers/net/phy/en8801sc.c
new file mode 100644
index 0000000000..08774e3b88
--- /dev/null
+++ b/target/linux/mediatek/files/drivers/net/phy/en8801sc.c
@@ -0,0 +1,1117 @@
+// SPDX-License-Identifier: GPL-2.0
+/* FILE NAME:  en8801sc.c
+ * PURPOSE:
+ *      EN8801SC phy driver for Linux
+ * NOTES:
+ *
+ */
+
+/* INCLUDE FILE DECLARATIONS
+ */
+
+#include <linux/kernel.h>
+#include <linux/string.h>
+#include <linux/errno.h>
+#include <linux/unistd.h>
+#include <linux/interrupt.h>
+#include <linux/init.h>
+#include <linux/delay.h>
+#include <linux/netdevice.h>
+#include <linux/etherdevice.h>
+#include <linux/skbuff.h>
+#include <linux/spinlock.h>
+#include <linux/mm.h>
+#include <linux/module.h>
+#include <linux/mii.h>
+#include <linux/ethtool.h>
+#include <linux/phy.h>
+#include <linux/delay.h>
+
+#include <linux/uaccess.h>
+#include <linux/version.h>
+
+#include "en8801sc.h"
+
+MODULE_DESCRIPTION("Airoha EN8801S PHY drivers for MediaTek SoC");
+MODULE_AUTHOR("Airoha");
+MODULE_LICENSE("GPL");
+
+#define airoha_mdio_lock(bus)   mutex_lock(&((bus)->mdio_lock))
+#define airoha_mdio_unlock(bus) mutex_unlock(&((bus)->mdio_lock))
+
+#define phydev_mdio_bus(_dev) (_dev->mdio.bus)
+#define phydev_phy_addr(_dev) (_dev->mdio.addr)
+#define phydev_dev(_dev) (&_dev->mdio.dev)
+#define phydev_pbus_addr(dev) ((dev)->mdio.addr + 1)
+
+enum {
+	PHY_STATE_DONE = 0,
+	PHY_STATE_INIT = 1,
+	PHY_STATE_PROCESS = 2,
+	PHY_STATE_FAIL = 3,
+};
+
+struct en8801s_priv {
+	bool first_init;
+	u16 count;
+	u16 pro_version;
+};
+
+/*
+The following led_cfg example is for reference only.
+LED5 1000M/LINK/ACT   (GPIO5)  <-> BASE_T_LED0,
+LED6 10/100M/LINK/ACT (GPIO9)  <-> BASE_T_LED1,
+LED4 100M/LINK/ACT    (GPIO8)  <-> BASE_T_LED2,
+*/
+/* User-defined.B */
+#define AIR_LED_SUPPORT
+#ifdef AIR_LED_SUPPORT
+static const struct AIR_BASE_T_LED_CFG_S led_cfg[4] = {
+/*
+*   {LED Enable,    GPIO,   LED Polarity,   LED ON, LED Blink}
+*/
+	/* BASE-T LED0 */
+	{LED_ENABLE, 5, AIR_ACTIVE_LOW,
+	 BASE_T_LED0_ON_CFG, BASE_T_LED0_BLK_CFG},
+	/* BASE-T LED1 */
+	{LED_ENABLE, 9, AIR_ACTIVE_LOW,
+	 BASE_T_LED1_ON_CFG, BASE_T_LED1_BLK_CFG},
+	/* BASE-T LED2 */
+	{LED_ENABLE, 8, AIR_ACTIVE_LOW,
+	 BASE_T_LED2_ON_CFG, BASE_T_LED2_BLK_CFG},
+	/* BASE-T LED3 */
+	{LED_DISABLE, 1, AIR_ACTIVE_LOW,
+	 BASE_T_LED3_ON_CFG, BASE_T_LED3_BLK_CFG},
+};
+static const u16 led_dur = UNIT_LED_BLINK_DURATION << AIR_LED_BLK_DUR_64M;
+#endif
+
+/* User-defined.E */
+
+/************************************************************************
+*                  F U N C T I O N S
+************************************************************************/
+static int en8801s_phase2_init(struct phy_device *phydev);
+
+static int __airoha_cl45_write(struct mii_bus *bus, int port,
+			u32 devad, u32 reg, u16 val)
+{
+	int ret = 0;
+	struct device *dev = &bus->dev;
+
+	ret = __mdiobus_write(bus, port, MII_MMD_ACC_CTL_REG, devad);
+	if (ret < 0) {
+		dev_err(dev, "%s fail. (ret=%d)\n", __func__, ret);
+		return ret;
+	}
+	ret = __mdiobus_write(bus, port, MII_MMD_ADDR_DATA_REG, reg);
+	if (ret < 0) {
+		dev_err(dev, "%s fail. (ret=%d)\n", __func__, ret);
+		return ret;
+	}
+	ret = __mdiobus_write(bus, port, MII_MMD_ACC_CTL_REG,
+				MMD_OP_MODE_DATA | devad);
+	if (ret < 0) {
+		dev_err(dev, "%s fail. (ret=%d)\n", __func__, ret);
+		return ret;
+	}
+	ret = __mdiobus_write(bus, port, MII_MMD_ADDR_DATA_REG, val);
+	if (ret < 0) {
+		dev_err(dev, "%s fail. (ret=%d)\n", __func__, ret);
+		return ret;
+	}
+
+	return ret;
+}
+
+static int __airoha_cl45_read(struct mii_bus *bus, int port,
+			u32 devad, u32 reg, u16 *read_data)
+{
+	int ret = 0;
+	struct device *dev = &bus->dev;
+
+	ret = __mdiobus_write(bus, port, MII_MMD_ACC_CTL_REG, devad);
+	if (ret < 0) {
+		dev_err(dev, "%s fail. (ret=%d)\n", __func__, ret);
+		return ret;
+	}
+	ret = __mdiobus_write(bus, port, MII_MMD_ADDR_DATA_REG, reg);
+	if (ret < 0) {
+		dev_err(dev, "%s fail. (ret=%d)\n", __func__, ret);
+		return ret;
+	}
+	ret = __mdiobus_write(bus, port, MII_MMD_ACC_CTL_REG,
+				MMD_OP_MODE_DATA | devad);
+	if (ret < 0) {
+		dev_err(dev, "%s fail. (ret=%d)\n", __func__, ret);
+		return ret;
+	}
+	*read_data = __mdiobus_read(bus, port, MII_MMD_ADDR_DATA_REG);
+
+	return ret;
+}
+
+static int airoha_cl45_write(struct mii_bus *bus, int port,
+			u32 devad, u32 reg, u16 val)
+{
+	int ret = 0;
+
+	airoha_mdio_lock(bus);
+	ret = __airoha_cl45_write(bus, port, devad, reg, val);
+	airoha_mdio_unlock(bus);
+
+	return ret;
+}
+
+static int airoha_cl45_read(struct mii_bus *bus, int port,
+			u32 devad, u32 reg, u16 *read_data)
+{
+	int ret = 0;
+
+	airoha_mdio_lock(bus);
+	ret = __airoha_cl45_read(bus, port, devad, reg, read_data);
+	airoha_mdio_unlock(bus);
+
+	return ret;
+}
+
+static int __airoha_pbus_write(struct mii_bus *ebus, int pbus_id,
+			unsigned long pbus_address, unsigned long pbus_data)
+{
+	int ret = 0;
+
+	ret = __mdiobus_write(ebus, pbus_id, 0x1F,
+				(unsigned int)(pbus_address >> 6));
+	if (ret < 0)
+		return ret;
+	ret = __mdiobus_write(ebus, pbus_id,
+				(unsigned int)((pbus_address >> 2) & 0xf),
+				(unsigned int)(pbus_data & 0xFFFF));
+	if (ret < 0)
+		return ret;
+	ret = __mdiobus_write(ebus, pbus_id, 0x10,
+				(unsigned int)(pbus_data >> 16));
+	if (ret < 0)
+		return ret;
+	return ret;
+}
+
+static unsigned long __airoha_pbus_read(struct mii_bus *ebus, int pbus_id,
+			unsigned long pbus_address)
+{
+	unsigned long pbus_data;
+	unsigned int pbus_data_low, pbus_data_high;
+	int ret = 0;
+	struct device *dev = &ebus->dev;
+
+	ret = __mdiobus_write(ebus, pbus_id, 0x1F,
+				(unsigned int)(pbus_address >> 6));
+	if (ret < 0) {
+		dev_err(dev, "%s fail. (ret=%d)\n", __func__, ret);
+		return INVALID_DATA;
+	}
+	pbus_data_low = __mdiobus_read(ebus, pbus_id,
+				(unsigned int)((pbus_address >> 2) & 0xf));
+	pbus_data_high = __mdiobus_read(ebus, pbus_id, 0x10);
+	pbus_data = (pbus_data_high << 16) + pbus_data_low;
+	return pbus_data;
+}
+
+static int airoha_pbus_write(struct mii_bus *ebus, int pbus_id,
+			unsigned long pbus_address, unsigned long pbus_data)
+{
+	int ret = 0;
+
+	airoha_mdio_lock(ebus);
+	ret = __airoha_pbus_write(ebus, pbus_id, pbus_address, pbus_data);
+	airoha_mdio_unlock(ebus);
+
+	return ret;
+}
+
+static unsigned long airoha_pbus_read(struct mii_bus *ebus, int pbus_id,
+			unsigned long pbus_address)
+{
+	unsigned long pbus_data;
+
+	airoha_mdio_lock(ebus);
+	pbus_data = __airoha_pbus_read(ebus, pbus_id, pbus_address);
+	airoha_mdio_unlock(ebus);
+
+	return pbus_data;
+}
+
+/* Airoha Token Ring Write function */
+static int airoha_tr_reg_write(struct phy_device *phydev,
+			unsigned long tr_address, unsigned long tr_data)
+{
+	int ret = 0;
+	int phy_addr = phydev_phy_addr(phydev);
+	struct mii_bus *ebus = phydev_mdio_bus(phydev);
+
+	airoha_mdio_lock(ebus);
+	ret = __mdiobus_write(ebus, phy_addr, 0x1F, 0x52b5); /* page select */
+	ret = __mdiobus_write(ebus, phy_addr, 0x11,
+				(unsigned int)(tr_data & 0xffff));
+	ret = __mdiobus_write(ebus, phy_addr, 0x12,
+				(unsigned int)(tr_data >> 16));
+	ret = __mdiobus_write(ebus, phy_addr, 0x10,
+				(unsigned int)(tr_address | TrReg_WR));
+	ret = __mdiobus_write(ebus, phy_addr, 0x1F, 0x0);    /* page resetore */
+	airoha_mdio_unlock(ebus);
+
+	return ret;
+}
+
+#ifdef AIR_LED_SUPPORT
+static int airoha_led_set_usr_def(struct phy_device *phydev, u8 entity,
+			int polar, u16 on_evt, u16 blk_evt)
+{
+	int ret = 0;
+	int phy_addr = phydev_phy_addr(phydev);
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+
+	if (polar == AIR_ACTIVE_HIGH)
+		on_evt |= LED_ON_POL;
+	else
+		on_evt &= ~LED_ON_POL;
+
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1f,
+				LED_ON_CTRL(entity), on_evt | LED_ON_EN);
+	if (ret < 0)
+		return ret;
+
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1f,
+				LED_BLK_CTRL(entity), blk_evt);
+	if (ret < 0)
+		return ret;
+
+	return 0;
+}
+
+static int airoha_led_set_mode(struct phy_device *phydev, u8 mode)
+{
+	u16 cl45_data;
+	int err = 0;
+	int phy_addr = phydev_phy_addr(phydev);
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+
+	err = airoha_cl45_read(mbus, phy_addr, 0x1f, LED_BCR, &cl45_data);
+	if (err < 0)
+		return err;
+
+	switch (mode) {
+	case AIR_LED_MODE_DISABLE:
+		cl45_data &= ~LED_BCR_EXT_CTRL;
+		cl45_data &= ~LED_BCR_MODE_MASK;
+		cl45_data |= LED_BCR_MODE_DISABLE;
+		break;
+	case AIR_LED_MODE_USER_DEFINE:
+		cl45_data |= LED_BCR_EXT_CTRL;
+		cl45_data |= LED_BCR_CLK_EN;
+		break;
+	default:
+		return -EINVAL;
+	}
+
+	err = airoha_cl45_write(mbus, phy_addr, 0x1f, LED_BCR, cl45_data);
+	if (err < 0)
+		return err;
+	return 0;
+}
+
+static int airoha_led_set_state(struct phy_device *phydev, u8 entity, u8 state)
+{
+	u16 cl45_data;
+	int err;
+	int phy_addr = phydev_phy_addr(phydev);
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+
+	err = airoha_cl45_read(mbus, phy_addr, 0x1f,
+				LED_ON_CTRL(entity), &cl45_data);
+	if (err < 0)
+		return err;
+	if (state == LED_ENABLE)
+		cl45_data |= LED_ON_EN;
+	else
+		cl45_data &= ~LED_ON_EN;
+
+	err = airoha_cl45_write(mbus, phy_addr, 0x1f,
+				LED_ON_CTRL(entity), cl45_data);
+	if (err < 0)
+		return err;
+	return 0;
+}
+
+static int en8801s_led_init(struct phy_device *phydev)
+{
+
+	unsigned long led_gpio = 0, reg_value = 0;
+	int ret = 0, led_id;
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+	int gpio_led_rg[3] = {0x1870, 0x1874, 0x1878};
+	u16 cl45_data = led_dur;
+	struct device *dev = phydev_dev(phydev);
+	int phy_addr = phydev_phy_addr(phydev);
+	int pbus_addr = phydev_pbus_addr(phydev);
+
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1f, LED_BLK_DUR, cl45_data);
+	if (ret < 0)
+		return ret;
+	cl45_data >>= 1;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1f, LED_ON_DUR, cl45_data);
+	if (ret < 0)
+		return ret;
+	ret = airoha_led_set_mode(phydev, AIR_LED_MODE_USER_DEFINE);
+	if (ret != 0) {
+		dev_err(dev, "LED fail to set mode, ret %d !\n", ret);
+		return ret;
+	}
+	for (led_id = 0; led_id < EN8801S_LED_COUNT; led_id++) {
+		reg_value = 0;
+		ret = airoha_led_set_state(phydev, led_id, led_cfg[led_id].en);
+		if (ret != 0) {
+			dev_err(dev, "LED fail to set state, ret %d !\n", ret);
+			return ret;
+		}
+		if (led_cfg[led_id].en == LED_ENABLE) {
+			if ((led_cfg[led_id].gpio < 0)
+				|| led_cfg[led_id].gpio > 9) {
+				dev_err(dev, "GPIO%d is out of range!! GPIO number is 0~9.\n",
+					led_cfg[led_id].gpio);
+				return -EIO;
+			}
+			led_gpio |= BIT(led_cfg[led_id].gpio);
+			reg_value = airoha_pbus_read(mbus, pbus_addr,
+					gpio_led_rg[led_cfg[led_id].gpio / 4]);
+			LED_SET_GPIO_SEL(led_cfg[led_id].gpio,
+					led_id, reg_value);
+			dev_dbg(dev, "[Airoha] gpio%d, reg_value 0x%lx\n",
+					led_cfg[led_id].gpio, reg_value);
+			ret = airoha_pbus_write(mbus, pbus_addr,
+					gpio_led_rg[led_cfg[led_id].gpio / 4],
+					reg_value);
+			if (ret < 0)
+				return ret;
+			ret = airoha_led_set_usr_def(phydev, led_id,
+					led_cfg[led_id].pol,
+					led_cfg[led_id].on_cfg,
+					led_cfg[led_id].blk_cfg);
+			if (ret != 0) {
+				dev_err(dev, "LED fail to set usr def, ret %d !\n",
+				ret);
+				return ret;
+			}
+		}
+	}
+	reg_value = (airoha_pbus_read(mbus, pbus_addr, 0x1880) & ~led_gpio);
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x1880, reg_value);
+	if (ret < 0)
+		return ret;
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x186c, led_gpio);
+	if (ret < 0)
+		return ret;
+	dev_info(dev, "LED initialize OK !\n");
+	return 0;
+}
+#endif
+static int en8801s_phy_process(struct phy_device *phydev)
+{
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+	unsigned long reg_value = 0;
+	int ret = 0;
+	int pbus_addr = phydev_pbus_addr(phydev);
+
+	reg_value = airoha_pbus_read(mbus, pbus_addr, 0x19e0);
+	reg_value |= BIT(0);
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x19e0, reg_value);
+	if (ret < 0)
+		return ret;
+	reg_value = airoha_pbus_read(mbus, pbus_addr, 0x19e0);
+	reg_value &= ~BIT(0);
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x19e0, reg_value);
+	if (ret < 0)
+		return ret;
+	return ret;
+}
+
+static int en8801s_phase1_init(struct phy_device *phydev)
+{
+	unsigned long pbus_data;
+	int pbus_addr = EN8801S_PBUS_DEFAULT_ADDR;
+	u16 reg_value;
+	int retry, ret = 0;
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+	struct device *dev = phydev_dev(phydev);
+	struct en8801s_priv *priv = phydev->priv;
+
+	priv->count = 1;
+	msleep(1000);
+
+	retry = MAX_OUI_CHECK;
+	while (1) {
+		pbus_data = airoha_pbus_read(mbus, pbus_addr,
+				EN8801S_RG_ETHER_PHY_OUI);      /* PHY OUI */
+		if (pbus_data == EN8801S_PBUS_OUI) {
+			dev_info(dev, "PBUS addr 0x%x: Start initialized.\n",
+					pbus_addr);
+			break;
+		}
+		pbus_addr = phydev_pbus_addr(phydev);
+		if (0 == --retry) {
+			dev_err(dev, "Probe fail !\n");
+			return 0;
+		}
+	}
+
+	ret = airoha_pbus_write(mbus, pbus_addr, EN8801S_RG_BUCK_CTL, 0x03);
+	if (ret < 0)
+		return ret;
+	pbus_data = airoha_pbus_read(mbus, pbus_addr, EN8801S_RG_PROD_VER);
+	priv->pro_version = pbus_data & 0xf;
+	dev_info(dev, "EN8801S Procduct Version :E%d\n", priv->pro_version);
+	mdelay(10);
+	pbus_data = (airoha_pbus_read(mbus, pbus_addr, EN8801S_RG_LTR_CTL)
+				 & 0xfffffffc) | BIT(2);
+	ret = airoha_pbus_write(mbus, pbus_addr,
+				EN8801S_RG_LTR_CTL, pbus_data);
+	if (ret < 0)
+		return ret;
+	mdelay(500);
+	pbus_data = (pbus_data & ~BIT(2)) |
+				EN8801S_RX_POLARITY_NORMAL |
+				EN8801S_TX_POLARITY_NORMAL;
+	ret = airoha_pbus_write(mbus, pbus_addr,
+				EN8801S_RG_LTR_CTL, pbus_data);
+	if (ret < 0)
+		return ret;
+	mdelay(500);
+	if (priv->pro_version == 4) {
+		pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1900);
+		dev_dbg(dev, "Before 0x1900 0x%lx\n", pbus_data);
+		ret = airoha_pbus_write(mbus, pbus_addr, 0x1900, 0x101009f);
+		if (ret < 0)
+			return ret;
+		pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1900);
+		dev_dbg(dev, "After 0x1900 0x%lx\n", pbus_data);
+		pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x19a8);
+		dev_dbg(dev, "Before 19a8 0x%lx\n", pbus_data);
+		ret = airoha_pbus_write(mbus, pbus_addr,
+				0x19a8, pbus_data & ~BIT(16));
+		if (ret < 0)
+			return ret;
+		pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x19a8);
+		dev_dbg(dev, "After 19a8 0x%lx\n", pbus_data);
+	}
+	pbus_data = airoha_pbus_read(mbus, pbus_addr,
+				EN8801S_RG_SMI_ADDR); /* SMI ADDR */
+	pbus_data = (pbus_data & 0xffff0000) |
+				(unsigned long)(phydev_pbus_addr(phydev) << 8) |
+				(unsigned long)(phydev_phy_addr(phydev));
+	dev_info(phydev_dev(phydev), "SMI_ADDR=%lx (renew)\n", pbus_data);
+	ret = airoha_pbus_write(mbus, pbus_addr,
+				EN8801S_RG_SMI_ADDR, pbus_data);
+	mdelay(10);
+
+	retry = MAX_RETRY;
+	while (1) {
+		mdelay(10);
+		reg_value = phy_read(phydev, MII_PHYSID2);
+		if (reg_value == EN8801S_PHY_ID2)
+			break;    /* wait GPHY ready */
+
+		retry--;
+		if (retry == 0) {
+			dev_err(dev, "Initialize fail !\n");
+			return 0;
+		}
+	}
+	/* Software Reset PHY */
+	reg_value = phy_read(phydev, MII_BMCR);
+	reg_value |= BMCR_RESET;
+	ret = phy_write(phydev, MII_BMCR, reg_value);
+	if (ret < 0)
+		return ret;
+	retry = MAX_RETRY;
+	do {
+		mdelay(10);
+		reg_value = phy_read(phydev, MII_BMCR);
+		retry--;
+		if (retry == 0) {
+			dev_err(dev, "Reset fail !\n");
+			return 0;
+		}
+	} while (reg_value & BMCR_RESET);
+
+	phydev->dev_flags = PHY_STATE_INIT;
+
+	dev_info(dev, "Phase1 initialize OK ! (%s)\n", EN8801S_DRIVER_VERSION);
+	if (priv->pro_version == 4) {
+		ret = en8801s_phase2_init(phydev);
+		if (ret != 0) {
+			dev_info(dev, "en8801_phase2_init failed\n");
+			phydev->dev_flags = PHY_STATE_FAIL;
+			return 0;
+		}
+		phydev->dev_flags = PHY_STATE_PROCESS;
+	}
+
+	return 0;
+}
+
+static int en8801s_phase2_init(struct phy_device *phydev)
+{
+	union gephy_all_REG_LpiReg1Ch      GPHY_RG_LPI_1C;
+	union gephy_all_REG_dev1Eh_reg324h GPHY_RG_1E_324;
+	union gephy_all_REG_dev1Eh_reg012h GPHY_RG_1E_012;
+	union gephy_all_REG_dev1Eh_reg017h GPHY_RG_1E_017;
+	unsigned long pbus_data;
+	int phy_addr = phydev_phy_addr(phydev);
+	int pbus_addr = phydev_pbus_addr(phydev);
+	u16 cl45_value;
+	int retry, ret = 0;
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+	struct device *dev = phydev_dev(phydev);
+	struct en8801s_priv *priv = phydev->priv;
+
+	pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1690);
+	pbus_data |= BIT(31);
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x1690, pbus_data);
+	if (ret < 0)
+		return ret;
+
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x0600, 0x0c000c00);
+	if (ret < 0)
+		return ret;
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x10, 0xD801);
+	if (ret < 0)
+		return ret;
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x0,  0x9140);
+	if (ret < 0)
+		return ret;
+
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x0A14, 0x0003);
+	if (ret < 0)
+		return ret;
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x0600, 0x0c000c00);
+	if (ret < 0)
+		return ret;
+	/* Set FCM control */
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x1404, 0x004b);
+	if (ret < 0)
+		return ret;
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x140c, 0x0007);
+	if (ret < 0)
+		return ret;
+
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x142c, 0x05050505);
+	if (ret < 0)
+		return ret;
+	pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1440);
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x1440, pbus_data & ~BIT(11));
+	if (ret < 0)
+		return ret;
+
+	pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1408);
+	ret = airoha_pbus_write(mbus, pbus_addr, 0x1408, pbus_data | BIT(5));
+	if (ret < 0)
+		return ret;
+
+	/* Set GPHY Perfomance*/
+	/* Token Ring */
+	ret = airoha_tr_reg_write(phydev, RgAddr_R1000DEC_15h, 0x0055A0);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_R1000DEC_17h, 0x07FF3F);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_PMA_00h,      0x00001E);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_PMA_01h,      0x6FB90A);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_PMA_17h,      0x060671);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_PMA_18h,      0x0E2F00);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_TR_26h,       0x444444);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_03h,     0x000000);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_06h,     0x2EBAEF);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_08h,     0x00000B);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_0Ch,     0x00504D);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_0Dh,     0x02314F);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_0Fh,     0x003028);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_10h,     0x005010);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_11h,     0x040001);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_13h,     0x018670);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_14h,     0x00024A);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_1Bh,     0x000072);
+	if (ret < 0)
+		return ret;
+	ret = airoha_tr_reg_write(phydev, RgAddr_DSPF_1Ch,     0x003210);
+	if (ret < 0)
+		return ret;
+
+	/* CL22 & CL45 */
+	ret = phy_write(phydev, 0x1f, 0x03);
+	if (ret < 0)
+		return ret;
+	GPHY_RG_LPI_1C.DATA = phy_read(phydev, RgAddr_LPI_1Ch);
+	GPHY_RG_LPI_1C.DataBitField.smi_deton_th = 0x0C;
+	ret = phy_write(phydev, RgAddr_LPI_1Ch, GPHY_RG_LPI_1C.DATA);
+	if (ret < 0)
+		return ret;
+	ret = phy_write(phydev, RgAddr_LPI_1Ch, 0xC92);
+	if (ret < 0)
+		return ret;
+	ret = phy_write(phydev, RgAddr_AUXILIARY_1Dh, 0x1);
+	if (ret < 0)
+		return ret;
+	ret = phy_write(phydev, 0x1f, 0x0);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x120, 0x8014);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x122, 0xffff);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x123, 0xffff);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x144, 0x0200);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x14A, 0xEE20);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x189, 0x0110);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x19B, 0x0111);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x234, 0x0181);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x238, 0x0120);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x239, 0x0117);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x268, 0x07F4);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x2D1, 0x0733);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x323, 0x0011);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x324, 0x013F);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x326, 0x0037);
+	if (ret < 0)
+		return ret;
+
+	ret = airoha_cl45_read(mbus, phy_addr, 0x1E, 0x324, &cl45_value);
+	if (ret < 0)
+		return ret;
+	GPHY_RG_1E_324.DATA = cl45_value;
+	GPHY_RG_1E_324.DataBitField.smi_det_deglitch_off = 0;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x324,
+				GPHY_RG_1E_324.DATA);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x19E, 0xC2);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x013, 0x0);
+	if (ret < 0)
+		return ret;
+
+	/* EFUSE */
+	airoha_pbus_write(mbus, pbus_addr, 0x1C08, 0x40000040);
+	retry = MAX_RETRY;
+	while (retry != 0) {
+		mdelay(1);
+		pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1C08);
+		if ((pbus_data & BIT(30)) == 0)
+			break;
+
+		retry--;
+	}
+	pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1C38); /* RAW#2 */
+	ret = airoha_cl45_read(mbus, phy_addr, 0x1E, 0x12, &cl45_value);
+	if (ret < 0)
+		return ret;
+	GPHY_RG_1E_012.DATA = cl45_value;
+	GPHY_RG_1E_012.DataBitField.da_tx_i2mpb_a_tbt =
+				(u16)(pbus_data & 0x03f);
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x12,
+				GPHY_RG_1E_012.DATA);
+	if (ret < 0)
+		return ret;
+	ret = airoha_cl45_read(mbus, phy_addr, 0x1E, 0x17, &cl45_value);
+	if (ret < 0)
+		return ret;
+	GPHY_RG_1E_017.DATA = cl45_value;
+	GPHY_RG_1E_017.DataBitField.da_tx_i2mpb_b_tbt =
+				(u16)((pbus_data >> 8) & 0x03f);
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x17,
+				GPHY_RG_1E_017.DATA);
+	if (ret < 0)
+		return ret;
+
+	airoha_pbus_write(mbus, pbus_addr, 0x1C08, 0x40400040);
+	retry = MAX_RETRY;
+	while (retry != 0) {
+		mdelay(1);
+		pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1C08);
+		if ((pbus_data & BIT(30)) == 0)
+			break;
+
+		retry--;
+	}
+	pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1C30); /* RAW#16 */
+	GPHY_RG_1E_324.DataBitField.smi_det_deglitch_off =
+				(u16)((pbus_data >> 12) & 0x01);
+	ret = airoha_cl45_write(mbus, phy_addr, 0x1E, 0x324,
+				GPHY_RG_1E_324.DATA);
+	if (ret < 0)
+		return ret;
+#ifdef AIR_LED_SUPPORT
+	ret = en8801s_led_init(phydev);
+	if (ret != 0)
+		dev_err(dev, "en8801s_led_init fail (ret:%d) !\n", ret);
+#endif
+
+	ret = airoha_cl45_read(mbus, phy_addr, MDIO_MMD_AN,
+				MDIO_AN_EEE_ADV, &cl45_value);
+	if (ret < 0)
+		return ret;
+	if (cl45_value == 0) {
+		pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1960);
+		if (0xA == ((pbus_data & 0x07c00000) >> 22)) {
+			pbus_data = (pbus_data & 0xf83fffff) | (0xC << 22);
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1960,
+						pbus_data);
+			if (ret < 0)
+				return ret;
+			mdelay(10);
+			pbus_data = (pbus_data & 0xf83fffff) | (0xE << 22);
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1960,
+						pbus_data);
+			if (ret < 0)
+				return ret;
+			mdelay(10);
+		}
+	} else {
+		pbus_data = airoha_pbus_read(mbus, pbus_addr, 0x1960);
+		if (0xE == ((pbus_data & 0x07c00000) >> 22)) {
+			pbus_data = (pbus_data & 0xf83fffff) | (0xC << 22);
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1960,
+						pbus_data);
+			if (ret < 0)
+				return ret;
+			mdelay(10);
+			pbus_data = (pbus_data & 0xf83fffff) | (0xA << 22);
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1960,
+						pbus_data);
+			if (ret < 0)
+				return ret;
+			mdelay(10);
+		}
+	}
+
+	priv->first_init = false;
+	dev_info(phydev_dev(phydev), "Phase2 initialize OK !\n");
+	return 0;
+}
+
+static int en8801s_read_status(struct phy_device *phydev)
+{
+	int ret = 0, preSpeed = phydev->speed;
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+	u32 reg_value;
+	struct device *dev = phydev_dev(phydev);
+	int pbus_addr = phydev_pbus_addr(phydev);
+	struct en8801s_priv *priv = phydev->priv;
+
+	ret = genphy_read_status(phydev);
+	if (phydev->link == LINK_DOWN)
+		preSpeed = phydev->speed = 0;
+
+	if (phydev->dev_flags == PHY_STATE_PROCESS) {
+		en8801s_phy_process(phydev);
+		phydev->dev_flags = PHY_STATE_DONE;
+	}
+
+	if (phydev->dev_flags == PHY_STATE_INIT) {
+		dev_dbg(dev, "phydev->link %d, count %d\n",
+					phydev->link, priv->count);
+		if ((phydev->link) || (priv->count == 5)) {
+			if (priv->pro_version != 4) {
+				ret = en8801s_phase2_init(phydev);
+				if (ret != 0) {
+					dev_info(dev, "en8801_phase2_init failed\n");
+					phydev->dev_flags = PHY_STATE_FAIL;
+					return 0;
+				}
+				phydev->dev_flags = PHY_STATE_PROCESS;
+			}
+		}
+		priv->count++;
+	}
+
+	if ((preSpeed != phydev->speed) && (phydev->link == LINK_UP)) {
+		preSpeed = phydev->speed;
+
+		if (preSpeed == SPEED_10) {
+			reg_value = airoha_pbus_read(mbus, pbus_addr, 0x1694);
+			reg_value |= BIT(31);
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1694,
+					reg_value);
+			if (ret < 0)
+				return ret;
+			phydev->dev_flags = PHY_STATE_PROCESS;
+		} else {
+			reg_value = airoha_pbus_read(mbus, pbus_addr, 0x1694);
+			reg_value &= ~BIT(31);
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1694,
+					reg_value);
+			if (ret < 0)
+				return ret;
+			phydev->dev_flags = PHY_STATE_PROCESS;
+		}
+
+		airoha_pbus_write(mbus, pbus_addr, 0x0600,
+				0x0c000c00);
+		if (preSpeed == SPEED_1000) {
+			dev_dbg(dev, "SPEED_1000\n");
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x10,
+					0xD801);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0,
+					0x9140);
+			if (ret < 0)
+				return ret;
+
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0A14,
+					0x0003);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0600,
+					0x0c000c00);
+			if (ret < 0)
+				return ret;
+			mdelay(2);      /* delay 2 ms */
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1404,
+					0x004b);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x140c,
+					0x0007);
+			if (ret < 0)
+				return ret;
+		} else if (preSpeed == SPEED_100) {
+			dev_dbg(dev, "SPEED_100\n");
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x10,
+					0xD401);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0,
+					0x9140);
+			if (ret < 0)
+				return ret;
+
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0A14,
+					0x0007);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0600,
+					0x0c11);
+			if (ret < 0)
+				return ret;
+			mdelay(2);      /* delay 2 ms */
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1404,
+					0x0027);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x140c,
+					0x0007);
+			if (ret < 0)
+				return ret;
+		} else if (preSpeed == SPEED_10) {
+			dev_dbg(dev, "SPEED_10\n");
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x10,
+					0xD001);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0,
+					0x9140);
+			if (ret < 0)
+				return ret;
+
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0A14,
+					0x000b);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x0600,
+					0x0c11);
+			if (ret < 0)
+				return ret;
+			mdelay(2);      /* delay 2 ms */
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x1404,
+					0x0027);
+			if (ret < 0)
+				return ret;
+			ret = airoha_pbus_write(mbus, pbus_addr, 0x140c,
+					0x0007);
+			if (ret < 0)
+				return ret;
+		}
+	}
+	return ret;
+}
+
+static int en8801s_probe(struct phy_device *phydev)
+{
+	struct en8801s_priv *priv;
+	unsigned long phy_addr = phydev_phy_addr(phydev);
+	struct mdio_device *mdiodev = &phydev->mdio;
+
+	priv = kzalloc(sizeof(*priv), GFP_KERNEL);
+	if (!priv)
+		return -ENOMEM;
+
+	priv->count = 0;
+	priv->first_init = true;
+
+	if (mdiodev->reset_gpio) {
+		dev_dbg(phydev_dev(phydev),
+				"Assert PHY %lx HWRST until phy_init_hw\n",
+				phy_addr);
+		phy_device_reset(phydev, 1);
+	}
+
+	phydev->priv = priv;
+
+	return 0;
+}
+
+static int airoha_mmd_read(struct phy_device *phydev,
+			int devad, u16 reg)
+{
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+	int phy_addr = phydev_phy_addr(phydev);
+	int ret = 0;
+	u16 cl45_value;
+
+	ret = __airoha_cl45_read(mbus, phy_addr, devad, reg, &cl45_value);
+	if (ret < 0)
+		return ret;
+
+	return cl45_value;
+}
+
+static int airoha_mmd_write(struct phy_device *phydev,
+			int devad, u16 reg, u16 val)
+{
+	struct mii_bus *mbus = phydev_mdio_bus(phydev);
+	int phy_addr = phydev_phy_addr(phydev);
+	int pbus_addr = phydev_pbus_addr(phydev);
+	unsigned long pbus_data;
+	int ret = 0;
+
+	if (MDIO_MMD_AN == devad && MDIO_AN_EEE_ADV == reg) {
+		if (val == 0) {
+			pbus_data = __airoha_pbus_read(mbus, pbus_addr, 0x1960);
+			if (0xA == ((pbus_data & 0x07c00000) >> 22)) {
+				pbus_data = (pbus_data & 0xf83fffff) |
+							(0xC << 22);
+				__airoha_pbus_write(mbus, pbus_addr, 0x1960,
+							pbus_data);
+				mdelay(10);
+				pbus_data = (pbus_data & 0xf83fffff) |
+							(0xE << 22);
+				__airoha_pbus_write(mbus, pbus_addr, 0x1960,
+							pbus_data);
+				mdelay(10);
+			}
+		} else {
+			pbus_data = __airoha_pbus_read(mbus, pbus_addr, 0x1960);
+			if (0xE == ((pbus_data & 0x07c00000) >> 22)) {
+				pbus_data = (pbus_data & 0xf83fffff) |
+							(0xC << 22);
+				__airoha_pbus_write(mbus, pbus_addr, 0x1960,
+							pbus_data);
+				mdelay(10);
+				pbus_data = (pbus_data & 0xf83fffff) |
+							(0xA << 22);
+				__airoha_pbus_write(mbus, pbus_addr, 0x1960,
+							pbus_data);
+				mdelay(10);
+			}
+		}
+	}
+	ret = __airoha_cl45_write(mbus, phy_addr, devad, reg, val);
+	if (ret < 0)
+		return ret;
+
+	return 0;
+}
+
+static struct phy_driver Airoha_driver[] = {
+	{
+		.phy_id         = EN8801SC_PHY_ID,
+		.name           = "Airoha EN8801SC",
+		.phy_id_mask    = 0x0ffffff0,
+		.features       = PHY_GBIT_FEATURES,
+		.probe          = en8801s_probe,
+		.config_init    = en8801s_phase1_init,
+		.config_aneg    = genphy_config_aneg,
+		.read_status    = en8801s_read_status,
+		.suspend        = genphy_suspend,
+		.resume         = genphy_resume,
+		.read_mmd       = airoha_mmd_read,
+		.write_mmd      = airoha_mmd_write,
+	}
+};
+
+module_phy_driver(Airoha_driver);
+
+static struct mdio_device_id __maybe_unused Airoha_tbl[] = {
+	{ EN8801SC_PHY_ID, 0x0ffffff0 },
+	{ }
+};
+
+MODULE_DEVICE_TABLE(mdio, Airoha_tbl);
diff --git a/target/linux/mediatek/files/drivers/net/phy/en8801sc.h b/target/linux/mediatek/files/drivers/net/phy/en8801sc.h
new file mode 100644
index 0000000000..d1e268c9aa
--- /dev/null
+++ b/target/linux/mediatek/files/drivers/net/phy/en8801sc.h
@@ -0,0 +1,250 @@
+// SPDX-License-Identifier: GPL-2.0
+/* FILE NAME:  en8801sc.h
+ * PURPOSE:
+ *      Define EN8801SC driver function
+ *
+ * NOTES:
+ *
+ */
+
+#ifndef __EN8801SC_H
+#define __EN8801SC_H
+
+/* NAMING DECLARATIONS
+ */
+#define EN8801S_DRIVER_VERSION  "1.1.8_Generic"
+#define EN8801S_PBUS_DEFAULT_ADDR 0x1e
+#define EN8801S_PHY_DEFAULT_ADDR 0x1d
+#define EN8801S_RG_ETHER_PHY_OUI 0x19a4
+#define EN8801S_RG_SMI_ADDR      0x19a8
+#define EN8801S_RG_BUCK_CTL      0x1a20
+#define EN8801S_RG_LTR_CTL       0x0cf8
+#define EN8801S_RG_PROD_VER      0x18e0
+
+#define EN8801S_PBUS_OUI        0x17a5
+#define EN8801S_PHY_ID1         0x03a2
+#define EN8801S_PHY_ID2         0x9461
+#define EN8801SC_PHY_ID         0x03a29471
+
+#define LED_ON_CTRL(i)              (0x024 + ((i)*2))
+#define LED_ON_EN                   (1 << 15)
+#define LED_ON_POL                  (1 << 14)
+#define LED_ON_EVT_MASK             (0x7f)
+/* LED ON Event Option.B */
+#define LED_ON_EVT_FORCE            (1 << 6)
+#define LED_ON_EVT_LINK_DOWN        (1 << 3)
+#define LED_ON_EVT_LINK_10M         (1 << 2)
+#define LED_ON_EVT_LINK_100M        (1 << 1)
+#define LED_ON_EVT_LINK_1000M       (1 << 0)
+/* LED ON Event Option.E */
+
+#define LED_BLK_CTRL(i)             (0x025 + ((i)*2))
+#define LED_BLK_EVT_MASK            (0x3ff)
+/* LED Blinking Event Option.B*/
+#define LED_BLK_EVT_FORCE           (1 << 9)
+#define LED_BLK_EVT_10M_RX_ACT      (1 << 5)
+#define LED_BLK_EVT_10M_TX_ACT      (1 << 4)
+#define LED_BLK_EVT_100M_RX_ACT     (1 << 3)
+#define LED_BLK_EVT_100M_TX_ACT     (1 << 2)
+#define LED_BLK_EVT_1000M_RX_ACT    (1 << 1)
+#define LED_BLK_EVT_1000M_TX_ACT    (1 << 0)
+/* LED Blinking Event Option.E*/
+#define LED_ENABLE                  1
+#define LED_DISABLE                 0
+
+#define LINK_UP                 1
+#define LINK_DOWN               0
+
+/*
+SFP Sample for verification
+Tx Reverse, Rx Reverse
+*/
+#define EN8801S_TX_POLARITY_NORMAL   0x0
+#define EN8801S_TX_POLARITY_REVERSE  0x1
+
+#define EN8801S_RX_POLARITY_NORMAL   (0x1 << 1)
+#define EN8801S_RX_POLARITY_REVERSE  (0x0 << 1)
+
+/*
+The following led_cfg example is for reference only.
+LED5 1000M/LINK/ACT  (GPIO5)  <-> BASE_T_LED0,
+LED6 10/100M/LINK/ACT(GPIO9)  <-> BASE_T_LED1,
+LED4 100M/LINK/ACT   (GPIO8)  <-> BASE_T_LED2,
+*/
+/* User-defined.B */
+#define BASE_T_LED0_ON_CFG      (LED_ON_EVT_LINK_1000M)
+#define BASE_T_LED0_BLK_CFG \
+			(LED_BLK_EVT_1000M_TX_ACT | \
+			LED_BLK_EVT_1000M_RX_ACT)
+#define BASE_T_LED1_ON_CFG \
+			(LED_ON_EVT_LINK_100M | \
+			 LED_ON_EVT_LINK_10M)
+#define BASE_T_LED1_BLK_CFG \
+			(LED_BLK_EVT_100M_TX_ACT | \
+			 LED_BLK_EVT_100M_RX_ACT | \
+			 LED_BLK_EVT_10M_TX_ACT | \
+			 LED_BLK_EVT_10M_RX_ACT)
+#define BASE_T_LED2_ON_CFG \
+			(LED_ON_EVT_LINK_100M)
+#define BASE_T_LED2_BLK_CFG \
+			(LED_BLK_EVT_100M_TX_ACT | \
+			 LED_BLK_EVT_100M_RX_ACT)
+#define BASE_T_LED3_ON_CFG      (0x0)
+#define BASE_T_LED3_BLK_CFG     (0x0)
+/* User-defined.E */
+
+#define EN8801S_LED_COUNT       4
+
+#define MAX_RETRY               5
+#define MAX_OUI_CHECK           2
+/* CL45 MDIO control */
+#define MII_MMD_ACC_CTL_REG     0x0d
+#define MII_MMD_ADDR_DATA_REG   0x0e
+#define MMD_OP_MODE_DATA        BIT(14)
+
+#define MAX_TRG_COUNTER         5
+
+/* CL22 Reg Support Page Select */
+#define RgAddr_Reg1Fh        0x1f
+#define CL22_Page_Reg        0x0000
+#define CL22_Page_ExtReg     0x0001
+#define CL22_Page_MiscReg    0x0002
+#define CL22_Page_LpiReg     0x0003
+#define CL22_Page_tReg       0x02A3
+#define CL22_Page_TrReg      0x52B5
+
+/* CL45 Reg Support DEVID */
+#define DEVID_03             0x03
+#define DEVID_07             0x07
+#define DEVID_1E             0x1E
+#define DEVID_1F             0x1F
+
+/* TokenRing Reg Access */
+#define TrReg_PKT_XMT_STA    0x8000
+#define TrReg_WR             0x8000
+#define TrReg_RD             0xA000
+
+#define RgAddr_LPI_1Ch       0x1c
+#define RgAddr_AUXILIARY_1Dh 0x1d
+#define RgAddr_PMA_00h       0x0f80
+#define RgAddr_PMA_01h       0x0f82
+#define RgAddr_PMA_17h       0x0fae
+#define RgAddr_PMA_18h       0x0fb0
+#define RgAddr_DSPF_03h      0x1686
+#define RgAddr_DSPF_06h      0x168c
+#define RgAddr_DSPF_08h      0x1690
+#define RgAddr_DSPF_0Ch      0x1698
+#define RgAddr_DSPF_0Dh      0x169a
+#define RgAddr_DSPF_0Fh      0x169e
+#define RgAddr_DSPF_10h      0x16a0
+#define RgAddr_DSPF_11h      0x16a2
+#define RgAddr_DSPF_13h      0x16a6
+#define RgAddr_DSPF_14h      0x16a8
+#define RgAddr_DSPF_1Bh      0x16b6
+#define RgAddr_DSPF_1Ch      0x16b8
+#define RgAddr_TR_26h        0x0ecc
+#define RgAddr_R1000DEC_15h  0x03aa
+#define RgAddr_R1000DEC_17h  0x03ae
+
+#define LED_BCR                     (0x021)
+#define LED_BCR_EXT_CTRL            (1 << 15)
+#define LED_BCR_CLK_EN              (1 << 3)
+#define LED_BCR_TIME_TEST           (1 << 2)
+#define LED_BCR_MODE_MASK           (3)
+#define LED_BCR_MODE_DISABLE        (0)
+
+#define LED_ON_DUR                  (0x022)
+#define LED_ON_DUR_MASK             (0xffff)
+
+#define LED_BLK_DUR                 (0x023)
+#define LED_BLK_DUR_MASK            (0xffff)
+
+#define LED_GPIO_SEL_MASK 0x7FFFFFF
+
+#define UNIT_LED_BLINK_DURATION     1024
+
+/* Invalid data */
+#define INVALID_DATA            0xffffffff
+
+#define LED_SET_GPIO_SEL(gpio, led, val)             \
+			(val |= (led << (8 * (gpio % 4))))       \
+
+#define GET_BIT(val, bit) ((val & BIT(bit)) >> bit)
+/* DATA TYPE DECLARATIONS
+ */
+struct AIR_BASE_T_LED_CFG_S {
+	u16 en;
+	u16 gpio;
+	u16 pol;
+	u16 on_cfg;
+	u16 blk_cfg;
+};
+
+union gephy_all_REG_LpiReg1Ch {
+	struct {
+		/* b[15:00] */
+		u16 smi_deton_wt                             : 3;
+		u16 smi_det_mdi_inv                          : 1;
+		u16 smi_detoff_wt                            : 3;
+		u16 smi_sigdet_debouncing_en                 : 1;
+		u16 smi_deton_th                             : 6;
+		u16 rsv_14                                   : 2;
+	} DataBitField;
+	u16 DATA;
+};
+
+union gephy_all_REG_dev1Eh_reg324h {
+	struct {
+		/* b[15:00] */
+		u16 rg_smi_detcnt_max                        : 6;
+		u16 rsv_6                                    : 2;
+		u16 rg_smi_det_max_en                        : 1;
+		u16 smi_det_deglitch_off                     : 1;
+		u16 rsv_10                                   : 6;
+	} DataBitField;
+	u16 DATA;
+};
+
+union gephy_all_REG_dev1Eh_reg012h {
+	struct {
+		/* b[15:00] */
+		u16 da_tx_i2mpb_a_tbt                        : 6;
+		u16 rsv_6                                    : 4;
+		u16 da_tx_i2mpb_a_gbe                        : 6;
+	} DataBitField;
+	u16 DATA;
+};
+
+union gephy_all_REG_dev1Eh_reg017h {
+	struct {
+		/* b[15:00] */
+		u16 da_tx_i2mpb_b_tbt                        : 6;
+		u16 rsv_6                                    : 2;
+		u16 da_tx_i2mpb_b_gbe                        : 6;
+		u16 rsv_14                                   : 2;
+	} DataBitField;
+	u16 DATA;
+};
+
+enum {
+	AIR_LED_BLK_DUR_32M,
+	AIR_LED_BLK_DUR_64M,
+	AIR_LED_BLK_DUR_128M,
+	AIR_LED_BLK_DUR_256M,
+	AIR_LED_BLK_DUR_512M,
+	AIR_LED_BLK_DUR_1024M,
+	AIR_LED_BLK_DUR_LAST
+};
+
+enum {
+	AIR_ACTIVE_LOW,
+	AIR_ACTIVE_HIGH,
+};
+
+enum {
+	AIR_LED_MODE_DISABLE,
+	AIR_LED_MODE_USER_DEFINE,
+	AIR_LED_MODE_LAST
+};
+
+#endif /* End of __EN8801SC_H */
diff --git a/target/linux/mediatek/filogic/config-6.1 b/target/linux/mediatek/filogic/config-6.1
index 276c6fe6c4..ce6a2f8ddf 100644
--- a/target/linux/mediatek/filogic/config-6.1
+++ b/target/linux/mediatek/filogic/config-6.1
@@ -1,5 +1,6 @@
 CONFIG_64BIT=y
 # CONFIG_AHCI_MTK is not set
+# CONFIG_AIROHA_EN8801SC_PHY is not set
 CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
 CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
diff --git a/target/linux/mediatek/filogic/config-6.6 b/target/linux/mediatek/filogic/config-6.6
index e6c2d18c73..a87fdc9bc8 100644
--- a/target/linux/mediatek/filogic/config-6.6
+++ b/target/linux/mediatek/filogic/config-6.6
@@ -1,5 +1,6 @@
 CONFIG_64BIT=y
 # CONFIG_AHCI_MTK is not set
+# CONFIG_AIROHA_EN8801SC_PHY is not set
 CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
 CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
 CONFIG_ARCH_DEFAULT_KEXEC_IMAGE_VERIFY_SIG=y
diff --git a/target/linux/mediatek/mt7622/config-6.1 b/target/linux/mediatek/mt7622/config-6.1
index f10f1f7204..68bdd87074 100644
--- a/target/linux/mediatek/mt7622/config-6.1
+++ b/target/linux/mediatek/mt7622/config-6.1
@@ -1,5 +1,6 @@
 CONFIG_64BIT=y
 # CONFIG_AHCI_MTK is not set
+# CONFIG_AIROHA_EN8801SC_PHY is not set
 CONFIG_AQUANTIA_PHY=y
 CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
 CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
diff --git a/target/linux/mediatek/mt7622/config-6.6 b/target/linux/mediatek/mt7622/config-6.6
index 0dc30969b0..067dd02d31 100644
--- a/target/linux/mediatek/mt7622/config-6.6
+++ b/target/linux/mediatek/mt7622/config-6.6
@@ -1,5 +1,6 @@
 CONFIG_64BIT=y
 # CONFIG_AHCI_MTK is not set
+# CONFIG_AIROHA_EN8801SC_PHY is not set
 CONFIG_AQUANTIA_PHY=y
 CONFIG_ARCH_BINFMT_ELF_EXTRA_PHDRS=y
 CONFIG_ARCH_CORRECT_STACKTRACE_ON_KRETPROBE=y
diff --git a/target/linux/mediatek/mt7623/config-6.1 b/target/linux/mediatek/mt7623/config-6.1
index 3f7c1bee16..1407188e2e 100644
--- a/target/linux/mediatek/mt7623/config-6.1
+++ b/target/linux/mediatek/mt7623/config-6.1
@@ -1,4 +1,5 @@
 # CONFIG_AIO is not set
+# CONFIG_AIROHA_EN8801SC_PHY is not set
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
 CONFIG_ARCH_FORCE_MAX_ORDER=11
diff --git a/target/linux/mediatek/mt7623/config-6.6 b/target/linux/mediatek/mt7623/config-6.6
index 6e9948c516..de32b83e94 100644
--- a/target/linux/mediatek/mt7623/config-6.6
+++ b/target/linux/mediatek/mt7623/config-6.6
@@ -1,4 +1,5 @@
 # CONFIG_AIO is not set
+# CONFIG_AIROHA_EN8801SC_PHY is not set
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
diff --git a/target/linux/mediatek/mt7629/config-6.1 b/target/linux/mediatek/mt7629/config-6.1
index 91d54d595e..5a15286c46 100644
--- a/target/linux/mediatek/mt7629/config-6.1
+++ b/target/linux/mediatek/mt7629/config-6.1
@@ -1,3 +1,4 @@
+# CONFIG_AIROHA_EN8801SC_PHY is not set
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
 CONFIG_ARCH_FORCE_MAX_ORDER=11
diff --git a/target/linux/mediatek/mt7629/config-6.6 b/target/linux/mediatek/mt7629/config-6.6
index 3274864ac2..ec029de2fe 100644
--- a/target/linux/mediatek/mt7629/config-6.6
+++ b/target/linux/mediatek/mt7629/config-6.6
@@ -1,3 +1,4 @@
+# CONFIG_AIROHA_EN8801SC_PHY is not set
 CONFIG_ALIGNMENT_TRAP=y
 CONFIG_ARCH_32BIT_OFF_T=y
 CONFIG_ARCH_HIBERNATION_POSSIBLE=y
diff --git a/target/linux/mediatek/patches-6.1/735-net-phy-add-Airoha-EN8801SC-PHY.patch b/target/linux/mediatek/patches-6.1/735-net-phy-add-Airoha-EN8801SC-PHY.patch
new file mode 100644
index 0000000000..51f2a197e9
--- /dev/null
+++ b/target/linux/mediatek/patches-6.1/735-net-phy-add-Airoha-EN8801SC-PHY.patch
@@ -0,0 +1,38 @@
+From 5314e73cb941b47e6866b49b3b78c25e32d62df8 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko at sartura.hr>
+Date: Sat, 23 Mar 2024 20:21:14 +0100
+Subject: [PATCH] net: phy: add Airoha EN8801SC PHY
+
+Airoha EN8801SC Gigabit PHY is used on Edgecore EAP111, so include a
+modified version of MTK SDK driver.
+
+Signed-off-by: Robert Marko <robert.marko at sartura.hr>
+---
+ drivers/net/phy/Kconfig  | 5 +++++
+ drivers/net/phy/Makefile | 1 +
+ 2 files changed, 6 insertions(+)
+
+--- a/drivers/net/phy/Kconfig
++++ b/drivers/net/phy/Kconfig
+@@ -143,6 +143,11 @@ endif # RTL8366_SMI
+ 
+ comment "MII PHY device drivers"
+ 
++config AIROHA_EN8801SC_PHY
++	tristate "Airoha EN8801SC Gigabit PHY"
++	help
++	  Currently supports the Airoha EN8801SC PHY.
++
+ config AIR_EN8811H_PHY
+ 	tristate "Airoha EN8811H 2.5 Gigabit PHY"
+ 	help
+--- a/drivers/net/phy/Makefile
++++ b/drivers/net/phy/Makefile
+@@ -47,6 +47,7 @@ obj-y				+= $(sfp-obj-y) $(sfp-obj-m)
+ 
+ obj-$(CONFIG_ADIN_PHY)		+= adin.o
+ obj-$(CONFIG_ADIN1100_PHY)	+= adin1100.o
++obj-$(CONFIG_AIROHA_EN8801SC_PHY)   += en8801sc.o
+ obj-$(CONFIG_AIR_EN8811H_PHY)   += air_en8811h.o
+ obj-$(CONFIG_AMD_PHY)		+= amd.o
+ obj-$(CONFIG_AQUANTIA_PHY)	+= aquantia/
diff --git a/target/linux/mediatek/patches-6.6/734-net-phy-add-Airoha-EN8801SC-PHY.patch b/target/linux/mediatek/patches-6.6/734-net-phy-add-Airoha-EN8801SC-PHY.patch
new file mode 100644
index 0000000000..90c030fb89
--- /dev/null
+++ b/target/linux/mediatek/patches-6.6/734-net-phy-add-Airoha-EN8801SC-PHY.patch
@@ -0,0 +1,38 @@
+From 5314e73cb941b47e6866b49b3b78c25e32d62df8 Mon Sep 17 00:00:00 2001
+From: Robert Marko <robert.marko at sartura.hr>
+Date: Sat, 23 Mar 2024 20:21:14 +0100
+Subject: [PATCH] net: phy: add Airoha EN8801SC PHY
+
+Airoha EN8801SC Gigabit PHY is used on Edgecore EAP111, so include a
+modified version of MTK SDK driver.
+
+Signed-off-by: Robert Marko <robert.marko at sartura.hr>
+---
+ drivers/net/phy/Kconfig  | 5 +++++
+ drivers/net/phy/Makefile | 1 +
+ 2 files changed, 6 insertions(+)
+
+--- a/drivers/net/phy/Kconfig
++++ b/drivers/net/phy/Kconfig
+@@ -142,6 +142,11 @@ endif # RTL8366_SMI
+ 
+ comment "MII PHY device drivers"
+ 
++config AIROHA_EN8801SC_PHY
++	tristate "Airoha EN8801SC Gigabit PHY"
++	help
++	  Currently supports the Airoha EN8801SC PHY.
++
+ config AIR_EN8811H_PHY
+ 	tristate "Airoha EN8811H 2.5 Gigabit PHY"
+ 	help
+--- a/drivers/net/phy/Makefile
++++ b/drivers/net/phy/Makefile
+@@ -49,6 +49,7 @@ obj-y				+= $(sfp-obj-y) $(sfp-obj-m)
+ 
+ obj-$(CONFIG_ADIN_PHY)		+= adin.o
+ obj-$(CONFIG_ADIN1100_PHY)	+= adin1100.o
++obj-$(CONFIG_AIROHA_EN8801SC_PHY)   += en8801sc.o
+ obj-$(CONFIG_AIR_EN8811H_PHY)   += air_en8811h.o
+ obj-$(CONFIG_AMD_PHY)		+= amd.o
+ obj-$(CONFIG_AQUANTIA_PHY)	+= aquantia/



From lede-commits at lists.infradead.org  Thu Apr 11 17:52:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 11 Apr 2024 20:52:33 -0400
Subject: [openwrt/openwrt]  mvebu: puzzle-m90x: wipe rootfs_data on sysupgrade
In-Reply-To: <171288315359.2003322.5976852910516111354@git-01.infra.openwrt.org>
References: <171288315359.2003322.5976852910516111354@git-01.infra.openwrt.org>
Message-ID: <mailman.26244.1712883160.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/5cae98c25d86e078d0632aa25f168df11689f592

commit 5cae98c25d86e078d0632aa25f168df11689f592
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Jan 9 19:54:51 2024 +0000

    mvebu: puzzle-m90x: wipe rootfs_data on sysupgrade
    
    The sysupgrade formware of the Puzzle series is a slightly strange
    dual-boot approach while remaining compatible with Marvell's SDK
    firmware upgrade binary format -- which happens to be a full-disk
    image with GPT partition table. Hence that /lib/upgrade/emmc-puzzle.sh
    script is like an exotic disease which results from those decisions,
    and as we also want to somehow stay compatible with the IEI-World
    stock firmware we got to use it in that same way (we are not
    compatible with the QNAP-branded identical hardware device anyway).
    
    Currently, on sysupgrade the result is that one ends up with the old
    content of rootfs_data (a GPT partition on those devices) as nothing
    ever wipes or in any way re-creates the filesystem there. As a simple
    work-around, let's kill the filesystem on rootfs_data so fstools
    re-formats it on the next boot.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    (cherry picked from commit d4e8653e1e9ec90404d12ea24fb0f8e507b337d5)
---
 target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
index 5e5c356ed6..9a33b7714c 100755
--- a/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
+++ b/target/linux/mvebu/cortexa72/base-files/lib/upgrade/emmc-puzzle.sh
@@ -32,5 +32,7 @@ platform_do_upgrade_emmc() {
 	v "Writing new UUID to /dev/$diskdev..."
 	get_image_dd "$1" of="/dev/$diskdev" bs=1 skip=440 count=4 seek=440 conv=fsync
 
+	dd if=/dev/zero of=$(find_mmc_part rootfs_data) bs=512 count=8
+
 	sleep 1
 }



From lede-commits at lists.infradead.org  Thu Apr 11 18:08:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 11 Apr 2024 21:08:48 -0400
Subject: [openwrt/openwrt]  package: kernel: leds-gca230718: fix build with
 Linux 6.6
In-Reply-To: <171288412835.2032322.12530464628900833219@git-01.infra.openwrt.org>
References: <171288412835.2032322.12530464628900833219@git-01.infra.openwrt.org>
Message-ID: <mailman.26245.1712884132.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/07918e6612633d550197512a1b15c72867ef80e3

commit 07918e6612633d550197512a1b15c72867ef80e3
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri Apr 12 02:02:36 2024 +0100

    package: kernel: leds-gca230718: fix build with Linux 6.6
    
    Starting with Linux 6.3 the .probe call no longer got the id parameter,
    see also commit torvalds/linux at 03c835f498b5
    ("i2c: Switch .probe() to not take an id parameter").
    
    As the parameter is anyway unused by the driver, drop it when
    building the GCA230718 LED driver for newer kernels.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 package/kernel/leds-gca230718/src/leds-gca230718.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/package/kernel/leds-gca230718/src/leds-gca230718.c b/package/kernel/leds-gca230718/src/leds-gca230718.c
index d759453cd9..194d149970 100644
--- a/package/kernel/leds-gca230718/src/leds-gca230718.c
+++ b/package/kernel/leds-gca230718/src/leds-gca230718.c
@@ -109,7 +109,11 @@ static int gca230718_set_brightness(struct led_classdev *led_cdev, enum led_brig
 	return 0;
 }
 
+#if LINUX_VERSION_CODE >= KERNEL_VERSION(6,3,0)
+static int gca230718_probe(struct i2c_client *client)
+#else
 static int gca230718_probe(struct i2c_client *client, const struct i2c_device_id *id)
+#endif
 {
 	int status = 0;
 	struct gca230718_private* gca230718_privateData;



From lede-commits at lists.infradead.org  Fri Apr 12 04:20:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 07:20:54 -0400
Subject: [openwrt/openwrt]  lldpd: note about capabilities
In-Reply-To: <171292085353.3379113.16025784253554359842@git-01.infra.openwrt.org>
References: <171292085353.3379113.16025784253554359842@git-01.infra.openwrt.org>
Message-ID: <mailman.26483.1712920861.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b4769175029ad23833b21960d1b605f629537ad7

commit b4769175029ad23833b21960d1b605f629537ad7
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Tue Apr 2 13:42:35 2024 +0200

    lldpd: note about capabilities
    
    only available from >= 1.0.15
    
    Comments are useful. Apparently this config parameter was committed when
    openwrt used an older version of lldpd which did not yet support it.
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 package/network/services/lldpd/files/lldpd.init | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index ca09a501f6..6707476e55 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -106,6 +106,7 @@ write_lldpd_conf()
 	local lldp_mgmt_ip
 	config_get lldp_mgmt_ip 'config' 'lldp_mgmt_ip'
 
+	# Configurable capabilities in lldpd >= v1.0.15
 	local lldp_syscapabilities
 	config_get lldp_syscapabilities 'config' 'lldp_syscapabilities'
 



From lede-commits at lists.infradead.org  Fri Apr 12 04:20:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 07:20:53 -0400
Subject: [openwrt/openwrt]  lldpd: fix restart
In-Reply-To: <171292085353.3379113.16025784253554359842@git-01.infra.openwrt.org>
References: <171292085353.3379113.16025784253554359842@git-01.infra.openwrt.org>
Message-ID: <mailman.26484.1712920861.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8cf1dce428b11740d8335d167b9c1f297d1752d0

commit 8cf1dce428b11740d8335d167b9c1f297d1752d0
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Tue Apr 2 13:42:20 2024 +0200

    lldpd: fix restart
    
    Redirection broke in 5364fe0f01ca ("lldpd: shellcheck fixes")
    
    redirects to /dev/null shall be handled correctly (i.e. last).
    
    This fixes these errors on `/etc/init.d/lldpd reload`:
    
    2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
    2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
    2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
    2024-03-16T20:39:00 [WARN/lldpctl] unknown command from argument 1: `/dev/null`
    
    Tested-on: 22.03.6
    Fixes: 5364fe0f01ca ("lldpd: shellcheck fixes")
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
    [ improve commit description, add fixes tag ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/network/services/lldpd/files/lldpd.init | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 67ee011ae2..ca09a501f6 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -349,7 +349,7 @@ reload_service() {
 		return 0
 	fi
 
-	$LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF
+	$LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF
 		pause
 		unconfigure lldp custom-tlv
 		unconfigure system interface pattern
@@ -359,7 +359,7 @@ reload_service() {
 		unconfigure system platform
 	EOF
 	if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then
-		$LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF
+		$LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF
 			unconfigure med fast-start
 		EOF
 
@@ -367,9 +367,9 @@ reload_service() {
 	# Rewrite lldpd.conf
 	# If something changed it should be included by the lldpcli call
 	write_lldpd_conf
-	$LLDPCLI -u "$LLDPSOCKET" -c "$LLDPD_CONF" -c "$LLDPD_CONFS_DIR" 2>&1 /dev/null
+	$LLDPCLI -u "$LLDPSOCKET" -c "$LLDPD_CONF" -c "$LLDPD_CONFS_DIR" >/dev/null 2>&1 
 	# Broadcast update over the wire
-	$LLDPCLI -u "$LLDPSOCKET" 2>&1 /dev/null <<-EOF
+	$LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF
 		resume
 		update
 	EOF
@@ -377,6 +377,6 @@ reload_service() {
 }
 
 stop_service() {
-	rm -rf ${LLDPD_RUN} "$LLDPSOCKET" 2> /dev/null
+	rm -rf ${LLDPD_RUN} "$LLDPSOCKET" >/dev/null 2>&1
 }
 



From lede-commits at lists.infradead.org  Fri Apr 12 04:22:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 07:22:16 -0400
Subject: [openwrt/openwrt]  qualcommax: enhance smp_affinity (log, uci,
 syntax)
In-Reply-To: <171292093606.3382191.12745877210632571300@git-01.infra.openwrt.org>
References: <171292093606.3382191.12745877210632571300@git-01.infra.openwrt.org>
Message-ID: <mailman.26485.1712920941.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/849ebc905bf9c994ccfcec379a51ff51479f1215

commit 849ebc905bf9c994ccfcec379a51ff51479f1215
Author: Sean Khan <datapronix at protonmail.com>
AuthorDate: Mon Apr 8 23:11:37 2024 -0400

    qualcommax: enhance smp_affinity (log, uci, syntax)
    
    1.) Changed logic of `set_affinity` to now use physical cores rather than
        knowing the bitmask. Rather than having to know a bitmask, users can
        provide a numerical instance of one or more CPU cores
        (numbered 0-63).
    
        This is done via function `cpus_to_bitmask`.
    
        Functions Added:
    
        a.) bitmask_to_cpus - Takes a bitmask of CPUs and returns a
             list of CPU numbers. (i.e. `bitmask_to_cpus "f"` -> 0,1,2,3)
    
        b.) cpus_to_bitmask - Takes a comma/space or range list of CPUs and returns
             a bitmask.
    
             Example:
             `cpus_to_bitmask "2,3"`     -> c
             `cpus_to_bitmask "0,1,2,3"` -> f
             `cpus_to_bitmask "1,3"`     -> a
    
             With or without quotes
             `cpus_to_bitmask "1 3"`     -> a
             `cpus_to_bitmask  1 3`      -> a
    
    2.) Added UCI options:
    
        enable     - to enable/disable the script from running.   [default 1 (on)]
        enable_log - to enable/disable logging output to `logger`.[default 1 (on)]
    
        Log output:
    ```
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(87) reo2host-destination-ring1    to CPU 0
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(88) reo2host-destination-ring2    to CPU 1
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(89) reo2host-destination-ring3    to CPU 2
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(90) reo2host-destination-ring4    to CPU 3
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(79) wbm2host-tx-completions-ring1 to CPU 1
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(83) wbm2host-tx-completions-ring2 to CPU 2
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(85) wbm2host-tx-completions-ring3 to CPU 3
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(73) ppdu-end-interrupts-mac1      to CPU 1
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(77) ppdu-end-interrupts-mac2      to CPU 2
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(75) ppdu-end-interrupts-mac3      to CPU 3
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(32) edma_txcmpl                   to CPU 3
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(33) edma_rxfill                   to CPU 3
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(35) edma_rxdesc                   to CPU 3
        Mon Apr  8 23:00:01 2024 user.notice smp_affinity: Pinning IRQ(36) edma_misc                     to CPU 3
    ```
    
        Output of `/proc/interrupts`:
    ```
     69:          0          0          0          0 GIC-0 209 Edge      rxdma2host-destination-ring-mac1
     70:          0          0          0          0 GIC-0 211 Edge      rxdma2host-destination-ring-mac3
     71:          0          0          0          0 GIC-0 210 Edge      rxdma2host-destination-ring-mac2
     72:       2435          0          0          0 GIC-0 321 Edge      reo2host-status
     73:     268427       8011          0          0 GIC-0 261 Edge      ppdu-end-interrupts-mac1
     74:          2          0          0          0 GIC-0 255 Edge      rxdma2host-monitor-status-ring-mac1
     75:     176169          0          4      10035 GIC-0 263 Edge      ppdu-end-interrupts-mac3
     76:          2          0          0          0 GIC-0 260 Edge      rxdma2host-monitor-status-ring-mac3
     77:          0          0          0          0 GIC-0 262 Edge      ppdu-end-interrupts-mac2
     78:          0          0          0          0 GIC-0 256 Edge      rxdma2host-monitor-status-ring-mac2
     79:       3428       3123          0          0 GIC-0 189 Edge      wbm2host-tx-completions-ring1
     80:          0          0          0          0 GIC-0 323 Edge      reo2ost-exception
     81:        178          0          0          0 GIC-0 322 Edge      wbm2host-rx-release
     82:          0          0          0          0 GIC-0 212 Edge      host2rxdma-host-buf-ring-mac1
     83:       6524          0      13712          0 GIC-0 190 Edge      wbm2host-tx-completions-ring2
     84:          4          0          0          0 GIC-0 235 Edge      host2rxdma-host-buf-ring-mac3
     85:        560          0          0       1979 GIC-0 191 Edge      wbm2host-tx-completions-ring3
     86:          0          0          0          0 GIC-0 215 Edge      host2rxdma-host-buf-ring-mac2
     87:       4520          0          0          0 GIC-0 267 Edge      reo2host-destination-ring1
     88:       2231       2811          0          0 GIC-0 268 Edge      reo2host-destination-ring2
     89:       2180          0       2512          0 GIC-0 271 Edge      reo2host-destination-ring3
     90:       1990          0          0       2321 GIC-0 320 Edge      reo2host-destination-ring4
    ```
    
    3.) Added `uci-defaults` script `15_smp_affinity` to configure defaults
        options on first boot.
    
    Signed-off-by: Sean Khan <datapronix at protonmail.com>
---
 .../ipq807x/base-files/etc/init.d/smp_affinity     | 140 +++++++++++++++++----
 .../base-files/etc/uci-defaults/15_smp_affinity    |  11 ++
 2 files changed, 124 insertions(+), 27 deletions(-)

diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity
index 05d13fff63..ecf88aea09 100755
--- a/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/init.d/smp_affinity
@@ -1,36 +1,122 @@
 #!/bin/sh /etc/rc.common
+######################################################################
+# vim: set ft=bash
+# shellcheck disable=2155,3019,3043,3057,3060
+######################################################################
 
 START=93
 
+PROG=smp_affinity
+
+log_msg() {
+
+  local irq_name="$1" affinity="$2" irq="$3"
+
+  msg="$(printf "Pinning IRQ($irq) %-24s to CPU ${affinity}\n" "$irq_name")"
+
+  logger -t "$PROG" "$msg"
+}
+
+######################################################################
+### Takes a comma, space separated, or range list of CPU numbers and
+## returns a bitmask of CPUs.
+## cpus_to_bitmask "0,1,2,3" -> f
+## cpus_to_bitmask "0 1 2 3" -> f
+## cpus_to_bitmask "0-3"     -> f
+## cpus_to_bitmask "3"       -> 8
+#######################################################################
+
+cpus_to_bitmask() {
+
+  local bitmask=0
+  # shellcheck disable=2048
+  for range in ${*//,/ }; do
+    start="${range%-*}"
+    end="${range#*-}"
+    if [ -z "$end" ]; then
+      bitmask="$((bitmask | 1 << start))"
+    else
+      bitmask="$((bitmask | (2 ** (end - start + 1) - 1) << start))"
+    fi
+  done
+  printf '%x' $bitmask
+}
+
+######################################################################
+### Takes a bitmask of CPUs and returns a space separated list of
+## CPU numbers.
+## bitmask_to_cpus f -> 0 1 2 3
+######################################################################
+
+bitmask_to_cpus() {
+
+  [ "${1:0:2}" != "0x" ] && set -- "0x$1"
+  local bitmask="$(printf '%d' "$1")"
+
+  local cpus=""
+  for i in $(seq 0 63); do
+    if [ $((bitmask & 1)) -ne 0 ]; then
+      cpus="$cpus $i"
+    fi
+    bitmask=$((bitmask >> 1))
+  done
+  echo "${cpus# }"
+}
+
+######################################################################
+### Sets the affinity of the IRQs with the given name to the given CPU.
+## 1st argument: IRQ name ("reo2host-destination-ring1") (req)
+## 2nd argument: CPU number (req)
+######################################################################
+
+set_affinity() {
+
+  local irq_name="$1" affinity="$2" bitmask irq
+  awk -v irq_name="$1" '$0 ~ irq_name { print substr($1, 1, length($1)-1); exit }' /proc/interrupts \
+    | while read -r irq; do
+      $enable_log && {
+        log_msg "$irq_name" "$affinity" "$irq"
+      }
+      bitmask=$(cpus_to_bitmask "$affinity") && echo "$bitmask" > "/proc/irq/$irq/smp_affinity"
+    done
+}
+
 enable_affinity_ipq807x() {
-	set_affinity() {
-		irq=$(awk "/$1/{ print substr(\$1, 1, length(\$1)-1); exit }" /proc/interrupts)
-		[ -n "$irq" ] && echo $2 > /proc/irq/$irq/smp_affinity
-	}
-
-	# assign 4 rx interrupts to each core
-	set_affinity 'reo2host-destination-ring1' 1
-	set_affinity 'reo2host-destination-ring2' 2
-	set_affinity 'reo2host-destination-ring3' 4
-	set_affinity 'reo2host-destination-ring4' 8
-
-	# assign 3 tcl completions to last 3 CPUs
-	set_affinity 'wbm2host-tx-completions-ring1' 2
-	set_affinity 'wbm2host-tx-completions-ring2' 4
-	set_affinity 'wbm2host-tx-completions-ring3' 8
-
-	# assign 3 ppdu mac interrupts to last 3 cores
-	set_affinity 'ppdu-end-interrupts-mac1' 2
-	set_affinity 'ppdu-end-interrupts-mac2' 4
-	set_affinity 'ppdu-end-interrupts-mac3' 8
-
-	# assign lan/wan to core 4
-	set_affinity 'edma_txcmpl' 8
-	set_affinity 'edma_rxfill' 8
-	set_affinity 'edma_rxdesc' 8
-	set_affinity 'edma_misc' 8
+
+  # assign 4 rx interrupts to each core
+  set_affinity 'reo2host-destination-ring1'    0
+  set_affinity 'reo2host-destination-ring2'    1
+  set_affinity 'reo2host-destination-ring3'    2
+  set_affinity 'reo2host-destination-ring4'    3
+
+  # assign 3 tcl completions to last 3 CPUs
+  set_affinity 'wbm2host-tx-completions-ring1' 1
+  set_affinity 'wbm2host-tx-completions-ring2' 2
+  set_affinity 'wbm2host-tx-completions-ring3' 3
+
+  # assign 3 ppdu mac interrupts to last 3 cores
+  set_affinity 'ppdu-end-interrupts-mac1'      1
+  set_affinity 'ppdu-end-interrupts-mac2'      2
+  set_affinity 'ppdu-end-interrupts-mac3'      3
+
+  # assign 4 lan/wan to core 4
+  set_affinity 'edma_txcmpl'                   3
+  set_affinity 'edma_rxfill'                   3
+  set_affinity 'edma_rxdesc'                   3
+  set_affinity 'edma_misc'                     3
 }
 
 boot() {
-	enable_affinity_ipq807x
+
+  local enable
+
+  config_load     smp_affinity
+
+  config_get_bool enable     "general" enable     1
+  config_get_bool enable_log "general" enable_log 1
+
+  [ "$enable"     -eq 1 ] && enable=true     || enable=false
+  [ "$enable_log" -eq 1 ] && enable_log=true || enable_log=false
+
+  $enable && enable_affinity_ipq807x
 }
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/uci-defaults/15_smp_affinity b/target/linux/qualcommax/ipq807x/base-files/etc/uci-defaults/15_smp_affinity
new file mode 100644
index 0000000000..3ec0adc44c
--- /dev/null
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/uci-defaults/15_smp_affinity
@@ -0,0 +1,11 @@
+#!/bin/sh
+
+uci -q get smp_affinity && exit 0
+touch /etc/config/smp_affinity
+
+uci -q batch << EOF
+  set smp_affinity.general=smp_affinity
+  set smp_affinity.general.enable='1'
+  set smp_affinity.general.enable_log='1'
+  commit smp_affinity
+EOF



From lede-commits at lists.infradead.org  Fri Apr 12 04:45:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 07:45:55 -0400
Subject: [openwrt/openwrt]  lldpd: make capabilities advertisement
 controllable
In-Reply-To: <171292235591.3438588.1447824924057629216@git-01.infra.openwrt.org>
References: <171292235591.3438588.1447824924057629216@git-01.infra.openwrt.org>
Message-ID: <mailman.26500.1712922360.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4d8f56bd59f457fd815e2bb4f87df8c7dad2d4fd

commit 4d8f56bd59f457fd815e2bb4f87df8c7dad2d4fd
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Wed Apr 3 14:06:29 2024 +0200

    lldpd: make capabilities advertisement controllable
    
    Defaults to off.
    
    Only available from >= 1.0.15
    
    These capabilities are sent in TLV.
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 package/network/services/lldpd/files/lldpd.init | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 6707476e55..6685aa11af 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -110,6 +110,10 @@ write_lldpd_conf()
 	local lldp_syscapabilities
 	config_get lldp_syscapabilities 'config' 'lldp_syscapabilities'
 
+	# Configurable capabilities in lldpd >= v1.0.15
+	local lldp_capability_advertisements
+	config_get_bool lldp_capability_advertisements 'config' 'lldp_capability_advertisements' 0
+
 	if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then
 		local lldpmed_fast_start
 		config_get_bool lldpmed_fast_start 'config' 'lldpmed_fast_start' 0
@@ -150,6 +154,7 @@ write_lldpd_conf()
 	[ -n "$lldp_hostname" ] && echo "configure system hostname" "\"$lldp_hostname\"" >> "$LLDPD_CONF"
 	[ -n "$lldp_mgmt_ip" ] && echo "configure system ip management pattern" "\"$lldp_mgmt_ip\"" >> "$LLDPD_CONF"
 	[ -n "$lldp_syscapabilities" ] && echo "configure system capabilities enabled $lldp_syscapabilities" >> "$LLDPD_CONF"
+
 	if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ] && [ "$lldpmed_fast_start" -gt 0 ]; then
 		if [ "$lldpmed_fast_start_tx_interval" -gt 0 ]; then
 			echo "configure med fast-start tx-interval $lldpmed_fast_start_tx_interval" >> "$LLDPD_CONF"
@@ -175,6 +180,7 @@ write_lldpd_conf()
 	[ -n "$lldp_platform" ] && echo "configure system platform" "\"$lldp_platform\"" >> "$LLDPD_CONF"
 	[ -n "$lldp_tx_interval" ] && echo "configure lldp tx-interval $lldp_tx_interval" >> "$LLDPD_CONF"
 	[ "$lldp_tx_hold" -gt 0 ] && echo "configure lldp tx-hold $lldp_tx_hold" >> "$LLDPD_CONF"
+	[ "$lldp_capability_advertisements" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF"
 
 	# Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR
 	[ -e "$LLDPD_CONFS_DIR" ] || ln -s /etc/lldpd.d "$LLDPD_CONFS_DIR"
@@ -353,6 +359,7 @@ reload_service() {
 	$LLDPCLI -u "$LLDPSOCKET" >/dev/null 2>&1 <<-EOF
 		pause
 		unconfigure lldp custom-tlv
+		unconfigure lldp capabilities-advertisements
 		unconfigure system interface pattern
 		unconfigure system description
 		unconfigure system hostname



From lede-commits at lists.infradead.org  Fri Apr 12 04:45:56 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 07:45:56 -0400
Subject: [openwrt/openwrt]  lldpd: make management address advertisement
 controllable
In-Reply-To: <171292235591.3438588.1447824924057629216@git-01.infra.openwrt.org>
References: <171292235591.3438588.1447824924057629216@git-01.infra.openwrt.org>
Message-ID: <mailman.26503.1712922361.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/50021d3222667a9a239451de0422f0508aef4419

commit 50021d3222667a9a239451de0422f0508aef4419
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Tue Apr 2 13:43:03 2024 +0200

    lldpd: make management address advertisement controllable
    
    Defaults to off.
    
    Available from >= 0.7.15
    
    These are sent in TLV
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 package/network/services/lldpd/files/lldpd.init | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 6685aa11af..31cd7fd389 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -114,6 +114,10 @@ write_lldpd_conf()
 	local lldp_capability_advertisements
 	config_get_bool lldp_capability_advertisements 'config' 'lldp_capability_advertisements' 0
 
+	# Broadcast management address in lldpd >= 0.7.15
+	local lldp_mgmt_addr_advertisements
+	config_get_bool lldp_mgmt_addr_advertisements 'config' 'lldp_mgmt_addr_advertisements' 0
+
 	if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then
 		local lldpmed_fast_start
 		config_get_bool lldpmed_fast_start 'config' 'lldpmed_fast_start' 0
@@ -181,6 +185,7 @@ write_lldpd_conf()
 	[ -n "$lldp_tx_interval" ] && echo "configure lldp tx-interval $lldp_tx_interval" >> "$LLDPD_CONF"
 	[ "$lldp_tx_hold" -gt 0 ] && echo "configure lldp tx-hold $lldp_tx_hold" >> "$LLDPD_CONF"
 	[ "$lldp_capability_advertisements" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF"
+	[ "$lldp_mgmt_addr_advertisements" -gt 0 ] && echo "configure lldp management-addresses-advertisements" >> "$LLDPD_CONF"
 
 	# Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR
 	[ -e "$LLDPD_CONFS_DIR" ] || ln -s /etc/lldpd.d "$LLDPD_CONFS_DIR"
@@ -360,6 +365,7 @@ reload_service() {
 		pause
 		unconfigure lldp custom-tlv
 		unconfigure lldp capabilities-advertisements
+		unconfigure lldp management-addresses-advertisements
 		unconfigure system interface pattern
 		unconfigure system description
 		unconfigure system hostname



From lede-commits at lists.infradead.org  Fri Apr 12 05:46:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 08:46:36 -0400
Subject: [openwrt/openwrt]  mediatek: mt7622: rtl8367c: source comment fixes
In-Reply-To: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
References: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
Message-ID: <mailman.26510.1712926000.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/81e4aabac3a1bf51959c1568d7a4463fe5ab68ce

commit 81e4aabac3a1bf51959c1568d7a4463fe5ab68ce
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Wed Apr 3 18:04:40 2024 +0200

    mediatek: mt7622: rtl8367c: source comment fixes
    
    Fix also some Chinese -> UTF8 encoding problems
    
    Improves indexing and searches
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c
index c39421e57c..0ecc32a6b5 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c
@@ -8,7 +8,7 @@
  * available at https://www.gnu.org/licenses/old-licenses/gpl-2.0.txt
  *
  * $Revision: 76306 $
- * $Date: 2017-03-08 15:13:58 +0800 (?g?T, 08 ?T?? 2017) $
+ * $Date: 2017-03-08 15:13:58 +0800 (??, 08 ?? 2017) $
  *
  * Purpose : Declaration of RLDP and RLPP API
  *



From lede-commits at lists.infradead.org  Fri Apr 12 05:46:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 08:46:35 -0400
Subject: [openwrt/openwrt]  mediatek: mt7622: rtl8367c: source comment fixes
In-Reply-To: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
References: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
Message-ID: <mailman.26511.1712926000.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/90488d274ec9ebcc461385cc1d40aa60a4059656

commit 90488d274ec9ebcc461385cc1d40aa60a4059656
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Wed Apr 3 17:55:15 2024 +0200

    mediatek: mt7622: rtl8367c: source comment fixes
    
    Fix also some Chinese GB18030 -> UTF-8 encoding problems
    
    (translated the Chinese strings to English):
    ?? -> modification
    port8~port10????????register ->
     port8~port10 setup is done in a separate register
    
    
    You are in the correct (UTF-8) encoding when you see:
     * $Date: 2017-03-08 15:13:58 +0800 (??, 08 ?? 2017) $
    e.g. week 3, 08 third month, 2017
    But not if you see:
     * $Date: 2017-03-08 15:13:58 +0800 (???, 08 ??? 2017) $
    
    
    rtl8367c/rtl8367c_asicdrv_lut.c should be read as UTF-8, despite having
    some earlier Chinese text lost to GB18030 encoding.
    
    Improves indexing and searches
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c      | 20 ++++++++++----------
 1 file changed, 10 insertions(+), 10 deletions(-)

diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c
index f9f592ae72..1521467aa8 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c
@@ -439,7 +439,7 @@ ret_t rtl8367c_getAsicLutCamTbUsage(rtk_uint32* pEnabled)
  * Note:
  *      None
  */
-   /*???: RTL8367C_PORTIDMAX, RTL8367C_LUT_LEARNLIMITMAX, RTL8367C_LUT_PORT_LEARN_LIMITNO_REG*/
+   /*modification: RTL8367C_PORTIDMAX, RTL8367C_LUT_LEARNLIMITMAX, RTL8367C_LUT_PORT_LEARN_LIMITNO_REG*/
 ret_t rtl8367c_setAsicLutLearnLimitNo(rtk_uint32 port, rtk_uint32 number)
 {
     if(port > RTL8367C_PORTIDMAX)
@@ -470,7 +470,7 @@ ret_t rtl8367c_setAsicLutLearnLimitNo(rtk_uint32 port, rtk_uint32 number)
  * Note:
  *      None
  */
-  /*???: RTL8367C_PORTIDMAX, RTL8367C_LUT_PORT_LEARN_LIMITNO_REG*/
+  /*modification: RTL8367C_PORTIDMAX, RTL8367C_LUT_PORT_LEARN_LIMITNO_REG*/
 ret_t rtl8367c_getAsicLutLearnLimitNo(rtk_uint32 port, rtk_uint32* pNumber)
 {
     if(port > RTL8367C_PORTIDMAX)
@@ -498,7 +498,7 @@ ret_t rtl8367c_getAsicLutLearnLimitNo(rtk_uint32 port, rtk_uint32* pNumber)
  * Note:
  *      None
  */
-  /*???: RTL8367C_LUT_LEARNLIMITMAX*/
+  /*modification: RTL8367C_LUT_LEARNLIMITMAX*/
 ret_t rtl8367c_setAsicSystemLutLearnLimitNo(rtk_uint32 number)
 {
     if(number > RTL8367C_LUT_LEARNLIMITMAX)
@@ -632,7 +632,7 @@ ret_t rtl8367c_getAsicSystemLutLearnOverAct(rtk_uint32 *pAction)
  * Note:
  *      None
  */
-  /*???: RTL8367C_LUT_SYSTEM_LEARN_PMASK_MASK*/
+  /*modification: RTL8367C_LUT_SYSTEM_LEARN_PMASK_MASK*/
 ret_t rtl8367c_setAsicSystemLutLearnPortMask(rtk_uint32 portmask)
 {
     ret_t retVal;
@@ -666,7 +666,7 @@ ret_t rtl8367c_setAsicSystemLutLearnPortMask(rtk_uint32 portmask)
  * Note:
  *      None
  */
- /*???: RTL8367C_LUT_SYSTEM_LEARN_PMASK_MASK*/
+ /*modification: RTL8367C_LUT_SYSTEM_LEARN_PMASK_MASK*/
 ret_t rtl8367c_getAsicSystemLutLearnPortMask(rtk_uint32 *pPortmask)
 {
     rtk_uint32 tmpmask;
@@ -966,7 +966,7 @@ ret_t rtl8367c_getAsicL2LookupTb(rtk_uint32 method, rtl8367c_luttb *pL2Table)
  * Note:
  *      None
  */
- /*???RTL8367C_PORTIDMAX, RTL8367C_REG_L2_LRN_CNT_REG, port10 reg is not contnious, wait for updating of base.h*/
+ /*modification:RTL8367C_PORTIDMAX, RTL8367C_REG_L2_LRN_CNT_REG, port10 reg is not continuous, wait for updating of base.h*/
 ret_t rtl8367c_getAsicLutLearnNo(rtk_uint32 port, rtk_uint32* pNumber)
 {
     ret_t retVal;
@@ -1047,7 +1047,7 @@ ret_t rtl8367c_getAsicLutFlushAllStatus(rtk_uint32 *pBusyStatus)
  * Note:
  *      None
  */
- /*port8~port10???????????????register, wait for updating of base.h, reg.h*/
+ /*port8~port10 setup is done in a separate register, wait for updating of base.h, reg.h*/
 ret_t rtl8367c_setAsicLutForceFlush(rtk_uint32 portmask)
 {
     ret_t retVal;
@@ -1079,7 +1079,7 @@ ret_t rtl8367c_setAsicLutForceFlush(rtk_uint32 portmask)
  * Note:
  *      None
  */
- /*port8~port10???????????????register, wait for updating of base.h, reg.h*/
+ /*port8~port10 setup is done in a separate register, wait for updating of base.h, reg.h*/
 ret_t rtl8367c_getAsicLutForceFlushStatus(rtk_uint32 *pPortmask)
 {
     rtk_uint32 tmpMask;
@@ -1271,7 +1271,7 @@ ret_t rtl8367c_getAsicLutFlushFid(rtk_uint32* pFid)
  * Note:
  *      None
  */
- /*???RTL8367C_PORTIDMAX*/
+ /*modification:RTL8367C_PORTIDMAX*/
 ret_t rtl8367c_setAsicLutDisableAging(rtk_uint32 port, rtk_uint32 disabled)
 {
     if(port > RTL8367C_PORTIDMAX)
@@ -1295,7 +1295,7 @@ ret_t rtl8367c_setAsicLutDisableAging(rtk_uint32 port, rtk_uint32 disabled)
  * Note:
  *      None
  */
- /*???RTL8367C_PORTIDMAX*/
+ /*modification:RTL8367C_PORTIDMAX*/
 ret_t rtl8367c_getAsicLutDisableAging(rtk_uint32 port, rtk_uint32 *pDisabled)
 {
     if(port > RTL8367C_PORTIDMAX)



From lede-commits at lists.infradead.org  Fri Apr 12 05:46:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 08:46:37 -0400
Subject: [openwrt/openwrt]  mediatek: mt7622: rtl8367c: source code spell
 fixes
In-Reply-To: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
References: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
Message-ID: <mailman.26512.1712926002.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ae192c042c2beca490c9f5fbd7c6192124631f51

commit ae192c042c2beca490c9f5fbd7c6192124631f51
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Wed Apr 3 17:07:06 2024 +0200

    mediatek: mt7622: rtl8367c: source code spell fixes
    
    Improves indexing and searches
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 .../drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h    | 2 +-
 .../files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h         | 4 ++--
 .../files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c      | 4 ++--
 .../files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c        | 4 ++--
 4 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h
index f7a460145e..982e2c4bfc 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_cputag.h
@@ -38,7 +38,7 @@ extern ret_t rtl8367c_setAsicCputagInsertMode(rtk_uint32 mode);
 extern ret_t rtl8367c_getAsicCputagInsertMode(rtk_uint32 *pMode);
 extern ret_t rtl8367c_setAsicCputagPriorityRemapping(rtk_uint32 srcPri, rtk_uint32 newPri);
 extern ret_t rtl8367c_getAsicCputagPriorityRemapping(rtk_uint32 srcPri, rtk_uint32 *pNewPri);
-extern ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 postion);
+extern ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 position);
 extern ret_t rtl8367c_getAsicCputagPosition(rtk_uint32* pPostion);
 extern ret_t rtl8367c_setAsicCputagMode(rtk_uint32 mode);
 extern ret_t rtl8367c_getAsicCputagMode(rtk_uint32 *pMode);
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h
index eb4f48b83e..f973c7bcb6 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_reg.h
@@ -20357,8 +20357,8 @@ auto-generated register address and field data
 #define    RTL8367C_IGMP_MLD_DISCARD_STORM_FILTER_MASK    0x2000
 #define    RTL8367C_REPORT_FORWARD_OFFSET    12
 #define    RTL8367C_REPORT_FORWARD_MASK    0x1000
-#define    RTL8367C_ROBURSTNESS_VAR_OFFSET    9
-#define    RTL8367C_ROBURSTNESS_VAR_MASK    0xE00
+#define    RTL8367C_ROBUSTNESS_VAR_OFFSET    9
+#define    RTL8367C_ROBUSTNESS_VAR_MASK    0xE00
 #define    RTL8367C_LEAVE_SUPPRESSION_OFFSET    8
 #define    RTL8367C_LEAVE_SUPPRESSION_MASK    0x100
 #define    RTL8367C_REPORT_SUPPRESSION_OFFSET    7
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c
index 4b01a11617..ec9c332e16 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c
@@ -259,9 +259,9 @@ ret_t rtl8367c_getAsicCputagPriorityRemapping(rtk_uint32 srcPri, rtk_uint32 *pNe
  * Note:
  *     None
  */
-ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 postion)
+ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 position)
 {
-    return rtl8367c_setAsicRegBit(RTL8367C_REG_CPU_CTRL, RTL8367C_CPU_TAG_POSITION_OFFSET, postion);
+    return rtl8367c_setAsicRegBit(RTL8367C_REG_CPU_CTRL, RTL8367C_CPU_TAG_POSITION_OFFSET, position);
 }
 /* Function Name:
  *      rtl8367c_getAsicCputagPosition
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c
index 050f4bbc57..c915d2d618 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c
@@ -429,8 +429,8 @@ ret_t rtl8367c_setAsicIGMPRobVar(rtk_uint32 rob_var)
     if(rob_var > RTL8367C_MAX_ROB_VAR)
         return RT_ERR_OUT_OF_RANGE;
 
-    retVal = rtl8367c_setAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, rob_var);
     /* Robustness variable */
+    retVal = rtl8367c_setAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBUSTNESS_VAR_MASK, rob_var);
     if(retVal != RT_ERR_OK)
         return retVal;
 
@@ -456,8 +456,8 @@ ret_t rtl8367c_getAsicIGMPRobVar(rtk_uint32 *prob_var)
     ret_t   retVal;
     rtk_uint32  value;
 
-    retVal = rtl8367c_getAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, &value);
     /* Robustness variable */
+    retVal = rtl8367c_getAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBUSTNESS_VAR_MASK, &value);
     if(retVal != RT_ERR_OK)
         return retVal;
 



From lede-commits at lists.infradead.org  Fri Apr 12 05:46:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 08:46:34 -0400
Subject: [openwrt/openwrt]  mediatek: mt7622: rtl8367c: source comment fixes
In-Reply-To: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
References: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
Message-ID: <mailman.26513.1712926002.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/afad4e8ab68093544d9e5f2d09104251bf6c7686

commit afad4e8ab68093544d9e5f2d09104251bf6c7686
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Wed Apr 3 17:23:16 2024 +0200

    mediatek: mt7622: rtl8367c: source comment fixes
    
    Fix also some Chinese -> UTF8 encoding problems
    
    Improves indexing and searches
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 .../files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c    | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c
index 78e80a0b20..fae046639d 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_port.c
@@ -951,7 +951,7 @@ rtk_uint8 Sgmii_Init[SGMII_INIT_SIZE] = {
  *      Set UNDA behavior
  * Input:
  *      port        - port ID
- *      behavior    - 0: flooding to unknwon DA portmask; 1: drop; 2:trap; 3: flooding
+ *      behavior    - 0: flooding to unknown DA portmask; 1: drop; 2:trap; 3: flooding
  * Output:
  *      None
  * Return:
@@ -981,7 +981,7 @@ ret_t rtl8367c_setAsicPortUnknownDaBehavior(rtk_uint32 port, rtk_uint32 behavior
  * Input:
  *      port        - port ID
  * Output:
- *      pBehavior   - 0: flooding to unknwon DA portmask; 1: drop; 2:trap; 3: flooding
+ *      pBehavior   - 0: flooding to unknown DA portmask; 1: drop; 2:trap; 3: flooding
  * Return:
  *      RT_ERR_OK   - Success
  *      RT_ERR_SMI  - SMI access error
@@ -3724,7 +3724,7 @@ ret_t rtl8367c_setAsicPortExtMode(rtk_uint32 id, rtk_uint32 mode)
                     return retVal;
                 /*
                 1: MAC link = SGMII SerDes link
-                0: MAC link = SGMII config link ??cfg_sgmii_link??
+                0: MAC link = SGMII config link (cfg_sgmii_link)
                 */
                 if ((retVal = rtl8367c_setAsicRegBit(0x1d95, 2, 0)) != RT_ERR_OK)
                     return retVal;
@@ -4032,7 +4032,7 @@ ret_t rtl8367c_setAsicPortExtMode(rtk_uint32 id, rtk_uint32 mode)
                 if ((retVal = rtl8367c_setAsicRegBits(0x1d95, 0x1f00, 0x2)) != RT_ERR_OK)
                     return retVal;
 
-                /*select MAC link source when port6/7 be set sgmii mode ??cfg_sgmii_link??*/
+                /*select MAC link source when port6/7 be set sgmii mode (cfg_sgmii_link)*/
                 if ((retVal = rtl8367c_setAsicRegBit(0x1d95, 2, 0)) != RT_ERR_OK)
                     return retVal;
             }



From lede-commits at lists.infradead.org  Fri Apr 12 05:46:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 08:46:33 -0400
Subject: [openwrt/openwrt]  mediatek: mt7622: rtl8367c: source comment fixes
In-Reply-To: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
References: <171292599349.3572362.6867071248955636574@git-01.infra.openwrt.org>
Message-ID: <mailman.26514.1712926007.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a2b94afc0df04d82b653509fd88815437fc236ca

commit a2b94afc0df04d82b653509fd88815437fc236ca
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Wed Apr 3 16:10:55 2024 +0200

    mediatek: mt7622: rtl8367c: source comment fixes
    
    Improves indexing and searches
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 .../files/drivers/net/phy/rtk/rtl8367c/acl.c       | 30 ++++++-------
 .../files/drivers/net/phy/rtk/rtl8367c/cpu.c       |  4 +-
 .../files/drivers/net/phy/rtk/rtl8367c/igmp.c      | 10 ++---
 .../drivers/net/phy/rtk/rtl8367c/include/acl.h     | 32 +++++++-------
 .../drivers/net/phy/rtk/rtl8367c/include/cpu.h     |  6 +--
 .../drivers/net/phy/rtk/rtl8367c/include/dot1x.h   |  2 +-
 .../drivers/net/phy/rtk/rtl8367c/include/eee.h     |  2 +-
 .../drivers/net/phy/rtk/rtl8367c/include/i2c.h     |  2 +-
 .../drivers/net/phy/rtk/rtl8367c/include/igmp.h    | 12 +++---
 .../net/phy/rtk/rtl8367c/include/interrupt.h       |  2 +-
 .../drivers/net/phy/rtk/rtl8367c/include/l2.h      | 50 +++++++++++-----------
 .../drivers/net/phy/rtk/rtl8367c/include/leaky.h   |  2 +-
 .../drivers/net/phy/rtk/rtl8367c/include/led.h     | 20 ++++-----
 .../drivers/net/phy/rtk/rtl8367c/include/mirror.h  |  8 ++--
 .../drivers/net/phy/rtk/rtl8367c/include/port.h    | 34 +++++++--------
 .../drivers/net/phy/rtk/rtl8367c/include/ptp.h     |  4 +-
 .../drivers/net/phy/rtk/rtl8367c/include/qos.h     |  8 ++--
 .../drivers/net/phy/rtk/rtl8367c/include/rate.h    |  2 +-
 .../net/phy/rtk/rtl8367c/include/rtk_error.h       |  8 ++--
 .../net/phy/rtk/rtl8367c/include/rtk_switch.h      |  8 ++--
 .../net/phy/rtk/rtl8367c/include/rtk_types.h       |  4 +-
 .../rtk/rtl8367c/include/rtl8367c_asicdrv_green.h  |  2 +-
 .../rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h    |  2 +-
 .../include/rtl8367c_asicdrv_unknownMulticast.h    |  2 +-
 .../net/phy/rtk/rtl8367c/include/rtl8367c_base.h   |  2 +-
 .../files/drivers/net/phy/rtk/rtl8367c/l2.c        | 48 ++++++++++-----------
 .../files/drivers/net/phy/rtk/rtl8367c/led.c       | 16 +++----
 .../files/drivers/net/phy/rtk/rtl8367c/mirror.c    |  4 +-
 .../files/drivers/net/phy/rtk/rtl8367c/port.c      | 38 ++++++++--------
 .../files/drivers/net/phy/rtk/rtl8367c/ptp.c       |  2 +-
 .../files/drivers/net/phy/rtk/rtl8367c/qos.c       |  8 ++--
 .../files/drivers/net/phy/rtk/rtl8367c/rldp.c      |  2 +-
 .../drivers/net/phy/rtk/rtl8367c/rtk_switch.c      | 10 ++---
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c    | 34 +++++++--------
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c | 22 +++++-----
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c    | 18 ++++----
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c     |  4 +-
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c  | 16 +++----
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c    |  2 +-
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c   | 16 +++----
 .../phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c   |  4 +-
 .../phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c  |  4 +-
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c    |  2 +-
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c    | 40 ++++++++---------
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c    | 18 ++++----
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c    |  2 +-
 .../phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c |  8 ++--
 .../net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c  | 16 +++----
 .../rtl8367c/rtl8367c_asicdrv_unknownMulticast.c   |  2 +-
 .../files/drivers/net/phy/rtk/rtl8367c/smi.c       |  4 +-
 .../files/drivers/net/phy/rtk/rtl8367c/stat.c      |  4 +-
 .../files/drivers/net/phy/rtk/rtl8367c/storm.c     | 24 +++++------
 .../files/drivers/net/phy/rtk/rtl8367c/svlan.c     | 40 ++++++++---------
 .../files/drivers/net/phy/rtk/rtl8367c/vlan.c      |  6 +--
 .../files/drivers/net/phy/rtk/rtl8367s_mdio.c      |  4 +-
 55 files changed, 338 insertions(+), 338 deletions(-)

diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/acl.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/acl.c
index 75e5a5e740..85c12b000f 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/acl.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/acl.c
@@ -144,7 +144,7 @@ static rtk_api_ret_t _rtk_filter_igrAcl_writeDataField(rtl8367c_aclrule *aclRule
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_NULL_POINTER - Pointer pFilter_field or pFilter_cfg point to NULL.
  * Note:
- *      This function enable and intialize ACL function
+ *      This function enable and initialize ACL function
  */
 rtk_api_ret_t rtk_filter_igrAcl_init(void)
 {
@@ -204,7 +204,7 @@ rtk_api_ret_t rtk_filter_igrAcl_init(void)
  *      This function add a comparison rule (*pFilter_field) to an ACL configuration (*pFilter_cfg).
  *      Pointer pFilter_cfg points to an ACL configuration structure, this structure keeps multiple ACL
  *      comparison rules by means of linked list. Pointer pFilter_field will be added to linked
- *      list keeped by structure that pFilter_cfg points to.
+ *      list kept by structure that pFilter_cfg points to.
  */
 rtk_api_ret_t rtk_filter_igrAcl_field_add(rtk_filter_cfg_t* pFilter_cfg, rtk_filter_field_t* pFilter_field)
 {
@@ -348,7 +348,7 @@ static rtk_api_ret_t _rtk_filter_igrAcl_writeDataField(rtl8367c_aclrule *aclRule
             }
             else
             {
-                /*default acl template for ipv6 address supports MSB 32-bits and LSB 32-bits only*/
+                /*default ACL template for ipv6 address supports MSB 32-bits and LSB 32-bits only*/
                 aclRule[tempIdx].data_bits.field[fieldIdx] = ((ip6addr[3] & (0xFFFF << ((i&1) * 16))) >> ((i&1) * 16));
                 aclRule[tempIdx].care_bits.field[fieldIdx] = ((ip6mask[3] & (0xFFFF << ((i&1) * 16))) >> ((i&1) * 16));
             }
@@ -557,7 +557,7 @@ static rtk_api_ret_t _rtk_filter_igrAcl_writeDataField(rtl8367c_aclrule *aclRule
  *      pFilter_cfg     - The ACL configuration that this function will add comparison rule
  *      pFilter_action  - Action(s) of ACL configuration.
  * Output:
- *      ruleNum - number of rules written in acl table
+ *      ruleNum - number of rules written in ACL table
  * Return:
  *      RT_ERR_OK                               - OK
  *      RT_ERR_FAILED                           - Failed
@@ -1140,12 +1140,12 @@ rtk_api_ret_t rtk_filter_igrAcl_cfg_delAll(void)
 /* Function Name:
  *      rtk_filter_igrAcl_cfg_get
  * Description:
- *      Get one ingress acl configuration from ASIC.
+ *      Get one ingress ACL configuration from ASIC.
  * Input:
  *      filter_id       - Start index of ACL configuration.
  * Output:
- *      pFilter_cfg     - buffer pointer of ingress acl data
- *      pFilter_action  - buffer pointer of ingress acl action
+ *      pFilter_cfg     - buffer pointer of ingress ACL data
+ *      pFilter_action  - buffer pointer of ingress ACL action
  * Return:
  *      RT_ERR_OK               - OK
  *      RT_ERR_FAILED           - Failed
@@ -1462,7 +1462,7 @@ rtk_api_ret_t rtk_filter_igrAcl_cfg_get(rtk_filter_id_t filter_id, rtk_filter_cf
  *      RT_ERR_PORT_ID      - Invalid port id.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This function sets action of packets when no ACL configruation matches.
+ *      This function sets action of packets when no ACL configuration matches.
  */
 rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_set(rtk_port_t port, rtk_filter_unmatch_action_t action)
 {
@@ -1535,7 +1535,7 @@ rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_get(rtk_port_t port, rtk_filter_un
  *      RT_ERR_PORT_ID      - Invalid port id.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This function gets action of packets when no ACL configruation matches.
+ *      This function gets action of packets when no ACL configuration matches.
  */
 rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_state_t state)
 {
@@ -1571,7 +1571,7 @@ rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_state_t st
  *      RT_ERR_PORT_ID      - Invalid port id.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This function gets action of packets when no ACL configruation matches.
+ *      This function gets action of packets when no ACL configuration matches.
  */
 rtk_api_ret_t rtk_filter_igrAcl_state_get(rtk_port_t port, rtk_filter_state_t* pState)
 {
@@ -1699,7 +1699,7 @@ rtk_api_ret_t rtk_filter_igrAcl_template_get(rtk_filter_template_t *aclTemplate)
  *      RT_ERR_FAILED          - Failed
  *      RT_ERR_SMI             - SMI access error
  * Note:
- *      System support 16 user defined field selctors.
+ *      System support 16 user defined field selectors.
  *      Each selector can be enabled or disable.
  *      User can defined retrieving 16-bits in many predefiend
  *      standard l2/l3/l4 payload.
@@ -1928,7 +1928,7 @@ rtk_api_ret_t rtk_filter_vidrange_get(rtk_uint32 index, rtk_filter_vidrange_t *p
  *      Set Port Range check
  * Input:
  *      index       - index of Port Range 0-15
- *      type        - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port
+ *      type        - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port
  *      upperPort   - The upper bound of Port range
  *      lowerPort   - The lower Bound of Port range
  * Output:
@@ -1977,7 +1977,7 @@ rtk_api_ret_t rtk_filter_portrange_set(rtk_uint32 index, rtk_filter_portrange_t
  * Input:
  *      index       - index of Port Range 0-15
  * Output:
- *      pType       - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port
+ *      pType       - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port
  *      pUpperPort  - The upper bound of Port range
  *      pLowerPort  - The lower Bound of Port range
  * Return:
@@ -2011,7 +2011,7 @@ rtk_api_ret_t rtk_filter_portrange_get(rtk_uint32 index, rtk_filter_portrange_t
 /* Function Name:
  *      rtk_filter_igrAclPolarity_set
  * Description:
- *      Set ACL Goip control palarity
+ *      Set ACL Goip control polarity
  * Input:
  *      polarity - 1: High, 0: Low
  * Output:
@@ -2034,7 +2034,7 @@ rtk_api_ret_t rtk_filter_igrAclPolarity_set(rtk_uint32 polarity)
 /* Function Name:
  *      rtk_filter_igrAclPolarity_get
  * Description:
- *      Get ACL Goip control palarity
+ *      Get ACL Goip control polarity
  * Input:
  *      pPolarity - 1: High, 0: Low
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/cpu.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/cpu.c
index d1cd95b37a..b031cbe920 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/cpu.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/cpu.c
@@ -113,7 +113,7 @@ rtk_api_ret_t rtk_cpu_enable_get(rtk_enable_t *pEnable)
  * Note:
  *      The API can set CPU port and inserting proprietary CPU tag mode (Length/Type 0x8899)
  *      to the frame that transmitting to CPU port.
- *      The inset cpu tag mode is as following:
+ *      The insert CPU tag mode is as following:
  *      - CPU_INSERT_TO_ALL
  *      - CPU_INSERT_TO_TRAPPING
  *      - CPU_INSERT_TO_NONE
@@ -160,7 +160,7 @@ rtk_api_ret_t rtk_cpu_tagPort_set(rtk_port_t port, rtk_cpu_insert_t mode)
  *      RT_ERR_L2_NO_CPU_PORT   - CPU port is not exist
  * Note:
  *      The API can get configured CPU port and its setting.
- *      The inset cpu tag mode is as following:
+ *      The insert CPU tag mode is as following:
  *      - CPU_INSERT_TO_ALL
  *      - CPU_INSERT_TO_TRAPPING
  *      - CPU_INSERT_TO_NONE
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/igmp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/igmp.c
index 170cbdaaf0..18e145a21c 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/igmp.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/igmp.c
@@ -233,7 +233,7 @@ rtk_api_ret_t rtk_igmp_static_router_port_get(rtk_portmask_t *pPortmask)
  * Input:
  *      port        - Port ID
  *      protocol    - IGMP/MLD protocol
- *      action      - Per-port and per-protocol IGMP action seeting
+ *      action      - Per-port and per-protocol IGMP action setting
  * Output:
  *      None.
  * Return:
@@ -321,7 +321,7 @@ rtk_api_ret_t rtk_igmp_protocol_set(rtk_port_t port, rtk_igmp_protocol_t protoco
  * Input:
  *      port        - Port ID
  *      protocol    - IGMP/MLD protocol
- *      action      - Per-port and per-protocol IGMP action seeting
+ *      action      - Per-port and per-protocol IGMP action setting
  * Output:
  *      None.
  * Return:
@@ -1217,7 +1217,7 @@ rtk_api_ret_t rtk_igmp_portRxPktEnable_get(rtk_port_t port, rtk_igmp_rxPktEnable
  * Description:
  *      Get IGMP/MLD Group database
  * Input:
- *      indes       - Index (0~255)
+ *      index       - Index (0~255)
  * Output:
  *      pGroup      - Group database information.
  * Return:
@@ -1418,7 +1418,7 @@ rtk_api_ret_t rtk_igmp_ReportLeaveFwdAction_get(rtk_igmp_ReportLeaveFwdAct_t *pA
 /* Function Name:
  *      rtk_igmp_dropLeaveZeroEnable_set
  * Description:
- *      Set the function of droppping Leave packet with group IP = 0.0.0.0
+ *      Set the function of dropping Leave packet with group IP = 0.0.0.0
  * Input:
  *      enabled      - Action 1: drop, 0:pass
  * Output:
@@ -1451,7 +1451,7 @@ rtk_api_ret_t rtk_igmp_dropLeaveZeroEnable_set(rtk_enable_t enabled)
 /* Function Name:
  *      rtk_igmp_dropLeaveZeroEnable_get
  * Description:
- *      Get the function of droppping Leave packet with group IP = 0.0.0.0
+ *      Get the function of dropping Leave packet with group IP = 0.0.0.0
  * Input:
  *      None
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/acl.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/acl.h
index 6308da8d42..634e7325d6 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/acl.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/acl.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes ACL module high-layer API defination
+ * Feature : The file includes ACL module high-layer API definition
  *
  */
 
@@ -566,7 +566,7 @@ typedef enum rtk_filter_portrange_e
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_NULL_POINTER - Pointer pFilter_field or pFilter_cfg point to NULL.
  * Note:
- *      This function enable and intialize ACL function
+ *      This function enable and initialize ACL function
  */
 extern rtk_api_ret_t rtk_filter_igrAcl_init(void);
 
@@ -589,7 +589,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_init(void);
  *      This function add a comparison rule (*pFilter_field) to an ACL configuration (*pFilter_cfg).
  *      Pointer pFilter_cfg points to an ACL configuration structure, this structure keeps multiple ACL
  *      comparison rules by means of linked list. Pointer pFilter_field will be added to linked
- *      list keeped by structure that pFilter_cfg points to.
+ *      list kept by structure that pFilter_cfg points to.
  */
 extern rtk_api_ret_t rtk_filter_igrAcl_field_add(rtk_filter_cfg_t *pFilter_cfg, rtk_filter_field_t *pFilter_field);
 
@@ -602,7 +602,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_field_add(rtk_filter_cfg_t *pFilter_cfg,
  *      pFilter_cfg     - The ACL configuration that this function will add comparison rule
  *      pFilter_action  - Action(s) of ACL configuration.
  * Output:
- *      ruleNum - number of rules written in acl table
+ *      ruleNum - number of rules written in ACL table
  * Return:
  *      RT_ERR_OK                               - OK
  *      RT_ERR_FAILED                           - Failed
@@ -657,12 +657,12 @@ extern rtk_api_ret_t rtk_filter_igrAcl_cfg_delAll(void);
 /* Function Name:
  *      rtk_filter_igrAcl_cfg_get
  * Description:
- *      Get one ingress acl configuration from ASIC.
+ *      Get one ingress ACL configuration from ASIC.
  * Input:
  *      filter_id       - Start index of ACL configuration.
  * Output:
- *      pFilter_cfg     - buffer pointer of ingress acl data
- *      pFilter_action  - buffer pointer of ingress acl action
+ *      pFilter_cfg     - buffer pointer of ingress ACL data
+ *      pFilter_action  - buffer pointer of ingress ACL action
  * Return:
  *      RT_ERR_OK               - OK
  *      RT_ERR_FAILED           - Failed
@@ -690,7 +690,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_cfg_get(rtk_filter_id_t filter_id, rtk_fi
  *      RT_ERR_PORT_ID      - Invalid port id.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This function sets action of packets when no ACL configruation matches.
+ *      This function sets action of packets when no ACL configuration matches.
  */
 extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_set(rtk_port_t port, rtk_filter_unmatch_action_t action);
 
@@ -709,7 +709,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_set(rtk_port_t port, rtk_fi
  *      RT_ERR_PORT_ID      - Invalid port id.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This function gets action of packets when no ACL configruation matches.
+ *      This function gets action of packets when no ACL configuration matches.
  */
 extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_get(rtk_port_t port, rtk_filter_unmatch_action_t* action);
 
@@ -729,7 +729,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_unmatchAction_get(rtk_port_t port, rtk_fi
  *      RT_ERR_PORT_ID      - Invalid port id.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This function gets action of packets when no ACL configruation matches.
+ *      This function gets action of packets when no ACL configuration matches.
  */
 extern rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_state_t state);
 
@@ -748,7 +748,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_state_set(rtk_port_t port, rtk_filter_sta
  *      RT_ERR_PORT_ID      - Invalid port id.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This function gets action of packets when no ACL configruation matches.
+ *      This function gets action of packets when no ACL configuration matches.
  */
 extern rtk_api_ret_t rtk_filter_igrAcl_state_get(rtk_port_t port, rtk_filter_state_t* state);
 
@@ -802,7 +802,7 @@ extern rtk_api_ret_t rtk_filter_igrAcl_template_get(rtk_filter_template_t *aclTe
  *      RT_ERR_FAILED          - Failed
  *      RT_ERR_SMI             - SMI access error
  * Note:
- *      System support 16 user defined field selctors.
+ *      System support 16 user defined field selectors.
  *      Each selector can be enabled or disable.
  *      User can defined retrieving 16-bits in many predefiend
  *      standard l2/l3/l4 payload.
@@ -917,7 +917,7 @@ extern rtk_api_ret_t rtk_filter_vidrange_get(rtk_uint32 index, rtk_filter_vidran
  *      Set Port Range check
  * Input:
  *      index       - index of Port Range 0-15
- *      type        - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port
+ *      type        - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port
  *      upperPort   - The upper bound of Port range
  *      lowerPort   - The lower Bound of Port range
  * Output:
@@ -940,7 +940,7 @@ extern rtk_api_ret_t rtk_filter_portrange_set(rtk_uint32 index, rtk_filter_portr
  * Input:
  *      index       - index of Port Range 0-15
  * Output:
- *      pType       - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destnation Port
+ *      pType       - IP Range check type, 0:Delete a entry, 1: Source Port, 2: Destination Port
  *      pUpperPort  - The upper bound of Port range
  *      pLowerPort  - The lower Bound of Port range
  * Return:
@@ -957,7 +957,7 @@ extern rtk_api_ret_t rtk_filter_portrange_get(rtk_uint32 index, rtk_filter_portr
 /* Function Name:
  *      rtk_filter_igrAclPolarity_set
  * Description:
- *      Set ACL Goip control palarity
+ *      Set ACL Goip control polarity
  * Input:
  *      polarity - 1: High, 0: Low
  * Output:
@@ -973,7 +973,7 @@ extern rtk_api_ret_t rtk_filter_igrAclPolarity_set(rtk_uint32 polarity);
 /* Function Name:
  *      rtk_filter_igrAclPolarity_get
  * Description:
- *      Get ACL Goip control palarity
+ *      Get ACL Goip control polarity
  * Input:
  *      pPolarity - 1: High, 0: Low
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/cpu.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/cpu.h
index 5544aca7b2..67aa1e3d88 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/cpu.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/cpu.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes CPU module high-layer API defination
+ * Feature : The file includes CPU module high-layer API definition
  *
  */
 
@@ -107,7 +107,7 @@ extern rtk_api_ret_t rtk_cpu_enable_get(rtk_enable_t *pEnable);
  * Note:
  *      The API can set CPU port and inserting proprietary CPU tag mode (Length/Type 0x8899)
  *      to the frame that transmitting to CPU port.
- *      The inset cpu tag mode is as following:
+ *      The insert CPU tag mode is as following:
  *      - CPU_INSERT_TO_ALL
  *      - CPU_INSERT_TO_TRAPPING
  *      - CPU_INSERT_TO_NONE
@@ -131,7 +131,7 @@ extern rtk_api_ret_t rtk_cpu_tagPort_set(rtk_port_t port, rtk_cpu_insert_t mode)
  *      RT_ERR_L2_NO_CPU_PORT   - CPU port is not exist
  * Note:
  *      The API can get configured CPU port and its setting.
- *      The inset cpu tag mode is as following:
+ *      The insert CPU tag mode is as following:
  *      - CPU_INSERT_TO_ALL
  *      - CPU_INSERT_TO_TRAPPING
  *      - CPU_INSERT_TO_NONE
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/dot1x.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/dot1x.h
index ef0a05a04b..082ee2569e 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/dot1x.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/dot1x.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes 1X module high-layer API defination
+ * Feature : The file includes 1X module high-layer API definition
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/eee.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/eee.h
index b670998c8c..e3920363d1 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/eee.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/eee.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes EEE module high-layer API defination
+ * Feature : The file includes EEE module high-layer API definition
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/i2c.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/i2c.h
index 2c7f0756ae..110f41e818 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/i2c.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/i2c.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes I2C module high-layer API defination
+ * Feature : The file includes I2C module high-layer API definition
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/igmp.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/igmp.h
index f088b0ccdd..b36db43d83 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/igmp.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/igmp.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes IGMP module high-layer API defination
+ * Feature : The file includes IGMP module high-layer API definition
  *
  */
 
@@ -205,7 +205,7 @@ extern rtk_api_ret_t rtk_igmp_static_router_port_get(rtk_portmask_t *pPortmask);
  * Input:
  *      port        - Port ID
  *      protocol    - IGMP/MLD protocol
- *      action      - Per-port and per-protocol IGMP action seeting
+ *      action      - Per-port and per-protocol IGMP action setting
  * Output:
  *      None.
  * Return:
@@ -225,7 +225,7 @@ extern rtk_api_ret_t rtk_igmp_protocol_set(rtk_port_t port, rtk_igmp_protocol_t
  * Input:
  *      port        - Port ID
  *      protocol    - IGMP/MLD protocol
- *      action      - Per-port and per-protocol IGMP action seeting
+ *      action      - Per-port and per-protocol IGMP action setting
  * Output:
  *      None.
  * Return:
@@ -640,7 +640,7 @@ extern rtk_api_ret_t rtk_igmp_portRxPktEnable_get(rtk_port_t port, rtk_igmp_rxPk
  * Description:
  *      Get IGMP/MLD Group database
  * Input:
- *      indes       - Index (0~255)
+ *      index       - Index (0~255)
  * Output:
  *      pGroup      - Group database information.
  * Return:
@@ -694,7 +694,7 @@ extern rtk_api_ret_t rtk_igmp_ReportLeaveFwdAction_get(rtk_igmp_ReportLeaveFwdAc
 /* Function Name:
  *      rtk_igmp_dropLeaveZeroEnable_set
  * Description:
- *      Set the function of droppping Leave packet with group IP = 0.0.0.0
+ *      Set the function of dropping Leave packet with group IP = 0.0.0.0
  * Input:
  *      enabled      - Action 1: drop, 0:pass
  * Output:
@@ -712,7 +712,7 @@ extern rtk_api_ret_t rtk_igmp_dropLeaveZeroEnable_set(rtk_enable_t enabled);
 /* Function Name:
  *      rtk_igmp_dropLeaveZeroEnable_get
  * Description:
- *      Get the function of droppping Leave packet with group IP = 0.0.0.0
+ *      Get the function of dropping Leave packet with group IP = 0.0.0.0
  * Input:
  *      None
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/interrupt.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/interrupt.h
index f2689ebc70..20625fff52 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/interrupt.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/interrupt.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes Interrupt module high-layer API defination
+ * Feature : The file includes Interrupt module high-layer API definition
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/l2.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/l2.h
index e0ccdbe3d7..ec5aad2e30 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/l2.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/l2.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes L2 module high-layer API defination
+ * Feature : The file includes L2 module high-layer API definition
  *
  */
 
@@ -209,7 +209,7 @@ extern rtk_api_ret_t rtk_l2_init(void);
  *      RT_ERR_L2_INDEXTBL_FULL - hashed index is full of entries.
  *      RT_ERR_INPUT            - Invalid input parameters.
  * Note:
- *      If the unicast mac address already existed in LUT, it will udpate the status of the entry.
+ *      If the unicast mac address already existed in LUT, it will update the status of the entry.
  *      Otherwise, it will find an empty or asic auto learned entry to write. If all the entries
  *      with the same hash value can't be replaced, ASIC will return a RT_ERR_L2_INDEXTBL_FULL error.
  */
@@ -307,7 +307,7 @@ extern rtk_api_ret_t rtk_l2_addr_del(rtk_mac_t *pMac, rtk_l2_ucastAddr_t *pL2_da
  *      RT_ERR_PORT_MASK        - Invalid portmask.
  *      RT_ERR_INPUT            - Invalid input parameters.
  * Note:
- *      If the multicast mac address already existed in the LUT, it will udpate the
+ *      If the multicast mac address already existed in the LUT, it will update the
  *      port mask of the entry. Otherwise, it will find an empty or asic auto learned
  *      entry to write. If all the entries with the same hash value can't be replaced,
  *      ASIC will return a RT_ERR_L2_INDEXTBL_FULL error.
@@ -383,7 +383,7 @@ extern rtk_api_ret_t rtk_l2_mcastAddr_del(rtk_l2_mcastAddr_t *pMcastAddr);
 /* Function Name:
  *      rtk_l2_ipMcastAddr_add
  * Description:
- *      Add Lut IP multicast entry
+ *      Add LUT IP multicast entry
  * Input:
  *      pIpMcastAddr    - IP Multicast entry
  * Output:
@@ -418,7 +418,7 @@ extern rtk_api_ret_t rtk_l2_ipMcastAddr_add(rtk_l2_ipMcastAddr_t *pIpMcastAddr);
  *      RT_ERR_L2_ENTRY_NOTFOUND    - No such LUT entry.
  *      RT_ERR_INPUT                - Invalid input parameters.
  * Note:
- *      The API can get Lut table of IP multicast entry.
+ *      The API can get LUT table of IP multicast entry.
  */
 extern rtk_api_ret_t rtk_l2_ipMcastAddr_get(rtk_l2_ipMcastAddr_t *pIpMcastAddr);
 
@@ -465,7 +465,7 @@ extern rtk_api_ret_t rtk_l2_ipMcastAddr_del(rtk_l2_ipMcastAddr_t *pIpMcastAddr);
 /* Function Name:
  *      rtk_l2_ipVidMcastAddr_add
  * Description:
- *      Add Lut IP multicast+VID entry
+ *      Add LUT IP multicast+VID entry
  * Input:
  *      pIpVidMcastAddr - IP & VID multicast Entry
  * Output:
@@ -913,7 +913,7 @@ extern rtk_api_ret_t rtk_l2_learningCnt_get(rtk_port_t port, rtk_mac_cnt_t *pMac
  *      Set flooding portmask
  * Input:
  *      type - flooding type.
- *      pFlood_portmask - flooding porkmask
+ *      pFlood_portmask - flooding portmask
  * Output:
  *      None
  * Return:
@@ -938,7 +938,7 @@ extern rtk_api_ret_t rtk_l2_floodPortMask_set(rtk_l2_flood_type_t floood_type, r
  * Input:
  *      type - flooding type.
  * Output:
- *      pFlood_portmask - flooding porkmask
+ *      pFlood_portmask - flooding portmask
  * Return:
  *      RT_ERR_OK           - OK
  *      RT_ERR_FAILED       - Failed
@@ -956,10 +956,10 @@ extern rtk_api_ret_t rtk_l2_floodPortMask_get(rtk_l2_flood_type_t floood_type, r
 /* Function Name:
  *      rtk_l2_localPktPermit_set
  * Description:
- *      Set permittion of frames if source port and destination port are the same.
+ *      Set permission of frames if source port and destination port are the same.
  * Input:
  *      port - Port id.
- *      permit - permittion status
+ *      permit - permission status
  * Output:
  *      None
  * Return:
@@ -969,34 +969,34 @@ extern rtk_api_ret_t rtk_l2_floodPortMask_get(rtk_l2_flood_type_t floood_type, r
  *      RT_ERR_PORT_ID      - Invalid port number.
  *      RT_ERR_ENABLE       - Invalid permit value.
  * Note:
- *      This API is setted to permit frame if its source port is equal to destination port.
+ *      This API is set to permit frame if its source port is equal to destination port.
  */
 extern rtk_api_ret_t rtk_l2_localPktPermit_set(rtk_port_t port, rtk_enable_t permit);
 
 /* Function Name:
  *      rtk_l2_localPktPermit_get
  * Description:
- *      Get permittion of frames if source port and destination port are the same.
+ *      Get permission of frames if source port and destination port are the same.
  * Input:
  *      port - Port id.
  * Output:
- *      pPermit - permittion status
+ *      pPermit - permission status
  * Return:
  *      RT_ERR_OK           - OK
  *      RT_ERR_FAILED       - Failed
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_PORT_ID      - Invalid port number.
  * Note:
- *      This API is to get permittion status for frames if its source port is equal to destination port.
+ *      This API is to get permission status for frames if its source port is equal to destination port.
  */
 extern rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit);
 
 /* Function Name:
  *      rtk_l2_aging_set
  * Description:
- *      Set LUT agging out speed
+ *      Set LUT ageing out speed
  * Input:
- *      aging_time - Agging out time.
+ *      aging_time - Ageing out time.
  * Output:
  *      None
  * Return:
@@ -1005,14 +1005,14 @@ extern rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pP
  *      RT_ERR_SMI              - SMI access error
  *      RT_ERR_OUT_OF_RANGE     - input out of range.
  * Note:
- *      The API can set LUT agging out period for each entry and the range is from 14s to 800s.
+ *      The API can set LUT ageing out period for each entry and the range is from 14s to 800s.
  */
 extern rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time);
 
 /* Function Name:
  *      rtk_l2_aging_get
  * Description:
- *      Get LUT agging out time
+ *      Get LUT ageing out time
  * Input:
  *      None
  * Output:
@@ -1023,14 +1023,14 @@ extern rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time);
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_PORT_ID      - Invalid port number.
  * Note:
- *      The API can get LUT agging out period for each entry.
+ *      The API can get LUT ageing out period for each entry.
  */
 extern rtk_api_ret_t rtk_l2_aging_get(rtk_l2_age_time_t *pAging_time);
 
 /* Function Name:
  *      rtk_l2_ipMcastAddrLookup_set
  * Description:
- *      Set Lut IP multicast lookup function
+ *      Set LUT IP multicast lookup function
  * Input:
  *      type - Lookup type for IPMC packet.
  * Output:
@@ -1051,7 +1051,7 @@ extern rtk_api_ret_t rtk_l2_ipMcastAddrLookup_set(rtk_l2_ipmc_lookup_type_t type
 /* Function Name:
  *      rtk_l2_ipMcastAddrLookup_get
  * Description:
- *      Get Lut IP multicast lookup function
+ *      Get LUT IP multicast lookup function
  * Input:
  *      None.
  * Output:
@@ -1068,9 +1068,9 @@ extern rtk_api_ret_t rtk_l2_ipMcastAddrLookup_get(rtk_l2_ipmc_lookup_type_t *pTy
 /* Function Name:
  *      rtk_l2_ipMcastForwardRouterPort_set
  * Description:
- *      Set IPMC packet forward to rounter port also or not
+ *      Set IPMC packet forward to router port also or not
  * Input:
- *      enabled - 1: Inlcude router port, 0, exclude router port
+ *      enabled - 1: Include router port, 0, exclude router port
  * Output:
  *      None.
  * Return:
@@ -1085,11 +1085,11 @@ extern rtk_api_ret_t rtk_l2_ipMcastForwardRouterPort_set(rtk_enable_t enabled);
 /* Function Name:
  *      rtk_l2_ipMcastForwardRouterPort_get
  * Description:
- *      Get IPMC packet forward to rounter port also or not
+ *      Get IPMC packet forward to router port also or not
  * Input:
  *      None.
  * Output:
- *      pEnabled    - 1: Inlcude router port, 0, exclude router port
+ *      pEnabled    - 1: Include router port, 0, exclude router port
  * Return:
  *      RT_ERR_OK           - OK
  *      RT_ERR_FAILED       - Failed
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/leaky.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/leaky.h
index 13ef60df83..e5b22e2878 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/leaky.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/leaky.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes Leaky module high-layer API defination
+ * Feature : The file includes Leaky module high-layer API definition
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/led.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/led.h
index 71acc7c92c..7706107ef4 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/led.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/led.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes LED module high-layer API defination
+ * Feature : The file includes LED module high-layer API definition
  *
  */
 
@@ -107,7 +107,7 @@ typedef enum rtk_led_serialOutput_e
 /* Function Name:
  *      rtk_led_enable_set
  * Description:
- *      Set Led enable congiuration
+ *      Set Led enable configuration
  * Input:
  *      group       - LED group id.
  *      pPortmask    - LED enable port mask.
@@ -126,7 +126,7 @@ extern rtk_api_ret_t rtk_led_enable_set(rtk_led_group_t group, rtk_portmask_t *p
 /* Function Name:
  *      rtk_led_enable_get
  * Description:
- *      Get Led enable congiuration
+ *      Get Led enable configuration
  * Input:
  *      group - LED group id.
  * Output:
@@ -188,7 +188,7 @@ extern rtk_api_ret_t rtk_led_operation_get(rtk_led_operation_t *pMode);
 /* Function Name:
  *      rtk_led_modeForce_set
  * Description:
- *      Set Led group to congiuration force mode
+ *      Set Led group to configuration force mode
  * Input:
  *      port    - port ID
  *      group   - Support LED group id.
@@ -214,7 +214,7 @@ extern rtk_api_ret_t rtk_led_modeForce_set(rtk_port_t port, rtk_led_group_t grou
 /* Function Name:
  *      rtk_led_modeForce_get
  * Description:
- *      Get Led group to congiuration force mode
+ *      Get Led group to configuration force mode
  * Input:
  *      port  - port ID
  *      group - Support LED group id.
@@ -276,7 +276,7 @@ extern rtk_api_ret_t rtk_led_blinkRate_get(rtk_led_blink_rate_t *pBlinkRate);
 /* Function Name:
  *      rtk_led_groupConfig_set
  * Description:
- *      Set per group Led to congiuration mode
+ *      Set per group Led to configuration mode
  * Input:
  *      group   - LED group.
  *      config  - LED configuration
@@ -312,7 +312,7 @@ extern rtk_api_ret_t rtk_led_groupConfig_set(rtk_led_group_t group, rtk_led_cong
 /* Function Name:
  *      rtk_led_groupConfig_get
  * Description:
- *      Get Led group congiuration mode
+ *      Get Led group configuration mode
  * Input:
  *      group - LED group.
  * Output:
@@ -370,7 +370,7 @@ extern rtk_api_ret_t rtk_led_groupAbility_get(rtk_led_group_t group, rtk_led_abi
 /* Function Name:
  *      rtk_led_serialMode_set
  * Description:
- *      Set Led serial mode active congiuration
+ *      Set Led serial mode active configuration
  * Input:
  *      active - LED group.
  * Output:
@@ -381,14 +381,14 @@ extern rtk_api_ret_t rtk_led_groupAbility_get(rtk_led_group_t group, rtk_led_abi
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      The API can set LED serial mode active congiuration.
+ *      The API can set LED serial mode active configuration.
  */
 extern rtk_api_ret_t rtk_led_serialMode_set(rtk_led_active_t active);
 
 /* Function Name:
  *      rtk_led_serialMode_get
  * Description:
- *      Get Led group congiuration mode
+ *      Get Led group configuration mode
  * Input:
  *      group - LED group.
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/mirror.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/mirror.h
index 1e984b7d80..8d179ce2df 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/mirror.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/mirror.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes Mirror module high-layer API defination
+ * Feature : The file includes Mirror module high-layer API definition
  *
  */
 
@@ -81,7 +81,7 @@ extern rtk_api_ret_t rtk_mirror_portBased_get(rtk_port_t* pMirroring_port, rtk_p
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_ENABLE       - Invalid enable input
  * Note:
- *      The API is to set mirror isolation function that prevent normal forwarding packets to miror port.
+ *      The API is to set mirror isolation function that prevent normal forwarding packets to mirror port.
  */
 extern rtk_api_ret_t rtk_mirror_portIso_set(rtk_enable_t enable);
 
@@ -118,7 +118,7 @@ extern rtk_api_ret_t rtk_mirror_portIso_get(rtk_enable_t *pEnable);
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_ENABLE       - Invalid enable input
  * Note:
- *      The API is to set mirror VLAN leaky function forwarding packets to miror port.
+ *      The API is to set mirror VLAN leaky function forwarding packets to mirror port.
  */
 extern rtk_api_ret_t rtk_mirror_vlanLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable);
 
@@ -157,7 +157,7 @@ extern rtk_api_ret_t rtk_mirror_vlanLeaky_get(rtk_enable_t *pTxenable, rtk_enabl
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_ENABLE       - Invalid enable input
  * Note:
- *      The API is to set mirror VLAN leaky function forwarding packets to miror port.
+ *      The API is to set mirror VLAN leaky function forwarding packets to mirror port.
  */
 extern rtk_api_ret_t rtk_mirror_isolationLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable);
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/port.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/port.h
index fcac1bcb84..458f16bf6d 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/port.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/port.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes port module high-layer API defination
+ * Feature : The file includes port module high-layer API definition
  *
  */
 
@@ -222,7 +222,7 @@ typedef struct rtk_rtctResult_s
 /* Function Name:
  *      rtk_port_phyAutoNegoAbility_set
  * Description:
- *      Set ethernet PHY auto-negotiation desired ability.
+ *      Set Ethernet PHY auto-negotiation desired ability.
  * Input:
  *      port        - port id.
  *      pAbility    - Ability structure
@@ -259,7 +259,7 @@ extern rtk_api_ret_t rtk_port_phyAutoNegoAbility_set(rtk_port_t port, rtk_port_p
  *      RT_ERR_INPUT            - Invalid input parameters.
  *      RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
  * Note:
- *      Get the capablity of specified PHY.
+ *      Get the capability of specified PHY.
  */
 extern rtk_api_ret_t rtk_port_phyAutoNegoAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility);
 
@@ -303,14 +303,14 @@ extern rtk_api_ret_t rtk_port_phyForceModeAbility_set(rtk_port_t port, rtk_port_
  *      RT_ERR_INPUT            - Invalid input parameters.
  *      RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
  * Note:
- *      Get the capablity of specified PHY.
+ *      Get the capability of specified PHY.
  */
 extern rtk_api_ret_t rtk_port_phyForceModeAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility);
 
 /* Function Name:
  *      rtk_port_phyStatus_get
  * Description:
- *      Get ethernet PHY linking status
+ *      Get Ethernet PHY linking status
  * Input:
  *      port - Port id.
  * Output:
@@ -459,7 +459,7 @@ extern rtk_api_ret_t rtk_port_macStatus_get(rtk_port_t port, rtk_port_mac_abilit
  *      For UTP port, This API will also enable the digital
  *      loopback bit in PHY register for sync of speed between
  *      PHY and MAC. For EXT port, users need to force the
- *      link state by themself.
+ *      link state by themselves.
  */
 extern rtk_api_ret_t rtk_port_macLocalLoopbackEnable_set(rtk_port_t port, rtk_enable_t enable);
 
@@ -527,7 +527,7 @@ extern rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg
 /* Function Name:
  *      rtk_port_backpressureEnable_set
  * Description:
- *      Set the half duplex backpressure enable status of the specific port.
+ *      Set the half duplex back-pressure enable status of the specific port.
  * Input:
  *      port    - port id.
  *      enable  - Back pressure status.
@@ -540,8 +540,8 @@ extern rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg
  *      RT_ERR_PORT_ID      - Invalid port number.
  *      RT_ERR_ENABLE       - Invalid enable input.
  * Note:
- *      This API can set the half duplex backpressure enable status of the specific port.
- *      The half duplex backpressure enable status of the port is as following:
+ *      This API can set the half duplex back-pressure enable status of the specific port.
+ *      The half duplex back-pressure enable status of the port is as following:
  *      - DISABLE
  *      - ENABLE
  */
@@ -550,7 +550,7 @@ extern rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable
 /* Function Name:
  *      rtk_port_backpressureEnable_get
  * Description:
- *      Get the half duplex backpressure enable status of the specific port.
+ *      Get the half duplex back-pressure enable status of the specific port.
  * Input:
  *      port - Port id.
  * Output:
@@ -561,8 +561,8 @@ extern rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_PORT_ID      - Invalid port number.
  * Note:
- *      This API can get the half duplex backpressure enable status of the specific port.
- *      The half duplex backpressure enable status of the port is as following:
+ *      This API can get the half duplex back-pressure enable status of the specific port.
+ *      The half duplex back-pressure enable status of the port is as following:
  *      - DISABLE
  *      - ENABLE
  */
@@ -594,7 +594,7 @@ extern rtk_api_ret_t rtk_port_adminEnable_set(rtk_port_t port, rtk_enable_t enab
 /* Function Name:
  *      rtk_port_adminEnable_get
  * Description:
- *      Get port admin configurationof the specific port.
+ *      Get port admin configuration of the specific port.
  * Input:
  *      port - Port id.
  * Output:
@@ -628,7 +628,7 @@ extern rtk_api_ret_t rtk_port_adminEnable_get(rtk_port_t port, rtk_enable_t *pEn
  *      RT_ERR_PORT_ID      - Invalid port number.
  *      RT_ERR_PORT_MASK    - Invalid portmask.
  * Note:
- *      This API set the port mask that a port can trasmit packet to of each port
+ *      This API set the port mask that a port can transmit packet to of each port
  *      A port can only transmit packet to ports included in permitted portmask
  */
 extern rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPortmask);
@@ -647,7 +647,7 @@ extern rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPo
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_PORT_ID      - Invalid port number.
  * Note:
- *      This API get the port mask that a port can trasmit packet to of each port
+ *      This API get the port mask that a port can transmit packet to of each port
  *      A port can only transmit packet to ports included in permitted portmask
  */
 extern rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPortmask);
@@ -669,7 +669,7 @@ extern rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPo
  * Note:
  *      This API can set external interface 2 RGMII delay.
  *      In TX delay, there are 2 selection: no-delay and 2ns delay.
- *      In RX dekay, there are 8 steps for delay tunning. 0 for no-delay, and 7 for maximum delay.
+ *      In RX delay, there are 8 steps for delay tuning. 0 for no-delay, and 7 for maximum delay.
  */
 extern rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay);
 
@@ -690,7 +690,7 @@ extern rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDe
  * Note:
  *      This API can set external interface 2 RGMII delay.
  *      In TX delay, there are 2 selection: no-delay and 2ns delay.
- *      In RX dekay, there are 8 steps for delay tunning. 0 for n0-delay, and 7 for maximum delay.
+ *      In RX delay, there are 8 steps for delay tuning. 0 for n0-delay, and 7 for maximum delay.
  */
 extern rtk_api_ret_t rtk_port_rgmiiDelayExt_get(rtk_port_t port, rtk_data_t *pTxDelay, rtk_data_t *pRxDelay);
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/ptp.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/ptp.h
index 6c4aca5a58..d18c4a01ed 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/ptp.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/ptp.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes time module high-layer API defination
+ * Feature : The file includes time module high-layer API definition
  *
  */
 
@@ -310,7 +310,7 @@ extern rtk_api_ret_t rtk_ptp_portEnable_get(rtk_port_t port, rtk_enable_t *pEnab
 /* Function Name:
  *      rtk_ptp_portTimestamp_get
  * Description:
- *      Get PTP timstamp according to the PTP identifier on the dedicated port from the specified device.
+ *      Get PTP timestamp according to the PTP identifier on the dedicated port from the specified device.
  * Input:
  *      unit       - unit id
  *      port       - port id
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/qos.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/qos.h
index 4be417486f..d2d8fac24a 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/qos.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/qos.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes QoS module high-layer API defination
+ * Feature : The file includes QoS module high-layer API definition
  *
  */
 
@@ -123,7 +123,7 @@ typedef rtk_uint32  rtk_queue_num_t;    /* queue number*/
 /* Function Name:
  *      rtk_qos_init
  * Description:
- *      Configure Qos default settings with queue number assigment to each port.
+ *      Configure QoS default settings with queue number assignment to each port.
  * Input:
  *      queueNum - Queue number of each port.
  * Output:
@@ -135,7 +135,7 @@ typedef rtk_uint32  rtk_queue_num_t;    /* queue number*/
  *      RT_ERR_QUEUE_NUM    - Invalid queue number.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This API will initialize related Qos setting with queue number assigment.
+ *      This API will initialize related QoS setting with queue number assignment.
  *      The queue number is from 1 to 8.
  */
 extern rtk_api_ret_t rtk_qos_init(rtk_queue_num_t queueNum);
@@ -235,7 +235,7 @@ extern rtk_api_ret_t rtk_qos_1pPriRemap_set(rtk_pri_t dot1p_pri, rtk_pri_t int_p
  *      RT_ERR_VLAN_PRIORITY    - Invalid priority.
  *      RT_ERR_QOS_INT_PRIORITY - Invalid priority.
  * Note:
- *      Priority of 802.1Q assigment for internal asic priority, and it is uesed for queue usage and packet scheduling.
+ *      Priority of 802.1Q assignment for internal asic priority, and it is used for queue usage and packet scheduling.
  */
 extern rtk_api_ret_t rtk_qos_1pPriRemap_get(rtk_pri_t dot1p_pri, rtk_pri_t *pInt_pri);
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rate.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rate.h
index 231ed01bb0..b3cdf432f7 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rate.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rate.h
@@ -9,7 +9,7 @@
  *
  * Purpose : RTL8367/RTL8367C switch high-level API
  *
- * Feature : The file includes rate module high-layer API defination
+ * Feature : The file includes rate module high-layer API definition
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_error.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_error.h
index dc9c0bed35..54d1a13f3b 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_error.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_error.h
@@ -40,7 +40,7 @@ typedef enum rt_error_code_e
     RT_ERR_NULL_POINTER,                            /* 0x00000007, input parameter is null pointer                                      */
     RT_ERR_QUEUE_ID,                                /* 0x00000008, invalid queue id                                                     */
     RT_ERR_QUEUE_NUM,                               /* 0x00000009, invalid queue number                                                 */
-    RT_ERR_BUSYWAIT_TIMEOUT,                        /* 0x0000000a, busy watting time out                                                */
+    RT_ERR_BUSYWAIT_TIMEOUT,                        /* 0x0000000a, busy waiting time out                                                */
     RT_ERR_MAC,                                     /* 0x0000000b, invalid mac address                                                  */
     RT_ERR_OUT_OF_RANGE,                            /* 0x0000000c, input parameter out of range                                         */
     RT_ERR_CHIP_NOT_SUPPORTED,                      /* 0x0000000d, functions not supported by this chip model                           */
@@ -57,7 +57,7 @@ typedef enum rt_error_code_e
     /* 0x0001xxxx for vlan */
     RT_ERR_VLAN_VID = 0x00010000,                   /* 0x00010000, invalid vid                                                          */
     RT_ERR_VLAN_PRIORITY,                           /* 0x00010001, invalid 1p priority                                                  */
-    RT_ERR_VLAN_EMPTY_ENTRY,                        /* 0x00010002, emtpy entry of vlan table                                            */
+    RT_ERR_VLAN_EMPTY_ENTRY,                        /* 0x00010002, empty entry of vlan table                                            */
     RT_ERR_VLAN_ACCEPT_FRAME_TYPE,                  /* 0x00010003, invalid accept frame type                                            */
     RT_ERR_VLAN_EXIST,                              /* 0x00010004, vlan is exist                                                        */
     RT_ERR_VLAN_ENTRY_NOT_FOUND,                    /* 0x00010005, specified vlan entry not found                                       */
@@ -165,7 +165,7 @@ typedef enum rt_error_code_e
     RT_ERR_INBW_TOKEN_AMOUNT,                       /* 0x000c0001, invalid amount of token for input bandwidth control                  */
     RT_ERR_INBW_FCON_VALUE,                         /* 0x000c0002, invalid flow control ON threshold value for input bandwidth control  */
     RT_ERR_INBW_FCOFF_VALUE,                        /* 0x000c0003, invalid flow control OFF threshold value for input bandwidth control */
-    RT_ERR_INBW_FC_ALLOWANCE,                       /* 0x000c0004, invalid allowance of incomming packet for input bandwidth control    */
+    RT_ERR_INBW_FC_ALLOWANCE,                       /* 0x000c0004, invalid allowance of incoming packet for input bandwidth control    */
     RT_ERR_INBW_RATE,                               /* 0x000c0005, invalid input bandwidth                                              */
 
     /* 0x000dxxxx for QoS */
@@ -220,7 +220,7 @@ typedef enum rt_error_code_e
     RT_ERR_DOT1X_PROC,                              /* 0x00110006, unauthorized behavior error                                          */
     RT_ERR_DOT1X_GVLANIDX,                          /* 0x00110007, guest vlan index error                                               */
     RT_ERR_DOT1X_GVLANTALK,                         /* 0x00110008, guest vlan OPDIR error                                               */
-    RT_ERR_DOT1X_MAC_PORT_MISMATCH,                 /* 0x00110009, Auth MAC and port mismatch eror                                      */
+    RT_ERR_DOT1X_MAC_PORT_MISMATCH,                 /* 0x00110009, Auth MAC and port mismatch error                                     */
 
     RT_ERR_END                                       /* The symbol is the latest symbol                                                  */
 } rt_error_code_t;
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_switch.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_switch.h
index b0ca13682c..0a43c0dbd3 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_switch.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_switch.h
@@ -185,10 +185,10 @@ typedef enum rtk_switch_maxPktLen_linkSpeed_e {
 #define RTK_SCAN_ALL_LOG_PORT(__port__)                     for(__port__ = 0; __port__ < RTK_SWITCH_PORT_NUM; __port__++)  if( rtk_switch_logicalPortCheck(__port__) == RT_ERR_OK)
 #define RTK_SCAN_ALL_LOG_PORTMASK(__portmask__)             for((__portmask__).bits[0] = 0; (__portmask__).bits[0] < 0x7FFFF; (__portmask__).bits[0]++)  if( rtk_switch_isPortMaskValid(&__portmask__) == RT_ERR_OK)
 
-/* Port mask defination */
+/* Port mask definition */
 #define RTK_PHY_PORTMASK_ALL                                (rtk_switch_phyPortMask_get())
 
-/* Port defination*/
+/* Port definition*/
 #define RTK_MAX_LOGICAL_PORT_ID                             (rtk_switch_maxLogicalPort_get())
 
 /* Function Name:
@@ -477,7 +477,7 @@ extern rtk_api_ret_t rtk_switch_isPortMaskExt(rtk_portmask_t *pPmask);
 /* Function Name:
  *      rtk_switch_portmask_L2P_get
  * Description:
- *      Get physicl portmask from logical portmask
+ *      Get physical portmask from logical portmask
  * Input:
  *      pLogicalPmask       - logical port mask
  * Output:
@@ -546,7 +546,7 @@ rtk_api_ret_t rtk_switch_logPortMask_get(rtk_portmask_t *pPortmask);
 /* Function Name:
  *      rtk_switch_init
  * Description:
- *      Set chip to default configuration enviroment
+ *      Set chip to default configuration environment
  * Input:
  *      None
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_types.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_types.h
index 589ecb7811..cafc7ff9da 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_types.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtk_types.h
@@ -56,13 +56,13 @@ typedef enum rtk_enable_e
 #define ETHER_ADDR_LEN      6
 #endif
 
-/* ethernet address type */
+/* Ethernet address type */
 typedef struct  rtk_mac_s
 {
     rtk_uint8 octet[ETHER_ADDR_LEN];
 } rtk_mac_t;
 
-typedef rtk_uint32  rtk_pri_t;      /* priority vlaue */
+typedef rtk_uint32  rtk_pri_t;      /* priority value */
 typedef rtk_uint32  rtk_qid_t;      /* queue id type */
 typedef rtk_uint32  rtk_data_t;
 typedef rtk_uint32  rtk_dscp_t;     /* dscp vlaue */
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_green.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_green.h
index 38fd085d06..95c1b20bd4 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_green.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_green.h
@@ -11,7 +11,7 @@
  * $Date: 2017-03-08 15:13:58 +0800 (?g?T, 08 ?T?? 2017) $
  *
  * Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Green ethernet related functions
+ * Feature : Green Ethernet related functions
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h
index 26042bfa13..d0a8995879 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_qos.h
@@ -11,7 +11,7 @@
  * $Date: 2017-03-08 15:13:58 +0800 (?g?T, 08 ?T?? 2017) $
  *
  * Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Qos related functions
+ * Feature : QoS related functions
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_unknownMulticast.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_unknownMulticast.h
index d142d25cff..e492e715b3 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_unknownMulticast.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_asicdrv_unknownMulticast.h
@@ -11,7 +11,7 @@
  * $Date: 2017-03-08 15:13:58 +0800 (?g?T, 08 ?T?? 2017) $
  *
  * Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Unkown multicast related functions
+ * Feature : Unknown multicast related functions
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_base.h b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_base.h
index 676ca8ed74..7a70e158fa 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_base.h
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/include/rtl8367c_base.h
@@ -11,7 +11,7 @@
  * $Date: 2017-03-08 15:13:58 +0800 (?g?T, 08 ?T?? 2017) $
  *
  * Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Regsiter MACRO related definition
+ * Feature : Register MACRO related definition
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/l2.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/l2.c
index feff0b240b..e73199a4e9 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/l2.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/l2.c
@@ -86,7 +86,7 @@ rtk_api_ret_t rtk_l2_init(void)
  *      RT_ERR_L2_INDEXTBL_FULL - hashed index is full of entries.
  *      RT_ERR_INPUT            - Invalid input parameters.
  * Note:
- *      If the unicast mac address already existed in LUT, it will udpate the status of the entry.
+ *      If the unicast mac address already existed in LUT, it will update the status of the entry.
  *      Otherwise, it will find an empty or asic auto learned entry to write. If all the entries
  *      with the same hash value can't be replaced, ASIC will return a RT_ERR_L2_INDEXTBL_FULL error.
  */
@@ -453,7 +453,7 @@ rtk_api_ret_t rtk_l2_addr_del(rtk_mac_t *pMac, rtk_l2_ucastAddr_t *pL2_data)
  *      RT_ERR_PORT_MASK        - Invalid portmask.
  *      RT_ERR_INPUT            - Invalid input parameters.
  * Note:
- *      If the multicast mac address already existed in the LUT, it will udpate the
+ *      If the multicast mac address already existed in the LUT, it will update the
  *      port mask of the entry. Otherwise, it will find an empty or asic auto learned
  *      entry to write. If all the entries with the same hash value can't be replaced,
  *      ASIC will return a RT_ERR_L2_INDEXTBL_FULL error.
@@ -800,7 +800,7 @@ rtk_api_ret_t rtk_l2_mcastAddr_del(rtk_l2_mcastAddr_t *pMcastAddr)
 /* Function Name:
  *      rtk_l2_ipMcastAddr_add
  * Description:
- *      Add Lut IP multicast entry
+ *      Add LUT IP multicast entry
  * Input:
  *      pIpMcastAddr    - IP Multicast entry
  * Output:
@@ -914,7 +914,7 @@ rtk_api_ret_t rtk_l2_ipMcastAddr_add(rtk_l2_ipMcastAddr_t *pIpMcastAddr)
  *      RT_ERR_L2_ENTRY_NOTFOUND    - No such LUT entry.
  *      RT_ERR_INPUT                - Invalid input parameters.
  * Note:
- *      The API can get Lut table of IP multicast entry.
+ *      The API can get LUT table of IP multicast entry.
  */
 rtk_api_ret_t rtk_l2_ipMcastAddr_get(rtk_l2_ipMcastAddr_t *pIpMcastAddr)
 {
@@ -1080,7 +1080,7 @@ rtk_api_ret_t rtk_l2_ipMcastAddr_del(rtk_l2_ipMcastAddr_t *pIpMcastAddr)
 /* Function Name:
  *      rtk_l2_ipVidMcastAddr_add
  * Description:
- *      Add Lut IP multicast+VID entry
+ *      Add LUT IP multicast+VID entry
  * Input:
  *      pIpVidMcastAddr - IP & VID multicast Entry
  * Output:
@@ -2143,7 +2143,7 @@ rtk_api_ret_t rtk_l2_learningCnt_get(rtk_port_t port, rtk_mac_cnt_t *pMac_cnt)
  *      Set flooding portmask
  * Input:
  *      type - flooding type.
- *      pFlood_portmask - flooding porkmask
+ *      pFlood_portmask - flooding portmask
  * Output:
  *      None
  * Return:
@@ -2204,7 +2204,7 @@ rtk_api_ret_t rtk_l2_floodPortMask_set(rtk_l2_flood_type_t floood_type, rtk_port
  * Input:
  *      type - flooding type.
  * Output:
- *      pFlood_portmask - flooding porkmask
+ *      pFlood_portmask - flooding portmask
  * Return:
  *      RT_ERR_OK           - OK
  *      RT_ERR_FAILED       - Failed
@@ -2259,10 +2259,10 @@ rtk_api_ret_t rtk_l2_floodPortMask_get(rtk_l2_flood_type_t floood_type, rtk_port
 /* Function Name:
  *      rtk_l2_localPktPermit_set
  * Description:
- *      Set permittion of frames if source port and destination port are the same.
+ *      Set permission of frames if source port and destination port are the same.
  * Input:
  *      port - Port id.
- *      permit - permittion status
+ *      permit - permission status
  * Output:
  *      None
  * Return:
@@ -2272,7 +2272,7 @@ rtk_api_ret_t rtk_l2_floodPortMask_get(rtk_l2_flood_type_t floood_type, rtk_port
  *      RT_ERR_PORT_ID      - Invalid port number.
  *      RT_ERR_ENABLE       - Invalid permit value.
  * Note:
- *      This API is setted to permit frame if its source port is equal to destination port.
+ *      This API is set to permit frame if its source port is equal to destination port.
  */
 rtk_api_ret_t rtk_l2_localPktPermit_set(rtk_port_t port, rtk_enable_t permit)
 {
@@ -2296,18 +2296,18 @@ rtk_api_ret_t rtk_l2_localPktPermit_set(rtk_port_t port, rtk_enable_t permit)
 /* Function Name:
  *      rtk_l2_localPktPermit_get
  * Description:
- *      Get permittion of frames if source port and destination port are the same.
+ *      Get permission of frames if source port and destination port are the same.
  * Input:
  *      port - Port id.
  * Output:
- *      pPermit - permittion status
+ *      pPermit - permission status
  * Return:
  *      RT_ERR_OK           - OK
  *      RT_ERR_FAILED       - Failed
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_PORT_ID      - Invalid port number.
  * Note:
- *      This API is to get permittion status for frames if its source port is equal to destination port.
+ *      This API is to get permission status for frames if its source port is equal to destination port.
  */
 rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit)
 {
@@ -2331,9 +2331,9 @@ rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit)
 /* Function Name:
  *      rtk_l2_aging_set
  * Description:
- *      Set LUT agging out speed
+ *      Set LUT ageing out speed
  * Input:
- *      aging_time - Agging out time.
+ *      aging_time - Ageing out time.
  * Output:
  *      None
  * Return:
@@ -2342,7 +2342,7 @@ rtk_api_ret_t rtk_l2_localPktPermit_get(rtk_port_t port, rtk_enable_t *pPermit)
  *      RT_ERR_SMI              - SMI access error
  *      RT_ERR_OUT_OF_RANGE     - input out of range.
  * Note:
- *      The API can set LUT agging out period for each entry and the range is from 45s to 458s.
+ *      The API can set LUT ageing out period for each entry and the range is from 45s to 458s.
  */
 rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time)
 {
@@ -2371,7 +2371,7 @@ rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time)
 /* Function Name:
  *      rtk_l2_aging_get
  * Description:
- *      Get LUT agging out time
+ *      Get LUT ageing out time
  * Input:
  *      None
  * Output:
@@ -2382,7 +2382,7 @@ rtk_api_ret_t rtk_l2_aging_set(rtk_l2_age_time_t aging_time)
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_PORT_ID      - Invalid port number.
  * Note:
- *      The API can get LUT agging out period for each entry.
+ *      The API can get LUT ageing out period for each entry.
  */
 rtk_api_ret_t rtk_l2_aging_get(rtk_l2_age_time_t *pAging_time)
 {
@@ -2416,7 +2416,7 @@ rtk_api_ret_t rtk_l2_aging_get(rtk_l2_age_time_t *pAging_time)
 /* Function Name:
  *      rtk_l2_ipMcastAddrLookup_set
  * Description:
- *      Set Lut IP multicast lookup function
+ *      Set LUT IP multicast lookup function
  * Input:
  *      type - Lookup type for IPMC packet.
  * Output:
@@ -2473,7 +2473,7 @@ rtk_api_ret_t rtk_l2_ipMcastAddrLookup_set(rtk_l2_ipmc_lookup_type_t type)
 /* Function Name:
  *      rtk_l2_ipMcastAddrLookup_get
  * Description:
- *      Get Lut IP multicast lookup function
+ *      Get LUT IP multicast lookup function
  * Input:
  *      None.
  * Output:
@@ -2518,9 +2518,9 @@ rtk_api_ret_t rtk_l2_ipMcastAddrLookup_get(rtk_l2_ipmc_lookup_type_t *pType)
 /* Function Name:
  *      rtk_l2_ipMcastForwardRouterPort_set
  * Description:
- *      Set IPMC packet forward to rounter port also or not
+ *      Set IPMC packet forward to router port also or not
  * Input:
- *      enabled - 1: Inlcude router port, 0, exclude router port
+ *      enabled - 1: Include router port, 0, exclude router port
  * Output:
  *      None.
  * Return:
@@ -2549,11 +2549,11 @@ rtk_api_ret_t rtk_l2_ipMcastForwardRouterPort_set(rtk_enable_t enabled)
 /* Function Name:
  *      rtk_l2_ipMcastForwardRouterPort_get
  * Description:
- *      Get IPMC packet forward to rounter port also or not
+ *      Get IPMC packet forward to router port also or not
  * Input:
  *      None.
  * Output:
- *      pEnabled    - 1: Inlcude router port, 0, exclude router port
+ *      pEnabled    - 1: Include router port, 0, exclude router port
  * Return:
  *      RT_ERR_OK           - OK
  *      RT_ERR_FAILED       - Failed
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/led.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/led.c
index c00c331d8a..02e0829dc6 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/led.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/led.c
@@ -27,7 +27,7 @@
 /* Function Name:
  *      rtk_led_enable_set
  * Description:
- *      Set Led enable congiuration
+ *      Set Led enable configuration
  * Input:
  *      group       - LED group id.
  *      pPortmask   - LED enable port mask.
@@ -74,7 +74,7 @@ rtk_api_ret_t rtk_led_enable_set(rtk_led_group_t group, rtk_portmask_t *pPortmas
 /* Function Name:
  *      rtk_led_enable_get
  * Description:
- *      Get Led enable congiuration
+ *      Get Led enable configuration
  * Input:
  *      group - LED group id.
  * Output:
@@ -205,7 +205,7 @@ rtk_api_ret_t rtk_led_operation_get(rtk_led_operation_t *pMode)
 /* Function Name:
  *      rtk_led_modeForce_set
  * Description:
- *      Set Led group to congiuration force mode
+ *      Set Led group to configuration force mode
  * Input:
  *      port    - port ID
  *      group   - Support LED group id.
@@ -255,7 +255,7 @@ rtk_api_ret_t rtk_led_modeForce_set(rtk_port_t port, rtk_led_group_t group, rtk_
 /* Function Name:
  *      rtk_led_modeForce_get
  * Description:
- *      Get Led group to congiuration force mode
+ *      Get Led group to configuration force mode
  * Input:
  *      port  - port ID
  *      group - Support LED group id.
@@ -369,7 +369,7 @@ rtk_api_ret_t rtk_led_blinkRate_get(rtk_led_blink_rate_t *pBlinkRate)
 /* Function Name:
  *      rtk_led_groupConfig_set
  * Description:
- *      Set per group Led to congiuration mode
+ *      Set per group Led to configuration mode
  * Input:
  *      group   - LED group.
  *      config  - LED configuration
@@ -422,7 +422,7 @@ rtk_api_ret_t rtk_led_groupConfig_set(rtk_led_group_t group, rtk_led_congig_t co
 /* Function Name:
  *      rtk_led_groupConfig_get
  * Description:
- *      Get Led group congiuration mode
+ *      Get Led group configuration mode
  * Input:
  *      group - LED group.
  * Output:
@@ -583,7 +583,7 @@ rtk_api_ret_t rtk_led_groupAbility_get(rtk_led_group_t group, rtk_led_ability_t
 /* Function Name:
  *      rtk_led_serialMode_set
  * Description:
- *      Set Led serial mode active congiuration
+ *      Set Led serial mode active configuration
  * Input:
  *      active - LED group.
  * Output:
@@ -594,7 +594,7 @@ rtk_api_ret_t rtk_led_groupAbility_get(rtk_led_group_t group, rtk_led_ability_t
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      The API can set LED serial mode active congiuration.
+ *      The API can set LED serial mode active configuration.
  */
 rtk_api_ret_t rtk_led_serialMode_set(rtk_led_active_t active)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/mirror.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/mirror.c
index 1921d1a5af..3bbad8adb6 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/mirror.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/mirror.c
@@ -66,7 +66,7 @@ rtk_api_ret_t rtk_mirror_portBased_set(rtk_port_t mirroring_port, rtk_portmask_t
 
     RTK_CHK_PORTMASK_VALID(pMirrored_tx_portmask);
 
-    /*Mirror Sorce Port Mask Check*/
+    /*Mirror Source Port Mask Check*/
     if (pMirrored_tx_portmask->bits[0]!=pMirrored_rx_portmask->bits[0]&&pMirrored_tx_portmask->bits[0]!=0&&pMirrored_rx_portmask->bits[0]!=0)
         return RT_ERR_PORT_MASK;
 
@@ -353,7 +353,7 @@ rtk_api_ret_t rtk_mirror_vlanLeaky_get(rtk_enable_t *pTxenable, rtk_enable_t *pR
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_ENABLE       - Invalid enable input
  * Note:
- *      The API is to set mirror VLAN leaky function forwarding packets to miror port.
+ *      The API is to set mirror VLAN leaky function forwarding packets to mirror port.
  */
 rtk_api_ret_t rtk_mirror_isolationLeaky_set(rtk_enable_t txenable, rtk_enable_t rxenable)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/port.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/port.c
index 9f99d1b3dc..9c7bcd0e38 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/port.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/port.c
@@ -410,7 +410,7 @@ static rtk_api_ret_t _rtk_port_FiberModeAbility_get(rtk_port_t port, rtk_port_ph
 /* Function Name:
  *      rtk_port_phyAutoNegoAbility_set
  * Description:
- *      Set ethernet PHY auto-negotiation desired ability.
+ *      Set Ethernet PHY auto-negotiation desired ability.
  * Input:
  *      port        - port id.
  *      pAbility    - Ability structure
@@ -618,7 +618,7 @@ rtk_api_ret_t rtk_port_phyAutoNegoAbility_set(rtk_port_t port, rtk_port_phy_abil
  *      RT_ERR_INPUT            - Invalid input parameters.
  *      RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
  * Note:
- *      Get the capablity of specified PHY.
+ *      Get the capability of specified PHY.
  */
 rtk_api_ret_t rtk_port_phyAutoNegoAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility)
 {
@@ -836,7 +836,7 @@ rtk_api_ret_t rtk_port_phyForceModeAbility_set(rtk_port_t port, rtk_port_phy_abi
 
      if (1 == pAbility->AsyFC)
      {
-         /*Asymetric flow control in reg 4.11*/
+         /*Asymmetric flow control in reg 4.11*/
          phyEnMsk4 = phyEnMsk4 | (1 << 11);
      }
      if (1 == pAbility->FC)
@@ -892,7 +892,7 @@ rtk_api_ret_t rtk_port_phyForceModeAbility_set(rtk_port_t port, rtk_port_phy_abi
  *      RT_ERR_INPUT            - Invalid input parameters.
  *      RT_ERR_BUSYWAIT_TIMEOUT - PHY access busy
  * Note:
- *      Get the capablity of specified PHY.
+ *      Get the capability of specified PHY.
  */
 rtk_api_ret_t rtk_port_phyForceModeAbility_get(rtk_port_t port, rtk_port_phy_ability_t *pAbility)
 {
@@ -982,7 +982,7 @@ rtk_api_ret_t rtk_port_phyForceModeAbility_get(rtk_port_t port, rtk_port_phy_abi
 /* Function Name:
  *      rtk_port_phyStatus_get
  * Description:
- *      Get ethernet PHY linking status
+ *      Get Ethernet PHY linking status
  * Input:
  *      port - Port id.
  * Output:
@@ -1363,7 +1363,7 @@ rtk_api_ret_t rtk_port_macStatus_get(rtk_port_t port, rtk_port_mac_ability_t *pP
  *      For UTP port, This API will also enable the digital
  *      loopback bit in PHY register for sync of speed between
  *      PHY and MAC. For EXT port, users need to force the
- *      link state by themself.
+ *      link state by themselves.
  */
 rtk_api_ret_t rtk_port_macLocalLoopbackEnable_set(rtk_port_t port, rtk_enable_t enable)
 {
@@ -1508,7 +1508,7 @@ rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg, rtk_p
 /* Function Name:
  *      rtk_port_backpressureEnable_set
  * Description:
- *      Set the half duplex backpressure enable status of the specific port.
+ *      Set the half duplex back-pressure enable status of the specific port.
  * Input:
  *      port    - port id.
  *      enable  - Back pressure status.
@@ -1521,10 +1521,10 @@ rtk_api_ret_t rtk_port_phyReg_get(rtk_port_t port, rtk_port_phy_reg_t reg, rtk_p
  *      RT_ERR_PORT_ID      - Invalid port number.
  *      RT_ERR_ENABLE       - Invalid enable input.
  * Note:
- *      This API can set the half duplex backpressure enable status of the specific port.
- *      The half duplex backpressure enable status of the port is as following:
+ *      This API can set the half duplex back-pressure enable status of the specific port.
+ *      The half duplex back-pressure enable status of the port is as following:
  *      - DISABLE(Defer)
- *      - ENABLE (Backpressure)
+ *      - ENABLE (Back-pressure)
  */
 rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable_t enable)
 {
@@ -1548,7 +1548,7 @@ rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable_t enab
 /* Function Name:
  *      rtk_port_backpressureEnable_get
  * Description:
- *      Get the half duplex backpressure enable status of the specific port.
+ *      Get the half duplex back-pressure enable status of the specific port.
  * Input:
  *      port - Port id.
  * Output:
@@ -1559,10 +1559,10 @@ rtk_api_ret_t rtk_port_backpressureEnable_set(rtk_port_t port, rtk_enable_t enab
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_PORT_ID      - Invalid port number.
  * Note:
- *      This API can get the half duplex backpressure enable status of the specific port.
- *      The half duplex backpressure enable status of the port is as following:
+ *      This API can get the half duplex back-pressure enable status of the specific port.
+ *      The half duplex back-pressure enable status of the port is as following:
  *      - DISABLE(Defer)
- *      - ENABLE (Backpressure)
+ *      - ENABLE (Back-pressure)
  */
 rtk_api_ret_t rtk_port_backpressureEnable_get(rtk_port_t port, rtk_enable_t *pEnable)
 {
@@ -1643,7 +1643,7 @@ rtk_api_ret_t rtk_port_adminEnable_set(rtk_port_t port, rtk_enable_t enable)
 /* Function Name:
  *      rtk_port_adminEnable_get
  * Description:
- *      Get port admin configurationof the specific port.
+ *      Get port admin configuration of the specific port.
  * Input:
  *      port - Port id.
  * Output:
@@ -1704,7 +1704,7 @@ rtk_api_ret_t rtk_port_adminEnable_get(rtk_port_t port, rtk_enable_t *pEnable)
  *      RT_ERR_PORT_ID      - Invalid port number.
  *      RT_ERR_PORT_MASK    - Invalid portmask.
  * Note:
- *      This API set the port mask that a port can trasmit packet to of each port
+ *      This API set the port mask that a port can transmit packet to of each port
  *      A port can only transmit packet to ports included in permitted portmask
  */
 rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPortmask)
@@ -1747,7 +1747,7 @@ rtk_api_ret_t rtk_port_isolation_set(rtk_port_t port, rtk_portmask_t *pPortmask)
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_PORT_ID      - Invalid port number.
  * Note:
- *      This API get the port mask that a port can trasmit packet to of each port
+ *      This API get the port mask that a port can transmit packet to of each port
  *      A port can only transmit packet to ports included in permitted portmask
  */
 rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPortmask)
@@ -1790,7 +1790,7 @@ rtk_api_ret_t rtk_port_isolation_get(rtk_port_t port, rtk_portmask_t *pPortmask)
  * Note:
  *      This API can set external interface 2 RGMII delay.
  *      In TX delay, there are 2 selection: no-delay and 2ns delay.
- *      In RX dekay, there are 8 steps for delay tunning. 0 for no-delay, and 7 for maximum delay.
+ *      In RX delay, there are 8 steps for delay tuning. 0 for no-delay, and 7 for maximum delay.
  */
 rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rtk_data_t rxDelay)
 {
@@ -1841,7 +1841,7 @@ rtk_api_ret_t rtk_port_rgmiiDelayExt_set(rtk_port_t port, rtk_data_t txDelay, rt
  * Note:
  *      This API can set external interface 2 RGMII delay.
  *      In TX delay, there are 2 selection: no-delay and 2ns delay.
- *      In RX dekay, there are 8 steps for delay tunning. 0 for n0-delay, and 7 for maximum delay.
+ *      In RX delay, there are 8 steps for delay tuning. 0 for n0-delay, and 7 for maximum delay.
  */
 rtk_api_ret_t rtk_port_rgmiiDelayExt_get(rtk_port_t port, rtk_data_t *pTxDelay, rtk_data_t *pRxDelay)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/ptp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/ptp.c
index 40962a0e69..af8ce30912 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/ptp.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/ptp.c
@@ -401,7 +401,7 @@ rtk_api_ret_t rtk_ptp_portEnable_get(rtk_port_t port, rtk_enable_t *pEnable)
 /* Function Name:
  *      rtk_ptp_portTimestamp_get
  * Description:
- *      Get PTP timstamp according to the PTP identifier on the dedicated port from the specified device.
+ *      Get PTP timestamp according to the PTP identifier on the dedicated port from the specified device.
  * Input:
  *      unit       - unit id
  *      port       - port id
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/qos.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/qos.c
index 70067a3016..9bcb49cfbd 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/qos.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/qos.c
@@ -28,7 +28,7 @@
 /* Function Name:
  *      rtk_qos_init
  * Description:
- *      Configure Qos default settings with queue number assigment to each port.
+ *      Configure QoS default settings with queue number assignment to each port.
  * Input:
  *      queueNum - Queue number of each port.
  * Output:
@@ -40,7 +40,7 @@
  *      RT_ERR_QUEUE_NUM    - Invalid queue number.
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This API will initialize related Qos setting with queue number assigment.
+ *      This API will initialize related QoS setting with queue number assignment.
  *      The queue number is from 1 to 8.
  */
 rtk_api_ret_t rtk_qos_init(rtk_queue_num_t queueNum)
@@ -143,7 +143,7 @@ rtk_api_ret_t rtk_qos_init(rtk_queue_num_t queueNum)
             return retVal;
     }
 
-    /* Finetune B/T value */
+    /* Fine-tune B/T value */
     if((retVal = rtl8367c_setAsicReg(0x1722, 0x1158)) != RT_ERR_OK)
         return retVal;
 
@@ -455,7 +455,7 @@ rtk_api_ret_t rtk_qos_1pPriRemap_set(rtk_pri_t dot1p_pri, rtk_pri_t int_pri)
  *      RT_ERR_VLAN_PRIORITY    - Invalid priority.
  *      RT_ERR_QOS_INT_PRIORITY - Invalid priority.
  * Note:
- *      Priority of 802.1Q assigment for internal asic priority, and it is uesed for queue usage and packet scheduling.
+ *      Priority of 802.1Q assignment for internal asic priority, and it is used for queue usage and packet scheduling.
  */
 rtk_api_ret_t rtk_qos_1pPriRemap_get(rtk_pri_t dot1p_pri, rtk_pri_t *pInt_pri)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c
index d3ca029751..c39421e57c 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rldp.c
@@ -404,7 +404,7 @@ rtk_api_ret_t rtk_rldp_portStatus_get(rtk_port_t port, rtk_rldp_portStatus_t *pP
  *      RT_ERR_NULL_POINTER
  * Note:
  *      Clear operation effect loop_enter and loop_leave only, other field in
- *      the structure are don't care. Loop status cab't be clean.
+ *      the structure are don't care. Loop status can't be clean.
  */
 rtk_api_ret_t rtk_rldp_portStatus_set(rtk_port_t port, rtk_rldp_portStatus_t *pPortStatus)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtk_switch.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtk_switch.c
index 0bb0db0776..20542f259f 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtk_switch.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtk_switch.c
@@ -152,7 +152,7 @@ static rtk_switch_halCtrl_t rtl8370b_hal_Ctrl =
     /* Minimum physical port number */
     0,
 
-    /* Maxmum physical port number */
+    /* Maximum physical port number */
     10,
 
     /* Physical port mask */
@@ -221,7 +221,7 @@ static rtk_switch_halCtrl_t rtl8364b_hal_Ctrl =
     /* Minimum physical port number */
     0,
 
-    /* Maxmum physical port number */
+    /* Maximum physical port number */
     7,
 
     /* Physical port mask */
@@ -290,7 +290,7 @@ static rtk_switch_halCtrl_t rtl8363sc_vb_hal_Ctrl =
     /* Minimum physical port number */
     0,
 
-    /* Maxmum physical port number */
+    /* Maximum physical port number */
     7,
 
     /* Physical port mask */
@@ -1215,7 +1215,7 @@ rtk_api_ret_t rtk_switch_isPortMaskExt(rtk_portmask_t *pPmask)
 /* Function Name:
  *      rtk_switch_portmask_L2P_get
  * Description:
- *      Get physicl portmask from logical portmask
+ *      Get physical portmask from logical portmask
  * Input:
  *      pLogicalPmask       - logical port mask
  * Output:
@@ -1351,7 +1351,7 @@ rtk_api_ret_t rtk_switch_logPortMask_get(rtk_portmask_t *pPortmask)
 /* Function Name:
  *      rtk_switch_init
  * Description:
- *      Set chip to default configuration enviroment
+ *      Set chip to default configuration environment
  * Input:
  *      None
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c
index d9ccd97118..1e4d2961e7 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_acl.c
@@ -173,7 +173,7 @@ static void _rtl8367c_aclActStUser2Smi(rtl8367c_acl_act_t *pAclUser, rtk_uint16
 /* Function Name:
  *      rtl8367c_setAsicAcl
  * Description:
- *      Set port acl function enable/disable
+ *      Set port ACL function enable/disable
  * Input:
  *      port    - Physical port number (0~10)
  *      enabled - 1: enabled, 0: disabled
@@ -196,7 +196,7 @@ ret_t rtl8367c_setAsicAcl(rtk_uint32 port, rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicAcl
  * Description:
- *      Get port acl function enable/disable
+ *      Get port ACL function enable/disable
  * Input:
  *      port    - Physical port number (0~10)
  *      enabled - 1: enabled, 0: disabled
@@ -219,7 +219,7 @@ ret_t rtl8367c_getAsicAcl(rtk_uint32 port, rtk_uint32* pEnabled)
 /* Function Name:
  *      rtl8367c_setAsicAclUnmatchedPermit
  * Description:
- *      Set port acl function unmatched permit action
+ *      Set port ACL function unmatched permit action
  * Input:
  *      port    - Physical port number (0~10)
  *      enabled - 1: enabled, 0: disabled
@@ -242,7 +242,7 @@ ret_t rtl8367c_setAsicAclUnmatchedPermit(rtk_uint32 port, rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicAclUnmatchedPermit
  * Description:
- *      Get port acl function unmatched permit action
+ *      Get port ACL function unmatched permit action
  * Input:
  *      port    - Physical port number (0~10)
  *      enabled - 1: enabled, 0: disabled
@@ -266,10 +266,10 @@ ret_t rtl8367c_getAsicAclUnmatchedPermit(rtk_uint32 port, rtk_uint32* pEnabled)
 /* Function Name:
  *      rtl8367c_setAsicAclRule
  * Description:
- *      Set acl rule content
+ *      Set ACL rule content
  * Input:
  *      index   - ACL rule index (0-95) of 96 ACL rules
- *      pAclRule - ACL rule stucture for setting
+ *      pAclRule - ACL rule structure for setting
  * Output:
  *      None
  * Return:
@@ -278,8 +278,8 @@ ret_t rtl8367c_getAsicAclUnmatchedPermit(rtk_uint32 port, rtk_uint32* pEnabled)
  *      RT_ERR_OUT_OF_RANGE     - Invalid ACL rule index (0-95)
  * Note:
  *      System supported 95 shared 289-bit ACL ingress rule. Index was available at range 0-95 only.
- *      If software want to modify ACL rule, the ACL function should be disable at first or unspecify
- *      acl action will be executed.
+ *      If software want to modify ACL rule, the ACL function should be disabled at first or unspecified
+ *      ACL action will be executed.
  *      One ACL rule structure has three parts setting:
  *      Bit 0-147       Data Bits of this Rule
  *      Bit 148     Valid Bit
@@ -410,10 +410,10 @@ ret_t rtl8367c_setAsicAclRule(rtk_uint32 index, rtl8367c_aclrule* pAclRule)
 /* Function Name:
  *      rtl8367c_getAsicAclRule
  * Description:
- *      Get acl rule content
+ *      Get ACL rule content
  * Input:
  *      index   - ACL rule index (0-63) of 64 ACL rules
- *      pAclRule - ACL rule stucture for setting
+ *      pAclRule - ACL rule structure for setting
  * Output:
  *      None
  * Return:
@@ -588,7 +588,7 @@ ret_t rtl8367c_getAsicAclNot(rtk_uint32 index, rtk_uint32* pNot)
  *      Set fields of a ACL Template
  * Input:
  *      index   - ACL template index(0~4)
- *      pAclType - ACL type stucture for setting
+ *      pAclType - ACL type structure for setting
  * Output:
  *      None
  * Return:
@@ -598,7 +598,7 @@ ret_t rtl8367c_getAsicAclNot(rtk_uint32 index, rtk_uint32* pNot)
  * Note:
  *      The API can set type field of the 5 ACL rule templates.
  *      Each type has 8 fields. One field means what data in one field of a ACL rule means
- *      8 fields of ACL rule 0~95 is descripted by one type in ACL group
+ *      8 fields of ACL rule 0~95 is described by one type in ACL group
  */
 ret_t rtl8367c_setAsicAclTemplate(rtk_uint32 index, rtl8367c_acltemplate_t* pAclType)
 {
@@ -630,7 +630,7 @@ ret_t rtl8367c_setAsicAclTemplate(rtk_uint32 index, rtl8367c_acltemplate_t* pAcl
  *      Get fields of a ACL Template
  * Input:
  *      index   - ACL template index(0~4)
- *      pAclType - ACL type stucture for setting
+ *      pAclType - ACL type structure for setting
  * Output:
  *      None
  * Return:
@@ -669,7 +669,7 @@ ret_t rtl8367c_getAsicAclTemplate(rtk_uint32 index, rtl8367c_acltemplate_t *pAcl
  *      Set ACL rule matched Action
  * Input:
  *      index   - ACL rule index (0-95) of 96 ACL rules
- *      pAclAct     - ACL action stucture for setting
+ *      pAclAct     - ACL action structure for setting
  * Output:
  *      None
  * Return:
@@ -734,7 +734,7 @@ ret_t rtl8367c_setAsicAclAct(rtk_uint32 index, rtl8367c_acl_act_t* pAclAct)
  *      Get ACL rule matched Action
  * Input:
  *      index   - ACL rule index (0-95) of 96 ACL rules
- *      pAclAct     - ACL action stucture for setting
+ *      pAclAct     - ACL action structure for setting
  * Output:
  *      None
  * Return:
@@ -1137,7 +1137,7 @@ ret_t rtl8367c_getAsicAclIpRange(rtk_uint32 index, rtk_uint32* pType, ipaddr_t*
 /* Function Name:
  *      rtl8367c_setAsicAclGpioPolarity
  * Description:
- *      Set ACL Goip control palarity
+ *      Set ACL Goip control polarity
  * Input:
  *      polarity - 1: High, 0: Low
  * Output:
@@ -1155,7 +1155,7 @@ ret_t rtl8367c_setAsicAclGpioPolarity(rtk_uint32 polarity)
 /* Function Name:
  *      rtl8367c_getAsicAclGpioPolarity
  * Description:
- *      Get ACL Goip control palarity
+ *      Get ACL Goip control polarity
  * Input:
  *      pPolarity - 1: High, 0: Low
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c
index d22bf65eaa..4b01a11617 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_cputag.c
@@ -18,7 +18,7 @@
 /* Function Name:
  *      rtl8367c_setAsicCputagEnable
  * Description:
- *      Set cpu tag function enable/disable
+ *      Set CPU tag function enable/disable
  * Input:
  *      enabled - 1: enabled, 0: disabled
  * Output:
@@ -41,7 +41,7 @@ ret_t rtl8367c_setAsicCputagEnable(rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicCputagEnable
  * Description:
- *      Get cpu tag function enable/disable
+ *      Get CPU tag function enable/disable
  * Input:
  *      pEnabled - 1: enabled, 0: disabled
  * Output:
@@ -59,7 +59,7 @@ ret_t rtl8367c_getAsicCputagEnable(rtk_uint32 *pEnabled)
 /* Function Name:
  *      rtl8367c_setAsicCputagTrapPort
  * Description:
- *      Set cpu tag trap port
+ *      Set CPU tag trap port
  * Input:
  *      port - port number
  * Output:
@@ -91,7 +91,7 @@ ret_t rtl8367c_setAsicCputagTrapPort(rtk_uint32 port)
 /* Function Name:
  *      rtl8367c_getAsicCputagTrapPort
  * Description:
- *      Get cpu tag trap port
+ *      Get CPU tag trap port
  * Input:
  *      pPort - port number
  * Output:
@@ -248,9 +248,9 @@ ret_t rtl8367c_getAsicCputagPriorityRemapping(rtk_uint32 srcPri, rtk_uint32 *pNe
 /* Function Name:
  *      rtl8367c_setAsicCputagPosition
  * Description:
- *      Set cpu tag insert position
+ *      Set CPU tag insert position
  * Input:
- *      postion - 1: After entire packet(before CRC field), 0: After MAC_SA (Default)
+ *      position - 1: After entire packet(before CRC field), 0: After MAC_SA (Default)
  * Output:
  *      None
  * Return:
@@ -266,7 +266,7 @@ ret_t rtl8367c_setAsicCputagPosition(rtk_uint32 postion)
 /* Function Name:
  *      rtl8367c_getAsicCputagPosition
  * Description:
- *      Get cpu tag insert position
+ *      Get CPU tag insert position
  * Input:
  *      pPostion - 1: After entire packet(before CRC field), 0: After MAC_SA (Default)
  * Output:
@@ -285,7 +285,7 @@ ret_t rtl8367c_getAsicCputagPosition(rtk_uint32* pPostion)
 /* Function Name:
  *      rtl8367c_setAsicCputagMode
  * Description:
- *      Set cpu tag mode
+ *      Set CPU tag mode
  * Input:
  *      mode - 1: 4bytes mode, 0: 8bytes mode
  * Output:
@@ -308,7 +308,7 @@ ret_t rtl8367c_setAsicCputagMode(rtk_uint32 mode)
 /* Function Name:
  *      rtl8367c_getAsicCputagMode
  * Description:
- *      Get cpu tag mode
+ *      Get CPU tag mode
  * Input:
  *      pMode - 1: 4bytes mode, 0: 8bytes mode
  * Output:
@@ -326,7 +326,7 @@ ret_t rtl8367c_getAsicCputagMode(rtk_uint32 *pMode)
 /* Function Name:
  *      rtl8367c_setAsicCputagRxMinLength
  * Description:
- *      Set cpu tag mode
+ *      Set CPU tag mode
  * Input:
  *      mode - 1: 64bytes, 0: 72bytes
  * Output:
@@ -349,7 +349,7 @@ ret_t rtl8367c_setAsicCputagRxMinLength(rtk_uint32 mode)
 /* Function Name:
  *      rtl8367c_getAsicCputagRxMinLength
  * Description:
- *      Get cpu tag mode
+ *      Get CPU tag mode
  * Input:
  *      pMode - 1: 64bytes, 0: 72bytes
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c
index 370b7c6f3a..811ee47954 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_eav.c
@@ -100,7 +100,7 @@ ret_t rtl8367c_getAsicEavMacAddress(ether_addr_t *pMac)
  * Description:
  *      Set PTP parser tag TPID.
  * Input:
- *       outerTag - outter tag TPID
+ *       outerTag - outer tag TPID
  *       innerTag  - inner tag TPID
  * Output:
  *      None
@@ -128,7 +128,7 @@ ret_t rtl8367c_setAsicEavTpid(rtk_uint32 outerTag, rtk_uint32 innerTag)
  * Input:
  *      None
  * Output:
- *       pOuterTag - outter tag TPID
+ *       pOuterTag - outer tag TPID
  *       pInnerTag  - inner tag TPID
  * Return:
  *      RT_ERR_OK   - Success
@@ -161,7 +161,7 @@ ret_t rtl8367c_getAsicEavTpid(rtk_uint32* pOuterTag, rtk_uint32* pInnerTag)
  *      RT_ERR_OK     - Success
  *      RT_ERR_SMI  - SMI access error
  * Note:
- *      The time granuality is 8 nano seconds.
+ *      The time granularity is 8 nano seconds.
  */
 ret_t rtl8367c_setAsicEavSysTime(rtk_uint32 second, rtk_uint32 nanoSecond)
 {
@@ -218,7 +218,7 @@ ret_t rtl8367c_setAsicEavSysTime(rtk_uint32 second, rtk_uint32 nanoSecond)
  *      RT_ERR_OK     - Success
  *      RT_ERR_SMI  - SMI access error
  * Note:
- *      The time granuality is 8 nano seconds.
+ *      The time granularity is 8 nano seconds.
  */
 ret_t rtl8367c_getAsicEavSysTime(rtk_uint32* pSecond, rtk_uint32* pNanoSecond)
 {
@@ -265,7 +265,7 @@ ret_t rtl8367c_getAsicEavSysTime(rtk_uint32* pSecond, rtk_uint32* pNanoSecond)
  * Description:
  *      Set PTP system time adjust
  * Input:
- *      type - incresae or decrease
+ *      type - increase or decrease
  *      second - seconds
  *      nanoSecond - nano seconds
  * Output:
@@ -481,7 +481,7 @@ ret_t rtl8367c_getAsicEavInterruptStatus(rtk_uint32* pIms)
  *      RT_ERR_OK   - Success
  *      RT_ERR_SMI  - SMI access error
  * Note:
- *      This API can be used to clear ASIC interrupt status and register will be cleared by writting 1.
+ *      This API can be used to clear ASIC interrupt status and register will be cleared by writing 1.
  *      [0]:TX_SYNC,
  *      [1]:TX_DELAY,
  *      [2]:TX_PDELAY_REQ,
@@ -570,7 +570,7 @@ ret_t rtl8367c_getAsicEavPortInterruptStatus(rtk_uint32 port, rtk_uint32* pIms)
  *      RT_ERR_SMI      - SMI access error
  *      RT_ERR_PORT_ID  - Invalid port number
  * Note:
- *      If EAV function is enabled, PTP event messgae packet will be attached PTP timestamp for trapping
+ *      If EAV function is enabled, PTP event message packet will be attached PTP timestamp for trapping
  */
 ret_t rtl8367c_setAsicEavPortEnable(rtk_uint32 port, rtk_uint32 enabled)
 {
@@ -646,7 +646,7 @@ ret_t rtl8367c_getAsicEavPortEnable(rtk_uint32 port, rtk_uint32 *pEnabled)
  *      RT_ERR_OK     - Success
  *      RT_ERR_SMI  - SMI access error
  * Note:
- *      The time granuality is 8 nano seconds.
+ *      The time granularity is 8 nano seconds.
  */
 ret_t rtl8367c_getAsicEavPortTimeStamp(rtk_uint32 port, rtk_uint32 type, rtl8367c_ptp_time_stamp_t* timeStamp)
 {
@@ -796,7 +796,7 @@ ret_t rtl8367c_getAsicEavTrap(rtk_uint32 port, rtk_uint32 *pEnabled)
  *      RT_ERR_SMI      - SMI access error
  *      RT_ERR_PORT_ID  - Invalid port number
  * Note:
- *      If EAV function is enabled, PTP event messgae packet will be attached PTP timestamp for trapping
+ *      If EAV function is enabled, PTP event message packet will be attached PTP timestamp for trapping
  */
 ret_t rtl8367c_setAsicEavEnable(rtk_uint32 port, rtk_uint32 enabled)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c
index 28f49b1ba7..b7b1022439 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_fc.c
@@ -55,7 +55,7 @@ ret_t rtl8367c_getAsicFlowControlSelect(rtk_uint32 *pSelect)
 /* Function Name:
  *      rtl8367c_setAsicFlowControlJumboMode
  * Description:
- *      Set Jumbo threhsold for flow control
+ *      Set Jumbo threshold for flow control
  * Input:
  *      enabled         - Jumbo mode flow control 1: Enable 0:Disable
  * Output:
@@ -73,7 +73,7 @@ ret_t rtl8367c_setAsicFlowControlJumboMode(rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicFlowControlJumboMode
  * Description:
- *      Get Jumbo threhsold for flow control
+ *      Get Jumbo threshold for flow control
  * Input:
  *      pEnabled        - Jumbo mode flow control 1: Enable 0:Disable
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c
index a38623850b..3fb5f57b91 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_green.c
@@ -11,7 +11,7 @@
  * $Date: 2017-03-08 15:13:58 +0800 (??, 08 ?? 2017) $
  *
  * Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Green ethernet related functions
+ * Feature : Green Ethernet related functions
  *
  */
 #include <rtl8367c_asicdrv_green.h>
@@ -22,7 +22,7 @@
  *      Get per-Port ingress page usage per second
  * Input:
  *      port    - Physical port number (0~7)
- *      pPage   - page number of ingress packet occuping per second
+ *      pPage   - page number of ingress packet occurring per second
  * Output:
  *      None
  * Return:
@@ -30,7 +30,7 @@
  *      RT_ERR_SMI      - SMI access error
  *      RT_ERR_PORT_ID  - Invalid port number
  * Note:
- *      Ingress traffic occuping page number per second for high layer green feature usage
+ *      Ingress traffic occurring page number per second for high layer green feature usage
  */
 ret_t rtl8367c_getAsicGreenPortPage(rtk_uint32 port, rtk_uint32* pPage)
 {
@@ -134,7 +134,7 @@ ret_t rtl8367c_setAsicGreenHighPriorityTraffic(rtk_uint32 port)
  *      Get indicator which ASIC had received high priority traffic or not
  * Input:
  *      port        - Physical port number (0~7)
- *      pIndicator  - Have received high priority traffic indicator. If 1 means ASCI had received high priority in 1second checking priod
+ *      pIndicator  - Have received high priority traffic indicator. If 1 means ASCI had received high priority in 1second checking period
  * Output:
  *      None
  * Return:
@@ -153,14 +153,14 @@ ret_t rtl8367c_getAsicGreenHighPriorityTraffic(rtk_uint32 port, rtk_uint32* pInd
 }
 
 /*
- at func rtk_int32 | rtl8367c_setAsicGreenEthernet | Set green ethernet function.
+ at func rtk_int32 | rtl8367c_setAsicGreenEthernet | Set green Ethernet function.
 @parm rtk_uint32 | green | Green feature function usage 1:enable 0:disable.
 @rvalue RT_ERR_OK | Success.
 @rvalue RT_ERR_SMI | SMI access error.
 @comm
     The API can set Green Ethernet function to reduce power consumption. While green feature is enabled, ASIC will automatic
  detect the cable length and then select different power mode for best performance with minimums power consumption. Link down
- ports will enter power savining mode in 10 seconds after the cable disconnected if power saving function is enabled.
+ ports will enter power saving mode in 10 seconds after the cable disconnected if power saving function is enabled.
 */
 ret_t rtl8367c_setAsicGreenEthernet(rtk_uint32 port, rtk_uint32 green)
 {
@@ -286,14 +286,14 @@ ret_t rtl8367c_setAsicGreenEthernet(rtk_uint32 port, rtk_uint32 green)
 }
 
 /*
- at func rtk_int32 | rtl8367c_getAsicGreenEthernet | Get green ethernet function.
+ at func rtk_int32 | rtl8367c_getAsicGreenEthernet | Get green Ethernet function.
 @parm rtk_uint32 | *green | Green feature function usage 1:enable 0:disable.
 @rvalue RT_ERR_OK | Success.
 @rvalue RT_ERR_SMI | SMI access error.
 @comm
     The API can set Green Ethernet function to reduce power consumption. While green feature is enabled, ASIC will automatic
  detect the cable length and then select different power mode for best performance with minimums power consumption. Link down
- ports will enter power savining mode in 10 seconds after the cable disconnected if power saving function is enabled.
+ ports will enter power saving mode in 10 seconds after the cable disconnected if power saving function is enabled.
 */
 ret_t rtl8367c_getAsicGreenEthernet(rtk_uint32 port, rtk_uint32* green)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c
index 435368d51b..1b8ef59d95 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_hsb.c
@@ -30,7 +30,7 @@
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_OUT_OF_RANGE - input parameter out of range
  * Note:
- *      System support 16 user defined field selctors.
+ *      System support 16 user defined field selectors.
  *      Each selector can be enabled or disable. User can defined retrieving 16-bits in many predefiend
  *      standard l2/l3/l4 payload.
  */
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c
index e0e734d61e..050f4bbc57 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_igmp.c
@@ -429,8 +429,8 @@ ret_t rtl8367c_setAsicIGMPRobVar(rtk_uint32 rob_var)
     if(rob_var > RTL8367C_MAX_ROB_VAR)
         return RT_ERR_OUT_OF_RANGE;
 
-    /* Bourstness variable */
     retVal = rtl8367c_setAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, rob_var);
+    /* Robustness variable */
     if(retVal != RT_ERR_OK)
         return retVal;
 
@@ -456,8 +456,8 @@ ret_t rtl8367c_getAsicIGMPRobVar(rtk_uint32 *prob_var)
     ret_t   retVal;
     rtk_uint32  value;
 
-    /* Bourstness variable */
     retVal = rtl8367c_getAsicRegBits(RTL8367C_REG_IGMP_MLD_CFG0, RTL8367C_ROBURSTNESS_VAR_MASK, &value);
+    /* Robustness variable */
     if(retVal != RT_ERR_OK)
         return retVal;
 
@@ -1813,7 +1813,7 @@ ret_t rtl8367c_getAsicIGMPReportLeaveFlood(rtk_uint32 *pFlood)
 /* Function Name:
  *      rtl8367c_setAsicIGMPDropLeaveZero
  * Description:
- *      Set the function of droppping Leave packet with group IP = 0.0.0.0
+ *      Set the function of dropping Leave packet with group IP = 0.0.0.0
  * Input:
  *      drop    - 1: Drop, 0:Bypass
  * Output:
@@ -1838,7 +1838,7 @@ ret_t rtl8367c_setAsicIGMPDropLeaveZero(rtk_uint32 drop)
 /* Function Name:
  *      rtl8367c_getAsicIGMPDropLeaveZero
  * Description:
- *      Get the function of droppping Leave packet with group IP = 0.0.0.0
+ *      Get the function of dropping Leave packet with group IP = 0.0.0.0
  * Input:
  *      None
  * Output:
@@ -1865,7 +1865,7 @@ ret_t rtl8367c_getAsicIGMPDropLeaveZero(rtk_uint32 *pDrop)
 /* Function Name:
  *      rtl8367c_setAsicIGMPBypassStormCTRL
  * Description:
- *      Set the function of bypass strom control for IGMP/MLD packet
+ *      Set the function of bypass storm control for IGMP/MLD packet
  * Input:
  *      bypass    - 1: Bypass, 0:not bypass
  * Output:
@@ -1890,7 +1890,7 @@ ret_t rtl8367c_setAsicIGMPBypassStormCTRL(rtk_uint32 bypass)
 /* Function Name:
  *      rtl8367c_getAsicIGMPBypassStormCTRL
  * Description:
- *      Set the function of bypass strom control for IGMP/MLD packet
+ *      Set the function of bypass storm control for IGMP/MLD packet
  * Input:
  *      None
  * Output:
@@ -1944,7 +1944,7 @@ ret_t rtl8367c_setAsicIGMPIsoLeaky(rtk_uint32 leaky)
  * Description:
  *      Get Port Isolation leaky for IGMP/MLD packet
  * Input:
- *      Noen
+ *      None
  * Output:
  *      pLeaky    - 1: Leaky, 0:not leaky
  * Return:
@@ -1996,7 +1996,7 @@ ret_t rtl8367c_setAsicIGMPVLANLeaky(rtk_uint32 leaky)
  * Description:
  *      Get VLAN leaky for IGMP/MLD packet
  * Input:
- *      Noen
+ *      None
  * Output:
  *      pLeaky    - 1: Leaky, 0:not leaky
  * Return:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c
index abb36bec2d..13a7b14246 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_inbwctrl.c
@@ -128,7 +128,7 @@ ret_t rtl8367c_getAsicPortIngressBandwidth(rtk_uint32 port, rtk_uint32* pBandwid
 /* Function Name:
  *      rtl8367c_setAsicPortIngressBandwidthBypass
  * Description:
- *      Set ingress bandwidth control bypasss 8899, RMA 01-80-C2-00-00-xx and IGMP
+ *      Set ingress bandwidth control bypass 8899, RMA 01-80-C2-00-00-xx and IGMP
  * Input:
  *      enabled - 1: enabled, 0: disabled
  * Output:
@@ -146,7 +146,7 @@ ret_t rtl8367c_setAsicPortIngressBandwidthBypass(rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicPortIngressBandwidthBypass
  * Description:
- *      Set ingress bandwidth control bypasss 8899, RMA 01-80-C2-00-00-xx and IGMP
+ *      Set ingress bandwidth control bypass 8899, RMA 01-80-C2-00-00-xx and IGMP
  * Input:
  *      pEnabled - 1: enabled, 0: disabled
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c
index fb6cbcdf1f..1d5ccfc904 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_interrupt.c
@@ -99,10 +99,10 @@ ret_t rtl8367c_getAsicInterruptMask(rtk_uint32* pImr)
  *      RT_ERR_OK   - Success
  *      RT_ERR_SMI  - SMI access error
  * Note:
- *      This API can be used to clear ASIC interrupt status and register will be cleared by writting 1.
+ *      This API can be used to clear ASIC interrupt status and register will be cleared by writing 1.
  *      [0]:Link change,
  *      [1]:Share meter exceed,
- *      [2]:Learn number overed,
+ *      [2]:Learn number over,
  *      [3]:Speed Change,
  *      [4]:Tx special congestion
  *      [5]:1 second green feature
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c
index 1189028161..6f2617f5aa 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_led.c
@@ -607,7 +607,7 @@ ret_t rtl8367c_getAsicLedSerialModeConfig(rtk_uint32 *active, rtk_uint32 *serimo
 
 /*
 @func ret_t | rtl8367c_setAsicLedOutputEnable | Set LED output enable
- at parm rtk_uint32 | enabled | enable or disalbe.
+ at parm rtk_uint32 | enabled | enable or disable.
 @rvalue RT_ERR_OK | Success.
 @rvalue RT_ERR_SMI | SMI access error.
 @rvalue RT_ERR_INPUT | Invalid input value.
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c
index 343a6f159c..f9f592ae72 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_lut.c
@@ -207,7 +207,7 @@ static void _rtl8367c_fdbStSmi2User( rtl8367c_luttb *pLutSt, rtk_uint16 *pFdbSmi
 /* Function Name:
  *      rtl8367c_setAsicLutIpMulticastLookup
  * Description:
- *      Set Lut IP multicast lookup function
+ *      Set LUT IP multicast lookup function
  * Input:
  *      enabled - 1: enabled, 0: disabled
  * Output:
@@ -225,7 +225,7 @@ ret_t rtl8367c_setAsicLutIpMulticastLookup(rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicLutIpMulticastLookup
  * Description:
- *      Get Lut IP multicast lookup function
+ *      Get LUT IP multicast lookup function
  * Input:
  *      pEnabled - 1: enabled, 0: disabled
  * Output:
@@ -244,7 +244,7 @@ ret_t rtl8367c_getAsicLutIpMulticastLookup(rtk_uint32* pEnabled)
 /* Function Name:
  *      rtl8367c_setAsicLutIpMulticastLookup
  * Description:
- *      Set Lut IP multicast + VID lookup function
+ *      Set LUT IP multicast + VID lookup function
  * Input:
  *      enabled - 1: enabled, 0: disabled
  * Output:
@@ -263,7 +263,7 @@ ret_t rtl8367c_setAsicLutIpMulticastVidLookup(rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicLutIpMulticastVidLookup
  * Description:
- *      Get Lut IP multicast lookup function
+ *      Get LUT IP multicast lookup function
  * Input:
  *      pEnabled - 1: enabled, 0: disabled
  * Output:
@@ -282,7 +282,7 @@ ret_t rtl8367c_getAsicLutIpMulticastVidLookup(rtk_uint32* pEnabled)
 /* Function Name:
  *      rtl8367c_setAsicLutIpLookupMethod
  * Description:
- *      Set Lut IP lookup hash with DIP or {DIP,SIP} pair
+ *      Set LUT IP lookup hash with DIP or {DIP,SIP} pair
  * Input:
  *      type - 1: When DIP can be found in IPMC_GROUP_TABLE, use DIP+SIP Hash, otherwise, use DIP+(SIP=0.0.0.0) Hash.
  *             0: When DIP can be found in IPMC_GROUP_TABLE, use DIP+(SIP=0.0.0.0) Hash, otherwise use DIP+SIP Hash.
@@ -301,7 +301,7 @@ ret_t rtl8367c_setAsicLutIpLookupMethod(rtk_uint32 type)
 /* Function Name:
  *      rtl8367c_getAsicLutIpLookupMethod
  * Description:
- *      Get Lut IP lookup hash with DIP or {DIP,SIP} pair
+ *      Get LUT IP lookup hash with DIP or {DIP,SIP} pair
  * Input:
  *      pType - 1: When DIP can be found in IPMC_GROUP_TABLE, use DIP+SIP Hash, otherwise, use DIP+(SIP=0.0.0.0) Hash.
  *              0: When DIP can be found in IPMC_GROUP_TABLE, use DIP+(SIP=0.0.0.0) Hash, otherwise use DIP+SIP Hash.
@@ -320,10 +320,10 @@ ret_t rtl8367c_getAsicLutIpLookupMethod(rtk_uint32* pType)
 /* Function Name:
  *      rtl8367c_setAsicLutAgeTimerSpeed
  * Description:
- *      Set LUT agging out speed
+ *      Set LUT ageing out speed
  * Input:
- *      timer - Agging out timer 0:Has been aged out
- *      speed - Agging out speed 0-fastest 3-slowest
+ *      timer - Ageing out timer 0:Has been aged out
+ *      speed - Ageing out speed 0-fastest 3-slowest
  * Output:
  *      None
  * Return:
@@ -346,10 +346,10 @@ ret_t rtl8367c_setAsicLutAgeTimerSpeed(rtk_uint32 timer, rtk_uint32 speed)
 /* Function Name:
  *      rtl8367c_getAsicLutAgeTimerSpeed
  * Description:
- *      Get LUT agging out speed
+ *      Get LUT ageing out speed
  * Input:
- *      pTimer - Agging out timer 0:Has been aged out
- *      pSpeed - Agging out speed 0-fastest 3-slowest
+ *      pTimer - Ageing out timer 0:Has been aged out
+ *      pSpeed - Ageing out speed 0-fastest 3-slowest
  * Output:
  *      None
  * Return:
@@ -378,7 +378,7 @@ ret_t rtl8367c_getAsicLutAgeTimerSpeed(rtk_uint32* pTimer, rtk_uint32* pSpeed)
 /* Function Name:
  *      rtl8367c_setAsicLutCamTbUsage
  * Description:
- *      Configure Lut CAM table usage
+ *      Configure LUT CAM table usage
  * Input:
  *      enabled - L2 CAM table usage 1: enabled, 0: disabled
  * Output:
@@ -400,7 +400,7 @@ ret_t rtl8367c_setAsicLutCamTbUsage(rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicLutCamTbUsage
  * Description:
- *      Get Lut CAM table usage
+ *      Get LUT CAM table usage
  * Input:
  *      pEnabled - L2 CAM table usage 1: enabled, 0: disabled
  * Output:
@@ -1142,7 +1142,7 @@ ret_t rtl8367c_getAsicLutFlushMode(rtk_uint32* pMode)
  * Description:
  *      Get L2 LUT flush type
  * Input:
- *      type    - 0: dynamice unicast; 1: both dynamic and static unicast entry
+ *      type    - 0: dynamic unicast; 1: both dynamic and static unicast entry
  * Output:
  *      None
  * Return:
@@ -1160,7 +1160,7 @@ ret_t rtl8367c_setAsicLutFlushType(rtk_uint32 type)
  * Description:
  *      Set L2 LUT flush type
  * Input:
- *      pType   - 0: dynamice unicast; 1: both dynamic and static unicast entry
+ *      pType   - 0: dynamic unicast; 1: both dynamic and static unicast entry
  * Output:
  *      None
  * Return:
@@ -1504,9 +1504,9 @@ ret_t rtl8367c_getAsicLutLinkDownForceAging(rtk_uint32 *pEnable)
 /* Function Name:
  *      rtl8367c_setAsicLutIpmcFwdRouterPort
  * Description:
- *       Set IPMC packet forward to rounter port also or not
+ *       Set IPMC packet forward to router port also or not
  * Input:
- *      enable      - 1: Inlcude router port, 0, exclude router port
+ *      enable      - 1: Include router port, 0, exclude router port
  * Output:
  *      None
  * Return:
@@ -1527,11 +1527,11 @@ ret_t rtl8367c_setAsicLutIpmcFwdRouterPort(rtk_uint32 enable)
 /* Function Name:
  *      rtl8367c_getAsicLutIpmcFwdRouterPort
  * Description:
- *       Get IPMC packet forward to rounter port also or not
+ *       Get IPMC packet forward to router port also or not
  * Input:
  *      None
  * Output:
- *      pEnable         - 1: Inlcude router port, 0, exclude router port
+ *      pEnable         - 1: Include router port, 0, exclude router port
  * Return:
  *      RT_ERR_OK               - Success
  *      RT_ERR_SMI              - SMI access error
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c
index c9aaa01d3e..7da098c49f 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_mib.c
@@ -22,7 +22,7 @@
  *      Reset global/queue manage or per-port MIB counter
  * Input:
  *      greset  - Global reset
- *      qmreset - Queue maganement reset
+ *      qmreset - Queue management reset
  *      portmask    - Port reset mask
  * Output:
  *      None
@@ -59,7 +59,7 @@ ret_t rtl8367c_setAsicMIBsCounterReset(rtk_uint32 greset, rtk_uint32 qmreset, rt
  * Input:
  *      port        - Physical port number (0~7)
  *      mibIdx      - MIB counter index
- *      pCounter    - MIB retrived counter
+ *      pCounter    - MIB retrieved counter
  * Output:
  *      None
  * Return:
@@ -69,9 +69,9 @@ ret_t rtl8367c_setAsicMIBsCounterReset(rtk_uint32 greset, rtk_uint32 qmreset, rt
  *      RT_ERR_BUSYWAIT_TIMEOUT - MIB is busy at retrieving
  *      RT_ERR_STAT_CNTR_FAIL   - MIB is resetting
  * Note:
- *      Before MIBs counter retrieving, writting accessing address to ASIC at first and check the MIB
+ *      Before MIBs counter retrieving, writing accessing address to ASIC at first and check the MIB
  *      control register status. If busy bit of MIB control is set, that means MIB counter have been
- *      waiting for preparing, then software must wait atfer this busy flag reset by ASIC. This driver
+ *      waiting for preparing, then software must wait after this busy flag reset by ASIC. This driver
  *      did not recycle reading user desired counter. Software must use driver again to get MIB counter
  *      if return value is not RT_ERR_OK.
  */
@@ -124,7 +124,7 @@ ret_t rtl8367c_getAsicMIBsCounter(rtk_uint32 port, RTL8367C_MIBCOUNTER mibIdx, r
 
     /*writing access counter address first*/
     /*This address is SRAM address, and SRAM address = MIB register address >> 2*/
-    /*then ASIC will prepare 64bits counter wait for being retrived*/
+    /*then ASIC will prepare 64bits counter wait for being retrieved*/
     /*Write Mib related address to access control register*/
     retVal = rtl8367c_setAsicReg(RTL8367C_REG_MIB_ADDRESS, (mibAddr >> 2));
     if(retVal != RT_ERR_OK)
@@ -183,7 +183,7 @@ ret_t rtl8367c_getAsicMIBsCounter(rtk_uint32 port, RTL8367C_MIBCOUNTER mibIdx, r
 /* Function Name:
  *      rtl8367c_getAsicMIBsLogCounter
  * Description:
- *      Get MIBs Loggin counter
+ *      Get MIBs Logging counter
  * Input:
  *      index       - The index of 32 logging counter (0 ~ 31)
  * Output:
@@ -260,7 +260,7 @@ ret_t rtl8367c_getAsicMIBsLogCounter(rtk_uint32 index, rtk_uint32 *pCounter)
  *      RT_ERR_OK               - Success
  *      RT_ERR_SMI              - SMI access error
  * Note:
- *      Software need to check this control register atfer doing port resetting or global resetting
+ *      Software need to check this control register after doing port resetting or global resetting
  */
 ret_t rtl8367c_getAsicMIBsControl(rtk_uint32* pMask)
 {
@@ -513,7 +513,7 @@ ret_t rtl8367c_setAsicMIBsResetLoggingCounter(rtk_uint32 index)
 /* Function Name:
  *      rtl8367c_setAsicMIBsLength
  * Description:
- *      Set MIB length couting mode
+ *      Set MIB length counting mode
  * Input:
  *      txLengthMode    - 0: tag length doesn't be counted. 1: tag length is counted.
  *      rxLengthMode    - 0: tag length doesn't be counted. 1: tag length is counted.
@@ -542,7 +542,7 @@ ret_t rtl8367c_setAsicMIBsLength(rtk_uint32 txLengthMode, rtk_uint32 rxLengthMod
 /* Function Name:
  *      rtl8367c_setAsicMIBsLength
  * Description:
- *      Set MIB length couting mode
+ *      Set MIB length counting mode
  * Input:
  *      None.
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c
index 89c3c3e02e..69081049e3 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_qos.c
@@ -11,7 +11,7 @@
  * $Date: 2017-03-08 15:13:58 +0800 (??, 08 ?? 2017) $
  *
  * Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Qos related functions
+ * Feature : QoS related functions
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c
index 8ebd6796dc..32d9b20840 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_scheduling.c
@@ -19,7 +19,7 @@
 /* Function Name:
  *      rtl8367c_setAsicLeakyBucketParameter
  * Description:
- *      Set Leaky Bucket Paramters
+ *      Set Leaky Bucket Parameters
  * Input:
  *      tick    - Tick is used for time slot size unit
  *      token   - Token is used for adding budget in each time slot
@@ -55,7 +55,7 @@ ret_t rtl8367c_setAsicLeakyBucketParameter(rtk_uint32 tick, rtk_uint32 token)
 /* Function Name:
  *      rtl8367c_getAsicLeakyBucketParameter
  * Description:
- *      Get Leaky Bucket Paramters
+ *      Get Leaky Bucket Parameters
  * Input:
  *      tick    - Tick is used for time slot size unit
  *      token   - Token is used for adding budget in each time slot
@@ -166,7 +166,7 @@ ret_t rtl8367c_getAsicAprMeter(rtk_uint32 port, rtk_uint32 qid, rtk_uint32 *apri
  *      Set per-port APR enable
  * Input:
  *      port        - Physical port number (0~7)
- *      aprEnable   - APR enable seting 1:enable 0:disable
+ *      aprEnable   - APR enable setting 1:enable 0:disable
  * Output:
  *      None
  * Return:
@@ -193,7 +193,7 @@ ret_t rtl8367c_setAsicAprEnable(rtk_uint32 port, rtk_uint32 aprEnable)
  *      Get per-port APR enable
  * Input:
  *      port        - Physical port number (0~7)
- *      aprEnable   - APR enable seting 1:enable 0:disable
+ *      aprEnable   - APR enable setting 1:enable 0:disable
  * Output:
  *      None
  * Return:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c
index f19ceba5a9..e199664b5e 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_svlan.c
@@ -140,7 +140,7 @@ ret_t rtl8367c_getAsicSvlanUplinkPortMask(rtk_uint32* pPortmask)
  *      RT_ERR_SMI  - SMI access error
  * Note:
  *      Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200
- *      for Q-in-Q SLAN design. User can set mathced ether type as service provider supported protocol
+ *      for Q-in-Q SLAN design. User can set matched ether type as service provider supported protocol
  */
 ret_t rtl8367c_setAsicSvlanTpid(rtk_uint32 protocolType)
 {
@@ -344,7 +344,7 @@ ret_t rtl8367c_getAsicSvlanDefaultVlan(rtk_uint32 port, rtk_uint32* pIndex)
 /* Function Name:
  *      rtl8367c_setAsicSvlanIngressUntag
  * Description:
- *      Set action received un-Stag frame from unplink port
+ *      Set action received un-Stag frame from uplink port
  * Input:
  *      mode        - 0:Drop 1:Trap 2:Assign SVLAN
  * Output:
@@ -362,7 +362,7 @@ ret_t rtl8367c_setAsicSvlanIngressUntag(rtk_uint32 mode)
 /* Function Name:
  *      rtl8367c_getAsicSvlanIngressUntag
  * Description:
- *      Get action received un-Stag frame from unplink port
+ *      Get action received un-Stag frame from uplink port
  * Input:
  *      pMode       - 0:Drop 1:Trap 2:Assign SVLAN
  * Output:
@@ -380,7 +380,7 @@ ret_t rtl8367c_getAsicSvlanIngressUntag(rtk_uint32* pMode)
 /* Function Name:
  *      rtl8367c_setAsicSvlanIngressUnmatch
  * Description:
- *      Set action received unmatched Stag frame from unplink port
+ *      Set action received unmatched Stag frame from uplink port
  * Input:
  *      mode        - 0:Drop 1:Trap 2:Assign SVLAN
  * Output:
@@ -398,7 +398,7 @@ ret_t rtl8367c_setAsicSvlanIngressUnmatch(rtk_uint32 mode)
 /* Function Name:
  *      rtl8367c_getAsicSvlanIngressUnmatch
  * Description:
- *      Get action received unmatched Stag frame from unplink port
+ *      Get action received unmatched Stag frame from uplink port
  * Input:
  *      pMode       - 0:Drop 1:Trap 2:Assign SVLAN
  * Output:
@@ -417,7 +417,7 @@ ret_t rtl8367c_getAsicSvlanIngressUnmatch(rtk_uint32* pMode)
 /* Function Name:
  *      rtl8367c_setAsicSvlanEgressUnassign
  * Description:
- *      Set unplink stream without egress SVID action
+ *      Set uplink stream without egress SVID action
  * Input:
  *      enabled     - 1:Trap egress unassigned frames to CPU, 0: Use SVLAN setup in VS_CPSVIDX as egress SVID
  * Output:
@@ -435,7 +435,7 @@ ret_t rtl8367c_setAsicSvlanEgressUnassign(rtk_uint32 enabled)
 /* Function Name:
  *      rtl8367c_getAsicSvlanEgressUnassign
  * Description:
- *      Get unplink stream without egress SVID action
+ *      Get uplink stream without egress SVID action
  * Input:
  *      pEnabled    - 1:Trap egress unassigned frames to CPU, 0: Use SVLAN setup in VS_CPSVIDX as egress SVID
  * Output:
@@ -580,7 +580,7 @@ ret_t rtl8367c_getAsicSvlanMemberConfiguration(rtk_uint32 index,rtl8367c_svlan_m
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_ENTRY_INDEX  - Invalid entry index
  * Note:
- *      ASIC will check upstream's VID and assign related SVID to mathed packet
+ *      ASIC will check upstream's VID and assign related SVID to matched packet
  */
 ret_t rtl8367c_setAsicSvlanC2SConf(rtk_uint32 index, rtk_uint32 evid, rtk_uint32 portmask, rtk_uint32 svidx)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_unknownMulticast.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_unknownMulticast.c
index fcebd1b7f7..a3455bbebd 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_unknownMulticast.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/rtl8367c_asicdrv_unknownMulticast.c
@@ -11,7 +11,7 @@
  * $Date: 2017-03-08 15:13:58 +0800 (??, 08 ?? 2017) $
  *
  * Purpose : RTL8367C switch high-level API for RTL8367C
- * Feature : Unkown multicast related functions
+ * Feature : Unknown multicast related functions
  *
  */
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/smi.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/smi.c
index c272cad48e..70e767f422 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/smi.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/smi.c
@@ -421,7 +421,7 @@ rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData)
     con = 0;
     do {
         con++;
-        _smi_readBit(1, &ACK);                    /* ACK for writting data [7:0] */
+        _smi_readBit(1, &ACK);                    /* ACK for writing data [7:0] */
     } while ((ACK != 0) && (con < ack_timer));
     if (ACK != 0) ret = RT_ERR_FAILED;
 
@@ -430,7 +430,7 @@ rtk_int32 smi_write(rtk_uint32 mAddrs, rtk_uint32 rData)
     con = 0;
     do {
         con++;
-        _smi_readBit(1, &ACK);                        /* ACK for writting data [15:8] */
+        _smi_readBit(1, &ACK);                        /* ACK for writing data [15:8] */
     } while ((ACK != 0) && (con < ack_timer));
     if (ACK != 0) ret = RT_ERR_FAILED;
 
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c
index 2fed6d9fc8..3fd028a296 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/stat.c
@@ -265,7 +265,7 @@ static rtk_api_ret_t _get_asic_mib_idx(rtk_stat_port_type_t cnt_idx, RTL8367C_MI
  *      port        - port id.
  *      cntr_idx    - port counter index.
  * Output:
- *      pCntr - MIB retrived counter.
+ *      pCntr - MIB retrieved counter.
  * Return:
  *      RT_ERR_OK           - OK
  *      RT_ERR_FAILED       - Failed
@@ -592,7 +592,7 @@ rtk_api_ret_t rtk_stat_lengthMode_set(rtk_stat_lengthMode_t txMode, rtk_stat_len
 /* Function Name:
  *      rtk_stat_lengthMode_get
  * Description:
- *      Get Legnth mode.
+ *      Get Length mode.
  * Input:
  *      None.
  * Output:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/storm.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/storm.c
index 13cf4e3cb4..68063cdfa7 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/storm.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/storm.c
@@ -279,7 +279,7 @@ rtk_api_ret_t rtk_rate_stormControlPortEnable_get(rtk_port_t port, rtk_rate_stor
  *      RT_ERR_ENABLE       - Invalid IFG parameter
  * Note:
  *
- *      This API can set per-port bypass stomr filter control frame type including RMA and igmp.
+ *      This API can set per-port bypass storm filter control frame type including RMA and IGMP.
  *      The bypass frame type is as following:
  *      - BYPASS_BRG_GROUP,
  *      - BYPASS_FD_PAUSE,
@@ -414,7 +414,7 @@ rtk_api_ret_t rtk_storm_bypass_set(rtk_storm_bypass_t type, rtk_enable_t enable)
  *      RT_ERR_SMI          - SMI access error
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
- *      This API can get per-port bypass stomr filter control frame type including RMA and igmp.
+ *      This API can get per-port bypass storm filter control frame type including RMA and IGMP.
  *      The bypass frame type is as following:
  *      - BYPASS_BRG_GROUP,
  *      - BYPASS_FD_PAUSE,
@@ -526,7 +526,7 @@ rtk_api_ret_t rtk_storm_bypass_get(rtk_storm_bypass_t type, rtk_enable_t *pEnabl
 /* Function Name:
  *      rtk_rate_stormControlExtPortmask_set
  * Description:
- *      Set externsion storm control port mask
+ *      Set extension storm control port mask
  * Input:
  *      pPortmask  - port mask
  * Output:
@@ -562,7 +562,7 @@ rtk_api_ret_t rtk_rate_stormControlExtPortmask_set(rtk_portmask_t *pPortmask)
 /* Function Name:
  *      rtk_rate_stormControlExtPortmask_get
  * Description:
- *      Set externsion storm control port mask
+ *      Set extension storm control port mask
  * Input:
  *      None
  * Output:
@@ -598,10 +598,10 @@ rtk_api_ret_t rtk_rate_stormControlExtPortmask_get(rtk_portmask_t *pPortmask)
 /* Function Name:
  *      rtk_rate_stormControlExtEnable_set
  * Description:
- *      Set externsion storm control state
+ *      Set extension storm control state
  * Input:
  *      stormType   - storm group type
- *      enable      - externsion storm control state
+ *      enable      - extension storm control state
  * Output:
  *      None
  * Return:
@@ -653,11 +653,11 @@ rtk_api_ret_t rtk_rate_stormControlExtEnable_set(rtk_rate_storm_group_t stormTyp
 /* Function Name:
  *      rtk_rate_stormControlExtEnable_get
  * Description:
- *      Get externsion storm control state
+ *      Get extension storm control state
  * Input:
  *      stormType   - storm group type
  * Output:
- *      pEnable     - externsion storm control state
+ *      pEnable     - extension storm control state
  * Return:
  *      RT_ERR_OK
  *      RT_ERR_FAILED
@@ -707,10 +707,10 @@ rtk_api_ret_t rtk_rate_stormControlExtEnable_get(rtk_rate_storm_group_t stormTyp
 /* Function Name:
  *      rtk_rate_stormControlExtMeterIdx_set
  * Description:
- *      Set externsion storm control meter index
+ *      Set extension storm control meter index
  * Input:
  *      stormType   - storm group type
- *      index       - externsion storm control state
+ *      index       - extension storm control state
  * Output:
  *      None
  * Return:
@@ -762,10 +762,10 @@ rtk_api_ret_t rtk_rate_stormControlExtMeterIdx_set(rtk_rate_storm_group_t stormT
 /* Function Name:
  *      rtk_rate_stormControlExtMeterIdx_get
  * Description:
- *      Get externsion storm control meter index
+ *      Get extension storm control meter index
  * Input:
  *      stormType   - storm group type
- *      pIndex      - externsion storm control state
+ *      pIndex      - extension storm control state
  * Output:
  *      None
  * Return:
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/svlan.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/svlan.c
index bf4ef044d1..067291526a 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/svlan.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/svlan.c
@@ -41,7 +41,7 @@ rtk_svlan_lookupType_t  svlan_lookupType;
  *      RT_ERR_SMI          - SMI access error
  * Note:
  *      Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200 for Q-in-Q SLAN design.
- *      User can set mathced ether type as service provider supported protocol.
+ *      User can set matched ether type as service provider supported protocol.
  */
 rtk_api_ret_t rtk_svlan_init(void)
 {
@@ -250,7 +250,7 @@ rtk_api_ret_t rtk_svlan_servicePort_del(rtk_port_t port)
  *      RT_ERR_INPUT        - Invalid input parameter.
  * Note:
  *      Ether type of S-tag in 802.1ad is 0x88a8 and there are existed ether type 0x9100 and 0x9200 for Q-in-Q SLAN design.
- *      User can set mathced ether type as service provider supported protocol.
+ *      User can set matched ether type as service provider supported protocol.
  */
 rtk_api_ret_t rtk_svlan_tpidEntry_set(rtk_svlan_tpid_t svlan_tag_id)
 {
@@ -391,8 +391,8 @@ rtk_api_ret_t rtk_svlan_priorityRef_get(rtk_svlan_pri_ref_t *pRef)
  *      RT_ERR_PORT_MASK        - Invalid portmask.
  *      RT_ERR_SVLAN_TABLE_FULL - SVLAN configuration is full.
  * Note:
- *      The API can set system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted
- *      to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped by default setup.
+ *      The API can set system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted
+ *      to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped by default setup.
  *      - rtk_svlan_memberCfg_t->svid is SVID of SVLAN member configuration.
  *      - rtk_svlan_memberCfg_t->memberport is member port mask of SVLAN member configuration.
  *      - rtk_svlan_memberCfg_t->fid is filtering database of SVLAN member configuration.
@@ -626,8 +626,8 @@ rtk_api_ret_t rtk_svlan_memberPortEntry_set(rtk_vlan_t svid, rtk_svlan_memberCfg
  *      RT_ERR_SVLAN_ENTRY_NOT_FOUND    - specified svlan entry not found.
  *      RT_ERR_INPUT                    - Invalid input parameters.
  * Note:
- *      The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted
- *      to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped.
+ *      The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted
+ *      to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped.
  */
 rtk_api_ret_t rtk_svlan_memberPortEntry_get(rtk_vlan_t svid, rtk_svlan_memberCfg_t *pSvlan_cfg)
 {
@@ -794,8 +794,8 @@ rtk_api_ret_t rtk_svlan_memberPortEntry_adv_set(rtk_uint32 idx, rtk_svlan_member
  *      RT_ERR_SVLAN_ENTRY_NOT_FOUND    - specified svlan entry not found.
  *      RT_ERR_INPUT                    - Invalid input parameters.
  * Note:
- *      The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accpeted
- *      to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be droped.
+ *      The API can get system 64 accepted s-tag frame format. Only 64 SVID S-tag frame will be accepted
+ *      to receiving from uplink ports. Other SVID S-tag frame or S-untagged frame will be dropped.
  */
 rtk_api_ret_t rtk_svlan_memberPortEntry_adv_get(rtk_uint32 idx, rtk_svlan_memberCfg_t *pSvlan_cfg)
 {
@@ -948,7 +948,7 @@ rtk_api_ret_t rtk_svlan_defaultSvlan_get(rtk_port_t port, rtk_vlan_t *pSvid)
  *      RT_ERR_INPUT        - Invalid input parameters.
  * Note:
  *      The API can set system C2S configuration. ASIC will check upstream's VID and assign related
- *      SVID to mathed packet. There are 128 SVLAN C2S configurations.
+ *      SVID to matched packet. There are 128 SVLAN C2S configurations.
  */
 rtk_api_ret_t rtk_svlan_c2s_add(rtk_vlan_t vid, rtk_port_t src_port, rtk_vlan_t svid)
 {
@@ -1011,7 +1011,7 @@ rtk_api_ret_t rtk_svlan_c2s_add(rtk_vlan_t vid, rtk_port_t src_port, rtk_vlan_t
                 }
                 else
                 {
-                    /* New svidx, remove src_port and find a new slot to add a new enrty */
+                    /* New svidx, remove src_port and find a new slot to add a new entry */
                     pmsk = pmsk & ~(1 << phyPort);
                     if(pmsk == 0)
                         c2s_svidx = 0;
@@ -1263,7 +1263,7 @@ rtk_api_ret_t rtk_svlan_untag_action_set(rtk_svlan_untag_action_t action, rtk_vl
  * Note:
  *      The API can Get action of downstream Un-Stag packet. A SVID assigned
  *      to the un-stag is also retrieved by this API. The parameter pSvid is
- *      only refernced when the action is UNTAG_ASSIGN
+ *      only referenced when the action is UNTAG_ASSIGN
  */
 rtk_api_ret_t rtk_svlan_untag_action_get(rtk_svlan_untag_action_t *pAction, rtk_vlan_t *pSvid)
 {
@@ -1313,8 +1313,8 @@ rtk_api_ret_t rtk_svlan_untag_action_get(rtk_svlan_untag_action_t *pAction, rtk_
  *      RT_ERR_INPUT                    - Invalid input parameters.
  * Note:
  *      The API can configure action of downstream Un-match packet. A SVID assigned
- *      to the un-match is also supported by this API. The parameter od svid is
- *      only refernced when the action is set to UNMATCH_ASSIGN
+ *      to the un-match is also supported by this API. The parameter of svid is
+ *      only referenced when the action is set to UNMATCH_ASSIGN
  */
 rtk_api_ret_t rtk_svlan_unmatch_action_set(rtk_svlan_unmatch_action_t action, rtk_vlan_t svid)
 {
@@ -1379,7 +1379,7 @@ rtk_api_ret_t rtk_svlan_unmatch_action_set(rtk_svlan_unmatch_action_t action, rt
  * Note:
  *      The API can Get action of downstream Un-match packet. A SVID assigned
  *      to the un-match is also retrieved by this API. The parameter pSvid is
- *      only refernced when the action is UNMATCH_ASSIGN
+ *      only referenced when the action is UNMATCH_ASSIGN
  */
 rtk_api_ret_t rtk_svlan_unmatch_action_get(rtk_svlan_unmatch_action_t *pAction, rtk_vlan_t *pSvid)
 {
@@ -1567,7 +1567,7 @@ rtk_api_ret_t rtk_svlan_dmac_vidsel_get(rtk_port_t port, rtk_enable_t *pEnable)
  *      RT_ERR_OUT_OF_RANGE             - input out of range.
  *      RT_ERR_INPUT                    - Invalid input parameters.
  * Note:
- *      The API can set IP mutlicast to SVID configuration. If upstream packet is IPv4 multicast
+ *      The API can set IP multicast to SVID configuration. If upstream packet is IPv4 multicast
  *      packet and DIP is matched MC2S configuration, ASIC will assign egress SVID to the packet.
  *      There are 32 SVLAN multicast configurations for IP and L2 multicast.
  */
@@ -1662,7 +1662,7 @@ rtk_api_ret_t rtk_svlan_ipmc2s_add(ipaddr_t ipmc, ipaddr_t ipmcMsk,rtk_vlan_t sv
  *      RT_ERR_SVLAN_VID        - Invalid SVLAN VID parameter.
  *      RT_ERR_OUT_OF_RANGE     - input out of range.
  * Note:
- *      The API can delete IP mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
+ *      The API can delete IP multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
  */
 rtk_api_ret_t rtk_svlan_ipmc2s_del(ipaddr_t ipmc, ipaddr_t ipmcMsk)
 {
@@ -1714,7 +1714,7 @@ rtk_api_ret_t rtk_svlan_ipmc2s_del(ipaddr_t ipmc, ipaddr_t ipmcMsk)
  *      RT_ERR_INPUT        - Invalid input parameters.
  *      RT_ERR_OUT_OF_RANGE - input out of range.
  * Note:
- *      The API can get IP mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
+ *      The API can get IP multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
  */
 rtk_api_ret_t rtk_svlan_ipmc2s_get(ipaddr_t ipmc, ipaddr_t ipmcMsk, rtk_vlan_t *pSvid)
 {
@@ -1771,7 +1771,7 @@ rtk_api_ret_t rtk_svlan_ipmc2s_get(ipaddr_t ipmc, ipaddr_t ipmcMsk, rtk_vlan_t *
  *      RT_ERR_OUT_OF_RANGE             - input out of range.
  *      RT_ERR_INPUT                    - Invalid input parameters.
  * Note:
- *      The API can set L2 Mutlicast to SVID configuration. If upstream packet is L2 multicast
+ *      The API can set L2 Multicast to SVID configuration. If upstream packet is L2 multicast
  *      packet and DMAC is matched, ASIC will assign egress SVID to the packet. There are 32
  *      SVLAN multicast configurations for IP and L2 multicast.
  */
@@ -1868,7 +1868,7 @@ rtk_api_ret_t rtk_svlan_l2mc2s_add(rtk_mac_t mac, rtk_mac_t macMsk, rtk_vlan_t s
  *      RT_ERR_SVLAN_VID        - Invalid SVLAN VID parameter.
  *      RT_ERR_OUT_OF_RANGE     - input out of range.
  * Note:
- *      The API can delete Mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
+ *      The API can delete Multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
  */
 rtk_api_ret_t rtk_svlan_l2mc2s_del(rtk_mac_t mac, rtk_mac_t macMsk)
 {
@@ -1924,7 +1924,7 @@ rtk_api_ret_t rtk_svlan_l2mc2s_del(rtk_mac_t mac, rtk_mac_t macMsk)
  *      RT_ERR_INPUT            - Invalid input parameters.
  *      RT_ERR_OUT_OF_RANGE     - input out of range.
  * Note:
- *      The API can get L2 mutlicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
+ *      The API can get L2 multicast to SVID configuration. There are 32 SVLAN multicast configurations for IP and L2 multicast.
  */
 rtk_api_ret_t rtk_svlan_l2mc2s_get(rtk_mac_t mac, rtk_mac_t macMsk, rtk_vlan_t *pSvid)
 {
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c
index 031eabf2ef..b407c3008c 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367c/vlan.c
@@ -106,7 +106,7 @@ rtk_api_ret_t rtk_vlan_init(void)
             return retVal;
     }
 
-    /* Updata Databse */
+    /* Update Database */
     vlan_mbrCfgUsage[0] = MBRCFG_USED_BY_VLAN;
     vlan_mbrCfgVid[0] = 1;
 
@@ -1576,7 +1576,7 @@ rtk_api_ret_t rtk_vlan_stg_get(rtk_vlan_t vid, rtk_stp_msti_id_t *pStg)
  *      Set port-based filtering database
  * Input:
  *      port - Port id.
- *      enable - ebable port-based FID
+ *      enable - enable port-based FID
  *      fid - Specified filtering database.
  * Output:
  *      None
@@ -1624,7 +1624,7 @@ rtk_api_ret_t rtk_vlan_portFid_set(rtk_port_t port, rtk_enable_t enable, rtk_fid
  * Input:
  *      port - Port id.
  * Output:
- *      pEnable - ebable port-based FID
+ *      pEnable - enable port-based FID
  *      pFid - Specified filtering database.
  * Return:
  *      RT_ERR_OK              - OK
diff --git a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c
index 08d2b57d43..b4d4554d4f 100644
--- a/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c
+++ b/target/linux/mediatek/files/drivers/net/phy/rtk/rtl8367s_mdio.c
@@ -211,7 +211,7 @@ void init_gsw(void)
 	set_rtl8367s_rgmii();
 }
 
-// bleow are platform driver
+// below are platform driver
 static const struct of_device_id rtk_gsw_match[] = {
 	{ .compatible = "mediatek,rtk-gsw" },
 	{},
@@ -258,7 +258,7 @@ static int rtk_gsw_probe(struct platform_device *pdev)
 
 	init_gsw();
 
-	//init default vlan or init swocnfig
+	//init default vlan or init swconfig
 	if(!of_property_read_string(pdev->dev.of_node,
 						"mediatek,port_map", &pm)) {
 



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:03 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Run script relative to the
 script dir
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26617.1712938868.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9f0cc3eb11074773f683ccd570991a0c74b17d72

commit 9f0cc3eb11074773f683ccd570991a0c74b17d72
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Thu Mar 21 10:27:44 2024 +0100

    scripts/kernel_bump: Run script relative to the script dir
    
    Determine the target directory based on the script location, which might
    work better in some cases, but at least also allows the script to be ran
    from with any location in the OpenWRT repository.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 24 ++++++++++++++----------
 1 file changed, 14 insertions(+), 10 deletions(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 5c147d78a5..69045946e9 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -59,6 +59,7 @@ usage()
 	echo "    -t  Target version of kernel (e.g. 'v6.6' [TARGET_VERSION]')"
 	echo
 	echo 'All options can also be passed in environment variables (listed between [BRACKETS]).'
+	echo 'Note that this script must be run from within the OpenWrt git repository.'
 	echo 'Example: scripts/kernel_bump.sh -p realtek -s v6.1 -t v6.6'
 }
 
@@ -74,6 +75,8 @@ cleanup()
 
 init()
 {
+	src_file="$(readlink -f "${0}")"
+	src_dir="${src_file%%"${src_file##*'/'}"}"
 	initial_branch="$(git rev-parse --abbrev-ref HEAD)"
 	initial_commitish="$(git rev-parse HEAD)"
 
@@ -82,6 +85,11 @@ init()
 		exit 1
 	fi
 
+	if [ -n "${src_dir##*'/scripts/'}" ]; then
+		echo "This script '${src_file}' is not in the scripts subdirectory, this is unexpected, cannot continue."
+		exit 1
+	fi
+
 	source_version="${source_version#v}"
 	target_version="${target_version#v}"
 
@@ -90,20 +98,16 @@ init()
 
 bump_kernel()
 {
-	platform_name="${platform_name##*'/'}"
-
-	if [ -z "${platform_name:-}" ]; then
-		platform_name="${PWD##*'/'}"
+	if [ -z "${platform_name}" ] || \
+	   [ -d "${PWD}/image" ]; then
+		platform_name="${PWD}"
 	fi
+	platform_name="${platform_name##*'/'}"
 
-	if [ "${PWD##*'/'}" = "${platform_name}" ]; then
-		_target_dir='./'
-	else
-		_target_dir="target/linux/${platform_name}"
-	fi
+	_target_dir="${src_dir}/../target/linux/${platform_name}"
 
 	if [ ! -d "${_target_dir}/image" ]; then
-		e_err 'Cannot find target linux directory.'
+		e_err "Cannot find target linux directory '${_target_dir:-not defined}'. Not in a platform directory, or -p not set."
 		exit 1
 	fi
 



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:02 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Do no run on dirty
 repositories
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26618.1712938869.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f9ac106779022c41b393c80c0e1ac3e079db1343

commit f9ac106779022c41b393c80c0e1ac3e079db1343
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Mon Mar 18 13:09:23 2024 +0100

    scripts/kernel_bump: Do no run on dirty repositories
    
    We want to avoid starting a process when we know it will fail later.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 90e47789c3..5c147d78a5 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -77,6 +77,11 @@ init()
 	initial_branch="$(git rev-parse --abbrev-ref HEAD)"
 	initial_commitish="$(git rev-parse HEAD)"
 
+	if [ -n "$(git status --porcelain | grep -v '^?? .*')" ]; then
+		echo 'Git respository not in a clean state, will not continue.'
+		exit 1
+	fi
+
 	source_version="${source_version#v}"
 	target_version="${target_version#v}"
 



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:04 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Allow for migrating only
 configuration files
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26619.1712938869.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9e6c4392f85f9123fda8ef8690c2a36599fe334c

commit 9e6c4392f85f9123fda8ef8690c2a36599fe334c
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Mon Mar 18 13:10:31 2024 +0100

    scripts/kernel_bump: Allow for migrating only configuration files
    
    In some cases, we want to only migrate configuration files, e.g. if the
    kernel was bumped already. Lets add a flag for this case to offer
    flexibility. By default we will migrate configuration flags as before.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 40 +++++++++++++++++++++++-----------------
 1 file changed, 23 insertions(+), 17 deletions(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 69045946e9..069f53bb77 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -54,6 +54,7 @@ usage()
 {
 	echo "Usage: ${0}"
 	echo 'Helper script to bump the target kernel version, whilst keeping history.'
+	echo '    -c  Migrate config files (e.g. subtargets) only.'
 	echo "    -p  Optional Platform name (e.g. 'ath79' [PLATFORM_NAME]"
 	echo "    -s  Source version of kernel (e.g. 'v6.1' [SOURCE_VERSION])"
 	echo "    -t  Target version of kernel (e.g. 'v6.6' [TARGET_VERSION]')"
@@ -113,22 +114,24 @@ bump_kernel()
 
 	git switch --force-create '__openwrt_kernel_files_mover'
 
-	for _path in "${_target_dir}/"*; do
-		if [ ! -s "${_path}" ] || \
-		   [ "${_path}" = "${_path%%"-${source_version}"}" ]; then
-			continue
-		fi
-
-		_target_path="${_path%%"-${source_version}"}-${target_version}"
-		if [ -s "${_target_path}" ]; then
-			e_err "Target '${_target_path}' already exists!"
-			exit 1
-		fi
-
-		git mv \
-			"${_path}" \
-			"${_target_path}"
-	done
+	if [ "${config_only:-false}" != 'true' ]; then
+		for _path in "${_target_dir}/"*; do
+			if [ ! -e "${_path}" ] || \
+			   [ "${_path}" = "${_path%%"-${source_version}"}" ]; then
+				continue
+			fi
+
+			_target_path="${_path%%"-${source_version}"}-${target_version}"
+			if [ -e "${_target_path}" ]; then
+				e_err "Target '${_target_path}' already exists!"
+				exit 1
+			fi
+
+			git mv \
+				"${_path}" \
+				"${_target_path}"
+		done
+	fi
 
 	find "${_target_dir}" -iname "config-${source_version}" | while read -r _config; do
 		_path="${_config%%"/config-${source_version}"}"
@@ -182,8 +185,11 @@ check_requirements()
 
 main()
 {
-	while getopts 'hp:s:t:' _options; do
+	while getopts 'chp:s:t:' _options; do
 		case "${_options}" in
+		'c')
+			config_only='true'
+			;;
 		'h')
 			usage
 			exit 0



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:07 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Allow bumping sub-targets
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26620.1712938869.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/71c663bcfd6e7839ef3a21482ee939bc0b1ff65c

commit 71c663bcfd6e7839ef3a21482ee939bc0b1ff65c
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Mon Mar 18 13:40:50 2024 +0100

    scripts/kernel_bump: Allow bumping sub-targets
    
    Some targets may need to bump specific sub-targets only. So lets offer
    this as an option.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 17 +++++++++++++++--
 1 file changed, 15 insertions(+), 2 deletions(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 7ce3b6256f..1a6e5e5ea7 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -58,6 +58,7 @@ usage()
 	echo 'Helper script to bump the target kernel version, whilst keeping history.'
 	echo '    -c  Migrate config files (e.g. subtargets) only.'
 	echo "    -p  Optional Platform name (e.g. 'ath79' [PLATFORM_NAME]"
+	echo "    -r  Optional comma separated list of sub-targets (e.g. 'rtl930x' [SUBTARGET_NAMES]"
 	echo "    -s  Source version of kernel (e.g. 'v6.1' [SOURCE_VERSION])"
 	echo "    -t  Target version of kernel (e.g. 'v6.6' [TARGET_VERSION]')"
 	echo
@@ -145,7 +146,15 @@ bump_kernel()
 		fi
 
 		_subtarget="${_config%%"/config-${source_version}"}"
-		git mv "${_config}" "${_subtarget}/config-${target_version}"
+		if [ -n "${subtarget_names:-}" ]; then
+			echo "${subtarget_names:-}" | while IFS=',' read -r _subtarget_name; do
+				if [ "${_subtarget_name}" = "${_subtarget##*'/'}" ]; then
+					git mv "${_config}" "${_subtarget}/config-${target_version}"
+				fi
+			done
+		else
+			git mv "${_config}" "${_subtarget}/config-${target_version}"
+		fi
 	done
 
 	git commit \
@@ -195,7 +204,7 @@ check_requirements()
 
 main()
 {
-	while getopts 'chp:s:t:' _options; do
+	while getopts 'chp:r:s:t:' _options; do
 		case "${_options}" in
 		'c')
 			config_only='true'
@@ -207,6 +216,9 @@ main()
 		'p')
 			platform_name="${OPTARG}"
 			;;
+		'r')
+			subtarget_names="${OPTARG}"
+			;;
 		's')
 			source_version="${OPTARG}"
 			;;
@@ -226,6 +238,7 @@ main()
 	shift "$((OPTIND - 1))"
 
 	platform_name="${platform_name:-${PLATFORM_NAME:-}}"
+	subtarget_names="${subtarget_names:-${SUBTARGET_NAMES:-}}"
 	source_version="${source_version:-${SOURCE_VERSION:-}}"
 	target_version="${target_version:-${TARGET_VERSION:-}}"
 



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:01 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Improve omitted version error
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26621.1712938874.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ed896c32b09e3adfaa5fdda5c584ef776e395b09

commit ed896c32b09e3adfaa5fdda5c584ef776e395b09
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Thu Mar 21 09:41:54 2024 +0100

    scripts/kernel_bump: Improve omitted version error
    
    If a version string was not supplied, we currently print an empty
    string. We can do better here. Also by popular demand, print the usage
    information in case of error.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 82ee3f3eff..90e47789c3 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -205,7 +205,9 @@ main()
 	target_version="${target_version:-${TARGET_VERSION:-}}"
 
 	if [ -z "${source_version:-}" ] || [ -z "${target_version:-}" ]; then
-		e_err "Source (${source_version}) and target (${target_version}) versions need to be defined."
+		e_err "Source (${source_version:-missing source version}) and target (${target_version:-missing target version}) versions need to be defined."
+		echo
+		usage
 		exit 1
 	fi
 



From lede-commits at lists.infradead.org  Fri Apr 12 09:20:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:20:58 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Avoid potential copyright
 claim
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26622.1712938874.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7b7f17021639ff737d66377762a8ba90944b5ed2

commit 7b7f17021639ff737d66377762a8ba90944b5ed2
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Sun Mar 17 08:46:08 2024 +0100

    scripts/kernel_bump: Avoid potential copyright claim
    
    Due to potential fears of copyright infringement noted by Elliott
    Mitchell [0], rewrite our message to belong to OpenWRT.
    
    Note, AI was used to aid in construction of this sentence.
    
    [0]: https://lists.openwrt.org/pipermail/openwrt-devel/2024-March/042422.html
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 5896bfc48f..829cd250e1 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -134,7 +134,7 @@ bump_kernel()
 		--signoff \
 		--message "kernel/${platform_name}: Create kernel files for v${target_version} (from v${source_version})" \
 		--message 'This is an automatically generated commit.' \
-		--message 'During a `git bisect` session, `git bisect --skip` is recommended.'
+		--message 'When doing `git bisect`, consider `git bisect --skip`.'
 
 	git checkout 'HEAD~' "${_target_dir}"
 	git commit \



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:05 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Use git to obtain the list of
 files
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26623.1712938874.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8ed187e471b0f7622c8791bf688302cdfe484868

commit 8ed187e471b0f7622c8791bf688302cdfe484868
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Mon Mar 18 13:24:12 2024 +0100

    scripts/kernel_bump: Use git to obtain the list of files
    
    Instead of looping of a directory to find directories related to kernel
    changes, use the git index instead.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 6 +++++-
 1 file changed, 5 insertions(+), 1 deletion(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 069f53bb77..d9fc5287df 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -18,8 +18,10 @@ REQUIRED_COMMANDS='
 	exit
 	git
 	printf
+	sed
 	set
 	shift
+	sort
 '
 
 _msg()
@@ -115,7 +117,9 @@ bump_kernel()
 	git switch --force-create '__openwrt_kernel_files_mover'
 
 	if [ "${config_only:-false}" != 'true' ]; then
-		for _path in "${_target_dir}/"*; do
+		for _path in $(git ls-tree -d -r --name-only '__openwrt_kernel_files_mover' "${_target_dir}" |
+			       sed -n "s|^\(.*-${source_version}\).*|\1|p" |
+			       sort -u); do
 			if [ ! -e "${_path}" ] || \
 			   [ "${_path}" = "${_path%%"-${source_version}"}" ]; then
 				continue



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:06 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Use the git index to find the
 needed config files
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26624.1712938875.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b62aafc99a6f00032c0486d96bb7b6cc0a77a84c

commit b62aafc99a6f00032c0486d96bb7b6cc0a77a84c
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Mon Mar 18 13:28:11 2024 +0100

    scripts/kernel_bump: Use the git index to find the needed config files
    
    The current solution using `find` introduces a racecondition, where `find`
    and `git mv` get in each others way. While this could be fixed with
    more-utils sponge command (or even sort -u) to buffer the output of
    find.
    
    However, a much better approach, is to query the git index directly,
    which will not change, and is far more accurate.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 12 +++++++++---
 1 file changed, 9 insertions(+), 3 deletions(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index d9fc5287df..7ce3b6256f 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -137,9 +137,15 @@ bump_kernel()
 		done
 	fi
 
-	find "${_target_dir}" -iname "config-${source_version}" | while read -r _config; do
-		_path="${_config%%"/config-${source_version}"}"
-		git mv "${_config}" "${_path}/config-${target_version}"
+	for _config in $(git ls-files "${_target_dir}" |
+	                 sed -n "s|^\(.*config-${source_version}\).*|\1|p" |
+	                 sort -u); do
+		if [ ! -e "${_config}" ]; then
+			continue
+		fi
+
+		_subtarget="${_config%%"/config-${source_version}"}"
+		git mv "${_config}" "${_subtarget}/config-${target_version}"
 	done
 
 	git commit \



From lede-commits at lists.infradead.org  Fri Apr 12 09:20:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:20:59 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Drop unused function
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26627.1712938875.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1bbc24926618898ec33ceb421d6571f1fa8f2b73

commit 1bbc24926618898ec33ceb421d6571f1fa8f2b73
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Mon Mar 18 13:08:44 2024 +0100

    scripts/kernel_bump: Drop unused function
    
    No need to keep unused empty functions. A left over from early development.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 829cd250e1..bbf6747fc1 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -80,13 +80,6 @@ init()
 	trap cleanup EXIT HUP INT QUIT ABRT ALRM TERM
 }
 
-do_source_target()
-{
-	_target_dir="${1:?Missing argument to function}"
-	_op="${2:?Missing argument to function}"
-
-}
-
 bump_kernel()
 {
 	platform_name="${platform_name##*'/'}"



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:00 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Always drop v prefix
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26628.1712938875.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/03f2f530a00a55e6580733cd6ccd01a018a473ee

commit 03f2f530a00a55e6580733cd6ccd01a018a473ee
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Fri Mar 22 08:38:02 2024 +0100

    scripts/kernel_bump: Always drop v prefix
    
    Naivly and lazyly the leading v was only dropped from optarg, not from any
    environment variable.
    
    Lets do this properly and ensure a leading 'v' is always dropped.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 7 +++++--
 1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index bbf6747fc1..82ee3f3eff 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -77,6 +77,9 @@ init()
 	initial_branch="$(git rev-parse --abbrev-ref HEAD)"
 	initial_commitish="$(git rev-parse HEAD)"
 
+	source_version="${source_version#v}"
+	target_version="${target_version#v}"
+
 	trap cleanup EXIT HUP INT QUIT ABRT ALRM TERM
 }
 
@@ -180,10 +183,10 @@ main()
 			platform_name="${OPTARG}"
 			;;
 		's')
-			source_version="${OPTARG#v}"
+			source_version="${OPTARG}"
 			;;
 		't')
-			target_version="${OPTARG#v}"
+			target_version="${OPTARG}"
 			;;
 		':')
 			e_err "Option -${OPTARG} requires an argument."



From lede-commits at lists.infradead.org  Fri Apr 12 09:21:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 12 Apr 2024 12:21:08 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Delete merge commit
In-Reply-To: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
References: <171293885811.4117194.10470164145046856994@git-01.infra.openwrt.org>
Message-ID: <mailman.26637.1712939725.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/98235e60ed8436ca9476c3bc84a8f1feb553a764

commit 98235e60ed8436ca9476c3bc84a8f1feb553a764
Author: Olliver Schinagl <oliver at schinagl.nl>
AuthorDate: Mon Mar 18 14:03:59 2024 +0100

    scripts/kernel_bump: Delete merge commit
    
    While we have included the needed changes via a merge commit, there is
    no need to keep it. Lets drop the merge commit, which we can do as we
    haven't pushed anything.
    
    Signed-off-by: Olliver Schinagl <oliver at schinagl.nl>
---
 scripts/kernel_bump.sh | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 1a6e5e5ea7..0a123ea95a 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -171,6 +171,8 @@ bump_kernel()
 	git switch "${initial_branch:?Unable to switch back to original branch. Quitting.}"
 	GIT_EDITOR=true git merge --no-ff '__openwrt_kernel_files_mover'
 	git branch --delete '__openwrt_kernel_files_mover'
+	echo "Deleting merge commit ($(git rev-parse HEAD))."
+	git rebase HEAD~1
 
 	echo "Original commitish was '${initial_commitish}'."
 	echo 'Kernel bump complete. Remember to use `git log --follow`.'



From lede-commits at lists.infradead.org  Fri Apr 12 23:32:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:32:52 -0400
Subject: [buildbot]  CI: add dependabot scan
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26765.1712989981.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/a898d87b7995b15b35d4db7511ae5372b98cf63f

commit a898d87b7995b15b35d4db7511ae5372b98cf63f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 12 15:16:53 2024 +0200

    CI: add dependabot scan
    
    Add dependabot scan to warn and propose updates to our github actions.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .github/dependabot.yml | 15 +++++++++++++++
 1 file changed, 15 insertions(+)

diff --git a/.github/dependabot.yml b/.github/dependabot.yml
new file mode 100644
index 0000000..41039d6
--- /dev/null
+++ b/.github/dependabot.yml
@@ -0,0 +1,15 @@
+# Set update schedule for GitHub Actions
+
+version: 2
+updates:
+
+  - package-ecosystem: "github-actions"
+    directory: "/"
+    schedule:
+      # Check for updates to GitHub Actions every week
+      interval: "weekly"
+    # Prefix all commit messages with "CI" plus its scope, that is, a
+    # list of updated dependencies
+    commit-message:
+      prefix: "CI"
+      include: "scope"



From lede-commits at lists.infradead.org  Fri Apr 12 23:32:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:32:58 -0400
Subject: [buildbot]  phase2: update default sdk pattern to a more relaxed
 pattern
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26766.1712989982.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/235d15857ea24831e81401592707997a9046658c

commit 235d15857ea24831e81401592707997a9046658c
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 12 15:09:45 2024 +0200

    phase2: update default sdk pattern to a more relaxed pattern
    
    Update default sdk pattern to a more relaxed pattern to make it future
    proof if in the future the compression extension will change again.
    
    Needed currently with the migration from .xz to .zst.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 docker/config.ini         | 2 +-
 phase2/config.ini.example | 2 +-
 phase2/master.cfg         | 2 +-
 3 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/docker/config.ini b/docker/config.ini
index da868ea..25543f2 100644
--- a/docker/config.ini
+++ b/docker/config.ini
@@ -36,7 +36,7 @@ source_url = upload at rsync-server::data/src
 source_password = secret
 sdk_url = upload at rsync-server::data/bin/targets
 sdk_password = secret
-sdk_pattern = openwrt-sdk-*.tar.xz
+sdk_pattern = openwrt-sdk-*.tar.*
 
 [gpg]
 key = -----BEGIN PGP PRIVATE KEY BLOCK-----
diff --git a/phase2/config.ini.example b/phase2/config.ini.example
index ba8ff76..b7e75d3 100644
--- a/phase2/config.ini.example
+++ b/phase2/config.ini.example
@@ -29,7 +29,7 @@ source_url = user at example.org::upload-sources
 source_password = example2
 sdk_url = user at example.org::download-binary
 sdk_password = example3
-sdk_pattern = openwrt-sdk-*.tar.xz
+sdk_pattern = openwrt-sdk-*.tar.*
 
 [gpg]
 key = -----BEGIN PGP PRIVATE KEY BLOCK-----
diff --git a/phase2/master.cfg b/phase2/master.cfg
index 1267cf1..da22cce 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -115,7 +115,7 @@ if ini.has_option("rsync", "source_url"):
 
 rsync_sdk_url = None
 rsync_sdk_key = None
-rsync_sdk_pat = "openwrt-sdk-*.tar.xz"
+rsync_sdk_pat = "openwrt-sdk-*.tar.*"
 
 if ini.has_option("rsync", "sdk_url"):
 	rsync_sdk_url = ini.get("rsync", "sdk_url")



From lede-commits at lists.infradead.org  Fri Apr 12 23:32:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:32:59 -0400
Subject: [buildbot]  phase2: dlsha2rsyncpl: fix sha2rsync.pl script location
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26767.1712989984.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/731bbbd700166c7e6bcf102f84997f1185a59a6d

commit 731bbbd700166c7e6bcf102f84997f1185a59a6d
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Sun Dec 24 08:27:03 2023 +0000

    phase2: dlsha2rsyncpl: fix sha2rsync.pl script location
    
    Fixes following error:
    
     File 'sha2rsync.pl' not available at master
    
    Fixes: c3ddb0db167d ("phase2: use sha2rsync.pl for 'targetupload'")
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 phase2/master.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index da22cce..18236b5 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -641,7 +641,7 @@ for arch in arches:
 
 	factory.addStep(FileDownload(
 		name = "dlsha2rsyncpl",
-		mastersrc = "sha2rsync.pl",
+		mastersrc = scripts_dir + "/sha2rsync.pl",
 		workerdest = "../sha2rsync.pl",
 		mode = 0o755,
 	))



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:00 -0400
Subject: [buildbot]  phase2: fix stray closing parenthesis
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26768.1712989984.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/88b6d9eae0ebf66c165be3e7458d6ff582d63759

commit 88b6d9eae0ebf66c165be3e7458d6ff582d63759
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Sat Dec 23 07:14:20 2023 +0000

    phase2: fix stray closing parenthesis
    
    Due to the stray closing parenthesis introduced in commit f0faed2970dd
    ("phase2: compute checksums") we have currently we've failing checksum
    step in phase2:
    
     argv: b'cd bin/packages/mipsel_24kc_24kf; find . -type f -not -name \'sha256sums\' -printf "%P\n" | sort | xargs -r ../../../staging_dir/host/bin/mkhash -n sha256 | sed -ne \'s!^\\(.*\\) \\(.*\\)$!\x01 *\x02!p\' > sha256sums)'
     environment:
      ...snip...
      using PTY: False
     /bin/sh: 2: Syntax error: ")" unexpected
     program finished with exit code 2
    
    Fixes: f0faed2970dd ("phase2: compute checksums")
    Reported-by: Hannu Nyman <hannu.nyman at iki.fi>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 phase2/master.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index 18236b5..02e7a45 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -572,7 +572,7 @@ for arch in arches:
 		description = "Calculating checksums",
 		descriptionDone="Checksums calculated",
 		workdir = "build/sdk",
-		command = "cd bin/packages/%s; " %(arch[0]) + "find . -type f -not -name 'sha256sums' -printf \"%P\n\" | sort | xargs -r ../../../staging_dir/host/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$!\1 *\2!p' > sha256sums)",
+		command = "cd bin/packages/%s; " %(arch[0]) + "find . -type f -not -name 'sha256sums' -printf \"%P\n\" | sort | xargs -r ../../../staging_dir/host/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$!\1 *\2!p' > sha256sums",
 		haltOnFailure = True
 	))
 



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:01 -0400
Subject: [buildbot]  Add linting with flake8 tool
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26769.1712989984.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/815fc1af29a293c0095b7e6e0e6cba068fe081b9

commit 815fc1af29a293c0095b7e6e0e6cba068fe081b9
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Sat Dec 23 06:13:02 2023 +0000

    Add linting with flake8 tool
    
    flake8 is a Python tool that glues together pycodestyle, pyflakes,
    mccabe, and third-party plugins to check the style and quality of some
    Python code.
    
    Currently we've issue in phase2 in checksum step:
    
     /bin/sh: 2: Syntax error: ")" unexpected
    
    And it seems, that flake8 is able to spot places which might lead to
    such issues during runtime:
    
     phase2/master.cfg:733:151: W605 invalid escape sequence '\('
     phase2/master.cfg:733:155: W605 invalid escape sequence '\)'
     phase2/master.cfg:733:158: W605 invalid escape sequence '\('
     phase2/master.cfg:733:162: W605 invalid escape sequence '\)'
    
    So lets enable flake8 checking on the CI so we can spot similar places
    in the future and address them before deployment.
    
    We dont want to make current ongoing work on phase2 code harder, thus we
    don't touch that part yet, so we whitelist most of the checks for now.
    
    References: f0faed2970dd ("phase2: compute checksums")
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 .flake8                          |  4 ++++
 .github/workflows/build-push.yml |  3 +++
 .gitignore                       |  1 +
 phase1/master.cfg                | 41 ++++++++++++++++++++++++++++------------
 requirements-dev.txt             |  1 +
 5 files changed, 38 insertions(+), 12 deletions(-)

diff --git a/.flake8 b/.flake8
new file mode 100644
index 0000000..66380a1
--- /dev/null
+++ b/.flake8
@@ -0,0 +1,4 @@
+[flake8]
+max-line-length = 140
+per-file-ignores =
+    phase2/master.cfg: E101,E117,E128,E201,E202,E203,E221,E225,E251,E266,E302,E305,E501,W191
diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml
index 4f5b3f4..1ae0f27 100644
--- a/.github/workflows/build-push.yml
+++ b/.github/workflows/build-push.yml
@@ -40,6 +40,9 @@ jobs:
       - name: Lint with ruff
         run: ruff phase*/master.cfg
 
+      - name: Lint with flake8
+        run: flake8 phase*/master.cfg
+
       - name: Stylecheck with black
         run: black phase1/master.cfg
 
diff --git a/.gitignore b/.gitignore
index 0d4e15f..5c68e09 100644
--- a/.gitignore
+++ b/.gitignore
@@ -27,3 +27,4 @@ phase[12]/twistd.*
 !.ruff.toml
 !tests
 !tests/**/*
+!.flake8
diff --git a/phase1/master.cfg b/phase1/master.cfg
index 2d6f304..e9c6b71 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -107,7 +107,7 @@ pb_port = inip1.get("port") or 9989
 # a shorter alias to save typing.
 c = BuildmasterConfig = {}
 
-####### PROJECT IDENTITY
+# PROJECT IDENTITY
 
 # the 'title' string will appear at the top of this buildbot
 # installation's html.WebStatus home page (linked to the
@@ -124,7 +124,7 @@ c["titleURL"] = ini["general"].get("title_url")
 
 c["buildbotURL"] = inip1.get("buildbot_url")
 
-####### BUILDWORKERS
+# BUILDWORKERS
 
 # The 'workers' list defines the set of recognized buildworkers. Each element is
 # a Worker object, specifying a unique worker name and password.  The same
@@ -292,7 +292,7 @@ def prioritizeBuilders(master, builders):
 
 c["prioritizeBuilders"] = prioritizeBuilders
 
-####### CHANGESOURCES
+# CHANGESOURCES
 
 # find targets
 targets = dict()
@@ -358,7 +358,7 @@ c["change_source"].append(
     )
 )
 
-####### SCHEDULERS
+# SCHEDULERS
 
 # Configure the Schedulers, which decide how to react to incoming changes.
 
@@ -541,7 +541,7 @@ c["schedulers"].append(
     schedulers.Triggerable(name="trigger", builderNames=builderNames, priority=20)
 )
 
-####### BUILDERS
+# BUILDERS
 
 # The 'builders' list defines the Builders, which tell Buildbot how to perform a build:
 # what steps, and which workers can execute them.  Note that any particular build will
@@ -882,7 +882,11 @@ def prepareFactory(target):
             name="gitverify",
             description="Ensuring that Git HEAD is pointing to a branch or tag",
             descriptionDone="Git HEAD is sane",
-            command='git rev-parse --abbrev-ref HEAD | grep -vxqF HEAD || git show-ref --tags --dereference 2>/dev/null | sed -ne "/^$(git rev-parse HEAD) / { s|^.*/||; s|\\^.*||; p }" | grep -qE "^v[0-9][0-9]\\."',
+            command=(
+                "git rev-parse --abbrev-ref HEAD | grep -vxqF HEAD || "
+                "git show-ref --tags --dereference 2>/dev/null | sed -ne "
+                '"/^$(git rev-parse HEAD) / { s|^.*/||; s|\\^.*||; p }" | grep -qE "^v[0-9][0-9]\\."'
+            ),
             haltOnFailure=True,
         )
     )
@@ -944,7 +948,9 @@ def prepareFactory(target):
             name="newconfig",
             descriptionDone=".config seeded",
             command=Interpolate(
-                "printf 'CONFIG_TARGET_%(kw:target)s=y\\nCONFIG_TARGET_%(kw:target)s_%(kw:subtarget)s=y\\nCONFIG_SIGNED_PACKAGES=%(kw:usign:#?|y|n)s\\n' >> .config",
+                "printf 'CONFIG_TARGET_%(kw:target)s=y\\n"
+                "CONFIG_TARGET_%(kw:target)s_%(kw:subtarget)s=y\\n"
+                "CONFIG_SIGNED_PACKAGES=%(kw:usign:#?|y|n)s\\n' >> .config",
                 target=target,
                 subtarget=subtarget,
                 usign=GetUsignKey,
@@ -1145,7 +1151,11 @@ def prepareFactory(target):
             name="kernelversion",
             property="kernelversion",
             description="Finding the effective Kernel version",
-            command="make --no-print-directory -C target/linux/ val.LINUX_VERSION val.LINUX_RELEASE val.LINUX_VERMAGIC | xargs printf '%s-%s-%s\\n'",
+            command=(
+                "make --no-print-directory -C target/linux/ "
+                "val.LINUX_VERSION val.LINUX_RELEASE val.LINUX_VERMAGIC | "
+                "xargs printf '%s-%s-%s\\n'"
+            ),
             env={"TOPDIR": Interpolate("%(prop:builddir)s/build")},
         )
     )
@@ -1341,7 +1351,10 @@ def prepareFactory(target):
             description="Packing files to sign",
             descriptionDone="Files to sign packed",
             command=Interpolate(
-                "find bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/ bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/ -mindepth 1 -maxdepth 2 -type f -name sha256sums -print0 -or -name Packages -print0 | xargs -0 tar -czf sign.tar.gz",
+                "find bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/ "
+                "bin/targets/%(kw:target)s/%(kw:subtarget)s%(prop:libc)s/kmods/ "
+                "-mindepth 1 -maxdepth 2 -type f -name sha256sums -print0 -or "
+                "-name Packages -print0 | xargs -0 tar -czf sign.tar.gz",
                 target=target,
                 subtarget=subtarget,
             ),
@@ -1674,7 +1687,11 @@ def prepareFactory(target):
             name="sourcelist",
             description="Finding source archives to upload",
             descriptionDone="Source archives to upload found",
-            command="find dl/ -maxdepth 1 -type f -not -size 0 -not -name '.*' -not -name '*.hash' -not -name '*.dl' -newer .config -printf '%f\\n' > sourcelist",
+            command=(
+                "find dl/ -maxdepth 1 -type f -not -size 0 "
+                "-not -name '.*' -not -name '*.hash' -not -name "
+                "'*.dl' -newer .config -printf '%f\\n' > sourcelist"
+            ),
             haltOnFailure=True,
         )
     )
@@ -1775,7 +1792,7 @@ for brname in branchNames:
         )
 
 
-####### STATUS TARGETS
+# STATUS TARGETS
 
 # 'status' is a list of Status Targets. The results of each build will be
 # pushed to these targets. buildbot/status/*.py has a variety to choose from,
@@ -1826,7 +1843,7 @@ c["revlink"] = util.RevlinkMatch(
     r"https://git.openwrt.org/?p=openwrt/\1.git;a=commit;h=%s",
 )
 
-####### DB URL
+# DB URL
 
 c["db"] = {
     # This specifies what database buildbot uses to store its state.  You can leave
diff --git a/requirements-dev.txt b/requirements-dev.txt
index e1cb65f..033af6b 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,3 +1,4 @@
 cram==0.7
 black==23.3.0
 ruff==0.0.267
+flake8==6.1.0



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:08 -0400
Subject: [buildbot]  Bump buildbot to v3.11.1 release
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26770.1712990078.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/efbddc90d8e633b1ca1db6a66dfcf3aba2c82ccb

commit efbddc90d8e633b1ca1db6a66dfcf3aba2c82ccb
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Fri Dec 22 10:06:54 2023 +0000

    Bump buildbot to v3.11.1 release
    
    https://github.com/buildbot/buildbot/releases/tag/v3.11.1
    
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 .github/workflows/build-push.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/workflows/build-push.yml b/.github/workflows/build-push.yml
index 1ae0f27..77f8b16 100644
--- a/.github/workflows/build-push.yml
+++ b/.github/workflows/build-push.yml
@@ -8,7 +8,7 @@ on:
   pull_request:
 
 env:
-  BUILDBOT_VERSION: 3.9.0
+  BUILDBOT_VERSION: 3.11.1
   GITHUB_SHA_LEN: 8
 
 concurrency:



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:06 -0400
Subject: [buildbot]  phase1,phase2: s/master/main for phase{1,2}
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26771.1712990214.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/c8d1bd1f4bec5919ad0f65ba069b14fcaadffcbc

commit c8d1bd1f4bec5919ad0f65ba069b14fcaadffcbc
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Tue May 23 23:02:48 2023 +0200

    phase1,phase2: s/master/main for phase{1,2}
    
    More and more projects are switching their repositories to use the
    'main' branch instead of the 'master' branch. This also includes many
    Linux upstream trees as well. Some trees are even removing their
    'master' branches already.
    
    I think this is becoming more and more mainstream and expected of
    projects, so we should do the same.
    
    References: https://openwrt.org/voting/2023-02-27
    Signed-off-by: Paul Spooren <mail at aparcar.org>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz> [commit facelift]
---
 docker/config.ini         | 2 +-
 phase1/config.ini.example | 4 ++--
 phase1/master.cfg         | 6 +++---
 phase2/config.ini.example | 2 +-
 phase2/master.cfg         | 4 ++--
 scripts/makebranch.sh     | 6 +++---
 6 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/docker/config.ini b/docker/config.ini
index 25543f2..6278d3d 100644
--- a/docker/config.ini
+++ b/docker/config.ini
@@ -27,7 +27,7 @@ persistent = false
 
 [repo]
 url = https://git.openwrt.org/openwrt/openwrt.git
-branch = master
+branch = main
 
 [rsync]
 binary_url = upload at rsync-server::data/bin
diff --git a/phase1/config.ini.example b/phase1/config.ini.example
index d7262bd..267184f 100644
--- a/phase1/config.ini.example
+++ b/phase1/config.ini.example
@@ -49,8 +49,8 @@ config_seed = # Seed configuration
 [branch openwrt-22.03]
 name = openwrt-22.03
 
-[branch master]
-name = master
+[branch main]
+name = main
 
 [worker 1]
 phase = 1
diff --git a/phase1/master.cfg b/phase1/master.cfg
index e29bb9d..4e7cbc1 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -550,7 +550,7 @@ c["schedulers"].append(
 
 
 def IsNoMasterBuild(step):
-    return step.getProperty("branch") != "master"
+    return step.getProperty("branch") != "main"
 
 
 def IsUsignEnabled(step):
@@ -577,7 +577,7 @@ def GetBaseVersion(branch):
     if re.match(r"^[^-]+-[0-9]+\.[0-9]+$", branch):
         return branch.split("-")[1]
     else:
-        return "master"
+        return "main"
 
 
 @properties.renderer
@@ -588,7 +588,7 @@ def GetVersionPrefix(props):
         r"^v[0-9]+\.[0-9]+\.[0-9]+(?:-rc[0-9]+)?$", props["tag"]
     ):
         return "%s/" % props["tag"][1:]
-    elif basever != "master":
+    elif basever != "main":
         return "%s-SNAPSHOT/" % basever
     else:
         return ""
diff --git a/phase2/config.ini.example b/phase2/config.ini.example
index b7e75d3..ec0e6db 100644
--- a/phase2/config.ini.example
+++ b/phase2/config.ini.example
@@ -20,7 +20,7 @@ git_ssh_key = -----BEGIN RSA PRIVATE KEY-----
 
 [repo]
 url = https://git.openwrt.org/openwrt/openwrt.git
-branch = master
+branch = main
 
 [rsync]
 binary_url = user at example.org::upload-packages
diff --git a/phase2/master.cfg b/phase2/master.cfg
index 23a67f7..c399c66 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -129,7 +129,7 @@ if ini.has_option("rsync", "sdk_pattern"):
 rsync_defopts = ["-4", "-v", "--timeout=120"]
 
 repo_url = ini.get("repo", "url")
-repo_branch = "master"
+repo_branch = "main"
 
 if ini.has_option("repo", "branch"):
 	repo_branch = ini.get("repo", "branch")
@@ -177,7 +177,7 @@ def parse_feed_entry(line):
 	if parts[0].startswith("src-git"):
 		feeds.append(parts)
 		url = parts[2].strip().split(';')
-		branch = url[1] if len(url) > 1 else 'master'
+		branch = url[1] if len(url) > 1 else 'main'
 		feedbranches[url[0]] = branch
 		c['change_source'].append(GitPoller(url[0], branch=branch, workdir='%s/%s.git' %(os.getcwd(), parts[1]), pollinterval=300))
 
diff --git a/scripts/makebranch.sh b/scripts/makebranch.sh
index e92c04c..355014c 100755
--- a/scripts/makebranch.sh
+++ b/scripts/makebranch.sh
@@ -77,8 +77,8 @@ githash="$(git log --format=%h -1)"
 
 prev_branch="$(git symbolic-ref -q HEAD)"
 
-if [ "$prev_branch" != "refs/heads/master" ]; then
-	echo "Expecting current branch name to be \"master\"," \
+if [ "$prev_branch" != "refs/heads/main" ]; then
+	echo "Expecting current branch name to be \"main\"," \
 	     "but it is \"${prev_branch#refs/heads/}\" - aborting."
 
 	exit 1
@@ -101,7 +101,7 @@ while read type name url; do
 
 					if [ -z "$ref" ]; then
 						echo "WARNING: Feed \"$name\" provides no" \
-						     "\"lede-$version\" branch - using master!" >&2
+						     "\"lede-$version\" branch - using main!" >&2
 					else
 						url="$url;lede-$version"
 					fi



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:07 -0400
Subject: [buildbot]  Revert "buildmaster: fix Twisted dependency hell by using
 twisted==22.10.0"
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26774.1712990216.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/fd4cd3a971f5a6c0e850a9e5610bb85fe16569b6

commit fd4cd3a971f5a6c0e850a9e5610bb85fe16569b6
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Fri Dec 22 11:02:49 2023 +0000

    Revert "buildmaster: fix Twisted dependency hell by using twisted==22.10.0"
    
    This reverts commit bc17dd9af0d3a56e3e9cd724c41deacc5ae0de14 as it
    should be fine in buildbot v3.10.0 release.
    
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 docker/buildmaster/Dockerfile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/docker/buildmaster/Dockerfile b/docker/buildmaster/Dockerfile
index 7be345c..8d21245 100644
--- a/docker/buildmaster/Dockerfile
+++ b/docker/buildmaster/Dockerfile
@@ -36,7 +36,6 @@ RUN \
 		"buildbot-console-view==$BUILDBOT_VERSION" \
 		"buildbot-grid-view==$BUILDBOT_VERSION" \
 		"buildbot-worker==$BUILDBOT_VERSION" \
-		"twisted==22.10.0" \
 		pyOpenSSL \
 		service_identity
 RUN \



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:03 -0400
Subject: [buildbot]  phase2: fix invalid escape sequence flake8 warning in
 checksums step
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26775.1712990219.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/f02393e0f7ed923664ef52644b48ad95fa70d55e

commit f02393e0f7ed923664ef52644b48ad95fa70d55e
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Sat Dec 23 07:33:21 2023 +0000

    phase2: fix invalid escape sequence flake8 warning in checksums step
    
    Resolved a flake8 linting warning related to an invalid escape sequence
    in the ShellCommand for calculating checksums:
    
     phase2/master.cfg:739:28: W605 invalid escape sequence '\('
     phase2/master.cfg:739:32: W605 invalid escape sequence '\)'
     phase2/master.cfg:739:35: W605 invalid escape sequence '\('
     phase2/master.cfg:739:39: W605 invalid escape sequence '\)'
    
    The warning was caused by the use of unescaped parentheses in a regular
    expression within a sed command.
    
    Use a raw string (with an 'r' prefix) to treat backslashes as literal
    characters, ensuring that the regular expression is correctly
    interpreted and flake8 does not raise a warning.
    
    This fix ensures that the code adheres to Python's string handling best
    practices and maintains the integrity of the regular expression
    functionality.
    
    Fixes: f0faed2970dd ("phase2: compute checksums")
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 phase2/master.cfg | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index fa585d7..deebc28 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -575,7 +575,7 @@ for arch in arches:
 		command = "cd bin/packages/%s; " %(arch[0])
 		+ "find . -type f -not -name 'sha256sums' -printf \"%P\n\" | "
 		+ "sort | xargs -r ../../../staging_dir/host/bin/mkhash -n sha256 | "
-		+ "sed -ne 's!^\(.*\) \(.*\)$!\1 *\2!p' > sha256sums",
+		+ r"sed -ne 's!^\(.*\) \(.*\)$!\1 *\2!p' > sha256sums",
 		haltOnFailure = True
 	))
 



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:04 -0400
Subject: [buildbot]  requirements-dev: use black 23.12.1 and ruff 0.1.9
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26776.1712990222.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/e74dce3085f299c2d8b1a94b09687ae88876ef7c

commit e74dce3085f299c2d8b1a94b09687ae88876ef7c
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Sat Dec 23 06:43:02 2023 +0000

    requirements-dev: use black 23.12.1 and ruff 0.1.9
    
    Fix ruff's recommendation:
    
     phase2/master.cfg:328:16: E721 Do not compare types, use `isinstance()`
    
     "Unlike a direct type comparison, isinstance will also check if an
      object is an instance of a class or a subclass thereof."
    
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 phase1/master.cfg    | 3 ++-
 phase2/master.cfg    | 2 +-
 requirements-dev.txt | 4 ++--
 3 files changed, 5 insertions(+), 4 deletions(-)

diff --git a/phase1/master.cfg b/phase1/master.cfg
index e9c6b71..e29bb9d 100644
--- a/phase1/master.cfg
+++ b/phase1/master.cfg
@@ -266,7 +266,8 @@ def prioritizeBuilders(master, builders):
         pos = 99
         for name, prio in bldrNamePrio.items():
             if bldr.name.startswith(name):
-                pos = prio + 50 - min(hiprio, 50)    # higher priority (larger positive number) raises position
+                # higher priority (larger positive number) raises position
+                pos = prio + 50 - min(hiprio, 50)
                 break
 
         # pos order: janitor/local (0), tag builds if any [1..50], !tag builds [51...]
diff --git a/phase2/master.cfg b/phase2/master.cfg
index deebc28..007bc11 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -280,7 +280,7 @@ def IsArchitectureSelected(target):
 	def CheckArchitectureProperty(step):
 		try:
 			options = step.getProperty("options")
-			if type(options) is dict:
+			if isinstance(options, dict):
 				selected_arch = options.get("architecture", "all")
 				if selected_arch != "all" and selected_arch != target:
 					return False
diff --git a/requirements-dev.txt b/requirements-dev.txt
index 033af6b..e373155 100644
--- a/requirements-dev.txt
+++ b/requirements-dev.txt
@@ -1,4 +1,4 @@
 cram==0.7
-black==23.3.0
-ruff==0.0.267
+black==23.12.1
+ruff==0.1.9
 flake8==6.1.0



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:05 -0400
Subject: [buildbot]  phase2: fix relative paths for scripts and files
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26777.1712990234.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/7d371c4ae28b414e2c4321a88453a97e99093b26

commit 7d371c4ae28b414e2c4321a88453a97e99093b26
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Sun Dec 24 19:14:14 2023 +0000

    phase2: fix relative paths for scripts and files
    
    Currently `buildlist` step fails with following:
    
      ../../../sha2rsync.pl ../../arch-sha256sums bin/packages/aarch64_generic/sha256sums rsynclist
       in dir /builder/aarch64_generic/build/sdk (timeout 1200 secs)
       watching logfiles {}
       argv: [b'../../../sha2rsync.pl', b'../../arch-sha256sums', b'bin/packages/aarch64_generic/sha256sums', b'rsynclist']
       environment:
        ...
        PWD=/builder/aarch64_generic/build/sdk
        ...
      Upon execvpe b'../../../sha2rsync.pl' [b'../../../sha2rsync.pl', b'../../arch-sha256sums', b'bin/packages/aarch64_generic/sha256sums', b'rsynclist'] in environment id 139847367136832
      :Traceback (most recent call last):
      ...
      FileNotFoundError: [Errno 2] No such file or directory: b'../../../sha2rsync.pl'
    
    due to relative paths being off by one:
    
     worker work dir = /builder/aarch64_cortex-a72/build
     workerdest = "../sha2rsync.pl"
       is absolute path /builder/aarch64_cortex-a72/sha2rsync.pl
    
    thus relative path from:
    
      FileNotFoundError: [Errno 2] No such file or directory: b'../../../sha2rsync.pl'
    
    in following context:
    
      PWD=/builder/aarch64_generic/build/sdk
      b'../../../sha2rsync.pl'
    
    is wrong absolute path `/builder/sha2rsync.pl` by one directory level,
    thus adjust all those paths accordingly.
    
    Fixes: c3ddb0db167d ("phase2: use sha2rsync.pl for 'targetupload'")
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 phase2/master.cfg | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index 007bc11..23a67f7 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -653,7 +653,7 @@ for arch in arches:
 		name = "buildlist",
 		description = "Building list of files to upload",
 		workdir = "build/sdk",
-		command = ["../../../sha2rsync.pl", "../../arch-sha256sums", "bin/packages/%s/sha256sums" %(arch[0]), "rsynclist"],
+		command = ["../../sha2rsync.pl", "../arch-sha256sums", "bin/packages/%s/sha256sums" %(arch[0]), "rsynclist"],
 		haltOnFailure = True,
 	))
 
@@ -671,7 +671,7 @@ for arch in arches:
 		name = "packageupload",
 		description = "Uploading package files",
 		workdir = "build/sdk",
-		command = ["../../../rsync.sh"] + rsync_defopts + ["--files-from=rsynclist", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-a", "bin/packages/%s/" %(arch[0]), Interpolate("%(kw:rsyncbinurl)s/packages%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
+		command = ["../../rsync.sh"] + rsync_defopts + ["--files-from=rsynclist", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-a", "bin/packages/%s/" %(arch[0]), Interpolate("%(kw:rsyncbinurl)s/packages%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
 		env={'RSYNC_PASSWORD': rsync_bin_key},
 		haltOnFailure = True,
 		logEnviron = False
@@ -681,7 +681,7 @@ for arch in arches:
 		name = "packageprune",
 		description = "Pruning package files",
 		workdir = "build/sdk",
-		command = ["../../../rsync.sh"] + rsync_defopts + ["--delete", "--existing", "--ignore-existing", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-a", "bin/packages/%s/" %(arch[0]), Interpolate("%(kw:rsyncbinurl)s/packages%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
+		command = ["../../rsync.sh"] + rsync_defopts + ["--delete", "--existing", "--ignore-existing", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-a", "bin/packages/%s/" %(arch[0]), Interpolate("%(kw:rsyncbinurl)s/packages%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
 		env={'RSYNC_PASSWORD': rsync_bin_key},
 		haltOnFailure = True,
 		logEnviron = False
@@ -721,7 +721,7 @@ for arch in arches:
 		name = "logupload",
 		description = "Uploading failure logs",
 		workdir = "build/sdk",
-		command = ["../../../rsync.sh"] + rsync_defopts + ["--delete", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-az", "faillogs/", Interpolate("%(kw:rsyncbinurl)s/faillogs%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
+		command = ["../../rsync.sh"] + rsync_defopts + ["--delete", "--delay-updates", "--partial-dir=.~tmp~%s" %(arch[0]), "-az", "faillogs/", Interpolate("%(kw:rsyncbinurl)s/faillogs%(kw:suffix)s/%(kw:archname)s/", rsyncbinurl=rsync_bin_url, suffix=GetDirectorySuffix, archname=arch[0])],
 		env={'RSYNC_PASSWORD': rsync_bin_key},
 		haltOnFailure = False,
 		flunkOnFailure = False,
@@ -742,7 +742,7 @@ for arch in arches:
 			name = "sourceupload",
 			description = "Uploading source archives",
 			workdir = "build/sdk",
-			command = ["../../../rsync.sh"] + rsync_defopts + ["--files-from=sourcelist", "--size-only", "--delay-updates",
+			command = ["../../rsync.sh"] + rsync_defopts + ["--files-from=sourcelist", "--size-only", "--delay-updates",
 					Interpolate("--partial-dir=.~tmp~%(kw:archname)s~%(prop:workername)s", archname=arch[0]), "-a", "dl/", "%s/" %(rsync_src_url)],
 			env={'RSYNC_PASSWORD': rsync_src_key},
 			haltOnFailure = False,



From lede-commits at lists.infradead.org  Fri Apr 12 23:33:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 02:33:02 -0400
Subject: [buildbot]  phase2: checksums: split long command line
In-Reply-To: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
References: <171298997230.1412066.16116354381637824322@git-01.infra.openwrt.org>
Message-ID: <mailman.26778.1712990236.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to buildbot.git, branch main:
https://git.openwrt.org/a7e32ac4dd4d5d1e43f489246eea8653201288e7

commit a7e32ac4dd4d5d1e43f489246eea8653201288e7
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Sun Dec 24 09:30:58 2023 +0000

    phase2: checksums: split long command line
    
    To make it more readable, diffs smaller, easier to review etc.
    
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
---
 phase2/master.cfg | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)

diff --git a/phase2/master.cfg b/phase2/master.cfg
index 02e7a45..fa585d7 100644
--- a/phase2/master.cfg
+++ b/phase2/master.cfg
@@ -572,7 +572,10 @@ for arch in arches:
 		description = "Calculating checksums",
 		descriptionDone="Checksums calculated",
 		workdir = "build/sdk",
-		command = "cd bin/packages/%s; " %(arch[0]) + "find . -type f -not -name 'sha256sums' -printf \"%P\n\" | sort | xargs -r ../../../staging_dir/host/bin/mkhash -n sha256 | sed -ne 's!^\(.*\) \(.*\)$!\1 *\2!p' > sha256sums",
+		command = "cd bin/packages/%s; " %(arch[0])
+		+ "find . -type f -not -name 'sha256sums' -printf \"%P\n\" | "
+		+ "sort | xargs -r ../../../staging_dir/host/bin/mkhash -n sha256 | "
+		+ "sed -ne 's!^\(.*\) \(.*\)$!\1 *\2!p' > sha256sums",
 		haltOnFailure = True
 	))
 



From lede-commits at lists.infradead.org  Sat Apr 13 00:45:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 03:45:11 -0400
Subject: [openwrt/openwrt]  build: use zstd for IB, toolchain,
 SDK and LLVM compression
In-Reply-To: <171299431172.1524326.7752016576604252132@git-01.infra.openwrt.org>
References: <171299431172.1524326.7752016576604252132@git-01.infra.openwrt.org>
Message-ID: <mailman.26792.1712994317.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2496f436a837f4d56a13883497ab5d07fb01d0f7

commit 2496f436a837f4d56a13883497ab5d07fb01d0f7
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Tue Feb 13 01:03:44 2024 +0100

    build: use zstd for IB, toolchain, SDK and LLVM compression
    
    Use similar efficient but faster compression algorithm.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 target/imagebuilder/Makefile | 9 +++++----
 target/llvm-bpf/Makefile     | 4 ++--
 target/sdk/Makefile          | 9 +++++----
 target/toolchain/Makefile    | 8 ++++----
 4 files changed, 16 insertions(+), 14 deletions(-)

diff --git a/target/imagebuilder/Makefile b/target/imagebuilder/Makefile
index c768c992ea..bfc72dacd0 100644
--- a/target/imagebuilder/Makefile
+++ b/target/imagebuilder/Makefile
@@ -24,7 +24,7 @@ BUNDLER_COMMAND := PATH=$(BUNDLER_PATH) $(XARGS) $(SCRIPT_DIR)/bundle-libraries.
 
 all: compile
 
-$(BIN_DIR)/$(IB_NAME).tar.xz: clean
+$(BIN_DIR)/$(IB_NAME).tar.zst: clean
 	rm -rf $(PKG_BUILD_DIR)
 	mkdir -p $(IB_KDIR) $(IB_LDIR) $(PKG_BUILD_DIR)/staging_dir/host/lib \
 		$(PKG_BUILD_DIR)/target/linux $(PKG_BUILD_DIR)/scripts $(IB_DTSDIR)
@@ -118,15 +118,16 @@ endif
 		$(BUNDLER_COMMAND))
 	$(CP) $(TOPDIR)/staging_dir/host/lib/libfakeroot* $(PKG_BUILD_DIR)/staging_dir/host/lib
 	STRIP=$(STAGING_DIR_HOST)/bin/sstrip $(SCRIPT_DIR)/rstrip.sh $(PKG_BUILD_DIR)/staging_dir/host/bin/
+
 	(cd $(BUILD_DIR); \
-		tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(IB_NAME) \
+		tar -I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' -cf $@ $(IB_NAME) \
 		--mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \
 	)
 
 download:
 prepare:
-compile: $(BIN_DIR)/$(IB_NAME).tar.xz
+compile: $(BIN_DIR)/$(IB_NAME).tar.zst
 install: compile
 
 clean: FORCE
-	rm -rf $(PKG_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.xz
+	rm -rf $(PKG_BUILD_DIR) $(BIN_DIR)/$(IB_NAME).tar.zst
diff --git a/target/llvm-bpf/Makefile b/target/llvm-bpf/Makefile
index 6cadf693ef..a61bda923a 100644
--- a/target/llvm-bpf/Makefile
+++ b/target/llvm-bpf/Makefile
@@ -12,11 +12,11 @@ override MAKEFLAGS=
 LLVM_VERSION := $(shell cat $(STAGING_DIR_HOST)/llvm-bpf/.llvm-version)
 
 LLVM_BPF_PREFIX := llvm-bpf-$(LLVM_VERSION).$(HOST_OS)-$(HOST_ARCH)
-LLVM_TAR := $(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.xz
+LLVM_TAR := $(BIN_DIR)/$(LLVM_BPF_PREFIX).tar.zst
 
 $(LLVM_TAR): $(STAGING_DIR_HOST)/llvm-bpf/.llvm-version
 	tar -C $(STAGING_DIR_HOST) \
-		-I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' \
+		-I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' \
 		$(if $(SOURCE_DATE_EPOCH),--mtime="@$(SOURCE_DATE_EPOCH)") \
 		-cf $@.tmp llvm-bpf $(LLVM_BPF_PREFIX)
 	mv $@.tmp $@
diff --git a/target/sdk/Makefile b/target/sdk/Makefile
index d0c0ab7a2b..f4b7640d2c 100644
--- a/target/sdk/Makefile
+++ b/target/sdk/Makefile
@@ -101,7 +101,7 @@ USERSPACE_FILES := $(patsubst $(TOPDIR)/%,%,$(wildcard $(addprefix $(LINUX_DIR)/
 
 all: compile
 
-$(BIN_DIR)/$(SDK_NAME).tar.xz: clean
+$(BIN_DIR)/$(SDK_NAME).tar.zst: clean
 	mkdir -p \
 		$(SDK_BUILD_DIR)/dl \
 		$(SDK_BUILD_DIR)/package \
@@ -181,15 +181,16 @@ $(BIN_DIR)/$(SDK_NAME).tar.xz: clean
 	find $(SDK_BUILD_DIR) -name .svn | $(XARGS) rm -rf
 	find $(SDK_BUILD_DIR) -name CVS | $(XARGS) rm -rf
 	-make -C $(SDK_BUILD_DIR)/scripts/config clean
+
 	(cd $(BUILD_DIR); \
-		tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(SDK_NAME) \
+		tar -I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' -cf $@ $(SDK_NAME) \
 		--mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \
 	)
 
 download:
 prepare:
-compile: $(BIN_DIR)/$(SDK_NAME).tar.xz
+compile: $(BIN_DIR)/$(SDK_NAME).tar.zst
 install: compile
 
 clean:
-	rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.xz
+	rm -rf $(SDK_BUILD_DIR) $(BIN_DIR)/$(SDK_NAME).tar.zst
diff --git a/target/toolchain/Makefile b/target/toolchain/Makefile
index c33bccee69..9c0fdc4c7e 100644
--- a/target/toolchain/Makefile
+++ b/target/toolchain/Makefile
@@ -26,7 +26,7 @@ all: compile
 
 TOOLCHAIN_PREFIX:=$(TOOLCHAIN_BUILD_DIR)/toolchain-$(ARCH)$(ARCH_SUFFIX)_gcc-$(GCCV)$(DIR_SUFFIX)
 
-$(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz: clean
+$(BIN_DIR)/$(TOOLCHAIN_NAME).tar.zst: clean
 	mkdir -p $(TOOLCHAIN_BUILD_DIR)
 	$(TAR) -cf - -C $(TOPDIR)/staging_dir/  \
 	       $(foreach exclude,$(EXCLUDE_DIRS),--exclude="$(exclude)") \
@@ -62,14 +62,14 @@ $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz: clean
 	find $(TOOLCHAIN_BUILD_DIR) -name CVS | $(XARGS) rm -rf
 	mkdir -p $(BIN_DIR)
 	(cd $(BUILD_DIR); \
-		tar -I '$(STAGING_DIR_HOST)/bin/xz -7e -T$(if $(filter 1,$(NPROC)),2,0)' -cf $@ $(TOOLCHAIN_NAME) \
+		tar -I '$(STAGING_DIR_HOST)/bin/zstd -T0 --ultra -20' -cf $@ $(TOOLCHAIN_NAME) \
 		--mtime="$(shell date --date=@$(SOURCE_DATE_EPOCH))"; \
 	)
 
 download:
 prepare:
-compile: $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz
+compile: $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.zst
 install: compile
 
 clean:
-	rm -rf $(TOOLCHAIN_BUILD_DIR) $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.xz
+	rm -rf $(TOOLCHAIN_BUILD_DIR) $(BIN_DIR)/$(TOOLCHAIN_NAME).tar.zst



From lede-commits at lists.infradead.org  Sat Apr 13 02:20:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 05:20:48 -0400
Subject: [openwrt/openwrt]  libbpf: Update to v1.4.0
In-Reply-To: <171300004830.1671061.12338404752495183390@git-01.infra.openwrt.org>
References: <171300004830.1671061.12338404752495183390@git-01.infra.openwrt.org>
Message-ID: <mailman.26804.1713000057.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5b07c37dfa4625ad0256bf7a4f8386abe72a694b

commit 5b07c37dfa4625ad0256bf7a4f8386abe72a694b
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Wed Apr 3 15:31:29 2024 -0700

    libbpf: Update to v1.4.0
    
    Update to the latest upstream release to include recent improvements and
    bugfixes, and update copyright. Remove MAKE_VARS usage in Makefile and drop
    001-cflags.patch which are no longer needed. Also add flags to disable LTO,
    mistakenly dropped earlier.
    
    Link: https://github.com/libbpf/libbpf/releases/tag/v1.4.0
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/libs/libbpf/Makefile                 | 14 +++++---------
 package/libs/libbpf/patches/001-cflags.patch | 10 ----------
 2 files changed, 5 insertions(+), 19 deletions(-)

diff --git a/package/libs/libbpf/Makefile b/package/libs/libbpf/Makefile
index 913c025e54..666786e9f6 100644
--- a/package/libs/libbpf/Makefile
+++ b/package/libs/libbpf/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2020-2023 Tony Ambardar <itugrok at yahoo.com>
+# Copyright (C) 2020-2024 Tony Ambardar <itugrok at yahoo.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -8,19 +8,19 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libbpf
-PKG_VERSION:=1.3.0
+PKG_VERSION:=1.4.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/libbpf/libbpf
-PKG_MIRROR_HASH:=669d8db696f86f640f86edc358bffa2af8dda656b8e787b095de3578bd8d94ff
+PKG_MIRROR_HASH:=4c37636699c604de345937bdbdf8f2e6ce69cbf768a4aa669c32b542e5302de6
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v1.3.0
+PKG_SOURCE_VERSION:=v1.4.0
 PKG_ABI_VERSION:=$(firstword $(subst .,$(space),$(PKG_VERSION)))
 
 PKG_MAINTAINER:=Tony Ambardar <itugrok at yahoo.com>
 PKG_CPE_ID:=cpe:/a:libbpf_project:libbpf
 
-PKG_BUILD_FLAGS:=no-mips16
+PKG_BUILD_FLAGS:=no-mips16 no-gc-sections no-lto
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
@@ -41,10 +41,6 @@ define Package/libbpf/description
   libbpf is a library for loading eBPF programs and reading and manipulating eBPF objects from user-space.
 endef
 
-MAKE_VARS = \
-	EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
-	LDFLAGS="$(TARGET_LDFLAGS)"
-
 MAKE_FLAGS += \
 	$(if $(findstring c,$(OPENWRT_VERBOSE)),V=1,V='') \
 	LIBSUBDIR=lib
diff --git a/package/libs/libbpf/patches/001-cflags.patch b/package/libs/libbpf/patches/001-cflags.patch
deleted file mode 100644
index 4c0e93a75b..0000000000
--- a/package/libs/libbpf/patches/001-cflags.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/src/Makefile
-+++ b/src/Makefile
-@@ -34,6 +34,7 @@ ALL_CFLAGS := $(INCLUDES)
- 
- SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED
- 
-+CFLAGS = $(EXTRA_CFLAGS)
- CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89
- ALL_CFLAGS += $(CFLAGS) 						\
- 	      -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64		\



From lede-commits at lists.infradead.org  Sat Apr 13 02:20:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 05:20:49 -0400
Subject: [openwrt/openwrt]  bpftool: Update to v7.4.0
In-Reply-To: <171300004830.1671061.12338404752495183390@git-01.infra.openwrt.org>
References: <171300004830.1671061.12338404752495183390@git-01.infra.openwrt.org>
Message-ID: <mailman.26805.1713000057.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4d8a9a954a609bc38047819a83e15b52bb004597

commit 4d8a9a954a609bc38047819a83e15b52bb004597
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Wed Apr 3 15:31:22 2024 -0700

    bpftool: Update to v7.4.0
    
    Update to the latest upstream release to include recent improvements and
    bugfixes. Update copyright, fix typo in PKG_NAME, and remove unneeded use
    of MAKE_VARS definition in Makefile. Drop 001-cflags.patch and simplify
    002-includes.patch after refreshing. Also simplify LTO/DCE build flags.
    
    Link: https://github.com/libbpf/bpftool/releases/tag/v7.4.0
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/network/utils/bpftool/Makefile                | 19 ++++++-------------
 .../network/utils/bpftool/patches/001-cflags.patch    | 10 ----------
 .../network/utils/bpftool/patches/002-includes.patch  | 11 -----------
 3 files changed, 6 insertions(+), 34 deletions(-)

diff --git a/package/network/utils/bpftool/Makefile b/package/network/utils/bpftool/Makefile
index d81cf95102..45f8904d8d 100644
--- a/package/network/utils/bpftool/Makefile
+++ b/package/network/utils/bpftool/Makefile
@@ -1,5 +1,5 @@
 #
-# Copyright (C) 2020-2023 Tony Ambardar <itugrok at yahoo.com>
+# Copyright (C) 2020-2024 Tony Ambardar <itugrok at yahoo.com>
 #
 # This is free software, licensed under the GNU General Public License v2.
 # See /LICENSE for more information.
@@ -7,18 +7,18 @@
 
 include $(TOPDIR)/rules.mk
 
-PKG_NAME:=bpftools
-PKG_VERSION:=7.3.0
+PKG_NAME:=bpftool
+PKG_VERSION:=7.4.0
 PKG_RELEASE:=1
 
 PKG_SOURCE_URL:=https://github.com/libbpf/bpftool
-PKG_MIRROR_HASH:=42030a007714aa075fbd402ccb0196e4892344fb7215b4f51a99b633cc5104fa
+PKG_MIRROR_HASH:=18e22f72e67ff402b5ecaf314445f25c40bfe23299cb783b5834a496297c51ed
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_VERSION:=v7.3.0
+PKG_SOURCE_VERSION:=v7.4.0
 
 PKG_MAINTAINER:=Tony Ambardar <itugrok at yahoo.com>
 
-PKG_BUILD_FLAGS:=no-mips16
+PKG_BUILD_FLAGS:=no-mips16 gc-sections lto
 PKG_BUILD_PARALLEL:=1
 PKG_INSTALL:=1
 
@@ -62,19 +62,12 @@ define Package/bpftool-full/description
   eBPF programs and jited code.
 endef
 
-TARGET_CFLAGS += -ffunction-sections -fdata-sections -flto
-TARGET_LDFLAGS += -Wl,--gc-sections -flto
-
 ifeq ($(BUILD_VARIANT),full)
   full:=1
 else
   full:=0
 endif
 
-MAKE_VARS = \
-	EXTRA_CFLAGS="$(TARGET_CFLAGS) $(TARGET_CPPFLAGS)" \
-	LDFLAGS="$(TARGET_LDFLAGS)"
-
 MAKE_FLAGS += \
 	OUTPUT="$(PKG_BUILD_DIR)/" \
 	prefix="/usr" \
diff --git a/package/network/utils/bpftool/patches/001-cflags.patch b/package/network/utils/bpftool/patches/001-cflags.patch
deleted file mode 100644
index 39cef10c72..0000000000
--- a/package/network/utils/bpftool/patches/001-cflags.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/libbpf/src/Makefile
-+++ b/libbpf/src/Makefile
-@@ -34,6 +34,7 @@ ALL_CFLAGS := $(INCLUDES)
- 
- SHARED_CFLAGS += -fPIC -fvisibility=hidden -DSHARED
- 
-+CFLAGS = $(EXTRA_CFLAGS)
- CFLAGS ?= -g -O2 -Werror -Wall -std=gnu89
- ALL_CFLAGS += $(CFLAGS) 						\
- 	      -D_LARGEFILE64_SOURCE -D_FILE_OFFSET_BITS=64		\
diff --git a/package/network/utils/bpftool/patches/002-includes.patch b/package/network/utils/bpftool/patches/002-includes.patch
index ac1b5fcc22..e6ec3f262b 100644
--- a/package/network/utils/bpftool/patches/002-includes.patch
+++ b/package/network/utils/bpftool/patches/002-includes.patch
@@ -1,14 +1,3 @@
---- a/libbpf/include/linux/list.h
-+++ b/libbpf/include/linux/list.h
-@@ -3,6 +3,8 @@
- #ifndef __LINUX_LIST_H
- #define __LINUX_LIST_H
- 
-+#include <linux/types.h>
-+
- #define LIST_HEAD_INIT(name) { &(name), &(name) }
- #define LIST_HEAD(name) \
-         struct list_head name = LIST_HEAD_INIT(name)
 --- a/src/Makefile
 +++ b/src/Makefile
 @@ -73,10 +73,10 @@ CFLAGS += -W -Wall -Wextra -Wno-unused-p



From lede-commits at lists.infradead.org  Sat Apr 13 02:27:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 05:27:51 -0400
Subject: [openwrt/openwrt]  CI: labeler: add d1 target
In-Reply-To: <171300047192.1680564.9849142405861574220@git-01.infra.openwrt.org>
References: <171300047192.1680564.9849142405861574220@git-01.infra.openwrt.org>
Message-ID: <mailman.26806.1713000476.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/166ed4f50a75aa51c249bea9ba1884203eeb1c87

commit 166ed4f50a75aa51c249bea9ba1884203eeb1c87
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 13 11:25:52 2024 +0200

    CI: labeler: add d1 target
    
    Add support for 'd1' target and its specific packages in labeler.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .github/labeler.yml | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/.github/labeler.yml b/.github/labeler.yml
index 1813b7f849..5cbf2ac987 100644
--- a/.github/labeler.yml
+++ b/.github/labeler.yml
@@ -30,6 +30,10 @@
   - "package/boot/arm-trusted-firmware-bcm63xx/**"
 "target/bmips":
   - "target/linux/bmips/**"
+"target/d1":
+  - "target/linux/d1/**"
+  - "package/boot/uboot-d1/**"
+  - "package/boot/opensbi/**"
 "target/gemini":
   - "target/linux/gemini/**"
 "target/imx":



From lede-commits at lists.infradead.org  Sat Apr 13 04:41:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 07:41:55 -0400
Subject: [openwrt/openwrt]  uboot-d1: define default BUILD_SUBTARGET
In-Reply-To: <171300851551.1857981.15908763730368625117@git-01.infra.openwrt.org>
References: <171300851551.1857981.15908763730368625117@git-01.infra.openwrt.org>
Message-ID: <mailman.26809.1713008524.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0db68a789f08a173fe82b3b99364a8924953f3a1

commit 0db68a789f08a173fe82b3b99364a8924953f3a1
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Sat Apr 13 13:04:58 2024 +0800

    uboot-d1: define default BUILD_SUBTARGET
    
    As commit 3ce1e4c3d3da ("d1: define subtarget specifically") added the
    'generic' subtarget, without 'BUILD_SUBTARGET' the correspond U-Boot
    package will be no longer selected automatically.
    
    Fixes: 3ce1e4c3d3da ("d1: define subtarget specifically")
    Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
---
 package/boot/uboot-d1/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/package/boot/uboot-d1/Makefile b/package/boot/uboot-d1/Makefile
index 610dc5b498..083a219baf 100644
--- a/package/boot/uboot-d1/Makefile
+++ b/package/boot/uboot-d1/Makefile
@@ -19,6 +19,7 @@ include $(INCLUDE_DIR)/package.mk
 
 define U-Boot/Default
   BUILD_TARGET:=d1
+  BUILD_SUBTARGET:=generic
   UBOOT_IMAGE:=u-boot-sunxi-with-spl.bin
   UENV:=default
   DTS_DIR:=arch/riscv/dts



From lede-commits at lists.infradead.org  Sat Apr 13 07:34:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 10:34:12 -0400
Subject: [openwrt/openwrt]  hostapd: fix a crash corner case
In-Reply-To: <171301885275.2062724.4986309632275366040@git-01.infra.openwrt.org>
References: <171301885275.2062724.4986309632275366040@git-01.infra.openwrt.org>
Message-ID: <mailman.26818.1713018857.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1ee5b7e506f937e16737472eed02bc5409716304

commit 1ee5b7e506f937e16737472eed02bc5409716304
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Apr 10 13:46:40 2024 +0200

    hostapd: fix a crash corner case
    
    On some setup failures, iface->bss can be NULL
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/hostapd/src/src/ap/ucode.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/src/src/ap/ucode.c b/package/network/services/hostapd/src/src/ap/ucode.c
index 16d1b51536..d344190208 100644
--- a/package/network/services/hostapd/src/src/ap/ucode.c
+++ b/package/network/services/hostapd/src/src/ap/ucode.c
@@ -51,7 +51,7 @@ hostapd_ucode_update_bss_list(struct hostapd_iface *iface, uc_value_t *if_bss, u
 	int i;
 
 	list = ucv_array_new(vm);
-	for (i = 0; i < iface->num_bss; i++) {
+	for (i = 0; iface->bss && i < iface->num_bss; i++) {
 		struct hostapd_data *hapd = iface->bss[i];
 		uc_value_t *val = hostapd_ucode_bss_get_uval(hapd);
 



From lede-commits at lists.infradead.org  Sat Apr 13 07:34:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 10:34:13 -0400
Subject: [openwrt/openwrt]  mac80211: improve mesh fast tx patch
In-Reply-To: <171301885275.2062724.4986309632275366040@git-01.infra.openwrt.org>
References: <171301885275.2062724.4986309632275366040@git-01.infra.openwrt.org>
Message-ID: <mailman.26819.1713018857.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ab9a29a3209ea9d1843496bdaf0ea912be0dda99

commit ab9a29a3209ea9d1843496bdaf0ea912be0dda99
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Apr 13 16:05:07 2024 +0200

    mac80211: improve mesh fast tx patch
    
    Change hash key struct size for faster lookup.
    Fix clearing cache entries for forwarding
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...0211-split-mesh-fast-tx-cache-into-local-proxied.patch | 15 ++++++++++-----
 ...-mac80211-fix-race-condition-on-enabling-fast-xm.patch |  2 +-
 2 files changed, 11 insertions(+), 6 deletions(-)

diff --git a/package/kernel/mac80211/patches/subsys/310-mac80211-split-mesh-fast-tx-cache-into-local-proxied.patch b/package/kernel/mac80211/patches/subsys/310-mac80211-split-mesh-fast-tx-cache-into-local-proxied.patch
index 4853cef723..e142cfa4fe 100644
--- a/package/kernel/mac80211/patches/subsys/310-mac80211-split-mesh-fast-tx-cache-into-local-proxied.patch
+++ b/package/kernel/mac80211/patches/subsys/310-mac80211-split-mesh-fast-tx-cache-into-local-proxied.patch
@@ -38,7 +38,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/net/mac80211/mesh.h
 +++ b/net/mac80211/mesh.h
-@@ -134,9 +134,33 @@ struct mesh_path {
+@@ -134,9 +134,38 @@ struct mesh_path {
  #define MESH_FAST_TX_CACHE_TIMEOUT		8000 /* msecs */
  
  /**
@@ -47,13 +47,18 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 + * @MESH_FAST_TX_TYPE_LOCAL: tx from the local vif address as SA
 + * @MESH_FAST_TX_TYPE_PROXIED: local tx with a different SA (e.g. bridged)
 + * @MESH_FAST_TX_TYPE_FORWARDED: forwarded from a different mesh point
++ * @NUM_MESH_FAST_TX_TYPE: number of entry types
 + */
 +enum ieee80211_mesh_fast_tx_type {
 +	MESH_FAST_TX_TYPE_LOCAL,
 +	MESH_FAST_TX_TYPE_PROXIED,
 +	MESH_FAST_TX_TYPE_FORWARDED,
++
++	/* must be last */
++	NUM_MESH_FAST_TX_TYPE
 +};
 +
++
 +/**
 + * struct ieee80211_mesh_fast_tx_key - cached mesh fast tx entry key
 + *
@@ -62,7 +67,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 + */
 +struct ieee80211_mesh_fast_tx_key {
 +	u8 addr[ETH_ALEN] __aligned(2);
-+	enum ieee80211_mesh_fast_tx_type type;
++	u16 type;
 +};
 +
 +/**
@@ -73,7 +78,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   * @fast_tx: base fast_tx data
   * @hdr: cached mesh and rfc1042 headers
   * @hdrlen: length of mesh + rfc1042
-@@ -147,7 +171,7 @@ struct mesh_path {
+@@ -147,7 +176,7 @@ struct mesh_path {
   */
  struct ieee80211_mesh_fast_tx {
  	struct rhash_head rhash;
@@ -82,7 +87,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	struct ieee80211_fast_tx fast_tx;
  	u8 hdr[sizeof(struct ieee80211s_hdr) + sizeof(rfc1042_header)];
-@@ -333,7 +357,8 @@ void mesh_path_tx_root_frame(struct ieee
+@@ -333,7 +362,8 @@ void mesh_path_tx_root_frame(struct ieee
  
  bool mesh_action_is_path_sel(struct ieee80211_mgmt *mgmt);
  struct ieee80211_mesh_fast_tx *
@@ -178,7 +183,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 -	entry = rhashtable_lookup_fast(&cache->rht, addr, fast_tx_rht_params);
 -	if (entry)
 -		mesh_fast_tx_entry_free(cache, entry);
-+	for (i = MESH_FAST_TX_TYPE_LOCAL; i < MESH_FAST_TX_TYPE_FORWARDED; i++) {
++	for (i = 0; i < NUM_MESH_FAST_TX_TYPE; i++) {
 +		key.type = i;
 +		entry = rhashtable_lookup_fast(&cache->rht, &key, fast_tx_rht_params);
 +		if (entry)
diff --git a/package/kernel/mac80211/patches/subsys/314-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch b/package/kernel/mac80211/patches/subsys/314-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch
index 12ed2142ab..e7a7010c7f 100644
--- a/package/kernel/mac80211/patches/subsys/314-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch
+++ b/package/kernel/mac80211/patches/subsys/314-wifi-mac80211-fix-race-condition-on-enabling-fast-xm.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -914,6 +914,7 @@ static int sta_info_insert_finish(struct
+@@ -918,6 +918,7 @@ static int sta_info_insert_finish(struct
  
  	if (ieee80211_vif_is_mesh(&sdata->vif))
  		mesh_accept_plinks_update(sdata);



From lede-commits at lists.infradead.org  Sat Apr 13 08:42:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 11:42:35 -0400
Subject: [openwrt/openwrt]  ramips: TP-Link Archer C2 v1: simplification of
 the dts definition
In-Reply-To: <171302295463.2140223.13841567698915615600@git-01.infra.openwrt.org>
References: <171302295463.2140223.13841567698915615600@git-01.infra.openwrt.org>
Message-ID: <mailman.26858.1713022968.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6258492e1b388aed4b0500d14954d5c2f3a5e21e

commit 6258492e1b388aed4b0500d14954d5c2f3a5e21e
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Apr 12 13:57:26 2024 +0200

    ramips: TP-Link Archer C2 v1: simplification of the dts definition
    
    Import from the mt7620a_tplink_archer.dtsi file and thus simplify the rest of the definition.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../ramips/dts/mt7620a_tplink_archer-c2-v1.dts     | 143 ++-------------------
 1 file changed, 10 insertions(+), 133 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
index 33642114cb..ea3533e446 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
@@ -1,9 +1,9 @@
-#include "mt7620a.dtsi"
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
 
-#include <dt-bindings/gpio/gpio.h>
-#include <dt-bindings/input/input.h>
 #include <dt-bindings/leds/common.h>
 
+#include "mt7620a_tplink_archer.dtsi"
+
 / {
 	compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc";
 	model = "TP-Link Archer C2 v1";
@@ -15,9 +15,6 @@
 		led-upgrade = &led_wps;
 	};
 
-	chosen {
-		bootargs = "console=ttyS0,115200";
-	};
 
 	leds {
 		compatible = "gpio-leds";
@@ -56,22 +53,6 @@
 		};
 	};
 
-	keys {
-		compatible = "gpio-keys";
-
-		reset_wps {
-			label = "reset_wps";
-			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RESTART>;
-		};
-
-		rfkill {
-			label = "rfkill";
-			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
-			linux,code = <KEY_RFKILL>;
-		};
-	};
-
 	rtl8367rb {
 		compatible = "realtek,rtl8367b";
 		cpu_port = <6>;
@@ -80,81 +61,10 @@
 	};
 };
 
-&spi0 {
-	status = "okay";
-
-	flash at 0 {
-		compatible = "jedec,spi-nor";
-		reg = <0>;
-		spi-max-frequency = <30000000>;
-
-		partitions {
-			compatible = "fixed-partitions";
-			#address-cells = <1>;
-			#size-cells = <1>;
-
-			partition at 0 {
-				label = "u-boot";
-				reg = <0x0 0x20000>;
-				read-only;
-			};
-
-			partition at 20000 {
-				compatible = "tplink,firmware";
-				label = "firmware";
-				reg = <0x20000 0x7a0000>;
-			};
-
-			partition at 7c0000 {
-				label = "config";
-				reg = <0x7c0000 0x10000>;
-				read-only;
-			};
-
-			partition at 7d0000 {
-				label = "rom";
-				reg = <0x7d0000 0x10000>;
-				read-only;
-
-				nvmem-layout {
-					compatible = "fixed-layout";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					macaddr_rom_f100: macaddr at f100 {
-						compatible = "mac-base";
-						reg = <0xf100 0x6>;
-						#nvmem-cell-cells = <1>;
-					};
-				};
-			};
-
-			partition at 7e0000 {
-				label = "romfile";
-				reg = <0x7e0000 0x10000>;
-				read-only;
-			};
-
-			partition at 7f0000 {
-				label = "radio";
-				reg = <0x7f0000 0x10000>;
-				read-only;
-
-				nvmem-layout {
-					compatible = "fixed-layout";
-					#address-cells = <1>;
-					#size-cells = <1>;
-
-					eeprom_radio_0: eeprom at 0 {
-						reg = <0x0 0x200>;
-					};
-
-					eeprom_radio_8000: eeprom at 8000 {
-						reg = <0x8000 0x200>;
-					};
-				};
-			};
-		};
+&state_default {
+	gpio {
+		groups = "i2c", "uartf", "wled", "ephy", "spi refclk";
+		function = "gpio";
 	};
 };
 
@@ -176,46 +86,13 @@
 	};
 };
 
-&gpio1 {
-	status = "okay";
-};
-
-&gpio2 {
-	status = "okay";
-};
-
-&gpio3 {
-	status = "okay";
-};
-
-&state_default {
-	gpio {
-		groups = "i2c", "uartf", "wled", "ephy", "spi refclk";
-		function = "gpio";
-	};
-};
 
 &wmac {
 	nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>;
 	nvmem-cell-names = "eeprom", "mac-address";
 };
 
-&ehci {
-	status = "okay";
-};
-
-&ohci {
-	status = "okay";
-};
-
-&pcie {
-	status = "okay";
-};
-
-&pcie0 {
-	mt76 at 0,0 {
-		reg = <0x0000 0 0 0 0>;
-		nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>;
-		nvmem-cell-names = "eeprom", "mac-address";
-	};
+&wifi {
+	nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 (-1)>;
+	nvmem-cell-names = "eeprom", "mac-address";
 };



From lede-commits at lists.infradead.org  Sat Apr 13 08:42:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 11:42:37 -0400
Subject: [openwrt/openwrt]  ramips: add support for TP-Link EC220-G5 v2
In-Reply-To: <171302295463.2140223.13841567698915615600@git-01.infra.openwrt.org>
References: <171302295463.2140223.13841567698915615600@git-01.infra.openwrt.org>
Message-ID: <mailman.26861.1713022968.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c08f8a4a4913d80ed3fb261dadc711e94b8428dd

commit c08f8a4a4913d80ed3fb261dadc711e94b8428dd
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Apr 12 16:44:23 2024 +0200

    ramips: add support for TP-Link EC220-G5 v2
    
    TP-Link EC220-G5 v2 is a dual band router with 4 GbE ports
    Advertised as AC1200 for its 867Mbps (2x2) 5GHz band
    and 300 Mbps (2x2) 2.4GHz band.
    
    Specs:
    - SoC: MediaTek MT7620A
    - Ethernet: 4x GbE ports (Realtek RTL8367S)
    - Wireless 2.4GHz: MediaTek MT7620A
    - Wireless 5GHz: MediaTek MT7612E
    - RAM: 64MiB
    - ROM: 8MiB (W25Q64BV)
    - 2 Buttons (WPS and reset)
    - 7 LEDs
    
    Flash instructions via serial console:
    1. Rename the factory.bin to to test.bin
    2. start a TFTP server from IP address 192.168.0.225 and serve the image named test.bin
    3. connect your device to the LAN port
    4. power up the router and press 4 on the console to stop the boot process.
    5. enter the following commands on the router console
            tftp 0x80060000 test.bin
            erase tplink 0x20000 0x7a0000
            cp.b 0x80060000 0x20000 0x7a0000
            reset
    
    Flash instructions via TFTP:
    1. Update orginal firmware of the router to the latest one.
    2. Rename openwrt-ramips-mt7620-tplink_ec220-g5-v2-squashfs-tftp-recovery.bin to tp_recovery.bin
    3. Change computer IP to 192.168.0.66
    4. Run TFTP serwer
    5. Start the router with the reset button pressed, the file will be automatically downloaded and after a while the router will restart.
    6. After updating, set your computer's IP to DHCP
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../ramips/dts/mt7620a_tplink_ec220-g5-v2.dts      | 144 +++++++++++++++++++++
 target/linux/ramips/image/mt7620.mk                |  16 +++
 .../ramips/mt7620/base-files/etc/board.d/01_leds   |   4 +
 .../mt7620/base-files/etc/board.d/02_network       |   9 +-
 4 files changed, 172 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7620a_tplink_ec220-g5-v2.dts b/target/linux/ramips/dts/mt7620a_tplink_ec220-g5-v2.dts
new file mode 100644
index 0000000000..6ac1a9c5d5
--- /dev/null
+++ b/target/linux/ramips/dts/mt7620a_tplink_ec220-g5-v2.dts
@@ -0,0 +1,144 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include <dt-bindings/leds/common.h>
+
+#include "mt7620a_tplink_8m.dtsi"
+
+/ {
+	compatible = "tplink,ec220-g5-v2", "ralink,mt7620a-soc";
+	model = "TP-Link EC220-G5 v2";
+
+	aliases {
+		led-boot = &led_power;
+		led-failsafe = &led_power;
+		led-running = &led_power;
+		led-upgrade = &led_power;
+		label-mac-device = &ethernet;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_power: led-0 {
+			function = LED_FUNCTION_POWER;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio2 2 GPIO_ACTIVE_LOW>;
+		};
+
+		led-1 {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_ORANGE>;
+			gpios = <&gpio0 7 GPIO_ACTIVE_LOW>;
+		};
+
+		led-2 {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
+		};
+
+		led-3 {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio0 1 GPIO_ACTIVE_LOW>;
+		};
+
+		led-4 {
+			function = LED_FUNCTION_WLAN_2GHZ;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio0 2 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+
+		led-5 {
+			function = LED_FUNCTION_WLAN_5GHZ;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio0 9 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy1tpt";
+		};
+
+		led-6 {
+			function = LED_FUNCTION_WPS;
+			color = <LED_COLOR_ID_GREEN>;
+			gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&gpio0 13 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		rfkill {
+			label = "rfkill";
+			gpios = <&gpio2 3 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RFKILL>;
+		};
+	};
+
+	rtl8367s {
+		compatible = "realtek,rtl8367b";
+		cpu_port = <7>;
+		realtek,extif2 = <1 0 1 1 1 1 1 1 2>;
+		mii-bus = <&mdio0>;
+		phy-id = <29>;
+	};
+};
+
+&spi0 {
+	flash at 0 {
+		#address-cells = <1>;
+		#size-cells = <1>;
+	};
+};
+
+&state_default {
+	gpio {
+		groups = "i2c", "uartf", "ephy", "rgmii2";
+		function = "gpio";
+	};
+};
+
+&ethernet {
+	pinctrl-names = "default";
+	pinctrl-0 = <&rgmii1_pins &mdio_pins>;
+
+	port at 5 {
+		status = "okay";
+		mediatek,fixed-link = <1000 1 1 1>;
+		phy-mode = "rgmii";
+	};
+
+	mdio0: mdio-bus {
+		status = "okay";
+		reset-gpios = <&gpio2 20 GPIO_ACTIVE_LOW>;
+		reset-delay-us = <10000>;
+	};
+};
+
+&ehci {
+	status = "disabled";
+};
+
+&ohci {
+	status = "disabled";
+};
+
+&wmac {
+	pinctrl-names = "default", "pa_gpio";
+	pinctrl-0 = <&pa_pins>;
+	pinctrl-1 = <&pa_gpio_pins>;
+
+	nvmem-cells = <&eeprom_radio_0>, <&macaddr_rom_f100 0>;
+	nvmem-cell-names = "eeprom", "mac-address";
+};
+
+
+&wifi {
+	nvmem-cells = <&eeprom_radio_8000>, <&macaddr_rom_f100 2>;
+	nvmem-cell-names = "eeprom", "mac-address";
+};
diff --git a/target/linux/ramips/image/mt7620.mk b/target/linux/ramips/image/mt7620.mk
index b35359aefe..f7238c2b1f 100644
--- a/target/linux/ramips/image/mt7620.mk
+++ b/target/linux/ramips/image/mt7620.mk
@@ -1273,6 +1273,22 @@ define Device/tplink_archer-mr200
 endef
 TARGET_DEVICES += tplink_archer-mr200
 
+define Device/tplink_ec220-g5-v2
+  $(Device/tplink-v2)
+  SOC := mt7620a
+  IMAGE_SIZE := 7808k
+  TPLINK_FLASHLAYOUT := 8Mmtk
+  TPLINK_HWID := 0x02015a15
+  TPLINK_HWREV := 0x55000600
+  TPLINK_HWREVADD := 0x03000000
+  IMAGES += tftp-recovery.bin
+  IMAGE/tftp-recovery.bin := pad-extra 128k | $$(IMAGE/factory.bin)
+  DEVICE_MODEL := EC220-G5
+  DEVICE_VARIANT := v2
+  DEVICE_PACKAGES := kmod-mt76x2 kmod-switch-rtl8367b
+endef
+TARGET_DEVICES += tplink_ec220-g5-v2
+
 define Device/tplink_re200-v1
   $(Device/tplink-v1)
   SOC := mt7620a
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
index a56ae8f0bf..261e54f5e1 100644
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/01_leds
@@ -242,6 +242,10 @@ tplink,archer-mr200)
 	ucidef_set_led_netdev "lan" "lan" "white:lan" "eth0.1"
 	ucidef_set_led_netdev "wan" "wan" "white:wan" "usb0"
 	;;
+tplink,ec220-g5-v2)
+	ucidef_set_led_switch "lan" "lan" "green:lan" "switch1" "0x17"
+	ucidef_set_led_switch "wan" "wan" "orange:wan" "switch1" "0x08"
+	;;
 tplink,re200-v1)
 	ucidef_set_led_netdev "lan" "lan" "green:lan" "eth0"
 	;;
diff --git a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
index 8cc6091e23..63f7e41ac2 100644
--- a/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
+++ b/target/linux/ramips/mt7620/base-files/etc/board.d/02_network
@@ -247,6 +247,12 @@ ramips_setup_interfaces()
 			"0:lan" "1:lan" "2:lan" "3:lan" "6t at eth0"
 		ucidef_set_interface_wan "usb0"
 		;;
+	tplink,ec220-g5-v2)
+		ucidef_add_switch "switch0"
+		ucidef_add_switch_attr "switch0" "enable" "0"
+		ucidef_add_switch "switch1" \
+			"0:lan:3" "1:lan:2" "2:lan:1" "4:lan:4" "3:wan" "7 at eth0"
+		;;
 	wavlink,wl-wn535k1)
 		ucidef_add_switch "switch0" \
 			"2:lan:2" "5:lan:1" "4:wan" "6 at eth0"
@@ -416,7 +422,8 @@ ramips_setup_macs()
 	tplink,archer-c20i|\
 	tplink,archer-c5-v4|\
 	tplink,archer-c50-v1|\
-	tplink,archer-mr200)
+	tplink,archer-mr200|\
+	tplink,ec220-g5-v2)
 		wan_mac=$(macaddr_add "$(mtd_get_mac_binary rom 0xf100)" 1)
 		;;
 	wavlink,wl-wn535k1)



From lede-commits at lists.infradead.org  Sat Apr 13 08:42:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 11:42:36 -0400
Subject: [openwrt/openwrt]  ramips: mt7620a_tplink_archer.dtsi rename to
 mt7620a_tplink_8m.dtsi
In-Reply-To: <171302295463.2140223.13841567698915615600@git-01.infra.openwrt.org>
References: <171302295463.2140223.13841567698915615600@git-01.infra.openwrt.org>
Message-ID: <mailman.26862.1713022970.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ada3c41acd22357689e700f1475ab376b6628d00

commit ada3c41acd22357689e700f1475ab376b6628d00
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Apr 12 16:14:18 2024 +0200

    ramips: mt7620a_tplink_archer.dtsi rename to mt7620a_tplink_8m.dtsi
    
    Change the name mt7620a_tplink_archer.dtsi to mt7620a_tplink_8m.dtsi because it will also be a base for TP-Link non-Archer routers.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 .../ramips/dts/{mt7620a_tplink_archer.dtsi => mt7620a_tplink_8m.dtsi}   | 0
 target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts                 | 2 +-
 target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts                | 2 +-
 target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts                  | 2 +-
 target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts                 | 2 +-
 target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts                | 2 +-
 6 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_8m.dtsi
similarity index 100%
rename from target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
rename to target/linux/ramips/dts/mt7620a_tplink_8m.dtsi
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
index ea3533e446..10756e3b3c 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c2-v1.dts
@@ -2,7 +2,7 @@
 
 #include <dt-bindings/leds/common.h>
 
-#include "mt7620a_tplink_archer.dtsi"
+#include "mt7620a_tplink_8m.dtsi"
 
 / {
 	compatible = "tplink,archer-c2-v1", "ralink,mt7620a-soc";
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
index 726a86ae17..285e27c357 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20-v1.dts
@@ -1,6 +1,6 @@
 #include <dt-bindings/leds/common.h>
 
-#include "mt7620a_tplink_archer.dtsi"
+#include "mt7620a_tplink_8m.dtsi"
 
 / {
 	compatible = "tplink,archer-c20-v1", "ralink,mt7620a-soc";
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
index a977156e5f..12141a6e59 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c20i.dts
@@ -1,6 +1,6 @@
 #include <dt-bindings/leds/common.h>
 
-#include "mt7620a_tplink_archer.dtsi"
+#include "mt7620a_tplink_8m.dtsi"
 
 / {
 	compatible = "tplink,archer-c20i", "ralink,mt7620a-soc";
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts
index fcebf87c3f..1ed156e8af 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c5-v4.dts
@@ -2,7 +2,7 @@
 
 #include <dt-bindings/leds/common.h>
 
-#include "mt7620a_tplink_archer.dtsi"
+#include "mt7620a_tplink_8m.dtsi"
 
 / {
 	compatible = "tplink,archer-c5-v4", "ralink,mt7620a-soc";
diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
index cfb31b47fe..97b803470d 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer-c50-v1.dts
@@ -1,6 +1,6 @@
 #include <dt-bindings/leds/common.h>
 
-#include "mt7620a_tplink_archer.dtsi"
+#include "mt7620a_tplink_8m.dtsi"
 
 / {
 	compatible = "tplink,archer-c50-v1", "ralink,mt7620a-soc";



From lede-commits at lists.infradead.org  Sat Apr 13 08:42:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 11:42:34 -0400
Subject: [openwrt/openwrt]  ramips: mt7620a_tplink_archer.dtsi - remove
 unnecessary nvmem-cells definitions
In-Reply-To: <171302295463.2140223.13841567698915615600@git-01.infra.openwrt.org>
References: <171302295463.2140223.13841567698915615600@git-01.infra.openwrt.org>
Message-ID: <mailman.26863.1713022970.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c97be14c8c12de613c5a930ece7ddf2cd6b579bf

commit c97be14c8c12de613c5a930ece7ddf2cd6b579bf
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Apr 12 13:44:39 2024 +0200

    ramips: mt7620a_tplink_archer.dtsi - remove unnecessary nvmem-cells definitions
    
    Remove unnecessary nvmem-cells definitions that are being redefined anyway.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/ramips/dts/mt7620a_tplink_archer.dtsi | 7 -------
 1 file changed, 7 deletions(-)

diff --git a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
index 4ba19be495..4bcefd2346 100644
--- a/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
+++ b/target/linux/ramips/dts/mt7620a_tplink_archer.dtsi
@@ -132,11 +132,6 @@
 	status = "okay";
 };
 
-&wmac {
-	nvmem-cells = <&eeprom_radio_0>;
-	nvmem-cell-names = "eeprom";
-};
-
 &pcie {
 	status = "okay";
 };
@@ -144,8 +139,6 @@
 &pcie0 {
 	wifi: mt76 at 0,0 {
 		reg = <0x0000 0 0 0 0>;
-		nvmem-cells = <&eeprom_radio_8000>;
-		nvmem-cell-names = "eeprom";
 		ieee80211-freq-limit = <5000000 6000000>;
 	};
 };



From lede-commits at lists.infradead.org  Sat Apr 13 10:49:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 13:49:50 -0400
Subject: [openwrt/openwrt]  mediatek: fix DTS defining mt7530 switch phys but
 not referencing them
In-Reply-To: <171303059012.2297758.1030597144803190035@git-01.infra.openwrt.org>
References: <171303059012.2297758.1030597144803190035@git-01.infra.openwrt.org>
Message-ID: <mailman.26868.1713030621.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/eb13076e77c412cfe4dd6de48138507ea6f3c8b3

commit eb13076e77c412cfe4dd6de48138507ea6f3c8b3
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri Apr 12 13:24:38 2024 +0100

    mediatek: fix DTS defining mt7530 switch phys but not referencing them
    
    The upstream solution to define the MDIO bus in DT is a bit
    more strict than our previous downstream solution doing the same thing
    and now requires switch PHYs to be referenced in DT as well.
    
    Ar?n? ?nal told us in #15141:
    "With [the now upstream patch written by him which we backported], the
    switch MDIO bus won't be assigned to ds->user_mii_bus when the switch
    MDIO bus is defined on the device tree anymore. This was not the case
    with the downstream patch.
    
    When ds->user_mii_bus is populated, DSA will 1:1 map the port with
    PHY. Meaning port with address 1 will be mapped to PHY with address 1.
    Because that ds->user_mii_bus is not populated when the switch MDIO
    bus is defined on the device tree, on every port node, the PHY address
    must be supplied by the phy-handle property."
    
    Add those phy-handles to affected devices' DT.
    
    Fixes: 4354b34f6f ("generic: 6.6: sync mt7530 DSA driver with upstream")
    Fixes: 401a6ccfaf ("generic: 6.1: sync mt7530 DSA driver with upstream")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts | 12 ++++++++----
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts  | 12 ++++++++----
 target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts  | 12 ++++++++----
 3 files changed, 24 insertions(+), 12 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts b/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts
index 6bff786558..612f3c7334 100644
--- a/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts
+++ b/target/linux/mediatek/dts/mt7986a-acer-predator-w6.dts
@@ -348,21 +348,25 @@
 		port at 0 {
 			reg = <0>;
 			label = "game";
+			phy-handle = <&swphy0>;
 		};
 
 		port at 1 {
 			reg = <1>;
 			label = "lan1";
+			phy-handle = <&swphy1>;
 		};
 
 		port at 2 {
 			reg = <2>;
 			label = "lan2";
+			phy-handle = <&swphy2>;
 		};
 
 		port at 3 {
 			reg = <3>;
 			label = "lan3";
+			phy-handle = <&swphy3>;
 		};
 
 		port at 6 {
@@ -383,7 +387,7 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		phy at 0 {
+		swphy0: phy at 0 {
 			reg = <0>;
 
 			mediatek,led-config = <
@@ -397,7 +401,7 @@
 			>;
 		};
 
-		phy at 1 {
+		swphy1: phy at 1 {
 			reg = <1>;
 
 			mediatek,led-config = <
@@ -411,7 +415,7 @@
 			>;
 		};
 
-		phy at 2 {
+		swphy2: phy at 2 {
 			reg = <2>;
 
 			mediatek,led-config = <
@@ -425,7 +429,7 @@
 			>;
 		};
 
-		phy at 3 {
+		swphy3: phy at 3 {
 			reg = <3>;
 
 			mediatek,led-config = <
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
index 22530df9bb..e40602fa21 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax4200.dts
@@ -286,21 +286,25 @@
 		port at 1 {
 			reg = <1>;
 			label = "lan1";
+			phy-handle = <&swphy1>;
 		};
 
 		port at 2 {
 			reg = <2>;
 			label = "lan2";
+			phy-handle = <&swphy2>;
 		};
 
 		port at 3 {
 			reg = <3>;
 			label = "lan3";
+			phy-handle = <&swphy3>;
 		};
 
 		port at 4 {
 			reg = <4>;
 			label = "lan4";
+			phy-handle = <&swphy4>;
 		};
 
 		port at 6 {
@@ -321,7 +325,7 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		phy at 1 {
+		swphy1: phy at 1 {
 			reg = <1>;
 
 			mediatek,led-config = <
@@ -335,7 +339,7 @@
 			>;
 		};
 
-		phy at 2 {
+		swphy2: phy at 2 {
 			reg = <2>;
 
 			mediatek,led-config = <
@@ -349,7 +353,7 @@
 			>;
 		};
 
-		phy at 3 {
+		swphy3: phy at 3 {
 			reg = <3>;
 
 			mediatek,led-config = <
@@ -363,7 +367,7 @@
 			>;
 		};
 
-		phy at 4 {
+		swphy4: phy at 4 {
 			reg = <4>;
 
 			mediatek,led-config = <
diff --git a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
index bde2525cd7..1cdfb5f155 100644
--- a/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
+++ b/target/linux/mediatek/dts/mt7986a-asus-tuf-ax6000.dts
@@ -298,21 +298,25 @@
 		port at 1 {
 			reg = <4>;
 			label = "lan1";
+			phy-handle = <&swphy1>;
 		};
 
 		port at 2 {
 			reg = <3>;
 			label = "lan2";
+			phy-handle = <&swphy2>;
 		};
 
 		port at 3 {
 			reg = <2>;
 			label = "lan3";
+			phy-handle = <&swphy3>;
 		};
 
 		port at 4 {
 			reg = <1>;
 			label = "lan4";
+			phy-handle = <&swphy4>;
 		};
 
 		port at 5 {
@@ -341,7 +345,7 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		phy at 1 {
+		swphy1: phy at 1 {
 			reg = <1>;
 
 			mediatek,led-config = <
@@ -355,7 +359,7 @@
 			>;
 		};
 
-		phy at 2 {
+		swphy2: phy at 2 {
 			reg = <2>;
 
 			mediatek,led-config = <
@@ -369,7 +373,7 @@
 			>;
 		};
 
-		phy at 3 {
+		swphy3: phy at 3 {
 			reg = <3>;
 
 			mediatek,led-config = <
@@ -383,7 +387,7 @@
 			>;
 		};
 
-		phy at 4 {
+		swphy4: phy at 4 {
 			reg = <4>;
 
 			mediatek,led-config = <



From lede-commits at lists.infradead.org  Sat Apr 13 11:05:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 14:05:04 -0400
Subject: [openwrt/openwrt]  mac80211: ath11k: support DT property to limit
 channels
In-Reply-To: <171303150492.2316626.15954517607605282441@git-01.infra.openwrt.org>
References: <171303150492.2316626.15954517607605282441@git-01.infra.openwrt.org>
Message-ID: <mailman.26869.1713031509.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5fe0d296c1edc7cc69127e02cda22b8b5025e7d9

commit 5fe0d296c1edc7cc69127e02cda22b8b5025e7d9
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Thu Apr 11 21:08:44 2024 +0200

    mac80211: ath11k: support DT property to limit channels
    
    Limiting allowed channels per device may be required and is commonly
    supported on other drivers, so include a pending patch to add support for
    the same.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...th11k-add-support-DT-ieee80211-freq-limit.patch | 24 ++++++++++++++++++++++
 1 file changed, 24 insertions(+)

diff --git a/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-add-support-DT-ieee80211-freq-limit.patch b/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-add-support-DT-ieee80211-freq-limit.patch
new file mode 100644
index 0000000000..9571f7f207
--- /dev/null
+++ b/package/kernel/mac80211/patches/ath11k/101-wifi-ath11k-add-support-DT-ieee80211-freq-limit.patch
@@ -0,0 +1,24 @@
+From 1338da257f299d35b4d954b9fda2cc7e0a54a69d Mon Sep 17 00:00:00 2001
+From: Christian Lamparter <chunkeey at gmail.com>
+Date: Sun, 11 Jun 2023 14:37:32 +0200
+Subject: [PATCH] wifi: ath11k: add support DT ieee80211-freq-limit
+
+The common DT property can be used to limit the available
+channels/frequencies. But ath11k has to manually call
+wiphy_read_of_freq_limits().
+
+Signed-off-by: Christian Lamparter <chunkeey at gmail.com>
+---
+ drivers/net/wireless/ath/ath11k/mac.c | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/drivers/net/wireless/ath/ath11k/mac.c
++++ b/drivers/net/wireless/ath/ath11k/mac.c
+@@ -9455,6 +9455,7 @@ static int __ath11k_mac_register(struct
+ 	if (ret)
+ 		goto err;
+ 
++	wiphy_read_of_freq_limits(ar->hw->wiphy);
+ 	ath11k_mac_setup_ht_vht_cap(ar, cap, &ht_cap);
+ 	ath11k_mac_setup_he_cap(ar, cap);
+ 



From lede-commits at lists.infradead.org  Sat Apr 13 14:07:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 17:07:27 -0400
Subject: [openwrt/openwrt]  ipq40xx: whw03v2: fix handling of RGB LED
In-Reply-To: <171304244707.2524922.15059263404768764647@git-01.infra.openwrt.org>
References: <171304244707.2524922.15059263404768764647@git-01.infra.openwrt.org>
Message-ID: <mailman.26881.1713042455.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fc62d66c20b9e9f52ed787d2079baab06108b959

commit fc62d66c20b9e9f52ed787d2079baab06108b959
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Thu Apr 11 15:44:10 2024 -0300

    ipq40xx: whw03v2: fix handling of RGB LED
    
    The RGB LED should glow green in the 'running' state, but it
    was glowing cyan because the blue component defaulted to 'on'.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
---
 .../linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts | 3 ---
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts  | 3 ---
 2 files changed, 6 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
index 7b3f1c8bb7..9176ace23d 100644
--- a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
@@ -277,21 +277,18 @@
 		led_red: red at 0 {
 			color = <LED_COLOR_ID_RED>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "none";
 			reg = <0>;
 		};
 
 		led_green: green at 1 {
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "none";
 			reg = <1>;
 		};
 
 		led_blue: blue at 2 {
 			color = <LED_COLOR_ID_BLUE>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "default-on";
 			reg = <2>;
 		};
 	};
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
index 7b3f1c8bb7..9176ace23d 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
@@ -277,21 +277,18 @@
 		led_red: red at 0 {
 			color = <LED_COLOR_ID_RED>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "none";
 			reg = <0>;
 		};
 
 		led_green: green at 1 {
 			color = <LED_COLOR_ID_GREEN>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "none";
 			reg = <1>;
 		};
 
 		led_blue: blue at 2 {
 			color = <LED_COLOR_ID_BLUE>;
 			function = LED_FUNCTION_INDICATOR;
-			linux,default-trigger = "default-on";
 			reg = <2>;
 		};
 	};



From lede-commits at lists.infradead.org  Sat Apr 13 14:22:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 13 Apr 2024 17:22:29 -0400
Subject: [openwrt/openwrt]  ipq40xx: whw03v2: change LED color for 'running'
 state to blue
In-Reply-To: <171304334943.2548758.8603560641932770356@git-01.infra.openwrt.org>
References: <171304334943.2548758.8603560641932770356@git-01.infra.openwrt.org>
Message-ID: <mailman.26884.1713043355.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c2f52e42b1e9f736edd6e4545ebe3435db6605ee

commit c2f52e42b1e9f736edd6e4545ebe3435db6605ee
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Sat Apr 13 16:36:31 2024 -0300

    ipq40xx: whw03v2: change LED color for 'running' state to blue
    
    Change the RGB indicator LED color for the running state from green to
    blue. There are various reasons for this change:
    
    - In stock firmware, green means internet connection is up, red means it
      is down, and blue means indeterminate. To track stock behavior as
      closely as possible, OpenWrt should indicate blue by default.
    
    - In the current 23.x OpenWrt releases for this router, the led glows
      blue all the time -not green- because the bootloader sets it blue
      and there is an OpenWrt bug that makes it unable to control the LED.
      The bug is fixed in master, so without this commit there would be an
      unexpected change of behavior for this device in the next release.
    
    - The ports other closely related Linksys devices (such as EA8300 and
      MR8300) get this right and use blue for the running state.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
---
 .../linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts  | 2 +-
 .../ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts   | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
index 9176ace23d..96733d8780 100644
--- a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
@@ -13,7 +13,7 @@
 	aliases {
 		led-boot = &led_blue;
 		led-failsafe = &led_red;
-		led-running = &led_green;
+		led-running = &led_blue;
 		led-upgrade = &led_red;
 	};
 
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
index 9176ace23d..96733d8780 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
@@ -13,7 +13,7 @@
 	aliases {
 		led-boot = &led_blue;
 		led-failsafe = &led_red;
-		led-running = &led_green;
+		led-running = &led_blue;
 		led-upgrade = &led_red;
 	};
 



From lede-commits at lists.infradead.org  Sun Apr 14 07:48:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 10:48:28 -0400
Subject: [openwrt/openwrt]  netifd: rewrite packet steering script
In-Reply-To: <171310610832.4115604.3669323457783823147@git-01.infra.openwrt.org>
References: <171310610832.4115604.3669323457783823147@git-01.infra.openwrt.org>
Message-ID: <mailman.26970.1713106116.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a205a5734eda4604a19b6cb0f65909ef69730699

commit a205a5734eda4604a19b6cb0f65909ef69730699
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Apr 12 21:51:50 2024 +0200

    netifd: rewrite packet steering script
    
    The new script uses a different strategy compared to the previous one.
    Instead of trying to split flows by hash and spread them to all CPUs,
    use RPS to redirect packets to a single core only.
    Try to spread NAPI thread and RPS target CPUs across available CPUs
    and try to ensure that the NAPI thread is on a different CPU than the
    RPS target. This significantly reduces cycles wasted on the scheduler.
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/Makefile             |   2 +-
 .../config/netifd/files/etc/init.d/packet_steering |   7 +-
 .../files/usr/libexec/network/packet-steering.sh   |  70 --------
 .../files/usr/libexec/network/packet-steering.uc   | 200 +++++++++++++++++++++
 4 files changed, 207 insertions(+), 72 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index 35b5c0b277..d80c2eeed6 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -21,7 +21,7 @@ include $(INCLUDE_DIR)/cmake.mk
 define Package/netifd
   SECTION:=base
   CATEGORY:=Base system
-  DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox +libudebug
+  DEPENDS:=+libuci +libnl-tiny +libubus +ubus +ubusd +jshn +libubox +libudebug +ucode +ucode-mod-fs
   TITLE:=OpenWrt Network Interface Configuration Daemon
 endef
 
diff --git a/package/network/config/netifd/files/etc/init.d/packet_steering b/package/network/config/netifd/files/etc/init.d/packet_steering
index 9d8f791e23..d6f6afc2e1 100755
--- a/package/network/config/netifd/files/etc/init.d/packet_steering
+++ b/package/network/config/netifd/files/etc/init.d/packet_steering
@@ -14,5 +14,10 @@ service_triggers() {
 }
 
 reload_service() {
-	/usr/libexec/network/packet-steering.sh
+	packet_steering="$(uci get "network. at globals[0].packet_steering")"
+	if [ -e "/usr/libexec/platform/packet-steering.sh" ]; then
+		/usr/libexec/platform/packet-steering.sh "$packet_steering"
+	else
+		/usr/libexec/network/packet-steering.uc "$packet_steering"
+	fi
 }
diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh b/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh
deleted file mode 100755
index 799c080805..0000000000
--- a/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh
+++ /dev/null
@@ -1,70 +0,0 @@
-#!/bin/sh
-NPROCS="$(grep -c "^processor.*:" /proc/cpuinfo)"
-[ "$NPROCS" -gt 1 ] || exit
-
-PROC_MASK="$(( (1 << $NPROCS) - 1 ))"
-
-find_irq_cpu() {
-	local dev="$1"
-	local match="$(grep -m 1 "$dev\$" /proc/interrupts)"
-	local cpu=0
-
-	[ -n "$match" ] && {
-		set -- $match
-		shift
-		for cur in $(seq 1 $NPROCS); do
-			[ "$1" -gt 0 ] && {
-				cpu=$(($cur - 1))
-				break
-			}
-			shift
-		done
-	}
-
-	echo "$cpu"
-}
-
-set_hex_val() {
-	local file="$1"
-	local val="$2"
-	val="$(printf %x "$val")"
-	[ -n "$DEBUG" ] && echo "$file = $val"
-	echo "$val" > "$file"
-}
-
-packet_steering="$(uci get "network. at globals[0].packet_steering")"
-[ "$packet_steering" != 1 ] && exit 0
-
-exec 512>/var/lock/smp_tune.lock
-flock 512 || exit 1
-
-[ -e "/usr/libexec/platform/packet-steering.sh" ] && {
-	/usr/libexec/platform/packet-steering.sh
-	exit 0
-}
-
-for dev in /sys/class/net/*; do
-	[ -d "$dev" ] || continue
-
-	# ignore virtual interfaces
-	[ -n "$(ls "${dev}/" | grep '^lower_')" ] && continue
-	[ -d "${dev}/device" ] || continue
-
-	device="$(readlink "${dev}/device")"
-	device="$(basename "$device")"
-	irq_cpu="$(find_irq_cpu "$device")"
-	irq_cpu_mask="$((1 << $irq_cpu))"
-
-	for q in ${dev}/queues/tx-*; do
-		set_hex_val "$q/xps_cpus" "$PROC_MASK"
-	done
-
-	# ignore dsa slave ports for RPS
-	subsys="$(readlink "${dev}/device/subsystem")"
-	subsys="$(basename "$subsys")"
-	[ "$subsys" = "mdio_bus" ] && continue
-
-	for q in ${dev}/queues/rx-*; do
-		set_hex_val "$q/rps_cpus" "$PROC_MASK"
-	done
-done
diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
new file mode 100755
index 0000000000..f146a96e41
--- /dev/null
+++ b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
@@ -0,0 +1,200 @@
+#!/usr/bin/env ucode
+'use strict';
+import { glob, basename, dirname, readlink, readfile, realpath, writefile, error, open } from "fs";
+
+let napi_weight = 1.0;
+let cpu_thread_weight = 0.75;
+let rx_weight = 0.75;
+let eth_bias = 2.0;
+let debug = 0, do_nothing = 0;
+let disable;
+let cpus;
+
+for (let arg in ARGV) {
+	switch (arg) {
+	case "-d":
+		debug++;
+		break;
+	case "-n":
+		do_nothing++;
+		break;
+	case '0':
+		disable = true;
+		break;
+	}
+}
+
+function task_name(pid)
+{
+	let stat = open(`/proc/${pid}/status`, "r");
+	let line = stat.read("line");
+	stat.close();
+	return trim(split(line, "\t", 2)[1]);
+}
+
+function set_task_cpu(pid, cpu) {
+	if (disable)
+		cpu = join(",", map(cpus, (cpu) => cpu.id));
+	if (debug || do_nothing)
+		warn(`taskset -p -c ${cpu} ${task_name(pid)}\n`);
+	if (!do_nothing)
+		system(`taskset -p -c ${cpu} ${pid}`);
+}
+
+function set_netdev_cpu(dev, cpu) {
+	let queues = glob(`/sys/class/net/${dev}/queues/rx-*/rps_cpus`);
+	let val = sprintf("%x", (1 << int(cpu)));
+	if (disable)
+		val = 0;
+	for (let queue in queues) {
+		if (debug || do_nothing)
+			warn(`echo ${val} > ${queue}\n`);
+		if (!do_nothing)
+			writefile(queue, `${val}`);
+	}
+}
+
+function task_device_match(name, device)
+{
+	let napi_match = match(name, /napi\/([^-+])-\d+/);
+	if (!napi_match)
+		napi_match = match(name, /mt76-tx (phy\d+)/);
+	if (napi_match &&
+	    (index(device.phy, napi_match[1]) >= 0 ||
+	     index(device.netdev, napi_match[1]) >= 0))
+		return true;
+
+	if (device.driver == "mtk_soc_eth" && match(name, /napi\/mtk_eth-/))
+		return true;
+
+	return false;
+}
+
+cpus = map(glob("/sys/bus/cpu/devices/*"), (path) => {
+	return {
+		id: int(match(path, /.*cpu(\d+)/)[1]),
+		core: int(trim(readfile(`${path}/topology/core_id`))),
+		load: 0.0,
+	};
+});
+
+cpus = slice(cpus, 0, 64);
+if (length(cpus) < 2)
+	exit(0);
+
+function cpu_add_weight(cpu_id, weight)
+{
+	let cpu = cpus[cpu_id];
+	cpu.load += weight;
+	for (let sibling in cpus) {
+		if (sibling == cpu || sibling.core != cpu.core)
+			continue;
+		sibling.load += weight * cpu_thread_weight;
+	}
+}
+
+function get_next_cpu(weight, prev_cpu)
+{
+	if (disable)
+		return 0;
+
+	let sort_cpus = sort(slice(cpus), (a, b) => a.load - b.load);
+	let idx = 0;
+
+	if (prev_cpu != null && sort_cpus[idx].id == prev_cpu)
+		idx++;
+
+	let cpu = sort_cpus[idx].id;
+	cpu_add_weight(cpu, weight);
+	return cpu;
+}
+
+let phys_devs = {};
+let netdev_phys = {};
+let netdevs = map(glob("/sys/class/net/*"), (dev) => basename(dev));
+
+for (let dev in netdevs) {
+	let pdev_path = realpath(`/sys/class/net/${dev}/device`);
+	if (!pdev_path)
+		continue;
+
+	if (length(glob(`/sys/class/net/${dev}/lower_*`)) > 0)
+		continue;
+
+	let pdev = phys_devs[pdev_path];
+	if (!pdev) {
+		pdev = phys_devs[pdev_path] = {
+			path: pdev_path,
+			driver: basename(readlink(`${pdev_path}/driver`)),
+			netdev: [],
+			phy: [],
+			tasks: [],
+		};
+	}
+
+	let phyidx = trim(readfile(`/sys/class/net/${dev}/phy80211/index`));
+	if (phyidx != null) {
+		let phy = `phy${phyidx}`;
+		if (index(pdev.phy, phy) < 0)
+			push(pdev.phy, phy);
+	}
+
+	push(pdev.netdev, dev);
+	netdev_phys[dev] = pdev;
+}
+
+for (let path in glob("/proc/*/exe")) {
+	readlink(path);
+	if (error() != "No such file or directory")
+		continue;
+
+	let pid = basename(dirname(path));
+	let name = task_name(pid);
+	for (let devname in phys_devs) {
+		let dev = phys_devs[devname];
+		if (!task_device_match(name, dev))
+			continue;
+
+		push(dev.tasks, pid);
+		break;
+	}
+}
+
+function assign_dev_cpu(dev) {
+	if (length(dev.tasks) > 0) {
+		let cpu = dev.napi_cpu = get_next_cpu(napi_weight);
+		for (let task in dev.tasks)
+			set_task_cpu(task, cpu);
+	}
+
+	if (length(dev.netdev) > 0) {
+		let cpu = dev.rx_cpu = get_next_cpu(rx_weight, dev.napi_cpu);
+		for (let netdev in dev.netdev)
+			set_netdev_cpu(netdev, cpu);
+	}
+}
+
+// Assign ethernet devices first
+for (let devname in phys_devs) {
+	let dev = phys_devs[devname];
+	if (!length(dev.phy))
+		assign_dev_cpu(dev);
+}
+
+// Add bias to avoid assigning other tasks to CPUs with ethernet NAPI
+for (let devname in phys_devs) {
+	let dev = phys_devs[devname];
+	if (!length(dev.tasks) || dev.napi_cpu == null)
+		continue;
+	cpu_add_weight(dev.napi_cpu, eth_bias);
+}
+
+// Assign WLAN devices
+for (let devname in phys_devs) {
+	let dev = phys_devs[devname];
+	if (length(dev.phy) > 0)
+		assign_dev_cpu(dev);
+}
+
+if (debug > 1)
+	warn(sprintf("devices: %.J\ncpus: %.J\n", phys_devs, cpus));



From lede-commits at lists.infradead.org  Sun Apr 14 08:39:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 11:39:39 -0400
Subject: [openwrt/openwrt]  elfutils: update to 1.91
In-Reply-To: <171310917901.3990.3805384790024793807@git-01.infra.openwrt.org>
References: <171310917901.3990.3805384790024793807@git-01.infra.openwrt.org>
Message-ID: <mailman.26975.1713109183.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e609b7486fbd22c3e48194c9182f948f21b8a204

commit e609b7486fbd22c3e48194c9182f948f21b8a204
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Tue Mar 5 03:20:07 2024 -0800

    elfutils: update to 1.91
    
    Release Notes:
    https://sourceware.org/pipermail/elfutils-devel/2024q1/006876.html
    
    Refresh patch:
    - 005-build_only_libs.patch
    
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/libs/elfutils/Makefile                          | 4 ++--
 package/libs/elfutils/patches/005-build_only_libs.patch | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/elfutils/Makefile b/package/libs/elfutils/Makefile
index f7364c36be..ac5841c604 100644
--- a/package/libs/elfutils/Makefile
+++ b/package/libs/elfutils/Makefile
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=elfutils
-PKG_VERSION:=0.189
+PKG_VERSION:=0.191
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
-PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8
+PKG_HASH:=df76db71366d1d708365fc7a6c60ca48398f14367eb2b8954efc8897147ad871
 
 PKG_MAINTAINER:=Luiz Angelo Daros de Luca <luizluca at gmail.com>
 PKG_LICENSE:=GPL-3.0-or-later
diff --git a/package/libs/elfutils/patches/005-build_only_libs.patch b/package/libs/elfutils/patches/005-build_only_libs.patch
index 304b85c47a..598b734874 100644
--- a/package/libs/elfutils/patches/005-build_only_libs.patch
+++ b/package/libs/elfutils/patches/005-build_only_libs.patch
@@ -7,5 +7,5 @@
 -	  libasm debuginfod src po doc tests
 +	  libasm
  
- EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING SECURITY \
  	     COPYING COPYING-GPLV2 COPYING-LGPLV3



From lede-commits at lists.infradead.org  Sun Apr 14 08:39:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 11:39:40 -0400
Subject: [openwrt/openwrt]  toolchain/musl: Update to 1.2.5
In-Reply-To: <171310917901.3990.3805384790024793807@git-01.infra.openwrt.org>
References: <171310917901.3990.3805384790024793807@git-01.infra.openwrt.org>
Message-ID: <mailman.26976.1713109183.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/87d7fa8885e0bb09ee088bdcc1060ac99699d39e

commit 87d7fa8885e0bb09ee088bdcc1060ac99699d39e
Author: Hannu Nyman <hannu.nyman at iki.fi>
AuthorDate: Fri Mar 1 22:51:25 2024 +0200

    toolchain/musl: Update to 1.2.5
    
    Update musl C library to 1.2.5
    
    This release adds extension functions statx and preadv2/pwritev2,
    with fallback implementations for older kernels, and adds two new
    ports: loongarch64 and riscv32. Minor changes to the printf family
    of functions have been made for conformance to new standards
    interpretations/requirements. TLSDESC support for riscv64 has also
    been added.
    
    Bugs fixed include some DNS issues related to new TCP fallback
    functionality, several rare race conditions, potentially incorrect
    return value when glob aborts, and several signifiant arch-specific
    bugs affecting TLSDESC on arm, riscv64 icache flushing, and
    sh sigsetjmp and dlsym RTLD_NEXT.
    
    1.2.5 release notes:
    
    new features:
    - statx function (linux extension; via syscall and fallback using fstatat)
    - clone function is now usable and gives _Fork-like consistency in child
    - statvfs now provides f_type result
    - preadv2 and pwritev2 (linux extension) syscall wrappers
    - riscv64 TLSDESC support
    
    new ports:
    - loongarch64
    - riscv32
    
    compatibility:
    - DNS resolver can now handle answers with long CNAME chains
    - string.h no longer provides (C23-incompat) non-prototype decl of basename
    - fstatat statx backend now matches stat syscall non-automounting behavior
    - mntent interfaces now handle escaped whitespace in paths/options
    
    standards updates:
    - printf %lc of nul wchar now produces output
    - snprintf and swprintf no longer fail on n > INT_MAX
    - ppoll is now exposed in default feature profile
    
    bugs fixed:
    - some long DNS answers were wrongly rejected despite new TCP support
    - glob could wrongly return GLOB_NOMATCH if aborted before any matches
    - multithreaded set*id could malfunction from thread sequencing logic bug
    - certain use of threads after fork could deadlock thread-list lock
    - posix_spawn child could deadlock in race with async parent death
    - mbrtowc return value was wrong if argument n exceeded UINT_MAX
    - 80-bit extended acoshl and powl got some corner cases wrong
    - syslog incorrectly generated localized timestamps
    
    arch-specific bugs fixed:
    - arm (32-bit) TLSDESC malfunctioned due to addends being processed wrong
    - riscv64 icache flush operation was non-functional
    - sh sigsetjmp failed to properly restore call-saved register r8 on return
    - sh dlsym RTLD_NEXT did not identify calling module correctly
    
    Signed-off-by: Hannu Nyman <hannu.nyman at iki.fi>
    [Removed patch adding basename hack again]
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 toolchain/musl/common.mk                         | 4 ++--
 toolchain/musl/patches/900-iconv_size_hack.patch | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/toolchain/musl/common.mk b/toolchain/musl/common.mk
index 94444eaf75..35bdfd184b 100644
--- a/toolchain/musl/common.mk
+++ b/toolchain/musl/common.mk
@@ -8,12 +8,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/target.mk
 
 PKG_NAME:=musl
-PKG_VERSION:=1.2.4
+PKG_VERSION:=1.2.5
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://musl.libc.org/releases/
-PKG_HASH:=7a35eae33d5372a7c0da1188de798726f68825513b7ae3ebe97aaaa52114f039
+PKG_HASH:=a9a118bbe84d8764da0ea0d28b3ab3fae8477fc7e4085d90102b8596fc7c75e4
 PKG_CPE_ID:=cpe:/a:musl-libc:musl
 
 LIBC_SO_VERSION:=$(PKG_VERSION)
diff --git a/toolchain/musl/patches/900-iconv_size_hack.patch b/toolchain/musl/patches/900-iconv_size_hack.patch
index 461a204a4c..ad1dc4b109 100644
--- a/toolchain/musl/patches/900-iconv_size_hack.patch
+++ b/toolchain/musl/patches/900-iconv_size_hack.patch
@@ -6,7 +6,7 @@
  "ucs2\0\0\314"
 +#ifdef FULL_ICONV
  "eucjp\0\0\320"
- "shiftjis\0sjis\0\0\321"
+ "shiftjis\0sjis\0cp932\0\0\321"
  "iso2022jp\0\0\322"
 @@ -56,6 +57,7 @@ static const unsigned char charmaps[] =
  "gb2312\0\0\332"



From lede-commits at lists.infradead.org  Sun Apr 14 08:51:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 11:51:39 -0400
Subject: [openwrt/openwrt]  x86: generic: config-6.6: refresh
In-Reply-To: <171310989898.41508.14901246109435467734@git-01.infra.openwrt.org>
References: <171310989898.41508.14901246109435467734@git-01.infra.openwrt.org>
Message-ID: <mailman.26979.1713109903.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ec97609154db1c7ddc88f87b5a76bd931c998d51

commit ec97609154db1c7ddc88f87b5a76bd931c998d51
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Wed Apr 10 16:24:49 2024 -0400

    x86: generic: config-6.6: refresh
    
    Ran `make kernel_menuconfig`
    
    Reference to CONFIG_SPECTRE_BHI_ON=y[1]
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.26&id2=v6.6.25
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 target/linux/x86/config-6.6 | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target/linux/x86/config-6.6 b/target/linux/x86/config-6.6
index 77d07482b3..d9c2a0c4a2 100644
--- a/target/linux/x86/config-6.6
+++ b/target/linux/x86/config-6.6
@@ -265,7 +265,10 @@ CONFIG_NEED_PER_CPU_KM=y
 CONFIG_NEED_PER_CPU_PAGE_FIRST_CHUNK=y
 CONFIG_NEED_SG_DMA_LENGTH=y
 # CONFIG_NET5501 is not set
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
 # CONFIG_NET_NS is not set
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 # CONFIG_NMI_CHECK_CPU is not set
 # CONFIG_NOHIGHMEM is not set
@@ -284,6 +287,7 @@ CONFIG_PAGE_OFFSET=0xC0000000
 CONFIG_PAGE_POOL=y
 CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
 CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PC104=y
 # CONFIG_PC8736x_GPIO is not set
 # CONFIG_PC87413_WDT is not set
@@ -356,6 +360,9 @@ CONFIG_SG_POOL=y
 CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
+# CONFIG_SPECTRE_BHI_AUTO is not set
+# CONFIG_SPECTRE_BHI_OFF is not set
+CONFIG_SPECTRE_BHI_ON=y
 CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set



From lede-commits at lists.infradead.org  Sun Apr 14 08:51:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 11:51:38 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.26
In-Reply-To: <171310989898.41508.14901246109435467734@git-01.infra.openwrt.org>
References: <171310989898.41508.14901246109435467734@git-01.infra.openwrt.org>
Message-ID: <mailman.26980.1713109903.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9d95934289facdf7b539a2ae60cbb24a7d5df84c

commit 9d95934289facdf7b539a2ae60cbb24a7d5df84c
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Wed Apr 10 15:16:18 2024 -0400

    kernel: bump 6.6 to 6.6.26
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.26
    
    Manually rebased:
            generic/hack-6.6/210-darwin_scripts_include.patch
    
    Added pending:
            generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch
    
    All other patches automatically rebased.
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000
    Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, flogic/glinet_gl-mt6000
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6                                 |  4 +--
 .../linux/generic/hack-6.6/204-module_strip.patch  | 12 ++++-----
 .../hack-6.6/210-darwin_scripts_include.patch      |  2 +-
 .../hack-6.6/721-net-add-packet-mangeling.patch    |  4 +--
 ...rt-Revert-driver-core-Set-fw_devlink-on-b.patch |  2 +-
 ...610-netfilter_match_bypass_default_checks.patch |  2 +-
 .../generic/pending-6.6/655-increase_skb_pad.patch |  2 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch |  4 +--
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |  2 +-
 ...xxx-Request-assisted-learning-on-CPU-port.patch |  2 +-
 ...plugins-stackleak-Avoid-.head.txt.section.patch | 31 ++++++++++++++++++++++
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |  2 +-
 12 files changed, 50 insertions(+), 19 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 5c67d52577..04a23c4e11 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .25
-LINUX_KERNEL_HASH-6.6.25 = 99d210be87908233a55b0fadc0dccd3b95926c0651b6b82e37350b2029de1f44
+LINUX_VERSION-6.6 = .26
+LINUX_KERNEL_HASH-6.6.26 = af54b449f4fb93b8e8daa346144a7309e8e95174bd962c4b5917cf56120456d9
diff --git a/target/linux/generic/hack-6.6/204-module_strip.patch b/target/linux/generic/hack-6.6/204-module_strip.patch
index 32a83ece9f..c4e864c873 100644
--- a/target/linux/generic/hack-6.6/204-module_strip.patch
+++ b/target/linux/generic/hack-6.6/204-module_strip.patch
@@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (err)
 --- a/scripts/mod/modpost.c
 +++ b/scripts/mod/modpost.c
-@@ -1745,7 +1745,9 @@ static void read_symbols(const char *mod
+@@ -1690,7 +1690,9 @@ static void read_symbols(const char *mod
  		symname = remove_dot(info.strtab + sym->st_name);
  
  		handle_symbol(mod, &info, sym, symname);
@@ -151,7 +151,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	}
  
  	check_sec_ref(mod, &info);
-@@ -1918,8 +1920,10 @@ static void add_header(struct buffer *b,
+@@ -1863,8 +1865,10 @@ static void add_header(struct buffer *b,
  	buf_printf(b, "BUILD_SALT;\n");
  	buf_printf(b, "BUILD_LTO_INFO;\n");
  	buf_printf(b, "\n");
@@ -162,7 +162,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	buf_printf(b, "\n");
  	buf_printf(b, "__visible struct module __this_module\n");
  	buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
-@@ -1933,8 +1937,10 @@ static void add_header(struct buffer *b,
+@@ -1878,8 +1882,10 @@ static void add_header(struct buffer *b,
  	buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n");
  	buf_printf(b, "};\n");
  
@@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	buf_printf(b,
  		   "\n"
-@@ -1942,8 +1948,10 @@ static void add_header(struct buffer *b,
+@@ -1887,8 +1893,10 @@ static void add_header(struct buffer *b,
  		   "MODULE_INFO(retpoline, \"Y\");\n"
  		   "#endif\n");
  
@@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (strstarts(mod->name, "tools/testing"))
  		buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n");
-@@ -2053,11 +2061,13 @@ static void add_depends(struct buffer *b
+@@ -1998,11 +2006,13 @@ static void add_depends(struct buffer *b
  
  static void add_srcversion(struct buffer *b, struct module *mod)
  {
@@ -198,7 +198,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  static void write_buf(struct buffer *b, const char *fname)
-@@ -2140,7 +2150,9 @@ static void write_mod_c_file(struct modu
+@@ -2085,7 +2095,9 @@ static void write_mod_c_file(struct modu
  	add_exported_symbols(&buf, mod);
  	add_versions(&buf, mod);
  	add_depends(&buf, mod);
diff --git a/target/linux/generic/hack-6.6/210-darwin_scripts_include.patch b/target/linux/generic/hack-6.6/210-darwin_scripts_include.patch
index c9612536de..b94554ffce 100644
--- a/target/linux/generic/hack-6.6/210-darwin_scripts_include.patch
+++ b/target/linux/generic/hack-6.6/210-darwin_scripts_include.patch
@@ -3048,6 +3048,6 @@ Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
 +#else
 +#include "elf.h"
 +#endif
+ #include "../../include/linux/module_symbol.h"
  
  #include "list.h"
- #include "elfconfig.h"
diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
index 2fd8aef2b5..96e77ea9db 100644
--- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3075,6 +3075,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3070,6 +3070,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3240,16 +3244,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3235,16 +3239,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
diff --git a/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch b/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
index 2cec82bb01..1c5fb11ff5 100644
--- a/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
+++ b/target/linux/generic/hack-6.6/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
@@ -19,7 +19,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/drivers/base/core.c
 +++ b/drivers/base/core.c
-@@ -1642,7 +1642,7 @@ static void device_links_purge(struct de
+@@ -1657,7 +1657,7 @@ static void device_links_purge(struct de
  #define FW_DEVLINK_FLAGS_RPM		(FW_DEVLINK_FLAGS_ON | \
  					 DL_FLAG_PM_RUNTIME)
  
diff --git a/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch
index 67dcf25a0d..0717c4dc1f 100644
--- a/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1221,12 +1258,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1223,12 +1260,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
index 3e13511e8b..1cdf81afa4 100644
--- a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
+++ b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3041,7 +3041,7 @@ static inline int pskb_network_may_pull(
+@@ -3036,7 +3036,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
diff --git a/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index b1f517d17a..0859e217cd 100644
--- a/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -964,6 +964,7 @@ struct sk_buff {
+@@ -959,6 +959,7 @@ struct sk_buff {
  #ifdef CONFIG_IPV6_NDISC_NODETYPE
  	__u8			ndisc_nodetype:2;
  #endif
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	__u8			ipvs_property:1;
 --- a/net/core/gro.c
 +++ b/net/core/gro.c
-@@ -445,6 +445,9 @@ static enum gro_result dev_gro_receive(s
+@@ -446,6 +446,9 @@ static enum gro_result dev_gro_receive(s
  	enum gro_result ret;
  	int same_flow;
  
diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index c3d92da5f9..e54dcdadbb 100644
--- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -8221,7 +8221,7 @@ static int nft_register_flowtable_net_ho
+@@ -8260,7 +8260,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch b/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
index 332d7e721a..d11e0eda66 100644
--- a/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
+++ b/target/linux/generic/pending-6.6/768-net-dsa-mv88e6xxx-Request-assisted-learning-on-CPU-port.patch
@@ -17,7 +17,7 @@ Signed-off-by: Tobias Waldekranz <tobias at waldekranz.com>
 
 --- a/drivers/net/dsa/mv88e6xxx/chip.c
 +++ b/drivers/net/dsa/mv88e6xxx/chip.c
-@@ -6883,6 +6883,7 @@ static int mv88e6xxx_register_switch(str
+@@ -6887,6 +6887,7 @@ static int mv88e6xxx_register_switch(str
  	ds->ops = &mv88e6xxx_switch_ops;
  	ds->ageing_time_min = chip->info->age_time_coeff;
  	ds->ageing_time_max = chip->info->age_time_coeff * U8_MAX;
diff --git a/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch b/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch
new file mode 100644
index 0000000000..74b2fb5b8e
--- /dev/null
+++ b/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch
@@ -0,0 +1,31 @@
+From e7d24c0aa8e678f41457d1304e2091cac6fd1a2e Mon Sep 17 00:00:00 2001
+From: Ard Biesheuvel <ardb at kernel.org>
+Date: Thu, 28 Mar 2024 07:42:57 +0100
+Subject: gcc-plugins/stackleak: Avoid .head.text section
+
+The .head.text section carries the startup code that runs with the MMU
+off or with a translation of memory that deviates from the ordinary one.
+So avoid instrumentation with the stackleak plugin, which already avoids
+.init.text and .noinstr.text entirely.
+
+Fixes: 48204aba801f1b51 ("x86/sme: Move early SME kernel encryption handling into .head.text")
+Reported-by: kernel test robot <oliver.sang at intel.com>
+Closes: https://lore.kernel.org/oe-lkp/202403221630.2692c998-oliver.sang at intel.com
+Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
+Link: https://lore.kernel.org/r/20240328064256.2358634-2-ardb+git at google.com
+Signed-off-by: Kees Cook <keescook at chromium.org>
+---
+ scripts/gcc-plugins/stackleak_plugin.c | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/scripts/gcc-plugins/stackleak_plugin.c
++++ b/scripts/gcc-plugins/stackleak_plugin.c
+@@ -467,6 +467,8 @@ static bool stackleak_gate(void)
+ 			return false;
+ 		if (STRING_EQUAL(section, ".entry.text"))
+ 			return false;
++		if (STRING_EQUAL(section, ".head.text"))
++			return false;
+ 	}
+ 
+ 	return track_frame_size >= 0;
diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index 9257f916ca..a45c41ea9a 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4637,6 +4637,9 @@ enum skb_ext_id {
+@@ -4632,6 +4632,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif



From lede-commits at lists.infradead.org  Sun Apr 14 08:51:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 11:51:40 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.27
In-Reply-To: <171310989898.41508.14901246109435467734@git-01.infra.openwrt.org>
References: <171310989898.41508.14901246109435467734@git-01.infra.openwrt.org>
Message-ID: <mailman.26981.1713109905.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/86171d4d6e5a3da226f40e290194779608f67705

commit 86171d4d6e5a3da226f40e290194779608f67705
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Sat Apr 13 08:19:04 2024 -0400

    kernel: bump 6.6 to 6.6.27
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.27
    
    Removed upstreamed:
            pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch[1]
    
    All patches automatically rebased.
    
    1. https://github.com/gregkh/linux/commit/9dff96b8b3a404d3b3581af46450f2efeb7d290a
    
    Build system: x86/64
    Build-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64/AMD Cezanne
    Run-tested: flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3, x86/64/AMD Cezanne
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6                                 |  4 +--
 ...end-PHY-package-API-to-support-multiple-g.patch | 14 +++++-----
 ...t-phy-add-devm-of_phy_package_join-helper.patch |  8 +++---
 ...vide-whether-link-has-changed-in-c37_read.patch |  4 +--
 ...y-add-support-for-PHY-LEDs-polarity-modes.patch |  4 +--
 ...t-Add-a-separate-timeout-parameter-for-wa.patch | 16 +++++------
 .../linux/generic/hack-6.6/204-module_strip.patch  | 12 ++++-----
 .../hack-6.6/721-net-add-packet-mangeling.patch    |  4 +--
 .../generic/pending-6.6/655-increase_skb_pad.patch |  2 +-
 .../666-Add-support-for-MAP-E-FMRs-mesh-mode.patch | 14 +++++-----
 ...-add-detach-callback-to-struct-phy_driver.patch |  2 +-
 ...plugins-stackleak-Avoid-.head.txt.section.patch | 31 ----------------------
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |  2 +-
 13 files changed, 43 insertions(+), 74 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 04a23c4e11..768285e092 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .26
-LINUX_KERNEL_HASH-6.6.26 = af54b449f4fb93b8e8daa346144a7309e8e95174bd962c4b5917cf56120456d9
+LINUX_VERSION-6.6 = .27
+LINUX_KERNEL_HASH-6.6.27 = 639e50060e3c8f23ed017cb10cfeacc6ba88ff5583812bb76859b4cc6a128291
diff --git a/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch b/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch
index b95f15a581..68f855283e 100644
--- a/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch
+++ b/target/linux/generic/backport-6.6/714-v6.8-02-net-phy-extend-PHY-package-API-to-support-multiple-g.patch
@@ -121,7 +121,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  u32 vsc85xx_csr_read(struct phy_device *phydev,
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1650,20 +1650,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
+@@ -1658,20 +1658,22 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
  /**
   * phy_package_join - join a common PHY group
   * @phydev: target phy_device struct
@@ -151,7 +151,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   *
   * This will set the shared pointer of the phydev to the shared storage.
   * If this is the first call for a this cookie the shared storage will be
-@@ -1673,17 +1675,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
+@@ -1681,17 +1683,17 @@ EXPORT_SYMBOL_GPL(phy_driver_is_genphy_1
   * Returns < 1 on error, 0 on success. Esp. calling phy_package_join()
   * with the same cookie but a different priv_size is an error.
   */
@@ -172,7 +172,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!shared) {
  		ret = -ENOMEM;
  		shared = kzalloc(sizeof(*shared), GFP_KERNEL);
-@@ -1695,9 +1697,9 @@ int phy_package_join(struct phy_device *
+@@ -1703,9 +1705,9 @@ int phy_package_join(struct phy_device *
  				goto err_free;
  			shared->priv_size = priv_size;
  		}
@@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	} else {
  		ret = -EINVAL;
  		if (priv_size && priv_size != shared->priv_size)
-@@ -1735,7 +1737,7 @@ void phy_package_leave(struct phy_device
+@@ -1743,7 +1745,7 @@ void phy_package_leave(struct phy_device
  		return;
  
  	if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) {
@@ -193,7 +193,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		mutex_unlock(&bus->shared_lock);
  		kfree(shared->priv);
  		kfree(shared);
-@@ -1754,7 +1756,8 @@ static void devm_phy_package_leave(struc
+@@ -1762,7 +1764,8 @@ static void devm_phy_package_leave(struc
   * devm_phy_package_join - resource managed phy_package_join()
   * @dev: device that is registering this PHY package
   * @phydev: target phy_device struct
@@ -203,7 +203,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * @priv_size: if non-zero allocate this amount of bytes for private data
   *
   * Managed phy_package_join(). Shared storage fetched by this function,
-@@ -1762,7 +1765,7 @@ static void devm_phy_package_leave(struc
+@@ -1770,7 +1773,7 @@ static void devm_phy_package_leave(struc
   * phy_package_join() for more information.
   */
  int devm_phy_package_join(struct device *dev, struct phy_device *phydev,
@@ -212,7 +212,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  {
  	struct phy_device **ptr;
  	int ret;
-@@ -1772,7 +1775,7 @@ int devm_phy_package_join(struct device
+@@ -1780,7 +1783,7 @@ int devm_phy_package_join(struct device
  	if (!ptr)
  		return -ENOMEM;
  
diff --git a/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch b/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch
index f3e814b1a0..25f6c5ccda 100644
--- a/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch
+++ b/target/linux/generic/backport-6.6/716-v6.9-03-net-phy-add-devm-of_phy_package_join-helper.patch
@@ -27,7 +27,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1698,6 +1698,7 @@ int phy_package_join(struct phy_device *
+@@ -1706,6 +1706,7 @@ int phy_package_join(struct phy_device *
  			shared->priv_size = priv_size;
  		}
  		shared->base_addr = base_addr;
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		refcount_set(&shared->refcnt, 1);
  		bus->shared[base_addr] = shared;
  	} else {
-@@ -1721,6 +1722,63 @@ err_unlock:
+@@ -1729,6 +1730,63 @@ err_unlock:
  EXPORT_SYMBOL_GPL(phy_package_join);
  
  /**
@@ -99,7 +99,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * phy_package_leave - leave a common PHY group
   * @phydev: target phy_device struct
   *
-@@ -1736,6 +1794,10 @@ void phy_package_leave(struct phy_device
+@@ -1744,6 +1802,10 @@ void phy_package_leave(struct phy_device
  	if (!shared)
  		return;
  
@@ -110,7 +110,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (refcount_dec_and_mutex_lock(&shared->refcnt, &bus->shared_lock)) {
  		bus->shared[shared->base_addr] = NULL;
  		mutex_unlock(&bus->shared_lock);
-@@ -1789,6 +1851,40 @@ int devm_phy_package_join(struct device
+@@ -1797,6 +1859,40 @@ int devm_phy_package_join(struct device
  EXPORT_SYMBOL_GPL(devm_phy_package_join);
  
  /**
diff --git a/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch b/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch
index 0441c8f60f..a96b9f1b66 100644
--- a/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch
+++ b/target/linux/generic/backport-6.6/716-v6.9-06-net-phy-provide-whether-link-has-changed-in-c37_read.patch
@@ -41,7 +41,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -2607,12 +2607,15 @@ EXPORT_SYMBOL(genphy_read_status);
+@@ -2615,12 +2615,15 @@ EXPORT_SYMBOL(genphy_read_status);
  /**
   * genphy_c37_read_status - check the link status and update current link state
   * @phydev: target phy_device struct
@@ -58,7 +58,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  {
  	int lpa, err, old_link = phydev->link;
  
-@@ -2622,9 +2625,13 @@ int genphy_c37_read_status(struct phy_de
+@@ -2630,9 +2633,13 @@ int genphy_c37_read_status(struct phy_de
  		return err;
  
  	/* why bother the PHY if nothing can have changed */
diff --git a/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch b/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch
index 30390299c8..104f961c02 100644
--- a/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch
+++ b/target/linux/generic/backport-6.6/835-v6.9-net-phy-add-support-for-PHY-LEDs-polarity-modes.patch
@@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -3198,6 +3198,7 @@ static int of_phy_led(struct phy_device
+@@ -3201,6 +3201,7 @@ static int of_phy_led(struct phy_device
  	struct device *dev = &phydev->mdio.dev;
  	struct led_init_data init_data = {};
  	struct led_classdev *cdev;
@@ -36,7 +36,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct phy_led *phyled;
  	u32 index;
  	int err;
-@@ -3215,6 +3216,21 @@ static int of_phy_led(struct phy_device
+@@ -3218,6 +3219,21 @@ static int of_phy_led(struct phy_device
  	if (index > U8_MAX)
  		return -EINVAL;
  
diff --git a/target/linux/generic/backport-6.6/850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch b/target/linux/generic/backport-6.6/850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch
index 23f20ed65e..94d9bcd93d 100644
--- a/target/linux/generic/backport-6.6/850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch
+++ b/target/linux/generic/backport-6.6/850-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch
@@ -23,7 +23,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
 
 --- a/drivers/bus/mhi/host/init.c
 +++ b/drivers/bus/mhi/host/init.c
-@@ -881,6 +881,7 @@ static int parse_config(struct mhi_contr
+@@ -882,6 +882,7 @@ static int parse_config(struct mhi_contr
  	if (!mhi_cntrl->timeout_ms)
  		mhi_cntrl->timeout_ms = MHI_TIMEOUT_MS;
  
@@ -33,7 +33,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  	if (!mhi_cntrl->buffer_len)
 --- a/drivers/bus/mhi/host/internal.h
 +++ b/drivers/bus/mhi/host/internal.h
-@@ -321,7 +321,7 @@ int __must_check mhi_read_reg_field(stru
+@@ -324,7 +324,7 @@ int __must_check mhi_read_reg_field(stru
  				    u32 *out);
  int __must_check mhi_poll_reg_field(struct mhi_controller *mhi_cntrl,
  				    void __iomem *base, u32 offset, u32 mask,
@@ -60,7 +60,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  		ret = mhi_read_reg_field(mhi_cntrl, base, offset, mask, &out);
 --- a/drivers/bus/mhi/host/pm.c
 +++ b/drivers/bus/mhi/host/pm.c
-@@ -163,6 +163,7 @@ int mhi_ready_state_transition(struct mh
+@@ -171,6 +171,7 @@ int mhi_ready_state_transition(struct mh
  	enum mhi_pm_state cur_state;
  	struct device *dev = &mhi_cntrl->mhi_dev->dev;
  	u32 interval_us = 25000; /* poll register field every 25 milliseconds */
@@ -68,7 +68,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  	int ret, i;
  
  	/* Check if device entered error state */
-@@ -173,14 +174,18 @@ int mhi_ready_state_transition(struct mh
+@@ -181,14 +182,18 @@ int mhi_ready_state_transition(struct mh
  
  	/* Wait for RESET to be cleared and READY bit to be set by the device */
  	ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
@@ -89,7 +89,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  	if (ret) {
  		dev_err(dev, "Device failed to enter MHI Ready\n");
  		return ret;
-@@ -479,7 +484,7 @@ static void mhi_pm_disable_transition(st
+@@ -487,7 +492,7 @@ static void mhi_pm_disable_transition(st
  
  		/* Wait for the reset bit to be cleared by the device */
  		ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
@@ -98,7 +98,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  		if (ret)
  			dev_err(dev, "Device failed to clear MHI Reset\n");
  
-@@ -492,8 +497,8 @@ static void mhi_pm_disable_transition(st
+@@ -500,8 +505,8 @@ static void mhi_pm_disable_transition(st
  		if (!MHI_IN_PBL(mhi_get_exec_env(mhi_cntrl))) {
  			/* wait for ready to be set */
  			ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs,
@@ -109,7 +109,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  			if (ret)
  				dev_err(dev, "Device failed to enter READY state\n");
  		}
-@@ -1111,7 +1116,8 @@ int mhi_async_power_up(struct mhi_contro
+@@ -1125,7 +1130,8 @@ int mhi_async_power_up(struct mhi_contro
  	if (state == MHI_STATE_SYS_ERR) {
  		mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET);
  		ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
@@ -119,7 +119,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  		if (ret) {
  			dev_info(dev, "Failed to reset MHI due to syserr state\n");
  			goto error_exit;
-@@ -1202,14 +1208,18 @@ EXPORT_SYMBOL_GPL(mhi_power_down);
+@@ -1216,14 +1222,18 @@ EXPORT_SYMBOL_GPL(mhi_power_down);
  int mhi_sync_power_up(struct mhi_controller *mhi_cntrl)
  {
  	int ret = mhi_async_power_up(mhi_cntrl);
diff --git a/target/linux/generic/hack-6.6/204-module_strip.patch b/target/linux/generic/hack-6.6/204-module_strip.patch
index c4e864c873..8619c29073 100644
--- a/target/linux/generic/hack-6.6/204-module_strip.patch
+++ b/target/linux/generic/hack-6.6/204-module_strip.patch
@@ -141,7 +141,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (err)
 --- a/scripts/mod/modpost.c
 +++ b/scripts/mod/modpost.c
-@@ -1690,7 +1690,9 @@ static void read_symbols(const char *mod
+@@ -1692,7 +1692,9 @@ static void read_symbols(const char *mod
  		symname = remove_dot(info.strtab + sym->st_name);
  
  		handle_symbol(mod, &info, sym, symname);
@@ -151,7 +151,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	}
  
  	check_sec_ref(mod, &info);
-@@ -1863,8 +1865,10 @@ static void add_header(struct buffer *b,
+@@ -1865,8 +1867,10 @@ static void add_header(struct buffer *b,
  	buf_printf(b, "BUILD_SALT;\n");
  	buf_printf(b, "BUILD_LTO_INFO;\n");
  	buf_printf(b, "\n");
@@ -162,7 +162,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	buf_printf(b, "\n");
  	buf_printf(b, "__visible struct module __this_module\n");
  	buf_printf(b, "__section(\".gnu.linkonce.this_module\") = {\n");
-@@ -1878,8 +1882,10 @@ static void add_header(struct buffer *b,
+@@ -1880,8 +1884,10 @@ static void add_header(struct buffer *b,
  	buf_printf(b, "\t.arch = MODULE_ARCH_INIT,\n");
  	buf_printf(b, "};\n");
  
@@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	buf_printf(b,
  		   "\n"
-@@ -1887,8 +1893,10 @@ static void add_header(struct buffer *b,
+@@ -1889,8 +1895,10 @@ static void add_header(struct buffer *b,
  		   "MODULE_INFO(retpoline, \"Y\");\n"
  		   "#endif\n");
  
@@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (strstarts(mod->name, "tools/testing"))
  		buf_printf(b, "\nMODULE_INFO(test, \"Y\");\n");
-@@ -1998,11 +2006,13 @@ static void add_depends(struct buffer *b
+@@ -2000,11 +2008,13 @@ static void add_depends(struct buffer *b
  
  static void add_srcversion(struct buffer *b, struct module *mod)
  {
@@ -198,7 +198,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  static void write_buf(struct buffer *b, const char *fname)
-@@ -2085,7 +2095,9 @@ static void write_mod_c_file(struct modu
+@@ -2087,7 +2097,9 @@ static void write_mod_c_file(struct modu
  	add_exported_symbols(&buf, mod);
  	add_versions(&buf, mod);
  	add_depends(&buf, mod);
diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
index 96e77ea9db..8ef5faa3b1 100644
--- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3070,6 +3070,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3081,6 +3081,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3235,16 +3239,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3246,16 +3250,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
diff --git a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
index 1cdf81afa4..31a40f1cdf 100644
--- a/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
+++ b/target/linux/generic/pending-6.6/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3036,7 +3036,7 @@ static inline int pskb_network_may_pull(
+@@ -3047,7 +3047,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
diff --git a/target/linux/generic/pending-6.6/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch b/target/linux/generic/pending-6.6/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
index 06126d65d3..0d65fa7272 100644
--- a/target/linux/generic/pending-6.6/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
+++ b/target/linux/generic/pending-6.6/666-Add-support-for-MAP-E-FMRs-mesh-mode.patch
@@ -361,7 +361,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  	memcpy(p->name, u->name, sizeof(u->name));
  }
  
-@@ -1963,6 +2133,15 @@ static int ip6_tnl_validate(struct nlatt
+@@ -1964,6 +2134,15 @@ static int ip6_tnl_validate(struct nlatt
  	return 0;
  }
  
@@ -377,7 +377,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  static void ip6_tnl_netlink_parms(struct nlattr *data[],
  				  struct __ip6_tnl_parm *parms)
  {
-@@ -2000,6 +2179,46 @@ static void ip6_tnl_netlink_parms(struct
+@@ -2001,6 +2180,46 @@ static void ip6_tnl_netlink_parms(struct
  
  	if (data[IFLA_IPTUN_FWMARK])
  		parms->fwmark = nla_get_u32(data[IFLA_IPTUN_FWMARK]);
@@ -424,7 +424,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  }
  
  static int ip6_tnl_newlink(struct net *src_net, struct net_device *dev,
-@@ -2083,6 +2302,12 @@ static void ip6_tnl_dellink(struct net_d
+@@ -2084,6 +2303,12 @@ static void ip6_tnl_dellink(struct net_d
  
  static size_t ip6_tnl_get_size(const struct net_device *dev)
  {
@@ -437,7 +437,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  	return
  		/* IFLA_IPTUN_LINK */
  		nla_total_size(4) +
-@@ -2112,6 +2337,24 @@ static size_t ip6_tnl_get_size(const str
+@@ -2113,6 +2338,24 @@ static size_t ip6_tnl_get_size(const str
  		nla_total_size(0) +
  		/* IFLA_IPTUN_FWMARK */
  		nla_total_size(4) +
@@ -462,7 +462,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  		0;
  }
  
-@@ -2119,6 +2362,9 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2120,6 +2363,9 @@ static int ip6_tnl_fill_info(struct sk_b
  {
  	struct ip6_tnl *tunnel = netdev_priv(dev);
  	struct __ip6_tnl_parm *parm = &tunnel->parms;
@@ -472,7 +472,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  
  	if (nla_put_u32(skb, IFLA_IPTUN_LINK, parm->link) ||
  	    nla_put_in6_addr(skb, IFLA_IPTUN_LOCAL, &parm->laddr) ||
-@@ -2128,9 +2374,27 @@ static int ip6_tnl_fill_info(struct sk_b
+@@ -2129,9 +2375,27 @@ static int ip6_tnl_fill_info(struct sk_b
  	    nla_put_be32(skb, IFLA_IPTUN_FLOWINFO, parm->flowinfo) ||
  	    nla_put_u32(skb, IFLA_IPTUN_FLAGS, parm->flags) ||
  	    nla_put_u8(skb, IFLA_IPTUN_PROTO, parm->proto) ||
@@ -501,7 +501,7 @@ Signed-off-by: Steven Barth <cyrus at openwrt.org>
  	if (nla_put_u16(skb, IFLA_IPTUN_ENCAP_TYPE, tunnel->encap.type) ||
  	    nla_put_be16(skb, IFLA_IPTUN_ENCAP_SPORT, tunnel->encap.sport) ||
  	    nla_put_be16(skb, IFLA_IPTUN_ENCAP_DPORT, tunnel->encap.dport) ||
-@@ -2170,6 +2434,7 @@ static const struct nla_policy ip6_tnl_p
+@@ -2171,6 +2435,7 @@ static const struct nla_policy ip6_tnl_p
  	[IFLA_IPTUN_ENCAP_DPORT]	= { .type = NLA_U16 },
  	[IFLA_IPTUN_COLLECT_METADATA]	= { .type = NLA_FLAG },
  	[IFLA_IPTUN_FWMARK]		= { .type = NLA_U32 },
diff --git a/target/linux/generic/pending-6.6/703-phy-add-detach-callback-to-struct-phy_driver.patch b/target/linux/generic/pending-6.6/703-phy-add-detach-callback-to-struct-phy_driver.patch
index 5166dd2115..c544a06dfc 100644
--- a/target/linux/generic/pending-6.6/703-phy-add-detach-callback-to-struct-phy_driver.patch
+++ b/target/linux/generic/pending-6.6/703-phy-add-detach-callback-to-struct-phy_driver.patch
@@ -11,7 +11,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
 
 --- a/drivers/net/phy/phy_device.c
 +++ b/drivers/net/phy/phy_device.c
-@@ -1900,6 +1900,9 @@ void phy_detach(struct phy_device *phyde
+@@ -1908,6 +1908,9 @@ void phy_detach(struct phy_device *phyde
  	if (phydev->devlink)
  		device_link_del(phydev->devlink);
  
diff --git a/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch b/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch
deleted file mode 100644
index 74b2fb5b8e..0000000000
--- a/target/linux/generic/pending-6.6/981-gcc-plugins-stackleak-Avoid-.head.txt.section.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From e7d24c0aa8e678f41457d1304e2091cac6fd1a2e Mon Sep 17 00:00:00 2001
-From: Ard Biesheuvel <ardb at kernel.org>
-Date: Thu, 28 Mar 2024 07:42:57 +0100
-Subject: gcc-plugins/stackleak: Avoid .head.text section
-
-The .head.text section carries the startup code that runs with the MMU
-off or with a translation of memory that deviates from the ordinary one.
-So avoid instrumentation with the stackleak plugin, which already avoids
-.init.text and .noinstr.text entirely.
-
-Fixes: 48204aba801f1b51 ("x86/sme: Move early SME kernel encryption handling into .head.text")
-Reported-by: kernel test robot <oliver.sang at intel.com>
-Closes: https://lore.kernel.org/oe-lkp/202403221630.2692c998-oliver.sang at intel.com
-Signed-off-by: Ard Biesheuvel <ardb at kernel.org>
-Link: https://lore.kernel.org/r/20240328064256.2358634-2-ardb+git at google.com
-Signed-off-by: Kees Cook <keescook at chromium.org>
----
- scripts/gcc-plugins/stackleak_plugin.c | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/scripts/gcc-plugins/stackleak_plugin.c
-+++ b/scripts/gcc-plugins/stackleak_plugin.c
-@@ -467,6 +467,8 @@ static bool stackleak_gate(void)
- 			return false;
- 		if (STRING_EQUAL(section, ".entry.text"))
- 			return false;
-+		if (STRING_EQUAL(section, ".head.text"))
-+			return false;
- 	}
- 
- 	return track_frame_size >= 0;
diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index a45c41ea9a..4131b6914d 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4632,6 +4632,9 @@ enum skb_ext_id {
+@@ -4643,6 +4643,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif



From lede-commits at lists.infradead.org  Sun Apr 14 09:06:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 12:06:33 -0400
Subject: [openwrt/openwrt]  kernel: Reorder generic kernel 6.1 config
In-Reply-To: <171311079301.63936.4547821419076916411@git-01.infra.openwrt.org>
References: <171311079301.63936.4547821419076916411@git-01.infra.openwrt.org>
Message-ID: <mailman.26990.1713110797.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9ea685d8624ad63ed29573ceca755d1a431b4ed3

commit 9ea685d8624ad63ed29573ceca755d1a431b4ed3
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Apr 13 18:25:16 2024 +0200

    kernel: Reorder generic kernel 6.1 config
    
    This reordering was done using these commands:
    ./scripts/kconfig.pl '+' target/linux/generic/config-6.1 /dev/null > target/linux/generic/config-6.1-new
    mv target/linux/generic/config-6.1-new target/linux/generic/config-6.1
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/generic/config-6.1 | 22 +++++++++++-----------
 1 file changed, 11 insertions(+), 11 deletions(-)

diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1
index 7487ade308..bfa3faae83 100644
--- a/target/linux/generic/config-6.1
+++ b/target/linux/generic/config-6.1
@@ -155,9 +155,9 @@ CONFIG_AF_UNIX_OOB=y
 # CONFIG_AHCI_QORIQ is not set
 # CONFIG_AHCI_XGENE is not set
 CONFIG_AIO=y
-# CONFIG_AIR_EN8811H_PHY is not set
 # CONFIG_AIRO is not set
 # CONFIG_AIRO_CS is not set
+# CONFIG_AIR_EN8811H_PHY is not set
 # CONFIG_AIX_PARTITION is not set
 # CONFIG_AK09911 is not set
 # CONFIG_AK8974 is not set
@@ -367,6 +367,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
 # CONFIG_ARM64_ERRATUM_2441007 is not set
 # CONFIG_ARM64_ERRATUM_2441009 is not set
 # CONFIG_ARM64_ERRATUM_2658417 is not set
+# CONFIG_ARM64_ERRATUM_2966298 is not set
 # CONFIG_ARM64_ERRATUM_819472 is not set
 # CONFIG_ARM64_ERRATUM_824069 is not set
 # CONFIG_ARM64_ERRATUM_826319 is not set
@@ -376,7 +377,6 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=8
 # CONFIG_ARM64_ERRATUM_843419 is not set
 # CONFIG_ARM64_ERRATUM_845719 is not set
 # CONFIG_ARM64_ERRATUM_858921 is not set
-# CONFIG_ARM64_ERRATUM_2966298 is not set
 # CONFIG_ARM64_HW_AFDBM is not set
 # CONFIG_ARM64_LSE_ATOMICS is not set
 CONFIG_ARM64_MODULE_PLTS=y
@@ -3341,9 +3341,9 @@ CONFIG_LOCKDEP_STACK_TRACE_BITS=19
 CONFIG_LOCKDEP_STACK_TRACE_HASH_BITS=14
 CONFIG_LOCKDEP_SUPPORT=y
 CONFIG_LOCKD_V4=y
-CONFIG_LOCK_MM_AND_FIND_VMA=y
 # CONFIG_LOCKUP_DETECTOR is not set
 # CONFIG_LOCK_EVENT_COUNTS is not set
+CONFIG_LOCK_MM_AND_FIND_VMA=y
 # CONFIG_LOCK_STAT is not set
 # CONFIG_LOCK_TORTURE_TEST is not set
 # CONFIG_LOGFS is not set
@@ -4427,6 +4427,7 @@ CONFIG_NEW_LEDS=y
 # CONFIG_NFC is not set
 # CONFIG_NFP is not set
 # CONFIG_NFSD is not set
+# CONFIG_NFSD_V2 is not set
 # CONFIG_NFSD_V2_ACL is not set
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V3_ACL is not set
@@ -4438,7 +4439,6 @@ CONFIG_NFS_COMMON=y
 # CONFIG_NFS_FSCACHE is not set
 # CONFIG_NFS_SWAP is not set
 # CONFIG_NFS_V2 is not set
-# CONFIG_NFSD_V2 is not set
 CONFIG_NFS_V3=y
 # CONFIG_NFS_V3_ACL is not set
 # CONFIG_NFS_V4 is not set
@@ -5081,9 +5081,9 @@ CONFIG_PWRSEQ_SIMPLE=y
 # CONFIG_QCA7000 is not set
 # CONFIG_QCA7000_SPI is not set
 # CONFIG_QCA7000_UART is not set
-# CONFIG_QCA83XX_PHY is not set
 # CONFIG_QCA807X_PHY is not set
 # CONFIG_QCA808X_PHY is not set
+# CONFIG_QCA83XX_PHY is not set
 # CONFIG_QCOM_A7PLL is not set
 # CONFIG_QCOM_BAM_DMUX is not set
 # CONFIG_QCOM_EMAC is not set
@@ -7026,8 +7026,8 @@ CONFIG_TRAD_SIGNALS=y
 # CONFIG_TRUSTED_FOUNDATIONS is not set
 # CONFIG_TRUSTED_KEYS is not set
 # CONFIG_TRUSTED_KEYS_CAAM is not set
-# CONFIG_TRUSTED_KEYS_TPM is not set
 # CONFIG_TRUSTED_KEYS_TEE is not set
+# CONFIG_TRUSTED_KEYS_TPM is not set
 # CONFIG_TSL2583 is not set
 # CONFIG_TSL2591 is not set
 # CONFIG_TSL2772 is not set
@@ -7078,8 +7078,8 @@ CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
 # CONFIG_UFS_FS is not set
 # CONFIG_UHID is not set
 CONFIG_UID16=y
-# CONFIG_UIO is not set
 # CONFIG_UIMAGE_FIT_BLK is not set
+# CONFIG_UIO is not set
 # CONFIG_ULTRA is not set
 # CONFIG_ULTRIX_PARTITION is not set
 # CONFIG_UNICODE is not set
@@ -7124,8 +7124,8 @@ CONFIG_USB_BELKIN=y
 # CONFIG_USB_CDNS3 is not set
 # CONFIG_USB_CDNS3_IMX is not set
 # CONFIG_USB_CDNS3_PCI_WRAP is not set
-# CONFIG_USB_CDNS_SUPPORT is not set
 # CONFIG_USB_CDNSP_PCI is not set
+# CONFIG_USB_CDNS_SUPPORT is not set
 # CONFIG_USB_CHAOSKEY is not set
 # CONFIG_USB_CHIPIDEA is not set
 # CONFIG_USB_CHIPIDEA_GENERIC is not set
@@ -7692,12 +7692,12 @@ CONFIG_VHOST_MENU=y
 # CONFIG_VIDEO_SMIAPP is not set
 # CONFIG_VIDEO_SOLO6X10 is not set
 # CONFIG_VIDEO_SONY_BTF_MPX is not set
-# CONFIG_VIDEO_SUN4I_CSI is not set
-# CONFIG_VIDEO_SUN6I_CSI is not set
-# CONFIG_VIDEO_SUN8I_A83T_MIPI_CSI2 is not set
 # CONFIG_VIDEO_SR030PC30 is not set
 # CONFIG_VIDEO_STK1160_COMMON is not set
 # CONFIG_VIDEO_ST_MIPID02 is not set
+# CONFIG_VIDEO_SUN4I_CSI is not set
+# CONFIG_VIDEO_SUN6I_CSI is not set
+# CONFIG_VIDEO_SUN8I_A83T_MIPI_CSI2 is not set
 # CONFIG_VIDEO_TC358743 is not set
 # CONFIG_VIDEO_TDA1997X is not set
 # CONFIG_VIDEO_TDA7432 is not set



From lede-commits at lists.infradead.org  Sun Apr 14 09:06:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 12:06:36 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.1 to 6.1.86
In-Reply-To: <171311079301.63936.4547821419076916411@git-01.infra.openwrt.org>
References: <171311079301.63936.4547821419076916411@git-01.infra.openwrt.org>
Message-ID: <mailman.26991.1713110799.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2909cce1b279df641d435d3cbbcc478f8330d2df

commit 2909cce1b279df641d435d3cbbcc478f8330d2df
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Apr 13 17:48:42 2024 +0200

    kernel: bump 6.1 to 6.1.86
    
    Removed upstreamed:
       bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch  [1]
    
    All other patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.86&id=48bfb4b03c5ff6e1fa1dc73fb915e150b0968c40
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-6.1                                 |  4 +-
 ...0-0038-drm-vc4-Support-zpos-on-all-planes.patch |  4 +-
 ...plane-Make-use-of-chroma-siting-parameter.patch |  2 +-
 ...d-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch |  2 +-
 ...-for-all-the-downstream-rpi-sound-card-dr.patch |  2 +-
 ...-drm-vc4-Introduce-generation-number-enum.patch |  4 +-
 .../950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch |  4 +-
 ...c4-don-t-check-if-plane-state-fb-state-fb.patch | 93 ----------------------
 ...t-Add-a-separate-timeout-parameter-for-wa.patch | 16 ++--
 .../hack-6.1/721-net-add-packet-mangeling.patch    |  4 +-
 ...rt-Revert-driver-core-Set-fw_devlink-on-b.patch |  2 +-
 ...610-netfilter_match_bypass_default_checks.patch |  2 +-
 .../generic/pending-6.1/655-increase_skb_pad.patch |  2 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch |  4 +-
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |  2 +-
 ...-net-dsa-add-out-of-band-tagging-protocol.patch |  2 +-
 target/linux/x86/config-6.1                        |  3 +
 17 files changed, 31 insertions(+), 121 deletions(-)

diff --git a/include/kernel-6.1 b/include/kernel-6.1
index 7ea1f9e02d..7760c440af 100644
--- a/include/kernel-6.1
+++ b/include/kernel-6.1
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.1 = .84
-LINUX_KERNEL_HASH-6.1.84 = af97d2ebe14765d0db3af6560309daf08535da25bfad36e5fb3e436f22a1707a
+LINUX_VERSION-6.1 = .86
+LINUX_KERNEL_HASH-6.1.86 = d3d3c8c44f0f0a870a95bd2823f9d91979d1aa6f266da5d8cccd0c4b15e3115b
diff --git a/target/linux/bcm27xx/patches-6.1/950-0038-drm-vc4-Support-zpos-on-all-planes.patch b/target/linux/bcm27xx/patches-6.1/950-0038-drm-vc4-Support-zpos-on-all-planes.patch
index 068862766f..cc8310bf67 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0038-drm-vc4-Support-zpos-on-all-planes.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0038-drm-vc4-Support-zpos-on-all-planes.patch
@@ -88,7 +88,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	if (ret)
 --- a/drivers/gpu/drm/vc4/vc4_plane.c
 +++ b/drivers/gpu/drm/vc4/vc4_plane.c
-@@ -1600,9 +1600,14 @@ struct drm_plane *vc4_plane_init(struct
+@@ -1597,9 +1597,14 @@ struct drm_plane *vc4_plane_init(struct
  					  DRM_COLOR_YCBCR_BT709,
  					  DRM_COLOR_YCBCR_LIMITED_RANGE);
  
@@ -103,7 +103,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  int vc4_plane_create_additional_planes(struct drm_device *drm)
  {
  	struct drm_plane *cursor_plane;
-@@ -1618,24 +1623,35 @@ int vc4_plane_create_additional_planes(s
+@@ -1615,24 +1620,35 @@ int vc4_plane_create_additional_planes(s
  	 * modest number of planes to expose, that should hopefully
  	 * still cover any sane usecase.
  	 */
diff --git a/target/linux/bcm27xx/patches-6.1/950-0043-vc4-drm-plane-Make-use-of-chroma-siting-parameter.patch b/target/linux/bcm27xx/patches-6.1/950-0043-vc4-drm-plane-Make-use-of-chroma-siting-parameter.patch
index b5ebb28bbf..fb648b1fc9 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0043-vc4-drm-plane-Make-use-of-chroma-siting-parameter.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0043-vc4-drm-plane-Make-use-of-chroma-siting-parameter.patch
@@ -49,7 +49,7 @@ Signed-off-by: Dom Cobley <popcornmix at gmail.com>
  		vc4_dlist_write(vc4_state, 0xc0c0c0c0);
  	}
  
-@@ -1649,6 +1652,8 @@ struct drm_plane *vc4_plane_init(struct
+@@ -1646,6 +1649,8 @@ struct drm_plane *vc4_plane_init(struct
  					  DRM_COLOR_YCBCR_BT709,
  					  DRM_COLOR_YCBCR_LIMITED_RANGE);
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0051-drm-vc4-Add-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch b/target/linux/bcm27xx/patches-6.1/950-0051-drm-vc4-Add-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch
index c4e0050589..2cd79eac1d 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0051-drm-vc4-Add-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0051-drm-vc4-Add-3-3-2-and-4-4-4-4-RGB-RGBX-RGBA-formats.patch
@@ -85,7 +85,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  };
  
  static const struct hvs_format *vc4_get_hvs_format(u32 drm_format)
-@@ -1575,6 +1635,16 @@ static bool vc4_format_mod_supported(str
+@@ -1572,6 +1632,16 @@ static bool vc4_format_mod_supported(str
  	case DRM_FORMAT_BGRX1010102:
  	case DRM_FORMAT_RGBA1010102:
  	case DRM_FORMAT_BGRA1010102:
diff --git a/target/linux/bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch b/target/linux/bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch
index 3b5bfaa7e2..e384710da1 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0124-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch
@@ -17578,7 +17578,7 @@ Signed-off-by: Ashish Vara <ashishhvara at gmail.com>
 +#endif  /* _TAS5713_H */
 --- a/sound/soc/soc-core.c
 +++ b/sound/soc/soc-core.c
-@@ -1220,7 +1220,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
+@@ -1223,7 +1223,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
  		return 0;
  
  	for_each_rtd_codec_dais(rtd, i, codec_dai) {
diff --git a/target/linux/bcm27xx/patches-6.1/950-0938-drm-vc4-Introduce-generation-number-enum.patch b/target/linux/bcm27xx/patches-6.1/950-0938-drm-vc4-Introduce-generation-number-enum.patch
index 9314c797a0..d904c3d78d 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0938-drm-vc4-Introduce-generation-number-enum.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0938-drm-vc4-Introduce-generation-number-enum.patch
@@ -902,7 +902,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	/* Control word */
  		vc4_dlist_write(vc4_state,
  				SCALER_CTL0_VALID |
-@@ -1717,7 +1717,7 @@ struct drm_plane *vc4_plane_init(struct
+@@ -1714,7 +1714,7 @@ struct drm_plane *vc4_plane_init(struct
  	};
  
  	for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) {
@@ -911,7 +911,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  			formats[num_formats] = hvs_formats[i].drm;
  			num_formats++;
  		}
-@@ -1732,7 +1732,7 @@ struct drm_plane *vc4_plane_init(struct
+@@ -1729,7 +1729,7 @@ struct drm_plane *vc4_plane_init(struct
  		return ERR_CAST(vc4_plane);
  	plane = &vc4_plane->base;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch b/target/linux/bcm27xx/patches-6.1/950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch
index 9659432294..5cbc304615 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0963-drm-vc4-hvs-Support-BCM2712-HVS.patch
@@ -1924,7 +1924,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	return 0;
  }
  
-@@ -1716,7 +2345,7 @@ struct drm_plane *vc4_plane_init(struct
+@@ -1713,7 +2342,7 @@ struct drm_plane *vc4_plane_init(struct
  	};
  
  	for (i = 0; i < ARRAY_SIZE(hvs_formats); i++) {
@@ -1933,7 +1933,7 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  			formats[num_formats] = hvs_formats[i].drm;
  			num_formats++;
  		}
-@@ -1731,7 +2360,7 @@ struct drm_plane *vc4_plane_init(struct
+@@ -1728,7 +2357,7 @@ struct drm_plane *vc4_plane_init(struct
  		return ERR_CAST(vc4_plane);
  	plane = &vc4_plane->base;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch b/target/linux/bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch
deleted file mode 100644
index 7c7c05c5ef..0000000000
--- a/target/linux/bcm27xx/patches-6.1/950-1235-drm-vc4-don-t-check-if-plane-state-fb-state-fb.patch
+++ /dev/null
@@ -1,93 +0,0 @@
-From 146bbf9627f6c37816939de29538ec8ee9a7be1a Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ma=C3=ADra=20Canal?= <mcanal at igalia.com>
-Date: Fri, 5 Jan 2024 15:07:34 -0300
-Subject: [PATCH] drm/vc4: don't check if plane->state->fb == state->fb
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Currently, when using non-blocking commits, we can see the following
-kernel warning:
-
-[  110.908514] ------------[ cut here ]------------
-[  110.908529] refcount_t: underflow; use-after-free.
-[  110.908620] WARNING: CPU: 0 PID: 1866 at lib/refcount.c:87 refcount_dec_not_one+0xb8/0xc0
-[  110.908664] Modules linked in: rfcomm snd_seq_dummy snd_hrtimer snd_seq snd_seq_device cmac algif_hash aes_arm64 aes_generic algif_skcipher af_alg bnep hid_logitech_hidpp vc4 brcmfmac hci_uart btbcm brcmutil bluetooth snd_soc_hdmi_codec cfg80211 cec drm_display_helper drm_dma_helper drm_kms_helper snd_soc_core snd_compress snd_pcm_dmaengine fb_sys_fops sysimgblt syscopyarea sysfillrect raspberrypi_hwmon ecdh_generic ecc rfkill libaes i2c_bcm2835 binfmt_misc joydev snd_bcm2835(C) bcm28 [...]
-[  110.909086] CPU: 0 PID: 1866 Comm: kodi.bin Tainted: G         C         6.1.66-v8+ #32
-[  110.909104] Hardware name: Raspberry Pi 3 Model B Rev 1.2 (DT)
-[  110.909114] pstate: 60000005 (nZCv daif -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
-[  110.909132] pc : refcount_dec_not_one+0xb8/0xc0
-[  110.909152] lr : refcount_dec_not_one+0xb4/0xc0
-[  110.909170] sp : ffffffc00913b9c0
-[  110.909177] x29: ffffffc00913b9c0 x28: 000000556969bbb0 x27: 000000556990df60
-[  110.909205] x26: 0000000000000002 x25: 0000000000000004 x24: ffffff8004448480
-[  110.909230] x23: ffffff800570b500 x22: ffffff802e03a7bc x21: ffffffecfca68c78
-[  110.909257] x20: ffffff8002b42000 x19: ffffff802e03a600 x18: 0000000000000000
-[  110.909283] x17: 0000000000000011 x16: ffffffffffffffff x15: 0000000000000004
-[  110.909308] x14: 0000000000000fff x13: ffffffed577e47e0 x12: 0000000000000003
-[  110.909333] x11: 0000000000000000 x10: 0000000000000027 x9 : c912d0d083728c00
-[  110.909359] x8 : c912d0d083728c00 x7 : 65646e75203a745f x6 : 746e756f63666572
-[  110.909384] x5 : ffffffed579f62ee x4 : ffffffed579eb01e x3 : 0000000000000000
-[  110.909409] x2 : 0000000000000000 x1 : ffffffc00913b750 x0 : 0000000000000001
-[  110.909434] Call trace:
-[  110.909441]  refcount_dec_not_one+0xb8/0xc0
-[  110.909461]  vc4_bo_dec_usecnt+0x4c/0x1b0 [vc4]
-[  110.909903]  vc4_cleanup_fb+0x44/0x50 [vc4]
-[  110.910315]  drm_atomic_helper_cleanup_planes+0x88/0xa4 [drm_kms_helper]
-[  110.910669]  vc4_atomic_commit_tail+0x390/0x9dc [vc4]
-[  110.911079]  commit_tail+0xb0/0x164 [drm_kms_helper]
-[  110.911397]  drm_atomic_helper_commit+0x1d0/0x1f0 [drm_kms_helper]
-[  110.911716]  drm_atomic_commit+0xb0/0xdc [drm]
-[  110.912569]  drm_mode_atomic_ioctl+0x348/0x4b8 [drm]
-[  110.913330]  drm_ioctl_kernel+0xec/0x15c [drm]
-[  110.914091]  drm_ioctl+0x24c/0x3b0 [drm]
-[  110.914850]  __arm64_sys_ioctl+0x9c/0xd4
-[  110.914873]  invoke_syscall+0x4c/0x114
-[  110.914897]  el0_svc_common+0xd0/0x118
-[  110.914917]  do_el0_svc+0x38/0xd0
-[  110.914936]  el0_svc+0x30/0x8c
-[  110.914958]  el0t_64_sync_handler+0x84/0xf0
-[  110.914979]  el0t_64_sync+0x18c/0x190
-[  110.914996] ---[ end trace 0000000000000000 ]---
-
-This happens because, although `prepare_fb` and `cleanup_fb` are
-perfectly balanced, we cannot guarantee consistency in the check
-plane->state->fb == state->fb. This means that sometimes we can increase
-the refcount in `prepare_fb` and don't decrease it in `cleanup_fb`. The
-opposite can also be true.
-
-In fact, the struct drm_plane .state shouldn't be accessed directly
-but instead, the `drm_atomic_get_new_plane_state()` helper function should
-be used. So, we could stick to this check, but using
-`drm_atomic_get_new_plane_state()`. But actually, this check is not really
-needed. We can increase and decrease the refcount symmetrically without
-problems.
-
-This is going to make the code more simple and consistent.
-
-Signed-off-by: Ma?ra Canal <mcanal at igalia.com>
----
- drivers/gpu/drm/vc4/vc4_plane.c | 5 +----
- 1 file changed, 1 insertion(+), 4 deletions(-)
-
---- a/drivers/gpu/drm/vc4/vc4_plane.c
-+++ b/drivers/gpu/drm/vc4/vc4_plane.c
-@@ -2225,9 +2225,6 @@ static int vc4_prepare_fb(struct drm_pla
- 
- 	drm_gem_plane_helper_prepare_fb(plane, state);
- 
--	if (plane->state->fb == state->fb)
--		return 0;
--
- 	return vc4_bo_inc_usecnt(bo);
- }
- 
-@@ -2236,7 +2233,7 @@ static void vc4_cleanup_fb(struct drm_pl
- {
- 	struct vc4_bo *bo;
- 
--	if (plane->state->fb == state->fb || !state->fb)
-+	if (!state->fb)
- 		return;
- 
- 	bo = to_vc4_bo(&drm_fb_dma_get_gem_obj(state->fb, 0)->base);
diff --git a/target/linux/generic/backport-6.1/861-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch b/target/linux/generic/backport-6.1/861-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch
index 2b83d0396a..30d833adff 100644
--- a/target/linux/generic/backport-6.1/861-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch
+++ b/target/linux/generic/backport-6.1/861-v6.8-bus-mhi-host-Add-a-separate-timeout-parameter-for-wa.patch
@@ -23,7 +23,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
 
 --- a/drivers/bus/mhi/host/init.c
 +++ b/drivers/bus/mhi/host/init.c
-@@ -881,6 +881,7 @@ static int parse_config(struct mhi_contr
+@@ -882,6 +882,7 @@ static int parse_config(struct mhi_contr
  	if (!mhi_cntrl->timeout_ms)
  		mhi_cntrl->timeout_ms = MHI_TIMEOUT_MS;
  
@@ -33,7 +33,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  	if (!mhi_cntrl->buffer_len)
 --- a/drivers/bus/mhi/host/internal.h
 +++ b/drivers/bus/mhi/host/internal.h
-@@ -321,7 +321,7 @@ int __must_check mhi_read_reg_field(stru
+@@ -324,7 +324,7 @@ int __must_check mhi_read_reg_field(stru
  				    u32 *out);
  int __must_check mhi_poll_reg_field(struct mhi_controller *mhi_cntrl,
  				    void __iomem *base, u32 offset, u32 mask,
@@ -60,7 +60,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  		ret = mhi_read_reg_field(mhi_cntrl, base, offset, mask, &out);
 --- a/drivers/bus/mhi/host/pm.c
 +++ b/drivers/bus/mhi/host/pm.c
-@@ -163,6 +163,7 @@ int mhi_ready_state_transition(struct mh
+@@ -171,6 +171,7 @@ int mhi_ready_state_transition(struct mh
  	enum mhi_pm_state cur_state;
  	struct device *dev = &mhi_cntrl->mhi_dev->dev;
  	u32 interval_us = 25000; /* poll register field every 25 milliseconds */
@@ -68,7 +68,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  	int ret, i;
  
  	/* Check if device entered error state */
-@@ -173,14 +174,18 @@ int mhi_ready_state_transition(struct mh
+@@ -181,14 +182,18 @@ int mhi_ready_state_transition(struct mh
  
  	/* Wait for RESET to be cleared and READY bit to be set by the device */
  	ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
@@ -89,7 +89,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  	if (ret) {
  		dev_err(dev, "Device failed to enter MHI Ready\n");
  		return ret;
-@@ -479,7 +484,7 @@ static void mhi_pm_disable_transition(st
+@@ -487,7 +492,7 @@ static void mhi_pm_disable_transition(st
  
  		/* Wait for the reset bit to be cleared by the device */
  		ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
@@ -98,7 +98,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  		if (ret)
  			dev_err(dev, "Device failed to clear MHI Reset\n");
  
-@@ -492,8 +497,8 @@ static void mhi_pm_disable_transition(st
+@@ -500,8 +505,8 @@ static void mhi_pm_disable_transition(st
  		if (!MHI_IN_PBL(mhi_get_exec_env(mhi_cntrl))) {
  			/* wait for ready to be set */
  			ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs,
@@ -109,7 +109,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  			if (ret)
  				dev_err(dev, "Device failed to enter READY state\n");
  		}
-@@ -1111,7 +1116,8 @@ int mhi_async_power_up(struct mhi_contro
+@@ -1125,7 +1130,8 @@ int mhi_async_power_up(struct mhi_contro
  	if (state == MHI_STATE_SYS_ERR) {
  		mhi_set_mhi_state(mhi_cntrl, MHI_STATE_RESET);
  		ret = mhi_poll_reg_field(mhi_cntrl, mhi_cntrl->regs, MHICTRL,
@@ -119,7 +119,7 @@ Signed-off-by: Manivannan Sadhasivam <manivannan.sadhasivam at linaro.org>
  		if (ret) {
  			dev_info(dev, "Failed to reset MHI due to syserr state\n");
  			goto error_exit;
-@@ -1202,14 +1208,18 @@ EXPORT_SYMBOL_GPL(mhi_power_down);
+@@ -1216,14 +1222,18 @@ EXPORT_SYMBOL_GPL(mhi_power_down);
  int mhi_sync_power_up(struct mhi_controller *mhi_cntrl)
  {
  	int ret = mhi_async_power_up(mhi_cntrl);
diff --git a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch
index b0be9dfdcb..8652e090e1 100644
--- a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3040,6 +3040,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3046,6 +3046,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3189,16 +3193,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3195,16 +3199,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
diff --git a/target/linux/generic/hack-6.1/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch b/target/linux/generic/hack-6.1/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
index 04aaab7adf..f2ae028aa1 100644
--- a/target/linux/generic/hack-6.1/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
+++ b/target/linux/generic/hack-6.1/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
@@ -19,7 +19,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/drivers/base/core.c
 +++ b/drivers/base/core.c
-@@ -1702,7 +1702,7 @@ static void device_links_purge(struct de
+@@ -1717,7 +1717,7 @@ static void device_links_purge(struct de
  #define FW_DEVLINK_FLAGS_RPM		(FW_DEVLINK_FLAGS_ON | \
  					 DL_FLAG_PM_RUNTIME)
  
diff --git a/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch
index 7e34ef3713..56d62ab8e2 100644
--- a/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1223,12 +1260,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1225,12 +1262,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-6.1/655-increase_skb_pad.patch b/target/linux/generic/pending-6.1/655-increase_skb_pad.patch
index 0c47bc9d2c..8af331cb23 100644
--- a/target/linux/generic/pending-6.1/655-increase_skb_pad.patch
+++ b/target/linux/generic/pending-6.1/655-increase_skb_pad.patch
@@ -9,7 +9,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3006,7 +3006,7 @@ static inline int pskb_network_may_pull(
+@@ -3012,7 +3012,7 @@ static inline int pskb_network_may_pull(
   * NET_IP_ALIGN(2) + ethernet_header(14) + IP_header(20/40) + ports(8)
   */
  #ifndef NET_SKB_PAD
diff --git a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index a1b32c352b..a589fca7a8 100644
--- a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -972,6 +972,7 @@ struct sk_buff {
+@@ -967,6 +967,7 @@ struct sk_buff {
  #ifdef CONFIG_IPV6_NDISC_NODETYPE
  	__u8			ndisc_nodetype:2;
  #endif
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	__u8			inner_protocol_type:1;
 --- a/net/core/gro.c
 +++ b/net/core/gro.c
-@@ -491,6 +491,9 @@ static enum gro_result dev_gro_receive(s
+@@ -492,6 +492,9 @@ static enum gro_result dev_gro_receive(s
  	int same_flow;
  	int grow;
  
diff --git a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 3133e4e5da..fb6eb73232 100644
--- a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -7925,7 +7925,7 @@ static int nft_register_flowtable_net_ho
+@@ -7951,7 +7951,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch
index 68d1a2e23b..1723f2c749 100644
--- a/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.1/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4588,6 +4588,9 @@ enum skb_ext_id {
+@@ -4594,6 +4594,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif
diff --git a/target/linux/x86/config-6.1 b/target/linux/x86/config-6.1
index ab693448ad..20feecafd0 100644
--- a/target/linux/x86/config-6.1
+++ b/target/linux/x86/config-6.1
@@ -351,6 +351,9 @@ CONFIG_SG_POOL=y
 CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
+# CONFIG_SPECTRE_BHI_AUTO is not set
+# CONFIG_SPECTRE_BHI_OFF is not set
+CONFIG_SPECTRE_BHI_ON=y
 CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_SRCU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set



From lede-commits at lists.infradead.org  Sun Apr 14 09:06:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 12:06:35 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.1 to 6.1.84
In-Reply-To: <171311079301.63936.4547821419076916411@git-01.infra.openwrt.org>
References: <171311079301.63936.4547821419076916411@git-01.infra.openwrt.org>
Message-ID: <mailman.26994.1713110801.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1a44a260fe2ed2f74f134c4bbc34883c2b1efdda

commit 1a44a260fe2ed2f74f134c4bbc34883c2b1efdda
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Apr 13 13:49:12 2024 +0200

    kernel: bump 6.1 to 6.1.84
    
    Removed upstreamed:
       pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch [1]
    
    All other patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.84&id=44b6fb6cdedb2c391a2da355521d4610b2645fcc
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-6.1                                 |  4 +--
 ...dd-and-initialise-an-orientation-field-to.patch |  2 +-
 .../patches-6.1/950-0106-Add-dwc_otg-driver.patch  |  2 +-
 ...950-0111-MMC-added-alternative-MMC-driver.patch |  6 ++--
 ...mal-vchiq-Avoid-use-of-bool-in-structures.patch |  2 +-
 ...mal-vchiq-Add-support-for-event-callbacks.patch | 16 ++++-----
 ...l-vchiq-Free-the-event-context-for-contro.patch |  2 +-
 ...-mmal-vchiq-Fix-memory-leak-in-error-path.patch |  8 ++---
 ...ent-xhci_fixup_endpoint-for-interval-adju.patch |  4 +--
 ...l-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch |  6 ++--
 ...l-vchiq-Add-module-parameter-to-enable-lo.patch | 22 ++++++------
 ...l-vchiq-Reset-buffers_with_vpu-on-port_en.patch |  2 +-
 ...on-t-do-single-sector-reads-during-recove.patch |  2 +-
 ...op-and-add-the-endpoint-context-in-xhci_f.patch |  2 +-
 ...-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch |  6 ++--
 ...-avoid-NULL-pointer-dereference-in-f2fs_i.patch |  4 +--
 ...evert-usb-phy-generic-Get-the-vbus-supply.patch |  6 ++--
 ...-multi-gen-LRU-per-node-lru_gen_folio-lis.patch |  2 +-
 ...ist_count-to-list.h-as-list_count_nodes-f.patch |  4 +--
 ...xplicit-config-option-to-read-old-syntax-.patch |  2 +-
 .../780-usb-net-MeigLink_modem_support.patch       |  4 +--
 ...c_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch |  2 +-
 ...0-14-mmc-block-set-fwnode-of-disk-devices.patch |  4 +--
 .../450-15-mmc-block-set-GENHD_FL_NVMEM.patch      |  2 +-
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |  2 +-
 .../generic/pending-6.1/834-ledtrig-libata.patch   |  2 +-
 .../patches-6.1/410-bt-mtk-serial-fix.patch        |  2 +-
 .../patches-6.1/110-pwm-img-fix-clock-lookup.patch | 39 ----------------------
 28 files changed, 61 insertions(+), 100 deletions(-)

diff --git a/include/kernel-6.1 b/include/kernel-6.1
index 101dbf34fa..7ea1f9e02d 100644
--- a/include/kernel-6.1
+++ b/include/kernel-6.1
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.1 = .83
-LINUX_KERNEL_HASH-6.1.83 = 88b69611093613ce4494527685f833af0c31b986dcbeda7086f69f18f9e0b190
+LINUX_VERSION-6.1 = .84
+LINUX_KERNEL_HASH-6.1.84 = af97d2ebe14765d0db3af6560309daf08535da25bfad36e5fb3e436f22a1707a
diff --git a/target/linux/bcm27xx/patches-6.1/950-0025-drm-panel-Add-and-initialise-an-orientation-field-to.patch b/target/linux/bcm27xx/patches-6.1/950-0025-drm-panel-Add-and-initialise-an-orientation-field-to.patch
index 9cdbe6d7c8..67c1e18266 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0025-drm-panel-Add-and-initialise-an-orientation-field-to.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0025-drm-panel-Add-and-initialise-an-orientation-field-to.patch
@@ -46,7 +46,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  }
  EXPORT_SYMBOL(drm_panel_init);
  
-@@ -289,16 +292,18 @@ int of_drm_get_panel_orientation(const s
+@@ -294,16 +297,18 @@ int of_drm_get_panel_orientation(const s
  	if (ret < 0)
  		return ret;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch
index f8ab3b04a1..ab145eb66f 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch
@@ -1185,7 +1185,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5677,7 +5677,7 @@ static void port_event(struct usb_hub *h
+@@ -5686,7 +5686,7 @@ static void port_event(struct usb_hub *h
  		port_dev->over_current_count++;
  		port_over_current_notify(port_dev);
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch
index a89940dacb..6ca3493e4c 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0111-MMC-added-alternative-MMC-driver.patch
@@ -266,7 +266,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  static inline int mmc_blk_part_switch(struct mmc_card *card,
  				      unsigned int part_type);
  static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
-@@ -3050,6 +3057,8 @@ static int mmc_blk_probe(struct mmc_card
+@@ -3052,6 +3059,8 @@ static int mmc_blk_probe(struct mmc_card
  {
  	struct mmc_blk_data *md;
  	int ret = 0;
@@ -275,7 +275,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  
  	/*
  	 * Check that the card supports the command class(es) we need.
-@@ -3057,7 +3066,16 @@ static int mmc_blk_probe(struct mmc_card
+@@ -3059,7 +3068,16 @@ static int mmc_blk_probe(struct mmc_card
  	if (!(card->csd.cmdclass & CCC_BLOCK_READ))
  		return -ENODEV;
  
@@ -293,7 +293,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  
  	card->complete_wq = alloc_workqueue("mmc_complete",
  					WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
-@@ -3072,6 +3090,17 @@ static int mmc_blk_probe(struct mmc_card
+@@ -3074,6 +3092,17 @@ static int mmc_blk_probe(struct mmc_card
  		goto out_free;
  	}
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0165-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch b/target/linux/bcm27xx/patches-6.1/950-0165-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
index ec5a217c7c..ba8d2beed1 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0165-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0165-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
@@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1773,7 +1773,7 @@ int vchiq_mmal_component_enable(struct v
+@@ -1774,7 +1774,7 @@ int vchiq_mmal_component_enable(struct v
  
  	ret = enable_component(instance, component);
  	if (ret == 0)
diff --git a/target/linux/bcm27xx/patches-6.1/950-0166-staging-mmal-vchiq-Add-support-for-event-callbacks.patch b/target/linux/bcm27xx/patches-6.1/950-0166-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
index 743c757dd5..01a4d49fae 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0166-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0166-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
@@ -234,7 +234,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  /* deals with receipt of buffer to host message */
  static void buffer_to_host_cb(struct vchiq_mmal_instance *instance,
  			      struct mmal_msg *msg, u32 msg_len)
-@@ -1330,6 +1423,7 @@ static int port_disable(struct vchiq_mma
+@@ -1331,6 +1424,7 @@ static int port_disable(struct vchiq_mma
  				mmalbuf->mmal_flags = 0;
  				mmalbuf->dts = MMAL_TIME_UNKNOWN;
  				mmalbuf->pts = MMAL_TIME_UNKNOWN;
@@ -242,7 +242,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  				port->buffer_cb(instance,
  						port, 0, mmalbuf);
  			}
-@@ -1631,6 +1725,43 @@ int mmal_vchi_buffer_cleanup(struct mmal
+@@ -1632,6 +1726,43 @@ int mmal_vchi_buffer_cleanup(struct mmal
  }
  EXPORT_SYMBOL_GPL(mmal_vchi_buffer_cleanup);
  
@@ -286,7 +286,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  /* Initialise a mmal component and its ports
   *
   */
-@@ -1680,6 +1811,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1681,6 +1812,7 @@ int vchiq_mmal_component_init(struct vch
  	ret = port_info_get(instance, &component->control);
  	if (ret < 0)
  		goto release_component;
@@ -294,7 +294,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	for (idx = 0; idx < component->inputs; idx++) {
  		component->input[idx].type = MMAL_PORT_TYPE_INPUT;
-@@ -1690,6 +1822,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1691,6 +1823,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->input[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -302,7 +302,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	for (idx = 0; idx < component->outputs; idx++) {
-@@ -1701,6 +1834,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1702,6 +1835,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->output[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -310,7 +310,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	for (idx = 0; idx < component->clocks; idx++) {
-@@ -1712,6 +1846,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1713,6 +1847,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->clock[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -318,7 +318,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	*component_out = component;
-@@ -1737,7 +1872,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
+@@ -1738,7 +1873,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
  int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
  				  struct vchiq_mmal_component *component)
  {
@@ -327,7 +327,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	if (mutex_lock_interruptible(&instance->vchiq_mutex))
  		return -EINTR;
-@@ -1749,6 +1884,13 @@ int vchiq_mmal_component_finalise(struct
+@@ -1750,6 +1885,13 @@ int vchiq_mmal_component_finalise(struct
  
  	component->in_use = 0;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0172-staging-mmal-vchiq-Free-the-event-context-for-contro.patch b/target/linux/bcm27xx/patches-6.1/950-0172-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
index 02b8ed9411..8625928562 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0172-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0172-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
@@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1899,6 +1899,8 @@ int vchiq_mmal_component_finalise(struct
+@@ -1900,6 +1900,8 @@ int vchiq_mmal_component_finalise(struct
  	for (idx = 0; idx < component->clocks; idx++)
  		free_event_context(&component->clock[idx]);
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0173-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch b/target/linux/bcm27xx/patches-6.1/950-0173-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
index 6582bcceba..c14f6c0801 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0173-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0173-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
@@ -14,7 +14,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1765,9 +1765,26 @@ static void free_event_context(struct vc
+@@ -1766,9 +1766,26 @@ static void free_event_context(struct vc
  {
  	struct mmal_msg_context *ctx = port->event_context;
  
@@ -41,7 +41,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  }
  
  /* Initialise a mmal component and its ports
-@@ -1865,6 +1882,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1866,6 +1883,7 @@ int vchiq_mmal_component_init(struct vch
  
  release_component:
  	destroy_component(instance, component);
@@ -49,7 +49,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  unlock:
  	if (component)
  		component->in_use = 0;
-@@ -1880,7 +1898,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
+@@ -1881,7 +1899,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
  int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
  				  struct vchiq_mmal_component *component)
  {
@@ -58,7 +58,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	if (mutex_lock_interruptible(&instance->vchiq_mutex))
  		return -EINTR;
-@@ -1892,14 +1910,7 @@ int vchiq_mmal_component_finalise(struct
+@@ -1893,14 +1911,7 @@ int vchiq_mmal_component_finalise(struct
  
  	component->in_use = 0;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
index 4809951129..3c1e41ba0a 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
 
 --- a/drivers/usb/host/xhci.c
 +++ b/drivers/usb/host/xhci.c
-@@ -1641,6 +1641,109 @@ command_cleanup:
+@@ -1643,6 +1643,109 @@ command_cleanup:
  }
  
  /*
@@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
   * non-error returns are a promise to giveback() the urb later
   * we drop ownership so next owner (or urb unlink) can get it
   */
-@@ -5469,6 +5572,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5471,6 +5574,7 @@ static const struct hc_driver xhci_hc_dr
  	.endpoint_reset =	xhci_endpoint_reset,
  	.check_bandwidth =	xhci_check_bandwidth,
  	.reset_bandwidth =	xhci_reset_bandwidth,
diff --git a/target/linux/bcm27xx/patches-6.1/950-0276-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch b/target/linux/bcm27xx/patches-6.1/950-0276-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
index bcb322d55a..59ce232639 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0276-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0276-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
@@ -91,7 +91,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	} else if (msg->u.buffer_from_host.buffer_header.length == 0) {
  		/* empty buffer */
  		if (msg->u.buffer_from_host.buffer_header.flags &
-@@ -1528,6 +1551,9 @@ int vchiq_mmal_port_parameter_set(struct
+@@ -1529,6 +1552,9 @@ int vchiq_mmal_port_parameter_set(struct
  
  	mutex_unlock(&instance->vchiq_mutex);
  
@@ -101,7 +101,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	return ret;
  }
  EXPORT_SYMBOL_GPL(vchiq_mmal_port_parameter_set);
-@@ -1696,6 +1722,31 @@ int vchiq_mmal_submit_buffer(struct vchi
+@@ -1697,6 +1723,31 @@ int vchiq_mmal_submit_buffer(struct vchi
  	unsigned long flags = 0;
  	int ret;
  
@@ -133,7 +133,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	ret = buffer_from_host(instance, port, buffer);
  	if (ret == -EINVAL) {
  		/* Port is disabled. Queue for when it is enabled. */
-@@ -1729,6 +1780,16 @@ int mmal_vchi_buffer_cleanup(struct mmal
+@@ -1730,6 +1781,16 @@ int mmal_vchi_buffer_cleanup(struct mmal
  		release_msg_context(msg_context);
  	buf->msg_context = NULL;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0339-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch b/target/linux/bcm27xx/patches-6.1/950-0339-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch
index 31162b3ce4..9fef146bfb 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0339-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0339-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch
@@ -172,7 +172,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  	vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle);
  
-@@ -1086,9 +1101,9 @@ static int create_component(struct vchiq
+@@ -1087,9 +1102,9 @@ static int create_component(struct vchiq
  	component->outputs = rmsg->u.component_create_reply.output_num;
  	component->clocks = rmsg->u.component_create_reply.clock_num;
  
@@ -185,7 +185,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle);
-@@ -1257,10 +1272,9 @@ static int port_action_port(struct vchiq
+@@ -1258,10 +1273,9 @@ static int port_action_port(struct vchiq
  
  	ret = -rmsg->u.port_action_reply.status;
  
@@ -199,7 +199,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle);
-@@ -1304,11 +1318,11 @@ static int port_action_handle(struct vch
+@@ -1305,11 +1319,11 @@ static int port_action_handle(struct vch
  
  	ret = -rmsg->u.port_action_reply.status;
  
@@ -216,7 +216,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle);
-@@ -1347,9 +1361,9 @@ static int port_parameter_set(struct vch
+@@ -1348,9 +1362,9 @@ static int port_parameter_set(struct vch
  
  	ret = -rmsg->u.port_parameter_set_reply.status;
  
@@ -229,7 +229,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle);
-@@ -1407,8 +1421,9 @@ static int port_parameter_get(struct vch
+@@ -1408,8 +1422,9 @@ static int port_parameter_get(struct vch
  	/* Always report the size of the returned parameter to the caller */
  	*value_size = rmsg->u.port_parameter_get_reply.size;
  
@@ -241,7 +241,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->vchiq_instance, instance->service_handle, rmsg_handle);
-@@ -1665,7 +1680,7 @@ int vchiq_mmal_port_connect_tunnel(struc
+@@ -1666,7 +1681,7 @@ int vchiq_mmal_port_connect_tunnel(struc
  	if (!dst) {
  		/* do not make new connection */
  		ret = 0;
@@ -250,7 +250,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  		goto release_unlock;
  	}
  
-@@ -1683,14 +1698,14 @@ int vchiq_mmal_port_connect_tunnel(struc
+@@ -1684,14 +1699,14 @@ int vchiq_mmal_port_connect_tunnel(struc
  	/* set new format */
  	ret = port_info_set(instance, dst);
  	if (ret) {
@@ -267,7 +267,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  		goto release_unlock;
  	}
  
-@@ -1699,9 +1714,9 @@ int vchiq_mmal_port_connect_tunnel(struc
+@@ -1700,9 +1715,9 @@ int vchiq_mmal_port_connect_tunnel(struc
  				 MMAL_MSG_PORT_ACTION_TYPE_CONNECT,
  				 dst->component->handle, dst->handle);
  	if (ret < 0) {
@@ -280,7 +280,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  		goto release_unlock;
  	}
  	src->connected = dst;
-@@ -1726,7 +1741,8 @@ int vchiq_mmal_submit_buffer(struct vchi
+@@ -1727,7 +1742,8 @@ int vchiq_mmal_submit_buffer(struct vchi
  	 * videobuf2 won't let us have the dmabuf there.
  	 */
  	if (port->zero_copy && buffer->dma_buf && !buffer->vcsm_handle) {
@@ -290,7 +290,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  		ret = vc_sm_cma_import_dmabuf(buffer->dma_buf,
  					      &buffer->vcsm_handle);
  		if (ret) {
-@@ -1742,8 +1758,8 @@ int vchiq_mmal_submit_buffer(struct vchi
+@@ -1743,8 +1759,8 @@ int vchiq_mmal_submit_buffer(struct vchi
  			vc_sm_cma_free(buffer->vcsm_handle);
  			return ret;
  		}
@@ -301,7 +301,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	}
  
  	ret = buffer_from_host(instance, port, buffer);
-@@ -1782,8 +1798,8 @@ int mmal_vchi_buffer_cleanup(struct mmal
+@@ -1783,8 +1799,8 @@ int mmal_vchi_buffer_cleanup(struct mmal
  	if (buf->vcsm_handle) {
  		int ret;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0340-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch b/target/linux/bcm27xx/patches-6.1/950-0340-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch
index 46414dc749..8b7eb58b73 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0340-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0340-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch
@@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1500,6 +1500,8 @@ static int port_enable(struct vchiq_mmal
+@@ -1501,6 +1501,8 @@ static int port_enable(struct vchiq_mmal
  
  	port->enabled = 1;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch b/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch
index 8fa58f8327..44dfc2ba56 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0418-mmc-block-Don-t-do-single-sector-reads-during-recove.patch
@@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
 
 --- a/drivers/mmc/core/block.c
 +++ b/drivers/mmc/core/block.c
-@@ -1970,7 +1970,7 @@ static void mmc_blk_mq_rw_recovery(struc
+@@ -1972,7 +1972,7 @@ static void mmc_blk_mq_rw_recovery(struc
  		return;
  	}
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch b/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch
index 0146bbd616..b852bad904 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0671-usb-xhci-drop-and-add-the-endpoint-context-in-xhci_f.patch
@@ -19,7 +19,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
 
 --- a/drivers/usb/host/xhci.c
 +++ b/drivers/usb/host/xhci.c
-@@ -1730,7 +1730,7 @@ static void xhci_fixup_endpoint(struct u
+@@ -1732,7 +1732,7 @@ static void xhci_fixup_endpoint(struct u
  		return;
  	}
  	ctrl_ctx->add_flags = xhci_get_endpoint_flag_from_index(ep_index);
diff --git a/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch b/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch
index 6f62736b08..728e433fb8 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0698-serial-8250-Add-NOMSI-bug-for-bcm2835aux.patch
@@ -71,7 +71,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	 * hardware interrupt, we use a timer-based system.  The original
 --- a/drivers/tty/serial/8250/8250_port.c
 +++ b/drivers/tty/serial/8250/8250_port.c
-@@ -1559,6 +1559,9 @@ static void serial8250_stop_tx(struct ua
+@@ -1553,6 +1553,9 @@ static void serial8250_stop_tx(struct ua
  		serial_icr_write(up, UART_ACR, up->acr);
  	}
  	serial8250_rpm_put(up);
@@ -81,7 +81,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  }
  
  static inline void __start_tx(struct uart_port *port)
-@@ -1669,6 +1672,9 @@ static void serial8250_start_tx(struct u
+@@ -1663,6 +1666,9 @@ static void serial8250_start_tx(struct u
  	struct uart_8250_port *up = up_to_u8250p(port);
  	struct uart_8250_em485 *em485 = up->em485;
  
@@ -91,7 +91,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	if (!port->x_char && uart_circ_empty(&port->state->xmit))
  		return;
  
-@@ -1889,6 +1895,9 @@ unsigned int serial8250_modem_status(str
+@@ -1883,6 +1889,9 @@ unsigned int serial8250_modem_status(str
  			uart_handle_cts_change(port, status & UART_MSR_CTS);
  
  		wake_up_interruptible(&port->state->port.delta_msr_wait);
diff --git a/target/linux/bcm27xx/patches-6.1/950-0842-f2fs-fix-to-avoid-NULL-pointer-dereference-in-f2fs_i.patch b/target/linux/bcm27xx/patches-6.1/950-0842-f2fs-fix-to-avoid-NULL-pointer-dereference-in-f2fs_i.patch
index 33150551b3..1e2119c88c 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0842-f2fs-fix-to-avoid-NULL-pointer-dereference-in-f2fs_i.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0842-f2fs-fix-to-avoid-NULL-pointer-dereference-in-f2fs_i.patch
@@ -35,7 +35,7 @@ Signed-off-by: Jaegeuk Kim <jaegeuk at kernel.org>
 
 --- a/fs/f2fs/segment.c
 +++ b/fs/f2fs/segment.c
-@@ -663,9 +663,7 @@ init_thread:
+@@ -665,9 +665,7 @@ init_thread:
  				"f2fs_flush-%u:%u", MAJOR(dev), MINOR(dev));
  	if (IS_ERR(fcc->f2fs_issue_flush)) {
  		err = PTR_ERR(fcc->f2fs_issue_flush);
@@ -46,7 +46,7 @@ Signed-off-by: Jaegeuk Kim <jaegeuk at kernel.org>
  	}
  
  	return err;
-@@ -5062,11 +5060,9 @@ int f2fs_build_segment_manager(struct f2
+@@ -5064,11 +5062,9 @@ int f2fs_build_segment_manager(struct f2
  
  	init_f2fs_rwsem(&sm_info->curseg_lock);
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch b/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch
index 5d271fe4da..aaf49e6a7c 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch
@@ -10,9 +10,9 @@ This reverts commit c0ea202fbc855d60bc4a0603ca52a9e80654b327.
 
 --- a/drivers/usb/phy/phy-generic.c
 +++ b/drivers/usb/phy/phy-generic.c
-@@ -272,13 +272,6 @@ int usb_phy_gen_create_phy(struct device
- 		return dev_err_probe(dev, PTR_ERR(nop->vbus_draw),
- 				     "could not get vbus regulator\n");
+@@ -265,13 +265,6 @@ int usb_phy_gen_create_phy(struct device
+ 			return -EPROBE_DEFER;
+ 	}
  
 -	nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
 -	if (PTR_ERR(nop->vbus_draw) == -ENODEV)
diff --git a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch
index 99ec42fe48..69f52fa403 100644
--- a/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch
+++ b/target/linux/generic/backport-6.1/020-v6.3-06-BACKPORT-mm-multi-gen-LRU-per-node-lru_gen_folio-lis.patch
@@ -361,7 +361,7 @@ Signed-off-by: T.J. Mercier <tjmercier at google.com>
  static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -7943,6 +7943,7 @@ static void __init free_area_init_node(i
+@@ -7945,6 +7945,7 @@ static void __init free_area_init_node(i
  	pgdat_set_deferred_range(pgdat);
  
  	free_area_init_core(pgdat);
diff --git a/target/linux/generic/backport-6.1/810-v6.3-i915-Move-list_count-to-list.h-as-list_count_nodes-f.patch b/target/linux/generic/backport-6.1/810-v6.3-i915-Move-list_count-to-list.h-as-list_count_nodes-f.patch
index 60a90136c9..5c4206da14 100644
--- a/target/linux/generic/backport-6.1/810-v6.3-i915-Move-list_count-to-list.h-as-list_count_nodes-f.patch
+++ b/target/linux/generic/backport-6.1/810-v6.3-i915-Move-list_count-to-list.h-as-list_count_nodes-f.patch
@@ -20,7 +20,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
 
 --- a/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
 +++ b/drivers/gpu/drm/i915/gt/intel_execlists_submission.c
-@@ -4154,17 +4154,6 @@ void intel_execlists_show_requests(struc
+@@ -4157,17 +4157,6 @@ void intel_execlists_show_requests(struc
  	spin_unlock_irqrestore(&sched_engine->lock, flags);
  }
  
@@ -38,7 +38,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  void intel_execlists_dump_active_requests(struct intel_engine_cs *engine,
  					  struct i915_request *hung_rq,
  					  struct drm_printer *m)
-@@ -4175,8 +4164,8 @@ void intel_execlists_dump_active_request
+@@ -4178,8 +4167,8 @@ void intel_execlists_dump_active_request
  
  	intel_engine_dump_active_requests(&engine->sched_engine->requests, hung_rq, m);
  
diff --git a/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch b/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
index 35b15776fb..be293e6f2a 100644
--- a/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
+++ b/target/linux/generic/backport-6.1/816-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
@@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	imx_ocotp_nvmem_config.priv = priv;
 --- a/drivers/nvmem/meson-efuse.c
 +++ b/drivers/nvmem/meson-efuse.c
-@@ -93,6 +93,7 @@ static int meson_efuse_probe(struct plat
+@@ -74,6 +74,7 @@ static int meson_efuse_probe(struct plat
  
  	econfig->dev = dev;
  	econfig->name = dev_name(dev);
diff --git a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch
index 51f939356f..dfbe88e8e6 100644
--- a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch
@@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1147,6 +1152,11 @@ static const struct usb_device_id option
+@@ -1152,6 +1157,11 @@ static const struct usb_device_id option
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  	  .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  	/* Quectel products using Qualcomm vendor ID */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1188,6 +1198,11 @@ static const struct usb_device_id option
+@@ -1193,6 +1203,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
index 4bf473f9a7..a3d66c54b3 100644
--- a/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
+++ b/target/linux/generic/pending-6.1/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO at vplace.de>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -7897,7 +7897,7 @@ static void __init alloc_node_mem_map(st
+@@ -7899,7 +7899,7 @@ static void __init alloc_node_mem_map(st
  	if (pgdat == NODE_DATA(0)) {
  		mem_map = NODE_DATA(0)->node_mem_map;
  		if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
diff --git a/target/linux/generic/pending-6.1/450-14-mmc-block-set-fwnode-of-disk-devices.patch b/target/linux/generic/pending-6.1/450-14-mmc-block-set-fwnode-of-disk-devices.patch
index a9e53f1155..386282459b 100644
--- a/target/linux/generic/pending-6.1/450-14-mmc-block-set-fwnode-of-disk-devices.patch
+++ b/target/linux/generic/pending-6.1/450-14-mmc-block-set-fwnode-of-disk-devices.patch
@@ -14,7 +14,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mmc/core/block.c
 +++ b/drivers/mmc/core/block.c
-@@ -2484,6 +2484,8 @@ static struct mmc_blk_data *mmc_blk_allo
+@@ -2486,6 +2486,8 @@ static struct mmc_blk_data *mmc_blk_allo
  					      int area_type,
  					      unsigned int part_type)
  {
@@ -23,7 +23,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  	struct mmc_blk_data *md;
  	int devidx, ret;
  	char cap_str[10];
-@@ -2580,6 +2582,13 @@ static struct mmc_blk_data *mmc_blk_allo
+@@ -2582,6 +2584,13 @@ static struct mmc_blk_data *mmc_blk_allo
  
  	blk_queue_write_cache(md->queue.queue, cache_enabled, fua_enabled);
  
diff --git a/target/linux/generic/pending-6.1/450-15-mmc-block-set-GENHD_FL_NVMEM.patch b/target/linux/generic/pending-6.1/450-15-mmc-block-set-GENHD_FL_NVMEM.patch
index d76e7b2fe5..41c257cdeb 100644
--- a/target/linux/generic/pending-6.1/450-15-mmc-block-set-GENHD_FL_NVMEM.patch
+++ b/target/linux/generic/pending-6.1/450-15-mmc-block-set-GENHD_FL_NVMEM.patch
@@ -12,7 +12,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
 
 --- a/drivers/mmc/core/block.c
 +++ b/drivers/mmc/core/block.c
-@@ -2538,6 +2538,7 @@ static struct mmc_blk_data *mmc_blk_allo
+@@ -2540,6 +2540,7 @@ static struct mmc_blk_data *mmc_blk_allo
  	md->disk->major	= MMC_BLOCK_MAJOR;
  	md->disk->minors = perdev_minors;
  	md->disk->first_minor = devidx * perdev_minors;
diff --git a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 4c3ac8ee07..3133e4e5da 100644
--- a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -7918,7 +7918,7 @@ static int nft_register_flowtable_net_ho
+@@ -7925,7 +7925,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-6.1/834-ledtrig-libata.patch b/target/linux/generic/pending-6.1/834-ledtrig-libata.patch
index 050c3515f6..39960bc090 100644
--- a/target/linux/generic/pending-6.1/834-ledtrig-libata.patch
+++ b/target/linux/generic/pending-6.1/834-ledtrig-libata.patch
@@ -134,7 +134,7 @@ Signed-off-by: Daniel Golle <daniel at makrotopia.org>
  
  /*
   * Define if arch has non-standard setup.  This is a _PCI_ standard
-@@ -864,6 +867,12 @@ struct ata_port {
+@@ -865,6 +868,12 @@ struct ata_port {
  #ifdef CONFIG_ATA_ACPI
  	struct ata_acpi_gtm	__acpi_init_gtm; /* use ata_acpi_init_gtm() */
  #endif
diff --git a/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch
index 5b94c9216d..fa232b5d4e 100644
--- a/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch
+++ b/target/linux/mediatek/patches-6.1/410-bt-mtk-serial-fix.patch
@@ -19,7 +19,7 @@
  	},
  	[PORT_NPCM] = {
  		.name		= "Nuvoton 16550",
-@@ -2773,6 +2773,11 @@ serial8250_do_set_termios(struct uart_po
+@@ -2767,6 +2767,11 @@ serial8250_do_set_termios(struct uart_po
  	unsigned long flags;
  	unsigned int baud, quot, frac = 0;
  
diff --git a/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch b/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch
deleted file mode 100644
index d77a2f4259..0000000000
--- a/target/linux/pistachio/patches-6.1/110-pwm-img-fix-clock-lookup.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 58d03770ac5f78ff2d819caabea9371a041bf7be Mon Sep 17 00:00:00 2001
-From: Zoltan HERPAI <wigyori at uid0.hu>
-Date: Wed, 20 Mar 2024 09:36:02 +0100
-Subject: pwm: img: fix pwm clock lookup
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-22e8e19 has introduced a regression in the imgchip->pwm_clk lookup, whereas
-the clock name has also been renamed to "imgchip". This causes the driver
-failing to load:
-
-[    0.546905] img-pwm 18101300.pwm: failed to get imgchip clock
-[    0.553418] img-pwm: probe of 18101300.pwm failed with error -2
-
-Fix this lookup by reverting the clock name back to "pwm".
-
-Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
-Link: https://lore.kernel.org/r/20240320083602.81592-1-wigyori at uid0.hu
-Fixes: 22e8e19a46f7 ("pwm: img: Rename variable pointing to driver private data")
-Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
----
- drivers/pwm/pwm-img.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/pwm/pwm-img.c
-+++ b/drivers/pwm/pwm-img.c
-@@ -289,9 +289,9 @@ static int img_pwm_probe(struct platform
- 		return PTR_ERR(imgchip->sys_clk);
- 	}
- 
--	imgchip->pwm_clk = devm_clk_get(&pdev->dev, "imgchip");
-+	imgchip->pwm_clk = devm_clk_get(&pdev->dev, "pwm");
- 	if (IS_ERR(imgchip->pwm_clk)) {
--		dev_err(&pdev->dev, "failed to get imgchip clock\n");
-+		dev_err(&pdev->dev, "failed to get pwm clock\n");
- 		return PTR_ERR(imgchip->pwm_clk);
- 	}
- 



From lede-commits at lists.infradead.org  Sun Apr 14 09:06:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 12:06:34 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.1 to 6.1.83
In-Reply-To: <171311079301.63936.4547821419076916411@git-01.infra.openwrt.org>
References: <171311079301.63936.4547821419076916411@git-01.infra.openwrt.org>
Message-ID: <mailman.26997.1713110801.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2ad898e091cb51b3743b76a95535db1b1226a752

commit 2ad898e091cb51b3743b76a95535db1b1226a752
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Fri Mar 29 23:15:26 2024 +0100

    kernel: bump 6.1 to 6.1.83
    
    Removed upstreamed:
       generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch [1]
       generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch [2]
       generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch [3]
       generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch [4]
       generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch [5]
    
    Manual adjusted the following patches:
      mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=be4512b9ac6fc53e1ca8daccbda84f643215c547
    2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=f1fa919ea59655f73cb3972264e157b8831ba546
    3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=86c0c154a759f2af9612a04bdf29110f02dce956
    4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=6b62bad2da1b338f452a9380639fc9b093d75a25
    5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.83&id=f78807362828ad01db2a9ed005bf79501b620f27
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-6.1                                 |   4 +-
 .../ath79/patches-6.1/910-mikrotik-rb4xx.patch     |   2 +-
 .../950-0281-gpio-Add-gpio-fsm-driver.patch        |   2 +-
 ...evert-usb-phy-generic-Get-the-vbus-supply.patch |   6 +-
 ...roadcom-bcmbca-bcm4908-add-TWD-block-time.patch |   2 +-
 ...s-broadcom-bcmbca-Add-spi-controller-node.patch |   2 +-
 ...roadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch |   2 +-
 ...roadcom-bcmbca-bcm4908-limit-amount-of-GP.patch |   2 +-
 ...explicit-phylink_generic_validate-referen.patch |   2 +-
 ...t-mtk_eth_soc-enable-flow-offloading-supp.patch |   2 +-
 ...t-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch |   4 +-
 ...t-mtk_eth_soc-introduce-mtk_hw_reset-util.patch |   4 +-
 ...t-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch |   8 +-
 ...t-mtk_eth_soc-align-reset-procedure-to-ve.patch |  10 +-
 ...t-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch |   8 +-
 ...t-mtk_wed-add-reset-reset_complete-callba.patch |   4 +-
 ...t-mtk_eth_soc-increase-tx-ring-side-for-Q.patch |  14 +-
 ...t-mtk_eth_soc-avoid-port_mg-assignment-on.patch |   4 +-
 ...t-mtk_eth_soc-implement-multi-queue-suppo.patch |  62 ++++----
 ...t-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch |  10 +-
 ...t-mtk_eth_soc-disable-hardware-DSA-untagg.patch |   4 +-
 ...t-mtk_eth_soc-enable-special-tag-when-any.patch |   6 +-
 ...t-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch |   4 +-
 ...t-mtk_eth_soc-fix-tx-throughput-regressio.patch |   2 +-
 ...hernet-mtk_eth_soc-add-support-for-MT7981.patch |   4 +-
 ...t-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch |   4 +-
 ...t-mtk_eth_soc-switch-to-external-PCS-driv.patch |  10 +-
 ...t-mtk_eth_soc-ppe-add-support-for-flow-ac.patch |  10 +-
 ...t-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch |  14 +-
 ...t-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch |  10 +-
 ...t-mtk_eth_soc-remove-incorrect-PLL-config.patch |   4 +-
 ...t-mtk_eth_soc-remove-mac_pcs_get_state-an.patch |   6 +-
 ...t-mtk_eth_soc-add-version-in-mtk_soc_data.patch |  60 +++----
 ...t-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch |  30 ++--
 ...t-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch |  22 +--
 ...t-mtk_eth_soc-add-basic-support-for-MT798.patch |  10 +-
 ...t-mtk_eth_soc-enable-page_pool-support-fo.patch |   2 +-
 ...t-mtk_eth_soc-enable-nft-hw-flowtable_off.patch |   2 +-
 ...t-mtk_eth_soc-support-per-flow-accounting.patch |   2 +-
 ...net-mtk_eth_soc-add-reset-bits-for-MT7988.patch |   8 +-
 ...t-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch |  24 +--
 ...t-mtk_eth_soc-support-36-bit-DMA-addressi.patch |  16 +-
 ...et-mtk_eth_soc-fix-uninitialized-variable.patch |   4 +-
 ...530-prevent-possible-incorrect-XTAL-frequ.patch | 172 --------------------
 ...530-fix-link-local-frames-that-ingress-vl.patch | 173 ---------------------
 ...530-fix-handling-of-all-link-local-frames.patch | 133 ----------------
 ...req-qcom-nvmem-use-SoC-ID-s-from-bindings.patch |   4 +-
 ...-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch |   4 +-
 target/linux/generic/config-6.1                    |   2 +
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch |   8 +-
 ...ethernet-mtk_eth_soc-enable-threaded-NAPI.patch |   2 +-
 ...t-mtk_eth_soc-work-around-issue-with-send.patch |   6 +-
 ...t-mtk_eth_soc-fix-remaining-throughput-re.patch |   4 +-
 ...k-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch |  50 ------
 ...thernet-mtk_eth_soc-fix-PPE-hanging-issue.patch |  59 -------
 ...d-optional-threading-for-backlog-processi.patch |   4 +-
 ...pio-gpio-cascade-add-generic-GPIO-cascade.patch |   2 +-
 .../generic/pending-6.1/920-mangle_bootargs.patch  |   4 +-
 ...essor-support-for-ATAGs-rootblock-parsing.patch |   2 +-
 ...ediatek-mt7986-add-support-for-RX-Wireles.patch |   4 +-
 ...ts-mt7986-add-crypto-related-device-nodes.patch |   2 +-
 .../004-v6.2-arm64-dts-mt7986-add-i2c-node.patch   |   2 +-
 ...4-dts-mt7986-add-spi-related-device-nodes.patch |   2 +-
 ...4-dts-mt7986-add-usb-related-device-nodes.patch |   2 +-
 ...4-dts-mt7986-add-mmc-related-device-nodes.patch |   2 +-
 ...-dts-mt7986-add-pcie-related-device-nodes.patch |   2 +-
 .../012-v6.5-arm64-dts-mt7986-add-PWM.patch        |   2 +-
 ....5-arm64-dts-mt7986-add-thermal-and-efuse.patch |   8 +-
 ...7-v6.5-arm64-dts-mt7986-add-thermal-zones.patch |   2 +-
 ...6.7-arm64-dts-mt7986-change-cooling-trips.patch |   2 +-
 .../patches-6.1/100-dts-update-mt7622-rfb1.patch   |   8 +-
 .../patches-6.1/106-dts-mt7622-disable_btif.patch  |   4 +-
 .../patches-6.1/112-dts-fix-bpi64-lan-names.patch  |   2 +-
 .../patches-6.1/114-dts-bpi64-disable-rtc.patch    |   2 +-
 ...t7622-declare-SPI-NAND-present-on-BPI-R64.patch |   2 +-
 .../131-dts-mt7622-add-snand-support.patch         |   2 +-
 .../140-dts-fix-wmac-support-for-mt7622-rfb1.patch |   4 +-
 ...t7622-handle-interrupts-from-MT7531-switc.patch |   2 +-
 .../patches-6.1/331-mt7622-rfb1-enable-bmt.patch   |   2 +-
 ...-mt65xx-Move-chip_config-to-driver-s-priv.patch |   2 +-
 ...-mt65xx-Add-controller-s-calibration-para.patch |   4 +-
 .../patches-6.1/862-arm64-dts-mt7986-add-afe.patch |   2 +-
 ...-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch |   2 +-
 .../910-dts-mt7622-bpi-r64-wifi-eeprom.patch       |   2 +-
 .../911-dts-mt7622-bpi-r64-add-rootdisk.patch      |   6 +-
 .../930-spi-mt65xx-enable-sel-clk.patch            |   2 +-
 ...s-mt7986-move-cpuboot-in-a-dedicated-node.patch |   6 +-
 ...4-dts-mt7986-move-ilm-in-a-dedicated-node.patch |   6 +-
 ...4-dts-mt7986-move-dlm-in-a-dedicated-node.patch |   6 +-
 ...vebu-Mangle-bootloader-s-kernel-arguments.patch |   4 +-
 target/linux/x86/64/config-6.1                     |   1 +
 91 files changed, 279 insertions(+), 863 deletions(-)

diff --git a/include/kernel-6.1 b/include/kernel-6.1
index 0c09df7a7d..101dbf34fa 100644
--- a/include/kernel-6.1
+++ b/include/kernel-6.1
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.1 = .82
-LINUX_KERNEL_HASH-6.1.82 = d150d2d9d416877668d8b56f75759f166168d192419eefaa942ed67225cbec06
+LINUX_VERSION-6.1 = .83
+LINUX_KERNEL_HASH-6.1.83 = 88b69611093613ce4494527685f833af0c31b986dcbeda7086f69f18f9e0b190
diff --git a/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch b/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch
index 9a163e70b3..536d7abf6b 100644
--- a/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch
+++ b/target/linux/ath79/patches-6.1/910-mikrotik-rb4xx.patch
@@ -72,7 +72,7 @@ Submitted-by: Christopher Hill <ch6574 at gmail.com>
  obj-$(CONFIG_MFD_INTEL_M10_BMC)   += intel-m10-bmc.o
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1593,6 +1593,12 @@ config GPIO_SODAVILLE
+@@ -1594,6 +1594,12 @@ config GPIO_SODAVILLE
  	help
  	  Say Y here to support Intel Sodaville GPIO.
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0281-gpio-Add-gpio-fsm-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0281-gpio-Add-gpio-fsm-driver.patch
index 1e0c3a0d00..7f65a3b660 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0281-gpio-Add-gpio-fsm-driver.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0281-gpio-Add-gpio-fsm-driver.patch
@@ -63,7 +63,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1243,6 +1243,15 @@ config HTC_EGPIO
+@@ -1244,6 +1244,15 @@ config HTC_EGPIO
  	  several HTC phones.  It provides basic support for input
  	  pins, output pins, and IRQs.
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch b/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch
index aaf49e6a7c..5d271fe4da 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0851-Revert-usb-phy-generic-Get-the-vbus-supply.patch
@@ -10,9 +10,9 @@ This reverts commit c0ea202fbc855d60bc4a0603ca52a9e80654b327.
 
 --- a/drivers/usb/phy/phy-generic.c
 +++ b/drivers/usb/phy/phy-generic.c
-@@ -265,13 +265,6 @@ int usb_phy_gen_create_phy(struct device
- 			return -EPROBE_DEFER;
- 	}
+@@ -272,13 +272,6 @@ int usb_phy_gen_create_phy(struct device
+ 		return dev_err_probe(dev, PTR_ERR(nop->vbus_draw),
+ 				     "could not get vbus regulator\n");
  
 -	nop->vbus_draw = devm_regulator_get_exclusive(dev, "vbus");
 -	if (PTR_ERR(nop->vbus_draw) == -ENODEV)
diff --git a/target/linux/bcm4908/patches-6.1/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch b/target/linux/bcm4908/patches-6.1/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch
index a3f49ca440..e175f27891 100644
--- a/target/linux/bcm4908/patches-6.1/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch
+++ b/target/linux/bcm4908/patches-6.1/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch
@@ -17,7 +17,7 @@ Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
 
 --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
 +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -283,6 +283,11 @@
+@@ -280,6 +280,11 @@
  			#address-cells = <1>;
  			#size-cells = <1>;
  
diff --git a/target/linux/bcm4908/patches-6.1/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch b/target/linux/bcm4908/patches-6.1/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch
index e8e1228179..7476aed05b 100644
--- a/target/linux/bcm4908/patches-6.1/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch
+++ b/target/linux/bcm4908/patches-6.1/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch
@@ -40,7 +40,7 @@ Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
  	};
  
  	soc {
-@@ -531,6 +537,18 @@
+@@ -528,6 +534,18 @@
  			#size-cells = <0>;
  		};
  
diff --git a/target/linux/bcm4908/patches-6.1/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch b/target/linux/bcm4908/patches-6.1/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch
index d43d6d84f0..46d632e95d 100644
--- a/target/linux/bcm4908/patches-6.1/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch
+++ b/target/linux/bcm4908/patches-6.1/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch
@@ -21,7 +21,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
 +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -596,6 +596,7 @@
+@@ -593,6 +593,7 @@
  			reg-names = "nand", "nand-int-base";
  			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
  			interrupt-names = "nand_ctlrdy";
diff --git a/target/linux/bcm4908/patches-6.1/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch b/target/linux/bcm4908/patches-6.1/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch
index a7c6d0102f..4adeef8319 100644
--- a/target/linux/bcm4908/patches-6.1/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch
+++ b/target/linux/bcm4908/patches-6.1/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch
@@ -12,7 +12,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
 +++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -343,7 +343,7 @@
+@@ -340,7 +340,7 @@
  		gpio0: gpio-controller at 500 {
  			compatible = "brcm,bcm6345-gpio";
  			reg-names = "dirout", "dat";
diff --git a/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch b/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch
index 28154af920..31fde5f18e 100644
--- a/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch
+++ b/target/linux/generic/backport-6.1/715-07-v6.2-net-remove-explicit-phylink_generic_validate-referen.patch
@@ -142,7 +142,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.mac_link_down = prestera_mac_link_down,
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -654,7 +654,6 @@ static void mtk_mac_link_up(struct phyli
+@@ -653,7 +653,6 @@ static void mtk_mac_link_up(struct phyli
  }
  
  static const struct phylink_mac_ops mtk_phylink_ops = {
diff --git a/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch b/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch
index 816aa67787..cf0d2a3a89 100644
--- a/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch
+++ b/target/linux/generic/backport-6.1/724-v6.2-net-ethernet-mtk_eth_soc-enable-flow-offloading-supp.patch
@@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4333,6 +4333,7 @@ static const struct mtk_soc_data mt7986_
+@@ -4332,6 +4332,7 @@ static const struct mtk_soc_data mt7986_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7986_CLKS_BITMAP,
  	.required_pctl = false,
diff --git a/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch b/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch
index cefe1eefff..5a79242e3b 100644
--- a/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch
+++ b/target/linux/generic/backport-6.1/729-07-v6.1-net-ethernet-mtk_eth_soc-remove-cpu_relax-in-mtk_pen.patch
@@ -12,7 +12,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3480,11 +3480,8 @@ static void mtk_pending_work(struct work
+@@ -3479,11 +3479,8 @@ static void mtk_pending_work(struct work
  	rtnl_lock();
  
  	dev_dbg(eth->dev, "[%s][%d] reset\n", __func__, __LINE__);
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	/* stop all devices to make sure that dma is properly shut down */
  	for (i = 0; i < MTK_MAC_COUNT; i++) {
  		if (!eth->netdev[i])
-@@ -3518,7 +3515,7 @@ static void mtk_pending_work(struct work
+@@ -3517,7 +3514,7 @@ static void mtk_pending_work(struct work
  
  	dev_dbg(eth->dev, "[%s][%d] reset done\n", __func__, __LINE__);
  
diff --git a/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch b/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch
index c91861a8f1..fde0af25df 100644
--- a/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch
+++ b/target/linux/generic/backport-6.1/729-18-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_reset-util.patch
@@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3256,6 +3256,27 @@ static void mtk_set_mcr_max_rx(struct mt
+@@ -3255,6 +3255,27 @@ static void mtk_set_mcr_max_rx(struct mt
  		mtk_w32(mac->hw, mcr_new, MTK_MAC_MCR(mac->id));
  }
  
@@ -44,7 +44,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static int mtk_hw_init(struct mtk_eth *eth)
  {
  	u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
-@@ -3295,22 +3316,9 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3294,22 +3315,9 @@ static int mtk_hw_init(struct mtk_eth *e
  		return 0;
  	}
  
diff --git a/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch b/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch
index 6597eb5b74..e6a94f616e 100644
--- a/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch
+++ b/target/linux/generic/backport-6.1/729-19-v6.3-net-ethernet-mtk_eth_soc-introduce-mtk_hw_warm_reset.patch
@@ -17,7 +17,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3277,7 +3277,54 @@ static void mtk_hw_reset(struct mtk_eth
+@@ -3276,7 +3276,54 @@ static void mtk_hw_reset(struct mtk_eth
  			     0x3ffffff);
  }
  
@@ -73,7 +73,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  {
  	u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
  		       ETHSYS_DMA_AG_MAP_PPE;
-@@ -3316,7 +3363,12 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3315,7 +3362,12 @@ static int mtk_hw_init(struct mtk_eth *e
  		return 0;
  	}
  
@@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
  		/* Set FE to PDMAv2 if necessary */
-@@ -3507,7 +3559,7 @@ static void mtk_pending_work(struct work
+@@ -3506,7 +3558,7 @@ static void mtk_pending_work(struct work
  	if (eth->dev->pins)
  		pinctrl_select_state(eth->dev->pins->p,
  				     eth->dev->pins->default_state);
@@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	/* restart DMA and enable IRQs */
  	for (i = 0; i < MTK_MAC_COUNT; i++) {
-@@ -4109,7 +4161,7 @@ static int mtk_probe(struct platform_dev
+@@ -4108,7 +4160,7 @@ static int mtk_probe(struct platform_dev
  	eth->msg_enable = netif_msg_init(mtk_msg_level, MTK_DEFAULT_MSG_ENABLE);
  	INIT_WORK(&eth->pending_work, mtk_pending_work);
  
diff --git a/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch b/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch
index 55ab19f4c8..7fdf7aa581 100644
--- a/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch
+++ b/target/linux/generic/backport-6.1/729-20-v6.3-net-ethernet-mtk_eth_soc-align-reset-procedure-to-ve.patch
@@ -16,7 +16,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -2844,14 +2844,29 @@ static void mtk_dma_free(struct mtk_eth
+@@ -2843,14 +2843,29 @@ static void mtk_dma_free(struct mtk_eth
  	kfree(eth->scratch_head);
  }
  
@@ -48,7 +48,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	schedule_work(&eth->pending_work);
  }
  
-@@ -3331,15 +3346,17 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3330,15 +3345,17 @@ static int mtk_hw_init(struct mtk_eth *e
  	const struct mtk_reg_map *reg_map = eth->soc->reg_map;
  	int i, val, ret;
  
@@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (eth->ethsys)
  		regmap_update_bits(eth->ethsys, ETHSYS_DMA_AG_MAP, dma_mask,
-@@ -3468,8 +3485,10 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3467,8 +3484,10 @@ static int mtk_hw_init(struct mtk_eth *e
  	return 0;
  
  err_disable_pm:
@@ -85,7 +85,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	return ret;
  }
-@@ -3531,30 +3550,53 @@ static int mtk_do_ioctl(struct net_devic
+@@ -3530,30 +3549,53 @@ static int mtk_do_ioctl(struct net_devic
  	return -EOPNOTSUPP;
  }
  
@@ -148,7 +148,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (eth->dev->pins)
  		pinctrl_select_state(eth->dev->pins->p,
-@@ -3565,15 +3607,19 @@ static void mtk_pending_work(struct work
+@@ -3564,15 +3606,19 @@ static void mtk_pending_work(struct work
  	for (i = 0; i < MTK_MAC_COUNT; i++) {
  		if (!test_bit(i, &restart))
  			continue;
diff --git a/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch b/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch
index d5a7c0eba2..a77f3da7f8 100644
--- a/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch
+++ b/target/linux/generic/backport-6.1/729-21-v6.3-net-ethernet-mtk_eth_soc-add-dma-checks-to-mtk_hw_re.patch
@@ -49,7 +49,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
  
  /* strings used by ethtool */
-@@ -3339,6 +3345,102 @@ static void mtk_hw_warm_reset(struct mtk
+@@ -3338,6 +3344,102 @@ static void mtk_hw_warm_reset(struct mtk
  			val, rst_mask);
  }
  
@@ -152,7 +152,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static int mtk_hw_init(struct mtk_eth *eth, bool reset)
  {
  	u32 dma_mask = ETHSYS_DMA_AG_MAP_PDMA | ETHSYS_DMA_AG_MAP_QDMA |
-@@ -3657,6 +3759,7 @@ static int mtk_cleanup(struct mtk_eth *e
+@@ -3656,6 +3758,7 @@ static int mtk_cleanup(struct mtk_eth *e
  	mtk_unreg_dev(eth);
  	mtk_free_dev(eth);
  	cancel_work_sync(&eth->pending_work);
@@ -160,7 +160,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	return 0;
  }
-@@ -4094,6 +4197,7 @@ static int mtk_probe(struct platform_dev
+@@ -4093,6 +4196,7 @@ static int mtk_probe(struct platform_dev
  
  	eth->rx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
  	INIT_WORK(&eth->rx_dim.work, mtk_dim_rx);
@@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	eth->tx_dim.mode = DIM_CQ_PERIOD_MODE_START_FROM_EQE;
  	INIT_WORK(&eth->tx_dim.work, mtk_dim_tx);
-@@ -4296,6 +4400,8 @@ static int mtk_probe(struct platform_dev
+@@ -4295,6 +4399,8 @@ static int mtk_probe(struct platform_dev
  	netif_napi_add(&eth->dummy_dev, &eth->rx_napi, mtk_napi_rx);
  
  	platform_set_drvdata(pdev, eth);
diff --git a/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch b/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch
index c21d094ae8..3f047da758 100644
--- a/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch
+++ b/target/linux/generic/backport-6.1/729-22-v6.3-net-ethernet-mtk_wed-add-reset-reset_complete-callba.patch
@@ -14,7 +14,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3688,6 +3688,11 @@ static void mtk_pending_work(struct work
+@@ -3687,6 +3687,11 @@ static void mtk_pending_work(struct work
  	set_bit(MTK_RESETTING, &eth->state);
  
  	mtk_prepare_for_reset(eth);
@@ -26,7 +26,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	/* stop all devices to make sure that dma is properly shut down */
  	for (i = 0; i < MTK_MAC_COUNT; i++) {
-@@ -3725,6 +3730,8 @@ static void mtk_pending_work(struct work
+@@ -3724,6 +3729,8 @@ static void mtk_pending_work(struct work
  
  	clear_bit(MTK_RESETTING, &eth->state);
  
diff --git a/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch b/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch
index 046a581224..41d1bceac4 100644
--- a/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch
+++ b/target/linux/generic/backport-6.1/730-02-v6.3-net-ethernet-mtk_eth_soc-increase-tx-ring-side-for-Q.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -944,7 +944,7 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -943,7 +943,7 @@ static int mtk_init_fq_dma(struct mtk_et
  {
  	const struct mtk_soc_data *soc = eth->soc;
  	dma_addr_t phy_ring_tail;
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	dma_addr_t dma_addr;
  	int i;
  
-@@ -2208,19 +2208,25 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2207,19 +2207,25 @@ static int mtk_tx_alloc(struct mtk_eth *
  	struct mtk_tx_ring *ring = &eth->tx_ring;
  	int i, sz = soc->txrx.txd_size;
  	struct mtk_tx_dma_v2 *txd;
@@ -51,7 +51,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		u32 next_ptr = ring->phys + next * sz;
  
  		txd = ring->dma + i * sz;
-@@ -2240,22 +2246,22 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2239,22 +2245,22 @@ static int mtk_tx_alloc(struct mtk_eth *
  	 * descriptors in ring->dma_pdma.
  	 */
  	if (!MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
@@ -79,7 +79,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	ring->thresh = MAX_SKB_FRAGS;
  
  	/* make sure that all changes to the dma ring are flushed before we
-@@ -2267,14 +2273,14 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2266,14 +2272,14 @@ static int mtk_tx_alloc(struct mtk_eth *
  		mtk_w32(eth, ring->phys, soc->reg_map->qdma.ctx_ptr);
  		mtk_w32(eth, ring->phys, soc->reg_map->qdma.dtx_ptr);
  		mtk_w32(eth,
@@ -96,7 +96,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		mtk_w32(eth, 0, MT7628_TX_CTX_IDX0);
  		mtk_w32(eth, MT7628_PST_DTX_IDX0, soc->reg_map->pdma.rst_idx);
  	}
-@@ -2292,7 +2298,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -2291,7 +2297,7 @@ static void mtk_tx_clean(struct mtk_eth
  	int i;
  
  	if (ring->buf) {
@@ -105,7 +105,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			mtk_tx_unmap(eth, &ring->buf[i], NULL, false);
  		kfree(ring->buf);
  		ring->buf = NULL;
-@@ -2300,14 +2306,14 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -2299,14 +2305,14 @@ static void mtk_tx_clean(struct mtk_eth
  
  	if (ring->dma) {
  		dma_free_coherent(eth->dma_dev,
@@ -122,7 +122,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  				  ring->dma_pdma, ring->phys_pdma);
  		ring->dma_pdma = NULL;
  	}
-@@ -2832,7 +2838,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -2831,7 +2837,7 @@ static void mtk_dma_free(struct mtk_eth
  			netdev_reset_queue(eth->netdev[i]);
  	if (eth->scratch_ring) {
  		dma_free_coherent(eth->dma_dev,
diff --git a/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch b/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch
index 7e879ca1d5..c9823daa1d 100644
--- a/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch
+++ b/target/linux/generic/backport-6.1/730-03-v6.3-net-ethernet-mtk_eth_soc-avoid-port_mg-assignment-on.patch
@@ -12,7 +12,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4479,7 +4479,7 @@ static const struct mtk_soc_data mt7621_
+@@ -4478,7 +4478,7 @@ static const struct mtk_soc_data mt7621_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7621_CLKS_BITMAP,
  	.required_pctl = false,
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	.hash_offset = 2,
  	.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
  	.txrx = {
-@@ -4518,7 +4518,7 @@ static const struct mtk_soc_data mt7623_
+@@ -4517,7 +4517,7 @@ static const struct mtk_soc_data mt7623_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7623_CLKS_BITMAP,
  	.required_pctl = true,
diff --git a/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch b/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch
index 8ceba7831e..0d462b0c85 100644
--- a/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch
+++ b/target/linux/generic/backport-6.1/730-04-v6.3-net-ethernet-mtk_eth_soc-implement-multi-queue-suppo.patch
@@ -54,7 +54,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	},
  	.gdm1_cnt		= 0x1c00,
  	.gdma_to_ppe		= 0x3333,
-@@ -620,6 +624,75 @@ static void mtk_mac_link_down(struct phy
+@@ -619,6 +623,75 @@ static void mtk_mac_link_down(struct phy
  	mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
  }
  
@@ -130,7 +130,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static void mtk_mac_link_up(struct phylink_config *config,
  			    struct phy_device *phy,
  			    unsigned int mode, phy_interface_t interface,
-@@ -645,6 +718,8 @@ static void mtk_mac_link_up(struct phyli
+@@ -644,6 +717,8 @@ static void mtk_mac_link_up(struct phyli
  		break;
  	}
  
@@ -139,7 +139,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	/* Configure duplex */
  	if (duplex == DUPLEX_FULL)
  		mcr |= MAC_MCR_FORCE_DPX;
-@@ -1105,7 +1180,8 @@ static void mtk_tx_set_dma_desc_v1(struc
+@@ -1104,7 +1179,8 @@ static void mtk_tx_set_dma_desc_v1(struc
  
  	WRITE_ONCE(desc->txd1, info->addr);
  
@@ -149,7 +149,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (info->last)
  		data |= TX_DMA_LS0;
  	WRITE_ONCE(desc->txd3, data);
-@@ -1139,9 +1215,6 @@ static void mtk_tx_set_dma_desc_v2(struc
+@@ -1138,9 +1214,6 @@ static void mtk_tx_set_dma_desc_v2(struc
  		data |= TX_DMA_LS0;
  	WRITE_ONCE(desc->txd3, data);
  
@@ -159,7 +159,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	data = (mac->id + 1) << TX_DMA_FPORT_SHIFT_V2; /* forward port */
  	data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
  	WRITE_ONCE(desc->txd4, data);
-@@ -1185,11 +1258,12 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1184,11 +1257,12 @@ static int mtk_tx_map(struct sk_buff *sk
  		.gso = gso,
  		.csum = skb->ip_summed == CHECKSUM_PARTIAL,
  		.vlan = skb_vlan_tag_present(skb),
@@ -173,7 +173,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	struct mtk_mac *mac = netdev_priv(dev);
  	struct mtk_eth *eth = mac->hw;
  	const struct mtk_soc_data *soc = eth->soc;
-@@ -1197,8 +1271,10 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1196,8 +1270,10 @@ static int mtk_tx_map(struct sk_buff *sk
  	struct mtk_tx_dma *itxd_pdma, *txd_pdma;
  	struct mtk_tx_buf *itx_buf, *tx_buf;
  	int i, n_desc = 1;
@@ -184,7 +184,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	itxd = ring->next_free;
  	itxd_pdma = qdma_to_pdma(ring, itxd);
  	if (itxd == ring->last_free)
-@@ -1247,7 +1323,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1246,7 +1322,7 @@ static int mtk_tx_map(struct sk_buff *sk
  			memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
  			txd_info.size = min_t(unsigned int, frag_size,
  					      soc->txrx.dma_max_len);
@@ -193,7 +193,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			txd_info.last = i == skb_shinfo(skb)->nr_frags - 1 &&
  					!(frag_size - txd_info.size);
  			txd_info.addr = skb_frag_dma_map(eth->dma_dev, frag,
-@@ -1286,7 +1362,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1285,7 +1361,7 @@ static int mtk_tx_map(struct sk_buff *sk
  			txd_pdma->txd2 |= TX_DMA_LS1;
  	}
  
@@ -202,7 +202,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	skb_tx_timestamp(skb);
  
  	ring->next_free = mtk_qdma_phys_to_virt(ring, txd->txd2);
-@@ -1298,8 +1374,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1297,8 +1373,7 @@ static int mtk_tx_map(struct sk_buff *sk
  	wmb();
  
  	if (MTK_HAS_CAPS(soc->caps, MTK_QDMA)) {
@@ -212,7 +212,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			mtk_w32(eth, txd->txd2, soc->reg_map->qdma.ctx_ptr);
  	} else {
  		int next_idx;
-@@ -1368,7 +1443,7 @@ static void mtk_wake_queue(struct mtk_et
+@@ -1367,7 +1442,7 @@ static void mtk_wake_queue(struct mtk_et
  	for (i = 0; i < MTK_MAC_COUNT; i++) {
  		if (!eth->netdev[i])
  			continue;
@@ -221,7 +221,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	}
  }
  
-@@ -1392,7 +1467,7 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1391,7 +1466,7 @@ static netdev_tx_t mtk_start_xmit(struct
  
  	tx_num = mtk_cal_txd_req(eth, skb);
  	if (unlikely(atomic_read(&ring->free_count) <= tx_num)) {
@@ -230,7 +230,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		netif_err(eth, tx_queued, dev,
  			  "Tx Ring full when queue awake!\n");
  		spin_unlock(&eth->page_lock);
-@@ -1418,7 +1493,7 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1417,7 +1492,7 @@ static netdev_tx_t mtk_start_xmit(struct
  		goto drop;
  
  	if (unlikely(atomic_read(&ring->free_count) <= ring->thresh))
@@ -239,7 +239,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	spin_unlock(&eth->page_lock);
  
-@@ -1585,10 +1660,12 @@ static int mtk_xdp_submit_frame(struct m
+@@ -1584,10 +1659,12 @@ static int mtk_xdp_submit_frame(struct m
  	struct skb_shared_info *sinfo = xdp_get_shared_info_from_frame(xdpf);
  	const struct mtk_soc_data *soc = eth->soc;
  	struct mtk_tx_ring *ring = &eth->tx_ring;
@@ -252,7 +252,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	};
  	int err, index = 0, n_desc = 1, nr_frags;
  	struct mtk_tx_buf *htx_buf, *tx_buf;
-@@ -1638,6 +1715,7 @@ static int mtk_xdp_submit_frame(struct m
+@@ -1637,6 +1714,7 @@ static int mtk_xdp_submit_frame(struct m
  		memset(&txd_info, 0, sizeof(struct mtk_tx_dma_desc_info));
  		txd_info.size = skb_frag_size(&sinfo->frags[index]);
  		txd_info.last = index + 1 == nr_frags;
@@ -260,7 +260,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		data = skb_frag_address(&sinfo->frags[index]);
  
  		index++;
-@@ -1992,8 +2070,46 @@ rx_done:
+@@ -1991,8 +2069,46 @@ rx_done:
  	return done;
  }
  
@@ -308,7 +308,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  {
  	const struct mtk_reg_map *reg_map = eth->soc->reg_map;
  	struct mtk_tx_ring *ring = &eth->tx_ring;
-@@ -2025,12 +2141,9 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -2024,12 +2140,9 @@ static int mtk_poll_tx_qdma(struct mtk_e
  			break;
  
  		if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) {
@@ -323,7 +323,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			budget--;
  		}
  		mtk_tx_unmap(eth, tx_buf, &bq, true);
-@@ -2049,7 +2162,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -2048,7 +2161,7 @@ static int mtk_poll_tx_qdma(struct mtk_e
  }
  
  static int mtk_poll_tx_pdma(struct mtk_eth *eth, int budget,
@@ -332,7 +332,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  {
  	struct mtk_tx_ring *ring = &eth->tx_ring;
  	struct mtk_tx_buf *tx_buf;
-@@ -2067,12 +2180,8 @@ static int mtk_poll_tx_pdma(struct mtk_e
+@@ -2066,12 +2179,8 @@ static int mtk_poll_tx_pdma(struct mtk_e
  			break;
  
  		if (tx_buf->data != (void *)MTK_DMA_DUMMY_DESC) {
@@ -347,7 +347,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			budget--;
  		}
  		mtk_tx_unmap(eth, tx_buf, &bq, true);
-@@ -2094,26 +2203,15 @@ static int mtk_poll_tx(struct mtk_eth *e
+@@ -2093,26 +2202,15 @@ static int mtk_poll_tx(struct mtk_eth *e
  {
  	struct mtk_tx_ring *ring = &eth->tx_ring;
  	struct dim_sample dim_sample = {};
@@ -379,7 +379,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	dim_update_sample(eth->tx_events, eth->tx_packets, eth->tx_bytes,
  			  &dim_sample);
-@@ -2123,7 +2221,7 @@ static int mtk_poll_tx(struct mtk_eth *e
+@@ -2122,7 +2220,7 @@ static int mtk_poll_tx(struct mtk_eth *e
  	    (atomic_read(&ring->free_count) > ring->thresh))
  		mtk_wake_queue(eth);
  
@@ -388,7 +388,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  static void mtk_handle_status_irq(struct mtk_eth *eth)
-@@ -2209,6 +2307,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2208,6 +2306,7 @@ static int mtk_tx_alloc(struct mtk_eth *
  	int i, sz = soc->txrx.txd_size;
  	struct mtk_tx_dma_v2 *txd;
  	int ring_size;
@@ -396,7 +396,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (MTK_HAS_CAPS(soc->caps, MTK_QDMA))
  		ring_size = MTK_QDMA_RING_SIZE;
-@@ -2276,8 +2375,25 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2275,8 +2374,25 @@ static int mtk_tx_alloc(struct mtk_eth *
  			ring->phys + ((ring_size - 1) * sz),
  			soc->reg_map->qdma.crx_ptr);
  		mtk_w32(eth, ring->last_free_ptr, soc->reg_map->qdma.drx_ptr);
@@ -424,7 +424,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	} else {
  		mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0);
  		mtk_w32(eth, ring_size, MT7628_TX_MAX_CNT0);
-@@ -2962,7 +3078,7 @@ static int mtk_start_dma(struct mtk_eth
+@@ -2961,7 +3077,7 @@ static int mtk_start_dma(struct mtk_eth
  		if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2))
  			val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
  			       MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
@@ -433,7 +433,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		else
  			val |= MTK_RX_BT_32DWORDS;
  		mtk_w32(eth, val, reg_map->qdma.glo_cfg);
-@@ -3008,6 +3124,45 @@ static void mtk_gdm_config(struct mtk_et
+@@ -3007,6 +3123,45 @@ static void mtk_gdm_config(struct mtk_et
  	mtk_w32(eth, 0, MTK_RST_GL);
  }
  
@@ -479,7 +479,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static int mtk_open(struct net_device *dev)
  {
  	struct mtk_mac *mac = netdev_priv(dev);
-@@ -3050,7 +3205,8 @@ static int mtk_open(struct net_device *d
+@@ -3049,7 +3204,8 @@ static int mtk_open(struct net_device *d
  		refcount_inc(&eth->dma_refcnt);
  
  	phylink_start(mac->phylink);
@@ -489,7 +489,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	return 0;
  }
  
-@@ -3759,8 +3915,12 @@ static int mtk_unreg_dev(struct mtk_eth
+@@ -3758,8 +3914,12 @@ static int mtk_unreg_dev(struct mtk_eth
  	int i;
  
  	for (i = 0; i < MTK_MAC_COUNT; i++) {
@@ -502,7 +502,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		unregister_netdev(eth->netdev[i]);
  	}
  
-@@ -3977,6 +4137,23 @@ static int mtk_set_rxnfc(struct net_devi
+@@ -3976,6 +4136,23 @@ static int mtk_set_rxnfc(struct net_devi
  	return ret;
  }
  
@@ -526,7 +526,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static const struct ethtool_ops mtk_ethtool_ops = {
  	.get_link_ksettings	= mtk_get_link_ksettings,
  	.set_link_ksettings	= mtk_set_link_ksettings,
-@@ -4011,6 +4188,7 @@ static const struct net_device_ops mtk_n
+@@ -4010,6 +4187,7 @@ static const struct net_device_ops mtk_n
  	.ndo_setup_tc		= mtk_eth_setup_tc,
  	.ndo_bpf		= mtk_xdp,
  	.ndo_xdp_xmit		= mtk_xdp_xmit,
@@ -534,7 +534,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  };
  
  static int mtk_add_mac(struct mtk_eth *eth, struct device_node *np)
-@@ -4020,6 +4198,7 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4019,6 +4197,7 @@ static int mtk_add_mac(struct mtk_eth *e
  	struct phylink *phylink;
  	struct mtk_mac *mac;
  	int id, err;
@@ -542,7 +542,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (!_id) {
  		dev_err(eth->dev, "missing mac id\n");
-@@ -4037,7 +4216,10 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4036,7 +4215,10 @@ static int mtk_add_mac(struct mtk_eth *e
  		return -EINVAL;
  	}
  
@@ -554,7 +554,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (!eth->netdev[id]) {
  		dev_err(eth->dev, "alloc_etherdev failed\n");
  		return -ENOMEM;
-@@ -4145,6 +4327,11 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4144,6 +4326,11 @@ static int mtk_add_mac(struct mtk_eth *e
  	else
  		eth->netdev[id]->max_mtu = MTK_MAX_RX_LENGTH_2K - MTK_RX_ETH_HLEN;
  
diff --git a/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch b/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch
index b8e3452f30..53d8ff472e 100644
--- a/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch
+++ b/target/linux/generic/backport-6.1/730-09-v6.3-net-ethernet-mtk_eth_soc-fix-VLAN-rx-hardware-accele.patch
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  #include "mtk_eth_soc.h"
  #include "mtk_wed.h"
-@@ -2021,16 +2022,22 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2020,16 +2021,22 @@ static int mtk_poll_rx(struct napi_struc
  						htons(RX_DMA_VPID(trxd.rxd4)),
  						RX_DMA_VID(trxd.rxd4));
  			} else if (trxd.rxd2 & RX_DMA_VTAG) {
@@ -52,7 +52,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		}
  
  		skb_record_rx_queue(skb, 0);
-@@ -2858,15 +2865,30 @@ static netdev_features_t mtk_fix_feature
+@@ -2857,15 +2864,30 @@ static netdev_features_t mtk_fix_feature
  
  static int mtk_set_features(struct net_device *dev, netdev_features_t features)
  {
@@ -88,7 +88,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  /* wait for DMA to finish whatever it is doing before we start using it again */
-@@ -3163,11 +3185,45 @@ found:
+@@ -3162,11 +3184,45 @@ found:
  	return NOTIFY_DONE;
  }
  
@@ -135,7 +135,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
  	if (err) {
-@@ -3688,6 +3744,10 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3687,6 +3743,10 @@ static int mtk_hw_init(struct mtk_eth *e
  	 */
  	val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
  	mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@@ -146,7 +146,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	/* Enable RX VLan Offloading */
  	mtk_w32(eth, 1, MTK_CDMP_EG_CTRL);
-@@ -3907,6 +3967,12 @@ static int mtk_free_dev(struct mtk_eth *
+@@ -3906,6 +3966,12 @@ static int mtk_free_dev(struct mtk_eth *
  		free_netdev(eth->netdev[i]);
  	}
  
diff --git a/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch b/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch
index a88df2b8e3..08d72fc820 100644
--- a/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch
+++ b/target/linux/generic/backport-6.1/730-12-v6.3-net-ethernet-mtk_eth_soc-disable-hardware-DSA-untagg.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3201,7 +3201,8 @@ static int mtk_open(struct net_device *d
+@@ -3200,7 +3200,8 @@ static int mtk_open(struct net_device *d
  	struct mtk_eth *eth = mac->hw;
  	int i, err;
  
@@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
  			struct metadata_dst *md_dst = eth->dsa_meta[i];
  
-@@ -3218,7 +3219,8 @@ static int mtk_open(struct net_device *d
+@@ -3217,7 +3218,8 @@ static int mtk_open(struct net_device *d
  		}
  	} else {
  		/* Hardware special tag parsing needs to be disabled if at least
diff --git a/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch b/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch
index 8da728b9e9..30c32d5cce 100644
--- a/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch
+++ b/target/linux/generic/backport-6.1/730-13-v6.3-net-ethernet-mtk_eth_soc-enable-special-tag-when-any.patch
@@ -23,7 +23,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3136,7 +3136,7 @@ static void mtk_gdm_config(struct mtk_et
+@@ -3135,7 +3135,7 @@ static void mtk_gdm_config(struct mtk_et
  
  		val |= config;
  
@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			val |= MTK_GDMA_SPECIAL_TAG;
  
  		mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));
-@@ -3201,8 +3201,7 @@ static int mtk_open(struct net_device *d
+@@ -3200,8 +3200,7 @@ static int mtk_open(struct net_device *d
  	struct mtk_eth *eth = mac->hw;
  	int i, err;
  
@@ -42,7 +42,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		for (i = 0; i < ARRAY_SIZE(eth->dsa_meta); i++) {
  			struct metadata_dst *md_dst = eth->dsa_meta[i];
  
-@@ -3219,8 +3218,7 @@ static int mtk_open(struct net_device *d
+@@ -3218,8 +3217,7 @@ static int mtk_open(struct net_device *d
  		}
  	} else {
  		/* Hardware special tag parsing needs to be disabled if at least
diff --git a/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch b/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch
index 51cd572ab2..eb3b0c63bc 100644
--- a/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch
+++ b/target/linux/generic/backport-6.1/730-14-v6.3-net-ethernet-mtk_eth_soc-fix-DSA-TX-tag-hwaccel-for-.patch
@@ -77,7 +77,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1877,7 +1877,9 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1876,7 +1876,9 @@ static int mtk_poll_rx(struct napi_struc
  
  	while (done < budget) {
  		unsigned int pktlen, *rxdcsum;
@@ -87,7 +87,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		dma_addr_t dma_addr;
  		u32 hash, reason;
  		int mac = 0;
-@@ -2017,27 +2019,29 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2016,27 +2018,29 @@ static int mtk_poll_rx(struct napi_struc
  
  		if (netdev->features & NETIF_F_HW_VLAN_CTAG_RX) {
  			if (MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
diff --git a/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch b/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch
index ca5b6b3a3e..f6d91d3080 100644
--- a/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch
+++ b/target/linux/generic/backport-6.1/730-18-v6.3-net-ethernet-mtk_eth_soc-fix-tx-throughput-regressio.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -719,8 +719,6 @@ static void mtk_mac_link_up(struct phyli
+@@ -718,8 +718,6 @@ static void mtk_mac_link_up(struct phyli
  		break;
  	}
  
diff --git a/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch b/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch
index a1247218b0..3f3f73183e 100644
--- a/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch
+++ b/target/linux/generic/backport-6.1/733-v6.3-18-net-ethernet-mtk_eth_soc-add-support-for-MT7981.patch
@@ -57,7 +57,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		mtk_eth_path_name(path), __func__, updated);
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4803,6 +4803,26 @@ static const struct mtk_soc_data mt7629_
+@@ -4802,6 +4802,26 @@ static const struct mtk_soc_data mt7629_
  	},
  };
  
@@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static const struct mtk_soc_data mt7986_data = {
  	.reg_map = &mt7986_reg_map,
  	.ana_rgc3 = 0x128,
-@@ -4845,6 +4865,7 @@ const struct of_device_id of_mtk_match[]
+@@ -4844,6 +4864,7 @@ const struct of_device_id of_mtk_match[]
  	{ .compatible = "mediatek,mt7622-eth", .data = &mt7622_data},
  	{ .compatible = "mediatek,mt7623-eth", .data = &mt7623_data},
  	{ .compatible = "mediatek,mt7629-eth", .data = &mt7629_data},
diff --git a/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch b/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch
index 1cb1f40538..c60a4337ef 100644
--- a/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch
+++ b/target/linux/generic/backport-6.1/733-v6.3-19-net-ethernet-mtk_eth_soc-set-MDIO-bus-clock-frequenc.patch
@@ -21,7 +21,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -744,8 +744,10 @@ static const struct phylink_mac_ops mtk_
+@@ -743,8 +743,10 @@ static const struct phylink_mac_ops mtk_
  
  static int mtk_mdio_init(struct mtk_eth *eth)
  {
@@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	mii_np = of_get_child_by_name(eth->dev->of_node, "mdio-bus");
  	if (!mii_np) {
-@@ -772,6 +774,25 @@ static int mtk_mdio_init(struct mtk_eth
+@@ -771,6 +773,25 @@ static int mtk_mdio_init(struct mtk_eth
  	eth->mii_bus->parent = eth->dev;
  
  	snprintf(eth->mii_bus->id, MII_BUS_ID_SIZE, "%pOFn", mii_np);
diff --git a/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch b/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch
index 110944658d..d73eccedbb 100644
--- a/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch
+++ b/target/linux/generic/backport-6.1/733-v6.3-20-net-ethernet-mtk_eth_soc-switch-to-external-PCS-driv.patch
@@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	return NULL;
-@@ -4016,8 +4017,17 @@ static int mtk_unreg_dev(struct mtk_eth
+@@ -4015,8 +4016,17 @@ static int mtk_unreg_dev(struct mtk_eth
  	return 0;
  }
  
@@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	mtk_unreg_dev(eth);
  	mtk_free_dev(eth);
  	cancel_work_sync(&eth->pending_work);
-@@ -4457,6 +4467,36 @@ void mtk_eth_set_dma_device(struct mtk_e
+@@ -4456,6 +4466,36 @@ void mtk_eth_set_dma_device(struct mtk_e
  	rtnl_unlock();
  }
  
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int mtk_probe(struct platform_device *pdev)
  {
  	struct resource *res = NULL;
-@@ -4520,13 +4560,7 @@ static int mtk_probe(struct platform_dev
+@@ -4519,13 +4559,7 @@ static int mtk_probe(struct platform_dev
  	}
  
  	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SGMII)) {
@@ -130,7 +130,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  		if (err)
  			return err;
-@@ -4537,14 +4571,17 @@ static int mtk_probe(struct platform_dev
+@@ -4536,14 +4570,17 @@ static int mtk_probe(struct platform_dev
  							    "mediatek,pctl");
  		if (IS_ERR(eth->pctl)) {
  			dev_err(&pdev->dev, "no pctl regmap found\n");
@@ -151,7 +151,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	if (eth->soc->offload_version) {
-@@ -4703,6 +4740,8 @@ err_deinit_hw:
+@@ -4702,6 +4739,8 @@ err_deinit_hw:
  	mtk_hw_deinit(eth);
  err_wed_exit:
  	mtk_wed_exit();
diff --git a/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch b/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch
index 93eaffa19e..5c3de57591 100644
--- a/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch
+++ b/target/linux/generic/backport-6.1/733-v6.4-23-net-ethernet-mtk_eth_soc-ppe-add-support-for-flow-ac.patch
@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4691,8 +4691,8 @@ static int mtk_probe(struct platform_dev
+@@ -4690,8 +4690,8 @@ static int mtk_probe(struct platform_dev
  		for (i = 0; i < num_ppe; i++) {
  			u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
  
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			if (!eth->ppe[i]) {
  				err = -ENOMEM;
  				goto err_deinit_ppe;
-@@ -4816,6 +4816,7 @@ static const struct mtk_soc_data mt7622_
+@@ -4815,6 +4815,7 @@ static const struct mtk_soc_data mt7622_
  	.required_pctl = false,
  	.offload_version = 2,
  	.hash_offset = 2,
@@ -46,7 +46,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.foe_entry_size = sizeof(struct mtk_foe_entry) - 16,
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma),
-@@ -4853,6 +4854,7 @@ static const struct mtk_soc_data mt7629_
+@@ -4852,6 +4853,7 @@ static const struct mtk_soc_data mt7629_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7629_CLKS_BITMAP,
  	.required_pctl = false,
@@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma),
  		.rxd_size = sizeof(struct mtk_rx_dma),
-@@ -4873,6 +4875,7 @@ static const struct mtk_soc_data mt7981_
+@@ -4872,6 +4874,7 @@ static const struct mtk_soc_data mt7981_
  	.offload_version = 2,
  	.hash_offset = 4,
  	.foe_entry_size = sizeof(struct mtk_foe_entry),
@@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma_v2),
  		.rxd_size = sizeof(struct mtk_rx_dma_v2),
-@@ -4893,6 +4896,7 @@ static const struct mtk_soc_data mt7986_
+@@ -4892,6 +4895,7 @@ static const struct mtk_soc_data mt7986_
  	.offload_version = 2,
  	.hash_offset = 4,
  	.foe_entry_size = sizeof(struct mtk_foe_entry),
diff --git a/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch b/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch
index 217e517c3a..7e3d5a3308 100644
--- a/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch
+++ b/target/linux/generic/backport-6.1/733-v6.4-25-net-ethernet-mtk_eth_soc-drop-generic-vlan-rx-offloa.patch
@@ -17,7 +17,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1897,9 +1897,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1896,9 +1896,7 @@ static int mtk_poll_rx(struct napi_struc
  
  	while (done < budget) {
  		unsigned int pktlen, *rxdcsum;
@@ -27,7 +27,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		dma_addr_t dma_addr;
  		u32 hash, reason;
  		int mac = 0;
-@@ -2034,36 +2032,21 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2033,36 +2031,21 @@ static int mtk_poll_rx(struct napi_struc
  			skb_checksum_none_assert(skb);
  		skb->protocol = eth_type_trans(skb, netdev);
  
@@ -70,7 +70,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		skb_record_rx_queue(skb, 0);
  		napi_gro_receive(napi, skb);
  
-@@ -2889,29 +2872,11 @@ static netdev_features_t mtk_fix_feature
+@@ -2888,29 +2871,11 @@ static netdev_features_t mtk_fix_feature
  
  static int mtk_set_features(struct net_device *dev, netdev_features_t features)
  {
@@ -100,7 +100,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	return 0;
  }
  
-@@ -3225,30 +3190,6 @@ static int mtk_open(struct net_device *d
+@@ -3224,30 +3189,6 @@ static int mtk_open(struct net_device *d
  	struct mtk_eth *eth = mac->hw;
  	int i, err;
  
@@ -131,7 +131,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	err = phylink_of_phy_connect(mac->phylink, mac->of_node, 0);
  	if (err) {
  		netdev_err(dev, "%s: could not attach PHY: %d\n", __func__,
-@@ -3287,6 +3228,35 @@ static int mtk_open(struct net_device *d
+@@ -3286,6 +3227,35 @@ static int mtk_open(struct net_device *d
  	phylink_start(mac->phylink);
  	netif_tx_start_all_queues(dev);
  
@@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	return 0;
  }
  
-@@ -3771,10 +3741,9 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3770,10 +3740,9 @@ static int mtk_hw_init(struct mtk_eth *e
  	if (!MTK_HAS_CAPS(eth->soc->caps, MTK_NETSYS_V2)) {
  		val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
  		mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
@@ -180,7 +180,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	/* set interrupt delays based on current Net DIM sample */
  	mtk_dim_rx(&eth->rx_dim.work);
-@@ -4414,7 +4383,7 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4413,7 +4382,7 @@ static int mtk_add_mac(struct mtk_eth *e
  		eth->netdev[id]->hw_features |= NETIF_F_LRO;
  
  	eth->netdev[id]->vlan_features = eth->soc->hw_features &
diff --git a/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch b/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch
index d7d1c08fce..afce0cf04c 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-01-net-ethernet-mtk_ppe-add-MTK_FOE_ENTRY_V-1-2-_SIZE-m.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4765,7 +4765,7 @@ static const struct mtk_soc_data mt7621_
+@@ -4764,7 +4764,7 @@ static const struct mtk_soc_data mt7621_
  	.required_pctl = false,
  	.offload_version = 1,
  	.hash_offset = 2,
@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma),
  		.rxd_size = sizeof(struct mtk_rx_dma),
-@@ -4786,7 +4786,7 @@ static const struct mtk_soc_data mt7622_
+@@ -4785,7 +4785,7 @@ static const struct mtk_soc_data mt7622_
  	.offload_version = 2,
  	.hash_offset = 2,
  	.has_accounting = true,
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma),
  		.rxd_size = sizeof(struct mtk_rx_dma),
-@@ -4805,7 +4805,7 @@ static const struct mtk_soc_data mt7623_
+@@ -4804,7 +4804,7 @@ static const struct mtk_soc_data mt7623_
  	.required_pctl = true,
  	.offload_version = 1,
  	.hash_offset = 2,
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma),
  		.rxd_size = sizeof(struct mtk_rx_dma),
-@@ -4843,8 +4843,8 @@ static const struct mtk_soc_data mt7981_
+@@ -4842,8 +4842,8 @@ static const struct mtk_soc_data mt7981_
  	.required_pctl = false,
  	.offload_version = 2,
  	.hash_offset = 4,
@@ -54,7 +54,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma_v2),
  		.rxd_size = sizeof(struct mtk_rx_dma_v2),
-@@ -4864,8 +4864,8 @@ static const struct mtk_soc_data mt7986_
+@@ -4863,8 +4863,8 @@ static const struct mtk_soc_data mt7986_
  	.required_pctl = false,
  	.offload_version = 2,
  	.hash_offset = 4,
diff --git a/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch b/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch
index fb54f404b2..28bf2b6d5f 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-02-net-ethernet-mtk_eth_soc-remove-incorrect-PLL-config.patch
@@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  				/* mt7623_pad_clk_setup */
  				for (i = 0 ; i < NUM_TRGMII_CTRL; i++)
-@@ -4342,13 +4314,19 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4341,13 +4313,19 @@ static int mtk_add_mac(struct mtk_eth *e
  	mac->phylink_config.mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  		MAC_10 | MAC_100 | MAC_1000 | MAC_2500FD;
  
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (MTK_HAS_CAPS(mac->hw->soc->caps, MTK_TRGMII) && !mac->id)
  		__set_bit(PHY_INTERFACE_MODE_TRGMII,
-@@ -4806,6 +4784,7 @@ static const struct mtk_soc_data mt7623_
+@@ -4805,6 +4783,7 @@ static const struct mtk_soc_data mt7623_
  	.offload_version = 1,
  	.hash_offset = 2,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
diff --git a/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch b/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch
index 293066fa9a..fd458a67bc 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-03-net-ethernet-mtk_eth_soc-remove-mac_pcs_get_state-an.patch
@@ -23,7 +23,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -555,38 +555,6 @@ static int mtk_mac_finish(struct phylink
+@@ -554,38 +554,6 @@ static int mtk_mac_finish(struct phylink
  	return 0;
  }
  
@@ -62,7 +62,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mtk_mac_link_down(struct phylink_config *config, unsigned int mode,
  			      phy_interface_t interface)
  {
-@@ -708,7 +676,6 @@ static void mtk_mac_link_up(struct phyli
+@@ -707,7 +675,6 @@ static void mtk_mac_link_up(struct phyli
  
  static const struct phylink_mac_ops mtk_phylink_ops = {
  	.mac_select_pcs = mtk_mac_select_pcs,
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	.mac_config = mtk_mac_config,
  	.mac_finish = mtk_mac_finish,
  	.mac_link_down = mtk_mac_link_down,
-@@ -4309,8 +4276,6 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4308,8 +4275,6 @@ static int mtk_add_mac(struct mtk_eth *e
  
  	mac->phylink_config.dev = &eth->netdev[id]->dev;
  	mac->phylink_config.type = PHYLINK_NETDEV;
diff --git a/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch b/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch
index 25c87b0415..aa259e7175 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-05-net-ethernet-mtk_eth_soc-add-version-in-mtk_soc_data.patch
@@ -23,7 +23,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -580,7 +580,7 @@ static void mtk_set_queue_speed(struct m
+@@ -579,7 +579,7 @@ static void mtk_set_queue_speed(struct m
  	      FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) |
  	      FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) |
  	      MTK_QTX_SCH_LEAKY_BUCKET_SIZE;
@@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		val |= MTK_QTX_SCH_LEAKY_BUCKET_EN;
  
  	if (IS_ENABLED(CONFIG_SOC_MT7621)) {
-@@ -955,7 +955,7 @@ static bool mtk_rx_get_desc(struct mtk_e
+@@ -954,7 +954,7 @@ static bool mtk_rx_get_desc(struct mtk_e
  	rxd->rxd1 = READ_ONCE(dma_rxd->rxd1);
  	rxd->rxd3 = READ_ONCE(dma_rxd->rxd3);
  	rxd->rxd4 = READ_ONCE(dma_rxd->rxd4);
@@ -41,7 +41,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		rxd->rxd5 = READ_ONCE(dma_rxd->rxd5);
  		rxd->rxd6 = READ_ONCE(dma_rxd->rxd6);
  	}
-@@ -1013,7 +1013,7 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -1012,7 +1012,7 @@ static int mtk_init_fq_dma(struct mtk_et
  
  		txd->txd3 = TX_DMA_PLEN0(MTK_QDMA_PAGE_SIZE);
  		txd->txd4 = 0;
@@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			txd->txd5 = 0;
  			txd->txd6 = 0;
  			txd->txd7 = 0;
-@@ -1204,7 +1204,7 @@ static void mtk_tx_set_dma_desc(struct n
+@@ -1203,7 +1203,7 @@ static void mtk_tx_set_dma_desc(struct n
  	struct mtk_mac *mac = netdev_priv(dev);
  	struct mtk_eth *eth = mac->hw;
  
@@ -59,7 +59,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		mtk_tx_set_dma_desc_v2(dev, txd, info);
  	else
  		mtk_tx_set_dma_desc_v1(dev, txd, info);
-@@ -1511,7 +1511,7 @@ static void mtk_update_rx_cpu_idx(struct
+@@ -1510,7 +1510,7 @@ static void mtk_update_rx_cpu_idx(struct
  
  static bool mtk_page_pool_enabled(struct mtk_eth *eth)
  {
@@ -68,7 +68,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
  
  static struct page_pool *mtk_create_page_pool(struct mtk_eth *eth,
-@@ -1853,7 +1853,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1852,7 +1852,7 @@ static int mtk_poll_rx(struct napi_struc
  			break;
  
  		/* find out which mac the packet come from. values start at 1 */
@@ -77,7 +77,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			mac = RX_DMA_GET_SPORT_V2(trxd.rxd5) - 1;
  		else if (!MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628) &&
  			 !(trxd.rxd4 & RX_DMA_SPECIAL_TAG))
-@@ -1949,7 +1949,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1948,7 +1948,7 @@ static int mtk_poll_rx(struct napi_struc
  		skb->dev = netdev;
  		bytes += skb->len;
  
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			reason = FIELD_GET(MTK_RXD5_PPE_CPU_REASON, trxd.rxd5);
  			hash = trxd.rxd5 & MTK_RXD5_FOE_ENTRY;
  			if (hash != MTK_RXD5_FOE_ENTRY)
-@@ -1974,8 +1974,8 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1973,8 +1973,8 @@ static int mtk_poll_rx(struct napi_struc
  		/* When using VLAN untagging in combination with DSA, the
  		 * hardware treats the MTK special tag as a VLAN and untags it.
  		 */
@@ -97,7 +97,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			unsigned int port = RX_DMA_VPID(trxd.rxd3) & GENMASK(2, 0);
  
  			if (port < ARRAY_SIZE(eth->dsa_meta) &&
-@@ -2285,7 +2285,7 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2284,7 +2284,7 @@ static int mtk_tx_alloc(struct mtk_eth *
  		txd->txd2 = next_ptr;
  		txd->txd3 = TX_DMA_LS0 | TX_DMA_OWNER_CPU;
  		txd->txd4 = 0;
@@ -106,7 +106,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			txd->txd5 = 0;
  			txd->txd6 = 0;
  			txd->txd7 = 0;
-@@ -2338,14 +2338,14 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2337,14 +2337,14 @@ static int mtk_tx_alloc(struct mtk_eth *
  			      FIELD_PREP(MTK_QTX_SCH_MIN_RATE_MAN, 1) |
  			      FIELD_PREP(MTK_QTX_SCH_MIN_RATE_EXP, 4) |
  			      MTK_QTX_SCH_LEAKY_BUCKET_SIZE;
@@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			mtk_w32(eth, val, soc->reg_map->qdma.tx_sch_rate + 4);
  	} else {
  		mtk_w32(eth, ring->phys_pdma, MT7628_TX_BASE_PTR0);
-@@ -2474,7 +2474,7 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2473,7 +2473,7 @@ static int mtk_rx_alloc(struct mtk_eth *
  
  		rxd->rxd3 = 0;
  		rxd->rxd4 = 0;
@@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			rxd->rxd5 = 0;
  			rxd->rxd6 = 0;
  			rxd->rxd7 = 0;
-@@ -3025,7 +3025,7 @@ static int mtk_start_dma(struct mtk_eth
+@@ -3024,7 +3024,7 @@ static int mtk_start_dma(struct mtk_eth
  		       MTK_TX_BT_32DWORDS | MTK_NDP_CO_PRO |
  		       MTK_RX_2B_OFFSET | MTK_TX_WB_DDONE;
  
@@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			val |= MTK_MUTLI_CNT | MTK_RESV_BUF |
  			       MTK_WCOMP_EN | MTK_DMAD_WR_WDONE |
  			       MTK_CHK_DDONE_EN | MTK_LEAKY_BUCKET_EN;
-@@ -3167,7 +3167,7 @@ static int mtk_open(struct net_device *d
+@@ -3166,7 +3166,7 @@ static int mtk_open(struct net_device *d
  	phylink_start(mac->phylink);
  	netif_tx_start_all_queues(dev);
  
@@ -150,7 +150,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		return 0;
  
  	if (mtk_uses_dsa(dev) && !eth->prog) {
-@@ -3432,7 +3432,7 @@ static void mtk_hw_reset(struct mtk_eth
+@@ -3431,7 +3431,7 @@ static void mtk_hw_reset(struct mtk_eth
  {
  	u32 val;
  
@@ -159,7 +159,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN, 0);
  		val = RSTCTRL_PPE0_V2;
  	} else {
-@@ -3444,7 +3444,7 @@ static void mtk_hw_reset(struct mtk_eth
+@@ -3443,7 +3443,7 @@ static void mtk_hw_reset(struct mtk_eth
  
  	ethsys_reset(eth, RSTCTRL_ETH | RSTCTRL_FE | val);
  
@@ -168,7 +168,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
  			     0x3ffffff);
  }
-@@ -3470,7 +3470,7 @@ static void mtk_hw_warm_reset(struct mtk
+@@ -3469,7 +3469,7 @@ static void mtk_hw_warm_reset(struct mtk
  		return;
  	}
  
@@ -177,7 +177,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0_V2;
  	else
  		rst_mask = RSTCTRL_ETH | RSTCTRL_PPE0;
-@@ -3640,7 +3640,7 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3639,7 +3639,7 @@ static int mtk_hw_init(struct mtk_eth *e
  	else
  		mtk_hw_reset(eth);
  
@@ -186,7 +186,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		/* Set FE to PDMAv2 if necessary */
  		val = mtk_r32(eth, MTK_FE_GLO_MISC);
  		mtk_w32(eth,  val | BIT(4), MTK_FE_GLO_MISC);
-@@ -3677,7 +3677,7 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3676,7 +3676,7 @@ static int mtk_hw_init(struct mtk_eth *e
  	 */
  	val = mtk_r32(eth, MTK_CDMQ_IG_CTRL);
  	mtk_w32(eth, val | MTK_CDMQ_STAG_EN, MTK_CDMQ_IG_CTRL);
@@ -195,7 +195,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		val = mtk_r32(eth, MTK_CDMP_IG_CTRL);
  		mtk_w32(eth, val | MTK_CDMP_STAG_EN, MTK_CDMP_IG_CTRL);
  
-@@ -3699,7 +3699,7 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3698,7 +3698,7 @@ static int mtk_hw_init(struct mtk_eth *e
  	mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4);
  	mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
  
@@ -204,7 +204,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		/* PSE should not drop port8 and port9 packets from WDMA Tx */
  		mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
  
-@@ -4488,7 +4488,7 @@ static int mtk_probe(struct platform_dev
+@@ -4487,7 +4487,7 @@ static int mtk_probe(struct platform_dev
  		}
  	}
  
@@ -213,7 +213,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		res = platform_get_resource(pdev, IORESOURCE_MEM, 0);
  		if (!res) {
  			err = -EINVAL;
-@@ -4596,9 +4596,8 @@ static int mtk_probe(struct platform_dev
+@@ -4595,9 +4595,8 @@ static int mtk_probe(struct platform_dev
  	}
  
  	if (eth->soc->offload_version) {
@@ -224,7 +224,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		num_ppe = min_t(u32, ARRAY_SIZE(eth->ppe), num_ppe);
  		for (i = 0; i < num_ppe; i++) {
  			u32 ppe_addr = eth->soc->reg_map->ppe_base + i * 0x400;
-@@ -4690,6 +4689,7 @@ static const struct mtk_soc_data mt2701_
+@@ -4689,6 +4688,7 @@ static const struct mtk_soc_data mt2701_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7623_CLKS_BITMAP,
  	.required_pctl = true,
@@ -232,7 +232,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma),
  		.rxd_size = sizeof(struct mtk_rx_dma),
-@@ -4706,6 +4706,7 @@ static const struct mtk_soc_data mt7621_
+@@ -4705,6 +4705,7 @@ static const struct mtk_soc_data mt7621_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7621_CLKS_BITMAP,
  	.required_pctl = false,
@@ -240,7 +240,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.offload_version = 1,
  	.hash_offset = 2,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
-@@ -4726,6 +4727,7 @@ static const struct mtk_soc_data mt7622_
+@@ -4725,6 +4726,7 @@ static const struct mtk_soc_data mt7622_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7622_CLKS_BITMAP,
  	.required_pctl = false,
@@ -248,7 +248,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.offload_version = 2,
  	.hash_offset = 2,
  	.has_accounting = true,
-@@ -4746,6 +4748,7 @@ static const struct mtk_soc_data mt7623_
+@@ -4745,6 +4747,7 @@ static const struct mtk_soc_data mt7623_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7623_CLKS_BITMAP,
  	.required_pctl = true,
@@ -256,7 +256,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.offload_version = 1,
  	.hash_offset = 2,
  	.foe_entry_size = MTK_FOE_ENTRY_V1_SIZE,
-@@ -4768,6 +4771,7 @@ static const struct mtk_soc_data mt7629_
+@@ -4767,6 +4770,7 @@ static const struct mtk_soc_data mt7629_
  	.required_clks = MT7629_CLKS_BITMAP,
  	.required_pctl = false,
  	.has_accounting = true,
@@ -264,7 +264,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.txrx = {
  		.txd_size = sizeof(struct mtk_tx_dma),
  		.rxd_size = sizeof(struct mtk_rx_dma),
-@@ -4785,6 +4789,7 @@ static const struct mtk_soc_data mt7981_
+@@ -4784,6 +4788,7 @@ static const struct mtk_soc_data mt7981_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7981_CLKS_BITMAP,
  	.required_pctl = false,
@@ -272,7 +272,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.offload_version = 2,
  	.hash_offset = 4,
  	.has_accounting = true,
-@@ -4806,6 +4811,7 @@ static const struct mtk_soc_data mt7986_
+@@ -4805,6 +4810,7 @@ static const struct mtk_soc_data mt7986_
  	.hw_features = MTK_HW_FEATURES,
  	.required_clks = MT7986_CLKS_BITMAP,
  	.required_pctl = false,
@@ -280,7 +280,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	.offload_version = 2,
  	.hash_offset = 4,
  	.has_accounting = true,
-@@ -4826,6 +4832,7 @@ static const struct mtk_soc_data rt5350_
+@@ -4825,6 +4831,7 @@ static const struct mtk_soc_data rt5350_
  	.hw_features = MTK_HW_FEATURES_MT7628,
  	.required_clks = MT7628_CLKS_BITMAP,
  	.required_pctl = false,
@@ -491,7 +491,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		else
  			val = MTK_FOE_IB2_MIB_CNT;
 @@ -965,7 +965,7 @@ void mtk_ppe_start(struct mtk_ppe *ppe)
- 			 MTK_PPE_SCAN_MODE_KEEPALIVE_AGE) |
+ 			 MTK_PPE_SCAN_MODE_CHECK_AGE) |
  	      FIELD_PREP(MTK_PPE_TB_CFG_ENTRY_NUM,
  			 MTK_PPE_ENTRIES_SHIFT);
 -	if (MTK_HAS_CAPS(ppe->eth->soc->caps, MTK_NETSYS_V2))
diff --git a/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch b/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch
index 8071658313..3db23f7897 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-07-net-ethernet-mtk_eth_soc-rely-on-MTK_MAX_DEVS-and-re.patch
@@ -17,7 +17,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -881,7 +881,7 @@ static void mtk_stats_update(struct mtk_
+@@ -880,7 +880,7 @@ static void mtk_stats_update(struct mtk_
  {
  	int i;
  
@@ -26,7 +26,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (!eth->mac[i] || !eth->mac[i]->hw_stats)
  			continue;
  		if (spin_trylock(&eth->mac[i]->hw_stats->stats_lock)) {
-@@ -1386,7 +1386,7 @@ static int mtk_queue_stopped(struct mtk_
+@@ -1385,7 +1385,7 @@ static int mtk_queue_stopped(struct mtk_
  {
  	int i;
  
@@ -35,7 +35,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (!eth->netdev[i])
  			continue;
  		if (netif_queue_stopped(eth->netdev[i]))
-@@ -1400,7 +1400,7 @@ static void mtk_wake_queue(struct mtk_et
+@@ -1399,7 +1399,7 @@ static void mtk_wake_queue(struct mtk_et
  {
  	int i;
  
@@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (!eth->netdev[i])
  			continue;
  		netif_tx_wake_all_queues(eth->netdev[i]);
-@@ -1859,7 +1859,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1858,7 +1858,7 @@ static int mtk_poll_rx(struct napi_struc
  			 !(trxd.rxd4 & RX_DMA_SPECIAL_TAG))
  			mac = RX_DMA_GET_SPORT(trxd.rxd4) - 1;
  
@@ -53,7 +53,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			     !eth->netdev[mac]))
  			goto release_desc;
  
-@@ -2899,7 +2899,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -2898,7 +2898,7 @@ static void mtk_dma_free(struct mtk_eth
  	const struct mtk_soc_data *soc = eth->soc;
  	int i;
  
@@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (eth->netdev[i])
  			netdev_reset_queue(eth->netdev[i]);
  	if (eth->scratch_ring) {
-@@ -3053,8 +3053,13 @@ static void mtk_gdm_config(struct mtk_et
+@@ -3052,8 +3052,13 @@ static void mtk_gdm_config(struct mtk_et
  	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
  		return;
  
@@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  		/* default setup the forward port to send frame to PDMA */
  		val &= ~0xffff;
-@@ -3064,7 +3069,7 @@ static void mtk_gdm_config(struct mtk_et
+@@ -3063,7 +3068,7 @@ static void mtk_gdm_config(struct mtk_et
  
  		val |= config;
  
@@ -87,7 +87,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			val |= MTK_GDMA_SPECIAL_TAG;
  
  		mtk_w32(eth, val, MTK_GDMA_FWD_CFG(i));
-@@ -3661,15 +3666,15 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3660,15 +3665,15 @@ static int mtk_hw_init(struct mtk_eth *e
  	 * up with the more appropriate value when mtk_mac_config call is being
  	 * invoked.
  	 */
@@ -109,7 +109,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	/* Indicates CDM to parse the MTK special tag from CPU
-@@ -3849,7 +3854,7 @@ static void mtk_pending_work(struct work
+@@ -3848,7 +3853,7 @@ static void mtk_pending_work(struct work
  	mtk_prepare_for_reset(eth);
  
  	/* stop all devices to make sure that dma is properly shut down */
@@ -118,7 +118,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (!eth->netdev[i] || !netif_running(eth->netdev[i]))
  			continue;
  
-@@ -3865,8 +3870,8 @@ static void mtk_pending_work(struct work
+@@ -3864,8 +3869,8 @@ static void mtk_pending_work(struct work
  	mtk_hw_init(eth, true);
  
  	/* restart DMA and enable IRQs */
@@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			continue;
  
  		if (mtk_open(eth->netdev[i])) {
-@@ -3893,7 +3898,7 @@ static int mtk_free_dev(struct mtk_eth *
+@@ -3892,7 +3897,7 @@ static int mtk_free_dev(struct mtk_eth *
  {
  	int i;
  
@@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (!eth->netdev[i])
  			continue;
  		free_netdev(eth->netdev[i]);
-@@ -3912,7 +3917,7 @@ static int mtk_unreg_dev(struct mtk_eth
+@@ -3911,7 +3916,7 @@ static int mtk_unreg_dev(struct mtk_eth
  {
  	int i;
  
@@ -147,7 +147,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		struct mtk_mac *mac;
  		if (!eth->netdev[i])
  			continue;
-@@ -4213,7 +4218,7 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4212,7 +4217,7 @@ static int mtk_add_mac(struct mtk_eth *e
  	}
  
  	id = be32_to_cpup(_id);
@@ -156,7 +156,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dev_err(eth->dev, "%d is not a valid mac id\n", id);
  		return -EINVAL;
  	}
-@@ -4358,7 +4363,7 @@ void mtk_eth_set_dma_device(struct mtk_e
+@@ -4357,7 +4362,7 @@ void mtk_eth_set_dma_device(struct mtk_e
  
  	rtnl_lock();
  
@@ -165,7 +165,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dev = eth->netdev[i];
  
  		if (!dev || !(dev->flags & IFF_UP))
-@@ -4664,7 +4669,7 @@ static int mtk_remove(struct platform_de
+@@ -4663,7 +4668,7 @@ static int mtk_remove(struct platform_de
  	int i;
  
  	/* stop all devices to make sure that dma is properly shut down */
diff --git a/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch b/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch
index 1a9b31f526..e40dc3d0a9 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-08-net-ethernet-mtk_eth_soc-add-NETSYS_V3-version-suppo.patch
@@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -861,17 +861,32 @@ void mtk_stats_update_mac(struct mtk_mac
+@@ -860,17 +860,32 @@ void mtk_stats_update_mac(struct mtk_mac
  			mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x20 + offs);
  		hw_stats->rx_flow_control_packets +=
  			mtk_r32(mac->hw, reg_map->gdm1_cnt + 0x24 + offs);
@@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	u64_stats_update_end(&hw_stats->syncp);
-@@ -1175,7 +1190,10 @@ static void mtk_tx_set_dma_desc_v2(struc
+@@ -1174,7 +1189,10 @@ static void mtk_tx_set_dma_desc_v2(struc
  		data |= TX_DMA_LS0;
  	WRITE_ONCE(desc->txd3, data);
  
@@ -74,7 +74,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
  	WRITE_ONCE(desc->txd4, data);
  
-@@ -1186,6 +1204,8 @@ static void mtk_tx_set_dma_desc_v2(struc
+@@ -1185,6 +1203,8 @@ static void mtk_tx_set_dma_desc_v2(struc
  		/* tx checksum offload */
  		if (info->csum)
  			data |= TX_DMA_CHKSUM_V2;
@@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  	WRITE_ONCE(desc->txd5, data);
  
-@@ -1251,8 +1271,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1250,8 +1270,7 @@ static int mtk_tx_map(struct sk_buff *sk
  	mtk_tx_set_dma_desc(dev, itxd, &txd_info);
  
  	itx_buf->flags |= MTK_TX_FLAGS_SINGLE0;
@@ -93,7 +93,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	setup_tx_buf(eth, itx_buf, itxd_pdma, txd_info.addr, txd_info.size,
  		     k++);
  
-@@ -1300,8 +1319,7 @@ static int mtk_tx_map(struct sk_buff *sk
+@@ -1299,8 +1318,7 @@ static int mtk_tx_map(struct sk_buff *sk
  				memset(tx_buf, 0, sizeof(*tx_buf));
  			tx_buf->data = (void *)MTK_DMA_DUMMY_DESC;
  			tx_buf->flags |= MTK_TX_FLAGS_PAGE0;
@@ -103,7 +103,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  			setup_tx_buf(eth, tx_buf, txd_pdma, txd_info.addr,
  				     txd_info.size, k++);
-@@ -1603,7 +1621,7 @@ static int mtk_xdp_frame_map(struct mtk_
+@@ -1602,7 +1620,7 @@ static int mtk_xdp_frame_map(struct mtk_
  	}
  	mtk_tx_set_dma_desc(dev, txd, txd_info);
  
@@ -112,7 +112,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	tx_buf->type = dma_map ? MTK_TYPE_XDP_NDO : MTK_TYPE_XDP_TX;
  	tx_buf->data = (void *)MTK_DMA_DUMMY_DESC;
  
-@@ -1853,11 +1871,24 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1852,11 +1870,24 @@ static int mtk_poll_rx(struct napi_struc
  			break;
  
  		/* find out which mac the packet come from. values start at 1 */
@@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  		if (unlikely(mac < 0 || mac >= MTK_MAX_DEVS ||
  			     !eth->netdev[mac]))
-@@ -2079,7 +2110,6 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -2078,7 +2109,6 @@ static int mtk_poll_tx_qdma(struct mtk_e
  
  	while ((cpu != dma) && budget) {
  		u32 next_cpu = desc->txd2;
@@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  		desc = mtk_qdma_phys_to_virt(ring, desc->txd2);
  		if ((desc->txd3 & TX_DMA_OWNER_CPU) == 0)
-@@ -2087,15 +2117,13 @@ static int mtk_poll_tx_qdma(struct mtk_e
+@@ -2086,15 +2116,13 @@ static int mtk_poll_tx_qdma(struct mtk_e
  
  		tx_buf = mtk_desc_to_tx_buf(ring, desc,
  					    eth->soc->txrx.txd_size);
@@ -167,7 +167,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  			budget--;
  		}
-@@ -3704,7 +3732,24 @@ static int mtk_hw_init(struct mtk_eth *e
+@@ -3703,7 +3731,24 @@ static int mtk_hw_init(struct mtk_eth *e
  	mtk_w32(eth, eth->soc->txrx.rx_irq_done_mask, reg_map->qdma.int_grp + 4);
  	mtk_w32(eth, 0x21021000, MTK_FE_INT_GRP);
  
@@ -193,7 +193,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		/* PSE should not drop port8 and port9 packets from WDMA Tx */
  		mtk_w32(eth, 0x00000300, PSE_DROP_CFG);
  
-@@ -4266,7 +4311,11 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4265,7 +4310,11 @@ static int mtk_add_mac(struct mtk_eth *e
  	}
  	spin_lock_init(&mac->hw_stats->stats_lock);
  	u64_stats_init(&mac->hw_stats->syncp);
diff --git a/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch b/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch
index 8c24321dd4..8b1493ce14 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-11-net-ethernet-mtk_eth_soc-add-basic-support-for-MT798.patch
@@ -219,7 +219,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	return;
  
  err_phy:
-@@ -725,11 +841,15 @@ static int mtk_mdio_init(struct mtk_eth
+@@ -724,11 +840,15 @@ static int mtk_mdio_init(struct mtk_eth
  	}
  	divider = min_t(unsigned int, DIV_ROUND_UP(MDC_MAX_FREQ, max_clk), 63);
  
@@ -239,7 +239,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	dev_dbg(eth->dev, "MDC is running on %d Hz\n", MDC_MAX_FREQ / divider);
  
-@@ -1190,10 +1310,19 @@ static void mtk_tx_set_dma_desc_v2(struc
+@@ -1189,10 +1309,19 @@ static void mtk_tx_set_dma_desc_v2(struc
  		data |= TX_DMA_LS0;
  	WRITE_ONCE(desc->txd3, data);
  
@@ -263,7 +263,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	data |= TX_DMA_SWC_V2 | QID_BITS_V2(info->qid);
  	WRITE_ONCE(desc->txd4, data);
  
-@@ -4360,6 +4489,17 @@ static int mtk_add_mac(struct mtk_eth *e
+@@ -4359,6 +4488,17 @@ static int mtk_add_mac(struct mtk_eth *e
  			  mac->phylink_config.supported_interfaces);
  	}
  
@@ -281,7 +281,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	phylink = phylink_create(&mac->phylink_config,
  				 of_fwnode_handle(mac->of_node),
  				 phy_mode, &mtk_phylink_ops);
-@@ -4880,6 +5020,24 @@ static const struct mtk_soc_data mt7986_
+@@ -4879,6 +5019,24 @@ static const struct mtk_soc_data mt7986_
  	},
  };
  
@@ -306,7 +306,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static const struct mtk_soc_data rt5350_data = {
  	.reg_map = &mt7628_reg_map,
  	.caps = MT7628_CAPS,
-@@ -4898,14 +5056,15 @@ static const struct mtk_soc_data rt5350_
+@@ -4897,14 +5055,15 @@ static const struct mtk_soc_data rt5350_
  };
  
  const struct of_device_id of_mtk_match[] = {
diff --git a/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch b/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch
index 3dc4662d1a..bb48dadec0 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-12-net-ethernet-mtk_eth_soc-enable-page_pool-support-fo.patch
@@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1658,7 +1658,7 @@ static void mtk_update_rx_cpu_idx(struct
+@@ -1657,7 +1657,7 @@ static void mtk_update_rx_cpu_idx(struct
  
  static bool mtk_page_pool_enabled(struct mtk_eth *eth)
  {
diff --git a/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch b/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch
index 32f26d7d27..bb8deb9846 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-13-net-ethernet-mtk_eth_soc-enable-nft-hw-flowtable_off.patch
@@ -18,7 +18,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5028,6 +5028,9 @@ static const struct mtk_soc_data mt7988_
+@@ -5027,6 +5027,9 @@ static const struct mtk_soc_data mt7988_
  	.required_clks = MT7988_CLKS_BITMAP,
  	.required_pctl = false,
  	.version = 3,
diff --git a/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch b/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch
index 876bdd5dd3..c985b6a9c7 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-14-net-ethernet-mtk_eth_soc-support-per-flow-accounting.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -5030,6 +5030,7 @@ static const struct mtk_soc_data mt7988_
+@@ -5029,6 +5029,7 @@ static const struct mtk_soc_data mt7988_
  	.version = 3,
  	.offload_version = 2,
  	.hash_offset = 4,
diff --git a/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch b/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch
index 05a18364d6..e87e0f2522 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-17-net-ethernet-mtk_eth_soc-add-reset-bits-for-MT7988.patch
@@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -3594,19 +3594,34 @@ static void mtk_hw_reset(struct mtk_eth
+@@ -3593,19 +3593,34 @@ static void mtk_hw_reset(struct mtk_eth
  {
  	u32 val;
  
@@ -56,7 +56,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		regmap_write(eth->ethsys, ETHSYS_FE_RST_CHK_IDLE_EN,
  			     0x3ffffff);
  }
-@@ -3632,13 +3647,21 @@ static void mtk_hw_warm_reset(struct mtk
+@@ -3631,13 +3646,21 @@ static void mtk_hw_warm_reset(struct mtk
  		return;
  	}
  
@@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	regmap_update_bits(eth->ethsys, ETHSYS_RSTCTRL, rst_mask, rst_mask);
  
-@@ -3990,11 +4013,17 @@ static void mtk_prepare_for_reset(struct
+@@ -3989,11 +4012,17 @@ static void mtk_prepare_for_reset(struct
  	u32 val;
  	int i;
  
@@ -106,7 +106,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	/* adjust PPE configurations to prepare for reset */
  	for (i = 0; i < ARRAY_SIZE(eth->ppe); i++)
-@@ -4055,11 +4084,18 @@ static void mtk_pending_work(struct work
+@@ -4054,11 +4083,18 @@ static void mtk_pending_work(struct work
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch b/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch
index 74ac8dc898..2d0951a9ec 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-18-net-ethernet-mtk_eth_soc-add-support-for-in-SoC-SRAM.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1118,10 +1118,13 @@ static int mtk_init_fq_dma(struct mtk_et
+@@ -1117,10 +1117,13 @@ static int mtk_init_fq_dma(struct mtk_et
  	dma_addr_t dma_addr;
  	int i;
  
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (unlikely(!eth->scratch_ring))
  		return -ENOMEM;
  
-@@ -2429,8 +2432,14 @@ static int mtk_tx_alloc(struct mtk_eth *
+@@ -2428,8 +2431,14 @@ static int mtk_tx_alloc(struct mtk_eth *
  	if (!ring->buf)
  		goto no_tx_mem;
  
@@ -55,7 +55,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (!ring->dma)
  		goto no_tx_mem;
  
-@@ -2529,8 +2538,7 @@ static void mtk_tx_clean(struct mtk_eth
+@@ -2528,8 +2537,7 @@ static void mtk_tx_clean(struct mtk_eth
  		kfree(ring->buf);
  		ring->buf = NULL;
  	}
@@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dma_free_coherent(eth->dma_dev,
  				  ring->dma_size * soc->txrx.txd_size,
  				  ring->dma, ring->phys);
-@@ -2549,9 +2557,14 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2548,9 +2556,14 @@ static int mtk_rx_alloc(struct mtk_eth *
  {
  	const struct mtk_reg_map *reg_map = eth->soc->reg_map;
  	struct mtk_rx_ring *ring;
@@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (rx_flag == MTK_RX_FLAGS_QDMA) {
  		if (ring_no)
  			return -EINVAL;
-@@ -2586,9 +2599,20 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2585,9 +2598,20 @@ static int mtk_rx_alloc(struct mtk_eth *
  		ring->page_pool = pp;
  	}
  
@@ -105,7 +105,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	if (!ring->dma)
  		return -ENOMEM;
  
-@@ -2673,7 +2697,7 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2672,7 +2696,7 @@ static int mtk_rx_alloc(struct mtk_eth *
  	return 0;
  }
  
@@ -114,7 +114,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  {
  	int i;
  
-@@ -2696,7 +2720,7 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -2695,7 +2719,7 @@ static void mtk_rx_clean(struct mtk_eth
  		ring->data = NULL;
  	}
  
@@ -123,7 +123,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dma_free_coherent(eth->dma_dev,
  				  ring->dma_size * eth->soc->txrx.rxd_size,
  				  ring->dma, ring->phys);
-@@ -3059,7 +3083,7 @@ static void mtk_dma_free(struct mtk_eth
+@@ -3058,7 +3082,7 @@ static void mtk_dma_free(struct mtk_eth
  	for (i = 0; i < MTK_MAX_DEVS; i++)
  		if (eth->netdev[i])
  			netdev_reset_queue(eth->netdev[i]);
@@ -132,7 +132,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dma_free_coherent(eth->dma_dev,
  				  MTK_QDMA_RING_SIZE * soc->txrx.txd_size,
  				  eth->scratch_ring, eth->phy_scratch_ring);
-@@ -3067,13 +3091,13 @@ static void mtk_dma_free(struct mtk_eth
+@@ -3066,13 +3090,13 @@ static void mtk_dma_free(struct mtk_eth
  		eth->phy_scratch_ring = 0;
  	}
  	mtk_tx_clean(eth);
@@ -149,7 +149,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	kfree(eth->scratch_head);
-@@ -4641,7 +4665,7 @@ static int mtk_sgmii_init(struct mtk_eth
+@@ -4640,7 +4664,7 @@ static int mtk_sgmii_init(struct mtk_eth
  
  static int mtk_probe(struct platform_device *pdev)
  {
@@ -158,7 +158,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct device_node *mac_np;
  	struct mtk_eth *eth;
  	int err, i;
-@@ -4661,6 +4685,20 @@ static int mtk_probe(struct platform_dev
+@@ -4660,6 +4684,20 @@ static int mtk_probe(struct platform_dev
  	if (MTK_HAS_CAPS(eth->soc->caps, MTK_SOC_MT7628))
  		eth->ip_align = NET_IP_ALIGN;
  
@@ -179,7 +179,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	spin_lock_init(&eth->page_lock);
  	spin_lock_init(&eth->tx_irq_lock);
  	spin_lock_init(&eth->rx_irq_lock);
-@@ -4724,6 +4762,18 @@ static int mtk_probe(struct platform_dev
+@@ -4723,6 +4761,18 @@ static int mtk_probe(struct platform_dev
  			err = -EINVAL;
  			goto err_destroy_sgmii;
  		}
diff --git a/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch b/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch
index 1584dfd07c..416c4f48ef 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-19-net-ethernet-mtk_eth_soc-support-36-bit-DMA-addressi.patch
@@ -19,7 +19,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1311,6 +1311,10 @@ static void mtk_tx_set_dma_desc_v2(struc
+@@ -1310,6 +1310,10 @@ static void mtk_tx_set_dma_desc_v2(struc
  	data = TX_DMA_PLEN0(info->size);
  	if (info->last)
  		data |= TX_DMA_LS0;
@@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	WRITE_ONCE(desc->txd3, data);
  
  	 /* set forward port */
-@@ -1980,6 +1984,7 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1979,6 +1983,7 @@ static int mtk_poll_rx(struct napi_struc
  	bool xdp_flush = false;
  	int idx;
  	struct sk_buff *skb;
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	u8 *data, *new_data;
  	struct mtk_rx_dma_v2 *rxd, trxd;
  	int done = 0, bytes = 0;
-@@ -2095,7 +2100,10 @@ static int mtk_poll_rx(struct napi_struc
+@@ -2094,7 +2099,10 @@ static int mtk_poll_rx(struct napi_struc
  				goto release_desc;
  			}
  
@@ -50,7 +50,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  					 ring->buf_size, DMA_FROM_DEVICE);
  
  			skb = build_skb(data, ring->frag_size);
-@@ -2161,6 +2169,9 @@ release_desc:
+@@ -2160,6 +2168,9 @@ release_desc:
  		else
  			rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size);
  
@@ -60,7 +60,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		ring->calc_idx = idx;
  		done++;
  	}
-@@ -2653,6 +2664,9 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2652,6 +2663,9 @@ static int mtk_rx_alloc(struct mtk_eth *
  		else
  			rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size);
  
@@ -70,7 +70,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		rxd->rxd3 = 0;
  		rxd->rxd4 = 0;
  		if (mtk_is_netsys_v2_or_greater(eth)) {
-@@ -2699,6 +2713,7 @@ static int mtk_rx_alloc(struct mtk_eth *
+@@ -2698,6 +2712,7 @@ static int mtk_rx_alloc(struct mtk_eth *
  
  static void mtk_rx_clean(struct mtk_eth *eth, struct mtk_rx_ring *ring, bool in_sram)
  {
@@ -78,7 +78,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	int i;
  
  	if (ring->data && ring->dma) {
-@@ -2712,7 +2727,10 @@ static void mtk_rx_clean(struct mtk_eth
+@@ -2711,7 +2726,10 @@ static void mtk_rx_clean(struct mtk_eth
  			if (!rxd->rxd1)
  				continue;
  
@@ -90,7 +90,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  					 ring->buf_size, DMA_FROM_DEVICE);
  			mtk_rx_put_buff(ring, ring->data[i], false);
  		}
-@@ -4699,6 +4717,14 @@ static int mtk_probe(struct platform_dev
+@@ -4698,6 +4716,14 @@ static int mtk_probe(struct platform_dev
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch b/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch
index 5b27458eb8..d761866d0d 100644
--- a/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch
+++ b/target/linux/generic/backport-6.1/750-v6.5-20-net-ethernet-mtk_eth_soc-fix-uninitialized-variable.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1988,11 +1988,11 @@ static int mtk_poll_rx(struct napi_struc
+@@ -1987,11 +1987,11 @@ static int mtk_poll_rx(struct napi_struc
  	u8 *data, *new_data;
  	struct mtk_rx_dma_v2 *rxd, trxd;
  	int done = 0, bytes = 0;
@@ -32,7 +32,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		u32 hash, reason;
  		int mac = 0;
  
-@@ -2169,7 +2169,8 @@ release_desc:
+@@ -2168,7 +2168,8 @@ release_desc:
  		else
  			rxd->rxd2 = RX_DMA_PREP_PLEN0(ring->buf_size);
  
diff --git a/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch b/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
deleted file mode 100644
index 1b91663d39..0000000000
--- a/target/linux/generic/backport-6.1/789-STABLE-01-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
+++ /dev/null
@@ -1,172 +0,0 @@
-From be4512b9ac6fc53e1ca8daccbda84f643215c547 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Thu, 14 Mar 2024 12:28:35 +0300
-Subject: [PATCH 1/3] net: dsa: mt7530: prevent possible incorrect XTAL
- frequency selection
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[ Upstream commit f490c492e946d8ffbe65ad4efc66de3c5ede30a4 ]
-
-On MT7530, the HT_XTAL_FSEL field of the HWTRAP register stores a 2-bit
-value that represents the frequency of the crystal oscillator connected to
-the switch IC. The field is populated by the state of the ESW_P4_LED_0 and
-ESW_P4_LED_0 pins, which is done right after reset is deasserted.
-
-  ESW_P4_LED_0    ESW_P3_LED_0    Frequency
-  -----------------------------------------
-  0               0               Reserved
-  0               1               20MHz
-  1               0               40MHz
-  1               1               25MHz
-
-On MT7531, the XTAL25 bit of the STRAP register stores this. The LAN0LED0
-pin is used to populate the bit. 25MHz when the pin is high, 40MHz when
-it's low.
-
-These pins are also used with LEDs, therefore, their state can be set to
-something other than the bootstrapping configuration. For example, a link
-may be established on port 3 before the DSA subdriver takes control of the
-switch which would set ESW_P3_LED_0 to high.
-
-Currently on mt7530_setup() and mt7531_setup(), 1000 - 1100 usec delay is
-described between reset assertion and deassertion. Some switch ICs in real
-life conditions cannot always have these pins set back to the bootstrapping
-configuration before reset deassertion in this amount of delay. This causes
-wrong crystal frequency to be selected which puts the switch in a
-nonfunctional state after reset deassertion.
-
-The tests below are conducted on an MT7530 with a 40MHz crystal oscillator
-by Justin Swartz.
-
-With a cable from an active peer connected to port 3 before reset, an
-incorrect crystal frequency (0b11 = 25MHz) is selected:
-
-                      [1]                  [3]     [5]
-                      :                    :       :
-              _____________________________         __________________
-ESW_P4_LED_0                               |_______|
-              _____________________________
-ESW_P3_LED_0                               |__________________________
-
-                       :                  : :     :
-                       :                  : [4]...:
-                       :                  :
-                       [2]................:
-
-[1] Reset is asserted.
-[2] Period of 1000 - 1100 usec.
-[3] Reset is deasserted.
-[4] Period of 315 usec. HWTRAP register is populated with incorrect
-    XTAL frequency.
-[5] Signals reflect the bootstrapped configuration.
-
-Increase the delay between reset_control_assert() and
-reset_control_deassert(), and gpiod_set_value_cansleep(priv->reset, 0) and
-gpiod_set_value_cansleep(priv->reset, 1) to 5000 - 5100 usec. This amount
-ensures a higher possibility that the switch IC will have these pins back
-to the bootstrapping configuration before reset deassertion.
-
-With a cable from an active peer connected to port 3 before reset, the
-correct crystal frequency (0b10 = 40MHz) is selected:
-
-                      [1]        [2-1]     [3]     [5]
-                      :          :         :       :
-              _____________________________         __________________
-ESW_P4_LED_0                               |_______|
-              ___________________           _______
-ESW_P3_LED_0                     |_________|       |__________________
-
-                       :          :       : :     :
-                       :          [2-2]...: [4]...:
-                       [2]................:
-
-[1] Reset is asserted.
-[2] Period of 5000 - 5100 usec.
-[2-1] ESW_P3_LED_0 goes low.
-[2-2] Remaining period of 5000 - 5100 usec.
-[3] Reset is deasserted.
-[4] Period of 310 usec. HWTRAP register is populated with bootstrapped
-    XTAL frequency.
-[5] Signals reflect the bootstrapped configuration.
-
-ESW_P3_LED_0 low period before reset deassertion:
-
-              5000 usec
-            - 5100 usec
-    TEST     RESET HOLD
-       #         (usec)
-  ---------------------
-       1           5410
-       2           5440
-       3           4375
-       4           5490
-       5           5475
-       6           4335
-       7           4370
-       8           5435
-       9           4205
-      10           4335
-      11           3750
-      12           3170
-      13           4395
-      14           4375
-      15           3515
-      16           4335
-      17           4220
-      18           4175
-      19           4175
-      20           4350
-
-     Min           3170
-     Max           5490
-
-  Median       4342.500
-     Avg       4466.500
-
-Revert commit 2920dd92b980 ("net: dsa: mt7530: disable LEDs before reset").
-Changing the state of pins via reset assertion is simpler and more
-efficient than doing so by setting the LED controller off.
-
-Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
-Fixes: c288575f7810 ("net: dsa: mt7530: Add the support of MT7531 switch")
-Co-developed-by: Justin Swartz <justin.swartz at risingedge.co.za>
-Signed-off-by: Justin Swartz <justin.swartz at risingedge.co.za>
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Signed-off-by: David S. Miller <davem at davemloft.net>
-Signed-off-by: Sasha Levin <sashal at kernel.org>
----
- drivers/net/dsa/mt7530.c | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2187,11 +2187,11 @@ mt7530_setup(struct dsa_switch *ds)
- 	 */
- 	if (priv->mcm) {
- 		reset_control_assert(priv->rstc);
--		usleep_range(1000, 1100);
-+		usleep_range(5000, 5100);
- 		reset_control_deassert(priv->rstc);
- 	} else {
- 		gpiod_set_value_cansleep(priv->reset, 0);
--		usleep_range(1000, 1100);
-+		usleep_range(5000, 5100);
- 		gpiod_set_value_cansleep(priv->reset, 1);
- 	}
- 
-@@ -2401,11 +2401,11 @@ mt7531_setup(struct dsa_switch *ds)
- 	 */
- 	if (priv->mcm) {
- 		reset_control_assert(priv->rstc);
--		usleep_range(1000, 1100);
-+		usleep_range(5000, 5100);
- 		reset_control_deassert(priv->rstc);
- 	} else {
- 		gpiod_set_value_cansleep(priv->reset, 0);
--		usleep_range(1000, 1100);
-+		usleep_range(5000, 5100);
- 		gpiod_set_value_cansleep(priv->reset, 1);
- 	}
- 
diff --git a/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch b/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch
deleted file mode 100644
index 0cc6bf7525..0000000000
--- a/target/linux/generic/backport-6.1/789-STABLE-02-net-dsa-mt7530-fix-link-local-frames-that-ingress-vl.patch
+++ /dev/null
@@ -1,173 +0,0 @@
-From f1fa919ea59655f73cb3972264e157b8831ba546 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Thu, 14 Mar 2024 12:33:41 +0300
-Subject: [PATCH 2/3] net: dsa: mt7530: fix link-local frames that ingress vlan
- filtering ports
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[ Upstream commit e8bf353577f382c7066c661fed41b2adc0fc7c40 ]
-
-Whether VLAN-aware or not, on every VID VLAN table entry that has the CPU
-port as a member of it, frames are set to egress the CPU port with the VLAN
-tag stacked. This is so that VLAN tags can be appended after hardware
-special tag (called DSA tag in the context of Linux drivers).
-
-For user ports on a VLAN-unaware bridge, frame ingressing the user port
-egresses CPU port with only the special tag.
-
-For user ports on a VLAN-aware bridge, frame ingressing the user port
-egresses CPU port with the special tag and the VLAN tag.
-
-This causes issues with link-local frames, specifically BPDUs, because the
-software expects to receive them VLAN-untagged.
-
-There are two options to make link-local frames egress untagged. Setting
-CONSISTENT or UNTAGGED on the EG_TAG bits on the relevant register.
-CONSISTENT means frames egress exactly as they ingress. That means
-egressing with the VLAN tag they had at ingress or egressing untagged if
-they ingressed untagged. Although link-local frames are not supposed to be
-transmitted VLAN-tagged, if they are done so, when egressing through a CPU
-port, the special tag field will be broken.
-
-BPDU egresses CPU port with VLAN tag egressing stacked, received on
-software:
-
-00:01:25.104821 AF Unknown (382365846), length 106:
-                                     | STAG  | | VLAN  |
-        0x0000:  0000 6c27 614d 4143 0001 0000 8100 0001  ..l'aMAC........
-        0x0010:  0026 4242 0300 0000 0000 0000 6c27 614d  .&BB........l'aM
-        0x0020:  4143 0000 0000 0000 6c27 614d 4143 0000  AC......l'aMAC..
-        0x0030:  0000 1400 0200 0f00 0000 0000 0000 0000  ................
-
-BPDU egresses CPU port with VLAN tag egressing untagged, received on
-software:
-
-00:23:56.628708 AF Unknown (25215488), length 64:
-                                     | STAG  |
-        0x0000:  0000 6c27 614d 4143 0001 0000 0026 4242  ..l'aMAC.....&BB
-        0x0010:  0300 0000 0000 0000 6c27 614d 4143 0000  ........l'aMAC..
-        0x0020:  0000 0000 6c27 614d 4143 0000 0000 1400  ....l'aMAC......
-        0x0030:  0200 0f00 0000 0000 0000 0000            ............
-
-BPDU egresses CPU port with VLAN tag egressing tagged, received on
-software:
-
-00:01:34.311963 AF Unknown (25215488), length 64:
-                                     | Mess  |
-        0x0000:  0000 6c27 614d 4143 0001 0001 0026 4242  ..l'aMAC.....&BB
-        0x0010:  0300 0000 0000 0000 6c27 614d 4143 0000  ........l'aMAC..
-        0x0020:  0000 0000 6c27 614d 4143 0000 0000 1400  ....l'aMAC......
-        0x0030:  0200 0f00 0000 0000 0000 0000            ............
-
-To prevent confusing the software, force the frame to egress UNTAGGED
-instead of CONSISTENT. This way, frames can't possibly be received TAGGED
-by software which would have the special tag field broken.
-
-VLAN Tag Egress Procedure
-
-   For all frames, one of these options set the earliest in this order will
-   apply to the frame:
-
-   - EG_TAG in certain registers for certain frames.
-     This will apply to frame with matching MAC DA or EtherType.
-
-   - EG_TAG in the address table.
-     This will apply to frame at its incoming port.
-
-   - EG_TAG in the PVC register.
-     This will apply to frame at its incoming port.
-
-   - EG_CON and [EG_TAG per port] in the VLAN table.
-     This will apply to frame at its outgoing port.
-
-   - EG_TAG in the PCR register.
-     This will apply to frame at its outgoing port.
-
-   EG_TAG in certain registers for certain frames:
-
-   PPPoE Discovery_ARP/RARP: PPP_EG_TAG and ARP_EG_TAG in the APC register.
-   IGMP_MLD: IGMP_EG_TAG and MLD_EG_TAG in the IMC register.
-   BPDU and PAE: BPDU_EG_TAG and PAE_EG_TAG in the BPC register.
-   REV_01 and REV_02: R01_EG_TAG and R02_EG_TAG in the RGAC1 register.
-   REV_03 and REV_0E: R03_EG_TAG and R0E_EG_TAG in the RGAC2 register.
-   REV_10 and REV_20: R10_EG_TAG and R20_EG_TAG in the RGAC3 register.
-   REV_21 and REV_UN: R21_EG_TAG and RUN_EG_TAG in the RGAC4 register.
-
-With this change, it can be observed that a bridge interface with stp_state
-and vlan_filtering enabled will properly block ports now.
-
-Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
-Signed-off-by: Sasha Levin <sashal at kernel.org>
----
- drivers/net/dsa/mt7530.c | 23 +++++++++++++++--------
- drivers/net/dsa/mt7530.h |  9 ++++++++-
- 2 files changed, 23 insertions(+), 9 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -1001,16 +1001,23 @@ unlock_exit:
- static void
- mt753x_trap_frames(struct mt7530_priv *priv)
- {
--	/* Trap BPDUs to the CPU port(s) */
--	mt7530_rmw(priv, MT753X_BPC, MT753X_BPDU_PORT_FW_MASK,
-+	/* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them
-+	 * VLAN-untagged.
-+	 */
-+	mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK |
-+		   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
-+		   MT753X_BPDU_PORT_FW_MASK,
-+		   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+		   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+		   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
- 		   MT753X_BPDU_CPU_ONLY);
- 
--	/* Trap 802.1X PAE frames to the CPU port(s) */
--	mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_PORT_FW_MASK,
--		   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY));
--
--	/* Trap LLDP frames with :0E MAC DA to the CPU port(s) */
--	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_PORT_FW_MASK,
-+	/* Trap LLDP frames with :0E MAC DA to the CPU port(s) and egress them
-+	 * VLAN-untagged.
-+	 */
-+	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK |
-+		   MT753X_R0E_PORT_FW_MASK,
-+		   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
- 		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY));
- }
- 
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -63,12 +63,18 @@ enum mt753x_id {
- 
- /* Registers for BPDU and PAE frame control*/
- #define MT753X_BPC			0x24
--#define  MT753X_BPDU_PORT_FW_MASK	GENMASK(2, 0)
-+#define  MT753X_PAE_EG_TAG_MASK		GENMASK(24, 22)
-+#define  MT753X_PAE_EG_TAG(x)		FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x)
- #define  MT753X_PAE_PORT_FW_MASK	GENMASK(18, 16)
- #define  MT753X_PAE_PORT_FW(x)		FIELD_PREP(MT753X_PAE_PORT_FW_MASK, x)
-+#define  MT753X_BPDU_EG_TAG_MASK	GENMASK(8, 6)
-+#define  MT753X_BPDU_EG_TAG(x)		FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x)
-+#define  MT753X_BPDU_PORT_FW_MASK	GENMASK(2, 0)
- 
- /* Register for :03 and :0E MAC DA frame control */
- #define MT753X_RGAC2			0x2c
-+#define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
-+#define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
- #define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
- #define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
- 
-@@ -251,6 +257,7 @@ enum mt7530_port_mode {
- enum mt7530_vlan_port_eg_tag {
- 	MT7530_VLAN_EG_DISABLED = 0,
- 	MT7530_VLAN_EG_CONSISTENT = 1,
-+	MT7530_VLAN_EG_UNTAGGED = 4,
- };
- 
- enum mt7530_vlan_port_attr {
diff --git a/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch b/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch
deleted file mode 100644
index cf7a3c1283..0000000000
--- a/target/linux/generic/backport-6.1/789-STABLE-03-net-dsa-mt7530-fix-handling-of-all-link-local-frames.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From 86c0c154a759f2af9612a04bdf29110f02dce956 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Thu, 14 Mar 2024 12:33:42 +0300
-Subject: [PATCH 3/3] net: dsa: mt7530: fix handling of all link-local frames
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-[ Upstream commit 69ddba9d170bdaee1dc0eb4ced38d7e4bb7b92af ]
-
-Currently, the MT753X switches treat frames with :01-0D and :0F MAC DAs as
-regular multicast frames, therefore flooding them to user ports.
-
-On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE
-Std 802.1Q?-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC
-DA must only be propagated to C-VLAN and MAC Bridge components. That means
-VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
-these frames are supposed to be processed by the CPU (software). So we make
-the switch only forward them to the CPU port. And if received from a CPU
-port, forward to a single port. The software is responsible of making the
-switch conform to the latter by setting a single port as destination port
-on the special tag.
-
-This switch intellectual property cannot conform to this part of the
-standard fully. Whilst the REV_UN frame tag covers the remaining :04-0D and
-:0F MAC DAs, it also includes :22-FF which the scope of propagation is not
-supposed to be restricted for these MAC DAs.
-
-Set frames with :01-03 MAC DAs to be trapped to the CPU port(s). Add a
-comment for the remaining MAC DAs.
-
-Note that the ingress port must have a PVID assigned to it for the switch
-to forward untagged frames. A PVID is set by default on VLAN-aware and
-VLAN-unaware ports. However, when the network interface that pertains to
-the ingress port is attached to a vlan_filtering enabled bridge, the user
-can remove the PVID assignment from it which would prevent the link-local
-frames from being trapped to the CPU port. I am yet to see a way to forward
-link-local frames while preventing other untagged frames from being
-forwarded too.
-
-Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
-Signed-off-by: Sasha Levin <sashal at kernel.org>
----
- drivers/net/dsa/mt7530.c | 37 +++++++++++++++++++++++++++++++++----
- drivers/net/dsa/mt7530.h | 13 +++++++++++++
- 2 files changed, 46 insertions(+), 4 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -998,6 +998,21 @@ unlock_exit:
- 	mutex_unlock(&priv->reg_mutex);
- }
- 
-+/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std
-+ * 802.1Q?-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA
-+ * must only be propagated to C-VLAN and MAC Bridge components. That means
-+ * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
-+ * these frames are supposed to be processed by the CPU (software). So we make
-+ * the switch only forward them to the CPU port. And if received from a CPU
-+ * port, forward to a single port. The software is responsible of making the
-+ * switch conform to the latter by setting a single port as destination port on
-+ * the special tag.
-+ *
-+ * This switch intellectual property cannot conform to this part of the standard
-+ * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC
-+ * DAs, it also includes :22-FF which the scope of propagation is not supposed
-+ * to be restricted for these MAC DAs.
-+ */
- static void
- mt753x_trap_frames(struct mt7530_priv *priv)
- {
-@@ -1012,13 +1027,27 @@ mt753x_trap_frames(struct mt7530_priv *p
- 		   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
- 		   MT753X_BPDU_CPU_ONLY);
- 
--	/* Trap LLDP frames with :0E MAC DA to the CPU port(s) and egress them
--	 * VLAN-untagged.
-+	/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress
-+	 * them VLAN-untagged.
-+	 */
-+	mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK |
-+		   MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK |
-+		   MT753X_R01_PORT_FW_MASK,
-+		   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+		   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+		   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+		   MT753X_BPDU_CPU_ONLY);
-+
-+	/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress
-+	 * them VLAN-untagged.
- 	 */
- 	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK |
--		   MT753X_R0E_PORT_FW_MASK,
-+		   MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK |
-+		   MT753X_R03_PORT_FW_MASK,
- 		   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY));
-+		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+		   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+		   MT753X_BPDU_CPU_ONLY);
- }
- 
- static int
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -71,12 +71,25 @@ enum mt753x_id {
- #define  MT753X_BPDU_EG_TAG(x)		FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x)
- #define  MT753X_BPDU_PORT_FW_MASK	GENMASK(2, 0)
- 
-+/* Register for :01 and :02 MAC DA frame control */
-+#define MT753X_RGAC1			0x28
-+#define  MT753X_R02_EG_TAG_MASK		GENMASK(24, 22)
-+#define  MT753X_R02_EG_TAG(x)		FIELD_PREP(MT753X_R02_EG_TAG_MASK, x)
-+#define  MT753X_R02_PORT_FW_MASK	GENMASK(18, 16)
-+#define  MT753X_R02_PORT_FW(x)		FIELD_PREP(MT753X_R02_PORT_FW_MASK, x)
-+#define  MT753X_R01_EG_TAG_MASK		GENMASK(8, 6)
-+#define  MT753X_R01_EG_TAG(x)		FIELD_PREP(MT753X_R01_EG_TAG_MASK, x)
-+#define  MT753X_R01_PORT_FW_MASK	GENMASK(2, 0)
-+
- /* Register for :03 and :0E MAC DA frame control */
- #define MT753X_RGAC2			0x2c
- #define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
- #define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
- #define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
- #define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
-+#define  MT753X_R03_EG_TAG_MASK		GENMASK(8, 6)
-+#define  MT753X_R03_EG_TAG(x)		FIELD_PREP(MT753X_R03_EG_TAG_MASK, x)
-+#define  MT753X_R03_PORT_FW_MASK	GENMASK(2, 0)
- 
- enum mt753x_bpdu_port_fw {
- 	MT753X_BPDU_FOLLOW_MFC,
diff --git a/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch b/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch
index 9560122ccd..e0f10f7642 100644
--- a/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch
+++ b/target/linux/generic/backport-6.1/830-04-v6.5-cpufreq-qcom-nvmem-use-SoC-ID-s-from-bindings.patch
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko at gmail.com
 
 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
 +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
-@@ -31,12 +31,7 @@
+@@ -30,12 +30,7 @@
  
  #define MSM_ID_SMEM	137
  
@@ -32,7 +32,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-4-robimarko at gmail.com
  
  enum _msm8996_version {
  	MSM8996_V3,
-@@ -154,12 +149,12 @@ static enum _msm8996_version qcom_cpufre
+@@ -153,12 +148,12 @@ static enum _msm8996_version qcom_cpufre
  	msm_id++;
  
  	switch ((enum _msm_id)*msm_id) {
diff --git a/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch b/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch
index 4f37d672ba..93e776f62c 100644
--- a/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch
+++ b/target/linux/generic/backport-6.1/830-05-v6.5-cpufreq-qcom-nvmem-use-helper-to-get-SMEM-SoC-ID.patch
@@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko at gmail.com
 
 --- a/drivers/cpufreq/qcom-cpufreq-nvmem.c
 +++ b/drivers/cpufreq/qcom-cpufreq-nvmem.c
-@@ -29,16 +29,8 @@
+@@ -28,16 +28,8 @@
  #include <linux/slab.h>
  #include <linux/soc/qcom/smem.h>
  
@@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20230526204802.3081168-5-robimarko at gmail.com
  struct qcom_cpufreq_drv;
  
  struct qcom_cpufreq_match_data {
-@@ -135,60 +127,32 @@ static void get_krait_bin_format_b(struc
+@@ -134,60 +126,32 @@ static void get_krait_bin_format_b(struc
  	dev_dbg(cpu_dev, "PVS version: %d\n", *pvs_ver);
  }
  
diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1
index bfa3faae83..7baa9b4a55 100644
--- a/target/linux/generic/config-6.1
+++ b/target/linux/generic/config-6.1
@@ -6735,6 +6735,8 @@ CONFIG_TCP_CONG_CUBIC=y
 # CONFIG_TCS3414 is not set
 # CONFIG_TCS3472 is not set
 # CONFIG_TEE is not set
+# CONFIG_TEGRA210_ADMA is not set
+# CONFIG_TEGRA_ACONNECT is not set
 # CONFIG_TEGRA_AHB is not set
 # CONFIG_TEGRA_HOST1X is not set
 # CONFIG_TEHUTI is not set
diff --git a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
index 11850c0418..a1b32c352b 100644
--- a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/net/core/dev.c
 +++ b/net/core/dev.c
-@@ -7625,6 +7625,48 @@ static void __netdev_adjacent_dev_unlink
+@@ -7628,6 +7628,48 @@ static void __netdev_adjacent_dev_unlink
  					   &upper_dev->adj_list.lower);
  }
  
@@ -93,7 +93,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static int __netdev_upper_dev_link(struct net_device *dev,
  				   struct net_device *upper_dev, bool master,
  				   void *upper_priv, void *upper_info,
-@@ -7676,6 +7718,7 @@ static int __netdev_upper_dev_link(struc
+@@ -7679,6 +7721,7 @@ static int __netdev_upper_dev_link(struc
  	if (ret)
  		return ret;
  
@@ -101,7 +101,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
  					    &changeupper_info.info);
  	ret = notifier_to_errno(ret);
-@@ -7772,6 +7815,7 @@ static void __netdev_upper_dev_unlink(st
+@@ -7775,6 +7818,7 @@ static void __netdev_upper_dev_unlink(st
  
  	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
  
@@ -109,7 +109,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
  				      &changeupper_info.info);
  
-@@ -8824,6 +8868,7 @@ int dev_set_mac_address(struct net_devic
+@@ -8827,6 +8871,7 @@ int dev_set_mac_address(struct net_devic
  	if (err)
  		return err;
  	dev->addr_assign_type = NET_ADDR_SET;
diff --git a/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch b/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
index 842fef3a9c..90b60def6b 100644
--- a/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
+++ b/target/linux/generic/pending-6.1/702-net-ethernet-mtk_eth_soc-enable-threaded-NAPI.patch
@@ -10,7 +10,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -4941,6 +4941,8 @@ static int mtk_probe(struct platform_dev
+@@ -4940,6 +4940,8 @@ static int mtk_probe(struct platform_dev
  	 * for NAPI to work
  	 */
  	init_dummy_netdev(&eth->dummy_dev);
diff --git a/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch b/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
index a1cc109050..600109a950 100644
--- a/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
+++ b/target/linux/generic/pending-6.1/732-01-net-ethernet-mtk_eth_soc-work-around-issue-with-send.patch
@@ -16,7 +16,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -1562,12 +1562,28 @@ static void mtk_wake_queue(struct mtk_et
+@@ -1561,12 +1561,28 @@ static void mtk_wake_queue(struct mtk_et
  	}
  }
  
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	bool gso = false;
  	int tx_num;
  
-@@ -1589,6 +1605,18 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1588,6 +1604,18 @@ static netdev_tx_t mtk_start_xmit(struct
  		return NETDEV_TX_BUSY;
  	}
  
@@ -64,7 +64,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	/* TSO: fill MSS info in tcp checksum field */
  	if (skb_is_gso(skb)) {
  		if (skb_cow_head(skb, 0)) {
-@@ -1604,8 +1632,14 @@ static netdev_tx_t mtk_start_xmit(struct
+@@ -1603,8 +1631,14 @@ static netdev_tx_t mtk_start_xmit(struct
  		}
  	}
  
diff --git a/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch b/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
index 0a49c75b00..aa86075417 100644
--- a/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
+++ b/target/linux/generic/pending-6.1/732-03-net-ethernet-mtk_eth_soc-fix-remaining-throughput-re.patch
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
 +++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -767,6 +767,7 @@ static void mtk_mac_link_up(struct phyli
+@@ -766,6 +766,7 @@ static void mtk_mac_link_up(struct phyli
  		 MAC_MCR_FORCE_RX_FC);
  
  	/* Configure speed */
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	switch (speed) {
  	case SPEED_2500:
  	case SPEED_1000:
-@@ -3348,6 +3349,9 @@ found:
+@@ -3347,6 +3348,9 @@ found:
  	if (dp->index >= MTK_QDMA_NUM_QUEUES)
  		return NOTIFY_DONE;
  
diff --git a/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch b/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch
deleted file mode 100644
index 2f7d29b84d..0000000000
--- a/target/linux/generic/pending-6.1/735-net-mediatek-mtk_eth_soc-release-MAC_MCR_FORCE_LINK-.patch
+++ /dev/null
@@ -1,50 +0,0 @@
-From ef5976ae4e117fae9a61bb3c0f8319a917a425ea Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel at makrotopia.org>
-Date: Mon, 11 Mar 2024 17:43:28 +0000
-Subject: [PATCH] net: mediatek: mtk_eth_soc: release MAC_MCR_FORCE_LINK only when MAC is up
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Clearing bit MAC_MCR_FORCE_LINK which forces the link down too early
-can result in MAC ending up in a broken/blocked state.
-
-Fix this by handling this bit in the .mac_link_up and .mac_link_down
-calls instead of in .mac_finish.
-
-Fixes: b8fc9f30821ec ("net: ethernet: mediatek: Add basic PHYLINK support")
-Signed-off-by: Daniel Golle <daniel at makrotopia.org>
----
- drivers/net/ethernet/mediatek/mtk_eth_soc.c | 7 +++----
- 1 file changed, 3 insertions(+), 4 deletions(-)
-
---- a/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-+++ b/drivers/net/ethernet/mediatek/mtk_eth_soc.c
-@@ -662,8 +662,7 @@ static int mtk_mac_finish(struct phylink
- 	mcr_cur = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
- 	mcr_new = mcr_cur;
- 	mcr_new |= MAC_MCR_IPG_CFG | MAC_MCR_FORCE_MODE |
--		   MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_FORCE_LINK |
--		   MAC_MCR_RX_FIFO_CLR_DIS;
-+		   MAC_MCR_BACKOFF_EN | MAC_MCR_BACKPR_EN | MAC_MCR_RX_FIFO_CLR_DIS;
- 
- 	/* Only update control register when needed! */
- 	if (mcr_new != mcr_cur)
-@@ -679,7 +678,7 @@ static void mtk_mac_link_down(struct phy
- 					   phylink_config);
- 	u32 mcr = mtk_r32(mac->hw, MTK_MAC_MCR(mac->id));
- 
--	mcr &= ~(MAC_MCR_TX_EN | MAC_MCR_RX_EN);
-+	mcr &= ~(MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK);
- 	mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
- }
- 
-@@ -788,7 +787,7 @@ static void mtk_mac_link_up(struct phyli
- 	if (rx_pause)
- 		mcr |= MAC_MCR_FORCE_RX_FC;
- 
--	mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN;
-+	mcr |= MAC_MCR_TX_EN | MAC_MCR_RX_EN | MAC_MCR_FORCE_LINK;
- 	mtk_w32(mac->hw, mcr, MTK_MAC_MCR(mac->id));
- }
- 
diff --git a/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch b/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch
deleted file mode 100644
index 3b190c1801..0000000000
--- a/target/linux/generic/pending-6.1/736-net-ethernet-mtk_eth_soc-fix-PPE-hanging-issue.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From c8262ebbf7ca546dd5ead3c0383a89eb401627ff Mon Sep 17 00:00:00 2001
-From: Daniel Golle <daniel at makrotopia.org>
-Date: Wed, 13 Mar 2024 17:55:02 +0000
-Subject: [PATCH] net: ethernet: mtk_eth_soc: fix PPE hanging issue
-
-A patch to resolve an issue was found in MediaTek's GPL-licensed SDK:
-In the mtk_ppe_stop() function, the PPE scan mode is not disabled before
-disabling the PPE. This can potentially lead to a hang during the process
-of disabling the PPE.
-
-Without this patch, the PPE may experience a hang during the reboot test.
-
-Reference: https://git01.mediatek.com/plugins/gitiles/openwrt/feeds/mtk-openwrt-feeds/+/b40da332dfe763932a82f9f62a4709457a15dd6c
-
-Suggested-by: Bc-bocun Chen <bc-bocun.chen at mediatek.com>
-Signed-off-by: Daniel Golle <daniel at makrotopia.org>
----
- drivers/net/ethernet/mediatek/mtk_ppe.c | 18 +++++++++++-------
- 1 file changed, 11 insertions(+), 7 deletions(-)
-
---- a/drivers/net/ethernet/mediatek/mtk_ppe.c
-+++ b/drivers/net/ethernet/mediatek/mtk_ppe.c
-@@ -1002,7 +1002,7 @@ void mtk_ppe_start(struct mtk_ppe *ppe)
- 			 MTK_PPE_KEEPALIVE_DISABLE) |
- 	      FIELD_PREP(MTK_PPE_TB_CFG_HASH_MODE, 1) |
- 	      FIELD_PREP(MTK_PPE_TB_CFG_SCAN_MODE,
--			 MTK_PPE_SCAN_MODE_KEEPALIVE_AGE) |
-+			 MTK_PPE_SCAN_MODE_CHECK_AGE) |
- 	      FIELD_PREP(MTK_PPE_TB_CFG_ENTRY_NUM,
- 			 MTK_PPE_ENTRIES_SHIFT);
- 	if (mtk_is_netsys_v2_or_greater(ppe->eth))
-@@ -1098,17 +1098,21 @@ int mtk_ppe_stop(struct mtk_ppe *ppe)
- 
- 	mtk_ppe_cache_enable(ppe, false);
- 
--	/* disable offload engine */
--	ppe_clear(ppe, MTK_PPE_GLO_CFG, MTK_PPE_GLO_CFG_EN);
--	ppe_w32(ppe, MTK_PPE_FLOW_CFG, 0);
--
- 	/* disable aging */
- 	val = MTK_PPE_TB_CFG_AGE_NON_L4 |
- 	      MTK_PPE_TB_CFG_AGE_UNBIND |
- 	      MTK_PPE_TB_CFG_AGE_TCP |
- 	      MTK_PPE_TB_CFG_AGE_UDP |
--	      MTK_PPE_TB_CFG_AGE_TCP_FIN;
-+	      MTK_PPE_TB_CFG_AGE_TCP_FIN |
-+		  MTK_PPE_TB_CFG_SCAN_MODE;
- 	ppe_clear(ppe, MTK_PPE_TB_CFG, val);
- 
--	return mtk_ppe_wait_busy(ppe);
-+	if (mtk_ppe_wait_busy(ppe))
-+		return -ETIMEDOUT;
-+
-+	/* disable offload engine */
-+	ppe_clear(ppe, MTK_PPE_GLO_CFG, MTK_PPE_GLO_CFG_EN);
-+	ppe_w32(ppe, MTK_PPE_FLOW_CFG, 0);
-+
-+	return 0;
- }
diff --git a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch
index 42c8519c90..2df5e6b28c 100644
--- a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch
+++ b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch
@@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi,
  			   int (*poll)(struct napi_struct *, int), int weight)
  {
-@@ -11168,6 +11239,9 @@ static int dev_cpu_dead(unsigned int old
+@@ -11171,6 +11242,9 @@ static int dev_cpu_dead(unsigned int old
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_enable();
  
@@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #ifdef CONFIG_RPS
  	remsd = oldsd->rps_ipi_list;
  	oldsd->rps_ipi_list = NULL;
-@@ -11480,6 +11554,7 @@ static int __init net_dev_init(void)
+@@ -11483,6 +11557,7 @@ static int __init net_dev_init(void)
  		INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd);
  		spin_lock_init(&sd->defer_lock);
  
diff --git a/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch b/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch
index a13d405e64..815231973d 100644
--- a/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch
+++ b/target/linux/generic/pending-6.1/801-gpio-gpio-cascade-add-generic-GPIO-cascade.patch
@@ -70,7 +70,7 @@ v1 -> v2:
 
 --- a/drivers/gpio/Kconfig
 +++ b/drivers/gpio/Kconfig
-@@ -1711,4 +1711,19 @@ config GPIO_SIM
+@@ -1712,4 +1712,19 @@ config GPIO_SIM
  
  endmenu
  
diff --git a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch
index 4552b4cd66..76e3f2544d 100644
--- a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch
+++ b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch
@@ -31,7 +31,7 @@ Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
  	help
 --- a/init/main.c
 +++ b/init/main.c
-@@ -611,6 +611,29 @@ static inline void setup_nr_cpu_ids(void
+@@ -612,6 +612,29 @@ static inline void setup_nr_cpu_ids(void
  static inline void smp_prepare_cpus(unsigned int maxcpus) { }
  #endif
  
@@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
  /*
   * We need to store the untouched command line for future reference.
   * We also need to store the touched command line since the parameter
-@@ -958,6 +981,7 @@ asmlinkage __visible void __init __no_sa
+@@ -959,6 +982,7 @@ asmlinkage __visible void __init __no_sa
  	pr_notice("%s", linux_banner);
  	early_security_init();
  	setup_arch(&command_line);
diff --git a/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch b/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
index 60b80fefe1..604ac731a8 100644
--- a/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
+++ b/target/linux/ipq806x/patches-6.1/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
@@ -177,7 +177,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  #include <linux/bootconfig.h>
  #include <linux/console.h>
  #include <linux/nmi.h>
-@@ -995,6 +996,17 @@ asmlinkage __visible void __init __no_sa
+@@ -996,6 +997,17 @@ asmlinkage __visible void __init __no_sa
  	pr_notice("Kernel command line: %s\n", saved_command_line);
  	/* parameters may set static keys */
  	jump_label_init();
diff --git a/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch b/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch
index 970e0f92bb..e6c6eb6166 100644
--- a/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch
+++ b/target/linux/mediatek/patches-6.1/001-v6.2-arm64-dts-mediatek-mt7986-add-support-for-RX-Wireles.patch
@@ -66,7 +66,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	};
  
  	timer {
-@@ -239,6 +280,11 @@
+@@ -240,6 +281,11 @@
  			reg = <0 0x15010000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@@ -78,7 +78,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		};
  
  		wed1: wed at 15011000 {
-@@ -247,6 +293,25 @@
+@@ -248,6 +294,25 @@
  			reg = <0 0x15011000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
diff --git a/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch
index 5706531a46..fec048e68e 100644
--- a/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-6.1/003-v6.2-arm64-dts-mt7986-add-crypto-related-device-nodes.patch
@@ -31,7 +31,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -223,6 +223,21 @@
+@@ -224,6 +224,21 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch b/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch
index 0e5b77a11b..132940915b 100644
--- a/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch
+++ b/target/linux/mediatek/patches-6.1/004-v6.2-arm64-dts-mt7986-add-i2c-node.patch
@@ -14,7 +14,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -279,6 +279,20 @@
+@@ -280,6 +280,20 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch
index 3e5e3d880a..c45f183dc7 100644
--- a/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-6.1/006-v6.2-arm64-dts-mt7986-add-spi-related-device-nodes.patch
@@ -69,7 +69,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  		#address-cells = <1>;
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -294,6 +294,34 @@
+@@ -295,6 +295,34 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch
index 53567c66a0..603f33b150 100644
--- a/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-6.1/007-v6.3-arm64-dts-mt7986-add-usb-related-device-nodes.patch
@@ -42,7 +42,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  	pinctrl-names = "default", "dbdc";
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -322,6 +322,61 @@
+@@ -323,6 +323,61 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch
index 9c0a48149d..40e71cd429 100644
--- a/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-6.1/008-v6.3-arm64-dts-mt7986-add-mmc-related-device-nodes.patch
@@ -136,7 +136,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  			function = "spi";
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -345,6 +345,21 @@
+@@ -346,6 +346,21 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch b/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch
index adc6394857..ab039c335a 100644
--- a/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch
+++ b/target/linux/mediatek/patches-6.1/009-v6.3-arm64-dts-mt7986-add-pcie-related-device-nodes.patch
@@ -58,7 +58,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  
  / {
  	compatible = "mediatek,mt7986a";
-@@ -360,6 +361,57 @@
+@@ -361,6 +362,57 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch b/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch
index e8c47945d6..915da7984e 100644
--- a/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch
+++ b/target/linux/mediatek/patches-6.1/012-v6.5-arm64-dts-mt7986-add-PWM.patch
@@ -15,7 +15,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -240,6 +240,20 @@
+@@ -241,6 +241,20 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch b/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch
index 0d12079d7c..f1cb0eaf02 100644
--- a/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch
+++ b/target/linux/mediatek/patches-6.1/016-v6.5-arm64-dts-mt7986-add-thermal-and-efuse.patch
@@ -16,7 +16,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -337,6 +337,15 @@
+@@ -338,6 +338,15 @@
  			status = "disabled";
  		};
  
@@ -32,7 +32,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  		ssusb: usb at 11200000 {
  			compatible = "mediatek,mt7986-xhci",
  				     "mediatek,mtk-xhci";
-@@ -375,6 +384,21 @@
+@@ -376,6 +385,21 @@
  			status = "disabled";
  		};
  
@@ -54,7 +54,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  		pcie: pcie at 11280000 {
  			compatible = "mediatek,mt7986-pcie",
  				     "mediatek,mt8192-pcie";
-@@ -426,6 +450,17 @@
+@@ -427,6 +451,17 @@
  			};
  		};
  
@@ -72,7 +72,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
  		usb_phy: t-phy at 11e10000 {
  			compatible = "mediatek,mt7986-tphy",
  				     "mediatek,generic-tphy-v2";
-@@ -567,5 +602,4 @@
+@@ -568,5 +603,4 @@
  			memory-region = <&wmcpu_emi>;
  		};
  	};
diff --git a/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch b/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch
index 3fe3e885eb..ad21fb8c3c 100644
--- a/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch
+++ b/target/linux/mediatek/patches-6.1/017-v6.5-arm64-dts-mt7986-add-thermal-zones.patch
@@ -16,7 +16,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -602,4 +602,32 @@
+@@ -603,4 +603,32 @@
  			memory-region = <&wmcpu_emi>;
  		};
  	};
diff --git a/target/linux/mediatek/patches-6.1/021-v6.7-arm64-dts-mt7986-change-cooling-trips.patch b/target/linux/mediatek/patches-6.1/021-v6.7-arm64-dts-mt7986-change-cooling-trips.patch
index 20d4468cf0..318ca43e13 100644
--- a/target/linux/mediatek/patches-6.1/021-v6.7-arm64-dts-mt7986-change-cooling-trips.patch
+++ b/target/linux/mediatek/patches-6.1/021-v6.7-arm64-dts-mt7986-change-cooling-trips.patch
@@ -18,7 +18,7 @@ Signed-off-by: Frank Wunderlich <frank-w at public-files.de>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -610,22 +610,34 @@
+@@ -611,22 +611,34 @@
  			thermal-sensors = <&thermal 0>;
  
  			trips {
diff --git a/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch b/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch
index d5bd9a316b..1eeed82c1b 100644
--- a/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch
+++ b/target/linux/mediatek/patches-6.1/100-dts-update-mt7622-rfb1.patch
@@ -38,10 +38,10 @@
  	memory at 40000000 {
 -		reg = <0 0x40000000 0 0x20000000>;
 +		reg = <0 0x40000000 0 0x40000000>;
+ 		device_type = "memory";
  	};
  
- 	reg_1p8v: regulator-1p8v {
-@@ -132,22 +131,22 @@
+@@ -133,22 +132,22 @@
  
  				port at 0 {
  					reg = <0>;
@@ -68,7 +68,7 @@
  				};
  
  				port at 4 {
-@@ -240,7 +239,22 @@
+@@ -241,7 +240,22 @@
  	status = "okay";
  };
  
@@ -91,7 +91,7 @@
  	/* eMMC is shared pin with parallel NAND */
  	emmc_pins_default: emmc-pins-default {
  		mux {
-@@ -517,11 +531,11 @@
+@@ -518,11 +532,11 @@
  };
  
  &sata {
diff --git a/target/linux/mediatek/patches-6.1/106-dts-mt7622-disable_btif.patch b/target/linux/mediatek/patches-6.1/106-dts-mt7622-disable_btif.patch
index fc6a8f35bc..ac8594b396 100644
--- a/target/linux/mediatek/patches-6.1/106-dts-mt7622-disable_btif.patch
+++ b/target/linux/mediatek/patches-6.1/106-dts-mt7622-disable_btif.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -108,10 +108,6 @@
+@@ -109,10 +109,6 @@
  	status = "disabled";
  };
  
@@ -13,7 +13,7 @@
  	pinctrl-0 = <&irrx_pins>;
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -89,10 +89,6 @@
+@@ -90,10 +90,6 @@
  	status = "disabled";
  };
  
diff --git a/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch b/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch
index b012a48d75..2cc0efdade 100644
--- a/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch
+++ b/target/linux/mediatek/patches-6.1/112-dts-fix-bpi64-lan-names.patch
@@ -8,7 +8,7 @@
  	};
  
  	chosen {
-@@ -160,22 +161,22 @@
+@@ -161,22 +162,22 @@
  
  				port at 1 {
  					reg = <1>;
diff --git a/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch b/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch
index 0d324084b1..119de1c457 100644
--- a/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch
+++ b/target/linux/mediatek/patches-6.1/114-dts-bpi64-disable-rtc.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -556,12 +556,16 @@
+@@ -557,12 +557,16 @@
  	status = "okay";
  };
  
diff --git a/target/linux/mediatek/patches-6.1/115-v6.5-arm64-dts-mt7622-declare-SPI-NAND-present-on-BPI-R64.patch b/target/linux/mediatek/patches-6.1/115-v6.5-arm64-dts-mt7622-declare-SPI-NAND-present-on-BPI-R64.patch
index 5fc55314ce..6eac51f825 100644
--- a/target/linux/mediatek/patches-6.1/115-v6.5-arm64-dts-mt7622-declare-SPI-NAND-present-on-BPI-R64.patch
+++ b/target/linux/mediatek/patches-6.1/115-v6.5-arm64-dts-mt7622-declare-SPI-NAND-present-on-BPI-R64.patch
@@ -20,7 +20,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -253,14 +253,42 @@
+@@ -254,14 +254,42 @@
  	status = "disabled";
  };
  
diff --git a/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch b/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch
index d6e0ab1d41..1a0e3237c8 100644
--- a/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch
+++ b/target/linux/mediatek/patches-6.1/131-dts-mt7622-add-snand-support.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -534,6 +534,65 @@
+@@ -535,6 +535,65 @@
  	status = "disabled";
  };
  
diff --git a/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch b/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch
index 117d5abde6..208046ad16 100644
--- a/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch
+++ b/target/linux/mediatek/patches-6.1/140-dts-fix-wmac-support-for-mt7622-rfb1.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -575,7 +575,7 @@
+@@ -576,7 +576,7 @@
  				reg = <0x140000 0x0080000>;
  			};
  
@@ -9,7 +9,7 @@
  				label = "Factory";
  				reg = <0x1c0000 0x0100000>;
  			};
-@@ -636,5 +636,6 @@
+@@ -637,5 +637,6 @@
  &wmac {
  	pinctrl-names = "default";
  	pinctrl-0 = <&wmac_pins>;
diff --git a/target/linux/mediatek/patches-6.1/180-v6.5-arm64-dts-mt7622-handle-interrupts-from-MT7531-switc.patch b/target/linux/mediatek/patches-6.1/180-v6.5-arm64-dts-mt7622-handle-interrupts-from-MT7531-switc.patch
index 0a971c1f45..d396d38f20 100644
--- a/target/linux/mediatek/patches-6.1/180-v6.5-arm64-dts-mt7622-handle-interrupts-from-MT7531-switc.patch
+++ b/target/linux/mediatek/patches-6.1/180-v6.5-arm64-dts-mt7622-handle-interrupts-from-MT7531-switc.patch
@@ -19,7 +19,7 @@ Signed-off-by: Matthias Brugger <matthias.bgg at gmail.com>
 
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -154,6 +154,10 @@
+@@ -155,6 +155,10 @@
  		switch at 0 {
  			compatible = "mediatek,mt7531";
  			reg = <0>;
diff --git a/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch b/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch
index 3e956701cd..a6f98fdf83 100644
--- a/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch
+++ b/target/linux/mediatek/patches-6.1/331-mt7622-rfb1-enable-bmt.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
-@@ -548,6 +548,7 @@
+@@ -549,6 +549,7 @@
  		spi-tx-bus-width = <4>;
  		spi-rx-bus-width = <4>;
  		nand-ecc-engine = <&snfi>;
diff --git a/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch b/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch
index 8c2c80d6bf..95fc7f4668 100644
--- a/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch
+++ b/target/linux/mediatek/patches-6.1/431-drivers-spi-mt65xx-Move-chip_config-to-driver-s-priv.patch
@@ -97,7 +97,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
  	if (mdata->dev_comp->need_pad_sel && spi->cs_gpiod)
  		/* CS de-asserted, gpiolib will handle inversion */
  		gpiod_direction_output(spi->cs_gpiod, 0);
-@@ -1138,6 +1126,10 @@ static int mtk_spi_probe(struct platform
+@@ -1140,6 +1128,10 @@ static int mtk_spi_probe(struct platform
  	mdata = spi_master_get_devdata(master);
  	mdata->dev_comp = device_get_match_data(dev);
  
diff --git a/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch b/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch
index ee3dc27860..dbdb1947aa 100644
--- a/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch
+++ b/target/linux/mediatek/patches-6.1/434-drivers-spi-mt65xx-Add-controller-s-calibration-para.patch
@@ -11,7 +11,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
 
 --- a/drivers/spi/spi-mt65xx.c
 +++ b/drivers/spi/spi-mt65xx.c
-@@ -832,6 +832,21 @@ static irqreturn_t mtk_spi_interrupt(int
+@@ -834,6 +834,21 @@ static irqreturn_t mtk_spi_interrupt(int
  	return IRQ_HANDLED;
  }
  
@@ -33,7 +33,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
  static int mtk_spi_mem_adjust_op_size(struct spi_mem *mem,
  				      struct spi_mem_op *op)
  {
-@@ -1122,6 +1137,7 @@ static int mtk_spi_probe(struct platform
+@@ -1124,6 +1139,7 @@ static int mtk_spi_probe(struct platform
  	master->setup = mtk_spi_setup;
  	master->set_cs_timing = mtk_spi_set_hw_cs_timing;
  	master->use_gpio_descriptors = true;
diff --git a/target/linux/mediatek/patches-6.1/862-arm64-dts-mt7986-add-afe.patch b/target/linux/mediatek/patches-6.1/862-arm64-dts-mt7986-add-afe.patch
index b31710fe69..e40dca2a7d 100644
--- a/target/linux/mediatek/patches-6.1/862-arm64-dts-mt7986-add-afe.patch
+++ b/target/linux/mediatek/patches-6.1/862-arm64-dts-mt7986-add-afe.patch
@@ -9,7 +9,7 @@ Subject: [PATCH] arm64: dts: mt7986: add afe
 
 --- a/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
 +++ b/arch/arm64/boot/dts/mediatek/mt7986a.dtsi
-@@ -248,6 +248,28 @@
+@@ -249,6 +249,28 @@
  			status = "disabled";
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch b/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch
index 6dede02003..87a937be05 100644
--- a/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch
+++ b/target/linux/mediatek/patches-6.1/900-dts-mt7622-bpi-r64-aliases-for-dtoverlay.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -312,7 +312,7 @@
+@@ -313,7 +313,7 @@
  	/* Attention: GPIO 90 is used to switch between PCIe at 1,0 and
  	 * SATA functions. i.e. output-high: PCIe, output-low: SATA
  	 */
diff --git a/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch b/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch
index 09ce417c35..d1f6a96720 100644
--- a/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch
+++ b/target/linux/mediatek/patches-6.1/910-dts-mt7622-bpi-r64-wifi-eeprom.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
 +++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
-@@ -639,5 +639,28 @@
+@@ -640,5 +640,28 @@
  };
  
  &wmac {
diff --git a/target/linux/mediatek/patches-6.1/911-dts-mt7622-bpi-r64-add-rootdisk.patch b/target/linux/mediatek/patches-6.1/911-dts-mt7622-bpi-r64-add-rootdisk.patch
index 5d3153ded4..014342aad5 100644
--- a/target/linux/mediatek/patches-6.1/911-dts-mt7622-bpi-r64-add-rootdisk.patch
+++ b/target/linux/mediatek/patches-6.1/911-dts-mt7622-bpi-r64-add-rootdisk.patch
@@ -10,7 +10,7 @@
  	};
  
  	cpus {
-@@ -233,6 +236,26 @@
+@@ -234,6 +237,26 @@
  	assigned-clocks = <&topckgen CLK_TOP_MSDC30_0_SEL>;
  	assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
  	non-removable;
@@ -37,7 +37,7 @@
  };
  
  &mmc1 {
-@@ -249,6 +272,26 @@
+@@ -250,6 +273,26 @@
  	vqmmc-supply = <&reg_3p3v>;
  	assigned-clocks = <&topckgen CLK_TOP_MSDC30_1_SEL>;
  	assigned-clock-parents = <&topckgen CLK_TOP_UNIV48M>;
@@ -64,7 +64,7 @@
  };
  
  &nandc {
-@@ -283,14 +326,29 @@
+@@ -284,14 +327,29 @@
  			};
  
  			partition at 80000 {
diff --git a/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch b/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch
index 6e6810b42a..3d05bf7679 100644
--- a/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch
+++ b/target/linux/mediatek/patches-6.1/930-spi-mt65xx-enable-sel-clk.patch
@@ -1,6 +1,6 @@
 --- a/drivers/spi/spi-mt65xx.c
 +++ b/drivers/spi/spi-mt65xx.c
-@@ -1225,8 +1225,15 @@ static int mtk_spi_probe(struct platform
+@@ -1227,8 +1227,15 @@ static int mtk_spi_probe(struct platform
  	if (ret < 0)
  		return dev_err_probe(dev, ret, "failed to enable hclk\n");
  
diff --git a/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch
index 3ba485346c..da61f1c050 100644
--- a/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch
+++ b/target/linux/mediatek/patches-6.1/941-arm64-dts-mt7986-move-cpuboot-in-a-dedicated-node.patch
@@ -24,7 +24,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	};
  
  	timer {
-@@ -540,10 +534,11 @@
+@@ -541,10 +535,11 @@
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
  			memory-region = <&wo_emi0>, <&wo_ilm0>, <&wo_dlm0>,
@@ -38,7 +38,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		};
  
  		wed1: wed at 15011000 {
-@@ -553,10 +548,11 @@
+@@ -554,10 +549,11 @@
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
  			memory-region = <&wo_emi1>, <&wo_ilm1>, <&wo_dlm1>,
@@ -52,7 +52,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		};
  
  		wo_ccif0: syscon at 151a5000 {
-@@ -573,6 +569,11 @@
+@@ -574,6 +570,11 @@
  			interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch
index 0ba9bd7cf0..2f1becd1b8 100644
--- a/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch
+++ b/target/linux/mediatek/patches-6.1/945-arm64-dts-mt7986-move-ilm-in-a-dedicated-node.patch
@@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  		wo_data: wo-data at 4fd80000 {
  			reg = <0 0x4fd80000 0 0x240000>;
  			no-map;
-@@ -533,11 +523,10 @@
+@@ -534,11 +524,10 @@
  			reg = <0 0x15010000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@@ -49,7 +49,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
-@@ -547,11 +536,10 @@
+@@ -548,11 +537,10 @@
  			reg = <0 0x15011000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@@ -64,7 +64,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
-@@ -569,6 +557,16 @@
+@@ -570,6 +558,16 @@
  			interrupts = <GIC_SPI 212 IRQ_TYPE_LEVEL_HIGH>;
  		};
  
diff --git a/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch b/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch
index 90b2bb91a2..5b52a4934e 100644
--- a/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch
+++ b/target/linux/mediatek/patches-6.1/946-arm64-dts-mt7986-move-dlm-in-a-dedicated-node.patch
@@ -34,7 +34,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	};
  
  	timer {
-@@ -523,10 +513,11 @@
+@@ -524,10 +514,11 @@
  			reg = <0 0x15010000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 205 IRQ_TYPE_LEVEL_HIGH>;
@@ -48,7 +48,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
-@@ -536,10 +527,11 @@
+@@ -537,10 +528,11 @@
  			reg = <0 0x15011000 0 0x1000>;
  			interrupt-parent = <&gic>;
  			interrupts = <GIC_SPI 206 IRQ_TYPE_LEVEL_HIGH>;
@@ -62,7 +62,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  			mediatek,wo-cpuboot = <&wo_cpuboot>;
  		};
  
-@@ -567,6 +559,16 @@
+@@ -568,6 +560,16 @@
  			reg = <0 0x151f0000 0 0x8000>;
  		};
  
diff --git a/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
index f3881a0d25..7ab735af4c 100644
--- a/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
@@ -247,7 +247,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  }
 --- a/init/main.c
 +++ b/init/main.c
-@@ -112,6 +112,10 @@
+@@ -113,6 +113,10 @@
  
  #include <kunit/test.h>
  
@@ -258,7 +258,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static int kernel_init(void *);
  
  extern void init_IRQ(void);
-@@ -993,6 +997,18 @@ asmlinkage __visible void __init __no_sa
+@@ -994,6 +998,18 @@ asmlinkage __visible void __init __no_sa
  	page_alloc_init();
  
  	pr_notice("Kernel command line: %s\n", saved_command_line);
diff --git a/target/linux/x86/64/config-6.1 b/target/linux/x86/64/config-6.1
index 66ae3e35f0..3767fd4b9b 100644
--- a/target/linux/x86/64/config-6.1
+++ b/target/linux/x86/64/config-6.1
@@ -282,6 +282,7 @@ CONFIG_INTEL_IDLE=y
 CONFIG_INTEL_IOMMU=y
 # CONFIG_INTEL_IOMMU_DEFAULT_ON is not set
 CONFIG_INTEL_IOMMU_FLOPPY_WA=y
+CONFIG_INTEL_IOMMU_PERF_EVENTS=y
 # CONFIG_INTEL_IOMMU_SCALABLE_MODE_DEFAULT_ON is not set
 # CONFIG_INTEL_IOMMU_SVM is not set
 # CONFIG_INTEL_IPS is not set



From lede-commits at lists.infradead.org  Sun Apr 14 09:30:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 12:30:41 -0400
Subject: [openwrt/openwrt]  rkbin: bump to latest git HEAD
In-Reply-To: <171311224170.101747.284835452643806448@git-01.infra.openwrt.org>
References: <171311224170.101747.284835452643806448@git-01.infra.openwrt.org>
Message-ID: <mailman.27002.1713112246.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d2d064e06e6909056a7388ee1a1e915d06a50439

commit d2d064e06e6909056a7388ee1a1e915d06a50439
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Wed Apr 10 14:35:38 2024 +0800

    rkbin: bump to latest git HEAD
    
    Fixed bugs for memory initialization/training,
    improved memory compatibility/stability.
    
    Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
---
 package/boot/rkbin/Makefile          | 16 ++++++++--------
 package/boot/uboot-rockchip/Makefile |  8 ++++----
 2 files changed, 12 insertions(+), 12 deletions(-)

diff --git a/package/boot/rkbin/Makefile b/package/boot/rkbin/Makefile
index 3b6cc0d42c..4eacff042c 100644
--- a/package/boot/rkbin/Makefile
+++ b/package/boot/rkbin/Makefile
@@ -8,10 +8,10 @@ PKG_NAME:=rkbin
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_URL=https://github.com/rockchip-linux/rkbin.git
-PKG_SOURCE_DATE:=2023-07-26
-PKG_SOURCE_VERSION:=b4558da0860ca48bf1a571dd33ccba580b9abe23
-PKG_MIRROR_HASH:=7cd2cb8357fa850eb4eef94db49a2c46cf910bfe4e673eff9071413bb002afc9
+PKG_SOURCE_URL:=https://github.com/rockchip-linux/rkbin.git
+PKG_SOURCE_DATE:=2024-02-22
+PKG_SOURCE_VERSION:=a2a0b89b6c8c612dca5ed9ed8a68db8a07f68bc0
+PKG_MIRROR_HASH:=39f15e5f8fac02026065b6747b355b93f4e06202783ae448c43607763211597c
 
 PKG_LICENSE_FILES:=LICENSE
 PKG_MAINTAINER:=Tianling Shen <cnsztl at immortalwrt.org>
@@ -27,14 +27,14 @@ endef
 
 define Trusted-Firmware-A/rk3566
   BUILD_SUBTARGET:=armv8
-  ATF:=rk35/rk3568_bl31_v1.43.elf
-  TPL:=rk35/rk3566_ddr_1056MHz_v1.18.bin
+  ATF:=rk35/rk3568_bl31_v1.44.elf
+  TPL:=rk35/rk3566_ddr_1056MHz_v1.21.bin
 endef
 
 define Trusted-Firmware-A/rk3568
   BUILD_SUBTARGET:=armv8
-  ATF:=rk35/rk3568_bl31_v1.43.elf
-  TPL:=rk35/rk3568_ddr_1560MHz_v1.18.bin
+  ATF:=rk35/rk3568_bl31_v1.44.elf
+  TPL:=rk35/rk3568_ddr_1560MHz_v1.21.bin
 endef
 
 TFA_TARGETS:= \
diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile
index 89a7ccdd4b..a2dd2cffd9 100644
--- a/package/boot/uboot-rockchip/Makefile
+++ b/package/boot/uboot-rockchip/Makefile
@@ -131,8 +131,8 @@ endef
 define U-Boot/rk3566/Default
   BUILD_SUBTARGET:=armv8
   DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3566
-  ATF:=rk3568_bl31_v1.43.elf
-  TPL:=rk3566_ddr_1056MHz_v1.18.bin
+  ATF:=rk3568_bl31_v1.44.elf
+  TPL:=rk3566_ddr_1056MHz_v1.21.bin
 endef
 
 define U-Boot/radxa-cm3-io-rk3566
@@ -147,8 +147,8 @@ endef
 define U-Boot/rk3568/Default
   BUILD_SUBTARGET:=armv8
   DEPENDS:=+PACKAGE_u-boot-$(1):trusted-firmware-a-rk3568
-  ATF:=rk3568_bl31_v1.43.elf
-  TPL:=rk3568_ddr_1560MHz_v1.18.bin
+  ATF:=rk3568_bl31_v1.44.elf
+  TPL:=rk3568_ddr_1560MHz_v1.21.bin
 endef
 
 define U-Boot/nanopi-r5c-rk3568



From lede-commits at lists.infradead.org  Sun Apr 14 09:30:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 12:30:42 -0400
Subject: [openwrt/openwrt]  uboot-rockchip: Update to 2024.04
In-Reply-To: <171311224170.101747.284835452643806448@git-01.infra.openwrt.org>
References: <171311224170.101747.284835452643806448@git-01.infra.openwrt.org>
Message-ID: <mailman.27003.1713112246.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a65fceb078a7c5fd8133f7c8c4c2326dda517899

commit a65fceb078a7c5fd8133f7c8c4c2326dda517899
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Wed Apr 10 14:39:43 2024 +0800

    uboot-rockchip: Update to 2024.04
    
    Removed upstreamed patch.
    
    Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
---
 package/boot/uboot-rockchip/Makefile               |   4 +-
 ...dd-support-for-FriendlyARM-NanoPi-R2C-Plu.patch | 213 ---------------------
 2 files changed, 2 insertions(+), 215 deletions(-)

diff --git a/package/boot/uboot-rockchip/Makefile b/package/boot/uboot-rockchip/Makefile
index a2dd2cffd9..863d0157f4 100644
--- a/package/boot/uboot-rockchip/Makefile
+++ b/package/boot/uboot-rockchip/Makefile
@@ -5,9 +5,9 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
-PKG_VERSION:=2024.01
+PKG_VERSION:=2024.04
 PKG_RELEASE:=1
-PKG_HASH:=b99611f1ed237bf3541bdc8434b68c96a6e05967061f992443cb30aabebef5b3
+PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a
 
 PKG_MAINTAINER:=Tobias Maedel <openwrt at tbspace.de>
 
diff --git a/package/boot/uboot-rockchip/patches/001-board-rockchip-Add-support-for-FriendlyARM-NanoPi-R2C-Plu.patch b/package/boot/uboot-rockchip/patches/001-board-rockchip-Add-support-for-FriendlyARM-NanoPi-R2C-Plu.patch
deleted file mode 100644
index 25e063bfa9..0000000000
--- a/package/boot/uboot-rockchip/patches/001-board-rockchip-Add-support-for-FriendlyARM-NanoPi-R2C-Plu.patch
+++ /dev/null
@@ -1,213 +0,0 @@
-From 0bc16c6a8744a1c0293a31253020205b312895d3 Mon Sep 17 00:00:00 2001
-From: Tianling Shen <cnsztl at gmail.com>
-Date: Sat, 23 Dec 2023 12:00:07 +0800
-Subject: [PATCH] board: rockchip: Add support for FriendlyARM NanoPi R2C Plus
-
-The NanoPi R2C Plus is a small variant of NanoPi R2C with a on-board
-eMMC flash (8G) included.
-
-The device tree is taken from the kernel v6.5.
-
-Signed-off-by: Tianling Shen <cnsztl at gmail.com>
-Reviewed-by: Kever Yang <kever.yang at rock-chips.com>
----
- arch/arm/dts/Makefile                         |   1 +
- .../dts/rk3328-nanopi-r2c-plus-u-boot.dtsi    |   9 ++
- arch/arm/dts/rk3328-nanopi-r2c-plus.dts       |  33 +++++
- board/rockchip/evb_rk3328/MAINTAINERS         |   6 +
- configs/nanopi-r2c-plus-rk3328_defconfig      | 114 ++++++++++++++++++
- 5 files changed, 163 insertions(+)
- create mode 100644 arch/arm/dts/rk3328-nanopi-r2c-plus-u-boot.dtsi
- create mode 100644 arch/arm/dts/rk3328-nanopi-r2c-plus.dts
- create mode 100644 configs/nanopi-r2c-plus-rk3328_defconfig
-
---- a/arch/arm/dts/Makefile
-+++ b/arch/arm/dts/Makefile
-@@ -126,6 +126,7 @@ dtb-$(CONFIG_ROCKCHIP_RK3308) += \
- dtb-$(CONFIG_ROCKCHIP_RK3328) += \
- 	rk3328-evb.dtb \
- 	rk3328-nanopi-r2c.dtb \
-+	rk3328-nanopi-r2c-plus.dtb \
- 	rk3328-nanopi-r2s.dtb \
- 	rk3328-orangepi-r1-plus.dtb \
- 	rk3328-orangepi-r1-plus-lts.dtb \
---- /dev/null
-+++ b/arch/arm/dts/rk3328-nanopi-r2c-plus-u-boot.dtsi
-@@ -0,0 +1,9 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later
-+
-+#include "rk3328-nanopi-r2c-u-boot.dtsi"
-+
-+/ {
-+	chosen {
-+		u-boot,spl-boot-order = "same-as-spl", &sdmmc, &emmc;
-+	};
-+};
---- /dev/null
-+++ b/arch/arm/dts/rk3328-nanopi-r2c-plus.dts
-@@ -0,0 +1,33 @@
-+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
-+/*
-+ * Copyright (c) 2021 FriendlyElec Computer Tech. Co., Ltd.
-+ * (http://www.friendlyarm.com)
-+ *
-+ * Copyright (c) 2023 Tianling Shen <cnsztl at gmail.com>
-+ */
-+
-+/dts-v1/;
-+#include "rk3328-nanopi-r2c.dts"
-+
-+/ {
-+	model = "FriendlyElec NanoPi R2C Plus";
-+	compatible = "friendlyarm,nanopi-r2c-plus", "rockchip,rk3328";
-+
-+	aliases {
-+		mmc1 = &emmc;
-+	};
-+};
-+
-+&emmc {
-+	bus-width = <8>;
-+	cap-mmc-highspeed;
-+	max-frequency = <150000000>;
-+	mmc-ddr-1_8v;
-+	mmc-hs200-1_8v;
-+	non-removable;
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&emmc_clk &emmc_cmd &emmc_bus8>;
-+	vmmc-supply = <&vcc_io_33>;
-+	vqmmc-supply = <&vcc18_emmc>;
-+	status = "okay";
-+};
---- a/board/rockchip/evb_rk3328/MAINTAINERS
-+++ b/board/rockchip/evb_rk3328/MAINTAINERS
-@@ -11,6 +11,12 @@ S:      Maintained
- F:      configs/nanopi-r2c-rk3328_defconfig
- F:      arch/arm/dts/rk3328-nanopi-r2c-u-boot.dtsi
- 
-+NANOPI-R2C-PLUS-RK3328
-+M:      Tianling Shen <cnsztl at gmail.com>
-+S:      Maintained
-+F:      configs/nanopi-r2c-plus-rk3328_defconfig
-+F:      arch/arm/dts/rk3328-nanopi-r2c-plus-u-boot.dtsi
-+
- NANOPI-R2S-RK3328
- M:      David Bauer <mail at david-bauer.net>
- S:      Maintained
---- /dev/null
-+++ b/configs/nanopi-r2c-plus-rk3328_defconfig
-@@ -0,0 +1,114 @@
-+CONFIG_ARM=y
-+CONFIG_SKIP_LOWLEVEL_INIT=y
-+CONFIG_COUNTER_FREQUENCY=24000000
-+CONFIG_ARCH_ROCKCHIP=y
-+CONFIG_TEXT_BASE=0x00200000
-+CONFIG_SPL_GPIO=y
-+CONFIG_NR_DRAM_BANKS=1
-+CONFIG_HAS_CUSTOM_SYS_INIT_SP_ADDR=y
-+CONFIG_CUSTOM_SYS_INIT_SP_ADDR=0x300000
-+CONFIG_SF_DEFAULT_SPEED=20000000
-+CONFIG_ENV_OFFSET=0x3F8000
-+CONFIG_DEFAULT_DEVICE_TREE="rk3328-nanopi-r2c-plus"
-+CONFIG_DM_RESET=y
-+CONFIG_ROCKCHIP_RK3328=y
-+CONFIG_TPL_ROCKCHIP_COMMON_BOARD=y
-+CONFIG_TPL_LIBCOMMON_SUPPORT=y
-+CONFIG_TPL_LIBGENERIC_SUPPORT=y
-+CONFIG_SPL_DRIVERS_MISC=y
-+CONFIG_SPL_STACK_R_ADDR=0x600000
-+CONFIG_SPL_STACK=0x400000
-+CONFIG_TPL_SYS_MALLOC_F_LEN=0x800
-+CONFIG_DEBUG_UART_BASE=0xFF130000
-+CONFIG_DEBUG_UART_CLOCK=24000000
-+CONFIG_SYS_LOAD_ADDR=0x800800
-+CONFIG_DEBUG_UART=y
-+# CONFIG_ANDROID_BOOT_IMAGE is not set
-+CONFIG_FIT=y
-+CONFIG_FIT_VERBOSE=y
-+CONFIG_SPL_LOAD_FIT=y
-+CONFIG_DEFAULT_FDT_FILE="rockchip/rk3328-nanopi-r2c-plus.dtb"
-+# CONFIG_DISPLAY_CPUINFO is not set
-+CONFIG_DISPLAY_BOARDINFO_LATE=y
-+CONFIG_MISC_INIT_R=y
-+CONFIG_SPL_MAX_SIZE=0x40000
-+CONFIG_SPL_PAD_TO=0x7f8000
-+CONFIG_SPL_HAS_BSS_LINKER_SECTION=y
-+CONFIG_SPL_BSS_START_ADDR=0x2000000
-+CONFIG_SPL_BSS_MAX_SIZE=0x2000
-+# CONFIG_SPL_RAW_IMAGE_SUPPORT is not set
-+# CONFIG_SPL_SHARES_INIT_SP_ADDR is not set
-+CONFIG_SPL_STACK_R=y
-+CONFIG_SPL_I2C=y
-+CONFIG_SPL_POWER=y
-+CONFIG_SPL_ATF=y
-+CONFIG_SPL_ATF_NO_PLATFORM_PARAM=y
-+CONFIG_TPL_SYS_MALLOC_SIMPLE=y
-+CONFIG_CMD_BOOTZ=y
-+CONFIG_CMD_GPT=y
-+CONFIG_CMD_MMC=y
-+CONFIG_CMD_USB=y
-+# CONFIG_CMD_SETEXPR is not set
-+CONFIG_CMD_TIME=y
-+CONFIG_SPL_OF_CONTROL=y
-+CONFIG_TPL_OF_CONTROL=y
-+CONFIG_OF_SPL_REMOVE_PROPS="clock-names interrupt-parent assigned-clocks assigned-clock-rates assigned-clock-parents"
-+CONFIG_TPL_OF_PLATDATA=y
-+CONFIG_ENV_IS_IN_MMC=y
-+CONFIG_SYS_RELOC_GD_ENV_ADDR=y
-+CONFIG_SYS_MMC_ENV_DEV=1
-+CONFIG_NET_RANDOM_ETHADDR=y
-+CONFIG_TPL_DM=y
-+CONFIG_REGMAP=y
-+CONFIG_SPL_REGMAP=y
-+CONFIG_TPL_REGMAP=y
-+CONFIG_SYSCON=y
-+CONFIG_SPL_SYSCON=y
-+CONFIG_TPL_SYSCON=y
-+CONFIG_CLK=y
-+CONFIG_SPL_CLK=y
-+CONFIG_FASTBOOT_BUF_ADDR=0x800800
-+CONFIG_FASTBOOT_CMD_OEM_FORMAT=y
-+CONFIG_ROCKCHIP_GPIO=y
-+CONFIG_SYS_I2C_ROCKCHIP=y
-+CONFIG_MISC=y
-+CONFIG_MMC_DW=y
-+CONFIG_MMC_DW_ROCKCHIP=y
-+CONFIG_ETH_DESIGNWARE=y
-+CONFIG_GMAC_ROCKCHIP=y
-+CONFIG_PHY_ROCKCHIP_INNO_USB2=y
-+CONFIG_PINCTRL=y
-+CONFIG_SPL_PINCTRL=y
-+CONFIG_DM_PMIC=y
-+CONFIG_PMIC_RK8XX=y
-+CONFIG_SPL_PMIC_RK8XX=y
-+CONFIG_SPL_DM_REGULATOR=y
-+CONFIG_REGULATOR_PWM=y
-+CONFIG_DM_REGULATOR_FIXED=y
-+CONFIG_SPL_DM_REGULATOR_FIXED=y
-+CONFIG_REGULATOR_RK8XX=y
-+CONFIG_PWM_ROCKCHIP=y
-+CONFIG_RAM=y
-+CONFIG_SPL_RAM=y
-+CONFIG_TPL_RAM=y
-+CONFIG_BAUDRATE=1500000
-+CONFIG_DEBUG_UART_SHIFT=2
-+CONFIG_SYS_NS16550_MEM32=y
-+CONFIG_SYSINFO=y
-+CONFIG_SYSRESET=y
-+# CONFIG_TPL_SYSRESET is not set
-+CONFIG_USB=y
-+CONFIG_USB_XHCI_HCD=y
-+CONFIG_USB_EHCI_HCD=y
-+CONFIG_USB_EHCI_GENERIC=y
-+CONFIG_USB_OHCI_HCD=y
-+CONFIG_USB_OHCI_GENERIC=y
-+CONFIG_USB_DWC2=y
-+CONFIG_USB_DWC3=y
-+# CONFIG_USB_DWC3_GADGET is not set
-+CONFIG_USB_DWC3_GENERIC=y
-+CONFIG_USB_GADGET=y
-+CONFIG_USB_GADGET_DWC2_OTG=y
-+CONFIG_SPL_TINY_MEMSET=y
-+CONFIG_TPL_TINY_MEMSET=y
-+CONFIG_ERRNO_STR=y



From lede-commits at lists.infradead.org  Sun Apr 14 10:21:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 13:21:49 -0400
Subject: [openwrt/openwrt]  ath79: add support for Comfast CF-EW71 v2
In-Reply-To: <171311530900.189557.12390952293295305073@git-01.infra.openwrt.org>
References: <171311530900.189557.12390952293295305073@git-01.infra.openwrt.org>
Message-ID: <mailman.27017.1713115315.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ee3a6adc6c22b2388eb3901bda335fd145c7355e

commit ee3a6adc6c22b2388eb3901bda335fd145c7355e
Author: Felix Golatofski <git at xdfr.de>
AuthorDate: Wed Jan 10 00:44:35 2024 +0100

    ath79: add support for Comfast CF-EW71 v2
    
    Specifications:
    Qualcomm/Atheros QCA9531
    2x 10/100 Mbps Ethernet, with 48v PoE
    2T2R 2.4 GHz, 802.11b/g/n
    128MB RAM
    16MB SPI Flash
    4x LED (Always On Power, LAN, WAN, WLAN)
    
    Flashing instructions:
    The original firmware is based on OpenWrt, so flashing the sysupgrade image over the factory firmware is sufficient.
    The bootloader has a built-in recovery web-ui. This is the method I used to flash OpenWrt. You can get to the recovery web-ui by holding down the reset button for a few seconds (~5s) while pluggin in the router. The LEDs should start blinking fast and the router should be available on 192.168.1.1 for the recovery.
    
    Tested: Reset button, WAN LED, LAN LED, Power LED (always on, not much to test), WLAN LED, MAC addresses (same as factory firmware).
    
    Signed-off-by: Felix Golatofski <git at xdfr.de>
---
 .../linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts | 143 +++++++++++++++++++++
 .../ath79/generic/base-files/etc/board.d/01_leds   |   1 +
 target/linux/ath79/image/generic.mk                |  10 ++
 3 files changed, 154 insertions(+)

diff --git a/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts b/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts
new file mode 100644
index 0000000000..05873f173d
--- /dev/null
+++ b/target/linux/ath79/dts/qca9531_comfast_cf-ew71-v2.dts
@@ -0,0 +1,143 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "qca953x.dtsi"
+
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	compatible = "comfast,cf-ew71-v2", "qca,qca9531";
+	model = "COMFAST CF-EW71 v2";
+
+	aliases {
+		serial0 = &uart;
+		led-boot = &led_wan;
+		led-failsafe = &led_wan;
+		led-upgrade = &led_wan;
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		pinctrl-names = "default";
+		pinctrl-0 = <&jtag_disable_pins>;
+
+		lan {
+			function = LED_FUNCTION_LAN;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
+		};
+
+		led_wan: wan {
+			function = LED_FUNCTION_WAN;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&gpio 11 GPIO_ACTIVE_LOW>;
+		};
+
+		wlan {
+			function = LED_FUNCTION_WLAN;
+			color = <LED_COLOR_ID_BLUE>;
+			gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+			linux,default-trigger = "phy0tpt";
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&gpio 17 GPIO_ACTIVE_LOW>;
+			debounce-interval = <60>;
+		};
+	};
+
+	watchdog {
+		compatible = "linux,wdt-gpio";
+
+		gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+		hw_algo = "toggle";
+		hw_margin_ms = <1200>;
+		always-running;
+	};
+};
+
+&pcie0 {
+	status = "okay";
+};
+
+&spi {
+	status = "okay";
+
+	flash at 0 {
+		compatible = "winbond,w25q128", "jedec,spi-nor";
+		reg = <0>;
+		spi-max-frequency = <25000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "u-boot";
+				reg = <0x000000 0x010000>;
+				read-only;
+			};
+
+			art: partition at 10000 {
+				label = "art";
+				reg = <0x010000 0x010000>;
+				read-only;
+
+				nvmem-layout {
+					compatible = "fixed-layout";
+					#address-cells = <1>;
+					#size-cells = <1>;
+
+					macaddr_art_0: macaddr at 0 {
+						compatible = "mac-base";
+						reg = <0x0 0x6>;
+						#nvmem-cell-cells = <1>;
+					};
+				};
+			};
+
+			partition at 20000 {
+				compatible = "denx,uimage";
+				label = "firmware";
+				reg = <0x020000 0xfd0000>;
+			};
+
+			partition at ff0000 {
+				label = "nvram";
+				reg = <0xff0000 0x010000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&eth0 {
+	status = "okay";
+
+	phy-handle = <&swphy4>;
+
+	nvmem-cells = <&macaddr_art_0 1>;
+	nvmem-cell-names = "mac-address";
+};
+
+&eth1 {
+	nvmem-cells = <&macaddr_art_0 0>;
+	nvmem-cell-names = "mac-address";
+};
+
+&wmac {
+	status = "okay";
+
+	mtd-cal-data = <&art 0x1000>;
+	nvmem-cells = <&macaddr_art_0 3>;
+	nvmem-cell-names = "mac-address";
+};
diff --git a/target/linux/ath79/generic/base-files/etc/board.d/01_leds b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
index 2974855870..18fe436dbc 100644
--- a/target/linux/ath79/generic/base-files/etc/board.d/01_leds
+++ b/target/linux/ath79/generic/base-files/etc/board.d/01_leds
@@ -199,6 +199,7 @@ comfast,cf-e560ac)
 	ucidef_set_led_switch "lan3" "LAN3" "blue:lan3" "switch0" "0x08"
 	ucidef_set_led_switch "lan4" "LAN4" "blue:lan4" "switch0" "0x10"
 	;;
+comfast,cf-ew71-v2|\
 comfast,cf-ew72|\
 openmesh,om2p-v2|\
 openmesh,om2p-hs-v1|\
diff --git a/target/linux/ath79/image/generic.mk b/target/linux/ath79/image/generic.mk
index 502fdc2ed4..bf300dd18d 100644
--- a/target/linux/ath79/image/generic.mk
+++ b/target/linux/ath79/image/generic.mk
@@ -828,6 +828,16 @@ define Device/comfast_cf-e560ac
 endef
 TARGET_DEVICES += comfast_cf-e560ac
 
+define Device/comfast_cf-ew71-v2
+  SOC := qca9531
+  DEVICE_VENDOR := COMFAST
+  DEVICE_MODEL := CF-EW71
+  DEVICE_VARIANT := v2
+  DEVICE_PACKAGES := kmod-usb2 -uboot-envtools -swconfig
+  IMAGE_SIZE := 16192k
+endef
+TARGET_DEVICES += comfast_cf-ew71-v2
+
 define Device/comfast_cf-ew72
   SOC := qca9531
   DEVICE_VENDOR := COMFAST



From lede-commits at lists.infradead.org  Sun Apr 14 10:48:12 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 13:48:12 -0400
Subject: [openwrt/openwrt]  kernel: add pending patches for new LED_FUNCTION_*
 definitions
In-Reply-To: <171311689221.233284.12725089007750405207@git-01.infra.openwrt.org>
References: <171311689221.233284.12725089007750405207@git-01.infra.openwrt.org>
Message-ID: <mailman.27020.1713116897.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3bdc68279a18a1e15d309c3c49e37697bca20247

commit 3bdc68279a18a1e15d309c3c49e37697bca20247
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Wed Mar 20 20:14:36 2024 +0900

    kernel: add pending patches for new LED_FUNCTION_* definitions
    
    Add pending patches to add LED_FUNCTION_MOBILE and LED_FUNCTION_SPEED_*
    definitions for Fortinet FortiGate devices and IIJ SA-W2.
    
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 ...-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch | 37 ++++++++++++++++++++++
 ...-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch | 37 ++++++++++++++++++++++
 ...-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch | 37 ++++++++++++++++++++++
 ...-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch | 37 ++++++++++++++++++++++
 ...-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch | 37 ++++++++++++++++++++++
 ...-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch | 37 ++++++++++++++++++++++
 6 files changed, 222 insertions(+)

diff --git a/target/linux/generic/pending-5.15/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch b/target/linux/generic/pending-5.15/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch
new file mode 100644
index 0000000000..04c6efe3e8
--- /dev/null
+++ b/target/linux/generic/pending-5.15/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch
@@ -0,0 +1,37 @@
+From 38eb5b3370c29515d2ce92adac2d6eba96f276f5 Mon Sep 17 00:00:00 2001
+From: INAGAKI Hiroshi <musashino.open at gmail.com>
+Date: Wed, 20 Mar 2024 15:32:18 +0900
+Subject: [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile
+ network
+
+Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network
+connection. This is useful to distinguish those LEDs from LEDs that
+indicates status of wired "wan" connection.
+
+example (on stock fw):
+
+IIJ SA-W2 has "Mobile" LEDs that indicate status (no signal, too low,
+low, good) of mobile network connection via dongle connected to USB
+port.
+
+- no signal: (none, turned off)
+-   too low: green:mobile & red:mobile (amber, blink)
+-       low: green:mobile & red:mobile (amber, turned on)
+-      good: green:mobile (turned on)
+
+Suggested-by: Hauke Mehrtens <hauke at hauke-m.de>
+Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
+---
+ include/dt-bindings/leds/common.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/dt-bindings/leds/common.h
++++ b/include/dt-bindings/leds/common.h
+@@ -83,6 +83,7 @@
+ #define LED_FUNCTION_INDICATOR "indicator"
+ #define LED_FUNCTION_LAN "lan"
+ #define LED_FUNCTION_MAIL "mail"
++#define LED_FUNCTION_MOBILE "mobile"
+ #define LED_FUNCTION_MTD "mtd"
+ #define LED_FUNCTION_PANIC "panic"
+ #define LED_FUNCTION_PROGRAMMING "programming"
diff --git a/target/linux/generic/pending-5.15/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch b/target/linux/generic/pending-5.15/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch
new file mode 100644
index 0000000000..e601481446
--- /dev/null
+++ b/target/linux/generic/pending-5.15/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch
@@ -0,0 +1,37 @@
+From e22afe910afcfb51b6ba6a0ae776939959727f54 Mon Sep 17 00:00:00 2001
+From: INAGAKI Hiroshi <musashino.open at gmail.com>
+Date: Wed, 20 Mar 2024 15:59:06 +0900
+Subject: [PATCH v2 2/2] dt-bindings: leds: add LED_FUNCTION_SPEED_* for link
+ speed on LAN/WAN
+
+Add LED_FUNCTION_SPEED_LAN and LED_FUNCTION_SPEED_WAN for LEDs that
+indicate link speed of ethernet ports on LAN/WAN. This is useful to
+distinguish those LEDs from LEDs that indicate link status (up/down).
+
+example:
+
+Fortinet FortiGate 30E/50E have LEDs that indicate link speed on each
+of the ethernet ports in addition to LEDs that indicate link status
+(up/down).
+
+- 1000 Mbps: green:speed-(lan|wan)-N
+-  100 Mbps: amber:speed-(lan|wan)-N
+-   10 Mbps: (none, turned off)
+
+Reviewed-by: Rob Herring <robh at kernel.org>
+Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
+---
+ include/dt-bindings/leds/common.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/include/dt-bindings/leds/common.h
++++ b/include/dt-bindings/leds/common.h
+@@ -89,6 +89,8 @@
+ #define LED_FUNCTION_PROGRAMMING "programming"
+ #define LED_FUNCTION_RX "rx"
+ #define LED_FUNCTION_SD "sd"
++#define LED_FUNCTION_SPEED_LAN "speed-lan"
++#define LED_FUNCTION_SPEED_WAN "speed-wan"
+ #define LED_FUNCTION_STANDBY "standby"
+ #define LED_FUNCTION_TORCH "torch"
+ #define LED_FUNCTION_TX "tx"
diff --git a/target/linux/generic/pending-6.1/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch b/target/linux/generic/pending-6.1/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch
new file mode 100644
index 0000000000..3321b03f28
--- /dev/null
+++ b/target/linux/generic/pending-6.1/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch
@@ -0,0 +1,37 @@
+From 38eb5b3370c29515d2ce92adac2d6eba96f276f5 Mon Sep 17 00:00:00 2001
+From: INAGAKI Hiroshi <musashino.open at gmail.com>
+Date: Wed, 20 Mar 2024 15:32:18 +0900
+Subject: [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile
+ network
+
+Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network
+connection. This is useful to distinguish those LEDs from LEDs that
+indicates status of wired "wan" connection.
+
+example (on stock fw):
+
+IIJ SA-W2 has "Mobile" LEDs that indicate status (no signal, too low,
+low, good) of mobile network connection via dongle connected to USB
+port.
+
+- no signal: (none, turned off)
+-   too low: green:mobile & red:mobile (amber, blink)
+-       low: green:mobile & red:mobile (amber, turned on)
+-      good: green:mobile (turned on)
+
+Suggested-by: Hauke Mehrtens <hauke at hauke-m.de>
+Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
+---
+ include/dt-bindings/leds/common.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/dt-bindings/leds/common.h
++++ b/include/dt-bindings/leds/common.h
+@@ -90,6 +90,7 @@
+ #define LED_FUNCTION_INDICATOR "indicator"
+ #define LED_FUNCTION_LAN "lan"
+ #define LED_FUNCTION_MAIL "mail"
++#define LED_FUNCTION_MOBILE "mobile"
+ #define LED_FUNCTION_MTD "mtd"
+ #define LED_FUNCTION_PANIC "panic"
+ #define LED_FUNCTION_PROGRAMMING "programming"
diff --git a/target/linux/generic/pending-6.1/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch b/target/linux/generic/pending-6.1/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch
new file mode 100644
index 0000000000..ab27cd3399
--- /dev/null
+++ b/target/linux/generic/pending-6.1/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch
@@ -0,0 +1,37 @@
+From e22afe910afcfb51b6ba6a0ae776939959727f54 Mon Sep 17 00:00:00 2001
+From: INAGAKI Hiroshi <musashino.open at gmail.com>
+Date: Wed, 20 Mar 2024 15:59:06 +0900
+Subject: [PATCH v2 2/2] dt-bindings: leds: add LED_FUNCTION_SPEED_* for link
+ speed on LAN/WAN
+
+Add LED_FUNCTION_SPEED_LAN and LED_FUNCTION_SPEED_WAN for LEDs that
+indicate link speed of ethernet ports on LAN/WAN. This is useful to
+distinguish those LEDs from LEDs that indicate link status (up/down).
+
+example:
+
+Fortinet FortiGate 30E/50E have LEDs that indicate link speed on each
+of the ethernet ports in addition to LEDs that indicate link status
+(up/down).
+
+- 1000 Mbps: green:speed-(lan|wan)-N
+-  100 Mbps: amber:speed-(lan|wan)-N
+-   10 Mbps: (none, turned off)
+
+Reviewed-by: Rob Herring <robh at kernel.org>
+Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
+---
+ include/dt-bindings/leds/common.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/include/dt-bindings/leds/common.h
++++ b/include/dt-bindings/leds/common.h
+@@ -96,6 +96,8 @@
+ #define LED_FUNCTION_PROGRAMMING "programming"
+ #define LED_FUNCTION_RX "rx"
+ #define LED_FUNCTION_SD "sd"
++#define LED_FUNCTION_SPEED_LAN "speed-lan"
++#define LED_FUNCTION_SPEED_WAN "speed-wan"
+ #define LED_FUNCTION_STANDBY "standby"
+ #define LED_FUNCTION_TORCH "torch"
+ #define LED_FUNCTION_TX "tx"
diff --git a/target/linux/generic/pending-6.6/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch b/target/linux/generic/pending-6.6/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch
new file mode 100644
index 0000000000..3321b03f28
--- /dev/null
+++ b/target/linux/generic/pending-6.6/880-01-dt-bindings-leds-add-LED_FUNCTION_MOBILE-for-mobile-.patch
@@ -0,0 +1,37 @@
+From 38eb5b3370c29515d2ce92adac2d6eba96f276f5 Mon Sep 17 00:00:00 2001
+From: INAGAKI Hiroshi <musashino.open at gmail.com>
+Date: Wed, 20 Mar 2024 15:32:18 +0900
+Subject: [PATCH v2 1/2] dt-bindings: leds: add LED_FUNCTION_MOBILE for mobile
+ network
+
+Add LED_FUNCTION_MOBILE for LEDs that indicate status of mobile network
+connection. This is useful to distinguish those LEDs from LEDs that
+indicates status of wired "wan" connection.
+
+example (on stock fw):
+
+IIJ SA-W2 has "Mobile" LEDs that indicate status (no signal, too low,
+low, good) of mobile network connection via dongle connected to USB
+port.
+
+- no signal: (none, turned off)
+-   too low: green:mobile & red:mobile (amber, blink)
+-       low: green:mobile & red:mobile (amber, turned on)
+-      good: green:mobile (turned on)
+
+Suggested-by: Hauke Mehrtens <hauke at hauke-m.de>
+Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
+---
+ include/dt-bindings/leds/common.h | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/include/dt-bindings/leds/common.h
++++ b/include/dt-bindings/leds/common.h
+@@ -90,6 +90,7 @@
+ #define LED_FUNCTION_INDICATOR "indicator"
+ #define LED_FUNCTION_LAN "lan"
+ #define LED_FUNCTION_MAIL "mail"
++#define LED_FUNCTION_MOBILE "mobile"
+ #define LED_FUNCTION_MTD "mtd"
+ #define LED_FUNCTION_PANIC "panic"
+ #define LED_FUNCTION_PROGRAMMING "programming"
diff --git a/target/linux/generic/pending-6.6/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch b/target/linux/generic/pending-6.6/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch
new file mode 100644
index 0000000000..ab27cd3399
--- /dev/null
+++ b/target/linux/generic/pending-6.6/880-02-dt-bindings-leds-add-LED_FUNCTION_SPEED_-for-link-sp.patch
@@ -0,0 +1,37 @@
+From e22afe910afcfb51b6ba6a0ae776939959727f54 Mon Sep 17 00:00:00 2001
+From: INAGAKI Hiroshi <musashino.open at gmail.com>
+Date: Wed, 20 Mar 2024 15:59:06 +0900
+Subject: [PATCH v2 2/2] dt-bindings: leds: add LED_FUNCTION_SPEED_* for link
+ speed on LAN/WAN
+
+Add LED_FUNCTION_SPEED_LAN and LED_FUNCTION_SPEED_WAN for LEDs that
+indicate link speed of ethernet ports on LAN/WAN. This is useful to
+distinguish those LEDs from LEDs that indicate link status (up/down).
+
+example:
+
+Fortinet FortiGate 30E/50E have LEDs that indicate link speed on each
+of the ethernet ports in addition to LEDs that indicate link status
+(up/down).
+
+- 1000 Mbps: green:speed-(lan|wan)-N
+-  100 Mbps: amber:speed-(lan|wan)-N
+-   10 Mbps: (none, turned off)
+
+Reviewed-by: Rob Herring <robh at kernel.org>
+Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
+---
+ include/dt-bindings/leds/common.h | 2 ++
+ 1 file changed, 2 insertions(+)
+
+--- a/include/dt-bindings/leds/common.h
++++ b/include/dt-bindings/leds/common.h
+@@ -96,6 +96,8 @@
+ #define LED_FUNCTION_PROGRAMMING "programming"
+ #define LED_FUNCTION_RX "rx"
+ #define LED_FUNCTION_SD "sd"
++#define LED_FUNCTION_SPEED_LAN "speed-lan"
++#define LED_FUNCTION_SPEED_WAN "speed-wan"
+ #define LED_FUNCTION_STANDBY "standby"
+ #define LED_FUNCTION_TORCH "torch"
+ #define LED_FUNCTION_TX "tx"



From lede-commits at lists.infradead.org  Sun Apr 14 10:48:14 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 13:48:14 -0400
Subject: [openwrt/openwrt]  mvebu: fix LEDs on IIJ SA-W2
In-Reply-To: <171311689221.233284.12725089007750405207@git-01.infra.openwrt.org>
References: <171311689221.233284.12725089007750405207@git-01.infra.openwrt.org>
Message-ID: <mailman.27023.1713116897.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e0cc69bef4b87cabaa2e065a81e1a2c2749ce53e

commit e0cc69bef4b87cabaa2e065a81e1a2c2749ce53e
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sun Feb 18 15:01:51 2024 +0900

    mvebu: fix LEDs on IIJ SA-W2
    
    On IIJ SA-W2, some multiple LEDs have no "function" property and only
    "color" property is available for the newer binding of LED on Linux
    Kernel.
    9d93b6d091 ("mvebu: drop redundant label with new LED color/function
    format") removes "label" property from LEDs, then, multiple "<color>:"
    (ex.: "green:"/"red:") will be appeared and renamed to "<color>:_<num>"
    (ex.: "green:_1", "green:_2", ...) by kernel.
    
    log:
    
    [    1.911118] leds-gpio leds: Led green: renamed to green:_1 due to name collision
    [    1.918600] leds-gpio leds: Led red: renamed to red:_1 due to name collision
    [    1.925727] leds-gpio leds: Led green: renamed to green:_2 due to name collision
    [    1.933202] leds-gpio leds: Led red: renamed to red:_2 due to name collision
    [    1.940321] leds-gpio leds: Led green: renamed to green:_3 due to name collision
    [    1.947797] leds-gpio leds: Led red: renamed to red:_3 due to name collision
    [    1.954939] leds-gpio leds: Led green: renamed to green:_4 due to name collision
    [    1.962456] leds-gpio leds: Led green: renamed to green:_5 due to name collision
    
    /sys/class/leds:
    
    root at OpenWrt:/# ls /sys/class/leds/
    green:        green:_3      green:status  red:_2
    green:_1      green:_4      red:          red:_3
    green:_2      green:_5      red:_1        red:status
    
    Fix this issue by adding missing "function" (and "function-enumerator")
    property to those LEDs on IIJ SA-W2.
    
    Fixes: 9d93b6d091 ("mvebu: drop redundant label with new LED color/function format")
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts     | 12 ++++++++++++
 .../arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts       | 12 ++++++++++++
 2 files changed, 24 insertions(+)

diff --git a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts
index 335a2ecf96..01c1ef675b 100644
--- a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts
+++ b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-380-iij-sa-w2.dts
@@ -68,12 +68,14 @@
 		led-0 {
 			gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_5GHZ;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		led-1 {
 			gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_WLAN_5GHZ;
 		};
 
 		led-2 {
@@ -91,37 +93,45 @@
 		led-4 {
 			gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_MOBILE;
 		};
 
 		led-5 {
 			gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_MOBILE;
 		};
 
 		led-6 {
 			gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
 			linux,default-trigger = "phy1tpt";
 		};
 
 		led-7 {
 			gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_WLAN_2GHZ;
 		};
 
 		led_power_green: led-8 {
 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_POWER;
 		};
 
 		led_power_red: led-9 {
 			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_POWER;
 		};
 
 		led-10 {
 			gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_USB;
+			function-enumerator = <1>;
 			linux,default-trigger = "usbport";
 			trigger-sources = <&hub_port2>;
 		};
@@ -129,6 +139,8 @@
 		led-11 {
 			gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_USB;
+			function-enumerator = <0>;
 			linux,default-trigger = "usbport";
 			trigger-sources = <&hub_port1>;
 		};
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts
index 335a2ecf96..01c1ef675b 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-380-iij-sa-w2.dts
@@ -68,12 +68,14 @@
 		led-0 {
 			gpios = <&gpio0 19 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_5GHZ;
 			linux,default-trigger = "phy0tpt";
 		};
 
 		led-1 {
 			gpios = <&gpio0 20 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_WLAN_5GHZ;
 		};
 
 		led-2 {
@@ -91,37 +93,45 @@
 		led-4 {
 			gpios = <&gpio1 3 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_MOBILE;
 		};
 
 		led-5 {
 			gpios = <&gpio1 4 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_MOBILE;
 		};
 
 		led-6 {
 			gpios = <&gpio1 12 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
 			linux,default-trigger = "phy1tpt";
 		};
 
 		led-7 {
 			gpios = <&gpio1 13 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_WLAN_2GHZ;
 		};
 
 		led_power_green: led-8 {
 			gpios = <&gpio1 14 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_POWER;
 		};
 
 		led_power_red: led-9 {
 			gpios = <&gpio1 15 GPIO_ACTIVE_HIGH>;
 			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_POWER;
 		};
 
 		led-10 {
 			gpios = <&gpio1 22 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_USB;
+			function-enumerator = <1>;
 			linux,default-trigger = "usbport";
 			trigger-sources = <&hub_port2>;
 		};
@@ -129,6 +139,8 @@
 		led-11 {
 			gpios = <&gpio1 23 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_USB;
+			function-enumerator = <0>;
 			linux,default-trigger = "usbport";
 			trigger-sources = <&hub_port1>;
 		};



From lede-commits at lists.infradead.org  Sun Apr 14 10:48:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 13:48:13 -0400
Subject: [openwrt/openwrt]  mvebu: fix LEDs on Fortinet FortiGate devices
In-Reply-To: <171311689221.233284.12725089007750405207@git-01.infra.openwrt.org>
References: <171311689221.233284.12725089007750405207@git-01.infra.openwrt.org>
Message-ID: <mailman.27024.1713116899.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5038ec5bba5ccdaf9a78d8fa4dc8ef910d554bc1

commit 5038ec5bba5ccdaf9a78d8fa4dc8ef910d554bc1
Author: INAGAKI Hiroshi <musashino.open at gmail.com>
AuthorDate: Sat Feb 17 19:27:42 2024 +0900

    mvebu: fix LEDs on Fortinet FortiGate devices
    
    On Fortinet FortiGate 30E/50E, some multiple LEDs have no "function"
    property and only "color" property is available for the new binding of
    LED on Linux Kernel.
    9d93b6d091 ("mvebu: drop redundant label with new LED color/function
    format") removes "label" property from LEDs, then, multiple "<color>:"
    (ex.: "green:"/"red:"/"amber:") will be appeared as LED names and
    renamed to "<color>:_<num>" (ex.: "green:_1", "green:_2", ...) by
    kernel.
    
    log:
    
    [   12.425170] leds-gpio gpio-leds: Led green: renamed to green:_1 due to name collision
    [   12.520390] leds-gpio gpio-leds: Led amber: renamed to amber:_1 due to name collision
    [   12.614931] leds-gpio gpio-leds: Led green: renamed to green:_2 due to name collision
    [   12.709895] leds-gpio gpio-leds: Led green: renamed to green:_3 due to name collision
    [   12.804439] leds-gpio gpio-leds: Led amber: renamed to amber:_2 due to name collision
    [   12.898969] leds-gpio gpio-leds: Led green: renamed to green:_4 due to name collision
    [   12.993504] leds-gpio gpio-leds: Led amber: renamed to amber:_3 due to name collision
    [   13.088033] leds-gpio gpio-leds: Led green: renamed to green:_5 due to name collision
    [   13.182570] leds-gpio gpio-leds: Led green: renamed to green:_6 due to name collision
    [   13.277103] leds-gpio gpio-leds: Led amber: renamed to amber:_4 due to name collision
    [   13.371636] leds-gpio gpio-leds: Led green: renamed to green:_7 due to name collision
    
    /sys/class/leds:
    
    root at OpenWrt:/# ls /sys/class/leds/
    amber:        amber:_4      green:_2      green:_6      red:alarm
    amber:_1      amber:alarm   green:_3      green:_7      red:status
    amber:_2      green:        green:_4      green:status
    amber:_3      green:_1      green:_5      red:
    
    Fix this issue by adding missing "function" (and "function-enumerator")
    property those to LEDs on Fortinet FortiGate devices.
    Note: there is no appropriate function for "ha" LEDs in
    dt-bindings/leds/common.h, so use the hardcoded string for them instead.
    
    Fixes: 9d93b6d091 ("mvebu: drop redundant label with new LED color/function format")
    Signed-off-by: INAGAKI Hiroshi <musashino.open at gmail.com>
---
 .../arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts   |  2 ++
 .../arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts   |  8 ++++++++
 .../arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi  | 18 ++++++++++++++++++
 .../boot/dts/marvell/armada-385-fortinet-fg-30e.dts    |  2 ++
 .../boot/dts/marvell/armada-385-fortinet-fg-50e.dts    |  8 ++++++++
 .../boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi   | 18 ++++++++++++++++++
 6 files changed, 56 insertions(+)

diff --git a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts
index c0900d7126..dca6fbacf0 100644
--- a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts
+++ b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-30e.dts
@@ -16,12 +16,14 @@
 	led-14 {
 		gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_AMBER>;
+		function = LED_FUNCTION_SPEED_WAN;
 		linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
 	};
 
 	led-15 {
 		gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_SPEED_WAN;
 		linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
 	};
 };
diff --git a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts
index d202d71c7f..cf13bb5fda 100644
--- a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts
+++ b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-50e.dts
@@ -16,24 +16,32 @@
 	led-14 {
 		gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_SPEED_WAN;
+		function-enumerator = <1>;
 		linux,default-trigger = "f1072004.mdio-mii:00:1Gbps";
 	};
 
 	led-15 {
 		gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_SPEED_WAN;
+		function-enumerator = <2>;
 		linux,default-trigger = "f1072004.mdio-mii:01:1Gbps";
 	};
 
 	led-16 {
 		gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_AMBER>;
+		function = LED_FUNCTION_SPEED_LAN;
+		function-enumerator = <5>;
 		linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
 	};
 
 	led-17 {
 		gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_SPEED_LAN;
+		function-enumerator = <5>;
 		linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
 	};
 };
diff --git a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi
index 8cc2d6bc4a..6a5e016d30 100644
--- a/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi
+++ b/target/linux/mvebu/files-6.1/arch/arm/boot/dts/armada-385-fortinet-fg-x0e.dtsi
@@ -54,6 +54,7 @@
 		led-1 {
 			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_RED>;
+			function = "ha";
 		};
 
 		led_status_green: led-2 {
@@ -65,6 +66,7 @@
 		led-3 {
 			gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = "ha";
 		};
 
 		led-4 {
@@ -82,48 +84,64 @@
 		led-6 {
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <4>;
 			linux,default-trigger = "mv88e6xxx-1:01:1Gbps";
 		};
 
 		led-7 {
 			gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <4>;
 			linux,default-trigger = "mv88e6xxx-1:01:100Mbps";
 		};
 
 		led-8 {
 			gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <3>;
 			linux,default-trigger = "mv88e6xxx-1:02:100Mbps";
 		};
 
 		led-9 {
 			gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <3>;
 			linux,default-trigger = "mv88e6xxx-1:02:1Gbps";
 		};
 
 		led-10 {
 			gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <1>;
 			linux,default-trigger = "mv88e6xxx-1:04:1Gbps";
 		};
 
 		led-11 {
 			gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <1>;
 			linux,default-trigger = "mv88e6xxx-1:04:100Mbps";
 		};
 
 		led-12 {
 			gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <2>;
 			linux,default-trigger = "mv88e6xxx-1:03:1Gbps";
 		};
 
 		led-13 {
 			gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <2>;
 			linux,default-trigger = "mv88e6xxx-1:03:100Mbps";
 		};
 	};
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
index c0900d7126..dca6fbacf0 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-30e.dts
@@ -16,12 +16,14 @@
 	led-14 {
 		gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_AMBER>;
+		function = LED_FUNCTION_SPEED_WAN;
 		linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
 	};
 
 	led-15 {
 		gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_SPEED_WAN;
 		linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
 	};
 };
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
index d202d71c7f..cf13bb5fda 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-50e.dts
@@ -16,24 +16,32 @@
 	led-14 {
 		gpios = <&gpio2 0 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_SPEED_WAN;
+		function-enumerator = <1>;
 		linux,default-trigger = "f1072004.mdio-mii:00:1Gbps";
 	};
 
 	led-15 {
 		gpios = <&gpio2 1 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_SPEED_WAN;
+		function-enumerator = <2>;
 		linux,default-trigger = "f1072004.mdio-mii:01:1Gbps";
 	};
 
 	led-16 {
 		gpios = <&gpio2 2 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_AMBER>;
+		function = LED_FUNCTION_SPEED_LAN;
+		function-enumerator = <5>;
 		linux,default-trigger = "mv88e6xxx-1:00:100Mbps";
 	};
 
 	led-17 {
 		gpios = <&gpio2 3 GPIO_ACTIVE_HIGH>;
 		color = <LED_COLOR_ID_GREEN>;
+		function = LED_FUNCTION_SPEED_LAN;
+		function-enumerator = <5>;
 		linux,default-trigger = "mv88e6xxx-1:00:1Gbps";
 	};
 };
diff --git a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi
index 8cc2d6bc4a..6a5e016d30 100644
--- a/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi
+++ b/target/linux/mvebu/files-6.6/arch/arm/boot/dts/marvell/armada-385-fortinet-fg-x0e.dtsi
@@ -54,6 +54,7 @@
 		led-1 {
 			gpios = <&gpio1 0 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_RED>;
+			function = "ha";
 		};
 
 		led_status_green: led-2 {
@@ -65,6 +66,7 @@
 		led-3 {
 			gpios = <&gpio1 3 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = "ha";
 		};
 
 		led-4 {
@@ -82,48 +84,64 @@
 		led-6 {
 			gpios = <&gpio2 4 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <4>;
 			linux,default-trigger = "mv88e6xxx-1:01:1Gbps";
 		};
 
 		led-7 {
 			gpios = <&gpio2 5 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <4>;
 			linux,default-trigger = "mv88e6xxx-1:01:100Mbps";
 		};
 
 		led-8 {
 			gpios = <&gpio2 6 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <3>;
 			linux,default-trigger = "mv88e6xxx-1:02:100Mbps";
 		};
 
 		led-9 {
 			gpios = <&gpio2 7 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <3>;
 			linux,default-trigger = "mv88e6xxx-1:02:1Gbps";
 		};
 
 		led-10 {
 			gpios = <&gpio2 12 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <1>;
 			linux,default-trigger = "mv88e6xxx-1:04:1Gbps";
 		};
 
 		led-11 {
 			gpios = <&gpio2 13 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <1>;
 			linux,default-trigger = "mv88e6xxx-1:04:100Mbps";
 		};
 
 		led-12 {
 			gpios = <&gpio2 14 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <2>;
 			linux,default-trigger = "mv88e6xxx-1:03:1Gbps";
 		};
 
 		led-13 {
 			gpios = <&gpio2 15 GPIO_ACTIVE_LOW>;
 			color = <LED_COLOR_ID_AMBER>;
+			function = LED_FUNCTION_SPEED_LAN;
+			function-enumerator = <2>;
 			linux,default-trigger = "mv88e6xxx-1:03:100Mbps";
 		};
 	};



From lede-commits at lists.infradead.org  Sun Apr 14 10:53:25 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 13:53:25 -0400
Subject: [openwrt/openwrt]  tools: libdeflate: update to 1.20
In-Reply-To: <171311720515.240825.13035049417947740161@git-01.infra.openwrt.org>
References: <171311720515.240825.13035049417947740161@git-01.infra.openwrt.org>
Message-ID: <mailman.27025.1713117210.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/338b463e1e9788f9e569cfa26b76a2a9746c93c1

commit 338b463e1e9788f9e569cfa26b76a2a9746c93c1
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 13 20:15:45 2024 +0200

    tools: libdeflate: update to 1.20
    
    Changes:
    * Improved CRC-32 performance on recent x86 CPUs by adding
    VPCLMULQDQ-accelerated implementations using 256-bit and 512-bit vectors.
    
    * Improved Adler-32 performance on recent x86 CPUs by adding
    VNNI-accelerated implementations using 256-bit and 512-bit vectors.
    
    * Improved CRC-32 and Adler-32 performance on short inputs.
    
    * Optimized the portable implementation of Adler-32.
    
    * Added some basic optimizations for RISC-V.
    
    * Dropped support for gcc versions older than v4.9 (released in 2014) and
    clang versions older than v3.9 (released in 2016).
    
    * Dropped support for CRC-32 acceleration on 32-bit ARM using the ARMv8 pmull or crc32 instructions.
    This code only worked on CPUs that also have a 64-bit mode, and it was
    already disabled on many compiler versions due to compiler limitations.
    CRC-32 acceleration remains fully supported on 64-bit ARM.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/libdeflate/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/libdeflate/Makefile b/tools/libdeflate/Makefile
index fbf8bde984..68f7fb1372 100644
--- a/tools/libdeflate/Makefile
+++ b/tools/libdeflate/Makefile
@@ -7,12 +7,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdeflate
-PKG_VERSION:=1.19
+PKG_VERSION:=1.20
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate/releases/download/v$(PKG_VERSION)
-PKG_HASH:=d9bb9bdd8cc5a8c1f7f6226fa0053dd72861e15f366e7ff7d0d191eac16d66f3
+PKG_HASH:=c52cf0239fd644d71c9e88613dd7431a5306ebee1280c5791c71ca264869250a
 
 include $(INCLUDE_DIR)/host-build.mk
 



From lede-commits at lists.infradead.org  Sun Apr 14 11:37:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 14 Apr 2024 14:37:51 -0400
Subject: [openwrt/openwrt]  ramips: Add support for D-Link DIR-3040 A1
In-Reply-To: <171311987133.333005.9677498791561438140@git-01.infra.openwrt.org>
References: <171311987133.333005.9677498791561438140@git-01.infra.openwrt.org>
Message-ID: <mailman.27028.1713119881.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cab2e1de0d94ab35b5d032194fc5b4ab2e0d609a

commit cab2e1de0d94ab35b5d032194fc5b4ab2e0d609a
Author: Vince McKinsey <vincemckinsey at gmail.com>
AuthorDate: Sun Mar 31 14:29:05 2024 -0400

    ramips: Add support for D-Link DIR-3040 A1
    
    This adds support for the A1 hardware revision of the DIR-3040.
    It is an exact copy of the DIR-3060 save for some cosmetic changes to the housing.
    Even going so far as having the same FCC ID.
    
    Hardware specification:
    SoC: MediaTek MT7621AT
    Flash: Winbond W29N01HVSINA 128MB
    RAM: Micron MT41K128M16JT-125 256MB
    Ethernet: 5x 10/100/1000 Mbps
    WiFi1: MT7615DN 2.4GHz N 2x2:2
    WiFi2: MT7615DN 5GHz AC 2x2:2
    WiFi3: MT7615N 5GHz AC 4x4:4
    Button: WPS, Reset
    
    Flash instructions:
    OpenWrt can be installed via D-Link Recovery GUI:
    NOTE: Seems to only work in Firefox on Windows.
    Tried with Chrome on Windows, Firefox in Linux, and Chromium in Linux.
    None of these other browsers worked.
    
        1. Push and hold reset button (on the bottom of the device) until power led
            starts flashing (about 10 secs or so) while plugging in the power cable.
        2. Give it ~30 seconds, to boot the recovery mode GUI
        3. Connect your client computer to LAN1 of the device
        4. Set your client IP address manually to 192.168.0.2 / 255.255.255.0.
        5. Call the recovery page for the device at http://192.168.0.1/
        6. Use the provided emergency web GUI to upload and flash a new firmware to the device
    
    Thanks to @Lucky1openwrt and @iivailo for creating the DIR-3060 DTS file and related changes,
    so it was possible for me to adapt them to the DIR-3040, build images,
    test and fix minor issues.
    
    MAC Addresses:
    
    | use | address | example |
    | --- | --- | --- |
    | LAN | label | f4:*:61 |
    | WAN | label + 4 | f4:*:65 |
    | WI1/2g | label + 2 | f4:*:63 |
    | WI1/5g | label + 1 | f4:*:62 |
    | WI2/5g | label + 3 | f4:*:64 |
    
    The label MAC address was found in Factory, 0xe000
    
    Checklist:
    
    ? nand
    ? ethernet
    ? button
    ? wifi2g
    ? wifi5g
    ? wifi5g
    ? mac
    ? led
    
    Signed-off-by: Vince McKinsey <vincemckinsey at gmail.com>
---
 .../linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts  | 67 ++++++++++++++++++++++
 .../linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi |  2 +-
 target/linux/ramips/image/mt7621.mk                |  7 +++
 .../ramips/mt7621/base-files/etc/board.d/01_leds   |  1 +
 .../etc/hotplug.d/ieee80211/10_fix_wifi_mac        |  5 ++
 .../mt7621/base-files/lib/upgrade/platform.sh      |  1 +
 6 files changed, 82 insertions(+), 1 deletion(-)

diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts b/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
new file mode 100644
index 0000000000..4bb35a948d
--- /dev/null
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-3040-a1.dts
@@ -0,0 +1,67 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+#include "mt7621_dlink_dir-xx60-a1.dtsi"
+
+/ {
+	compatible = "dlink,dir-3040-a1", "mediatek,mt7621-soc";
+	model = "D-Link DIR-3040 A1";
+};
+
+&wps {
+	gpios = <&gpio 6 GPIO_ACTIVE_LOW>;
+};
+
+&leds {
+	usb2_white {
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_WHITE>;
+		function-enumerator = <0>;
+		gpios = <&gpio 13 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&ehci_port2>;
+		linux,default-trigger = "usbport";
+	};
+
+	usb3_white {
+		function = LED_FUNCTION_USB;
+		color = <LED_COLOR_ID_WHITE>;
+		function-enumerator = <1>;
+		gpios = <&gpio 14 GPIO_ACTIVE_LOW>;
+		trigger-sources = <&xhci_ehci_port1>;
+		linux,default-trigger = "usbport";
+	};
+
+	wlan2g {
+		function = LED_FUNCTION_WLAN_2GHZ;
+		color = <LED_COLOR_ID_WHITE>;
+		gpios = <&gpio 11 GPIO_ACTIVE_HIGH>;
+		linux,default-trigger = "phy0radio";
+	};
+
+	wlan5glb {
+		function = LED_FUNCTION_WLAN_5GHZ;
+		color = <LED_COLOR_ID_WHITE>;
+		function-enumerator = <0>;
+		gpios = <&gpio 9 GPIO_ACTIVE_HIGH>;
+		linux,default-trigger = "phy1radio";
+	};
+
+	wlan5ghb {
+		function = LED_FUNCTION_WLAN_5GHZ;
+		color = <LED_COLOR_ID_WHITE>;
+		function-enumerator = <1>;
+		gpios = <&gpio 5 GPIO_ACTIVE_HIGH>;
+		linux,default-trigger = "phy2radio";
+	};
+};
+
+&wifi0 {
+	nvmem-cells = <&eeprom_factory_0>, <&macaddr_factory_e000 1>;
+	nvmem-cell-names = "eeprom", "mac-address";
+	ieee80211-freq-limit;
+	/delete-property/ ieee80211-freq-limit;
+};
+
+&wifi1 {
+	nvmem-cells = <&eeprom_factory_8000>, <&macaddr_factory_e000 3>;
+	nvmem-cell-names = "eeprom", "mac-address";
+};
diff --git a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
index 7b7228b8c3..57652fb278 100644
--- a/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
+++ b/target/linux/ramips/dts/mt7621_dlink_dir-xx60-a1.dtsi
@@ -24,7 +24,7 @@
 			linux,code = <KEY_RESTART>;
 		};
 
-		wps {
+		wps: wps {
 			label = "wps";
 			gpios = <&gpio 18 GPIO_ACTIVE_LOW>;
 			linux,code = <KEY_WPS_BUTTON>;
diff --git a/target/linux/ramips/image/mt7621.mk b/target/linux/ramips/image/mt7621.mk
index fb8cfce589..10e7857614 100644
--- a/target/linux/ramips/image/mt7621.mk
+++ b/target/linux/ramips/image/mt7621.mk
@@ -783,6 +783,13 @@ define Device/dlink_dir-2660-a1
 endef
 TARGET_DEVICES += dlink_dir-2660-a1
 
+define Device/dlink_dir-3040-a1
+  $(Device/dlink_dir-xx60-a1)
+  DEVICE_MODEL := DIR-3040
+  DEVICE_VARIANT := A1
+endef
+TARGET_DEVICES += dlink_dir-3040-a1
+
 define Device/dlink_dir-3060-a1
   $(Device/dlink_dir-xx60-a1)
   DEVICE_MODEL := DIR-3060
diff --git a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
index 3eba20bb79..6848bebd00 100644
--- a/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
+++ b/target/linux/ramips/mt7621/base-files/etc/board.d/01_leds
@@ -96,6 +96,7 @@ dlink,dir-2640-a1|\
 dlink,dir-2660-a1)
 	ucidef_set_led_netdev "wan" "wan" "white:net" "wan"
 	;;
+dlink,dir-3040-a1|\
 dlink,dir-3060-a1)
 	ucidef_set_led_netdev "net_white" "WAN Link" "white:net" "wan" "link"
 	ucidef_set_led_netdev "net_orange" "WAN Activity" "orange:net" "wan" "tx rx"
diff --git a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
index 962e1f7019..0ec46bb0ea 100644
--- a/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
+++ b/target/linux/ramips/mt7621/base-files/etc/hotplug.d/ieee80211/10_fix_wifi_mac
@@ -60,6 +60,11 @@ case "$board" in
 		[ "$PHYNBR" = "1" ] && \
 			macaddr_add $hw_mac_addr 4 > /sys${DEVPATH}/macaddress
 		;;
+	dlink,dir-3040-a1)
+		lan_mac_addr="$(mtd_get_mac_binary factory 0xe000)"
+		[ "$PHYNBR" = "0" ] && \
+			macaddr_add $lan_mac_addr 2 > /sys${DEVPATH}/macaddress
+		;;
 	dlink,dir-853-a3)
 		[ "$PHYNBR" = "0" ] && \
 			macaddr_setbit_la "$(mtd_get_mac_binary factory 0xe000)" \
diff --git a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
index eba02e6599..93fbc470ad 100755
--- a/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
+++ b/target/linux/ramips/mt7621/base-files/lib/upgrade/platform.sh
@@ -73,6 +73,7 @@ platform_do_upgrade() {
 	dlink,dir-1960-a1|\
 	dlink,dir-2640-a1|\
 	dlink,dir-2660-a1|\
+	dlink,dir-3040-a1|\
 	dlink,dir-3060-a1|\
 	dlink,dir-853-a3|\
 	etisalat,s3|\



From lede-commits at lists.infradead.org  Mon Apr 15 02:29:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 15 Apr 2024 05:29:36 -0400
Subject: [openwrt/openwrt]  bridger: update to Git HEAD (2024-04-15)
In-Reply-To: <171317337651.2061614.13327004072085170803@git-01.infra.openwrt.org>
References: <171317337651.2061614.13327004072085170803@git-01.infra.openwrt.org>
Message-ID: <mailman.27204.1713173382.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/93d75f8401c9aec2fcfb15775243d295e230b2a8

commit 93d75f8401c9aec2fcfb15775243d295e230b2a8
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Apr 15 11:19:44 2024 +0200

    bridger: update to Git HEAD (2024-04-15)
    
    3159bbe0a2eb improve isolation when selecting a fixed output port
    c77a7a1ff74d nl: fix getting flow offload stats
    a08e51e679dd add support for disabling bridge-local flows via config
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/bridger/Makefile           |  6 +++---
 package/network/services/bridger/files/bridger.conf |  3 +++
 package/network/services/bridger/files/bridger.init | 14 ++++++++------
 3 files changed, 14 insertions(+), 9 deletions(-)

diff --git a/package/network/services/bridger/Makefile b/package/network/services/bridger/Makefile
index fa98220f68..b38c2ddbc5 100644
--- a/package/network/services/bridger/Makefile
+++ b/package/network/services/bridger/Makefile
@@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=bridger
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/nbd168/bridger
-PKG_SOURCE_DATE:=2023-05-12
-PKG_SOURCE_VERSION:=d0f79a16c749ad310d79e1c31f593860619f99eb
-PKG_MIRROR_HASH:=dde6613662ad53ba6622e669400560a534426edfa4f42c91d156fbd7ccafd15c
+PKG_SOURCE_DATE:=2024-04-15
+PKG_SOURCE_VERSION:=a08e51e679dd7e1eaf70ea7fd6b6433e167d4c2d
+PKG_MIRROR_HASH:=e80ac0cc3c5b27afb233c03fed3fbcef34a1b3fdbe0d48532ad1d5c3aac4088d
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
diff --git a/package/network/services/bridger/files/bridger.conf b/package/network/services/bridger/files/bridger.conf
index cb43deff79..2ff6b5b787 100644
--- a/package/network/services/bridger/files/bridger.conf
+++ b/package/network/services/bridger/files/bridger.conf
@@ -1,3 +1,6 @@
 config defaults
+	# handle bridge local rx/tx
+	option bridge_local 0
+
 	# example for blacklisting individual devices or bridges
 	# list blacklist eth0
diff --git a/package/network/services/bridger/files/bridger.init b/package/network/services/bridger/files/bridger.init
index 2ba9f06b65..c9983ae9cc 100644
--- a/package/network/services/bridger/files/bridger.init
+++ b/package/network/services/bridger/files/bridger.init
@@ -6,25 +6,27 @@ START=19
 USE_PROCD=1
 PROG=/usr/sbin/bridger
 
-add_blacklist() {
+get_defaults() {
 	cfg="$1"
 
 	config_get blacklist "$cfg" blacklist
+	json_add_array blacklist
 	for i in $blacklist; do
 		json_add_string "" "$i"
 	done
+	json_close_array
+
+	config_get_bool bridge_local "$cfg" bridge_local 0
+	json_add_boolean bridge_local "$bridge_local"
 }
 
 reload_service() {
 	config_load bridger
 
 	json_init
-	json_add_string name "config"
-	json_add_array devices
-	config_foreach add_blacklist defaults
-	json_close_array
+	config_foreach get_defaults defaults
 
-	ubus call bridger set_blacklist "$(json_dump)"
+	ubus call bridger set_config "$(json_dump)"
 }
 
 service_triggers() {



From lede-commits at lists.infradead.org  Mon Apr 15 03:44:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 15 Apr 2024 06:44:02 -0400
Subject: [openwrt/openwrt]  tools/dwarves: add myself as PKG_MAINTAINER
In-Reply-To: <171317784254.2207607.4052468425986331403@git-01.infra.openwrt.org>
References: <171317784254.2207607.4052468425986331403@git-01.infra.openwrt.org>
Message-ID: <mailman.27254.1713177852.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/20c0dfb8e19cd1259f8704b8b7ab5d86bda36568

commit 20c0dfb8e19cd1259f8704b8b7ab5d86bda36568
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Tue Mar 5 00:28:48 2024 -0800

    tools/dwarves: add myself as PKG_MAINTAINER
    
    Missed setting this when first adding package.
    
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/dwarves/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/dwarves/Makefile b/tools/dwarves/Makefile
index 8d72536b42..16dc765f58 100644
--- a/tools/dwarves/Makefile
+++ b/tools/dwarves/Makefile
@@ -10,6 +10,7 @@ PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://fedorapeople.org/~acme/dwarves/
 PKG_HASH:=1d8c9a1c2d42e06cc121a70a39c4f621fd28f15c476ed1b7c7b226f41fdd32df
 
+PKG_MAINTAINER:=Tony Ambardar <itugrok at yahoo.com>
 PKG_LICENSE:=GPL-2.0-only
 PKG_LICENSE_FILES:=COPYING
 



From lede-commits at lists.infradead.org  Mon Apr 15 04:46:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 15 Apr 2024 07:46:19 -0400
Subject: [openwrt/openwrt]  netifd: add missing error checks to packet
 steering script
In-Reply-To: <171318157895.2329906.15641355141544047592@git-01.infra.openwrt.org>
References: <171318157895.2329906.15641355141544047592@git-01.infra.openwrt.org>
Message-ID: <mailman.27289.1713181587.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/123282d9f9edf361729c2e8bb410957a6844d845

commit 123282d9f9edf361729c2e8bb410957a6844d845
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Apr 15 12:32:35 2024 +0200

    netifd: add missing error checks to packet steering script
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../config/netifd/files/usr/libexec/network/packet-steering.uc     | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
index f146a96e41..72f96024d8 100755
--- a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
+++ b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
@@ -27,6 +27,8 @@ for (let arg in ARGV) {
 function task_name(pid)
 {
 	let stat = open(`/proc/${pid}/status`, "r");
+	if (!stat)
+		return;
 	let line = stat.read("line");
 	stat.close();
 	return trim(split(line, "\t", 2)[1]);
@@ -35,8 +37,11 @@ function task_name(pid)
 function set_task_cpu(pid, cpu) {
 	if (disable)
 		cpu = join(",", map(cpus, (cpu) => cpu.id));
+	let name = task_name(pid);
+	if (!name)
+		return;
 	if (debug || do_nothing)
-		warn(`taskset -p -c ${cpu} ${task_name(pid)}\n`);
+		warn(`taskset -p -c ${cpu} ${name}\n`);
 	if (!do_nothing)
 		system(`taskset -p -c ${cpu} ${pid}`);
 }



From lede-commits at lists.infradead.org  Mon Apr 15 04:46:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 15 Apr 2024 07:46:18 -0400
Subject: [openwrt/openwrt]  elfutils: fix a missing typedef in the last update
In-Reply-To: <171318157895.2329906.15641355141544047592@git-01.infra.openwrt.org>
References: <171318157895.2329906.15641355141544047592@git-01.infra.openwrt.org>
Message-ID: <mailman.27288.1713181587.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a9e22ffa5028e303dc32d15f1ce5e1be4c20e125

commit a9e22ffa5028e303dc32d15f1ce5e1be4c20e125
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Apr 15 12:55:37 2024 +0200

    elfutils: fix a missing typedef in the last update
    
    Fixes perf
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../elfutils/patches/007-fix-missing-typedef.patch | 22 ++++++++++++++++++++++
 1 file changed, 22 insertions(+)

diff --git a/package/libs/elfutils/patches/007-fix-missing-typedef.patch b/package/libs/elfutils/patches/007-fix-missing-typedef.patch
new file mode 100644
index 0000000000..cfac17ad3f
--- /dev/null
+++ b/package/libs/elfutils/patches/007-fix-missing-typedef.patch
@@ -0,0 +1,22 @@
+--- a/libelf/libelf.h
++++ b/libelf/libelf.h
+@@ -73,15 +73,15 @@
+  /* So RELR defines/typedefs can be used even with an old system elf.h.  */
+  #define SHT_RELR       19      /* RELR relative relocations */
+ 
+- /* RELR relocation table entry */
+- typedef Elf32_Word     Elf32_Relr;
+- typedef Elf64_Xword    Elf64_Relr;
+-
+  #define DT_RELRSZ      35      /* Total size of RELR relative relocations */
+  #define DT_RELR        36      /* Address of RELR relative relocations */
+  #define DT_RELRENT     37      /* Size of one RELR relative relocaction */
+ #endif
+ 
++/* RELR relocation table entry */
++typedef Elf32_Word     Elf32_Relr;
++typedef Elf64_Xword    Elf64_Relr;
++
+ #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
+ # define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__)))
+ # define __deprecated_attribute__ __attribute__ ((__deprecated__))



From lede-commits at lists.infradead.org  Mon Apr 15 04:52:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 15 Apr 2024 07:52:41 -0400
Subject: [openwrt/openwrt]  tools: libdeflate: backport fix for AVX-VNNI
In-Reply-To: <171318196168.2345625.9221425626591247672@git-01.infra.openwrt.org>
References: <171318196168.2345625.9221425626591247672@git-01.infra.openwrt.org>
Message-ID: <mailman.27299.1713181967.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2116073f981ead48f5fe0af213cbdfe013288fb9

commit 2116073f981ead48f5fe0af213cbdfe013288fb9
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 15 11:03:08 2024 +0200

    tools: libdeflate: backport fix for AVX-VNNI
    
    Trying to compile with new new enough GCC but older binutils that dont
    support AVX-VNNI will error out on the assembler, so backport an upstream
    fix for it.
    
    Fixes: 338b463e1e97 ("tools: libdeflate: update to 1.20")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/libdeflate/Makefile                          |  2 +-
 ...ncrease-AVX-VNNI-gcc-prerequisite-to-12.1.patch | 32 ++++++++++++++++++++++
 2 files changed, 33 insertions(+), 1 deletion(-)

diff --git a/tools/libdeflate/Makefile b/tools/libdeflate/Makefile
index 68f7fb1372..6bf25d134d 100644
--- a/tools/libdeflate/Makefile
+++ b/tools/libdeflate/Makefile
@@ -8,7 +8,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libdeflate
 PKG_VERSION:=1.20
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/ebiggers/libdeflate/releases/download/v$(PKG_VERSION)
diff --git a/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch b/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch
new file mode 100644
index 0000000000..ea4f4dc4c1
--- /dev/null
+++ b/tools/libdeflate/patches/0001-lib-x86-increase-AVX-VNNI-gcc-prerequisite-to-12.1.patch
@@ -0,0 +1,32 @@
+From e522b1d09d3536ddc15459b4259150f4a53ee65a Mon Sep 17 00:00:00 2001
+From: Eric Biggers <ebiggers at google.com>
+Date: Thu, 4 Apr 2024 20:16:33 -0400
+Subject: [PATCH] lib/x86: increase AVX-VNNI gcc prerequisite to 12.1
+
+Although gcc 11.1 supports AVX-VNNI, a popular distro pairs it with a
+binutils version that does not.  Require gcc 12 instead.
+
+Resolves https://github.com/ebiggers/libdeflate/issues/365
+---
+ lib/x86/adler32_impl.h | 9 ++++++++-
+ 1 file changed, 8 insertions(+), 1 deletion(-)
+
+--- a/lib/x86/adler32_impl.h
++++ b/lib/x86/adler32_impl.h
+@@ -52,8 +52,15 @@
+ /*
+  * AVX-VNNI implementation.  This is used on CPUs that have AVX2 and AVX-VNNI
+  * but don't have AVX-512, for example Intel Alder Lake.
++ *
++ * Unusually for a new CPU feature, gcc added support for the AVX-VNNI
++ * intrinsics (in gcc 11.1) slightly before binutils added support for
++ * assembling AVX-VNNI instructions (in binutils 2.36).  Distros can reasonably
++ * have gcc 11 with binutils 2.35.  Because of this issue, we check for gcc 12
++ * instead of gcc 11.  (libdeflate supports direct compilation without a
++ * configure step, so checking the binutils version is not always an option.)
+  */
+-#if GCC_PREREQ(11, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930)
++#if GCC_PREREQ(12, 1) || CLANG_PREREQ(12, 0, 13000000) || MSVC_PREREQ(1930)
+ #  define adler32_x86_avx2_vnni	adler32_x86_avx2_vnni
+ #  define SUFFIX			   _avx2_vnni
+ #  define ATTRIBUTES		_target_attribute("avx2,avxvnni")



From lede-commits at lists.infradead.org  Mon Apr 15 13:05:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 15 Apr 2024 16:05:37 -0400
Subject: [openwrt/openwrt]  Revert "elfutils: fix a missing typedef in the
 last update"
In-Reply-To: <171321153762.3393851.16118925705213750676@git-01.infra.openwrt.org>
References: <171321153762.3393851.16118925705213750676@git-01.infra.openwrt.org>
Message-ID: <mailman.27635.1713211544.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d4742de1d702478e288721c4104aec735eaca72b

commit d4742de1d702478e288721c4104aec735eaca72b
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Apr 15 22:05:06 2024 +0200

    Revert "elfutils: fix a missing typedef in the last update"
    
    This reverts commit a9e22ffa5028e303dc32d15f1ce5e1be4c20e125.
    After doing a clean rebuild, it turns out that this change is not necessary
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../elfutils/patches/007-fix-missing-typedef.patch | 22 ----------------------
 1 file changed, 22 deletions(-)

diff --git a/package/libs/elfutils/patches/007-fix-missing-typedef.patch b/package/libs/elfutils/patches/007-fix-missing-typedef.patch
deleted file mode 100644
index cfac17ad3f..0000000000
--- a/package/libs/elfutils/patches/007-fix-missing-typedef.patch
+++ /dev/null
@@ -1,22 +0,0 @@
---- a/libelf/libelf.h
-+++ b/libelf/libelf.h
-@@ -73,15 +73,15 @@
-  /* So RELR defines/typedefs can be used even with an old system elf.h.  */
-  #define SHT_RELR       19      /* RELR relative relocations */
- 
-- /* RELR relocation table entry */
-- typedef Elf32_Word     Elf32_Relr;
-- typedef Elf64_Xword    Elf64_Relr;
--
-  #define DT_RELRSZ      35      /* Total size of RELR relative relocations */
-  #define DT_RELR        36      /* Address of RELR relative relocations */
-  #define DT_RELRENT     37      /* Size of one RELR relative relocaction */
- #endif
- 
-+/* RELR relocation table entry */
-+typedef Elf32_Word     Elf32_Relr;
-+typedef Elf64_Xword    Elf64_Relr;
-+
- #if __GNUC__ > 3 || (__GNUC__ == 3 && __GNUC_MINOR__ >= 3)
- # define __nonnull_attribute__(...) __attribute__ ((__nonnull__ (__VA_ARGS__)))
- # define __deprecated_attribute__ __attribute__ ((__deprecated__))



From lede-commits at lists.infradead.org  Mon Apr 15 14:13:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 15 Apr 2024 17:13:47 -0400
Subject: [openwrt/openwrt]  kernel: Add missing config option
In-Reply-To: <171321562726.3589077.6269736728814481716@git-01.infra.openwrt.org>
References: <171321562726.3589077.6269736728814481716@git-01.infra.openwrt.org>
Message-ID: <mailman.27648.1713215639.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8c3dfdc46be7e61afe5f6aaca9860d4258d24e8a

commit 8c3dfdc46be7e61afe5f6aaca9860d4258d24e8a
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Mon Apr 15 22:50:34 2024 +0200

    kernel: Add missing config option
    
    Kernel 6.1.83 allows to select CONFIG_GPIO_VF610, deactivate it by
    default.
    
    This fixes compilation of the armsr/armv8 target.
    
    Fixes: 2ad898e091cb ("kernel: bump 6.1 to 6.1.83")
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 target/linux/generic/config-6.1 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/generic/config-6.1 b/target/linux/generic/config-6.1
index 7baa9b4a55..70e87665b7 100644
--- a/target/linux/generic/config-6.1
+++ b/target/linux/generic/config-6.1
@@ -2347,6 +2347,7 @@ CONFIG_GPIO_SYSFS=y
 # CONFIG_GPIO_TPIC2810 is not set
 # CONFIG_GPIO_TS4900 is not set
 # CONFIG_GPIO_TS5500 is not set
+# CONFIG_GPIO_VF610 is not set
 # CONFIG_GPIO_VIRTIO is not set
 # CONFIG_GPIO_VX855 is not set
 # CONFIG_GPIO_WATCHDOG is not set



From lede-commits at lists.infradead.org  Tue Apr 16 05:19:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 16 Apr 2024 08:19:39 -0400
Subject: [openwrt/openwrt]  pistachio: default to kernel 6.1
In-Reply-To: <171326997982.2583646.9023003343994236522@git-01.infra.openwrt.org>
References: <171326997982.2583646.9023003343994236522@git-01.infra.openwrt.org>
Message-ID: <mailman.27896.1713269985.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/20bf7c3ff748221d999ce7962447fb499e3e9f59

commit 20bf7c3ff748221d999ce7962447fb499e3e9f59
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Apr 16 12:20:59 2024 +0200

    pistachio: default to kernel 6.1
    
    6.1 has been present as testing for some time now, so switch the
    default to it.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/pistachio/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/pistachio/Makefile b/target/linux/pistachio/Makefile
index f170ff0125..d5cfb0fe15 100644
--- a/target/linux/pistachio/Makefile
+++ b/target/linux/pistachio/Makefile
@@ -12,8 +12,7 @@ CPU_TYPE:=24kc
 CPU_SUBTYPE:=24kf
 SUBTARGETS:=generic
 
-KERNEL_PATCHVER:=5.15
-KERNEL_TESTING_PATCHVER:=6.1
+KERNEL_PATCHVER:=6.1
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Tue Apr 16 05:19:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 16 Apr 2024 08:19:40 -0400
Subject: [openwrt/openwrt]  pistachio: remove 5.15 support
In-Reply-To: <171326997982.2583646.9023003343994236522@git-01.infra.openwrt.org>
References: <171326997982.2583646.9023003343994236522@git-01.infra.openwrt.org>
Message-ID: <mailman.27897.1713269991.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/12137cb460e5ac0ef5924458c49822b776247179

commit 12137cb460e5ac0ef5924458c49822b776247179
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Apr 16 12:21:42 2024 +0200

    pistachio: remove 5.15 support
    
    Now that 6.1 is default, remove 5.15 support.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/pistachio/config-5.15                 | 333 ---------------------
 ...maengine-img-mdc-Handle-early-status-read.patch |  68 -----
 ...spi-img-spfi-Implement-dual-and-quad-mode.patch | 198 ------------
 ...i-use-device-0-configuration-for-all-devi.patch |  64 ----
 ...g-spfi-RX-maximum-burst-size-for-DMA-is-8.patch |  59 ----
 ...pi-img-spfi-finish-every-transfer-cleanly.patch | 120 --------
 ...clk-pistachio-Fix-wrong-SDHost-card-speed.patch |  49 ---
 ...S-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch |  47 ---
 ...mtd-nor-support-mtd-name-from-device-tree.patch |  54 ----
 ...01-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch |  30 --
 ...DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch |  43 ---
 ...-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch |  81 -----
 ...04-MIPS-DTS-img-marduk-Add-partition-name.patch |  27 --
 .../905-MIPS-DTS-img-marduk-Add-led-aliases.patch  |  27 --
 14 files changed, 1200 deletions(-)

diff --git a/target/linux/pistachio/config-5.15 b/target/linux/pistachio/config-5.15
deleted file mode 100644
index c16a0c4551..0000000000
--- a/target/linux/pistachio/config-5.15
+++ /dev/null
@@ -1,333 +0,0 @@
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MMAP_RND_BITS_MAX=15
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_SD=y
-# CONFIG_BOARD_INGENIC is not set
-CONFIG_BOARD_SCACHE=y
-CONFIG_BUILTIN_DTB=y
-CONFIG_CEVT_R4K=y
-CONFIG_CLKSRC_MIPS_GIC=y
-CONFIG_CLKSRC_PISTACHIO=y
-CONFIG_CLOCKSOURCE_WATCHDOG=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_COMMON_CLK=y
-CONFIG_COMMON_CLK_PISTACHIO=y
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CONNECTOR=y
-CONFIG_CPU_GENERIC_DUMP_TLB=y
-CONFIG_CPU_HAS_DIEI=y
-CONFIG_CPU_HAS_PREFETCH=y
-CONFIG_CPU_HAS_RIXI=y
-# CONFIG_CPU_HAS_SMARTMIPS is not set
-CONFIG_CPU_HAS_SYNC=y
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-# CONFIG_CPU_MICROMIPS is not set
-CONFIG_CPU_MIPS32=y
-# CONFIG_CPU_MIPS32_R1 is not set
-CONFIG_CPU_MIPS32_R2=y
-# CONFIG_CPU_MIPS32_R6 is not set
-# CONFIG_CPU_MIPS64_R1 is not set
-# CONFIG_CPU_MIPS64_R2 is not set
-# CONFIG_CPU_MIPS64_R6 is not set
-CONFIG_CPU_MIPSR2=y
-CONFIG_CPU_MIPSR2_IRQ_EI=y
-CONFIG_CPU_MIPSR2_IRQ_VI=y
-CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
-CONFIG_CPU_PM=y
-CONFIG_CPU_R4K_CACHE_TLB=y
-CONFIG_CPU_RMAP=y
-CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
-CONFIG_CPU_SUPPORTS_HIGHMEM=y
-CONFIG_CPU_SUPPORTS_MSA=y
-CONFIG_CRC16=y
-CONFIG_CRC_CCITT=y
-CONFIG_CRYPTO_CBC=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_HASH_INFO=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
-CONFIG_CRYPTO_LIB_SHA256=y
-CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_MD5=y
-CONFIG_CRYPTO_RNG=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_SHA1=y
-CONFIG_CRYPTO_SHA256=y
-CONFIG_CRYPTO_ZSTD=y
-CONFIG_CSRC_R4K=y
-CONFIG_DMADEVICES=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_NONCOHERENT=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_VIRTUAL_CHANNELS=y
-CONFIG_DTC=y
-CONFIG_DWMAC_GENERIC=y
-CONFIG_EXT4_FS=y
-# CONFIG_FIT_IMAGE_FDT_BOSTON is not set
-# CONFIG_FIT_IMAGE_FDT_JAGUAR2 is not set
-# CONFIG_FIT_IMAGE_FDT_LUTON is not set
-CONFIG_FIT_IMAGE_FDT_MARDUK=y
-# CONFIG_FIT_IMAGE_FDT_NI169445 is not set
-# CONFIG_FIT_IMAGE_FDT_OCELOT is not set
-# CONFIG_FIT_IMAGE_FDT_SERVAL is not set
-# CONFIG_FIT_IMAGE_FDT_XILFPGA is not set
-CONFIG_FIXED_PHY=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FS_POSIX_ACL=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CMOS_UPDATE=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IOMAP=y
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_MIGRATION=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_LIB_ASHLDI3=y
-CONFIG_GENERIC_LIB_ASHRDI3=y
-CONFIG_GENERIC_LIB_CMPDI2=y
-CONFIG_GENERIC_LIB_LSHRDI3=y
-CONFIG_GENERIC_LIB_UCMPDI2=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PHY=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_PINCTRL_GROUPS=y
-CONFIG_GENERIC_PINMUX_FUNCTIONS=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_CDEV=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-CONFIG_HARDWARE_WATCHPOINTS=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HOTPLUG_CPU=y
-CONFIG_HZ_PERIODIC=y
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_IMG=y
-CONFIG_IMGPDC_WDT=y
-CONFIG_IMG_MDC_DMA=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_MIPS_CPU=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-CONFIG_LEDS_GPIO=y
-CONFIG_LEDS_PWM=y
-# CONFIG_LEGACY_BOARD_OCELOT is not set
-# CONFIG_LEGACY_BOARD_SEAD3 is not set
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOG_BUF_SHIFT=18
-CONFIG_LZO_COMPRESS=y
-CONFIG_LZO_DECOMPRESS=y
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_MAGIC_SYSRQ_DEFAULT_ENABLE=0
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MICREL_PHY=y
-CONFIG_MIGRATION=y
-CONFIG_MIPS=y
-CONFIG_MIPS_ASID_BITS=8
-CONFIG_MIPS_ASID_SHIFT=0
-CONFIG_MIPS_AUTO_PFN_OFFSET=y
-CONFIG_MIPS_CLOCK_VSYSCALL=y
-CONFIG_MIPS_CM=y
-CONFIG_MIPS_CMDLINE_DTB_EXTEND=y
-# CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER is not set
-CONFIG_MIPS_CPC=y
-CONFIG_MIPS_CPS=y
-# CONFIG_MIPS_CPS_CPUIDLE is not set
-# CONFIG_MIPS_CPS_NS16550_BOOL is not set
-CONFIG_MIPS_CPS_PM=y
-CONFIG_MIPS_CPU_SCACHE=y
-CONFIG_MIPS_EBPF_JIT=y
-CONFIG_MIPS_GENERIC=y
-CONFIG_MIPS_GENERIC_KERNEL=y
-CONFIG_MIPS_GIC=y
-CONFIG_MIPS_L1_CACHE_SHIFT=7
-CONFIG_MIPS_L1_CACHE_SHIFT_7=y
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
-CONFIG_MIPS_MT=y
-CONFIG_MIPS_MT_FPAFF=y
-CONFIG_MIPS_MT_SMP=y
-CONFIG_MIPS_NO_APPENDED_DTB=y
-CONFIG_MIPS_NR_CPU_NR_MAP=4
-CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
-CONFIG_MIPS_SPRAM=y
-CONFIG_MMC=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_DW=y
-# CONFIG_MMC_DW_BLUEFIELD is not set
-# CONFIG_MMC_DW_EXYNOS is not set
-# CONFIG_MMC_DW_HI3798CV200 is not set
-# CONFIG_MMC_DW_K3 is not set
-CONFIG_MMC_DW_PLTFM=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_NAND_CORE=y
-CONFIG_MTD_NAND_ECC=y
-CONFIG_MTD_SPI_NAND=y
-CONFIG_MTD_SPI_NOR=y
-CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
-CONFIG_MTD_UBI=y
-CONFIG_MTD_UBI_BEB_LIMIT=20
-CONFIG_MTD_UBI_BLOCK=y
-CONFIG_MTD_UBI_FASTMAP=y
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NLS=y
-CONFIG_NO_EXCEPT_FILL=y
-CONFIG_NR_CPUS=4
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_PADATA=y
-CONFIG_PAGE_POOL=y
-CONFIG_PCI_DRIVERS_GENERIC=y
-CONFIG_PCS_XPCS=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PHY_PISTACHIO_USB=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_PISTACHIO=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PPS=y
-CONFIG_PRINTK_TIME=y
-CONFIG_PROC_EVENTS=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_PWM=y
-CONFIG_PWM_IMG=y
-CONFIG_PWM_SYSFS=y
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_RATIONAL=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGMAP_SPI=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_GPIO=y
-CONFIG_RESET_CONTROLLER=y
-CONFIG_RESET_PISTACHIO=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RPS=y
-CONFIG_SCHEDSTATS=y
-CONFIG_SCHED_INFO=y
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-CONFIG_SCSI_SPI_ATTRS=y
-CONFIG_SERIAL_8250_DW=y
-CONFIG_SERIAL_8250_DWLIB=y
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_SC16IS7XX=y
-CONFIG_SERIAL_SC16IS7XX_CORE=y
-# CONFIG_SERIAL_SC16IS7XX_I2C is not set
-CONFIG_SERIAL_SC16IS7XX_SPI=y
-CONFIG_SGL_ALLOC=y
-CONFIG_SG_POOL=y
-CONFIG_SMP=y
-CONFIG_SMP_UP=y
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SPI=y
-CONFIG_SPI_IMG_SPFI=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-CONFIG_SRAM=y
-CONFIG_SRCU=y
-CONFIG_STMMAC_ETH=y
-CONFIG_STMMAC_PLATFORM=y
-CONFIG_SWAP_IO_SPACE=y
-CONFIG_SWPHY=y
-CONFIG_SYNC_R4K=y
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYS_HAS_CPU_MIPS32_R1=y
-CONFIG_SYS_HAS_CPU_MIPS32_R2=y
-CONFIG_SYS_HAS_CPU_MIPS32_R6=y
-CONFIG_SYS_HAS_CPU_MIPS64_R1=y
-CONFIG_SYS_HAS_CPU_MIPS64_R2=y
-CONFIG_SYS_HAS_CPU_MIPS64_R6=y
-CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
-CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
-CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
-CONFIG_SYS_SUPPORTS_HIGHMEM=y
-CONFIG_SYS_SUPPORTS_HOTPLUG_CPU=y
-CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
-CONFIG_SYS_SUPPORTS_MICROMIPS=y
-CONFIG_SYS_SUPPORTS_MIPS16=y
-CONFIG_SYS_SUPPORTS_MIPS_CPS=y
-CONFIG_SYS_SUPPORTS_MULTITHREADING=y
-CONFIG_SYS_SUPPORTS_RELOCATABLE=y
-CONFIG_SYS_SUPPORTS_SCHED_SMT=y
-CONFIG_SYS_SUPPORTS_SMARTMIPS=y
-CONFIG_SYS_SUPPORTS_SMP=y
-CONFIG_SYS_SUPPORTS_ZBOOT=y
-CONFIG_TARGET_ISA_REV=2
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TMPFS_POSIX_ACL=y
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-CONFIG_UBIFS_FS=y
-CONFIG_UHI_BOOT=y
-CONFIG_USB=y
-CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_DWC2=y
-CONFIG_USB_DWC2_DUAL_ROLE=y
-CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_HCD_PLATFORM is not set
-CONFIG_USB_GADGET=y
-CONFIG_USB_ROLE_SWITCH=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USE_OF=y
-# CONFIG_VIRT_BOARD_RANCHU is not set
-CONFIG_WATCHDOG_CORE=y
-CONFIG_WEAK_ORDERING=y
-CONFIG_XPS=y
-CONFIG_XXHASH=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZSMALLOC=y
-# CONFIG_ZSMALLOC_STAT is not set
-CONFIG_ZSTD_COMPRESS=y
-CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/pistachio/patches-5.15/101-dmaengine-img-mdc-Handle-early-status-read.patch b/target/linux/pistachio/patches-5.15/101-dmaengine-img-mdc-Handle-early-status-read.patch
deleted file mode 100644
index 031a4e3e5e..0000000000
--- a/target/linux/pistachio/patches-5.15/101-dmaengine-img-mdc-Handle-early-status-read.patch
+++ /dev/null
@@ -1,68 +0,0 @@
-From a2dd154377c9aa6ddda00d39b8c7c334e4fa16ff Mon Sep 17 00:00:00 2001
-From: Damien Horsley <damien.horsley at imgtec.com>
-Date: Tue, 22 Mar 2016 12:46:09 +0000
-Subject: dmaengine: img-mdc: Handle early status read
-
-It is possible that mdc_tx_status may be called before the first
-node has been read from memory.
-
-In this case, the residue value stored in the register is undefined.
-Return the transfer size instead.
-
-Signed-off-by: Damien Horsley <damien.horsley at imgtec.com>
----
- drivers/dma/img-mdc-dma.c | 40 ++++++++++++++++++++++++----------------
- 1 file changed, 24 insertions(+), 16 deletions(-)
-
---- a/drivers/dma/img-mdc-dma.c
-+++ b/drivers/dma/img-mdc-dma.c
-@@ -618,25 +618,33 @@ static enum dma_status mdc_tx_status(str
- 			(MDC_CMDS_PROCESSED_CMDS_DONE_MASK + 1);
- 
- 		/*
--		 * If the command loaded event hasn't been processed yet, then
--		 * the difference above includes an extra command.
-+		 * If the first node has not yet been read from memory,
-+		 * the residue register value is undefined
- 		 */
--		if (!mdesc->cmd_loaded)
--			cmds--;
--		else
--			cmds += mdesc->list_cmds_done;
--
--		bytes = mdesc->list_xfer_size;
--		ldesc = mdesc->list;
--		for (i = 0; i < cmds; i++) {
--			bytes -= ldesc->xfer_size + 1;
--			ldesc = ldesc->next_desc;
--		}
--		if (ldesc) {
--			if (residue != MDC_TRANSFER_SIZE_MASK)
--				bytes -= ldesc->xfer_size - residue;
-+		if (!mdesc->cmd_loaded && !cmds) {
-+			bytes = mdesc->list_xfer_size;
-+		} else {
-+			/*
-+			 * If the command loaded event hasn't been processed yet, then
-+			 * the difference above includes an extra command.
-+			 */
-+			if (!mdesc->cmd_loaded)
-+				cmds--;
- 			else
-+				cmds += mdesc->list_cmds_done;
-+
-+			bytes = mdesc->list_xfer_size;
-+			ldesc = mdesc->list;
-+			for (i = 0; i < cmds; i++) {
- 				bytes -= ldesc->xfer_size + 1;
-+				ldesc = ldesc->next_desc;
-+			}
-+			if (ldesc) {
-+				if (residue != MDC_TRANSFER_SIZE_MASK)
-+					bytes -= ldesc->xfer_size - residue;
-+				else
-+					bytes -= ldesc->xfer_size + 1;
-+			}
- 		}
- 	}
- 	spin_unlock_irqrestore(&mchan->vc.lock, flags);
diff --git a/target/linux/pistachio/patches-5.15/102-spi-img-spfi-Implement-dual-and-quad-mode.patch b/target/linux/pistachio/patches-5.15/102-spi-img-spfi-Implement-dual-and-quad-mode.patch
deleted file mode 100644
index 83f21a5c0a..0000000000
--- a/target/linux/pistachio/patches-5.15/102-spi-img-spfi-Implement-dual-and-quad-mode.patch
+++ /dev/null
@@ -1,198 +0,0 @@
-From cd2a6af51553d38072cd31699b58d16ca6176ef5 Mon Sep 17 00:00:00 2001
-From: Ionela Voinescu <ionela.voinescu at imgtec.com>
-Date: Thu, 2 Feb 2017 16:46:14 +0000
-Subject: spi: img-spfi: Implement dual and quad mode
-
-For dual and quad modes to work the SPFI controller needs
-to have information about command/address/dummy bytes in the
-transaction register. This information is not relevant for
-single mode, and therefore it can have any value in the
-allowed range. Therefore, for any read or write transfers of less
-than 8 bytes (cmd = 1 byte, addr up to 7 bytes), SPFI will be
-configured, but not enabled (unless it is the last transfer in
-the queue). The transfer will be enabled by the subsequent tranfer.
-A pending transfer is determined by the content of the transaction
-register: if command part is set and tsize is not.
-
-This way we ensure that for dual and quad transactions
-the command request size will apear in the command/address part
-of the transaction register, while the data size will be in
-tsize, all data being sent/received in the same transaction (as
-set up in the transaction register).
-
-Signed-off-by: Ionela Voinescu <ionela.voinescu at imgtec.com>
-Signed-off-by: Ezequiel Garcia <ezequiel.garcia at imgtec.com>
----
- drivers/spi/spi-img-spfi.c | 96 ++++++++++++++++++++++++++++++++++++++++------
- 1 file changed, 85 insertions(+), 11 deletions(-)
-
---- a/drivers/spi/spi-img-spfi.c
-+++ b/drivers/spi/spi-img-spfi.c
-@@ -36,7 +36,8 @@
- #define SPFI_CONTROL_SOFT_RESET			BIT(11)
- #define SPFI_CONTROL_SEND_DMA			BIT(10)
- #define SPFI_CONTROL_GET_DMA			BIT(9)
--#define SPFI_CONTROL_SE			BIT(8)
-+#define SPFI_CONTROL_SE				BIT(8)
-+#define SPFI_CONTROL_TX_RX			BIT(1)
- #define SPFI_CONTROL_TMODE_SHIFT		5
- #define SPFI_CONTROL_TMODE_MASK			0x7
- #define SPFI_CONTROL_TMODE_SINGLE		0
-@@ -47,6 +48,10 @@
- #define SPFI_TRANSACTION			0x18
- #define SPFI_TRANSACTION_TSIZE_SHIFT		16
- #define SPFI_TRANSACTION_TSIZE_MASK		0xffff
-+#define SPFI_TRANSACTION_CMD_SHIFT		13
-+#define SPFI_TRANSACTION_CMD_MASK		0x7
-+#define SPFI_TRANSACTION_ADDR_SHIFT		10
-+#define SPFI_TRANSACTION_ADDR_MASK		0x7
- 
- #define SPFI_PORT_STATE				0x1c
- #define SPFI_PORT_STATE_DEV_SEL_SHIFT		20
-@@ -83,6 +88,7 @@
-  */
- #define SPFI_32BIT_FIFO_SIZE			64
- #define SPFI_8BIT_FIFO_SIZE			16
-+#define SPFI_DATA_REQUEST_MAX_SIZE		8
- 
- struct img_spfi {
- 	struct device *dev;
-@@ -99,6 +105,8 @@ struct img_spfi {
- 	struct dma_chan *tx_ch;
- 	bool tx_dma_busy;
- 	bool rx_dma_busy;
-+
-+	bool complete;
- };
- 
- static inline u32 spfi_readl(struct img_spfi *spfi, u32 reg)
-@@ -115,9 +123,11 @@ static inline void spfi_start(struct img
- {
- 	u32 val;
- 
--	val = spfi_readl(spfi, SPFI_CONTROL);
--	val |= SPFI_CONTROL_SPFI_EN;
--	spfi_writel(spfi, val, SPFI_CONTROL);
-+	if (spfi->complete) {
-+		val = spfi_readl(spfi, SPFI_CONTROL);
-+		val |= SPFI_CONTROL_SPFI_EN;
-+		spfi_writel(spfi, val, SPFI_CONTROL);
-+	}
- }
- 
- static inline void spfi_reset(struct img_spfi *spfi)
-@@ -130,12 +140,21 @@ static int spfi_wait_all_done(struct img
- {
- 	unsigned long timeout = jiffies + msecs_to_jiffies(50);
- 
-+	if (!(spfi->complete))
-+		return 0;
-+
- 	while (time_before(jiffies, timeout)) {
- 		u32 status = spfi_readl(spfi, SPFI_INTERRUPT_STATUS);
- 
- 		if (status & SPFI_INTERRUPT_ALLDONETRIG) {
- 			spfi_writel(spfi, SPFI_INTERRUPT_ALLDONETRIG,
- 				    SPFI_INTERRUPT_CLEAR);
-+			/*
-+			 * Disable SPFI for it not to interfere with
-+			 * pending transactions
-+			 */
-+			spfi_writel(spfi, spfi_readl(spfi, SPFI_CONTROL)
-+			& ~SPFI_CONTROL_SPFI_EN, SPFI_CONTROL);
- 			return 0;
- 		}
- 		cpu_relax();
-@@ -441,9 +460,32 @@ static void img_spfi_config(struct spi_m
- 			    struct spi_transfer *xfer)
- {
- 	struct img_spfi *spfi = spi_master_get_devdata(spi->master);
--	u32 val, div;
-+	u32 val, div, transact;
-+	bool is_pending;
- 
- 	/*
-+	 * For read or write transfers of less than 8 bytes (cmd = 1 byte,
-+	 * addr up to 7 bytes), SPFI will be configured, but not enabled
-+	 * (unless it is the last transfer in the queue).The transfer will
-+	 * be enabled by the subsequent transfer.
-+	 * A pending transfer is determined by the content of the
-+	 * transaction register: if command part is set and tsize
-+	 * is not
-+	 */
-+	transact = spfi_readl(spfi, SPFI_TRANSACTION);
-+	is_pending = ((transact >> SPFI_TRANSACTION_CMD_SHIFT) &
-+			SPFI_TRANSACTION_CMD_MASK) &&
-+			(!((transact >> SPFI_TRANSACTION_TSIZE_SHIFT) &
-+			SPFI_TRANSACTION_TSIZE_MASK));
-+
-+	/* If there are no pending transactions it's OK to soft reset */
-+	if (!is_pending) {
-+		/* Start the transaction from a known (reset) state */
-+		spfi_reset(spfi);
-+	}
-+
-+	/*
-+	 * Before anything else, set up parameters.
- 	 * output = spfi_clk * (BITCLK / 512), where BITCLK must be a
- 	 * power of 2 up to 128
- 	 */
-@@ -456,20 +498,52 @@ static void img_spfi_config(struct spi_m
- 	val |= div << SPFI_DEVICE_PARAMETER_BITCLK_SHIFT;
- 	spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(spi->chip_select));
- 
--	spfi_writel(spfi, xfer->len << SPFI_TRANSACTION_TSIZE_SHIFT,
--		    SPFI_TRANSACTION);
-+	if (!list_is_last(&xfer->transfer_list, &master->cur_msg->transfers) &&
-+		/*
-+		 * For duplex mode (both the tx and rx buffers are !NULL) the
-+		 * CMD, ADDR, and DUMMY byte parts of the transaction register
-+		 * should always be 0 and therefore the pending transfer
-+		 * technique cannot be used.
-+		 */
-+		(xfer->tx_buf) && (!xfer->rx_buf) &&
-+		(xfer->len <= SPFI_DATA_REQUEST_MAX_SIZE) && !is_pending) {
-+		transact = (1 & SPFI_TRANSACTION_CMD_MASK) <<
-+			SPFI_TRANSACTION_CMD_SHIFT;
-+		transact |= ((xfer->len - 1) & SPFI_TRANSACTION_ADDR_MASK) <<
-+			SPFI_TRANSACTION_ADDR_SHIFT;
-+		spfi->complete = false;
-+	} else {
-+		spfi->complete = true;
-+		if (is_pending) {
-+			/* Keep setup from pending transfer */
-+			transact |= ((xfer->len & SPFI_TRANSACTION_TSIZE_MASK) <<
-+				SPFI_TRANSACTION_TSIZE_SHIFT);
-+		} else {
-+			transact = ((xfer->len & SPFI_TRANSACTION_TSIZE_MASK) <<
-+				SPFI_TRANSACTION_TSIZE_SHIFT);
-+		}
-+	}
-+	spfi_writel(spfi, transact, SPFI_TRANSACTION);
- 
- 	val = spfi_readl(spfi, SPFI_CONTROL);
- 	val &= ~(SPFI_CONTROL_SEND_DMA | SPFI_CONTROL_GET_DMA);
--	if (xfer->tx_buf)
-+	/*
-+	 * We set up send DMA for pending transfers also, as
-+	 * those are always send transfers
-+	 */
-+	if ((xfer->tx_buf) || is_pending)
- 		val |= SPFI_CONTROL_SEND_DMA;
--	if (xfer->rx_buf)
-+	if (xfer->tx_buf)
-+		val |= SPFI_CONTROL_TX_RX;
-+	if (xfer->rx_buf) {
- 		val |= SPFI_CONTROL_GET_DMA;
-+		val &= ~SPFI_CONTROL_TX_RX;
-+	}
- 	val &= ~(SPFI_CONTROL_TMODE_MASK << SPFI_CONTROL_TMODE_SHIFT);
--	if (xfer->tx_nbits == SPI_NBITS_DUAL &&
-+	if (xfer->tx_nbits == SPI_NBITS_DUAL ||
- 	    xfer->rx_nbits == SPI_NBITS_DUAL)
- 		val |= SPFI_CONTROL_TMODE_DUAL << SPFI_CONTROL_TMODE_SHIFT;
--	else if (xfer->tx_nbits == SPI_NBITS_QUAD &&
-+	else if (xfer->tx_nbits == SPI_NBITS_QUAD ||
- 		 xfer->rx_nbits == SPI_NBITS_QUAD)
- 		val |= SPFI_CONTROL_TMODE_QUAD << SPFI_CONTROL_TMODE_SHIFT;
- 	val |= SPFI_CONTROL_SE;
diff --git a/target/linux/pistachio/patches-5.15/104-spi-img-spfi-use-device-0-configuration-for-all-devi.patch b/target/linux/pistachio/patches-5.15/104-spi-img-spfi-use-device-0-configuration-for-all-devi.patch
deleted file mode 100644
index 2995b7dd88..0000000000
--- a/target/linux/pistachio/patches-5.15/104-spi-img-spfi-use-device-0-configuration-for-all-devi.patch
+++ /dev/null
@@ -1,64 +0,0 @@
-From 905ee06a9966113fe51d6bad1819759cb30fd0bd Mon Sep 17 00:00:00 2001
-From: Ionela Voinescu <ionela.voinescu at imgtec.com>
-Date: Tue, 9 Feb 2016 10:18:31 +0000
-Subject: spi: img-spfi: use device 0 configuration for all devices
-
-Given that we control the chip select line externally
-we can use only one parameter register (device 0 parameter
-register) and one set of configuration bits (port configuration
-bits for device 0) for all devices (all chip select lines).
-
-Signed-off-by: Ionela Voinescu <ionela.voinescu at imgtec.com>
----
- drivers/spi/spi-img-spfi.c | 23 ++++++++++++++++-------
- 1 file changed, 16 insertions(+), 7 deletions(-)
-
---- a/drivers/spi/spi-img-spfi.c
-+++ b/drivers/spi/spi-img-spfi.c
-@@ -429,18 +429,23 @@ static int img_spfi_prepare(struct spi_m
- 	struct img_spfi *spfi = spi_master_get_devdata(master);
- 	u32 val;
- 
-+	/*
-+	 * The chip select line is controlled externally so
-+	 * we can use the CS0 configuration for all devices
-+	 */
- 	val = spfi_readl(spfi, SPFI_PORT_STATE);
-+
-+	/* 0 for device selection */
- 	val &= ~(SPFI_PORT_STATE_DEV_SEL_MASK <<
- 		 SPFI_PORT_STATE_DEV_SEL_SHIFT);
--	val |= msg->spi->chip_select << SPFI_PORT_STATE_DEV_SEL_SHIFT;
- 	if (msg->spi->mode & SPI_CPHA)
--		val |= SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
-+		val |= SPFI_PORT_STATE_CK_PHASE(0);
- 	else
--		val &= ~SPFI_PORT_STATE_CK_PHASE(msg->spi->chip_select);
-+		val &= ~SPFI_PORT_STATE_CK_PHASE(0);
- 	if (msg->spi->mode & SPI_CPOL)
--		val |= SPFI_PORT_STATE_CK_POL(msg->spi->chip_select);
-+		val |= SPFI_PORT_STATE_CK_POL(0);
- 	else
--		val &= ~SPFI_PORT_STATE_CK_POL(msg->spi->chip_select);
-+		val &= ~SPFI_PORT_STATE_CK_POL(0);
- 	spfi_writel(spfi, val, SPFI_PORT_STATE);
- 
- 	return 0;
-@@ -492,11 +497,15 @@ static void img_spfi_config(struct spi_m
- 	div = DIV_ROUND_UP(clk_get_rate(spfi->spfi_clk), xfer->speed_hz);
- 	div = clamp(512 / (1 << get_count_order(div)), 1, 128);
- 
--	val = spfi_readl(spfi, SPFI_DEVICE_PARAMETER(spi->chip_select));
-+	/*
-+	 * The chip select line is controlled externally so
-+	 * we can use the CS0 parameters for all devices
-+	 */
-+	val = spfi_readl(spfi, SPFI_DEVICE_PARAMETER(0));
- 	val &= ~(SPFI_DEVICE_PARAMETER_BITCLK_MASK <<
- 		 SPFI_DEVICE_PARAMETER_BITCLK_SHIFT);
- 	val |= div << SPFI_DEVICE_PARAMETER_BITCLK_SHIFT;
--	spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(spi->chip_select));
-+	spfi_writel(spfi, val, SPFI_DEVICE_PARAMETER(0));
- 
- 	if (!list_is_last(&xfer->transfer_list, &master->cur_msg->transfers) &&
- 		/*
diff --git a/target/linux/pistachio/patches-5.15/105-spi-img-spfi-RX-maximum-burst-size-for-DMA-is-8.patch b/target/linux/pistachio/patches-5.15/105-spi-img-spfi-RX-maximum-burst-size-for-DMA-is-8.patch
deleted file mode 100644
index 5418503816..0000000000
--- a/target/linux/pistachio/patches-5.15/105-spi-img-spfi-RX-maximum-burst-size-for-DMA-is-8.patch
+++ /dev/null
@@ -1,59 +0,0 @@
-From 56466f505f58f44b69feb7eaed3b506842800456 Mon Sep 17 00:00:00 2001
-From: Ionela Voinescu <ionela.voinescu at imgtec.com>
-Date: Tue, 1 Mar 2016 17:49:45 +0000
-Subject: spi: img-spfi: RX maximum burst size for DMA is 8
-
-The depth of the FIFOs is 16 bytes. The DMA request line is tied
-to the half full/empty (depending on the use of the TX or RX FIFO)
-threshold. For the TX FIFO, if you set a burst size of 8 (equal to
-half the depth) the first burst goes into FIFO without any issues,
-but due the latency involved (the time the data leaves  the DMA
-engine to the time it arrives at the FIFO), the DMA might trigger
-another burst of 8. But given that there is no space for 2 additonal
-bursts of 8, this would result in a failure. Therefore, we have to
-keep the burst size for TX to 4 to accomodate for an extra burst.
-
-For the read (RX) scenario, the DMA request line goes high when
-there is at least 8 entries in the FIFO (half full), and we can
-program the burst size to be 8 because the risk of accidental burst
-does not exist. The DMA engine will not trigger another read until
-the read data for all the burst it has sent out has been received.
-
-While here, move the burst size setting outside of the if/else branches
-as they have the same value for both 8 and 32 bit data widths.
-
-Signed-off-by: Ionela Voinescu <ionela.voinescu at imgtec.com>
----
- drivers/spi/spi-img-spfi.c | 6 ++----
- 1 file changed, 2 insertions(+), 4 deletions(-)
-
---- a/drivers/spi/spi-img-spfi.c
-+++ b/drivers/spi/spi-img-spfi.c
-@@ -338,12 +338,11 @@ static int img_spfi_start_dma(struct spi
- 		if (xfer->len % 4 == 0) {
- 			rxconf.src_addr = spfi->phys + SPFI_RX_32BIT_VALID_DATA;
- 			rxconf.src_addr_width = 4;
--			rxconf.src_maxburst = 4;
- 		} else {
- 			rxconf.src_addr = spfi->phys + SPFI_RX_8BIT_VALID_DATA;
- 			rxconf.src_addr_width = 1;
--			rxconf.src_maxburst = 4;
- 		}
-+		rxconf.src_maxburst = 8;
- 		dmaengine_slave_config(spfi->rx_ch, &rxconf);
- 
- 		rxdesc = dmaengine_prep_slave_sg(spfi->rx_ch, xfer->rx_sg.sgl,
-@@ -362,12 +361,11 @@ static int img_spfi_start_dma(struct spi
- 		if (xfer->len % 4 == 0) {
- 			txconf.dst_addr = spfi->phys + SPFI_TX_32BIT_VALID_DATA;
- 			txconf.dst_addr_width = 4;
--			txconf.dst_maxburst = 4;
- 		} else {
- 			txconf.dst_addr = spfi->phys + SPFI_TX_8BIT_VALID_DATA;
- 			txconf.dst_addr_width = 1;
--			txconf.dst_maxburst = 4;
- 		}
-+		txconf.dst_maxburst = 4;
- 		dmaengine_slave_config(spfi->tx_ch, &txconf);
- 
- 		txdesc = dmaengine_prep_slave_sg(spfi->tx_ch, xfer->tx_sg.sgl,
diff --git a/target/linux/pistachio/patches-5.15/106-spi-img-spfi-finish-every-transfer-cleanly.patch b/target/linux/pistachio/patches-5.15/106-spi-img-spfi-finish-every-transfer-cleanly.patch
deleted file mode 100644
index ea1f9f28cc..0000000000
--- a/target/linux/pistachio/patches-5.15/106-spi-img-spfi-finish-every-transfer-cleanly.patch
+++ /dev/null
@@ -1,120 +0,0 @@
-From 5fcca3fd4b621d7b5bdeca18d36dfc6ca6cfe383 Mon Sep 17 00:00:00 2001
-From: Ionela Voinescu <ionela.voinescu at imgtec.com>
-Date: Wed, 10 Aug 2016 11:42:26 +0100
-Subject: spi: img-spfi: finish every transfer cleanly
-
-Before this change, the interrupt status bit that signaled
-the end of a tranfers was cleared in the wait_all_done
-function. That functionality triggered issues for DMA
-duplex transactions where the wait function was called
-twice, in both the TX and RX callbacks.
-
-In order to fix the issue, clear all interrupt data bits
-at the end of a PIO transfer or at the end of both TX and RX
-duplex transfers, if the transfer is not a pending tranfer
-(command waiting for data). After that, the status register
-is checked for new incoming data or new data requests to be
-signaled. If SPFI finished cleanly, no new interrupt data
-bits should be set.
-
-Signed-off-by: Ionela Voinescu <ionela.voinescu at imgtec.com>
----
- drivers/spi/spi-img-spfi.c | 49 +++++++++++++++++++++++++++++++++-------------
- 1 file changed, 35 insertions(+), 14 deletions(-)
-
---- a/drivers/spi/spi-img-spfi.c
-+++ b/drivers/spi/spi-img-spfi.c
-@@ -79,6 +79,14 @@
- #define SPFI_INTERRUPT_SDE			BIT(1)
- #define SPFI_INTERRUPT_SDTRIG			BIT(0)
- 
-+#define SPFI_INTERRUPT_DATA_BITS		(SPFI_INTERRUPT_SDHF |\
-+						SPFI_INTERRUPT_SDFUL |\
-+						SPFI_INTERRUPT_GDEX32BIT |\
-+						SPFI_INTERRUPT_GDHF |\
-+						SPFI_INTERRUPT_GDFUL |\
-+						SPFI_INTERRUPT_ALLDONETRIG |\
-+						SPFI_INTERRUPT_GDEX8BIT)
-+
- /*
-  * There are four parallel FIFOs of 16 bytes each.  The word buffer
-  * (*_32BIT_VALID_DATA) accesses all four FIFOs at once, resulting in an
-@@ -136,6 +144,23 @@ static inline void spfi_reset(struct img
- 	spfi_writel(spfi, 0, SPFI_CONTROL);
- }
- 
-+static inline void spfi_finish(struct img_spfi *spfi)
-+{
-+	if (!(spfi->complete))
-+		return;
-+
-+	/* Clear data bits as all transfers(TX and RX) have finished */
-+	spfi_writel(spfi, SPFI_INTERRUPT_DATA_BITS, SPFI_INTERRUPT_CLEAR);
-+	if (spfi_readl(spfi, SPFI_INTERRUPT_STATUS) & SPFI_INTERRUPT_DATA_BITS) {
-+		dev_err(spfi->dev, "SPFI did not finish transfer cleanly.\n");
-+		spfi_reset(spfi);
-+	}
-+	/* Disable SPFI for it not to interfere with pending transactions */
-+	spfi_writel(spfi,
-+		    spfi_readl(spfi, SPFI_CONTROL) & ~SPFI_CONTROL_SPFI_EN,
-+		    SPFI_CONTROL);
-+}
-+
- static int spfi_wait_all_done(struct img_spfi *spfi)
- {
- 	unsigned long timeout = jiffies + msecs_to_jiffies(50);
-@@ -144,19 +169,9 @@ static int spfi_wait_all_done(struct img
- 		return 0;
- 
- 	while (time_before(jiffies, timeout)) {
--		u32 status = spfi_readl(spfi, SPFI_INTERRUPT_STATUS);
--
--		if (status & SPFI_INTERRUPT_ALLDONETRIG) {
--			spfi_writel(spfi, SPFI_INTERRUPT_ALLDONETRIG,
--				    SPFI_INTERRUPT_CLEAR);
--			/*
--			 * Disable SPFI for it not to interfere with
--			 * pending transactions
--			 */
--			spfi_writel(spfi, spfi_readl(spfi, SPFI_CONTROL)
--			& ~SPFI_CONTROL_SPFI_EN, SPFI_CONTROL);
-+		if (spfi_readl(spfi, SPFI_INTERRUPT_STATUS) &
-+		    SPFI_INTERRUPT_ALLDONETRIG)
- 			return 0;
--		}
- 		cpu_relax();
- 	}
- 
-@@ -288,6 +303,8 @@ static int img_spfi_start_pio(struct spi
- 	}
- 
- 	ret = spfi_wait_all_done(spfi);
-+	spfi_finish(spfi);
-+
- 	if (ret < 0)
- 		return ret;
- 
-@@ -303,8 +320,10 @@ static void img_spfi_dma_rx_cb(void *dat
- 
- 	spin_lock_irqsave(&spfi->lock, flags);
- 	spfi->rx_dma_busy = false;
--	if (!spfi->tx_dma_busy)
-+	if (!spfi->tx_dma_busy) {
-+		spfi_finish(spfi);
- 		spi_finalize_current_transfer(spfi->master);
-+	}
- 	spin_unlock_irqrestore(&spfi->lock, flags);
- }
- 
-@@ -317,8 +336,10 @@ static void img_spfi_dma_tx_cb(void *dat
- 
- 	spin_lock_irqsave(&spfi->lock, flags);
- 	spfi->tx_dma_busy = false;
--	if (!spfi->rx_dma_busy)
-+	if (!spfi->rx_dma_busy) {
-+		spfi_finish(spfi);
- 		spi_finalize_current_transfer(spfi->master);
-+	}
- 	spin_unlock_irqrestore(&spfi->lock, flags);
- }
- 
diff --git a/target/linux/pistachio/patches-5.15/108-clk-pistachio-Fix-wrong-SDHost-card-speed.patch b/target/linux/pistachio/patches-5.15/108-clk-pistachio-Fix-wrong-SDHost-card-speed.patch
deleted file mode 100644
index 6fddbe269a..0000000000
--- a/target/linux/pistachio/patches-5.15/108-clk-pistachio-Fix-wrong-SDHost-card-speed.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 3642843a06025ec333d7e92580cf52cb8db2a652 Mon Sep 17 00:00:00 2001
-From: Govindraj Raja <Govindraj.Raja at imgtec.com>
-Date: Fri, 8 Jan 2016 16:36:07 +0000
-Subject: clk: pistachio: Fix wrong SDHost card speed
-
-The SDHost currently clocks the card 4x slower than it
-should do, because there is fixed divide by 4 in the
-sdhost wrapper that is not present in the clock tree.
-To model this add a fixed divide by 4 clock node in
-the SDHost clock path.
-
-This will ensure the right clock frequency is selected when
-the mmc driver tries to configure frequency on card insert.
-
-Signed-off-by: Govindraj Raja <Govindraj.Raja at imgtec.com>
----
- drivers/clk/pistachio/clk-pistachio.c     | 3 ++-
- include/dt-bindings/clock/pistachio-clk.h | 1 +
- 2 files changed, 3 insertions(+), 1 deletion(-)
-
---- a/drivers/clk/pistachio/clk-pistachio.c
-+++ b/drivers/clk/pistachio/clk-pistachio.c
-@@ -41,7 +41,7 @@ static struct pistachio_gate pistachio_g
- 	GATE(CLK_AUX_ADC_INTERNAL, "aux_adc_internal", "sys_internal_div",
- 	     0x104, 22),
- 	GATE(CLK_AUX_ADC, "aux_adc", "aux_adc_div", 0x104, 23),
--	GATE(CLK_SD_HOST, "sd_host", "sd_host_div", 0x104, 24),
-+	GATE(CLK_SD_HOST, "sd_host", "sd_host_div4", 0x104, 24),
- 	GATE(CLK_BT, "bt", "bt_div", 0x104, 25),
- 	GATE(CLK_BT_DIV4, "bt_div4", "bt_div4_div", 0x104, 26),
- 	GATE(CLK_BT_DIV8, "bt_div8", "bt_div8_div", 0x104, 27),
-@@ -51,6 +51,7 @@ static struct pistachio_gate pistachio_g
- static struct pistachio_fixed_factor pistachio_ffs[] __initdata = {
- 	FIXED_FACTOR(CLK_WIFI_DIV4, "wifi_div4", "wifi_pll", 4),
- 	FIXED_FACTOR(CLK_WIFI_DIV8, "wifi_div8", "wifi_pll", 8),
-+	FIXED_FACTOR(CLK_SDHOST_DIV4, "sd_host_div4", "sd_host_div", 4),
- };
- 
- static struct pistachio_div pistachio_divs[] __initdata = {
---- a/include/dt-bindings/clock/pistachio-clk.h
-+++ b/include/dt-bindings/clock/pistachio-clk.h
-@@ -18,6 +18,7 @@
- /* Fixed-factor clocks */
- #define CLK_WIFI_DIV4			16
- #define CLK_WIFI_DIV8			17
-+#define CLK_SDHOST_DIV4			18
- 
- /* Gate clocks */
- #define CLK_MIPS			32
diff --git a/target/linux/pistachio/patches-5.15/109-MIPS-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch b/target/linux/pistachio/patches-5.15/109-MIPS-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch
deleted file mode 100644
index faba23c5f1..0000000000
--- a/target/linux/pistachio/patches-5.15/109-MIPS-DTS-img-marduk-switch-mmc-to-1-bit-mode.patch
+++ /dev/null
@@ -1,47 +0,0 @@
-From 981c1d416af45eff207227aec106381ac23aac99 Mon Sep 17 00:00:00 2001
-From: Ian Pozella <Ian.Pozella at imgtec.com>
-Date: Mon, 20 Feb 2017 10:00:52 +0000
-Subject: MIPS: DTS: img: marduk: switch mmc to 1 bit mode
-
-The mmc block in Pistachio allows 1 to 8 data bits to be used.
-Marduk uses 4 bits allowing the upper 4 bits to be allocated
-to the Mikrobus ports. However these bits are still connected
-internally meaning the mmc block recieves signals on all data lines
-and seems the internal HW CRC checks get corrupted by this erroneous
-data.
-
-We cannot control what data is sent on these lines because they go
-to external ports. 1 bit mode does not exhibit the issue hence the
-safe default is to use this. If a user knows that in their use case
-they will not use the upper bits then they can set to 4 bit mode in
-order to improve performance.
-
-Also make sure that the upper 4 bits don't get allocated to the mmc
-driver (the default is to assign all 8 pins) so they can be allocated
-to other drivers. Allocating all 4 despite setting 1 bit mode as this
-matches what is there in hardware.
-
-Signed-off-by: Ian Pozella <Ian.Pozella at imgtec.com>
----
- arch/mips/boot/dts/img/pistachio_marduk.dts | 3 ++-
- 1 file changed, 2 insertions(+), 1 deletion(-)
-
---- a/arch/mips/boot/dts/img/pistachio_marduk.dts
-+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
-@@ -118,7 +118,7 @@
- 
- &sdhost {
- 	status = "okay";
--	bus-width = <4>;
-+	bus-width = <1>;
- 	disable-wp;
- };
- 
-@@ -128,6 +128,7 @@
- 
- &pin_sdhost_data {
- 	drive-strength = <2>;
-+	pins = "mfio17", "mfio18", "mfio19", "mfio20";
- };
- 
- &pwm {
diff --git a/target/linux/pistachio/patches-5.15/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-5.15/401-mtd-nor-support-mtd-name-from-device-tree.patch
deleted file mode 100644
index 36f5331bd0..0000000000
--- a/target/linux/pistachio/patches-5.15/401-mtd-nor-support-mtd-name-from-device-tree.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From f32bc2aa01edcba2f2ed5db151cf183eac9ef919 Mon Sep 17 00:00:00 2001
-From: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
-Date: Sat, 25 Feb 2017 16:42:50 +0000
-Subject: mtd: nor: support mtd name from device tree
-
-Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
----
- drivers/mtd/spi-nor/spi-nor.c | 8 +++++++-
- 1 file changed, 7 insertions(+), 1 deletion(-)
-
---- a/drivers/mtd/spi-nor/core.c
-+++ b/drivers/mtd/spi-nor/core.c
-@@ -3108,6 +3108,7 @@ int spi_nor_scan(struct spi_nor *nor, co
- 	struct device *dev = nor->dev;
- 	struct mtd_info *mtd = &nor->mtd;
- 	struct device_node *np = spi_nor_get_flash_node(nor);
-+	const char __maybe_unused *of_mtd_name = NULL;
- 	int ret;
- 	int i;
- 
-@@ -3162,7 +3163,12 @@ int spi_nor_scan(struct spi_nor *nor, co
- 	if (ret)
- 		return ret;
- 
--	if (!mtd->name)
-+#ifdef CONFIG_MTD_OF_PARTS
-+	of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
-+#endif
-+	if (of_mtd_name)
-+		mtd->name = of_mtd_name;
-+	else if (!mtd->name)
- 		mtd->name = dev_name(dev);
- 	mtd->priv = nor;
- 	mtd->type = MTD_NORFLASH;
---- a/drivers/mtd/mtdcore.c
-+++ b/drivers/mtd/mtdcore.c
-@@ -870,6 +870,17 @@ out_error:
-  */
- static void mtd_set_dev_defaults(struct mtd_info *mtd)
- {
-+#ifdef CONFIG_MTD_OF_PARTS
-+	const char __maybe_unused *of_mtd_name = NULL;
-+	struct device_node *np;
-+
-+	np = mtd_get_of_node(mtd);
-+	if (np && !mtd->name) {
-+		of_property_read_string(np, "linux,mtd-name", &of_mtd_name);
-+		if (of_mtd_name)
-+			mtd->name = of_mtd_name;
-+	} else
-+#endif
- 	if (mtd->dev.parent) {
- 		if (!mtd->owner && mtd->dev.parent->driver)
- 			mtd->owner = mtd->dev.parent->driver->owner;
diff --git a/target/linux/pistachio/patches-5.15/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch b/target/linux/pistachio/patches-5.15/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch
deleted file mode 100644
index 4b28f46833..0000000000
--- a/target/linux/pistachio/patches-5.15/901-MIPS-DTS-img-marduk-Add-SPI-NAND-flash.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From 0023c706f7e0f0f02bd48a63a2f3c04c839532ae Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke at hauke-m.de>
-Date: Sat, 15 Aug 2020 16:04:53 +0200
-Subject: [PATCH 901/904] MIPS: DTS: img: marduk: Add SPI NAND flash
-
-Add Gigadevice GD5F4GQ4UCYIGT SPI NAND flash to the device tree.
-
-The NAND flash chip is connected with quad SPI, but reading currently
-fails in quad SPI mode.
-
-Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
----
- arch/mips/boot/dts/img/pistachio_marduk.dts | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/arch/mips/boot/dts/img/pistachio_marduk.dts
-+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
-@@ -89,6 +89,12 @@
- 		reg = <0>;
- 		spi-max-frequency = <50000000>;
- 	};
-+
-+	flash at 1 {
-+		compatible = "spi-nand";
-+		reg = <1>;
-+		spi-max-frequency = <50000000>;
-+	};
- };
- 
- &uart0 {
diff --git a/target/linux/pistachio/patches-5.15/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch b/target/linux/pistachio/patches-5.15/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch
deleted file mode 100644
index d4c4ccac53..0000000000
--- a/target/linux/pistachio/patches-5.15/902-MIPS-DTS-img-marduk-Add-Cascoda-CA8210-6LoWPAN.patch
+++ /dev/null
@@ -1,43 +0,0 @@
-From b7700154d75e8d7c9a2022f09c2d5430137606fa Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke at hauke-m.de>
-Date: Sat, 15 Aug 2020 16:05:25 +0200
-Subject: [PATCH 902/904] MIPS: DTS: img: marduk: Add Cascoda CA8210 6LoWPAN
-
-Add Cascoda CA8210 6LoWPAN controller to device tree.
-
-Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
----
- arch/mips/boot/dts/img/pistachio_marduk.dts | 22 +++++++++++++++++++++
- 1 file changed, 22 insertions(+)
-
---- a/arch/mips/boot/dts/img/pistachio_marduk.dts
-+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
-@@ -76,6 +76,28 @@
- 	VDD-supply = <&internal_dac_supply>;
- };
- 
-+&spfi0 {
-+	status = "okay";
-+	pinctrl-0 = <&spim0_pins>, <&spim0_cs0_alt_pin>, <&spim0_cs2_alt_pin>, <&spim0_cs3_alt_pin>, <&spim0_cs4_alt_pin>;
-+	pinctrl-names = "default";
-+
-+	cs-gpios = <&gpio1 14 GPIO_ACTIVE_HIGH>, <&gpio0 2 GPIO_ACTIVE_HIGH>,
-+			<&gpio1 12 GPIO_ACTIVE_HIGH>, <&gpio1 13 GPIO_ACTIVE_HIGH>;
-+
-+	ca8210: ca8210 at 0 {
-+		status = "okay";
-+		compatible = "cascoda,ca8210";
-+		reg = <0>;
-+		spi-max-frequency = <4000000>;
-+		spi-cpol;
-+		reset-gpio = <&gpio0 12 GPIO_ACTIVE_HIGH>;
-+		irq-gpio = <&gpio2 12 GPIO_ACTIVE_HIGH>;
-+		extclock-enable;
-+		extclock-freq = <16000000>;
-+		extclock-gpio = <2>;
-+	};
-+};
-+
- &spfi1 {
- 	status = "okay";
- 
diff --git a/target/linux/pistachio/patches-5.15/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch b/target/linux/pistachio/patches-5.15/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch
deleted file mode 100644
index b1070c3d30..0000000000
--- a/target/linux/pistachio/patches-5.15/903-MIPS-DTS-img-marduk-Add-NXP-SC16IS752IPW.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From ad4eba0c36ce8af6ab9ea1bc163e4c1ac7c271c3 Mon Sep 17 00:00:00 2001
-From: Hauke Mehrtens <hauke at hauke-m.de>
-Date: Sat, 15 Aug 2020 16:09:02 +0200
-Subject: [PATCH 903/904] MIPS: DTS: img: marduk: Add NXP SC16IS752IPW
-
-Add NXP SC16IS752IPW SPI-UART controller to device tree.
-
-This controller drives 2 UARTs and 7 LEDs on the board.
-
-Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
----
- arch/mips/boot/dts/img/pistachio_marduk.dts | 51 +++++++++++++++++++++
- 1 file changed, 51 insertions(+)
-
---- a/arch/mips/boot/dts/img/pistachio_marduk.dts
-+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
-@@ -46,6 +46,46 @@
- 		regulator-max-microvolt = <1800000>;
- 	};
- 
-+	/* EXT clock from ca8210 is fed to sc16is752 */
-+	ca8210_ext_clk: ca8210-ext-clk {
-+		compatible = "fixed-clock";
-+		#clock-cells = <0>;
-+		clock-frequency = <16000000>;
-+		clock-output-names = "ca8210_ext_clock";
-+	};
-+
-+	gpioleds {
-+		compatible = "gpio-leds";
-+		user1 {
-+			label = "marduk:red:user1";
-+			gpios = <&sc16is752 0 GPIO_ACTIVE_LOW>;
-+		};
-+		user2 {
-+			label = "marduk:red:user2";
-+			gpios = <&sc16is752 1 GPIO_ACTIVE_LOW>;
-+		};
-+		user3 {
-+			label = "marduk:red:user3";
-+			gpios = <&sc16is752 2 GPIO_ACTIVE_LOW>;
-+		};
-+		user4 {
-+			label = "marduk:red:user4";
-+			gpios = <&sc16is752 3 GPIO_ACTIVE_LOW>;
-+		};
-+		user5 {
-+			label = "marduk:red:user5";
-+			gpios = <&sc16is752 4 GPIO_ACTIVE_LOW>;
-+		};
-+		user6 {
-+			label = "marduk:red:user6";
-+			gpios = <&sc16is752 5 GPIO_ACTIVE_LOW>;
-+		};
-+		user7 {
-+			label = "marduk:red:user7";
-+			gpios = <&sc16is752 6 GPIO_ACTIVE_LOW>;
-+		};
-+	};
-+
- 	led-controller {
- 		compatible = "pwm-leds";
- 
-@@ -96,6 +136,17 @@
- 		extclock-freq = <16000000>;
- 		extclock-gpio = <2>;
- 	};
-+
-+	sc16is752: sc16is752 at 1 {
-+		compatible = "nxp,sc16is752";
-+		reg = <1>;
-+		clocks = <&ca8210_ext_clk>;
-+		spi-max-frequency = <4000000>;
-+		interrupt-parent = <&gpio0>;
-+		interrupts = <11 IRQ_TYPE_EDGE_FALLING>;
-+		gpio-controller;
-+		#gpio-cells = <2>;
-+	};
- };
- 
- &spfi1 {
diff --git a/target/linux/pistachio/patches-5.15/904-MIPS-DTS-img-marduk-Add-partition-name.patch b/target/linux/pistachio/patches-5.15/904-MIPS-DTS-img-marduk-Add-partition-name.patch
deleted file mode 100644
index 490027a702..0000000000
--- a/target/linux/pistachio/patches-5.15/904-MIPS-DTS-img-marduk-Add-partition-name.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From ff0e950b605047bf50d470023e0fb2fc2003a0f0 Mon Sep 17 00:00:00 2001
-From: Ian Pozella <Ian.Pozella at imgtec.com>
-Date: Mon, 20 Feb 2017 10:38:07 +0000
-Subject: [PATCH 904/904] MIPS: DTS: img: marduk: Add partition name
-
-Signed-off-by: Ian Pozella <Ian.Pozella at imgtec.com>
----
- arch/mips/boot/dts/img/pistachio_marduk.dts | 2 ++
- 1 file changed, 2 insertions(+)
-
---- a/arch/mips/boot/dts/img/pistachio_marduk.dts
-+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
-@@ -161,12 +161,14 @@
- 		compatible = "spansion,s25fl016k", "jedec,spi-nor";
- 		reg = <0>;
- 		spi-max-frequency = <50000000>;
-+		linux,mtd-name = "spi-nor";
- 	};
- 
- 	flash at 1 {
- 		compatible = "spi-nand";
- 		reg = <1>;
- 		spi-max-frequency = <50000000>;
-+		linux,mtd-name = "spi-nand";
- 	};
- };
- 
diff --git a/target/linux/pistachio/patches-5.15/905-MIPS-DTS-img-marduk-Add-led-aliases.patch b/target/linux/pistachio/patches-5.15/905-MIPS-DTS-img-marduk-Add-led-aliases.patch
deleted file mode 100644
index 8c03ddeea2..0000000000
--- a/target/linux/pistachio/patches-5.15/905-MIPS-DTS-img-marduk-Add-led-aliases.patch
+++ /dev/null
@@ -1,27 +0,0 @@
---- a/arch/mips/boot/dts/img/pistachio_marduk.dts
-+++ b/arch/mips/boot/dts/img/pistachio_marduk.dts
-@@ -19,6 +19,11 @@
- 		ethernet0 = &enet;
- 		spi0 = &spfi0;
- 		spi1 = &spfi1;
-+
-+		led-boot = &led_heartbeat;
-+		led-failsafe = &led_heartbeat;
-+		led-running = &led_heartbeat;
-+		led-upgrade = &led_heartbeat;
- 	};
- 
- 	chosen {
-@@ -89,11 +94,10 @@
- 	led-controller {
- 		compatible = "pwm-leds";
- 
--		led-1 {
-+		led_heartbeat: heartbeat {
- 			label = "marduk:red:heartbeat";
- 			pwms = <&pwm 3 300000>;
- 			max-brightness = <255>;
--			linux,default-trigger = "heartbeat";
- 		};
- 	};
- 



From lede-commits at lists.infradead.org  Tue Apr 16 10:42:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 16 Apr 2024 13:42:15 -0400
Subject: [openwrt/openwrt]  sunxi: update a13-olimex-som DTS path
In-Reply-To: <171328933519.4084538.13598119293816783403@git-01.infra.openwrt.org>
References: <171328933519.4084538.13598119293816783403@git-01.infra.openwrt.org>
Message-ID: <mailman.28097.1713289347.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bc4342142c7d8f47fc18f09661fd95b78063d2a9

commit bc4342142c7d8f47fc18f09661fd95b78063d2a9
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Apr 16 16:56:59 2024 +0000

    sunxi: update a13-olimex-som DTS path
    
    In preparation for supporting kernel 6.6, where the DTS files are grouped into
    vendors - similarly to what arm64 has been doing all along -, update the
    SUNXI_DTS var of this board to prepend it with SUNXI_DTS_DIR.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/image/cortexa8.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/sunxi/image/cortexa8.mk b/target/linux/sunxi/image/cortexa8.mk
index eafc2187e8..dd8a16763b 100644
--- a/target/linux/sunxi/image/cortexa8.mk
+++ b/target/linux/sunxi/image/cortexa8.mk
@@ -43,7 +43,7 @@ define Device/olimex_a13-olimex-som
   DEVICE_PACKAGES:=kmod-rtl8192cu
   SUPPORTED_DEVICES:=olimex,a13-olinuxino
   SOC := sun5i-a13
-  SUNXI_DTS := sun5i-a13-olinuxino
+  SUNXI_DTS := $$(SUNXI_DTS_DIR)sun5i-a13-olinuxino
 endef
 TARGET_DEVICES += olimex_a13-olimex-som
 



From lede-commits at lists.infradead.org  Tue Apr 16 12:51:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 16 Apr 2024 15:51:51 -0400
Subject: [openwrt/openwrt]  ipq40xx: whw03v2: enable additional 5 GHz channels
In-Reply-To: <171329711196.485687.9141786604590567259@git-01.infra.openwrt.org>
References: <171329711196.485687.9141786604590567259@git-01.infra.openwrt.org>
Message-ID: <mailman.28141.1713297122.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1c32cee348f54e9f64b5928ee1a1efe491eec137

commit 1c32cee348f54e9f64b5928ee1a1efe491eec137
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Wed Apr 3 00:30:46 2024 -0300

    ipq40xx: whw03v2: enable additional 5 GHz channels
    
    This device supports channel ranges 36-64 and 100-165, just like
    others based on the same reference design, but its current DTS is
    unnecessarily restricting these ranges to 36-48 and 149-165.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
---
 .../ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts     | 5 ++---
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts        | 5 ++---
 2 files changed, 4 insertions(+), 6 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
index 96733d8780..b76c52cd0a 100644
--- a/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files-6.1/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
@@ -487,7 +487,6 @@
 	qcom,coexist-support = <1>;
 	qcom,coexist-gpio-pin = <0x34>;
 
-	ieee80211-freq-limit = <2401000 2473000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
@@ -497,7 +496,7 @@
 &wifi1 {
 	status = "okay";
 
-	ieee80211-freq-limit = <5170000 5250000>;
+	ieee80211-freq-limit = <5170000 5330000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
@@ -507,7 +506,7 @@
 &wifi2 {
 	status = "okay";
 
-	ieee80211-freq-limit = <5735000 5835000>;
+	ieee80211-freq-limit = <5490000 5835000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
index 96733d8780..b76c52cd0a 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4019-whw03v2.dts
@@ -487,7 +487,6 @@
 	qcom,coexist-support = <1>;
 	qcom,coexist-gpio-pin = <0x34>;
 
-	ieee80211-freq-limit = <2401000 2473000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
@@ -497,7 +496,7 @@
 &wifi1 {
 	status = "okay";
 
-	ieee80211-freq-limit = <5170000 5250000>;
+	ieee80211-freq-limit = <5170000 5330000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
@@ -507,7 +506,7 @@
 &wifi2 {
 	status = "okay";
 
-	ieee80211-freq-limit = <5735000 5835000>;
+	ieee80211-freq-limit = <5490000 5835000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";



From lede-commits at lists.infradead.org  Tue Apr 16 12:53:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 16 Apr 2024 15:53:01 -0400
Subject: [openwrt/openwrt]  tools: mold: update to 2.30.0
In-Reply-To: <171329718129.491568.16829832400640267949@git-01.infra.openwrt.org>
References: <171329718129.491568.16829832400640267949@git-01.infra.openwrt.org>
Message-ID: <mailman.28142.1713297185.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ac881ce59ab9dfb84ba361d83f1feca91eec0d20

commit ac881ce59ab9dfb84ba361d83f1feca91eec0d20
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 15 10:59:46 2024 +0200

    tools: mold: update to 2.30.0
    
    Release Notes:
    https://github.com/rui314/mold/releases/tag/v2.3.3
    https://github.com/rui314/mold/releases/tag/v2.4.0
    https://github.com/rui314/mold/releases/tag/v2.4.1
    https://github.com/rui314/mold/releases/tag/v2.30.0
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/mold/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/mold/Makefile b/tools/mold/Makefile
index 418f04fb6b..b2a3231e67 100644
--- a/tools/mold/Makefile
+++ b/tools/mold/Makefile
@@ -3,12 +3,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mold
-PKG_VERSION:=2.3.2
+PKG_VERSION:=2.30.0
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL_FILE:=v$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/rui314/mold/archive/refs/tags
-PKG_HASH:=db172c0e97606565a81e37995bf5c911606d3f3b9f3829e92cd26985c9b0ed3b
+PKG_HASH:=6e5178ccafe828fdb4ba0dd841d083ff6004d3cb41e56485143eb64c716345fd
 
 include $(INCLUDE_DIR)/host-build.mk
 include $(INCLUDE_DIR)/cmake.mk



From lede-commits at lists.infradead.org  Tue Apr 16 14:13:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 16 Apr 2024 17:13:13 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.15 to 5.15.155
In-Reply-To: <171330199305.868336.734820554421506388@git-01.infra.openwrt.org>
References: <171330199305.868336.734820554421506388@git-01.infra.openwrt.org>
Message-ID: <mailman.28155.1713302005.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9693ed6a9edb2ec9c9aa5edfa816dda3897cdfc4

commit 9693ed6a9edb2ec9c9aa5edfa816dda3897cdfc4
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Apr 13 19:22:41 2024 +0200

    kernel: bump 5.15 to 5.15.155
    
    Manual adapted the following patches:
       generic/hack-5.15/221-module_exports.patch
       octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-5.15                                            |  4 ++--
 .../020-v6.1-05-mm-multi-gen-LRU-groundwork.patch              |  2 +-
 .../020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch  |  6 +++---
 ...020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch |  4 ++--
 ...-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch |  4 ++--
 ...-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch |  2 +-
 .../707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch   |  2 +-
 ....4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch |  2 +-
 ...-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch |  2 +-
 ...-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch |  2 +-
 ....18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch |  2 +-
 .../806-v6.0-0001-nvmem-microchip-otpc-add-support.patch       |  2 +-
 ...-nvmem-add-explicit-config-option-to-read-old-syntax-.patch |  2 +-
 target/linux/generic/config-5.15                               |  1 +
 target/linux/generic/hack-5.15/221-module_exports.patch        |  4 ++--
 .../generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch |  4 ++--
 target/linux/generic/hack-5.15/902-debloat_proc.patch          |  2 +-
 ...-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch |  2 +-
 ...120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch |  2 +-
 .../610-netfilter_match_bypass_default_checks.patch            |  2 +-
 ...-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |  2 +-
 ...-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch |  2 +-
 .../generic/pending-5.15/810-pci_disable_common_quirks.patch   |  8 ++++----
 .../lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch |  2 +-
 ...-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch | 10 +++++-----
 .../008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch    |  2 +-
 26 files changed, 40 insertions(+), 39 deletions(-)

diff --git a/include/kernel-5.15 b/include/kernel-5.15
index 84a0d0a1bf..4a82b9c9b3 100644
--- a/include/kernel-5.15
+++ b/include/kernel-5.15
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .153
-LINUX_KERNEL_HASH-5.15.153 = d7ddb1e144a88773b56a5b4a71baea0b241f3996d446be45290537c6997c84bc
+LINUX_VERSION-5.15 = .155
+LINUX_KERNEL_HASH-5.15.155 = c85859b86d2e6d1fc91ca1be8b44f24a9b5bb9f86869b04a8665a3a6559126e4
diff --git a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
index 969d721da6..85710eb79b 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
@@ -552,7 +552,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 --- a/kernel/bounds.c
 +++ b/kernel/bounds.c
 @@ -22,6 +22,11 @@ int main(void)
- 	DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));
+ 	DEFINE(NR_CPUS_BITS, bits_per(CONFIG_NR_CPUS));
  #endif
  	DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
 +#ifdef CONFIG_LRU_GEN
diff --git a/target/linux/generic/backport-5.15/020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch b/target/linux/generic/backport-5.15/020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch
index f8a7d9bd7f..14fc73f84d 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch
@@ -1251,7 +1251,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	get_scan_count(lruvec, sc, nr);
  
  	/* Record the original scan target for proportional adjustments later */
-@@ -3372,6 +4142,9 @@ static void snapshot_refaults(struct mem
+@@ -3375,6 +4145,9 @@ static void snapshot_refaults(struct mem
  	struct lruvec *target_lruvec;
  	unsigned long refaults;
  
@@ -1261,7 +1261,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	target_lruvec = mem_cgroup_lruvec(target_memcg, pgdat);
  	refaults = lruvec_page_state(target_lruvec, WORKINGSET_ACTIVATE_ANON);
  	target_lruvec->refaults[0] = refaults;
-@@ -3736,12 +4509,16 @@ unsigned long try_to_free_mem_cgroup_pag
+@@ -3739,12 +4512,16 @@ unsigned long try_to_free_mem_cgroup_pag
  }
  #endif
  
@@ -1280,7 +1280,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	if (!can_age_anon_pages(pgdat, sc))
  		return;
  
-@@ -4058,12 +4835,11 @@ restart:
+@@ -4061,12 +4838,11 @@ restart:
  		sc.may_swap = !nr_boost_reclaim;
  
  		/*
diff --git a/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch b/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch
index 234dfd916f..4cfd247178 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch
@@ -149,7 +149,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 
 --- a/fs/exec.c
 +++ b/fs/exec.c
-@@ -1013,6 +1013,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1014,6 +1014,7 @@ static int exec_mmap(struct mm_struct *m
  	active_mm = tsk->active_mm;
  	tsk->active_mm = mm;
  	tsk->mm = mm;
@@ -157,7 +157,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	/*
  	 * This prevents preemption while active_mm is being loaded and
  	 * it and mm are being updated, which could cause problems for
-@@ -1028,6 +1029,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1029,6 +1030,7 @@ static int exec_mmap(struct mm_struct *m
  	tsk->mm->vmacache_seqnum = 0;
  	vmacache_flush(tsk);
  	task_unlock(tsk);
diff --git a/target/linux/generic/backport-5.15/020-v6.1-15-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch b/target/linux/generic/backport-5.15/020-v6.1-15-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch
index 5b1d378504..b1319d98a3 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-15-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-15-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch
@@ -31,7 +31,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 
 --- a/fs/exec.c
 +++ b/fs/exec.c
-@@ -1013,7 +1013,6 @@ static int exec_mmap(struct mm_struct *m
+@@ -1014,7 +1014,6 @@ static int exec_mmap(struct mm_struct *m
  	active_mm = tsk->active_mm;
  	tsk->active_mm = mm;
  	tsk->mm = mm;
@@ -39,7 +39,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	/*
  	 * This prevents preemption while active_mm is being loaded and
  	 * it and mm are being updated, which could cause problems for
-@@ -1028,6 +1027,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1029,6 +1028,7 @@ static int exec_mmap(struct mm_struct *m
  		local_irq_enable();
  	tsk->mm->vmacache_seqnum = 0;
  	vmacache_flush(tsk);
diff --git a/target/linux/generic/backport-5.15/020-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch b/target/linux/generic/backport-5.15/020-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch
index 8cc9abd84f..cfeeaa662a 100644
--- a/target/linux/generic/backport-5.15/020-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch
+++ b/target/linux/generic/backport-5.15/020-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch
@@ -354,7 +354,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -7661,6 +7661,7 @@ static void __init free_area_init_node(i
+@@ -7663,6 +7663,7 @@ static void __init free_area_init_node(i
  	pgdat_set_deferred_range(pgdat);
  
  	free_area_init_core(pgdat);
diff --git a/target/linux/generic/backport-5.15/707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch b/target/linux/generic/backport-5.15/707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch
index 1cae648358..1f2a3ee140 100644
--- a/target/linux/generic/backport-5.15/707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch
+++ b/target/linux/generic/backport-5.15/707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch
@@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -11783,6 +11783,14 @@ L:	netdev at vger.kernel.org
+@@ -11790,6 +11790,14 @@ L:	netdev at vger.kernel.org
  S:	Maintained
  F:	drivers/net/ethernet/mediatek/
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
index b04ec45551..ee944a6fc5 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -11895,6 +11895,7 @@ M:	Landen Chao <Landen.Chao at mediatek.com
+@@ -11902,6 +11902,7 @@ M:	Landen Chao <Landen.Chao at mediatek.com
  M:	DENG Qingfang <dqfext at gmail.com>
  L:	netdev at vger.kernel.org
  S:	Maintained
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
index 2fad8f2b41..e6c1b941dd 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -11893,9 +11893,11 @@ MEDIATEK SWITCH DRIVER
+@@ -11900,9 +11900,11 @@ MEDIATEK SWITCH DRIVER
  M:	Sean Wang <sean.wang at mediatek.com>
  M:	Landen Chao <Landen.Chao at mediatek.com>
  M:	DENG Qingfang <dqfext at gmail.com>
diff --git a/target/linux/generic/backport-5.15/791-v6.2-01-net-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch b/target/linux/generic/backport-5.15/791-v6.2-01-net-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch
index 7c0a490695..c7f5856e8d 100644
--- a/target/linux/generic/backport-5.15/791-v6.2-01-net-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch
+++ b/target/linux/generic/backport-5.15/791-v6.2-01-net-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch
@@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -12694,6 +12694,7 @@ F:	include/uapi/linux/meye.h
+@@ -12701,6 +12701,7 @@ F:	include/uapi/linux/meye.h
  
  MOTORCOMM PHY DRIVER
  M:	Peter Geis <pgwipeout at gmail.com>
diff --git a/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch b/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch
index 79fd479054..ac77fc9b1d 100644
--- a/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch
+++ b/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch
@@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -17959,6 +17959,11 @@ L:	netdev at vger.kernel.org
+@@ -17966,6 +17966,11 @@ L:	netdev at vger.kernel.org
  S:	Maintained
  F:	drivers/net/ethernet/dlink/sundance.c
  
diff --git a/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch b/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch
index 24beeda0d2..f54ba7ebee 100644
--- a/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch
+++ b/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch
@@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -12358,6 +12358,14 @@ S:	Supported
+@@ -12365,6 +12365,14 @@ S:	Supported
  F:	Documentation/devicetree/bindings/mtd/atmel-nand.txt
  F:	drivers/mtd/nand/raw/atmel/*
  
diff --git a/target/linux/generic/backport-5.15/820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch b/target/linux/generic/backport-5.15/820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
index d207ea4872..9ce78e1f09 100644
--- a/target/linux/generic/backport-5.15/820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
+++ b/target/linux/generic/backport-5.15/820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
@@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	imx_ocotp_nvmem_config.priv = priv;
 --- a/drivers/nvmem/meson-efuse.c
 +++ b/drivers/nvmem/meson-efuse.c
-@@ -93,6 +93,7 @@ static int meson_efuse_probe(struct plat
+@@ -74,6 +74,7 @@ static int meson_efuse_probe(struct plat
  
  	econfig->dev = dev;
  	econfig->name = dev_name(dev);
diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15
index cf162543a8..50973e906d 100644
--- a/target/linux/generic/config-5.15
+++ b/target/linux/generic/config-5.15
@@ -4260,6 +4260,7 @@ CONFIG_NEW_LEDS=y
 # CONFIG_NFC is not set
 # CONFIG_NFP is not set
 # CONFIG_NFSD is not set
+# CONFIG_NFSD_V2 is not set
 # CONFIG_NFSD_V2_ACL is not set
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V3_ACL is not set
diff --git a/target/linux/generic/hack-5.15/221-module_exports.patch b/target/linux/generic/hack-5.15/221-module_exports.patch
index 87f541b46f..8db0f7dac7 100644
--- a/target/linux/generic/hack-5.15/221-module_exports.patch
+++ b/target/linux/generic/hack-5.15/221-module_exports.patch
@@ -27,8 +27,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +#define SYMTAB_DISCARD_GPL
 +#endif
 +
- /* Align . to a 8 byte boundary equals to maximum function alignment. */
- #define ALIGN_FUNCTION()  . = ALIGN(8)
+ /* Align . function alignment. */
+ #define ALIGN_FUNCTION()  . = ALIGN(CONFIG_FUNCTION_ALIGNMENT)
  
 @@ -485,14 +495,14 @@
  	/* Kernel symbol table: Normal symbols */			\
diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
index 0060fbbd2a..75c2e41fb6 100644
--- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
@@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1147,6 +1152,11 @@ static const struct usb_device_id option
+@@ -1152,6 +1157,11 @@ static const struct usb_device_id option
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  	  .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  	/* Quectel products using Qualcomm vendor ID */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1188,6 +1198,11 @@ static const struct usb_device_id option
+@@ -1193,6 +1203,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/hack-5.15/902-debloat_proc.patch b/target/linux/generic/hack-5.15/902-debloat_proc.patch
index 4d82317b70..c7e40dfc6a 100644
--- a/target/linux/generic/hack-5.15/902-debloat_proc.patch
+++ b/target/linux/generic/hack-5.15/902-debloat_proc.patch
@@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/fs/locks.c
 +++ b/fs/locks.c
-@@ -2953,6 +2953,8 @@ static const struct seq_operations locks
+@@ -3008,6 +3008,8 @@ static const struct seq_operations locks
  
  static int __init proc_locks_init(void)
  {
diff --git a/target/linux/generic/hack-5.15/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch b/target/linux/generic/hack-5.15/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
index 4f4d6c7509..b4339e82d7 100644
--- a/target/linux/generic/hack-5.15/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
+++ b/target/linux/generic/hack-5.15/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
@@ -19,7 +19,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/drivers/base/core.c
 +++ b/drivers/base/core.c
-@@ -1562,7 +1562,7 @@ static void device_links_purge(struct de
+@@ -1577,7 +1577,7 @@ static void device_links_purge(struct de
  #define FW_DEVLINK_FLAGS_RPM		(FW_DEVLINK_FLAGS_ON | \
  					 DL_FLAG_PM_RUNTIME)
  
diff --git a/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
index ac5e3a69b8..42f5a8c246 100644
--- a/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
+++ b/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO at vplace.de>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -7620,7 +7620,7 @@ static void __init alloc_node_mem_map(st
+@@ -7622,7 +7622,7 @@ static void __init alloc_node_mem_map(st
  	if (pgdat == NODE_DATA(0)) {
  		mem_map = NODE_DATA(0)->node_mem_map;
  		if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
diff --git a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
index c1e050e935..b17196d3a9 100644
--- a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1222,12 +1259,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1224,12 +1261,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 70aee30eb6..2f1b3ed793 100644
--- a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -7770,7 +7770,7 @@ static int nft_register_flowtable_net_ho
+@@ -7803,7 +7803,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch b/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch
index 8e2f3a9475..54c07f0022 100644
--- a/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch
+++ b/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch
@@ -17,7 +17,7 @@ Signed-off-by: Alexander Duyck <alexanderduyck at fb.com>
 
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
-@@ -4359,6 +4359,15 @@ int skb_gro_receive(struct sk_buff *p, s
+@@ -4360,6 +4360,15 @@ int skb_gro_receive(struct sk_buff *p, s
  	if (unlikely(p->len + len >= 65536 || NAPI_GRO_CB(skb)->flush))
  		return -E2BIG;
  
diff --git a/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch
index f7f16ee37d..302051cc3b 100644
--- a/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch
+++ b/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch
@@ -25,7 +25,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -206,6 +206,7 @@ static void quirk_mmio_always_on(struct
+@@ -207,6 +207,7 @@ static void quirk_mmio_always_on(struct
  DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
  				PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
  
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * The Mellanox Tavor device gives false positive parity errors.  Disable
   * parity error reporting.
-@@ -3368,6 +3369,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3369,6 +3370,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
  
@@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum.
   * To work around this, query the size it should be configured to by the
-@@ -3393,6 +3396,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3394,6 +3397,8 @@ static void quirk_intel_ntb(struct pci_d
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb);
  
@@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * Some BIOS implementations leave the Intel GPU interrupts enabled, even
   * though no one is handling them (e.g., if the i915 driver is never
-@@ -3431,6 +3436,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3432,6 +3437,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
  
diff --git a/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch
index 1c5f69131e..6454240014 100644
--- a/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch
@@ -5524,7 +5524,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	  (transaction layer end-to-end CRC checking).
 --- a/include/linux/pci.h
 +++ b/include/linux/pci.h
-@@ -1482,6 +1482,8 @@ void pci_walk_bus(struct pci_bus *top, i
+@@ -1483,6 +1483,8 @@ void pci_walk_bus(struct pci_bus *top, i
  		  void *userdata);
  int pci_cfg_space_size(struct pci_dev *dev);
  unsigned char pci_bus_max_busnr(struct pci_bus *bus);
diff --git a/target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
index e09ccce0f8..12910b74e4 100644
--- a/target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
+++ b/target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
@@ -14,7 +14,7 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -25,6 +25,7 @@
+@@ -26,6 +26,7 @@
  #include <linux/ktime.h>
  #include <linux/mm.h>
  #include <linux/nvme.h>
@@ -22,10 +22,10 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
  #include <linux/platform_data/x86/apple.h>
  #include <linux/pm_runtime.h>
  #include <linux/suspend.h>
-@@ -5900,3 +5901,34 @@ static void nvidia_ion_ahci_fixup(struct
- 	pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING;
- }
- DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);
+@@ -6000,3 +6001,34 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa73f, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa76e, dpc_log_size);
+ #endif
 +
 +#ifdef CONFIG_PCI_HOST_THUNDER_PEM
 +/*
diff --git a/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch b/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch
index 60db030647..7df22b0725 100644
--- a/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch
+++ b/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch
@@ -32,7 +32,7 @@ Signed-off-by: Guenter Roeck <linux at roeck-us.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -15896,6 +15896,13 @@ S:	Maintained
+@@ -15903,6 +15903,13 @@ S:	Maintained
  F:	include/sound/rt*.h
  F:	sound/soc/codecs/rt*
  



From lede-commits at lists.infradead.org  Tue Apr 16 16:12:56 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 16 Apr 2024 19:12:56 -0400
Subject: [openwrt/openwrt]  sunxi: fix network bringup on Olinuxino Micro
 boards
In-Reply-To: <171330917649.1365503.14851417260883774556@git-01.infra.openwrt.org>
References: <171330917649.1365503.14851417260883774556@git-01.infra.openwrt.org>
Message-ID: <mailman.28196.1713309185.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3ed8927cf5d7eb78d1427151cfa83bd535634d47

commit 3ed8927cf5d7eb78d1427151cfa83bd535634d47
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed Apr 17 00:42:56 2024 +0200

    sunxi: fix network bringup on Olinuxino Micro boards
    
    It's the A13-based Olinuxino Micro which has only wireless interfaces. The
    A20-based board is a fully-fledged one which has an ethernet interface.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/base-files/etc/board.d/02_network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network
index b295dc7daa..073565d4ee 100644
--- a/target/linux/sunxi/base-files/etc/board.d/02_network
+++ b/target/linux/sunxi/base-files/etc/board.d/02_network
@@ -17,7 +17,7 @@ sunxi_setup_interfaces()
 	lamobo,lamobo-r1)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
 		;;
-	olimex,a20-olinuxino-micro)
+	olimex,a13-olinuxino-micro)
 		ucidef_set_interface_lan "wlan0"
 		;;
 	xunlong,orangepi-r1)



From lede-commits at lists.infradead.org  Tue Apr 16 21:16:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 00:16:52 -0400
Subject: [openwrt/openwrt]  ipset: include libgen.h for basename
In-Reply-To: <171332741258.2821350.4427496133150227672@git-01.infra.openwrt.org>
References: <171332741258.2821350.4427496133150227672@git-01.infra.openwrt.org>
Message-ID: <mailman.28218.1713327420.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c7fb5d4cac7534e63d91bdf5e5ee5b4e5213e488

commit c7fb5d4cac7534e63d91bdf5e5ee5b4e5213e488
Author: Chuanhong Guo <gch981213 at gmail.com>
AuthorDate: Wed Apr 17 12:12:25 2024 +0800

    ipset: include libgen.h for basename
    
    musl dropped the GNU version of basename prototype from string.h
    in 1.2.5.
    
    Signed-off-by: Chuanhong Guo <gch981213 at gmail.com>
---
 .../ipset/patches/0001-include-libgen.h-for-basename.patch   | 12 ++++++++++++
 1 file changed, 12 insertions(+)

diff --git a/package/network/utils/ipset/patches/0001-include-libgen.h-for-basename.patch b/package/network/utils/ipset/patches/0001-include-libgen.h-for-basename.patch
new file mode 100644
index 0000000000..fb86bbab15
--- /dev/null
+++ b/package/network/utils/ipset/patches/0001-include-libgen.h-for-basename.patch
@@ -0,0 +1,12 @@
+--- a/src/ipset.c
++++ b/src/ipset.c
+@@ -6,8 +6,8 @@
+  * it under the terms of the GNU General Public License version 2 as
+  * published by the Free Software Foundation.
+  */
+-#define _GNU_SOURCE
+ #include <assert.h>			/* assert */
++#include <libgen.h>			/* basename */
+ #include <stdio.h>			/* fprintf */
+ #include <stdlib.h>			/* exit */
+ #include <string.h>			/* strcmp */



From lede-commits at lists.infradead.org  Tue Apr 16 21:16:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 00:16:53 -0400
Subject: [openwrt/openwrt]  ipset: update to 7.21
In-Reply-To: <171332741258.2821350.4427496133150227672@git-01.infra.openwrt.org>
References: <171332741258.2821350.4427496133150227672@git-01.infra.openwrt.org>
Message-ID: <mailman.28219.1713327420.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9f6a28b91e30de9c6875afbe1493934218dbfb49

commit 9f6a28b91e30de9c6875afbe1493934218dbfb49
Author: Chuanhong Guo <gch981213 at gmail.com>
AuthorDate: Wed Apr 17 12:09:07 2024 +0800

    ipset: update to 7.21
    
    release notes:
    7.21: https://www.spinics.net/lists/netfilter-devel/msg85299.html
    7.20: https://www.spinics.net/lists/netfilter-devel/msg85120.html
    7.19: https://www.spinics.net/lists/netfilter-devel/msg82985.html
    
    Signed-off-by: Chuanhong Guo <gch981213 at gmail.com>
---
 package/network/utils/ipset/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/utils/ipset/Makefile b/package/network/utils/ipset/Makefile
index b0aac8fe36..c62bbd8b68 100644
--- a/package/network/utils/ipset/Makefile
+++ b/package/network/utils/ipset/Makefile
@@ -9,12 +9,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=ipset
-PKG_VERSION:=7.17
+PKG_VERSION:=7.21
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://ipset.netfilter.org
-PKG_HASH:=be49c9ff489dd6610cad6541e743c3384eac96e9f24707da7b3929d8f2ac64d8
+PKG_HASH:=e2c6ce4fcf3acb3893ca5d35c86935f80ad76fc5ccae601185842df760e0bc69
 
 PKG_MAINTAINER:=Jo-Philipp Wich <jo at mein.io>
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Tue Apr 16 21:35:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 00:35:13 -0400
Subject: [openwrt/openwrt]  ncm: add sourcefilter option support
In-Reply-To: <171332851396.2900410.3742201744576040618@git-01.infra.openwrt.org>
References: <171332851396.2900410.3742201744576040618@git-01.infra.openwrt.org>
Message-ID: <mailman.28220.1713328518.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/01e8d822e89266696420ab5ec64360ff1ac1fee8

commit 01e8d822e89266696420ab5ec64360ff1ac1fee8
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Mon Jan 22 22:59:18 2024 +0800

    ncm: add sourcefilter option support
    
    This make source based IPv6 routing option available for ncm
    
    Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
---
 package/network/utils/comgt/files/ncm.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/network/utils/comgt/files/ncm.sh b/package/network/utils/comgt/files/ncm.sh
index dec058712d..4c829fa930 100644
--- a/package/network/utils/comgt/files/ncm.sh
+++ b/package/network/utils/comgt/files/ncm.sh
@@ -19,6 +19,7 @@ proto_ncm_init_config() {
 	proto_config_add_string delay
 	proto_config_add_string mode
 	proto_config_add_string pdptype
+	proto_config_add_boolean sourcefilter
 	proto_config_add_int profile
 	proto_config_add_defaults
 }
@@ -29,7 +30,7 @@ proto_ncm_setup() {
 	local manufacturer initialize setmode connect finalize devname devpath ifpath
 
 	local device ifname  apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS
-	json_get_vars device ifname apn auth username password pincode delay mode pdptype profile $PROTO_DEFAULT_OPTIONS
+	json_get_vars device ifname apn auth username password pincode delay mode pdptype sourcefilter profile $PROTO_DEFAULT_OPTIONS
 
 	local context_type
 
@@ -202,6 +203,7 @@ proto_ncm_setup() {
 		json_add_string ifname "@$interface"
 		json_add_string proto "dhcpv6"
 		json_add_string extendprefix 1
+		[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
 		proto_add_dynamic_defaults
 		[ -n "$zone" ] && {
 			json_add_string zone "$zone"



From lede-commits at lists.infradead.org  Tue Apr 16 21:35:14 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 00:35:14 -0400
Subject: [openwrt/openwrt]  mbim: add sourcefilter option support
In-Reply-To: <171332851396.2900410.3742201744576040618@git-01.infra.openwrt.org>
References: <171332851396.2900410.3742201744576040618@git-01.infra.openwrt.org>
Message-ID: <mailman.28221.1713328518.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/044fb8fc133cb0bf6ff0e3c723538f0958838a73

commit 044fb8fc133cb0bf6ff0e3c723538f0958838a73
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Mon Jan 22 22:59:44 2024 +0800

    mbim: add sourcefilter option support
    
    This make source based IPv6 routing option available for mbim
    
    Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
---
 package/network/utils/umbim/files/lib/netifd/proto/mbim.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
index 50913e7fa0..f2d4c436e8 100755
--- a/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
+++ b/package/network/utils/umbim/files/lib/netifd/proto/mbim.sh
@@ -22,6 +22,7 @@ proto_mbim_init_config() {
 	[ -e /proc/sys/net/ipv6 ] && proto_config_add_string ipv6
 	proto_config_add_string dhcp
 	proto_config_add_string dhcpv6
+	proto_config_add_boolean sourcefilter
 	proto_config_add_string pdptype
 	proto_config_add_int mtu
 	proto_config_add_defaults
@@ -47,7 +48,7 @@ _proto_mbim_setup() {
 	local device apn pincode delay auth username password allow_roaming allow_partner
 	local dhcp dhcpv6 pdptype ip4table ip6table mtu $PROTO_DEFAULT_OPTIONS
 	json_get_vars device apn pincode delay auth username password allow_roaming allow_partner
-	json_get_vars dhcp dhcpv6 pdptype ip4table ip6table mtu $PROTO_DEFAULT_OPTIONS
+	json_get_vars dhcp dhcpv6 sourcefilter pdptype ip4table ip6table mtu $PROTO_DEFAULT_OPTIONS
 
 	[ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6
 
@@ -263,6 +264,7 @@ _proto_mbim_setup() {
 			echo "mbim[$$]" "Starting DHCPv6 on $ifname"
 			json_add_string proto "dhcpv6"
 			json_add_string extendprefix 1
+			[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
 		fi
 
 		[ "$peerdns" = 0 -a "$dhcpv6" != 1 ] || {



From lede-commits at lists.infradead.org  Tue Apr 16 21:35:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 00:35:15 -0400
Subject: [openwrt/openwrt]  qmi: add sourcefilter option support
In-Reply-To: <171332851396.2900410.3742201744576040618@git-01.infra.openwrt.org>
References: <171332851396.2900410.3742201744576040618@git-01.infra.openwrt.org>
Message-ID: <mailman.28222.1713328520.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/44a3c18a31a2a40cd502261016dc60433006cae8

commit 44a3c18a31a2a40cd502261016dc60433006cae8
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Mon Jan 22 23:00:03 2024 +0800

    qmi: add sourcefilter option support
    
    This make source based IPv6 routing option available for qmi
    
    Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
---
 package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
index 49fd87ff9d..bec46325bc 100755
--- a/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
+++ b/package/network/utils/uqmi/files/lib/netifd/proto/qmi.sh
@@ -23,6 +23,7 @@ proto_qmi_init_config() {
 	proto_config_add_int v6profile
 	proto_config_add_boolean dhcp
 	proto_config_add_boolean dhcpv6
+	proto_config_add_boolean sourcefilter
 	proto_config_add_boolean autoconnect
 	proto_config_add_int plmn
 	proto_config_add_int timeout
@@ -41,7 +42,7 @@ proto_qmi_setup() {
 	local profile_pdptype
 
 	json_get_vars device apn v6apn auth username password pincode delay modes
-	json_get_vars pdptype profile v6profile dhcp dhcpv6 autoconnect plmn ip4table
+	json_get_vars pdptype profile v6profile dhcp dhcpv6 sourcefilter autoconnect plmn ip4table
 	json_get_vars ip6table timeout mtu $PROTO_DEFAULT_OPTIONS
 
 	[ "$timeout" = "" ] && timeout="10"
@@ -441,6 +442,7 @@ proto_qmi_setup() {
 			proto_add_dynamic_defaults
 			# RFC 7278: Extend an IPv6 /64 Prefix to LAN
 			json_add_string extendprefix 1
+			[ "$sourcefilter" = "0" ] && json_add_boolean sourcefilter "0"
 			[ -n "$zone" ] && json_add_string zone "$zone"
 			json_close_object
 			ubus call network add_dynamic "$(json_dump)"



From lede-commits at lists.infradead.org  Tue Apr 16 21:36:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 00:36:53 -0400
Subject: [openwrt/openwrt]  build: fix kernel component in CycloneDX SBOM
In-Reply-To: <171332861359.2908049.7823603061138454613@git-01.infra.openwrt.org>
References: <171332861359.2908049.7823603061138454613@git-01.infra.openwrt.org>
Message-ID: <mailman.28223.1713328617.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/340e3dc4537522f44f3b8247d90b132e8e293948

commit 340e3dc4537522f44f3b8247d90b132e8e293948
Author: Cedric DOURLENT <cedric.dourlent at softathome.com>
AuthorDate: Fri Mar 1 16:42:34 2024 +0100

    build: fix kernel component in CycloneDX SBOM
    
    As stated in the cycloneDX documentation, the field "type" is mandatory for all components.
    
    More details here (https://cyclonedx.org/docs/1.5/json/#components_items_type)
    
    Signed-off-by: Cedric DOURLENT <cedric.dourlent at softathome.com>
    (cherry picked from commit 84331215e57090a9cdae4af75af2539c39cd7de7)
---
 scripts/package-metadata.pl | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/scripts/package-metadata.pl b/scripts/package-metadata.pl
index bc61577d22..b4855ce67a 100755
--- a/scripts/package-metadata.pl
+++ b/scripts/package-metadata.pl
@@ -675,6 +675,7 @@ sub gen_image_cyclonedxsbom() {
 		license => "GPL-2.0",
 		cpe_id  => "cpe:/o:linux:linux_kernel",
 		name    => "kernel",
+		category  => "operating-system",
 	};
 
 	my %abimap;
@@ -703,6 +704,7 @@ sub gen_image_cyclonedxsbom() {
 		if ($pkg->{category}) {
 			my $category = $pkg->{category};
 			my %cat_type = (
+				"operating-system"        => "operating-system",
 				"Firmware"        => "firmware",
 				"Libraries"       => "library"
 			);



From lede-commits at lists.infradead.org  Tue Apr 16 22:05:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 01:05:30 -0400
Subject: [openwrt/openwrt]  .gitignore: ignore link if target is included from
 feed
In-Reply-To: <171333033036.3048018.16996516929360802208@git-01.infra.openwrt.org>
References: <171333033036.3048018.16996516929360802208@git-01.infra.openwrt.org>
Message-ID: <mailman.28226.1713330336.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/f2366d75cf7b74239fc3f26f45d577ca4aa3a067

commit f2366d75cf7b74239fc3f26f45d577ca4aa3a067
Author: Florian Eckert <fe at dev.tdt.de>
AuthorDate: Wed Jul 19 11:54:25 2023 +0200

    .gitignore: ignore link if target is included from feed
    
    If an out of tree target is included via a feed, then there is a link with
    the name 'feed' in the target directory. Do not show this link in git.
    
    Signed-off-by: Florian Eckert <fe at dev.tdt.de>
    (cherry picked from commit 13e7a2d19f4545170a8deaab03411bc37182f7c4)
---
 .gitignore | 1 +
 1 file changed, 1 insertion(+)

diff --git a/.gitignore b/.gitignore
index a80cdbbea3..84cfc99770 100644
--- a/.gitignore
+++ b/.gitignore
@@ -14,6 +14,7 @@
 /feeds
 /feeds.conf
 /files
+/target/linux/feeds
 /overlay
 /package/feeds
 /package/openwrt-packages



From lede-commits at lists.infradead.org  Wed Apr 17 02:31:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 05:31:16 -0400
Subject: [openwrt/openwrt]  tools: zstd: update patch with upstream version
In-Reply-To: <171334627616.33083.15697900810910382487@git-01.infra.openwrt.org>
References: <171334627616.33083.15697900810910382487@git-01.infra.openwrt.org>
Message-ID: <mailman.28316.1713346282.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2b6923bc7601c732a62d0e169c69106638af0a84

commit 2b6923bc7601c732a62d0e169c69106638af0a84
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Wed Apr 17 11:28:58 2024 +0200

    tools: zstd: update patch with upstream version
    
    Proposed fixup has been replaced and merged with an advanced version.
    
    install-pc-mt has been dropped and replaced for intall-pc MT=1 to
    generate a .pc file with multithread libs.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 tools/zstd/Makefile                                |   3 +-
 ...iant-pkg-config-file-for-multi-threaded-s.patch | 126 +++++++++++++++++++++
 ...iant-pkg-config-file-for-multi-threaded-s.patch |  97 ----------------
 3 files changed, 128 insertions(+), 98 deletions(-)

diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index 0264ac2422..f962809f82 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -31,7 +31,8 @@ define Host/Compile
 endef
 
 define Host/Install
-	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib install-mt-pc install-static install-includes PREFIX=$(HOST_BUILD_PREFIX)
+	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib install-static install-includes PREFIX=$(HOST_BUILD_PREFIX)
+	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib install-pc MT=1 PREFIX=$(HOST_BUILD_PREFIX)
 	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/programs install PREFIX=$(HOST_BUILD_PREFIX)
 endef
 
diff --git a/tools/zstd/patches/001-Provide-variant-pkg-config-file-for-multi-threaded-s.patch b/tools/zstd/patches/001-Provide-variant-pkg-config-file-for-multi-threaded-s.patch
new file mode 100644
index 0000000000..1bbcaf4c8a
--- /dev/null
+++ b/tools/zstd/patches/001-Provide-variant-pkg-config-file-for-multi-threaded-s.patch
@@ -0,0 +1,126 @@
+From f1f1ae369a4cefd3474b3528e8d1847b18750605 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Sat, 6 Apr 2024 14:41:54 +0200
+Subject: [PATCH] Provide variant pkg-config file for multi-threaded static lib
+
+Multi-threaded static library require -pthread to correctly link and works.
+The pkg-config we provide tho only works with dynamic multi-threaded library
+and won't provide the correct libs and cflags values if lib-mt is used.
+
+To handle this, introduce an env variable MT to permit advanced user to
+install and generate a correct pkg-config file for lib-mt or detect if
+lib-mt target is called.
+
+With MT env set on calling make install-pc, libzstd.pc.in is a
+pkg-config file for a multi-threaded static library.
+
+On calling make lib-mt, a libzstd.pc is generated for a multi-threaded
+static library as it's what asked by the user by forcing it.
+
+libzstd.pc is changed to PHONY to force regeneration of it on calling
+lib targets or install-pc to handle case where the same directory is
+used for mixed compilation.
+
+This was notice while migrating from meson to make build system where
+meson generates a correct .pc file while make doesn't.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ lib/Makefile      | 20 +++++++++++++++++++-
+ lib/README.md     |  4 ++++
+ lib/libzstd.pc.in |  4 ++--
+ 3 files changed, 25 insertions(+), 3 deletions(-)
+
+--- a/lib/Makefile
++++ b/lib/Makefile
+@@ -63,6 +63,8 @@ CPPFLAGS_DYNLIB  += -DZSTD_MULTITHREAD #
+ LDFLAGS_DYNLIB   += -pthread
+ CPPFLAGS_STATICLIB +=                  # static library build defaults to single-threaded
+ 
++# pkg-config Libs.private points to LDFLAGS_DYNLIB
++PCLIB := $(LDFLAGS_DYNLIB)
+ 
+ ifeq ($(findstring GCC,$(CCVER)),GCC)
+ decompress/zstd_decompress_block.o : CFLAGS+=-fno-tree-vectorize
+@@ -186,12 +188,15 @@ lib : libzstd.a libzstd
+ %-mt : CPPFLAGS_DYNLIB  := -DZSTD_MULTITHREAD
+ %-mt : CPPFLAGS_STATICLIB := -DZSTD_MULTITHREAD
+ %-mt : LDFLAGS_DYNLIB   := -pthread
++%-mt : PCLIB :=
++%-mt : PCMTLIB := $(LDFLAGS_DYNLIB)
+ %-mt : %
+ 	@echo multi-threaded build completed
+ 
+ %-nomt : CPPFLAGS_DYNLIB  :=
+ %-nomt : LDFLAGS_DYNLIB   :=
+ %-nomt : CPPFLAGS_STATICLIB :=
++%-nomt : PCLIB :=
+ %-nomt : %
+ 	@echo single-threaded build completed
+ 
+@@ -292,6 +297,14 @@ PCLIBPREFIX := $(if $(findstring $(LIBDI
+ # to PREFIX, rather than as a resolved value.
+ PCEXEC_PREFIX := $(if $(HAS_EXPLICIT_EXEC_PREFIX),$(EXEC_PREFIX),$${prefix})
+ 
++
++ifneq ($(MT),)
++  PCLIB :=
++  PCMTLIB := $(LDFLAGS_DYNLIB)
++else
++  PCLIB := $(LDFLAGS_DYNLIB)
++endif
++
+ ifneq (,$(filter $(UNAME),FreeBSD NetBSD DragonFly))
+   PKGCONFIGDIR ?= $(PREFIX)/libdata/pkgconfig
+ else
+@@ -308,6 +321,10 @@ INSTALL_PROGRAM ?= $(INSTALL)
+ INSTALL_DATA    ?= $(INSTALL) -m 644
+ 
+ 
++# pkg-config library define.
++# For static single-threaded library declare -pthread in Libs.private
++# For static multi-threaded library declare -pthread in Libs and Cflags
++.PHONY: libzstd.pc
+ libzstd.pc: libzstd.pc.in
+ 	@echo creating pkgconfig
+ 	@sed \
+@@ -316,7 +333,8 @@ libzstd.pc: libzstd.pc.in
+ 	        -e 's|@INCLUDEDIR@|$(PCINCPREFIX)$(PCINCDIR)|' \
+ 	        -e 's|@LIBDIR@|$(PCLIBPREFIX)$(PCLIBDIR)|' \
+ 	        -e 's|@VERSION@|$(VERSION)|' \
+-	        -e 's|@LIBS_PRIVATE@|$(LDFLAGS_DYNLIB)|' \
++	        -e 's|@LIBS_MT@|$(PCMTLIB)|' \
++	        -e 's|@LIBS_PRIVATE@|$(PCLIB)|' \
+ 	        $< >$@
+ 
+ .PHONY: install
+--- a/lib/README.md
++++ b/lib/README.md
+@@ -27,12 +27,16 @@ Enabling multithreading requires 2 condi
+ 
+ For convenience, we provide a build target to generate multi and single threaded libraries:
+ - Force enable multithreading on both dynamic and static libraries by appending `-mt` to the target, e.g. `make lib-mt`.
++  Note that the `.pc` generated on calling `make lib-mt` will already include the require Libs and Cflags.
+ - Force disable multithreading on both dynamic and static libraries by appending `-nomt` to the target, e.g. `make lib-nomt`.
+ - By default, as mentioned before, dynamic library is multithreaded, and static library is single-threaded, e.g. `make lib`.
+ 
+ When linking a POSIX program with a multithreaded version of `libzstd`,
+ note that it's necessary to invoke the `-pthread` flag during link stage.
+ 
++The `.pc` generated from `make install` or `make install-pc` always assume a single-threaded static library
++is compiled. To correctly generate a `.pc` for the multi-threaded static library, set `MT=1` as ENV variable.
++
+ Multithreading capabilities are exposed
+ via the [advanced API defined in `lib/zstd.h`](https://github.com/facebook/zstd/blob/v1.4.3/lib/zstd.h#L351).
+ 
+--- a/lib/libzstd.pc.in
++++ b/lib/libzstd.pc.in
+@@ -11,6 +11,6 @@ Name: zstd
+ Description: fast lossless compression algorithm library
+ URL: https://facebook.github.io/zstd/
+ Version: @VERSION@
+-Libs: -L${libdir} -lzstd
++Libs: -L${libdir} -lzstd @LIBS_MT@
+ Libs.private: @LIBS_PRIVATE@
+-Cflags: -I${includedir}
++Cflags: -I${includedir} @LIBS_MT@
diff --git a/tools/zstd/patches/100-Provide-variant-pkg-config-file-for-multi-threaded-s.patch b/tools/zstd/patches/100-Provide-variant-pkg-config-file-for-multi-threaded-s.patch
deleted file mode 100644
index a7b3823e66..0000000000
--- a/tools/zstd/patches/100-Provide-variant-pkg-config-file-for-multi-threaded-s.patch
+++ /dev/null
@@ -1,97 +0,0 @@
-From 5886e6a45b3c20c8d8f837657d1506b580434136 Mon Sep 17 00:00:00 2001
-From: Christian Marangi <ansuelsmth at gmail.com>
-Date: Sat, 6 Apr 2024 14:41:54 +0200
-Subject: [PATCH] Provide variant pkg-config file for multi-threaded static lib
-
-Multi-threaded static library require -pthread to correctly link and works.
-The pkg-config we provide tho only works with dynamic multi-threaded library
-and won't provide the correct libs and cflags values if lib-mt is used.
-
-To handle this, introduce a variant of libzstd.pc.in, mt-libzstd.pc.in
-and intoduce a new make target, install-mt-pc to permit advanced user to
-install and generate a correct pkg-config file for lib-mt.
-
-This was notice while migrating from meson to make build system where
-meson generates a correct .pc file while make doesn't.
-
-Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
----
- lib/Makefile         | 16 ++++++++++++++++
- lib/README.md        |  4 ++++
- lib/mt-libzstd.pc.in | 15 +++++++++++++++
- 3 files changed, 35 insertions(+)
- create mode 100644 lib/mt-libzstd.pc.in
-
-diff --git a/lib/Makefile b/lib/Makefile
-index 8bfdade9..4933f0e9 100644
---- a/lib/Makefile
-+++ b/lib/Makefile
-@@ -319,6 +319,17 @@ libzstd.pc: libzstd.pc.in
- 	        -e 's|@LIBS_PRIVATE@|$(LDFLAGS_DYNLIB)|' \
- 	        $< >$@
- 
-+mt-libzstd.pc: mt-libzstd.pc.in
-+	@echo creating pkgconfig
-+	@sed \
-+	        -e 's|@PREFIX@|$(PREFIX)|' \
-+	        -e 's|@EXEC_PREFIX@|$(PCEXEC_PREFIX)|' \
-+	        -e 's|@INCLUDEDIR@|$(PCINCPREFIX)$(PCINCDIR)|' \
-+	        -e 's|@LIBDIR@|$(PCLIBPREFIX)$(PCLIBDIR)|' \
-+	        -e 's|@VERSION@|$(VERSION)|' \
-+	        -e 's|@LIBS_PRIVATE@|$(LDFLAGS_DYNLIB)|' \
-+	        $< >$@
-+
- .PHONY: install
- install: install-pc install-static install-shared install-includes
- 	@echo zstd static and shared library installed
-@@ -328,6 +339,11 @@ install-pc: libzstd.pc
- 	[ -e $(DESTDIR)$(PKGCONFIGDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
- 	$(INSTALL_DATA) libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/
- 
-+.PHONY: install-mt-pc
-+install-mt-pc: mt-libzstd.pc
-+	[ -e $(DESTDIR)$(PKGCONFIGDIR) ] || $(INSTALL) -d -m 755 $(DESTDIR)$(PKGCONFIGDIR)/
-+	$(INSTALL_DATA) mt-libzstd.pc $(DESTDIR)$(PKGCONFIGDIR)/libzstd.pc
-+
- .PHONY: install-static
- install-static:
- 	# only generate libzstd.a if it's not already present
-diff --git a/lib/README.md b/lib/README.md
-index a560f06c..3038bc7a 100644
---- a/lib/README.md
-+++ b/lib/README.md
-@@ -33,6 +33,10 @@ For convenience, we provide a build target to generate multi and single threaded
- When linking a POSIX program with a multithreaded version of `libzstd`,
- note that it's necessary to invoke the `-pthread` flag during link stage.
- 
-+The `.pc` generated from `make install` or `make install-pc` always assume a single-threaded static library
-+is compiled. If `make lib-mt` is used, to correctly generate a `.pc` for the multi-threaded static library,
-+`make install-mt-pc` is needed.
-+
- Multithreading capabilities are exposed
- via the [advanced API defined in `lib/zstd.h`](https://github.com/facebook/zstd/blob/v1.4.3/lib/zstd.h#L351).
- 
-diff --git a/lib/mt-libzstd.pc.in b/lib/mt-libzstd.pc.in
-new file mode 100644
-index 00000000..cd93301a
---- /dev/null
-+++ b/lib/mt-libzstd.pc.in
-@@ -0,0 +1,15 @@
-+#   ZSTD - standard compression algorithm
-+#   Copyright (c) Meta Platforms, Inc. and affiliates.
-+#   BSD 2-Clause License (https://opensource.org/licenses/bsd-license.php)
-+
-+prefix=@PREFIX@
-+exec_prefix=@EXEC_PREFIX@
-+includedir=@INCLUDEDIR@
-+libdir=@LIBDIR@
-+
-+Name: zstd
-+Description: fast lossless compression algorithm library
-+URL: https://facebook.github.io/zstd/
-+Version: @VERSION@
-+Libs: -L${libdir} -lzstd @LIBS_PRIVATE@
-+Cflags: -I${includedir} @LIBS_PRIVATE@
--- 
-2.43.0
-



From lede-commits at lists.infradead.org  Wed Apr 17 03:09:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 06:09:02 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to version 2024-04-16
In-Reply-To: <171334854260.224724.928608787402634707@git-01.infra.openwrt.org>
References: <171334854260.224724.928608787402634707@git-01.infra.openwrt.org>
Message-ID: <mailman.28329.1713348547.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/74eb7188714bdafa5a7b56ffb48ad8474e107449

commit 74eb7188714bdafa5a7b56ffb48ad8474e107449
Author: Chukun Pan <amadeus at jmu.edu.cn>
AuthorDate: Tue Apr 16 23:10:02 2024 +0800

    ipq-wifi: update to version 2024-04-16
    
    Contains following updates:
    
     * ipq8074: add Spectrum SAX1V1K BDF
     * ipq8074: add Zbtlink ZBT-Z800AX BDF
     * ipq8074: update regdb in Spectrum SAX1V1K BDF
     * ipq6018: add Linksys MR7350 BDF
    
    Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
---
 package/firmware/ipq-wifi/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 6537477d3f..5d4d4aafb0 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -2,13 +2,13 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/version.mk
 
 PKG_NAME:=ipq-wifi
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2024-03-20
-PKG_SOURCE_VERSION:=87717baa8a7c922942f4202a0ec3de3cb5643941
-PKG_MIRROR_HASH:=a88124db0cd9a386d2cbd905e48408e7131f057240bcc7da93f7c5fc10ea4892
+PKG_SOURCE_DATE:=2024-04-16
+PKG_SOURCE_VERSION:=1d51799e6768a304da7840b8346e7487efd77f49
+PKG_MIRROR_HASH:=9cf0917532283c1a1708643022a5ed1ec4af6bb9ebaff57fc2f0f2c229f2469e
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Wed Apr 17 03:09:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 06:09:03 -0400
Subject: [openwrt/openwrt]  ipq807x: add support for Zbtlink ZBT-Z800AX
In-Reply-To: <171334854260.224724.928608787402634707@git-01.infra.openwrt.org>
References: <171334854260.224724.928608787402634707@git-01.infra.openwrt.org>
Message-ID: <mailman.28330.1713348547.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9cef2bc224b9bda19a8a79df6d1de9560c081ce2

commit 9cef2bc224b9bda19a8a79df6d1de9560c081ce2
Author: Chukun Pan <amadeus at jmu.edu.cn>
AuthorDate: Tue Mar 26 23:16:05 2024 +0800

    ipq807x: add support for Zbtlink ZBT-Z800AX
    
    Hardware specifications:
      SoC: Qualcomm IPQ8072A
      RAM: 1GB of DDR4 600MHz
      Flash1: Winbond W25Q64DW 8MB
      Flash2: MX30UF2G28AD 256MB
      WiFi1: QCN5024 2.4GHz AX 4x4
      WiFi2: QCN5054 5GHz AX 4x4
      Ethernet: 5x 1G RJ45 port
      USB: 2x USB 3.0 (1x M.2)
      Button: Reset, WPS
    
    Flash instructions:
      Upload factory.bin in stock firmware's
      upgrade page, do not preserve settings.
    
    Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
---
 package/firmware/ipq-wifi/Makefile                 |   2 +
 .../arm64/boot/dts/qcom/ipq8072-zbt-z800ax.dts     | 454 +++++++++++++++++++++
 target/linux/qualcommax/image/ipq807x.mk           |  15 +
 .../ipq807x/base-files/etc/board.d/01_leds         |   3 +
 .../ipq807x/base-files/etc/board.d/02_network      |   3 +-
 .../etc/hotplug.d/firmware/11-ath11k-caldata       |   1 +
 .../etc/hotplug.d/ieee80211/11_fix_wifi_mac        |   4 +
 .../ipq807x/base-files/lib/upgrade/platform.sh     |   3 +-
 8 files changed, 483 insertions(+), 2 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 5d4d4aafb0..41c772c967 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -52,6 +52,7 @@ ALLWIFIBOARDS:= \
 	yyets_le1 \
 	yuncore_ax880 \
 	yuncore_fap650 \
+	zbtlink_zbt-z800ax \
 	zte_mf269 \
 	zte_mf287 \
 	zte_mf287plus \
@@ -170,6 +171,7 @@ $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
 $(eval $(call generate-ipq-wifi-package,yyets_le1,YYeTs LE1))
 $(eval $(call generate-ipq-wifi-package,yuncore_ax880,Yuncore AX880))
 $(eval $(call generate-ipq-wifi-package,yuncore_fap650,Yuncore FAP650))
+$(eval $(call generate-ipq-wifi-package,zbtlink_zbt-z800ax,Zbtlink ZBT-Z800AX))
 $(eval $(call generate-ipq-wifi-package,zte_mf269,ZTE MF269))
 $(eval $(call generate-ipq-wifi-package,zte_mf287,ZTE MF287))
 $(eval $(call generate-ipq-wifi-package,zte_mf287plus,ZTE MF287Plus))
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-zbt-z800ax.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-zbt-z800ax.dts
new file mode 100644
index 0000000000..c352b72567
--- /dev/null
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-zbt-z800ax.dts
@@ -0,0 +1,454 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "ipq8074.dtsi"
+#include "ipq8074-hk-cpu.dtsi"
+#include "ipq8074-ess.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	model = "Zbtlink ZBT-Z800AX";
+	compatible = "zbtlink,zbt-z800ax", "qcom,ipq8074";
+
+	aliases {
+		led-boot = &led_net;
+		led-failsafe = &led_net;
+		led-upgrade = &led_net;
+		serial0 = &blsp1_uart5;
+		/*
+		 * Aliases as required by u-boot
+		 * to patch MAC addresses
+		 */
+		ethernet0 = &dp1;
+		ethernet1 = &dp2;
+		ethernet2 = &dp3;
+		ethernet3 = &dp4;
+		ethernet4 = &dp5;
+		label-mac-device = &dp1;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+		bootargs-append = " root=/dev/ubiblock0_1";
+	};
+
+	gpio-export {
+		compatible = "gpio-export";
+
+		lte-power {
+			gpio-export,name = "lte_power";
+			gpio-export,output = <1>;
+			gpios = <&tlmm 55 GPIO_ACTIVE_HIGH>;
+		};
+	};
+
+	keys {
+		compatible = "gpio-keys";
+		pinctrl-0 = <&button_pins>;
+		pinctrl-names = "default";
+
+		reset {
+			label = "reset";
+			linux,code = <KEY_RESTART>;
+			gpios = <&tlmm 34 GPIO_ACTIVE_LOW>;
+		};
+
+		wps {
+			label = "wps";
+			linux,code = <KEY_WPS_BUTTON>;
+			gpios = <&tlmm 46 GPIO_ACTIVE_LOW>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_net: net {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WAN_ONLINE;
+			gpios = <&tlmm 22 GPIO_ACTIVE_HIGH>;
+		};
+
+		module {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_MOBILE;
+			gpios = <&tlmm 30 GPIO_ACTIVE_HIGH>;
+		};
+
+		wlan2g {
+			color = <LED_COLOR_ID_GREEN>;
+			function = LED_FUNCTION_WLAN_2GHZ;
+			gpios = <&tlmm 42 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy1radio";
+		};
+
+		wlan5g {
+			color = <LED_COLOR_ID_GREEN>;
+			function =  LED_FUNCTION_WLAN_5GHZ;
+			gpios = <&tlmm 43 GPIO_ACTIVE_HIGH>;
+			linux,default-trigger = "phy0radio";
+		};
+	};
+};
+
+&tlmm {
+	button_pins: button-pins {
+		mux {
+			pins = "gpio34", "gpio46";
+			function = "gpio";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+	};
+
+	mdio_pins: mdio-pins {
+		mdc {
+			pins = "gpio68";
+			function = "mdc";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+
+		mdio {
+			pins = "gpio69";
+			function = "mdio";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+	};
+};
+
+&blsp1_spi1 {
+	pinctrl-0 = <&spi_0_pins>;
+	pinctrl-names = "default";
+	cs-select = <0>;
+	status = "okay";
+
+	flash at 0 {
+		compatible = "jedec,spi-nor";
+		#address-cells = <1>;
+		#size-cells = <1>;
+		reg = <0>;
+		spi-max-frequency = <50000000>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "0:sbl1";
+				reg = <0x0 0x50000>;
+				read-only;
+			};
+
+			partition at 50000 {
+				label = "0:mibib";
+				reg = <0x50000 0x10000>;
+				read-only;
+			};
+
+			partition at 60000 {
+				label = "0:bootconfig";
+				reg = <0x60000 0x20000>;
+				read-only;
+			};
+
+			partition at 80000 {
+				label = "0:bootconfig1";
+				reg = <0x80000 0x20000>;
+				read-only;
+			};
+
+			partition at a0000 {
+				label = "0:qsee";
+				reg = <0xa0000 0x180000>;
+				read-only;
+			};
+
+			partition at 220000 {
+				label = "0:qsee_1";
+				reg = <0x220000 0x180000>;
+				read-only;
+			};
+
+			partition at 3a0000 {
+				label = "0:devcfg";
+				reg = <0x3a0000 0x10000>;
+				read-only;
+			};
+
+			partition at 3b0000 {
+				label = "0:devcfg_1";
+				reg = <0x3b0000 0x10000>;
+				read-only;
+			};
+
+			partition at 3c0000 {
+				label = "0:apdp";
+				reg = <0x3c0000 0x10000>;
+				read-only;
+			};
+
+			partition at 3d0000 {
+				label = "0:apdp_1";
+				reg = <0x3d0000 0x10000>;
+				read-only;
+			};
+
+			partition at 3e0000 {
+				label = "0:rpm";
+				reg = <0x3e0000 0x40000>;
+				read-only;
+			};
+
+			partition at 420000 {
+				label = "0:rpm_1";
+				reg = <0x420000 0x40000>;
+				read-only;
+			};
+
+			partition at 460000 {
+				label = "0:cdt";
+				reg = <0x460000 0x10000>;
+				read-only;
+			};
+
+			partition at 470000 {
+				label = "0:cdt_1";
+				reg = <0x470000 0x10000>;
+				read-only;
+			};
+
+			partition at 480000 {
+				label = "0:appsblenv";
+				reg = <0x480000 0x10000>;
+			};
+
+			partition at 490000 {
+				label = "0:appsbl";
+				reg = <0x490000 0xa0000>;
+				read-only;
+			};
+
+			partition at 530000 {
+				label = "0:appsbl_1";
+				reg = <0x530000 0xa0000>;
+				read-only;
+			};
+
+			partition at 5d0000 {
+				label = "0:art";
+				reg = <0x5d0000 0x40000>;
+				read-only;
+			};
+
+			partition at 610000 {
+				label = "0:ethphyfw";
+				reg = <0x610000 0x80000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&blsp1_uart5 {
+	status = "okay";
+};
+
+&cryptobam {
+	status = "okay";
+};
+
+&crypto {
+	status = "okay";
+};
+
+&prng {
+	status = "okay";
+};
+
+&qpic_bam {
+	status = "okay";
+};
+
+&qpic_nand {
+	status = "okay";
+
+	partitions {
+		status = "disabled";
+	};
+
+	nand at 0 {
+		reg = <0>;
+		nand-ecc-strength = <8>;
+		nand-ecc-step-size = <512>;
+		nand-bus-width = <8>;
+
+		partitions {
+			compatible = "fixed-partitions";
+			#address-cells = <1>;
+			#size-cells = <1>;
+
+			partition at 0 {
+				label = "rootfs";
+				reg = <0x0000000 0x3400000>;
+			};
+
+			partition at 3400000 {
+				label = "0:wififw";
+				reg = <0x3400000 0x0800000>;
+				read-only;
+			};
+
+			partition at 3c00000 {
+				label = "rootfs_1";
+				reg = <0x3c00000 0x3400000>;
+			};
+
+			partition at 7000000 {
+				label = "0:wififw_1";
+				reg = <0x7000000 0x0800000>;
+				read-only;
+			};
+		};
+	};
+};
+
+&qusb_phy_0 {
+	status = "okay";
+};
+
+&qusb_phy_1 {
+	status = "okay";
+};
+
+&ssphy_0 {
+	status = "okay";
+};
+
+&ssphy_1 {
+	status = "okay";
+};
+
+&usb_0 {
+	status = "okay";
+};
+
+&usb_1 {
+	status = "okay";
+};
+
+&mdio {
+	status = "okay";
+
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
+
+	ethernet-phy-package at 0 {
+		compatible = "qcom,qca8075-package";
+		#address-cells = <1>;
+		#size-cells = <0>;
+		reg = <0>;
+
+		qca8075_0: ethernet-phy at 0 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <0>;
+		};
+
+		qca8075_1: ethernet-phy at 1 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <1>;
+		};
+
+		qca8075_2: ethernet-phy at 2 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <2>;
+		};
+
+		qca8075_3: ethernet-phy at 3 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <3>;
+		};
+
+		qca8075_4: ethernet-phy at 4 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <4>;
+		};
+	};
+};
+
+&switch {
+	status = "okay";
+
+	switch_lan_bmp = <(ESS_PORT1 | ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>;
+	switch_wan_bmp = <ESS_PORT5>;
+	switch_mac_mode = <MAC_MODE_PSGMII>;
+
+	qcom,port_phyinfo {
+		port at 1 {
+			port_id = <1>;
+			phy_address = <0>;
+		};
+		port at 2 {
+			port_id = <2>;
+			phy_address = <1>;
+		};
+		port at 3 {
+			port_id = <3>;
+			phy_address = <2>;
+		};
+		port at 4 {
+			port_id = <4>;
+			phy_address = <3>;
+		};
+		port at 5 {
+			port_id = <5>;
+			phy_address = <4>;
+		};
+	};
+};
+
+&edma {
+	status = "okay";
+};
+
+&dp1 {
+	status = "okay";
+	phy-handle = <&qca8075_0>;
+	label = "lan1";
+};
+
+&dp2 {
+	status = "okay";
+	phy-handle = <&qca8075_1>;
+	label = "lan2";
+};
+
+&dp3 {
+	status = "okay";
+	phy-handle = <&qca8075_2>;
+	label = "lan3";
+};
+
+&dp4 {
+	status = "okay";
+	phy-handle = <&qca8075_3>;
+	label = "lan4";
+};
+
+&dp5 {
+	status = "okay";
+	phy-handle = <&qca8075_4>;
+	label = "wan";
+};
+
+&wifi {
+	status = "okay";
+
+	qcom,ath11k-calibration-variant = "ZBT-Z800AX";
+};
diff --git a/target/linux/qualcommax/image/ipq807x.mk b/target/linux/qualcommax/image/ipq807x.mk
index 74fe15a997..027278b63c 100644
--- a/target/linux/qualcommax/image/ipq807x.mk
+++ b/target/linux/qualcommax/image/ipq807x.mk
@@ -299,6 +299,21 @@ define Device/yuncore_ax880
 endef
 TARGET_DEVICES += yuncore_ax880
 
+define Device/zbtlink_zbt-z800ax
+	$(call Device/FitImage)
+	$(call Device/UbiFit)
+	DEVICE_VENDOR := Zbtlink
+	DEVICE_MODEL := ZBT-Z800AX
+	BLOCKSIZE := 128k
+	PAGESIZE := 2048
+	DEVICE_DTS_CONFIG := config at hk09
+	SOC := ipq8072
+	DEVICE_PACKAGES := ipq-wifi-zbtlink_zbt-z800ax
+	IMAGES += factory.bin
+	IMAGE/factory.bin := append-ubi | qsdk-ipq-factory-nand
+endef
+TARGET_DEVICES += zbtlink_zbt-z800ax
+
 define Device/zte_mf269
 	$(call Device/FitImage)
 	$(call Device/UbiFit)
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/01_leds b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/01_leds
index 737c64fcec..23d87f1b2d 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/01_leds
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/01_leds
@@ -62,6 +62,9 @@ yuncore,ax880)
 	ucidef_set_led_netdev "wan-port-link" "WAN-PORT-LINK" "90000.mdio-1:18:green:wan" "wan" "tx rx link_10 link_100 link_1000 link_2500"
 	ucidef_set_led_netdev "lan-port-link" "LAN-PORT-LINK" "90000.mdio-1:1c:green:lan" "lan" "tx rx link_10 link_100 link_1000 link_2500"
 	;;
+zbtlink,zbt-z800ax)
+	ucidef_set_led_netdev "internet" "Internet" "green:wan-online" "wan"
+	;;
 esac
 
 board_config_flush
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
index fb3fec6fc9..77c84d40fa 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
@@ -15,7 +15,8 @@ ipq807x_setup_interfaces()
 	buffalo,wxr-5950ax12|\
 	dynalink,dl-wrx36|\
 	linksys,mx5300|\
-	xiaomi,ax9000)
+	xiaomi,ax9000|\
+	zbtlink,zbt-z800ax)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" "wan"
 		;;
 	cmcc,rm2-6)
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
index 88ba972407..f533bac48e 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
@@ -28,6 +28,7 @@ case "$FIRMWARE" in
 	xiaomi,ax3600|\
 	xiaomi,ax9000|\
 	yuncore,ax880|\
+	zbtlink,zbt-z800ax|\
 	zte,mf269|\
 	zyxel,nbg7815)
 		caldata_extract "0:art" 0x1000 0x20000
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 500f01c31f..dd85dcfe98 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -30,4 +30,8 @@ case "$board" in
 		[ "$PHYNBR" = "1" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "2" ] && macaddr_add $label_mac 3 > /sys${DEVPATH}/macaddress
 		;;
+	zbtlink,zbt-z800ax)
+		[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) -1 > /sys${DEVPATH}/macaddress
+		[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) -2 > /sys${DEVPATH}/macaddress
+		;;
 esac
diff --git a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
index bffca41e02..768bf649ce 100644
--- a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
@@ -51,7 +51,8 @@ platform_do_upgrade() {
 	netgear,rax120v2|\
 	netgear,wax218|\
 	netgear,wax620|\
-	netgear,wax630)
+	netgear,wax630|\
+	zbtlink,zbt-z800ax)
 		nand_do_upgrade "$1"
 		;;
 	buffalo,wxr-5950ax12)



From lede-commits at lists.infradead.org  Wed Apr 17 04:43:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 17 Apr 2024 07:43:59 -0400
Subject: [openwrt/openwrt]  ipq40xx: whw03v2: enable additional 5 GHz channels
In-Reply-To: <171335423958.640197.2186060991626505751@git-01.infra.openwrt.org>
References: <171335423958.640197.2186060991626505751@git-01.infra.openwrt.org>
Message-ID: <mailman.28371.1713354249.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/677ecd09d28ab8c34c3fc3cfcadea88dee94fdf5

commit 677ecd09d28ab8c34c3fc3cfcadea88dee94fdf5
Author: Rodrigo Balerdi <lanchon at gmail.com>
AuthorDate: Tue Apr 16 17:47:20 2024 -0300

    ipq40xx: whw03v2: enable additional 5 GHz channels
    
    This device supports channel ranges 36-64 and 100-165, just like
    others based on the same reference design, but its current DTS is
    unnecessarily restricting these ranges to 36-48 and 149-165.
    
    Signed-off-by: Rodrigo Balerdi <lanchon at gmail.com>
    (cherry picked from commit 1c32cee348f54e9f64b5928ee1a1efe491eec137)
---
 .../linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts   | 5 ++---
 1 file changed, 2 insertions(+), 3 deletions(-)

diff --git a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
index 1f0572b879..e01be0ae4b 100644
--- a/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
+++ b/target/linux/ipq40xx/files/arch/arm/boot/dts/qcom-ipq4019-whw03v2.dts
@@ -488,7 +488,6 @@
 	qcom,coexist-support = <1>;
 	qcom,coexist-gpio-pin = <0x34>;
 
-	ieee80211-freq-limit = <2401000 2473000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
@@ -499,7 +498,7 @@
 &wifi1 {
 	status = "okay";
 
-	ieee80211-freq-limit = <5170000 5250000>;
+	ieee80211-freq-limit = <5170000 5330000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";
@@ -510,7 +509,7 @@
 &wifi2 {
 	status = "okay";
 
-	ieee80211-freq-limit = <5735000 5835000>;
+	ieee80211-freq-limit = <5490000 5835000>;
 	qcom,ath10k-calibration-variant = "linksys-whw03v2";
 
 	nvmem-cell-names = "pre-calibration", "mac-address";



From lede-commits at lists.infradead.org  Thu Apr 18 02:53:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 05:53:10 -0400
Subject: [openwrt/openwrt]  config: fix CONFIG_GDB appearing in main
 menuconfig menu
In-Reply-To: <171343398883.3327180.3252232852699323013@git-01.infra.openwrt.org>
References: <171343398883.3327180.3252232852699323013@git-01.infra.openwrt.org>
Message-ID: <mailman.28681.1713433996.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/e8cc17e147c092d99430f6c707c2ca94dfad40ae

commit e8cc17e147c092d99430f6c707c2ca94dfad40ae
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 8 22:05:19 2024 +0200

    config: fix CONFIG_GDB appearing in main menuconfig menu
    
    I noticed that CONFIG_GDB was suddenly appearing in the main menuconfig
    menu despite the fact that it should be visible only when TOOLCHAINOPTS
    is selected and under a dedicated menu.
    
    After some trial and error, it seems that this was caused by the recent
    addition of GCC_USE_DEFAULT_VERSION, and after even more trial and error
    it gets fixed as soon GCC_USE_DEFAULT_VERSION is placed after GCC_VERSION.
    
    So, lets simply put GCC_USE_DEFAULT_VERSION after GCC_VERSION.
    
    Fixes: 501ef81040ba ("config: select KERNEL_WERROR if building with default GCC version")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz> [rebased]
    (cherry picked from commit 12b2cb2ec3f1366b65caa0dbbdd83846c1c88d4e)
---
 toolchain/gcc/Config.in      | 5 -----
 toolchain/gcc/Config.version | 5 +++++
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index be975e5334..9156f9c263 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -16,11 +16,6 @@ choice
 		bool "gcc 13.x"
 endchoice
 
-config GCC_USE_DEFAULT_VERSION
-	bool
-	default y if !TOOLCHAINOPTS || GCC_USE_VERSION_12
-	imply KERNEL_WERROR
-
 config GCC_USE_GRAPHITE
 	bool
 	prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS
diff --git a/toolchain/gcc/Config.version b/toolchain/gcc/Config.version
index 7126a0c883..e40d6b2df3 100644
--- a/toolchain/gcc/Config.version
+++ b/toolchain/gcc/Config.version
@@ -11,3 +11,8 @@ config GCC_VERSION
 	default "11.3.0"	if GCC_VERSION_11
 	default "13.1.0"	if GCC_VERSION_13
 	default "12.3.0"
+
+config GCC_USE_DEFAULT_VERSION
+	bool
+	default y if !TOOLCHAINOPTS || GCC_USE_VERSION_12
+	imply KERNEL_WERROR



From lede-commits at lists.infradead.org  Thu Apr 18 02:53:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 05:53:08 -0400
Subject: [openwrt/openwrt]  kernel: introduce KERNEL_WERROR config option
In-Reply-To: <171343398883.3327180.3252232852699323013@git-01.infra.openwrt.org>
References: <171343398883.3327180.3252232852699323013@git-01.infra.openwrt.org>
Message-ID: <mailman.28682.1713433996.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/33612fdb924f8adab3523cf9388ed969f6f5f77e

commit 33612fdb924f8adab3523cf9388ed969f6f5f77e
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Wed May 24 09:46:45 2023 +0200

    kernel: introduce KERNEL_WERROR config option
    
    In commit b2d1eb717b65 ("generic: 5.15: enable Werror by default for
    kernel compile") CONFIG_WERROR=y was enabled and all warnings/errors
    reported with GCC 12 were fixed.
    
    Keeping this in sync with past/future GCC versions is going to be uphill
    battle, so lets introduce new KERNEL_WERROR config option, enable it by
    default only for tested/known working combinations and on buildbots.
    
    References: #12687
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
    (cherry picked from commit ce8c639a6c539534be14a540e7c3e9933d3a34ef)
---
 config/Config-kernel.in          | 16 ++++++++++++++++
 target/linux/generic/config-5.15 |  2 +-
 2 files changed, 17 insertions(+), 1 deletion(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index c1bc7984f7..bbda247cd7 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -1340,3 +1340,19 @@ config KERNEL_UBIFS_FS_SECURITY
 
 config KERNEL_JFFS2_FS_SECURITY
 	bool "JFFS2 Security Labels"
+
+config KERNEL_WERROR
+	bool "Compile the kernel with warnings as errors"
+	default BUILDBOT
+	default y if GCC_USE_VERSION_12
+	help
+	  A kernel build should not cause any compiler warnings, and this
+	  enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
+	  to enforce that rule by default. Certain warnings from other tools
+	  such as the linker may be upgraded to errors with this option as
+	  well.
+
+	  However, if you have a new (or very old) compiler or linker with odd
+	  and unusual warnings, or you have some architecture with problems,
+	  you may need to disable this config option in order to
+	  successfully build the kernel.
diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15
index e9b8fc42cd..f527a6fb51 100644
--- a/target/linux/generic/config-5.15
+++ b/target/linux/generic/config-5.15
@@ -7476,7 +7476,7 @@ CONFIG_WATCHDOG_OPEN_TIMEOUT=0
 # CONFIG_WD80x3 is not set
 # CONFIG_WDAT_WDT is not set
 # CONFIG_WDTPCI is not set
-CONFIG_WERROR=y
+# CONFIG_WERROR is not set
 # CONFIG_WEXT_CORE is not set
 # CONFIG_WEXT_PRIV is not set
 # CONFIG_WEXT_PROC is not set



From lede-commits at lists.infradead.org  Thu Apr 18 02:53:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 05:53:09 -0400
Subject: [openwrt/openwrt]  config: select KERNEL_WERROR if building with
 default GCC version
In-Reply-To: <171343398883.3327180.3252232852699323013@git-01.infra.openwrt.org>
References: <171343398883.3327180.3252232852699323013@git-01.infra.openwrt.org>
Message-ID: <mailman.28683.1713433996.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/915dfbdbb1ae16fb16bf07ed836d8979c30f1fbe

commit 915dfbdbb1ae16fb16bf07ed836d8979c30f1fbe
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Apr 7 19:50:04 2024 +0100

    config: select KERNEL_WERROR if building with default GCC version
    
    [ during cherry-pick GCC version was changed to default GCC 12 version ]
    
    At the moment we have to manually follow the default GCC version
    also in config/Config-kernel.in. This tends to be forgotten at GCC
    version bumps (just happened when switching from version 12 to 13).
    Instead, introduce a hidden Kconfig symbol which implies KERNEL_WERROR
    in toolchain/gcc/Config.in where it is visible for developers changing
    the default version.
    
    Also remove the explicit default on BUILDBOT to avoid a circular
    dependency and also because buildbots anyway implicitly always select
    the default GCC version.
    
    Reference: https://github.com/openwrt/openwrt/pull/15064
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
    Signed-off-by: Petr ?tetiar <ynezz at true.cz> [GCC 12 default]
    (cherry picked from commit 501ef81040baa2ee31de6dd9f75d619de0e4c9bc)
---
 config/Config-kernel.in | 2 --
 toolchain/gcc/Config.in | 5 +++++
 2 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/config/Config-kernel.in b/config/Config-kernel.in
index bbda247cd7..42755a4d59 100644
--- a/config/Config-kernel.in
+++ b/config/Config-kernel.in
@@ -1343,8 +1343,6 @@ config KERNEL_JFFS2_FS_SECURITY
 
 config KERNEL_WERROR
 	bool "Compile the kernel with warnings as errors"
-	default BUILDBOT
-	default y if GCC_USE_VERSION_12
 	help
 	  A kernel build should not cause any compiler warnings, and this
 	  enables the '-Werror' (for C) and '-Dwarnings' (for Rust) flags
diff --git a/toolchain/gcc/Config.in b/toolchain/gcc/Config.in
index 9156f9c263..be975e5334 100644
--- a/toolchain/gcc/Config.in
+++ b/toolchain/gcc/Config.in
@@ -16,6 +16,11 @@ choice
 		bool "gcc 13.x"
 endchoice
 
+config GCC_USE_DEFAULT_VERSION
+	bool
+	default y if !TOOLCHAINOPTS || GCC_USE_VERSION_12
+	imply KERNEL_WERROR
+
 config GCC_USE_GRAPHITE
 	bool
 	prompt "Compile in support for the new Graphite framework in GCC 4.4+" if TOOLCHAINOPTS



From lede-commits at lists.infradead.org  Thu Apr 18 02:54:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 05:54:32 -0400
Subject: [openwrt/openwrt]  qca-nss-dp: add patch fixing rmmod and insmod
In-Reply-To: <171343407264.3336557.4764379231111913518@git-01.infra.openwrt.org>
References: <171343407264.3336557.4764379231111913518@git-01.infra.openwrt.org>
Message-ID: <mailman.28684.1713434081.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/918e2fca1e818a346a5f04e11b4e9cb0d5ad6510

commit 918e2fca1e818a346a5f04e11b4e9cb0d5ad6510
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Tue Apr 16 16:44:41 2024 +0200

    qca-nss-dp: add patch fixing rmmod and insmod
    
    Add patch fixing rmmod and insmod. Lots of flawed logic fixed that
    permits the module to correctly rmmod and insmod later.
    
    Just to quote some change, use phy_detach instead of phy_disconnect, fix
    exclusive reset_control that could only be used once, fix kernel panic
    on second edma_cleanup, stop traffic before module exit...
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/kernel/qca-nss-dp/Makefile                 |  2 +-
 ...ork-hw_reset-logic-to-permit-rmmod-and-in.patch | 43 ++++++++++++++++
 ...chdev-correctly-unregister-notifier-on-dp.patch | 59 ++++++++++++++++++++++
 ...03-nss_dp_main-swap-dp_exit-function-call.patch | 35 +++++++++++++
 ...-call-unregister_netdev-first-in-dp_remov.patch | 35 +++++++++++++
 ...-use-phy_detach-instead-of-disconnect-in-.patch | 26 ++++++++++
 ...p-edma_disable_port-in-edma_cleanup-subse.patch | 37 ++++++++++++++
 7 files changed, 236 insertions(+), 1 deletion(-)

diff --git a/package/kernel/qca-nss-dp/Makefile b/package/kernel/qca-nss-dp/Makefile
index 504074a81e..e6c380aead 100644
--- a/package/kernel/qca-nss-dp/Makefile
+++ b/package/kernel/qca-nss-dp/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=qca-nss-dp
-PKG_RELEASE:=2
+PKG_RELEASE:=3
 
 PKG_SOURCE_URL:=https://git.codelinaro.org/clo/qsdk/oss/lklm/nss-dp.git
 PKG_SOURCE_PROTO:=git
diff --git a/package/kernel/qca-nss-dp/patches/0011-01-edma_v1-rework-hw_reset-logic-to-permit-rmmod-and-in.patch b/package/kernel/qca-nss-dp/patches/0011-01-edma_v1-rework-hw_reset-logic-to-permit-rmmod-and-in.patch
new file mode 100644
index 0000000000..7e2a593657
--- /dev/null
+++ b/package/kernel/qca-nss-dp/patches/0011-01-edma_v1-rework-hw_reset-logic-to-permit-rmmod-and-in.patch
@@ -0,0 +1,43 @@
+From c318c90b824c59539bf2e33618e381293398616c Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 16 Apr 2024 15:02:49 +0200
+Subject: [PATCH 1/6] edma_v1: rework hw_reset logic to permit rmmod and insmod
+
+Rework hw_reset logic for edma v1 to permit rmmod and insmod by using
+get_exclusive_released variant (assuming the reset control was released)
+and manually acquire and release it.
+
+This permits rmmod and insmod without triggering warning or receiving
+-EBUSY errors.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ hal/dp_ops/edma_dp/edma_v1/edma_cfg.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/hal/dp_ops/edma_dp/edma_v1/edma_cfg.c
++++ b/hal/dp_ops/edma_dp/edma_v1/edma_cfg.c
+@@ -719,18 +719,22 @@ int edma_hw_reset(struct edma_hw *ehw)
+ 	struct reset_control *rst;
+ 	struct platform_device *pdev = ehw->pdev;
+ 
+-	rst = devm_reset_control_get(&pdev->dev, EDMA_HW_RESET_ID);
++	rst = devm_reset_control_get_exclusive_released(&pdev->dev, EDMA_HW_RESET_ID);
+ 	if (IS_ERR(rst)) {
+ 		pr_warn("DTS Node: %s does not exist\n", EDMA_HW_RESET_ID);
+ 		return -EINVAL;
+ 	}
+ 
++	reset_control_acquire(rst);
++
+ 	reset_control_assert(rst);
+ 	udelay(100);
+ 
+ 	reset_control_deassert(rst);
+ 	udelay(100);
+ 
++	reset_control_release(rst);
++
+ 	pr_info("EDMA HW Reset completed succesfully\n");
+ 
+ 	return 0;
diff --git a/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch b/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
new file mode 100644
index 0000000000..e0a47cfca0
--- /dev/null
+++ b/package/kernel/qca-nss-dp/patches/0011-02-nss_dp_switchdev-correctly-unregister-notifier-on-dp.patch
@@ -0,0 +1,59 @@
+From 079bfe441b274a8c06474be82e4ccc88599a5e0e Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 16 Apr 2024 16:08:46 +0200
+Subject: [PATCH 2/6] nss_dp_switchdev: correctly unregister notifier on
+ dp_remove
+
+Correctly unregister notifier on dp_remove to fix kernel panic on system
+reboot.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ include/nss_dp_dev.h |  1 +
+ nss_dp_main.c        |  4 ++++
+ nss_dp_switchdev.c   | 13 +++++++++++++
+ 3 files changed, 18 insertions(+)
+
+--- a/include/nss_dp_dev.h
++++ b/include/nss_dp_dev.h
+@@ -312,6 +312,7 @@ void nss_dp_set_ethtool_ops(struct net_d
+  */
+ #ifdef CONFIG_NET_SWITCHDEV
+ void nss_dp_switchdev_setup(struct net_device *dev);
++void nss_dp_switchdev_remove(struct net_device *dev);
+ bool nss_dp_is_phy_dev(struct net_device *dev);
+ #endif
+ 
+--- a/nss_dp_main.c
++++ b/nss_dp_main.c
+@@ -913,6 +913,10 @@ static int nss_dp_remove(struct platform
+ 		if (!dp_priv)
+ 			continue;
+ 
++		#ifdef CONFIG_NET_SWITCHDEV
++			nss_dp_switchdev_remove(dp_priv->netdev);
++		#endif
++
+ 		dp_ops = dp_priv->data_plane_ops;
+ 		hal_ops = dp_priv->gmac_hal_ops;
+ 
+--- a/nss_dp_switchdev.c
++++ b/nss_dp_switchdev.c
+@@ -635,4 +635,17 @@ void nss_dp_switchdev_setup(struct net_d
+ 
+ 	switch_init_done = true;
+ }
++
++void nss_dp_switchdev_remove(struct net_device *dev)
++{
++	if (!switch_init_done)
++		return;
++
++	if (nss_dp_sw_ev_nb)
++		unregister_switchdev_notifier(nss_dp_sw_ev_nb);
++
++	unregister_switchdev_blocking_notifier(&nss_dp_switchdev_notifier);
++
++	switch_init_done = false;
++}
+ #endif
diff --git a/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch b/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
new file mode 100644
index 0000000000..7ffde3d286
--- /dev/null
+++ b/package/kernel/qca-nss-dp/patches/0011-03-nss_dp_main-swap-dp_exit-function-call.patch
@@ -0,0 +1,35 @@
+From ab7b1a361d51157118e1a61ce6530a59bcef4b61 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 16 Apr 2024 16:10:09 +0200
+Subject: [PATCH 3/6] nss_dp_main: swap dp_exit function call
+
+First unregister nss_dp platform devices then cleanup the HAL.
+
+This is to fix kernel panic by cleaning data that needs to be used by
+platform driver unregister functions.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ nss_dp_main.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/nss_dp_main.c
++++ b/nss_dp_main.c
+@@ -1082,6 +1082,8 @@ int __init nss_dp_init(void)
+  */
+ void __exit nss_dp_exit(void)
+ {
++	platform_driver_unregister(&nss_dp_drv);
++
+ 	/*
+ 	 * TODO Move this to soc_ops
+ 	 */
+@@ -1089,8 +1091,6 @@ void __exit nss_dp_exit(void)
+ 		nss_dp_hal_cleanup();
+ 		dp_global_ctx.common_init_done = false;
+ 	}
+-
+-	platform_driver_unregister(&nss_dp_drv);
+ }
+ 
+ module_init(nss_dp_init);
diff --git a/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch b/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
new file mode 100644
index 0000000000..20e87459f8
--- /dev/null
+++ b/package/kernel/qca-nss-dp/patches/0011-04-nss_dp_main-call-unregister_netdev-first-in-dp_remov.patch
@@ -0,0 +1,35 @@
+From 33dd3aa6d0f9cd240d63f53a49157ae44ebccf87 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 16 Apr 2024 16:12:11 +0200
+Subject: [PATCH 4/6] nss_dp_main: call unregister_netdev first in dp_remove
+ and carrifer_off
+
+In dp_remove move unregister_netdev up before calling exit and deinit
+and first call netif_carrier_off to stop any traffic from happening and
+prevent kernel panics for napi in the middle of transfer.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ nss_dp_main.c | 4 +++-
+ 1 file changed, 3 insertions(+), 1 deletion(-)
+
+--- a/nss_dp_main.c
++++ b/nss_dp_main.c
+@@ -920,6 +920,9 @@ static int nss_dp_remove(struct platform
+ 		dp_ops = dp_priv->data_plane_ops;
+ 		hal_ops = dp_priv->gmac_hal_ops;
+ 
++		netif_carrier_off(dp_priv->netdev);
++		unregister_netdev(dp_priv->netdev);
++
+ 		if (dp_priv->phydev)
+ 			phy_disconnect(dp_priv->phydev);
+ 
+@@ -931,7 +934,6 @@ static int nss_dp_remove(struct platform
+ #endif
+ 		hal_ops->exit(dp_priv->gmac_hal_ctx);
+ 		dp_ops->deinit(dp_priv->dpc);
+-		unregister_netdev(dp_priv->netdev);
+ 		free_netdev(dp_priv->netdev);
+ 		dp_global_ctx.nss_dp[i] = NULL;
+ 	}
diff --git a/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch b/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
new file mode 100644
index 0000000000..6e87e4e8c4
--- /dev/null
+++ b/package/kernel/qca-nss-dp/patches/0011-05-nss_dp_main-use-phy_detach-instead-of-disconnect-in-.patch
@@ -0,0 +1,26 @@
+From 655b07b701271bc00952fe64aeb14f993a48a50e Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 16 Apr 2024 16:17:36 +0200
+Subject: [PATCH 5/6] nss_dp_main: use phy_detach instead of disconnect in
+ dp_remove
+
+Use phy_detach instead of disconnect in dp_remove. On Module remove, phy
+are already disconnected but they need to be detached to be correctly
+reattached later with an insmod.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ nss_dp_main.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/nss_dp_main.c
++++ b/nss_dp_main.c
+@@ -924,7 +924,7 @@ static int nss_dp_remove(struct platform
+ 		unregister_netdev(dp_priv->netdev);
+ 
+ 		if (dp_priv->phydev)
+-			phy_disconnect(dp_priv->phydev);
++			phy_detach(dp_priv->phydev);
+ 
+ #if defined(NSS_DP_PPE_SUPPORT)
+ 		/*
diff --git a/package/kernel/qca-nss-dp/patches/0011-06-edma_v1-skip-edma_disable_port-in-edma_cleanup-subse.patch b/package/kernel/qca-nss-dp/patches/0011-06-edma_v1-skip-edma_disable_port-in-edma_cleanup-subse.patch
new file mode 100644
index 0000000000..ad784e557f
--- /dev/null
+++ b/package/kernel/qca-nss-dp/patches/0011-06-edma_v1-skip-edma_disable_port-in-edma_cleanup-subse.patch
@@ -0,0 +1,37 @@
+From c7c59c6097d94dbab8fc68dae798017bdbc5b3b9 Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 16 Apr 2024 16:22:32 +0200
+Subject: [PATCH 6/6] edma_v1: skip edma_disable_port in edma_cleanup
+ subsequent run
+
+Skip edma_disable_port in edma_cleanup subsequent run as it will cause
+the kernel panic as the regs are already freed by previous run of
+edma_cleanup. It's use it's not clear but the call is already done in
+the first run of edma_cleanup. Maybe an oversight never dropped?
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c | 12 +++++++++---
+ 1 file changed, 9 insertions(+), 3 deletions(-)
+
+--- a/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
++++ b/hal/dp_ops/edma_dp/edma_v1/edma_data_plane.c
+@@ -326,9 +326,15 @@ void edma_cleanup(bool is_dp_override)
+ 		 * Disable EDMA only at module exit time, since NSS firmware
+ 		 * depends on this setting.
+ 		 */
+-		if (!is_dp_override) {
+-			edma_disable_port();
+-		}
++		/* This call will make the kernel panic as reg used by
++		 * edma_disable_port are already freed by previous call of
++		 * edma_cleanup. Logic is not clear of WHY this is called.
++		 * Keep this here for reference if someone EVER wants
++		 * to investigate.
++		 */
++		// if (!is_dp_override) {
++		// 	edma_disable_port();
++		// }
+ 		return;
+ 	}
+ 



From lede-commits at lists.infradead.org  Thu Apr 18 02:55:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 05:55:44 -0400
Subject: [openwrt/openwrt]  mac80211: ath11k: re-enable ipq807x coldboot
 calibration
In-Reply-To: <171343414414.3345542.3689914598712666265@git-01.infra.openwrt.org>
References: <171343414414.3345542.3689914598712666265@git-01.infra.openwrt.org>
Message-ID: <mailman.28685.1713434148.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b0422af1b3c7bb227620f0b1ff5552f9148f5a43

commit b0422af1b3c7bb227620f0b1ff5552f9148f5a43
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Wed Apr 17 12:01:02 2024 +0200

    mac80211: ath11k: re-enable ipq807x coldboot calibration
    
    It seems that move to kernel 6.6 somehow fixed the remoteproc restart so
    now it properly restarts and thus coldboot calibration works as well.
    
    ipq60xx still seems to be broken in a different way so keep it disabled.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...-Disable-coldboot-calibration-for-IPQ8074.patch | 26 ----------------------
 1 file changed, 26 deletions(-)

diff --git a/package/kernel/mac80211/patches/ath11k/902-ath11k-Disable-coldboot-calibration-for-IPQ8074.patch b/package/kernel/mac80211/patches/ath11k/902-ath11k-Disable-coldboot-calibration-for-IPQ8074.patch
deleted file mode 100644
index cff62eea90..0000000000
--- a/package/kernel/mac80211/patches/ath11k/902-ath11k-Disable-coldboot-calibration-for-IPQ8074.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From dd3b9c59cfa1e9e0b73a575f4646be905691eaef Mon Sep 17 00:00:00 2001
-From: Robert Marko <robimarko at gmail.com>
-Date: Sat, 16 Oct 2021 19:34:10 +0200
-Subject: [PATCH 241/241] ath11k: Disable coldboot calibration for IPQ8074
-
-There is a bug with the remoteproc reset after coldboot calibration,
-so until that is resolved disabled it to allow using the radio.
-
-Signed-off-by: Robert Marko <robimarko at gmail.com>
----
- drivers/net/wireless/ath/ath11k/core.c | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/net/wireless/ath/ath11k/core.c
-+++ b/drivers/net/wireless/ath/ath11k/core.c
-@@ -86,8 +86,8 @@ static const struct ath11k_hw_params ath
- 		.supports_shadow_regs = false,
- 		.idle_ps = false,
- 		.supports_sta_ps = false,
--		.coldboot_cal_mm = true,
--		.coldboot_cal_ftm = true,
-+		.coldboot_cal_mm = false,
-+		.coldboot_cal_ftm = false,
- 		.cbcal_restart_fw = true,
- 		.fw_mem_mode = 0,
- 		.num_vdevs = 16 + 1,



From lede-commits at lists.infradead.org  Thu Apr 18 03:43:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 06:43:48 -0400
Subject: [openwrt/openwrt]  netifd: packet-steering: silence error on applying
 queue mask
In-Reply-To: <171343702840.3720368.6164950955268642254@git-01.infra.openwrt.org>
References: <171343702840.3720368.6164950955268642254@git-01.infra.openwrt.org>
Message-ID: <mailman.28694.1713437034.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/afb5fdd79a00a1737fb64d9e2420ffdeebff392f

commit afb5fdd79a00a1737fb64d9e2420ffdeebff392f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Apr 18 12:40:18 2024 +0200

    netifd: packet-steering: silence error on applying queue mask
    
    Some queues can't be tweaked and return -ENOENT if it's not multiqueue.
    
    Silence any error from echo to produce a more clean bootlog.
    
    Fixes: #12095
    Suggested-by: Andris PE <neandris at gmail.com>
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/network/config/netifd/Makefile                                  | 2 +-
 .../network/config/netifd/files/usr/libexec/network/packet-steering.sh  | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/config/netifd/Makefile b/package/network/config/netifd/Makefile
index b9f0e692d5..acfabf05e0 100644
--- a/package/network/config/netifd/Makefile
+++ b/package/network/config/netifd/Makefile
@@ -1,7 +1,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=netifd
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/netifd.git
diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh b/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh
index 799c080805..51b9284449 100755
--- a/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh
+++ b/package/network/config/netifd/files/usr/libexec/network/packet-steering.sh
@@ -29,7 +29,7 @@ set_hex_val() {
 	local val="$2"
 	val="$(printf %x "$val")"
 	[ -n "$DEBUG" ] && echo "$file = $val"
-	echo "$val" > "$file"
+	echo "$val" > "$file" 2>/dev/null
 }
 
 packet_steering="$(uci get "network. at globals[0].packet_steering")"



From lede-commits at lists.infradead.org  Thu Apr 18 03:56:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 06:56:04 -0400
Subject: [openwrt/openwrt]  base-files: reduce IPv6 ULA prefix generation to a
 single call
In-Reply-To: <171343776455.3807531.17595735340023962747@git-01.infra.openwrt.org>
References: <171343776455.3807531.17595735340023962747@git-01.infra.openwrt.org>
Message-ID: <mailman.28701.1713437769.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/27edf28b11f179eb9fc6ab159b68b2fe97ffdf1e

commit 27edf28b11f179eb9fc6ab159b68b2fe97ffdf1e
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Fri Mar 29 16:04:30 2024 +0100

    base-files: reduce IPv6 ULA prefix generation to a single call
    
    Reduce calls and pipes and read from urandom once directly with hexdump
    for the necessary 5 bytes of random data to build the 48 bit ULA Prefix.
    
    Fewer calls and forks; finish quicker; less memory used.
    
    Tested on: 23.05.3
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 package/base-files/files/etc/uci-defaults/12_network-generate-ula | 6 +-----
 1 file changed, 1 insertion(+), 5 deletions(-)

diff --git a/package/base-files/files/etc/uci-defaults/12_network-generate-ula b/package/base-files/files/etc/uci-defaults/12_network-generate-ula
index 19d7ed7f2e..060d0ef640 100644
--- a/package/base-files/files/etc/uci-defaults/12_network-generate-ula
+++ b/package/base-files/files/etc/uci-defaults/12_network-generate-ula
@@ -1,11 +1,7 @@
 [ "$(uci -q get network.globals.ula_prefix)" != "auto" ] && exit 0
 
-r1=$(dd if=/dev/urandom bs=1 count=1 |hexdump -e '1/1 "%02x"')
-r2=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"')
-r3=$(dd if=/dev/urandom bs=2 count=1 |hexdump -e '2/1 "%02x"')
-
 uci -q batch <<-EOF >/dev/null
-	set network.globals.ula_prefix=fd$r1:$r2:$r3::/48
+	set network.globals.ula_prefix="$(hexdump -vn 5 -e '"fd" 1/1 "%02x:" 2/2 "%x:"' /dev/urandom):/48"
 	commit network
 EOF
 



From lede-commits at lists.infradead.org  Thu Apr 18 04:19:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 07:19:31 -0400
Subject: [openwrt/openwrt]  ustream-ssl: update to Git HEAD (2024-04-18)
In-Reply-To: <171343917196.3967213.14609419968655072080@git-01.infra.openwrt.org>
References: <171343917196.3967213.14609419968655072080@git-01.infra.openwrt.org>
Message-ID: <mailman.28710.1713439176.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e4453d1f8172feee97e0f66a102aa4e63c47e629

commit e4453d1f8172feee97e0f66a102aa4e63c47e629
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Apr 18 13:18:21 2024 +0200

    ustream-ssl: update to Git HEAD (2024-04-18)
    
    60d8fbb5e669 mbedtls: handle session tickets for TLS 1.3
    ac42af7981ae mbedtls: add ifdefs to fix legacy compatibility
    af7c3532ad49 mbedtls: another cosmetic ifdef fix
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/ustream-ssl/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile
index 8537205fda..5531a19e0f 100644
--- a/package/libs/ustream-ssl/Makefile
+++ b/package/libs/ustream-ssl/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
-PKG_SOURCE_DATE:=2024-04-07
-PKG_SOURCE_VERSION:=d61493a4420417cbf9931ffee8c862faf04f2967
-PKG_MIRROR_HASH:=a420d775ad4928836e33e0d9423486fe4904555dbbfff283cd96370a49cf9659
+PKG_SOURCE_DATE:=2024-04-18
+PKG_SOURCE_VERSION:=af7c3532ad499bc97f568087a57ac0f4fe6f56e1
+PKG_MIRROR_HASH:=a1aaa6d9245bb7007c070312587844fe4054fd95af3ba3fffd942ba852ff2c8f
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=ISC



From lede-commits at lists.infradead.org  Thu Apr 18 05:29:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 08:29:50 -0400
Subject: [openwrt/openwrt]  bcm27xx: refresh kernel patches
In-Reply-To: <171344339007.263104.8363435064263599495@git-01.infra.openwrt.org>
References: <171344339007.263104.8363435064263599495@git-01.infra.openwrt.org>
Message-ID: <mailman.28717.1713443397.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/9b33b74ef71225442361d5192d3a727be212c3cd

commit 9b33b74ef71225442361d5192d3a727be212c3cd
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Thu Apr 18 14:14:42 2024 +0200

    bcm27xx: refresh kernel patches
    
    Refresh kernel patches with make target/linux/refresh.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../950-0312-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/bcm27xx/patches-5.15/950-0312-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch b/target/linux/bcm27xx/patches-5.15/950-0312-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
index 46397c0ca8..9addd5ec71 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0312-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0312-phy-broadcom-split-out-the-BCM54213PE-from-the-BCM54.patch
@@ -49,7 +49,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	.phy_id		= PHY_ID_BCM5461,
  	.phy_id_mask	= 0xfffffff0,
  	.name		= "Broadcom BCM5461",
-@@ -975,7 +983,8 @@ module_phy_driver(broadcom_drivers);
+@@ -977,7 +985,8 @@ module_phy_driver(broadcom_drivers);
  static struct mdio_device_id __maybe_unused broadcom_tbl[] = {
  	{ PHY_ID_BCM5411, 0xfffffff0 },
  	{ PHY_ID_BCM5421, 0xfffffff0 },



From lede-commits at lists.infradead.org  Thu Apr 18 13:28:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 16:28:17 -0400
Subject: [openwrt/openwrt]  uclient: update to Git HEAD (2024-04-18)
In-Reply-To: <171347209634.4049736.13714592983874169674@git-01.infra.openwrt.org>
References: <171347209634.4049736.13714592983874169674@git-01.infra.openwrt.org>
Message-ID: <mailman.28858.1713472112.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/66019e456f60f5ef71a9af0d73502e20b874d114

commit 66019e456f60f5ef71a9af0d73502e20b874d114
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Apr 18 22:27:28 2024 +0200

    uclient: update to Git HEAD (2024-04-18)
    
    c2bf660d88ec lib: add log_msg callback to get more detailed log messages
    9adb4ca5219d uclient-fetch: add uclient / ustream-ssl log messages (enabled via -v)
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/uclient/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile
index cb679231cc..f7482bdc15 100644
--- a/package/libs/uclient/Makefile
+++ b/package/libs/uclient/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git
-PKG_MIRROR_HASH:=21c95854c60757007edacc579ce874999d2d536f682b0e636a8d19bc75e70da5
-PKG_SOURCE_DATE:=2024-04-05
-PKG_SOURCE_VERSION:=6c16331e4bf542fbb538d62a6b5bf3d286ecbf2c
+PKG_MIRROR_HASH:=5ce3b1994e968677a7e4d9a4e5bb180522063d629b454d064e5ad9c708638743
+PKG_SOURCE_DATE:=2024-04-18
+PKG_SOURCE_VERSION:=9adb4ca5219dc73b1440de871e871cc5a12323bd
 CMAKE_INSTALL:=1
 
 PKG_BUILD_DEPENDS:=ustream-ssl



From lede-commits at lists.infradead.org  Thu Apr 18 13:28:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 18 Apr 2024 16:28:16 -0400
Subject: [openwrt/openwrt]  ustream-ssl: update to Git HEAD (2024-04-18)
In-Reply-To: <171347209634.4049736.13714592983874169674@git-01.infra.openwrt.org>
References: <171347209634.4049736.13714592983874169674@git-01.infra.openwrt.org>
Message-ID: <mailman.28859.1713472112.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/899276795608a120266acd49eea852d163526246

commit 899276795608a120266acd49eea852d163526246
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Thu Apr 18 22:27:33 2024 +0200

    ustream-ssl: update to Git HEAD (2024-04-18)
    
    f9a28a9ce864 ustream-ssl: poll connection on incomplete reads
    3c49e70c4622 ustream-ssl: increase number of read buffers
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/ustream-ssl/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile
index 5531a19e0f..b293d7abab 100644
--- a/package/libs/ustream-ssl/Makefile
+++ b/package/libs/ustream-ssl/Makefile
@@ -6,8 +6,8 @@ PKG_RELEASE:=1
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
 PKG_SOURCE_DATE:=2024-04-18
-PKG_SOURCE_VERSION:=af7c3532ad499bc97f568087a57ac0f4fe6f56e1
-PKG_MIRROR_HASH:=a1aaa6d9245bb7007c070312587844fe4054fd95af3ba3fffd942ba852ff2c8f
+PKG_SOURCE_VERSION:=3c49e70c462249c174062e8181d191c859c5e41b
+PKG_MIRROR_HASH:=652c402a468c5904ea90bc59ac06793e523f422c947b3d692df80c00d4117d8a
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=ISC



From lede-commits at lists.infradead.org  Fri Apr 19 01:55:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 04:55:16 -0400
Subject: [openwrt/openwrt]  uboot-mvebu: update to version 2024.04
In-Reply-To: <171351691610.227491.12117131196866396554@git-01.infra.openwrt.org>
References: <171351691610.227491.12117131196866396554@git-01.infra.openwrt.org>
Message-ID: <mailman.28926.1713516922.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/040af127e72d47d69c28b1e15f55e1467d705225

commit 040af127e72d47d69c28b1e15f55e1467d705225
Author: Robert Marko <robert.marko at sartura.hr>
AuthorDate: Mon Apr 8 10:57:58 2024 +0200

    uboot-mvebu: update to version 2024.04
    
    Lets update to 2024.04 in order to drop all of the patches as they have
    been merged upstream.
    
    Tested on Methode eDPU.
    
    Signed-off-by: Robert Marko <robert.marko at sartura.hr>
---
 package/boot/uboot-mvebu/Makefile                  |   4 +-
 ...spressobin-move-FDT-fixup-into-a-separate.patch |  54 ----
 ...spressobin-move-network-setup-into-a-sepa.patch |  53 ----
 ...arm-mvebu-eDPU-support-new-board-revision.patch | 297 ---------------------
 ...learfog-read-number-of-ddr-channels-from-.patch |  85 ------
 ...learfog-support-512MB-memory-size-from-tl.patch |  31 ---
 6 files changed, 2 insertions(+), 522 deletions(-)

diff --git a/package/boot/uboot-mvebu/Makefile b/package/boot/uboot-mvebu/Makefile
index e6120959f6..c92e7f4f19 100644
--- a/package/boot/uboot-mvebu/Makefile
+++ b/package/boot/uboot-mvebu/Makefile
@@ -8,10 +8,10 @@
 include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
-PKG_VERSION:=2023.07.02
+PKG_VERSION:=2024.04
 PKG_RELEASE:=1
 
-PKG_HASH:=6b6a48581c14abb0f95bd87c1af4d740922406d7b801002a9f94727fdde021d5
+PKG_HASH:=18a853fe39fad7ad03a90cc2d4275aeaed6da69735defac3492b80508843dd4a
 
 include $(INCLUDE_DIR)/u-boot.mk
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/boot/uboot-mvebu/patches/0001-arm-mvebu-Espressobin-move-FDT-fixup-into-a-separate.patch b/package/boot/uboot-mvebu/patches/0001-arm-mvebu-Espressobin-move-FDT-fixup-into-a-separate.patch
deleted file mode 100644
index 59bdc38add..0000000000
--- a/package/boot/uboot-mvebu/patches/0001-arm-mvebu-Espressobin-move-FDT-fixup-into-a-separate.patch
+++ /dev/null
@@ -1,54 +0,0 @@
-From 8621f6d22a9589651c6f25742294dd19a26db430 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robert.marko at sartura.hr>
-Date: Thu, 3 Aug 2023 13:34:13 +0200
-Subject: [PATCH 1/3] arm: mvebu: Espressobin: move FDT fixup into a separate
- function
-
-Currently, Esspresobin FDT is being fixed up directly in ft_board_setup()
-which makes it hard to add support for any other board to be fixed up.
-
-So, lets just move the FDT fixup code to a separate function and call it
-if compatible matches, there should be no functional change.
-
-Signed-off-by: Robert Marko <robert.marko at sartura.hr>
----
- board/Marvell/mvebu_armada-37xx/board.c | 14 +++++++++-----
- 1 file changed, 9 insertions(+), 5 deletions(-)
-
---- a/board/Marvell/mvebu_armada-37xx/board.c
-+++ b/board/Marvell/mvebu_armada-37xx/board.c
-@@ -359,18 +359,14 @@ int last_stage_init(void)
- #endif
- 
- #ifdef CONFIG_OF_BOARD_SETUP
--int ft_board_setup(void *blob, struct bd_info *bd)
-+static int espressobin_fdt_setup(void *blob)
- {
--#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
- 	int ret;
- 	int spi_off;
- 	int parts_off;
- 	int part_off;
- 
- 	/* Fill SPI MTD partitions for Linux kernel on Espressobin */
--	if (!of_machine_is_compatible("globalscale,espressobin"))
--		return 0;
--
- 	spi_off = fdt_node_offset_by_compatible(blob, -1, "jedec,spi-nor");
- 	if (spi_off < 0)
- 		return 0;
-@@ -455,6 +451,14 @@ int ft_board_setup(void *blob, struct bd
- 		return 0;
- 	}
- 
-+	return 0;
-+}
-+
-+int ft_board_setup(void *blob, struct bd_info *bd)
-+{
-+#ifdef CONFIG_ENV_IS_IN_SPI_FLASH
-+	if (of_machine_is_compatible("globalscale,espressobin"))
-+		return espressobin_fdt_setup(blob);
- #endif
- 	return 0;
- }
diff --git a/package/boot/uboot-mvebu/patches/0002-arm-mvebu-Espressobin-move-network-setup-into-a-sepa.patch b/package/boot/uboot-mvebu/patches/0002-arm-mvebu-Espressobin-move-network-setup-into-a-sepa.patch
deleted file mode 100644
index 175deb397f..0000000000
--- a/package/boot/uboot-mvebu/patches/0002-arm-mvebu-Espressobin-move-network-setup-into-a-sepa.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From 3f8c18894a50fd45b81a807f217893f289500bc6 Mon Sep 17 00:00:00 2001
-From: Robert Marko <robert.marko at sartura.hr>
-Date: Thu, 3 Aug 2023 14:24:31 +0200
-Subject: [PATCH 2/3] arm: mvebu: Espressobin: move network setup into a
- separate function
-
-Currently, Esspresobin switch is being setup directly in last_stage_init()
-which makes it hard to add support for any other board to be setup.
-
-So, lets just move the switch setup code to a separate function and call it
-if compatible matches, there should be no functional change.
-
-Signed-off-by: Robert Marko <robert.marko at sartura.hr>
----
- board/Marvell/mvebu_armada-37xx/board.c | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
-
---- a/board/Marvell/mvebu_armada-37xx/board.c
-+++ b/board/Marvell/mvebu_armada-37xx/board.c
-@@ -300,15 +300,11 @@ static int mii_multi_chip_mode_write(str
- 	return 0;
- }
- 
--/* Bring-up board-specific network stuff */
--int last_stage_init(void)
-+static int espressobin_last_stage_init(void)
- {
- 	struct udevice *bus;
- 	ofnode node;
- 
--	if (!of_machine_is_compatible("globalscale,espressobin"))
--		return 0;
--
- 	node = ofnode_by_compatible(ofnode_null(), "marvell,orion-mdio");
- 	if (!ofnode_valid(node) ||
- 	    uclass_get_device_by_ofnode(UCLASS_MDIO, node, &bus) ||
-@@ -356,6 +352,16 @@ int last_stage_init(void)
- 
- 	return 0;
- }
-+
-+/* Bring-up board-specific network stuff */
-+int last_stage_init(void)
-+{
-+
-+	if (of_machine_is_compatible("globalscale,espressobin"))
-+		return espressobin_last_stage_init();
-+
-+	return 0;
-+}
- #endif
- 
- #ifdef CONFIG_OF_BOARD_SETUP
diff --git a/package/boot/uboot-mvebu/patches/0003-arm-mvebu-eDPU-support-new-board-revision.patch b/package/boot/uboot-mvebu/patches/0003-arm-mvebu-eDPU-support-new-board-revision.patch
deleted file mode 100644
index c27549e4d4..0000000000
--- a/package/boot/uboot-mvebu/patches/0003-arm-mvebu-eDPU-support-new-board-revision.patch
+++ /dev/null
@@ -1,297 +0,0 @@
-From 83c00ee665b8dde813458b2b07cf97ce8409248d Mon Sep 17 00:00:00 2001
-From: Robert Marko <robert.marko at sartura.hr>
-Date: Fri, 4 Aug 2023 22:39:06 +0200
-Subject: [PATCH 3/3] arm: mvebu: eDPU: support new board revision
-
-There is a new eDPU revision that uses Marvell 88E6361 switch onboard.
-We can rely on detecting the switch to enable and fixup the Linux DTS
-so a single DTS can be used.
-
-There is currently no support for the 88E6361 switch and thus no working
-networking in U-Boot, so we disable both ports.
-
-Signed-off-by: Robert Marko <robert.marko at sartura.hr>
----
- arch/arm/dts/armada-3720-eDPU-u-boot.dtsi |  13 ++-
- arch/arm/dts/armada-3720-eDPU.dts         |  47 ++++++++
- board/Marvell/mvebu_armada-37xx/board.c   | 125 ++++++++++++++++++++++
- configs/eDPU_defconfig                    |   2 +
- 4 files changed, 182 insertions(+), 5 deletions(-)
-
---- a/arch/arm/dts/armada-3720-eDPU-u-boot.dtsi
-+++ b/arch/arm/dts/armada-3720-eDPU-u-boot.dtsi
-@@ -32,14 +32,17 @@
- 	bootph-all;
- };
- 
--&eth0 {
--	/* G.hn does not work without additional configuration */
--	status = "disabled";
--};
--
- &eth1 {
- 	fixed-link {
- 		speed = <1000>;
- 		full-duplex;
- 	};
- };
-+
-+/*
-+ * eDPU v2 has a MV88E6361 switch on the MDIO bus and U-boot is used
-+ * to patch the Linux DTS if its found so enable MDIO by default.
-+ */
-+&mdio {
-+	status = "okay";
-+};
---- a/arch/arm/dts/armada-3720-eDPU.dts
-+++ b/arch/arm/dts/armada-3720-eDPU.dts
-@@ -12,3 +12,50 @@
- &eth0 {
- 	phy-mode = "2500base-x";
- };
-+
-+/*
-+ * External MV88E6361 switch is only available on v2 of the board.
-+ * U-Boot will enable the MDIO bus and switch nodes.
-+ */
-+&mdio {
-+	status = "disabled";
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&smi_pins>;
-+
-+	/* Actual device is MV88E6361 */
-+	switch: switch at 0 {
-+		compatible = "marvell,mv88e6190";
-+		#address-cells = <1>;
-+		#size-cells = <0>;
-+		reg = <0>;
-+		status = "disabled";
-+
-+		ports {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+
-+			port at 0 {
-+				reg = <0>;
-+				label = "cpu";
-+				phy-mode = "2500base-x";
-+				managed = "in-band-status";
-+				ethernet = <&eth0>;
-+			};
-+
-+			port at 9 {
-+				reg = <9>;
-+				label = "downlink";
-+				phy-mode = "2500base-x";
-+				managed = "in-band-status";
-+			};
-+
-+			port at a {
-+				reg = <10>;
-+				label = "uplink";
-+				phy-mode = "2500base-x";
-+				managed = "in-band-status";
-+				sfp = <&sfp_eth1>;
-+			};
-+		};
-+	};
-+};
---- a/board/Marvell/mvebu_armada-37xx/board.c
-+++ b/board/Marvell/mvebu_armada-37xx/board.c
-@@ -13,6 +13,7 @@
- #include <mmc.h>
- #include <miiphy.h>
- #include <phy.h>
-+#include <fdt_support.h>
- #include <asm/global_data.h>
- #include <asm/io.h>
- #include <asm/arch/cpu.h>
-@@ -49,6 +50,7 @@ DECLARE_GLOBAL_DATA_PTR;
- /* Single-chip mode */
- /* Switch Port Registers */
- #define MVEBU_SW_LINK_CTRL_REG		(1)
-+#define MVEBU_SW_PORT_SWITCH_ID		(3)
- #define MVEBU_SW_PORT_CTRL_REG		(4)
- #define MVEBU_SW_PORT_BASE_VLAN		(6)
- 
-@@ -56,6 +58,8 @@ DECLARE_GLOBAL_DATA_PTR;
- #define MVEBU_G2_SMI_PHY_CMD_REG	(24)
- #define MVEBU_G2_SMI_PHY_DATA_REG	(25)
- 
-+#define SWITCH_88E6361_PRODUCT_NUMBER	0x2610
-+
- /*
-  * Memory Controller Registers
-  *
-@@ -72,6 +76,27 @@ DECLARE_GLOBAL_DATA_PTR;
- #define A3700_MC_CTRL2_SDRAM_TYPE_DDR3	2
- #define A3700_MC_CTRL2_SDRAM_TYPE_DDR4	3
- 
-+static bool is_edpu_plus(void)
-+{
-+	struct udevice *bus;
-+	ofnode node;
-+	int val;
-+
-+	node = ofnode_by_compatible(ofnode_null(), "marvell,orion-mdio");
-+	if (!ofnode_valid(node) ||
-+	    uclass_get_device_by_ofnode(UCLASS_MDIO, node, &bus) ||
-+	    device_probe(bus)) {
-+		printf("Cannot find MDIO bus\n");
-+		return -ENODEV;
-+	}
-+
-+	val = dm_mdio_read(bus, 0x0, MDIO_DEVAD_NONE, MVEBU_SW_PORT_SWITCH_ID);
-+	if (val == SWITCH_88E6361_PRODUCT_NUMBER)
-+		return true;
-+	else
-+		return false;
-+}
-+
- int board_early_init_f(void)
- {
- 	return 0;
-@@ -353,6 +378,41 @@ static int espressobin_last_stage_init(v
- 	return 0;
- }
- 
-+static int edpu_plus_last_stage_init(void)
-+{
-+	struct udevice *dev;
-+	int ret;
-+
-+	if (is_edpu_plus()) {
-+		ret = uclass_get_device_by_name(UCLASS_ETH,
-+						"ethernet at 40000",
-+						&dev);
-+		if (!ret) {
-+			device_remove(dev, DM_REMOVE_NORMAL);
-+			device_unbind(dev);
-+		}
-+
-+		/* Currently no networking support on the eDPU+ board */
-+		ret = uclass_get_device_by_name(UCLASS_ETH,
-+						"ethernet at 30000",
-+						&dev);
-+		if (!ret) {
-+			device_remove(dev, DM_REMOVE_NORMAL);
-+			device_unbind(dev);
-+		}
-+	} else {
-+		ret = uclass_get_device_by_name(UCLASS_ETH,
-+						"ethernet at 30000",
-+						&dev);
-+		if (!ret) {
-+			device_remove(dev, DM_REMOVE_NORMAL);
-+			device_unbind(dev);
-+		}
-+	}
-+
-+	return 0;
-+}
-+
- /* Bring-up board-specific network stuff */
- int last_stage_init(void)
- {
-@@ -360,6 +420,9 @@ int last_stage_init(void)
- 	if (of_machine_is_compatible("globalscale,espressobin"))
- 		return espressobin_last_stage_init();
- 
-+	if (of_machine_is_compatible("methode,edpu"))
-+		return edpu_plus_last_stage_init();
-+
- 	return 0;
- }
- #endif
-@@ -460,12 +523,74 @@ static int espressobin_fdt_setup(void *b
- 	return 0;
- }
- 
-+static int edpu_plus_fdt_setup(void *blob)
-+{
-+	const char *ports[] = { "downlink", "uplink" };
-+	uint8_t mac[ETH_ALEN];
-+	const char *path;
-+	int i, ret;
-+
-+	if (is_edpu_plus()) {
-+		ret = fdt_set_status_by_compatible(blob,
-+						   "marvell,orion-mdio",
-+						   FDT_STATUS_OKAY);
-+		if (ret)
-+			printf("Failed to enable MDIO!\n");
-+
-+		ret = fdt_set_status_by_alias(blob,
-+					      "ethernet1",
-+					      FDT_STATUS_DISABLED);
-+		if (ret)
-+			printf("Failed to disable ethernet1!\n");
-+
-+		path = fdt_get_alias(blob, "ethernet0");
-+		if (path)
-+			do_fixup_by_path_string(blob, path, "phy-mode", "2500base-x");
-+		else
-+			printf("Failed to update ethernet0 phy-mode to 2500base-x!\n");
-+
-+		ret = fdt_set_status_by_compatible(blob,
-+						   "marvell,mv88e6190",
-+						   FDT_STATUS_OKAY);
-+		if (ret)
-+			printf("Failed to enable MV88E6361!\n");
-+
-+		/*
-+		 * MAC-s for Uplink and Downlink ports are stored under
-+		 * non standard variable names, so lets manually fixup the
-+		 * switch port nodes to have the desired MAC-s.
-+		 */
-+		for (i = 0; i < 2; i++) {
-+			if (eth_env_get_enetaddr(ports[i], mac)) {
-+				do_fixup_by_prop(blob,
-+						 "label",
-+						 ports[i],
-+						 strlen(ports[i]) + 1,
-+						 "mac-address",
-+						 mac, ARP_HLEN, 1);
-+
-+				do_fixup_by_prop(blob,
-+						 "label",
-+						 ports[i],
-+						 strlen(ports[i]) + 1,
-+						 "local-mac-address",
-+						 mac, ARP_HLEN, 1);
-+			}
-+		}
-+	}
-+
-+	return 0;
-+}
-+
- int ft_board_setup(void *blob, struct bd_info *bd)
- {
- #ifdef CONFIG_ENV_IS_IN_SPI_FLASH
- 	if (of_machine_is_compatible("globalscale,espressobin"))
- 		return espressobin_fdt_setup(blob);
- #endif
-+	if (of_machine_is_compatible("methode,edpu"))
-+		return edpu_plus_fdt_setup(blob);
-+
- 	return 0;
- }
- #endif
---- a/configs/eDPU_defconfig
-+++ b/configs/eDPU_defconfig
-@@ -17,12 +17,14 @@ CONFIG_DEBUG_UART=y
- # CONFIG_SYS_MALLOC_CLEAR_ON_INIT is not set
- CONFIG_FIT=y
- CONFIG_FIT_VERBOSE=y
-+CONFIG_OF_BOARD_SETUP=y
- CONFIG_DISTRO_DEFAULTS=y
- CONFIG_USE_PREBOOT=y
- # CONFIG_DISPLAY_CPUINFO is not set
- # CONFIG_DISPLAY_BOARDINFO is not set
- CONFIG_DISPLAY_BOARDINFO_LATE=y
- CONFIG_BOARD_EARLY_INIT_F=y
-+CONFIG_LAST_STAGE_INIT=y
- CONFIG_SYS_MAXARGS=32
- CONFIG_SYS_PBSIZE=1048
- # CONFIG_CMD_ELF is not set
diff --git a/package/boot/uboot-mvebu/patches/0004-arm-mvebu-clearfog-read-number-of-ddr-channels-from-.patch b/package/boot/uboot-mvebu/patches/0004-arm-mvebu-clearfog-read-number-of-ddr-channels-from-.patch
deleted file mode 100644
index f4db702639..0000000000
--- a/package/boot/uboot-mvebu/patches/0004-arm-mvebu-clearfog-read-number-of-ddr-channels-from-.patch
+++ /dev/null
@@ -1,85 +0,0 @@
-From 1dbc6d3739869af38e6157cd8b9bc4314ca3c9fe Mon Sep 17 00:00:00 2001
-From: Josua Mayer <josua at solid-run.com>
-Date: Mon, 18 Jul 2022 20:04:54 +0300
-Subject: [PATCH 1/2] arm: mvebu: clearfog: read number of ddr channels from
- tlv data
-
-Extend the existing tlv vendor extension used for ram size by one byte to
-also store the number of ddr channels.
-The length of the tlv entry can indicate whether the new information is
-present. If not default to single channel.
-
-Signed-off-by: Josua Mayer <josua at solid-run.com>
----
- board/solidrun/clearfog/clearfog.c | 14 +++++++++++++-
- board/solidrun/common/tlv_data.c   |  7 ++++++-
- board/solidrun/common/tlv_data.h   |  1 +
- 3 files changed, 20 insertions(+), 2 deletions(-)
-
-diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
-index 6edb4221551..4f4532b537e 100644
---- a/board/solidrun/clearfog/clearfog.c
-+++ b/board/solidrun/clearfog/clearfog.c
-@@ -36,7 +36,7 @@ DECLARE_GLOBAL_DATA_PTR;
- #define BOARD_GPP_POL_LOW	0x0
- #define BOARD_GPP_POL_MID	0x0
- 
--static struct tlv_data cf_tlv_data;
-+static struct tlv_data cf_tlv_data = { 0 };
- 
- static void cf_read_tlv_data(void)
- {
-@@ -168,6 +168,18 @@ struct mv_ddr_topology_map *mv_ddr_topology_map_get(void)
- 		break;
- 	}
- 
-+	switch (cf_tlv_data.ram_channels) {
-+	default:
-+	case 1:
-+		for (uint8_t i = 0; i < 5; i++)
-+			ifp->as_bus_params[i].cs_bitmask = 0x1;
-+		break;
-+	case 2:
-+		for (uint8_t i = 0; i < 5; i++)
-+			ifp->as_bus_params[i].cs_bitmask = 0x3;
-+		break;
-+	}
-+
- 	/* Return the board topology as defined in the board code */
- 	return &board_topology_map;
- }
-diff --git a/board/solidrun/common/tlv_data.c b/board/solidrun/common/tlv_data.c
-index 11d6e4a1380..cf5824886c3 100644
---- a/board/solidrun/common/tlv_data.c
-+++ b/board/solidrun/common/tlv_data.c
-@@ -45,9 +45,14 @@ static void parse_tlv_vendor_ext(struct tlvinfo_tlv *tlv_entry,
- 
- 	if (val[4] != SR_TLV_CODE_RAM_SIZE)
- 		return;
--	if (tlv_entry->length != 6)
-+	if (tlv_entry->length < 6)
- 		return;
- 	td->ram_size = val[5];
-+
-+	/* extension with additional data field for number of ddr channels */
-+	if (tlv_entry->length >= 7) {
-+		td->ram_channels = val[6];
-+	}
- }
- 
- static void parse_tlv_data(u8 *eeprom, struct tlvinfo_header *hdr,
-diff --git a/board/solidrun/common/tlv_data.h b/board/solidrun/common/tlv_data.h
-index a1432e4b8e1..be3f782ac4a 100644
---- a/board/solidrun/common/tlv_data.h
-+++ b/board/solidrun/common/tlv_data.h
-@@ -10,6 +10,7 @@ struct tlv_data {
- 	/* Store product name of both SOM and carrier */
- 	char tlv_product_name[2][32];
- 	unsigned int ram_size;
-+	uint8_t ram_channels;
- };
- 
- void read_tlv_data(struct tlv_data *td);
--- 
-2.35.3
-
diff --git a/package/boot/uboot-mvebu/patches/0005-arm-mvebu-clearfog-support-512MB-memory-size-from-tl.patch b/package/boot/uboot-mvebu/patches/0005-arm-mvebu-clearfog-support-512MB-memory-size-from-tl.patch
deleted file mode 100644
index 05fb8fdbf1..0000000000
--- a/package/boot/uboot-mvebu/patches/0005-arm-mvebu-clearfog-support-512MB-memory-size-from-tl.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From b1b4941c2e3e16a21dc15604220725cf7f2de7c5 Mon Sep 17 00:00:00 2001
-From: Josua Mayer <josua at solid-run.com>
-Date: Wed, 20 Jul 2022 19:10:56 +0300
-Subject: [PATCH 2/2] arm: mvebu: clearfog: support 512MB memory size from tlv
- eeprom
-
-Handle 2GBit memory size value "2" from tlv eeprom on ddr
-initialisation, to support SoMs with 512MB ddr memory.
-
-Signed-off-by: Josua Mayer <josua at solid-run.com>
----
- board/solidrun/clearfog/clearfog.c | 3 +++
- 1 file changed, 3 insertions(+)
-
-diff --git a/board/solidrun/clearfog/clearfog.c b/board/solidrun/clearfog/clearfog.c
-index 4f4532b537e..6fa2fe5fe3e 100644
---- a/board/solidrun/clearfog/clearfog.c
-+++ b/board/solidrun/clearfog/clearfog.c
-@@ -159,6 +159,9 @@ struct mv_ddr_topology_map *mv_ddr_topology_map_get(void)
- 	cf_read_tlv_data();
- 
- 	switch (cf_tlv_data.ram_size) {
-+	case 2:
-+		ifp->memory_size = MV_DDR_DIE_CAP_2GBIT;
-+		break;
- 	case 4:
- 	default:
- 		ifp->memory_size = MV_DDR_DIE_CAP_4GBIT;
--- 
-2.35.3
-



From lede-commits at lists.infradead.org  Fri Apr 19 04:25:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 07:25:17 -0400
Subject: [openwrt/openwrt]  mediatek: backport PWM drivers
In-Reply-To: <171352591788.3211837.4241129428817118610@git-01.infra.openwrt.org>
References: <171352591788.3211837.4241129428817118610@git-01.infra.openwrt.org>
Message-ID: <mailman.29001.1713525930.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0bba6741531131c021e5896e8c11d9e880001bab

commit 0bba6741531131c021e5896e8c11d9e880001bab
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri Apr 19 10:55:46 2024 +0100

    mediatek: backport PWM drivers
    
     * MT7981 and MT7988 backported to Linux 6.1
     * MT7988 backported to Linux 6.6
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...-v6.5-pwm-mediatek-Add-support-for-MT7981.patch | 147 +++++++++++++++++++++
 ...-v6.9-pwm-mediatek-add-support-for-MT7988.patch |  44 ++++++
 ...-v6.9-pwm-mediatek-add-support-for-MT7988.patch |  44 ++++++
 3 files changed, 235 insertions(+)

diff --git a/target/linux/mediatek/patches-6.1/805-v6.5-pwm-mediatek-Add-support-for-MT7981.patch b/target/linux/mediatek/patches-6.1/805-v6.5-pwm-mediatek-Add-support-for-MT7981.patch
new file mode 100644
index 0000000000..72feecadb1
--- /dev/null
+++ b/target/linux/mediatek/patches-6.1/805-v6.5-pwm-mediatek-Add-support-for-MT7981.patch
@@ -0,0 +1,147 @@
+From 967da67a745fb73fd0fc7aa61fd197b76fceb273 Mon Sep 17 00:00:00 2001
+From: Daniel Golle <daniel at makrotopia.org>
+Date: Fri, 21 Apr 2023 00:23:21 +0100
+Subject: [PATCH] pwm: mediatek: Add support for MT7981
+
+The PWM unit on MT7981 uses different register offsets than previous
+MediaTek PWM units. Add support for these new offsets and add support
+for PWM on MT7981 which has 3 PWM channels, one of them is typically
+used for a temperature controlled fan.
+While at it, also reorder pwm_mediatek_of_data entries to restore
+alphabetic order.
+
+Signed-off-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Reviewed-by: Matthias Brugger <matthias.bgg at gmail.com>
+Signed-off-by: Thierry Reding <thierry.reding at gmail.com>
+---
+ drivers/pwm/pwm-mediatek.c | 39 ++++++++++++++++++++++++++++++--------
+ 1 file changed, 31 insertions(+), 8 deletions(-)
+
+--- a/drivers/pwm/pwm-mediatek.c
++++ b/drivers/pwm/pwm-mediatek.c
+@@ -38,6 +38,7 @@ struct pwm_mediatek_of_data {
+ 	unsigned int num_pwms;
+ 	bool pwm45_fixup;
+ 	bool has_ck_26m_sel;
++	const unsigned int *reg_offset;
+ };
+ 
+ /**
+@@ -59,10 +60,14 @@ struct pwm_mediatek_chip {
+ 	const struct pwm_mediatek_of_data *soc;
+ };
+ 
+-static const unsigned int pwm_mediatek_reg_offset[] = {
++static const unsigned int mtk_pwm_reg_offset_v1[] = {
+ 	0x0010, 0x0050, 0x0090, 0x00d0, 0x0110, 0x0150, 0x0190, 0x0220
+ };
+ 
++static const unsigned int mtk_pwm_reg_offset_v2[] = {
++	0x0080, 0x00c0, 0x0100, 0x0140, 0x0180, 0x01c0, 0x0200, 0x0240
++};
++
+ static inline struct pwm_mediatek_chip *
+ to_pwm_mediatek_chip(struct pwm_chip *chip)
+ {
+@@ -111,7 +116,7 @@ static inline void pwm_mediatek_writel(s
+ 				       unsigned int num, unsigned int offset,
+ 				       u32 value)
+ {
+-	writel(value, chip->regs + pwm_mediatek_reg_offset[num] + offset);
++	writel(value, chip->regs + chip->soc->reg_offset[num] + offset);
+ }
+ 
+ static int pwm_mediatek_config(struct pwm_chip *chip, struct pwm_device *pwm,
+@@ -285,60 +290,77 @@ static const struct pwm_mediatek_of_data
+ 	.num_pwms = 8,
+ 	.pwm45_fixup = false,
+ 	.has_ck_26m_sel = false,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+ static const struct pwm_mediatek_of_data mt6795_pwm_data = {
+ 	.num_pwms = 7,
+ 	.pwm45_fixup = false,
+ 	.has_ck_26m_sel = false,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+ static const struct pwm_mediatek_of_data mt7622_pwm_data = {
+ 	.num_pwms = 6,
+ 	.pwm45_fixup = false,
+ 	.has_ck_26m_sel = true,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+ static const struct pwm_mediatek_of_data mt7623_pwm_data = {
+ 	.num_pwms = 5,
+ 	.pwm45_fixup = true,
+ 	.has_ck_26m_sel = false,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+ static const struct pwm_mediatek_of_data mt7628_pwm_data = {
+ 	.num_pwms = 4,
+ 	.pwm45_fixup = true,
+ 	.has_ck_26m_sel = false,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+ static const struct pwm_mediatek_of_data mt7629_pwm_data = {
+ 	.num_pwms = 1,
+ 	.pwm45_fixup = false,
+ 	.has_ck_26m_sel = false,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+-static const struct pwm_mediatek_of_data mt8183_pwm_data = {
+-	.num_pwms = 4,
++static const struct pwm_mediatek_of_data mt7981_pwm_data = {
++	.num_pwms = 3,
+ 	.pwm45_fixup = false,
+ 	.has_ck_26m_sel = true,
++	.reg_offset = mtk_pwm_reg_offset_v2,
+ };
+ 
+-static const struct pwm_mediatek_of_data mt8365_pwm_data = {
+-	.num_pwms = 3,
++static const struct pwm_mediatek_of_data mt7986_pwm_data = {
++	.num_pwms = 2,
+ 	.pwm45_fixup = false,
+ 	.has_ck_26m_sel = true,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+-static const struct pwm_mediatek_of_data mt7986_pwm_data = {
+-	.num_pwms = 2,
++static const struct pwm_mediatek_of_data mt8183_pwm_data = {
++	.num_pwms = 4,
++	.pwm45_fixup = false,
++	.has_ck_26m_sel = true,
++	.reg_offset = mtk_pwm_reg_offset_v1,
++};
++
++static const struct pwm_mediatek_of_data mt8365_pwm_data = {
++	.num_pwms = 3,
+ 	.pwm45_fixup = false,
+ 	.has_ck_26m_sel = true,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+ static const struct pwm_mediatek_of_data mt8516_pwm_data = {
+ 	.num_pwms = 5,
+ 	.pwm45_fixup = false,
+ 	.has_ck_26m_sel = true,
++	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
+ static const struct of_device_id pwm_mediatek_of_match[] = {
+@@ -348,6 +370,7 @@ static const struct of_device_id pwm_med
+ 	{ .compatible = "mediatek,mt7623-pwm", .data = &mt7623_pwm_data },
+ 	{ .compatible = "mediatek,mt7628-pwm", .data = &mt7628_pwm_data },
+ 	{ .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data },
++	{ .compatible = "mediatek,mt7981-pwm", .data = &mt7981_pwm_data },
+ 	{ .compatible = "mediatek,mt7986-pwm", .data = &mt7986_pwm_data },
+ 	{ .compatible = "mediatek,mt8183-pwm", .data = &mt8183_pwm_data },
+ 	{ .compatible = "mediatek,mt8365-pwm", .data = &mt8365_pwm_data },
diff --git a/target/linux/mediatek/patches-6.1/806-v6.9-pwm-mediatek-add-support-for-MT7988.patch b/target/linux/mediatek/patches-6.1/806-v6.9-pwm-mediatek-add-support-for-MT7988.patch
new file mode 100644
index 0000000000..00543a1bb1
--- /dev/null
+++ b/target/linux/mediatek/patches-6.1/806-v6.9-pwm-mediatek-add-support-for-MT7988.patch
@@ -0,0 +1,44 @@
+From eb58bf4afd708eb3c64c7b9b2c5fbfacdcdee3e5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Wed, 14 Feb 2024 15:04:54 +0100
+Subject: [PATCH] pwm: mediatek: add support for MT7988
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+MT7988 uses new registers layout just like MT7981 but it supports 8 PWM
+interfaces.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Link: https://lore.kernel.org/r/20240214140454.6438-2-zajec5 at gmail.com
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+---
+ drivers/pwm/pwm-mediatek.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/pwm/pwm-mediatek.c
++++ b/drivers/pwm/pwm-mediatek.c
+@@ -342,6 +342,13 @@ static const struct pwm_mediatek_of_data
+ 	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
++static const struct pwm_mediatek_of_data mt7988_pwm_data = {
++	.num_pwms = 8,
++	.pwm45_fixup = false,
++	.has_ck_26m_sel = false,
++	.reg_offset = mtk_pwm_reg_offset_v2,
++};
++
+ static const struct pwm_mediatek_of_data mt8183_pwm_data = {
+ 	.num_pwms = 4,
+ 	.pwm45_fixup = false,
+@@ -372,6 +379,7 @@ static const struct of_device_id pwm_med
+ 	{ .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data },
+ 	{ .compatible = "mediatek,mt7981-pwm", .data = &mt7981_pwm_data },
+ 	{ .compatible = "mediatek,mt7986-pwm", .data = &mt7986_pwm_data },
++	{ .compatible = "mediatek,mt7988-pwm", .data = &mt7988_pwm_data },
+ 	{ .compatible = "mediatek,mt8183-pwm", .data = &mt8183_pwm_data },
+ 	{ .compatible = "mediatek,mt8365-pwm", .data = &mt8365_pwm_data },
+ 	{ .compatible = "mediatek,mt8516-pwm", .data = &mt8516_pwm_data },
diff --git a/target/linux/mediatek/patches-6.6/806-v6.9-pwm-mediatek-add-support-for-MT7988.patch b/target/linux/mediatek/patches-6.6/806-v6.9-pwm-mediatek-add-support-for-MT7988.patch
new file mode 100644
index 0000000000..01768ff01f
--- /dev/null
+++ b/target/linux/mediatek/patches-6.6/806-v6.9-pwm-mediatek-add-support-for-MT7988.patch
@@ -0,0 +1,44 @@
+From eb58bf4afd708eb3c64c7b9b2c5fbfacdcdee3e5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
+Date: Wed, 14 Feb 2024 15:04:54 +0100
+Subject: [PATCH] pwm: mediatek: add support for MT7988
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+MT7988 uses new registers layout just like MT7981 but it supports 8 PWM
+interfaces.
+
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Link: https://lore.kernel.org/r/20240214140454.6438-2-zajec5 at gmail.com
+Signed-off-by: Uwe Kleine-K?nig <u.kleine-koenig at pengutronix.de>
+---
+ drivers/pwm/pwm-mediatek.c | 8 ++++++++
+ 1 file changed, 8 insertions(+)
+
+--- a/drivers/pwm/pwm-mediatek.c
++++ b/drivers/pwm/pwm-mediatek.c
+@@ -341,6 +341,13 @@ static const struct pwm_mediatek_of_data
+ 	.reg_offset = mtk_pwm_reg_offset_v1,
+ };
+ 
++static const struct pwm_mediatek_of_data mt7988_pwm_data = {
++	.num_pwms = 8,
++	.pwm45_fixup = false,
++	.has_ck_26m_sel = false,
++	.reg_offset = mtk_pwm_reg_offset_v2,
++};
++
+ static const struct pwm_mediatek_of_data mt8183_pwm_data = {
+ 	.num_pwms = 4,
+ 	.pwm45_fixup = false,
+@@ -371,6 +378,7 @@ static const struct of_device_id pwm_med
+ 	{ .compatible = "mediatek,mt7629-pwm", .data = &mt7629_pwm_data },
+ 	{ .compatible = "mediatek,mt7981-pwm", .data = &mt7981_pwm_data },
+ 	{ .compatible = "mediatek,mt7986-pwm", .data = &mt7986_pwm_data },
++	{ .compatible = "mediatek,mt7988-pwm", .data = &mt7988_pwm_data },
+ 	{ .compatible = "mediatek,mt8183-pwm", .data = &mt8183_pwm_data },
+ 	{ .compatible = "mediatek,mt8365-pwm", .data = &mt8365_pwm_data },
+ 	{ .compatible = "mediatek,mt8516-pwm", .data = &mt8516_pwm_data },



From lede-commits at lists.infradead.org  Fri Apr 19 09:00:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:00:57 -0400
Subject: [openwrt/openwrt]  ustream-ssl: update to Git HEAD (2024-04-19)
In-Reply-To: <171354245716.359590.10850342453276312790@git-01.infra.openwrt.org>
References: <171354245716.359590.10850342453276312790@git-01.infra.openwrt.org>
Message-ID: <mailman.29099.1713542469.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7334337064c4527ecad839d825ca37ea98a17bfb

commit 7334337064c4527ecad839d825ca37ea98a17bfb
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Apr 19 17:56:02 2024 +0200

    ustream-ssl: update to Git HEAD (2024-04-19)
    
    524a76e5af78 ustream-ssl: add support for using a fd instead of ustream as backing
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/ustream-ssl/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/ustream-ssl/Makefile b/package/libs/ustream-ssl/Makefile
index b293d7abab..b9c477f2ae 100644
--- a/package/libs/ustream-ssl/Makefile
+++ b/package/libs/ustream-ssl/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustream-ssl.git
-PKG_SOURCE_DATE:=2024-04-18
-PKG_SOURCE_VERSION:=3c49e70c462249c174062e8181d191c859c5e41b
-PKG_MIRROR_HASH:=652c402a468c5904ea90bc59ac06793e523f422c947b3d692df80c00d4117d8a
+PKG_SOURCE_DATE:=2024-04-19
+PKG_SOURCE_VERSION:=524a76e5af78fa577c46e0d24bdedd4254e07cd4
+PKG_MIRROR_HASH:=638a3143013c7b60faa0e92f466a4245c635b72a7a61baa84dc9fca000991999
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=ISC



From lede-commits at lists.infradead.org  Fri Apr 19 09:00:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:00:58 -0400
Subject: [openwrt/openwrt]  uclient: update to Git HEAD (2024-04-19)
In-Reply-To: <171354245716.359590.10850342453276312790@git-01.infra.openwrt.org>
References: <171354245716.359590.10850342453276312790@git-01.infra.openwrt.org>
Message-ID: <mailman.29100.1713542469.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a33989469156043df915e1274e9d3a5874150ed7

commit a33989469156043df915e1274e9d3a5874150ed7
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Apr 19 17:56:17 2024 +0200

    uclient: update to Git HEAD (2024-04-19)
    
    704c78111a92 uclient-http: use ustream_ssl without ustream_fd
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/uclient/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile
index f7482bdc15..e8588b9e01 100644
--- a/package/libs/uclient/Makefile
+++ b/package/libs/uclient/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git
-PKG_MIRROR_HASH:=5ce3b1994e968677a7e4d9a4e5bb180522063d629b454d064e5ad9c708638743
-PKG_SOURCE_DATE:=2024-04-18
-PKG_SOURCE_VERSION:=9adb4ca5219dc73b1440de871e871cc5a12323bd
+PKG_MIRROR_HASH:=ab3d57dd9701acfa0f3e6b1555c0f572b963d9b16a945ce2f62ebea121de9de6
+PKG_SOURCE_DATE:=2024-04-19
+PKG_SOURCE_VERSION:=704c78111a92873474eca3c91ad91c555b03f607
 CMAKE_INSTALL:=1
 
 PKG_BUILD_DEPENDS:=ustream-ssl



From lede-commits at lists.infradead.org  Fri Apr 19 09:38:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:38:45 -0400
Subject: [openwrt/openwrt]  kernel/sifiveu: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
References: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
Message-ID: <mailman.29103.1713544728.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9905057d7e40ec8e3b845ff23cfb8389f64d62b1

commit 9905057d7e40ec8e3b845ff23cfb8389f64d62b1
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Thu Apr 18 23:15:30 2024 +0200

    kernel/sifiveu: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    During a `git bisect` session, `git bisect --skip` is recommended.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sifiveu/{config-6.1 => config-6.6}                           | 0
 .../0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch       | 0
 .../0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch              | 0
 .../0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch            | 0
 4 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/sifiveu/config-6.1 b/target/linux/sifiveu/config-6.6
similarity index 100%
rename from target/linux/sifiveu/config-6.1
rename to target/linux/sifiveu/config-6.6
diff --git a/target/linux/sifiveu/patches-6.1/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch b/target/linux/sifiveu/patches-6.6/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch
similarity index 100%
rename from target/linux/sifiveu/patches-6.1/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch
rename to target/linux/sifiveu/patches-6.6/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch
diff --git a/target/linux/sifiveu/patches-6.1/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch b/target/linux/sifiveu/patches-6.6/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch
similarity index 100%
rename from target/linux/sifiveu/patches-6.1/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch
rename to target/linux/sifiveu/patches-6.6/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch
diff --git a/target/linux/sifiveu/patches-6.1/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch b/target/linux/sifiveu/patches-6.6/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
similarity index 100%
rename from target/linux/sifiveu/patches-6.1/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
rename to target/linux/sifiveu/patches-6.6/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch



From lede-commits at lists.infradead.org  Fri Apr 19 09:38:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:38:43 -0400
Subject: [openwrt/openwrt]  mxs: adjust DTS path for 6.6
In-Reply-To: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
References: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
Message-ID: <mailman.29104.1713544728.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/38dc19828d56bfe3457440aa85126182a8c6c0fb

commit 38dc19828d56bfe3457440aa85126182a8c6c0fb
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Thu Apr 18 16:49:27 2024 +0000

    mxs: adjust DTS path for 6.6
    
    For the ARM arch on 6.6, DTS files are moved into their vendor directories,
    mimicking arm64. Reflect this in the image Makefile.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/mxs/image/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile
index f1847dec1e..585211dc0b 100644
--- a/target/linux/mxs/image/Makefile
+++ b/target/linux/mxs/image/Makefile
@@ -39,6 +39,9 @@ define Device/Default
   KERNEL_NAME := zImage
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
+ifneq ($(KERNEL),6.1)
+  DTS_DIR := $(DTS_DIR)/nxp/mxs
+endif
   DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
 endef
 



From lede-commits at lists.infradead.org  Fri Apr 19 09:38:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:38:48 -0400
Subject: [openwrt/openwrt]  sifiveu: 6.6: set testing kernel
In-Reply-To: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
References: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
Message-ID: <mailman.29105.1713544731.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2164bd308b94dea8ac0f32a310bd636bcfde93dd

commit 2164bd308b94dea8ac0f32a310bd636bcfde93dd
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Thu Apr 18 21:44:23 2024 +0000

    sifiveu: 6.6: set testing kernel
    
    Allow selecting 6.6 as testing kernel on sunxi.
    
    Runtime-tested: SiFive Unleashed
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sifiveu/Makefile   |  1 +
 target/linux/sifiveu/config-6.6 | 13 +++++++++++++
 2 files changed, 14 insertions(+)

diff --git a/target/linux/sifiveu/Makefile b/target/linux/sifiveu/Makefile
index 52989a9dae..3a003a35fc 100644
--- a/target/linux/sifiveu/Makefile
+++ b/target/linux/sifiveu/Makefile
@@ -12,6 +12,7 @@ KERNELNAME:=Image dtbs
 SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/sifiveu/config-6.6 b/target/linux/sifiveu/config-6.6
index 98283f4e0d..9a8cf8e48c 100644
--- a/target/linux/sifiveu/config-6.6
+++ b/target/linux/sifiveu/config-6.6
@@ -1,4 +1,5 @@
 CONFIG_64BIT=y
+# CONFIG_ACPI is not set
 CONFIG_ARCH_CLOCKSOURCE_INIT=y
 CONFIG_ARCH_DMA_ADDR_T_64BIT=y
 CONFIG_ARCH_MMAP_RND_BITS=18
@@ -8,6 +9,7 @@ CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
 CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
 CONFIG_ARCH_RV64I=y
+# CONFIG_ARCH_THEAD is not set
 CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_STACKWALK=y
@@ -16,6 +18,7 @@ CONFIG_ASN1=y
 CONFIG_ASSOCIATIVE_ARRAY=y
 CONFIG_ATA=y
 CONFIG_ATA_VERBOSE_ERROR=y
+# CONFIG_AX45MP_L2_CACHE is not set
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_CAVIUM_PTP=y
@@ -93,6 +96,7 @@ CONFIG_EFI_STUB=y
 # CONFIG_EFI_TEST is not set
 # CONFIG_EFI_ZBOOT is not set
 CONFIG_ELF_CORE=y
+# CONFIG_ERRATA_ANDES is not set
 CONFIG_ERRATA_SIFIVE=y
 CONFIG_ERRATA_SIFIVE_CIP_1200=y
 CONFIG_ERRATA_SIFIVE_CIP_453=y
@@ -168,8 +172,10 @@ CONFIG_I2C_OCORES=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 # CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMUFD is not set
 CONFIG_IOMMU_SUPPORT=y
 CONFIG_IO_URING=y
+CONFIG_IRQ_STACKS=y
 CONFIG_IRQCHIP=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_DOMAIN_HIERARCHY=y
@@ -304,7 +310,13 @@ CONFIG_RISCV_ALTERNATIVE=y
 CONFIG_RISCV_DMA_NONCOHERENT=y
 CONFIG_RISCV_INTC=y
 CONFIG_RISCV_ISA_C=y
+CONFIG_RISCV_ISA_FALLBACK=y
+CONFIG_RISCV_ISA_SVNAPOT=y
 CONFIG_RISCV_ISA_SVPBMT=y
+CONFIG_RISCV_ISA_V=y
+CONFIG_RISCV_ISA_V_DEFAULT_ENABLE=y
+CONFIG_RISCV_ISA_ZBB=y
+CONFIG_RISCV_ISA_ZICBOZ=y
 CONFIG_RISCV_ISA_ZICBOM=y
 CONFIG_RISCV_SBI=y
 CONFIG_RISCV_SBI_V01=y
@@ -352,6 +364,7 @@ CONFIG_SWPHY=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
 # CONFIG_SYSFB_SIMPLEFB is not set
 CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_THREAD_SIZE_ORDER=2
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y



From lede-commits at lists.infradead.org  Fri Apr 19 09:38:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:38:44 -0400
Subject: [openwrt/openwrt]  mxs: add kernel 6.6 as testing
In-Reply-To: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
References: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
Message-ID: <mailman.29106.1713544731.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/788c781ba60975546e29194078dda885d7da0ea6

commit 788c781ba60975546e29194078dda885d7da0ea6
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Fri Feb 9 11:12:54 2024 +0100

    mxs: add kernel 6.6 as testing
    
    Add new LTS kernel support.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/mxs/Makefile   |   1 +
 target/linux/mxs/config-6.6 | 269 ++++++++++++++++++++++++++++++++++++++++++++
 2 files changed, 270 insertions(+)

diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile
index 9e88e5aea2..606d19e21c 100644
--- a/target/linux/mxs/Makefile
+++ b/target/linux/mxs/Makefile
@@ -12,6 +12,7 @@ CPU_TYPE:=arm926ej-s
 SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 KERNELNAME:=zImage dtbs
 
diff --git a/target/linux/mxs/config-6.6 b/target/linux/mxs/config-6.6
new file mode 100644
index 0000000000..76aecd17ff
--- /dev/null
+++ b/target/linux/mxs/config-6.6
@@ -0,0 +1,269 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_CPU_AUTO=y
+# CONFIG_ARCH_MULTI_V4 is not set
+# CONFIG_ARCH_MULTI_V4T is not set
+CONFIG_ARCH_MULTI_V4_V5=y
+CONFIG_ARCH_MULTI_V5=y
+CONFIG_ARCH_MXS=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
+CONFIG_ARM_L1_CACHE_SHIFT=5
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ATAGS=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_PM=y
+CONFIG_BUFFER_HEAD=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMDLINE="console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait"
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_COREDUMP=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_CRYPTO_CBC=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEV_MXS_DCP=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_DEBUG_ALIGN_RODATA=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DTC=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_EXT4_FS=y
+CONFIG_EXTCON=y
+CONFIG_FEC=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FUNCTION_ALIGNMENT=0
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+# CONFIG_GIANFAR is not set
+CONFIG_GLOB=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_MXS=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HID_SUPPORT=y
+CONFIG_HZ_FIXED=0
+CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_ALGOPCA=y
+CONFIG_I2C_ALGOPCF=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PINCTRL=y
+CONFIG_I2C_MXS=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_SYSFS_TRIGGER=y
+CONFIG_IIO_TRIGGER=y
+# CONFIG_IIO_TRIGGERED_BUFFER is not set
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_MXS=y
+CONFIG_IRQ_WORK=y
+# CONFIG_ISDN is not set
+CONFIG_JBD2=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_MXS_LRADC=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_MXS=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MXS_DMA=y
+# CONFIG_MXS_LRADC_ADC is not set
+CONFIG_MXS_TIMER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_KUSER_HELPERS=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_EGRESS=y
+CONFIG_NET_INGRESS=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_XGRESS=y
+CONFIG_NLS=y
+CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
+CONFIG_NVMEM_MXS_OCOTP=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_IMX23=y
+CONFIG_PINCTRL_IMX28=y
+CONFIG_PINCTRL_MXS=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_RATIONAL=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_GPIO=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_STMP=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_AMBA_PL011=y
+CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_MXS_AUART=y
+CONFIG_SERIAL_MXS_AUART_CONSOLE=y
+CONFIG_SMSC_PHY=y
+CONFIG_SOC_BUS=y
+CONFIG_SOC_IMX23=y
+CONFIG_SOC_IMX28=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MXS=y
+CONFIG_SPLIT_PTLOCK_CPUS=999999
+CONFIG_STMP3XXX_RTC_WATCHDOG=y
+CONFIG_STMP_DEVICE=y
+CONFIG_SWPHY=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TINY_SRCU=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_CHIPIDEA_IMX=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_MXS_PHY=y
+CONFIG_USB_OTG=y
+CONFIG_USB_PHY=y
+CONFIG_USB_ROLE_SWITCH=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ULPI_BUS=y
+CONFIG_USE_OF=y
+# CONFIG_VFP is not set
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_ZBOOT_ROM_TEXT=0



From lede-commits at lists.infradead.org  Fri Apr 19 09:38:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:38:47 -0400
Subject: [openwrt/openwrt]  sifiveu: 6.6: refresh patches
In-Reply-To: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
References: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
Message-ID: <mailman.29109.1713544731.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7e9dd5d10c152ffadab17be465887a624915a22d

commit 7e9dd5d10c152ffadab17be465887a624915a22d
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Thu Apr 18 21:43:49 2024 +0000

    sifiveu: 6.6: refresh patches
    
    Refresh kernel patches.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 .../0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch        | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/sifiveu/patches-6.6/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch b/target/linux/sifiveu/patches-6.6/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
index c4242c6f07..f9ec6c4f82 100644
--- a/target/linux/sifiveu/patches-6.6/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
+++ b/target/linux/sifiveu/patches-6.6/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
@@ -14,9 +14,9 @@ Signed-off-by: David Abdurachmanov <david.abdurachmanov at sifive.com>
 
 --- a/arch/riscv/Kconfig
 +++ b/arch/riscv/Kconfig
-@@ -711,6 +711,14 @@ config PORTABLE
- 	select OF
+@@ -896,6 +896,14 @@ config PORTABLE
  	select MMU
+ 	select OF
  
 +menu "CPU Power Management"
 +



From lede-commits at lists.infradead.org  Fri Apr 19 09:38:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:38:46 -0400
Subject: [openwrt/openwrt]  kernel/sifiveu: Restore kernel files for v6.1
In-Reply-To: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
References: <171354472363.1122490.3564350172280381206@git-01.infra.openwrt.org>
Message-ID: <mailman.29110.1713544731.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/bafdd7a67b3851964bdfaf856ba28cbe836d8245

commit bafdd7a67b3851964bdfaf856ba28cbe836d8245
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Thu Apr 18 23:15:30 2024 +0200

    kernel/sifiveu: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sifiveu/config-6.1                    | 392 +++++++++++++++++++++
 ...e-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch |  49 +++
 ...v-sifive-unmatched-add-gpio-poweroff-node.patch |  26 ++
 ...sifive-unleashed-define-opp-table-cpufreq.patch | 116 ++++++
 4 files changed, 583 insertions(+)

diff --git a/target/linux/sifiveu/config-6.1 b/target/linux/sifiveu/config-6.1
new file mode 100644
index 0000000000..98283f4e0d
--- /dev/null
+++ b/target/linux/sifiveu/config-6.1
@@ -0,0 +1,392 @@
+CONFIG_64BIT=y
+CONFIG_ARCH_CLOCKSOURCE_INIT=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_MMAP_RND_BITS=18
+CONFIG_ARCH_MMAP_RND_BITS_MAX=24
+CONFIG_ARCH_MMAP_RND_BITS_MIN=18
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_RV64I=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_WANTS_THP_SWAP=y
+CONFIG_ASN1=y
+CONFIG_ASSOCIATIVE_ARRAY=y
+CONFIG_ATA=y
+CONFIG_ATA_VERBOSE_ERROR=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_CAVIUM_PTP=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
+CONFIG_CLK_ANALOGBITS_WRPLL_CLN28HPC=y
+CONFIG_CLK_SIFIVE=y
+CONFIG_CLK_SIFIVE_PRCI=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CLZ_TAB=y
+CONFIG_CMODEL_MEDANY=y
+# CONFIG_CMODEL_MEDLOW is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
+# CONFIG_COMPAT_32BIT_TIME is not set
+CONFIG_COMPAT_BRK=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
+CONFIG_COREDUMP=y
+CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
+CONFIG_CPU_ISOLATION=y
+CONFIG_CPU_RMAP=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CRC7=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_ECHAINIV=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RNG_DEFAULT=y
+CONFIG_CRYPTO_RSA=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_INFO=y
+CONFIG_DECOMPRESS_GZIP=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_DMA_DIRECT_REMAP=y
+CONFIG_DNOTIFY=y
+CONFIG_DTC=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_EDAC=y
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_LEGACY_SYSFS=y
+CONFIG_EDAC_SIFIVE=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EFI=y
+CONFIG_EFIVAR_FS=m
+# CONFIG_EFI_BOOTLOADER_CONTROL is not set
+# CONFIG_EFI_CAPSULE_LOADER is not set
+# CONFIG_EFI_COCO_SECRET is not set
+# CONFIG_EFI_DISABLE_PCI_DMA is not set
+# CONFIG_EFI_DISABLE_RUNTIME is not set
+CONFIG_EFI_EARLYCON=y
+CONFIG_EFI_ESRT=y
+CONFIG_EFI_GENERIC_STUB=y
+CONFIG_EFI_PARAMS_FROM_FDT=y
+CONFIG_EFI_RUNTIME_WRAPPERS=y
+CONFIG_EFI_STUB=y
+# CONFIG_EFI_TEST is not set
+# CONFIG_EFI_ZBOOT is not set
+CONFIG_ELF_CORE=y
+CONFIG_ERRATA_SIFIVE=y
+CONFIG_ERRATA_SIFIVE_CIP_1200=y
+CONFIG_ERRATA_SIFIVE_CIP_453=y
+# CONFIG_ERRATA_THEAD is not set
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
+CONFIG_EXT4_FS=y
+CONFIG_FAILOVER=y
+CONFIG_FAT_FS=y
+CONFIG_FHANDLE=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_AUTOSELECT=y
+CONFIG_FONT_SUPPORT=y
+CONFIG_FPU=y
+CONFIG_FRAME_POINTER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CSUM=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IOREMAP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_INJECTION=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_CDEV_V1=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_SIFIVE=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HID=y
+CONFIG_HID_GENERIC=y
+CONFIG_HOTPLUG_PCI=y
+# CONFIG_HOTPLUG_PCI_CPCI is not set
+CONFIG_HOTPLUG_PCI_PCIE=y
+CONFIG_HOTPLUG_PCI_SHPC=y
+CONFIG_HVC_DRIVER=y
+CONFIG_HVC_RISCV_SBI=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_OCORES=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+# CONFIG_IOMMU_DEBUGFS is not set
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_IO_URING=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_KALLSYMS=y
+CONFIG_KEYS=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_TRIGGER_DISK=y
+CONFIG_LEGACY_PTYS=y
+CONFIG_LEGACY_PTY_COUNT=256
+CONFIG_LIBFDT=y
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_MACB=y
+# CONFIG_MACB_PCI is not set
+CONFIG_MACB_USE_HWSTAMP=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MICROSEMI_PHY=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_CADENCE=y
+# CONFIG_MMC_SDHCI_PCI is not set
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MMC_SPI=y
+CONFIG_MMIOWB=y
+CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_MODULE_SECTIONS=y
+CONFIG_MPILIB=y
+CONFIG_MQ_IOSCHED_DEADLINE=y
+CONFIG_MQ_IOSCHED_KYBER=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_FAILOVER=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NLS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+# CONFIG_NONPORTABLE is not set
+CONFIG_NR_CPUS=8
+CONFIG_NVMEM=y
+CONFIG_NVMEM_SYSFS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_DMA_DEFAULT_COHERENT=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OID_REGISTRY=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xff60000000000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_REPORTING=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PCI=y
+CONFIG_PCIEAER=y
+CONFIG_PCIEAER_INJECT=m
+CONFIG_PCIEASPM=y
+CONFIG_PCIEASPM_DEFAULT=y
+# CONFIG_PCIEASPM_PERFORMANCE is not set
+# CONFIG_PCIEASPM_POWERSAVE is not set
+# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
+CONFIG_PCIEPORTBUS=y
+CONFIG_PCIE_DPC=y
+CONFIG_PCIE_DW=y
+CONFIG_PCIE_DW_HOST=y
+CONFIG_PCIE_ECRC=y
+CONFIG_PCIE_FU740=y
+CONFIG_PCIE_PTM=y
+CONFIG_PCIE_XILINX=y
+CONFIG_PCI_DEBUG=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_ECAM=y
+CONFIG_PCI_HOST_COMMON=y
+CONFIG_PCI_HOST_GENERIC=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PCI_SW_SWITCHTEC=y
+CONFIG_PGTABLE_LEVELS=5
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_PORTABLE=y
+CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_GPIO=y
+CONFIG_POWER_RESET_GPIO_RESTART=y
+CONFIG_POWER_RESET_RESTART=y
+CONFIG_POWER_RESET_SYSCON=y
+CONFIG_POWER_RESET_SYSCON_POWEROFF=y
+CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
+CONFIG_PRINTK_TIME=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_SIFIVE=y
+CONFIG_PWM_SYSFS=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_RANDSTRUCT_NONE=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+CONFIG_RCU_TRACE=y
+CONFIG_RD_GZIP=y
+CONFIG_REALTEK_PHY=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+# CONFIG_RESET_ATTACK_MITIGATION is not set
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RESET_SIMPLE=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RISCV=y
+CONFIG_RISCV_ALTERNATIVE=y
+# CONFIG_RISCV_BOOT_SPINWAIT is not set
+CONFIG_RISCV_DMA_NONCOHERENT=y
+CONFIG_RISCV_INTC=y
+CONFIG_RISCV_ISA_C=y
+CONFIG_RISCV_ISA_SVPBMT=y
+CONFIG_RISCV_ISA_ZICBOM=y
+CONFIG_RISCV_SBI=y
+CONFIG_RISCV_SBI_V01=y
+CONFIG_RISCV_TIMER=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+# CONFIG_RTC_DRV_EFI is not set
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SCHED_DEBUG=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
+CONFIG_SERIAL_8250_EXAR=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_PCI=y
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIAL_SIFIVE=y
+CONFIG_SERIAL_SIFIVE_CONSOLE=y
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SG_POOL=y
+CONFIG_SIFIVE_CCACHE=y
+CONFIG_SIFIVE_PLIC=y
+CONFIG_SMP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+# CONFIG_SOC_MICROCHIP_POLARFIRE is not set
+CONFIG_SOC_SIFIVE=y
+# CONFIG_SOC_STARFIVE is not set
+# CONFIG_SOC_VIRT is not set
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_SIFIVE=y
+CONFIG_SRCU=y
+CONFIG_STACKTRACE=y
+CONFIG_SWIOTLB=y
+CONFIG_SWPHY=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+# CONFIG_SYSFB_SIMPLEFB is not set
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TOOLCHAIN_HAS_ZICBOM=y
+CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE=y
+CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI=y
+CONFIG_TRACE_CLOCK=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_TUNE_GENERIC=y
+CONFIG_UCS2_STRING=y
+CONFIG_UEVENT_HELPER_PATH=""
+CONFIG_USB=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_EHCI_PCI=y
+CONFIG_USB_HID=y
+CONFIG_USB_NET_DRIVERS=y
+CONFIG_USB_PCI=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SUPPORT=y
+# CONFIG_USB_UHCI_HCD is not set
+CONFIG_USB_XHCI_HCD=y
+CONFIG_USB_XHCI_PCI=y
+# CONFIG_USB_XHCI_PLATFORM is not set
+CONFIG_VFAT_FS=y
+CONFIG_VGA_ARB=y
+CONFIG_VGA_ARB_MAX_GPUS=16
+CONFIG_VMAP_STACK=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XPS=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZONE_DMA32=y
diff --git a/target/linux/sifiveu/patches-6.1/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch b/target/linux/sifiveu/patches-6.1/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch
new file mode 100644
index 0000000000..9a1c968139
--- /dev/null
+++ b/target/linux/sifiveu/patches-6.1/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch
@@ -0,0 +1,49 @@
+From ab5c8f5492cce16ff2104393e2f1fa64a3ff6e88 Mon Sep 17 00:00:00 2001
+From: David Abdurachmanov <david.abdurachmanov at sifive.com>
+Date: Wed, 17 Feb 2021 06:06:14 -0800
+Subject: [PATCH 1/7] riscv: sifive: fu740: cpu{1,2,3,4} set compatible to
+ sifive,u74-mc
+
+Signed-off-by: David Abdurachmanov <david.abdurachmanov at sifive.com>
+---
+ arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
++++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
+@@ -39,7 +39,7 @@
+ 			};
+ 		};
+ 		cpu1: cpu at 1 {
+-			compatible = "sifive,bullet0", "riscv";
++			compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
+ 			d-cache-block-size = <64>;
+ 			d-cache-sets = <64>;
+ 			d-cache-size = <32768>;
+@@ -63,7 +63,7 @@
+ 			};
+ 		};
+ 		cpu2: cpu at 2 {
+-			compatible = "sifive,bullet0", "riscv";
++			compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
+ 			d-cache-block-size = <64>;
+ 			d-cache-sets = <64>;
+ 			d-cache-size = <32768>;
+@@ -87,7 +87,7 @@
+ 			};
+ 		};
+ 		cpu3: cpu at 3 {
+-			compatible = "sifive,bullet0", "riscv";
++			compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
+ 			d-cache-block-size = <64>;
+ 			d-cache-sets = <64>;
+ 			d-cache-size = <32768>;
+@@ -111,7 +111,7 @@
+ 			};
+ 		};
+ 		cpu4: cpu at 4 {
+-			compatible = "sifive,bullet0", "riscv";
++			compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
+ 			d-cache-block-size = <64>;
+ 			d-cache-sets = <64>;
+ 			d-cache-size = <32768>;
diff --git a/target/linux/sifiveu/patches-6.1/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch b/target/linux/sifiveu/patches-6.1/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch
new file mode 100644
index 0000000000..07170d7c76
--- /dev/null
+++ b/target/linux/sifiveu/patches-6.1/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch
@@ -0,0 +1,26 @@
+From 14ede57943bc4209755d08daf93ac7be967d7fbe Mon Sep 17 00:00:00 2001
+From: David Abdurachmanov <david.abdurachmanov at sifive.com>
+Date: Mon, 13 Sep 2021 02:18:30 -0700
+Subject: [PATCH 4/7] riscv: sifive: unmatched: add gpio-poweroff node
+
+Add gpio-poweroff node to allow powering off the system.
+
+Signed-off-by: David Abdurachmanov <david.abdurachmanov at sifive.com>
+---
+ arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 6 ++++++
+ 1 file changed, 6 insertions(+)
+
+--- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
++++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
+@@ -86,6 +86,11 @@
+ 			};
+ 		};
+ 	};
++
++	gpio-poweroff {
++		compatible = "gpio-poweroff";
++		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
++	};
+ };
+ 
+ &uart0 {
diff --git a/target/linux/sifiveu/patches-6.1/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch b/target/linux/sifiveu/patches-6.1/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
new file mode 100644
index 0000000000..c4242c6f07
--- /dev/null
+++ b/target/linux/sifiveu/patches-6.1/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
@@ -0,0 +1,116 @@
+From d3cf2859a056273400fbdf9d389b75750ff6ca5e Mon Sep 17 00:00:00 2001
+From: David Abdurachmanov <david.abdurachmanov at sifive.com>
+Date: Fri, 14 May 2021 05:27:51 -0700
+Subject: [PATCH 6/7] riscv: sifive: unleashed: define opp table (cpufreq)
+
+Source: https://github.com/sifive/riscv-linux/commits/dev/paulw/cpufreq-dt-aloe-v5.3-rc4
+
+Signed-off-by: David Abdurachmanov <david.abdurachmanov at sifive.com>
+---
+ arch/riscv/Kconfig                                 |  8 +++++
+ arch/riscv/boot/dts/sifive/fu540-c000.dtsi         |  5 ++++
+ .../riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 34 ++++++++++++++++++++++
+ 3 files changed, 47 insertions(+)
+
+--- a/arch/riscv/Kconfig
++++ b/arch/riscv/Kconfig
+@@ -711,6 +711,14 @@ config PORTABLE
+ 	select OF
+ 	select MMU
+ 
++menu "CPU Power Management"
++
++source "drivers/cpuidle/Kconfig"
++
++source "drivers/cpufreq/Kconfig"
++
++endmenu
++
+ menu "Power management options"
+ 
+ source "kernel/power/Kconfig"
+--- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
++++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
+@@ -30,6 +30,7 @@
+ 			i-cache-size = <16384>;
+ 			reg = <0>;
+ 			riscv,isa = "rv64imac";
++			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
+ 			status = "disabled";
+ 			cpu0_intc: interrupt-controller {
+ 				#interrupt-cells = <1>;
+@@ -54,6 +55,7 @@
+ 			reg = <1>;
+ 			riscv,isa = "rv64imafdc";
+ 			tlb-split;
++			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
+ 			next-level-cache = <&l2cache>;
+ 			cpu1_intc: interrupt-controller {
+ 				#interrupt-cells = <1>;
+@@ -78,6 +80,7 @@
+ 			reg = <2>;
+ 			riscv,isa = "rv64imafdc";
+ 			tlb-split;
++			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
+ 			next-level-cache = <&l2cache>;
+ 			cpu2_intc: interrupt-controller {
+ 				#interrupt-cells = <1>;
+@@ -102,6 +105,7 @@
+ 			reg = <3>;
+ 			riscv,isa = "rv64imafdc";
+ 			tlb-split;
++			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
+ 			next-level-cache = <&l2cache>;
+ 			cpu3_intc: interrupt-controller {
+ 				#interrupt-cells = <1>;
+@@ -126,6 +130,7 @@
+ 			reg = <4>;
+ 			riscv,isa = "rv64imafdc";
+ 			tlb-split;
++			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
+ 			next-level-cache = <&l2cache>;
+ 			cpu4_intc: interrupt-controller {
+ 				#interrupt-cells = <1>;
+--- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
++++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
+@@ -80,6 +80,40 @@
+ 			label = "d4";
+ 		};
+ 	};
++
++	fu540_c000_opp_table: opp-table {
++		compatible = "operating-points-v2";
++		opp-shared;
++
++		opp-350000000 {
++			opp-hz = /bits/ 64 <350000000>;
++		};
++		opp-700000000 {
++			opp-hz = /bits/ 64 <700000000>;
++		};
++		opp-999999999 {
++			opp-hz = /bits/ 64 <999999999>;
++		};
++		opp-1400000000 {
++			opp-hz = /bits/ 64 <1400000000>;
++		};
++	};
++};
++
++&cpu0 {
++	operating-points-v2 = <&fu540_c000_opp_table>;
++};
++&cpu1 {
++	operating-points-v2 = <&fu540_c000_opp_table>;
++};
++&cpu2 {
++	operating-points-v2 = <&fu540_c000_opp_table>;
++};
++&cpu3 {
++	operating-points-v2 = <&fu540_c000_opp_table>;
++};
++&cpu4 {
++	operating-points-v2 = <&fu540_c000_opp_table>;
+ };
+ 
+ &uart0 {



From lede-commits at lists.infradead.org  Fri Apr 19 09:44:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:44:21 -0400
Subject: [openwrt/openwrt]  sunxi: move fpu feature flag into the subtargets
In-Reply-To: <171354506117.1235168.15187828086946696350@git-01.infra.openwrt.org>
References: <171354506117.1235168.15187828086946696350@git-01.infra.openwrt.org>
Message-ID: <mailman.29111.1713545065.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/01fc454a0cd0ab140ae54e0e5a4698763b11d211

commit 01fc454a0cd0ab140ae54e0e5a4698763b11d211
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sat Mar 23 18:35:58 2024 +0100

    sunxi: move fpu feature flag into the subtargets
    
    As the upcoming arm926ej-s does not have an FPU, move this flag
    into the subtargets.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/Makefile            | 2 +-
 target/linux/sunxi/cortexa53/target.mk | 1 +
 target/linux/sunxi/cortexa7/target.mk  | 1 +
 target/linux/sunxi/cortexa8/target.mk  | 1 +
 4 files changed, 4 insertions(+), 1 deletion(-)

diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
index 74caebd7b1..511c02772e 100644
--- a/target/linux/sunxi/Makefile
+++ b/target/linux/sunxi/Makefile
@@ -7,7 +7,7 @@ include $(TOPDIR)/rules.mk
 ARCH:=arm
 BOARD:=sunxi
 BOARDNAME:=Allwinner ARM SoCs
-FEATURES:=fpu usb ext4 display rootfs-part rtc squashfs
+FEATURES:=usb ext4 display rootfs-part rtc squashfs
 SUBTARGETS:=cortexa8 cortexa7 cortexa53
 
 KERNEL_PATCHVER:=6.1
diff --git a/target/linux/sunxi/cortexa53/target.mk b/target/linux/sunxi/cortexa53/target.mk
index 771e07d29f..02b31702ba 100644
--- a/target/linux/sunxi/cortexa53/target.mk
+++ b/target/linux/sunxi/cortexa53/target.mk
@@ -8,3 +8,4 @@ ARCH:=aarch64
 BOARDNAME:=Allwinner A64/H5/H6/H616
 CPU_TYPE:=cortex-a53
 KERNELNAME:=Image dtbs
+FEATURES+=fpu
\ No newline at end of file
diff --git a/target/linux/sunxi/cortexa7/target.mk b/target/linux/sunxi/cortexa7/target.mk
index 95315fd4a4..52a89e9105 100644
--- a/target/linux/sunxi/cortexa7/target.mk
+++ b/target/linux/sunxi/cortexa7/target.mk
@@ -7,3 +7,4 @@ include $(TOPDIR)/rules.mk
 BOARDNAME:=Allwinner A20/A3x/H3/R40
 CPU_TYPE:=cortex-a7
 CPU_SUBTYPE:=neon-vfpv4
+FEATURES+=fpu
diff --git a/target/linux/sunxi/cortexa8/target.mk b/target/linux/sunxi/cortexa8/target.mk
index cf30ca7877..7f34cc8ea5 100644
--- a/target/linux/sunxi/cortexa8/target.mk
+++ b/target/linux/sunxi/cortexa8/target.mk
@@ -7,3 +7,4 @@ include $(TOPDIR)/rules.mk
 BOARDNAME:=Allwinner A1x
 CPU_TYPE:=cortex-a8
 CPU_SUBTYPE:=vfpv3
+FEATURES+=fpu



From lede-commits at lists.infradead.org  Fri Apr 19 09:44:22 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 12:44:22 -0400
Subject: [openwrt/openwrt]  sunxi: move KERNEL_LOADADDR into subtargets
In-Reply-To: <171354506117.1235168.15187828086946696350@git-01.infra.openwrt.org>
References: <171354506117.1235168.15187828086946696350@git-01.infra.openwrt.org>
Message-ID: <mailman.29112.1713545065.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/30149ba1ae5cdb503c7a1024ba3ba56d77797f1c

commit 30149ba1ae5cdb503c7a1024ba3ba56d77797f1c
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Sat Mar 23 23:58:36 2024 +0100

    sunxi: move KERNEL_LOADADDR into subtargets
    
    As preparation for the arm926ej-s support which has a different
    load address, move the KERNEL_LOADADDR into the subtargets.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/image/Makefile     | 1 -
 target/linux/sunxi/image/cortexa53.mk | 2 ++
 target/linux/sunxi/image/cortexa7.mk  | 2 ++
 target/linux/sunxi/image/cortexa8.mk  | 2 ++
 4 files changed, 6 insertions(+), 1 deletion(-)

diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index 738585accc..cc1c1ba42d 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -10,7 +10,6 @@ FAT32_BLOCK_SIZE=1024
 FAT32_BLOCKS=$(shell echo $$(($(CONFIG_SUNXI_SD_BOOT_PARTSIZE)*1024*1024/$(FAT32_BLOCK_SIZE))))
 
 DEVICE_VARS := SUNXI_DTS SUNXI_DTS_DIR
-KERNEL_LOADADDR:=0x40008000
 
 define Build/sunxi-sdcard
 	rm -f $@.boot
diff --git a/target/linux/sunxi/image/cortexa53.mk b/target/linux/sunxi/image/cortexa53.mk
index 63ada59f85..06b409deb7 100644
--- a/target/linux/sunxi/image/cortexa53.mk
+++ b/target/linux/sunxi/image/cortexa53.mk
@@ -3,6 +3,8 @@
 # Copyright (C) 2013-2016 OpenWrt.org
 # Copyright (C) 2016 Yousong Zhou
 
+KERNEL_LOADADDR:=0x40008000
+
 define Device/sun50i
   SUNXI_DTS_DIR := allwinner/
   KERNEL_NAME := Image
diff --git a/target/linux/sunxi/image/cortexa7.mk b/target/linux/sunxi/image/cortexa7.mk
index 3191cec4fd..a85b20531d 100644
--- a/target/linux/sunxi/image/cortexa7.mk
+++ b/target/linux/sunxi/image/cortexa7.mk
@@ -3,6 +3,8 @@
 # Copyright (C) 2013-2019 OpenWrt.org
 # Copyright (C) 2016 Yousong Zhou
 
+KERNEL_LOADADDR:=0x40008000
+
 define Device/cubietech_cubieboard2
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard2
diff --git a/target/linux/sunxi/image/cortexa8.mk b/target/linux/sunxi/image/cortexa8.mk
index dd8a16763b..e27db1ee16 100644
--- a/target/linux/sunxi/image/cortexa8.mk
+++ b/target/linux/sunxi/image/cortexa8.mk
@@ -3,6 +3,8 @@
 # Copyright (C) 2013-2016 OpenWrt.org
 # Copyright (C) 2016 Yousong Zhou
 
+KERNEL_LOADADDR:=0x40008000
+
 define Device/cubietech_a10-cubieboard
   DEVICE_VENDOR := Cubietech
   DEVICE_MODEL := Cubieboard



From lede-commits at lists.infradead.org  Fri Apr 19 11:06:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 19 Apr 2024 14:06:51 -0400
Subject: [openwrt/openwrt]  uclient: update to Git HEAD (2024-04-19)
In-Reply-To: <171355001130.2861555.4405502251782514004@git-01.infra.openwrt.org>
References: <171355001130.2861555.4405502251782514004@git-01.infra.openwrt.org>
Message-ID: <mailman.29129.1713550016.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ea609fe486a99af6540dcc7a18f0827481d0c4b0

commit ea609fe486a99af6540dcc7a18f0827481d0c4b0
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Apr 19 20:05:26 2024 +0200

    uclient: update to Git HEAD (2024-04-19)
    
    e8780fa7792a uclient: fix http regression
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/libs/uclient/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/libs/uclient/Makefile b/package/libs/uclient/Makefile
index e8588b9e01..2b93ba985c 100644
--- a/package/libs/uclient/Makefile
+++ b/package/libs/uclient/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uclient.git
-PKG_MIRROR_HASH:=ab3d57dd9701acfa0f3e6b1555c0f572b963d9b16a945ce2f62ebea121de9de6
+PKG_MIRROR_HASH:=0a0ea0752d534db87f2a13342d1b1b33fb94e43b934bdd015f96f19c635aa08c
 PKG_SOURCE_DATE:=2024-04-19
-PKG_SOURCE_VERSION:=704c78111a92873474eca3c91ad91c555b03f607
+PKG_SOURCE_VERSION:=e8780fa7792aaa2d68af21c0df91cd9c05e1f73a
 CMAKE_INSTALL:=1
 
 PKG_BUILD_DEPENDS:=ustream-ssl



From lede-commits at lists.infradead.org  Sun Apr 21 08:29:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 11:29:35 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.10 to 5.10.215
In-Reply-To: <171371337570.733456.892578625768928149@git-01.infra.openwrt.org>
References: <171371337570.733456.892578625768928149@git-01.infra.openwrt.org>
Message-ID: <mailman.29257.1713713385.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/bc7585b93c8c36e7a55310026db027beefa07205

commit bc7585b93c8c36e7a55310026db027beefa07205
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Apr 13 18:57:59 2024 +0200

    kernel: bump 5.10 to 5.10.215
    
    Manually adapted the following patch:
       octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 include/kernel-5.10                                      |  4 ++--
 .../950-0028-mm-Remove-the-PFN-busy-warning.patch        |  2 +-
 .../patches-5.10/950-0040-Add-dwc_otg-driver.patch       |  2 +-
 .../950-0046-MMC-added-alternative-MMC-driver.patch      |  6 +++---
 ...0-0088-sc16is7xx-Don-t-spin-if-no-data-received.patch |  2 +-
 ...ging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch |  2 +-
 ...ging-mmal-vchiq-Add-support-for-event-callbacks.patch | 16 ++++++++--------
 ...ng-mmal-vchiq-Free-the-event-context-for-contro.patch |  2 +-
 ...taging-mmal-vchiq-Fix-memory-leak-in-error-path.patch |  8 ++++----
 ...50-0246-sc16is7xx-Fix-for-hardware-flow-control.patch |  6 +++---
 ...ng-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch |  6 +++---
 ...f-net-pass-the-dst-buffer-to-of_get_mac_address.patch |  2 +-
 ...st-bridges-declar-their-reliance-on-msi-domains.patch |  4 ++--
 .../hack-5.10/780-usb-net-MeigLink_modem_support.patch   |  2 +-
 ...x-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch |  2 +-
 .../610-netfilter_match_bypass_default_checks.patch      |  2 +-
 .../pending-5.10/810-pci_disable_common_quirks.patch     |  8 ++++----
 .../patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch  |  2 +-
 .../mediatek/patches-5.10/410-bt-mtk-serial-fix.patch    |  2 +-
 ...dd-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch | 10 +++++-----
 ...ckchip-add-usb3-controller-node-for-RK3328-SoCs.patch |  2 +-
 target/linux/x86/config-5.10                             |  1 +
 22 files changed, 47 insertions(+), 46 deletions(-)

diff --git a/include/kernel-5.10 b/include/kernel-5.10
index a6abd1e14e..648a3c408a 100644
--- a/include/kernel-5.10
+++ b/include/kernel-5.10
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.10 = .214
-LINUX_KERNEL_HASH-5.10.214 = 40f014d53e81f204f6d2a364aae4201ae07970dd1b70dc602d7c66c1a140f558
+LINUX_VERSION-5.10 = .215
+LINUX_KERNEL_HASH-5.10.215 = 879ca159c34ea9d3a6775f292cc59c2d3931d57dca00f0bebe2675ea0c82c6a9
diff --git a/target/linux/bcm27xx/patches-5.10/950-0028-mm-Remove-the-PFN-busy-warning.patch b/target/linux/bcm27xx/patches-5.10/950-0028-mm-Remove-the-PFN-busy-warning.patch
index cd7b0767d3..678cb1fe7e 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0028-mm-Remove-the-PFN-busy-warning.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0028-mm-Remove-the-PFN-busy-warning.patch
@@ -14,7 +14,7 @@ Signed-off-by: Eric Anholt <eric at anholt.net>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -8671,8 +8671,6 @@ int alloc_contig_range(unsigned long sta
+@@ -8673,8 +8673,6 @@ int alloc_contig_range(unsigned long sta
  
  	/* Make sure the range is really isolated. */
  	if (test_pages_isolated(outer_start, end, 0)) {
diff --git a/target/linux/bcm27xx/patches-5.10/950-0040-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.10/950-0040-Add-dwc_otg-driver.patch
index f206556df2..b4d848d727 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0040-Add-dwc_otg-driver.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0040-Add-dwc_otg-driver.patch
@@ -1123,7 +1123,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5671,7 +5671,7 @@ static void port_event(struct usb_hub *h
+@@ -5680,7 +5680,7 @@ static void port_event(struct usb_hub *h
  		port_dev->over_current_count++;
  		port_over_current_notify(port_dev);
  
diff --git a/target/linux/bcm27xx/patches-5.10/950-0046-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.10/950-0046-MMC-added-alternative-MMC-driver.patch
index 0e134a6f39..9495c7f6da 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0046-MMC-added-alternative-MMC-driver.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0046-MMC-added-alternative-MMC-driver.patch
@@ -221,7 +221,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  static inline int mmc_blk_part_switch(struct mmc_card *card,
  				      unsigned int part_type);
  static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
-@@ -2951,6 +2958,7 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2953,6 +2960,7 @@ static int mmc_blk_probe(struct mmc_card
  {
  	struct mmc_blk_data *md, *part_md;
  	char cap_str[10];
@@ -229,7 +229,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  
  	/*
  	 * Check that the card supports the command class(es) we need.
-@@ -2958,7 +2966,16 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2960,7 +2968,16 @@ static int mmc_blk_probe(struct mmc_card
  	if (!(card->csd.cmdclass & CCC_BLOCK_READ))
  		return -ENODEV;
  
@@ -247,7 +247,7 @@ Signed-off-by: Yaroslav Rosomakho <yaroslavros at gmail.com>
  
  	card->complete_wq = alloc_workqueue("mmc_complete",
  					WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
-@@ -2973,9 +2990,14 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2975,9 +2992,14 @@ static int mmc_blk_probe(struct mmc_card
  
  	string_get_size((u64)get_capacity(md->disk), 512, STRING_UNITS_2,
  			cap_str, sizeof(cap_str));
diff --git a/target/linux/bcm27xx/patches-5.10/950-0088-sc16is7xx-Don-t-spin-if-no-data-received.patch b/target/linux/bcm27xx/patches-5.10/950-0088-sc16is7xx-Don-t-spin-if-no-data-received.patch
index 46a904988a..23a320a6aa 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0088-sc16is7xx-Don-t-spin-if-no-data-received.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0088-sc16is7xx-Don-t-spin-if-no-data-received.patch
@@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/drivers/tty/serial/sc16is7xx.c
 +++ b/drivers/tty/serial/sc16is7xx.c
-@@ -709,6 +709,8 @@ static bool sc16is7xx_port_irq(struct sc
+@@ -710,6 +710,8 @@ static bool sc16is7xx_port_irq(struct sc
  
  			if (rxlen)
  				sc16is7xx_handle_rx(port, rxlen, iir);
diff --git a/target/linux/bcm27xx/patches-5.10/950-0112-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch b/target/linux/bcm27xx/patches-5.10/950-0112-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
index 4b820ee58b..1c96d716ae 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0112-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0112-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
@@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1775,7 +1775,7 @@ int vchiq_mmal_component_enable(struct v
+@@ -1776,7 +1776,7 @@ int vchiq_mmal_component_enable(struct v
  
  	ret = enable_component(instance, component);
  	if (ret == 0)
diff --git a/target/linux/bcm27xx/patches-5.10/950-0113-staging-mmal-vchiq-Add-support-for-event-callbacks.patch b/target/linux/bcm27xx/patches-5.10/950-0113-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
index 048ba65cbf..e6eec1a4d6 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0113-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0113-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
@@ -234,7 +234,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  /* deals with receipt of buffer to host message */
  static void buffer_to_host_cb(struct vchiq_mmal_instance *instance,
  			      struct mmal_msg *msg, u32 msg_len)
-@@ -1332,6 +1425,7 @@ static int port_disable(struct vchiq_mma
+@@ -1333,6 +1426,7 @@ static int port_disable(struct vchiq_mma
  				mmalbuf->mmal_flags = 0;
  				mmalbuf->dts = MMAL_TIME_UNKNOWN;
  				mmalbuf->pts = MMAL_TIME_UNKNOWN;
@@ -242,7 +242,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  				port->buffer_cb(instance,
  						port, 0, mmalbuf);
  			}
-@@ -1633,6 +1727,43 @@ int mmal_vchi_buffer_cleanup(struct mmal
+@@ -1634,6 +1728,43 @@ int mmal_vchi_buffer_cleanup(struct mmal
  }
  EXPORT_SYMBOL_GPL(mmal_vchi_buffer_cleanup);
  
@@ -286,7 +286,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  /* Initialise a mmal component and its ports
   *
   */
-@@ -1682,6 +1813,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1683,6 +1814,7 @@ int vchiq_mmal_component_init(struct vch
  	ret = port_info_get(instance, &component->control);
  	if (ret < 0)
  		goto release_component;
@@ -294,7 +294,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	for (idx = 0; idx < component->inputs; idx++) {
  		component->input[idx].type = MMAL_PORT_TYPE_INPUT;
-@@ -1692,6 +1824,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1693,6 +1825,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->input[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -302,7 +302,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	for (idx = 0; idx < component->outputs; idx++) {
-@@ -1703,6 +1836,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1704,6 +1837,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->output[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -310,7 +310,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	for (idx = 0; idx < component->clocks; idx++) {
-@@ -1714,6 +1848,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1715,6 +1849,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->clock[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -318,7 +318,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	*component_out = component;
-@@ -1739,7 +1874,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
+@@ -1740,7 +1875,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
  int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
  				  struct vchiq_mmal_component *component)
  {
@@ -327,7 +327,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	if (mutex_lock_interruptible(&instance->vchiq_mutex))
  		return -EINTR;
-@@ -1751,6 +1886,13 @@ int vchiq_mmal_component_finalise(struct
+@@ -1752,6 +1887,13 @@ int vchiq_mmal_component_finalise(struct
  
  	component->in_use = 0;
  
diff --git a/target/linux/bcm27xx/patches-5.10/950-0121-staging-mmal-vchiq-Free-the-event-context-for-contro.patch b/target/linux/bcm27xx/patches-5.10/950-0121-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
index 94743b025b..a6c7e6e351 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0121-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0121-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
@@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1901,6 +1901,8 @@ int vchiq_mmal_component_finalise(struct
+@@ -1902,6 +1902,8 @@ int vchiq_mmal_component_finalise(struct
  	for (idx = 0; idx < component->clocks; idx++)
  		free_event_context(&component->clock[idx]);
  
diff --git a/target/linux/bcm27xx/patches-5.10/950-0122-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch b/target/linux/bcm27xx/patches-5.10/950-0122-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
index e42228e52f..9f1abc679a 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0122-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0122-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
@@ -14,7 +14,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1767,9 +1767,26 @@ static void free_event_context(struct vc
+@@ -1768,9 +1768,26 @@ static void free_event_context(struct vc
  {
  	struct mmal_msg_context *ctx = port->event_context;
  
@@ -41,7 +41,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  }
  
  /* Initialise a mmal component and its ports
-@@ -1867,6 +1884,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1868,6 +1885,7 @@ int vchiq_mmal_component_init(struct vch
  
  release_component:
  	destroy_component(instance, component);
@@ -49,7 +49,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  unlock:
  	if (component)
  		component->in_use = 0;
-@@ -1882,7 +1900,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
+@@ -1883,7 +1901,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
  int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
  				  struct vchiq_mmal_component *component)
  {
@@ -58,7 +58,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	if (mutex_lock_interruptible(&instance->vchiq_mutex))
  		return -EINTR;
-@@ -1894,14 +1912,7 @@ int vchiq_mmal_component_finalise(struct
+@@ -1895,14 +1913,7 @@ int vchiq_mmal_component_finalise(struct
  
  	component->in_use = 0;
  
diff --git a/target/linux/bcm27xx/patches-5.10/950-0246-sc16is7xx-Fix-for-hardware-flow-control.patch b/target/linux/bcm27xx/patches-5.10/950-0246-sc16is7xx-Fix-for-hardware-flow-control.patch
index 16d831493f..488672dd56 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0246-sc16is7xx-Fix-for-hardware-flow-control.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0246-sc16is7xx-Fix-for-hardware-flow-control.patch
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/tty/serial/sc16is7xx.c
 +++ b/drivers/tty/serial/sc16is7xx.c
-@@ -524,8 +524,9 @@ static int sc16is7xx_set_baud(struct uar
+@@ -525,8 +525,9 @@ static int sc16is7xx_set_baud(struct uar
  
  	/* Enable enhanced features */
  	regcache_cache_bypass(s->regmap, true);
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	regcache_cache_bypass(s->regmap, false);
  
  	/* Put LCR back to the normal mode */
-@@ -855,7 +856,7 @@ static unsigned int sc16is7xx_get_mctrl(
+@@ -856,7 +857,7 @@ static unsigned int sc16is7xx_get_mctrl(
  	/* DCD and DSR are not wired and CTS/RTS is handled automatically
  	 * so just indicate DSR and CAR asserted
  	 */
@@ -47,7 +47,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  }
  
  static void sc16is7xx_set_mctrl(struct uart_port *port, unsigned int mctrl)
-@@ -942,14 +943,19 @@ static void sc16is7xx_set_termios(struct
+@@ -943,14 +944,19 @@ static void sc16is7xx_set_termios(struct
  	regcache_cache_bypass(s->regmap, true);
  	sc16is7xx_port_write(port, SC16IS7XX_XON1_REG, termios->c_cc[VSTART]);
  	sc16is7xx_port_write(port, SC16IS7XX_XOFF1_REG, termios->c_cc[VSTOP]);
diff --git a/target/linux/bcm27xx/patches-5.10/950-0341-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch b/target/linux/bcm27xx/patches-5.10/950-0341-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
index 87bd5e371a..927f5cb877 100644
--- a/target/linux/bcm27xx/patches-5.10/950-0341-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
+++ b/target/linux/bcm27xx/patches-5.10/950-0341-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
@@ -91,7 +91,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	} else if (msg->u.buffer_from_host.buffer_header.length == 0) {
  		/* empty buffer */
  		if (msg->u.buffer_from_host.buffer_header.flags &
-@@ -1530,6 +1553,9 @@ int vchiq_mmal_port_parameter_set(struct
+@@ -1531,6 +1554,9 @@ int vchiq_mmal_port_parameter_set(struct
  
  	mutex_unlock(&instance->vchiq_mutex);
  
@@ -101,7 +101,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	return ret;
  }
  EXPORT_SYMBOL_GPL(vchiq_mmal_port_parameter_set);
-@@ -1698,6 +1724,31 @@ int vchiq_mmal_submit_buffer(struct vchi
+@@ -1699,6 +1725,31 @@ int vchiq_mmal_submit_buffer(struct vchi
  	unsigned long flags = 0;
  	int ret;
  
@@ -133,7 +133,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	ret = buffer_from_host(instance, port, buffer);
  	if (ret == -EINVAL) {
  		/* Port is disabled. Queue for when it is enabled. */
-@@ -1731,6 +1782,16 @@ int mmal_vchi_buffer_cleanup(struct mmal
+@@ -1732,6 +1783,16 @@ int mmal_vchi_buffer_cleanup(struct mmal
  		release_msg_context(msg_context);
  	buf->msg_context = NULL;
  
diff --git a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
index c94224cbdb..225be1255b 100644
--- a/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
+++ b/target/linux/generic/backport-5.10/732-net-next-1-of-net-pass-the-dst-buffer-to-of_get_mac_address.patch
@@ -1036,7 +1036,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		u32 mahr = ravb_read(ndev, MAHR);
  		u32 malr = ravb_read(ndev, MALR);
  
-@@ -2202,7 +2204,7 @@ static int ravb_probe(struct platform_de
+@@ -2205,7 +2207,7 @@ static int ravb_probe(struct platform_de
  	priv->msg_enable = RAVB_DEF_MSG_ENABLE;
  
  	/* Read and set MAC address */
diff --git a/target/linux/generic/backport-5.10/821-v5.13-let-pci-host-bridges-declar-their-reliance-on-msi-domains.patch b/target/linux/generic/backport-5.10/821-v5.13-let-pci-host-bridges-declar-their-reliance-on-msi-domains.patch
index ee1acf4b9c..9c3183c298 100644
--- a/target/linux/generic/backport-5.10/821-v5.13-let-pci-host-bridges-declar-their-reliance-on-msi-domains.patch
+++ b/target/linux/generic/backport-5.10/821-v5.13-let-pci-host-bridges-declar-their-reliance-on-msi-domains.patch
@@ -23,7 +23,7 @@ Acked-by: Bjorn Helgaas <bhelgaas at google.com>
 
 --- a/drivers/pci/probe.c
 +++ b/drivers/pci/probe.c
-@@ -925,6 +925,8 @@ static int pci_register_host_bridge(stru
+@@ -926,6 +926,8 @@ static int pci_register_host_bridge(stru
  	device_enable_async_suspend(bus->bridge);
  	pci_set_bus_of_node(bus);
  	pci_set_bus_msi_domain(bus);
@@ -34,7 +34,7 @@ Acked-by: Bjorn Helgaas <bhelgaas at google.com>
  		set_dev_node(bus->bridge, pcibus_to_node(bus));
 --- a/include/linux/pci.h
 +++ b/include/linux/pci.h
-@@ -548,6 +548,7 @@ struct pci_host_bridge {
+@@ -554,6 +554,7 @@ struct pci_host_bridge {
  	unsigned int	native_dpc:1;		/* OS may use PCIe DPC */
  	unsigned int	preserve_config:1;	/* Preserve FW resource setup */
  	unsigned int	size_windows:1;		/* Enable root bus sizing */
diff --git a/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch
index 784802786d..a1e207187d 100644
--- a/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-5.10/780-usb-net-MeigLink_modem_support.patch
@@ -19,7 +19,7 @@
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1188,6 +1190,11 @@ static const struct usb_device_id option
+@@ -1193,6 +1195,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/pending-5.10/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-5.10/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
index 94b7d7f75b..6a46b4c9a7 100644
--- a/target/linux/generic/pending-5.10/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
+++ b/target/linux/generic/pending-5.10/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO at vplace.de>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -7123,7 +7123,7 @@ static void __ref alloc_node_mem_map(str
+@@ -7125,7 +7125,7 @@ static void __ref alloc_node_mem_map(str
  	if (pgdat == NODE_DATA(0)) {
  		mem_map = NODE_DATA(0)->node_mem_map;
  		if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
diff --git a/target/linux/generic/pending-5.10/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-5.10/610-netfilter_match_bypass_default_checks.patch
index c1e050e935..b17196d3a9 100644
--- a/target/linux/generic/pending-5.10/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-5.10/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1222,12 +1259,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1224,12 +1261,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-5.10/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-5.10/810-pci_disable_common_quirks.patch
index 2a70e4cbac..195968eeef 100644
--- a/target/linux/generic/pending-5.10/810-pci_disable_common_quirks.patch
+++ b/target/linux/generic/pending-5.10/810-pci_disable_common_quirks.patch
@@ -25,7 +25,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -206,6 +206,7 @@ static void quirk_mmio_always_on(struct
+@@ -207,6 +207,7 @@ static void quirk_mmio_always_on(struct
  DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
  				PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
  
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * The Mellanox Tavor device gives false positive parity errors.  Mark this
   * device with a broken_parity_status to allow PCI scanning code to "skip"
-@@ -3340,6 +3341,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3341,6 +3342,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
  
@@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum.
   * To work around this, query the size it should be configured to by the
-@@ -3365,6 +3368,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3366,6 +3369,8 @@ static void quirk_intel_ntb(struct pci_d
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb);
  
@@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * Some BIOS implementations leave the Intel GPU interrupts enabled, even
   * though no one is handling them (e.g., if the i915 driver is never
-@@ -3403,6 +3408,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3404,6 +3409,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
  
diff --git a/target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch
index ba07ddb165..f453023f13 100644
--- a/target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-5.10/0001-MIPS-lantiq-add-pcie-driver.patch
@@ -5481,7 +5481,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	  (transaction layer end-to-end CRC checking).
 --- a/include/linux/pci.h
 +++ b/include/linux/pci.h
-@@ -1421,6 +1421,8 @@ void pci_walk_bus(struct pci_bus *top, i
+@@ -1427,6 +1427,8 @@ void pci_walk_bus(struct pci_bus *top, i
  		  void *userdata);
  int pci_cfg_space_size(struct pci_dev *dev);
  unsigned char pci_bus_max_busnr(struct pci_bus *bus);
diff --git a/target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch
index d7bf73d477..de98540edd 100644
--- a/target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch
+++ b/target/linux/mediatek/patches-5.10/410-bt-mtk-serial-fix.patch
@@ -19,7 +19,7 @@
  	},
  	[PORT_NPCM] = {
  		.name		= "Nuvoton 16550",
-@@ -2723,6 +2723,11 @@ serial8250_do_set_termios(struct uart_po
+@@ -2717,6 +2717,11 @@ serial8250_do_set_termios(struct uart_po
  	unsigned long flags;
  	unsigned int baud, quot, frac = 0;
  
diff --git a/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
index 3fffb38246..0bcf8f3832 100644
--- a/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
+++ b/target/linux/octeontx/patches-5.10/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
@@ -14,7 +14,7 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -25,6 +25,7 @@
+@@ -26,6 +26,7 @@
  #include <linux/ktime.h>
  #include <linux/mm.h>
  #include <linux/nvme.h>
@@ -22,10 +22,10 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
  #include <linux/platform_data/x86/apple.h>
  #include <linux/pm_runtime.h>
  #include <linux/suspend.h>
-@@ -5859,3 +5860,34 @@ static void nvidia_ion_ahci_fixup(struct
- 	pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING;
- }
- DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);
+@@ -5959,3 +5960,34 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa73f, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa76e, dpc_log_size);
+ #endif
 +
 +#ifdef CONFIG_PCI_HOST_THUNDER_PEM
 +/*
diff --git a/target/linux/rockchip/patches-5.10/101-dts-rockchip-add-usb3-controller-node-for-RK3328-SoCs.patch b/target/linux/rockchip/patches-5.10/101-dts-rockchip-add-usb3-controller-node-for-RK3328-SoCs.patch
index 2dd6e40ebf..db7875fa63 100644
--- a/target/linux/rockchip/patches-5.10/101-dts-rockchip-add-usb3-controller-node-for-RK3328-SoCs.patch
+++ b/target/linux/rockchip/patches-5.10/101-dts-rockchip-add-usb3-controller-node-for-RK3328-SoCs.patch
@@ -26,7 +26,7 @@ use-case. You've been warned.
 
 --- a/arch/arm64/boot/dts/rockchip/rk3328.dtsi
 +++ b/arch/arm64/boot/dts/rockchip/rk3328.dtsi
-@@ -985,22 +985,30 @@
+@@ -994,22 +994,30 @@
  	};
  
  	usbdrd3: usb at ff600000 {
diff --git a/target/linux/x86/config-5.10 b/target/linux/x86/config-5.10
index b75e2859eb..7feb60e882 100644
--- a/target/linux/x86/config-5.10
+++ b/target/linux/x86/config-5.10
@@ -222,6 +222,7 @@ CONFIG_MICROCODE_AMD=y
 CONFIG_MICROCODE_INTEL=y
 CONFIG_MICROCODE_LATE_LOADING=y
 CONFIG_MIGRATION=y
+CONFIG_MITIGATION_RFDS=y
 # CONFIG_MK6 is not set
 # CONFIG_MK7 is not set
 # CONFIG_MK8 is not set



From lede-commits at lists.infradead.org  Sun Apr 21 08:31:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 11:31:46 -0400
Subject: [openwrt/openwrt]  mac80211: Update to 5.15.153-1
In-Reply-To: <171371350604.736603.1383597557936393827@git-01.infra.openwrt.org>
References: <171371350604.736603.1383597557936393827@git-01.infra.openwrt.org>
Message-ID: <mailman.29258.1713713517.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/06ea5865088b73846d9545f75100d035c2bc7ce7

commit 06ea5865088b73846d9545f75100d035c2bc7ce7
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Wed Apr 3 01:39:35 2024 +0200

    mac80211: Update to 5.15.153-1
    
    Update mac80211 to version based on kernel 5.15.153.
    This contains multiple bugfixes.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/kernel/mac80211/Makefile                         |  6 +++---
 ...d-GPIO-controlling-support-for-various-chipsets.patch |  2 +-
 .../patches/brcm/810-b43-gpio-mask-module-option.patch   |  2 +-
 .../patches/brcm/812-b43-add-antenna-control.patch       | 14 +++++++-------
 .../patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch |  2 +-
 .../mac80211/patches/build/060-no_local_ssb_bcma.patch   |  4 ++--
 .../rt2x00/002-rt2x00-add-throughput-LED-trigger.patch   |  4 ++--
 .../rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch       |  4 ++--
 ...x00-allow_disabling_bands_through_platform_data.patch |  2 +-
 .../rt2x00/607-rt2x00-add_platform_data_mac_addr.patch   |  2 +-
 .../608-rt2x00-allow_disabling_bands_through_dts.patch   |  2 +-
 .../patches/rt2x00/611-rt2x00-add-AP+STA-support.patch   |  2 +-
 ...211-use-coarse-boottime-for-airtime-fairness-co.patch | 10 +++++-----
 .../312-mac80211-split-beacon-retrieval-functions.patch  | 10 +++++-----
 .../313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch  | 16 ++++++++--------
 ...211-implement-APIs-for-dedicated-radar-detectio.patch |  4 ++--
 ...211-allow-continuous-radar-monitoring-on-offcha.patch |  6 +++---
 ...211-rename-offchannel_chain-structs-to-backgrou.patch |  2 +-
 .../324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch |  8 ++++----
 ...211-switch-airtime-fairness-back-to-deficit-rou.patch | 10 +++++-----
 ...211-make-sta-airtime-deficit-field-s32-instead-.patch |  2 +-
 ...211-consider-aql_tx_pending-when-checking-airti.patch |  6 +++---
 ...211-keep-recently-active-tx-queues-in-schedulin.patch | 10 +++++-----
 ...211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch | 12 ++++++------
 ...211-only-accumulate-airtime-deficit-for-active-.patch |  4 ++--
 ...mac80211-increase-quantum-for-airtime-scheduler.patch |  6 +++---
 ...211-exclude-multicast-packets-from-AQL-pending-.patch |  4 ++--
 .../348-wifi-mac80211-flush-queues-on-STA-removal.patch  |  2 +-
 .../subsys/350-wifi-mac80211-add-flush_sta-method.patch  |  2 +-
 29 files changed, 80 insertions(+), 80 deletions(-)

diff --git a/package/kernel/mac80211/Makefile b/package/kernel/mac80211/Makefile
index a562178a99..0bcbd8d294 100644
--- a/package/kernel/mac80211/Makefile
+++ b/package/kernel/mac80211/Makefile
@@ -10,10 +10,10 @@ include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=mac80211
 
-PKG_VERSION:=5.15.148-1
+PKG_VERSION:=5.15.153-1
 PKG_RELEASE:=1
-PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.148
-PKG_HASH:=3ec31964844cbb8f7c7af4da8ae765446572934a334926102ed2f3baebb87c06
+PKG_SOURCE_URL:=@KERNEL/linux/kernel/projects/backports/stable/v5.15.153
+PKG_HASH:=eaa24df968c79385c57707068a209fb1ea43271b573f24885805ae96a58ee3a8
 
 PKG_SOURCE:=backports-$(PKG_VERSION).tar.xz
 PKG_BUILD_DIR:=$(KERNEL_BUILD_DIR)/backports-$(PKG_VERSION)
diff --git a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
index 35927e7850..603b309d97 100644
--- a/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
+++ b/package/kernel/mac80211/patches/ath10k/974-ath10k_add-LED-and-GPIO-controlling-support-for-various-chipsets.patch
@@ -456,7 +456,7 @@ v13:
  {
 --- a/drivers/net/wireless/ath/ath10k/wmi-tlv.c
 +++ b/drivers/net/wireless/ath/ath10k/wmi-tlv.c
-@@ -4594,6 +4594,8 @@ static const struct wmi_ops wmi_tlv_ops
+@@ -4598,6 +4598,8 @@ static const struct wmi_ops wmi_tlv_ops
  	.gen_echo = ath10k_wmi_tlv_op_gen_echo,
  	.gen_vdev_spectral_conf = ath10k_wmi_tlv_op_gen_vdev_spectral_conf,
  	.gen_vdev_spectral_enable = ath10k_wmi_tlv_op_gen_vdev_spectral_enable,
diff --git a/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch b/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch
index 09ef50526f..295a4cca73 100644
--- a/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch
+++ b/package/kernel/mac80211/patches/brcm/810-b43-gpio-mask-module-option.patch
@@ -22,7 +22,7 @@
  static int modparam_bad_frames_preempt;
  module_param_named(bad_frames_preempt, modparam_bad_frames_preempt, int, 0444);
  MODULE_PARM_DESC(bad_frames_preempt,
-@@ -2869,10 +2874,10 @@ static int b43_gpio_init(struct b43_wlde
+@@ -2870,10 +2875,10 @@ static int b43_gpio_init(struct b43_wlde
  	u32 mask, set;
  
  	b43_maskset32(dev, B43_MMIO_MACCTL, ~B43_MACCTL_GPOUTSMSK, 0);
diff --git a/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch b/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch
index 5dc04ecc88..547b1f9c6c 100644
--- a/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch
+++ b/package/kernel/mac80211/patches/brcm/812-b43-add-antenna-control.patch
@@ -9,7 +9,7 @@
  	antenna = b43_antenna_to_phyctl(antenna);
  	ctl = b43_shm_read16(dev, B43_SHM_SHARED, B43_SHM_SH_BEACPHYCTL);
  	/* We can't send beacons with short preamble. Would get PHY errors. */
-@@ -3284,8 +3284,8 @@ static int b43_chip_init(struct b43_wlde
+@@ -3285,8 +3285,8 @@ static int b43_chip_init(struct b43_wlde
  
  	/* Select the antennae */
  	if (phy->ops->set_rx_antenna)
@@ -20,7 +20,7 @@
  
  	if (phy->type == B43_PHYTYPE_B) {
  		value16 = b43_read16(dev, 0x005E);
-@@ -3985,7 +3985,6 @@ static int b43_op_config(struct ieee8021
+@@ -3987,7 +3987,6 @@ static int b43_op_config(struct ieee8021
  	struct b43_wldev *dev = wl->current_dev;
  	struct b43_phy *phy = &dev->phy;
  	struct ieee80211_conf *conf = &hw->conf;
@@ -28,7 +28,7 @@
  	int err = 0;
  
  	mutex_lock(&wl->mutex);
-@@ -4028,11 +4027,9 @@ static int b43_op_config(struct ieee8021
+@@ -4030,11 +4029,9 @@ static int b43_op_config(struct ieee8021
  	}
  
  	/* Antennas for RX and management frame TX. */
@@ -42,7 +42,7 @@
  
  	if (wl->radio_enabled != phy->radio_on) {
  		if (wl->radio_enabled) {
-@@ -5175,6 +5172,47 @@ static int b43_op_get_survey(struct ieee
+@@ -5177,6 +5174,47 @@ static int b43_op_get_survey(struct ieee
  	return 0;
  }
  
@@ -90,7 +90,7 @@
  static const struct ieee80211_ops b43_hw_ops = {
  	.tx			= b43_op_tx,
  	.conf_tx		= b43_op_conf_tx,
-@@ -5196,6 +5234,8 @@ static const struct ieee80211_ops b43_hw
+@@ -5198,6 +5236,8 @@ static const struct ieee80211_ops b43_hw
  	.sw_scan_complete	= b43_op_sw_scan_complete_notifier,
  	.get_survey		= b43_op_get_survey,
  	.rfkill_poll		= b43_rfkill_poll,
@@ -99,7 +99,7 @@
  };
  
  /* Hard-reset the chip. Do not call this directly.
-@@ -5497,6 +5537,8 @@ static int b43_one_core_attach(struct b4
+@@ -5499,6 +5539,8 @@ static int b43_one_core_attach(struct b4
  	if (!wldev)
  		goto out;
  
@@ -108,7 +108,7 @@
  	wldev->use_pio = b43_modparam_pio;
  	wldev->dev = dev;
  	wldev->wl = wl;
-@@ -5588,6 +5630,9 @@ static struct b43_wl *b43_wireless_init(
+@@ -5590,6 +5632,9 @@ static struct b43_wl *b43_wireless_init(
  
  	wiphy_ext_feature_set(hw->wiphy, NL80211_EXT_FEATURE_CQM_RSSI_LIST);
  
diff --git a/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch b/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch
index 9cb0a32fd4..f7aa413208 100644
--- a/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch
+++ b/package/kernel/mac80211/patches/brcm/814-b43-only-use-gpio-0-1-for-led.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/broadcom/b43/main.c
 +++ b/drivers/net/wireless/broadcom/b43/main.c
-@@ -2886,6 +2886,14 @@ static int b43_gpio_init(struct b43_wlde
+@@ -2887,6 +2887,14 @@ static int b43_gpio_init(struct b43_wlde
  	} else if (dev->dev->chip_id == 0x5354) {
  		/* Don't allow overtaking buttons GPIOs */
  		set &= 0x2; /* 0x2 is LED GPIO on BCM5354 */
diff --git a/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch b/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch
index 089ff2117b..6155484ddd 100644
--- a/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch
+++ b/package/kernel/mac80211/patches/build/060-no_local_ssb_bcma.patch
@@ -90,7 +90,7 @@
  config B43_PHY_G
 --- a/drivers/net/wireless/broadcom/b43/main.c
 +++ b/drivers/net/wireless/broadcom/b43/main.c
-@@ -2853,7 +2853,7 @@ static struct ssb_device *b43_ssb_gpio_d
+@@ -2854,7 +2854,7 @@ static struct ssb_device *b43_ssb_gpio_d
  {
  	struct ssb_bus *bus = dev->dev->sdev->bus;
  
@@ -99,7 +99,7 @@
  	return (bus->chipco.dev ? bus->chipco.dev : bus->pcicore.dev);
  #else
  	return bus->chipco.dev;
-@@ -4870,7 +4870,7 @@ static int b43_wireless_core_init(struct
+@@ -4872,7 +4872,7 @@ static int b43_wireless_core_init(struct
  	}
  	if (sprom->boardflags_lo & B43_BFL_XTAL_NOSLOW)
  		hf |= B43_HF_DSCRQ; /* Disable slowclock requests from ucode. */
diff --git a/package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch b/package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch
index 9ba8ab1249..6a4a7e9638 100644
--- a/package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch
+++ b/package/kernel/mac80211/patches/rt2x00/002-rt2x00-add-throughput-LED-trigger.patch
@@ -42,7 +42,7 @@ Acked-by: Stanislaw Gruszka <stf_xl at wp.pl>
 
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1094,6 +1094,19 @@ static void rt2x00lib_remove_hw(struct r
+@@ -1095,6 +1095,19 @@ static void rt2x00lib_remove_hw(struct r
  	kfree(rt2x00dev->chan_survey);
  }
  
@@ -62,7 +62,7 @@ Acked-by: Stanislaw Gruszka <stf_xl at wp.pl>
  static int rt2x00lib_probe_hw(struct rt2x00_dev *rt2x00dev)
  {
  	struct hw_mode_spec *spec = &rt2x00dev->spec;
-@@ -1175,6 +1188,11 @@ static int rt2x00lib_probe_hw(struct rt2
+@@ -1176,6 +1189,11 @@ static int rt2x00lib_probe_hw(struct rt2
  
  #undef RT2X00_TASKLET_INIT
  
diff --git a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
index 4d7f49cb7e..4d5eb6aeb6 100644
--- a/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
+++ b/package/kernel/mac80211/patches/rt2x00/602-rt2x00-introduce-rt2x00eeprom.patch
@@ -127,7 +127,7 @@
  	DECLARE_KFIFO_PTR(txstatus_fifo, u32);
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1420,6 +1420,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
+@@ -1423,6 +1423,10 @@ int rt2x00lib_probe_dev(struct rt2x00_de
  	INIT_DELAYED_WORK(&rt2x00dev->autowakeup_work, rt2x00lib_autowakeup);
  	INIT_WORK(&rt2x00dev->sleep_work, rt2x00lib_sleep);
  
@@ -138,7 +138,7 @@
  	/*
  	 * Let the driver probe the device to detect the capabilities.
  	 */
-@@ -1560,6 +1564,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
+@@ -1563,6 +1567,11 @@ void rt2x00lib_remove_dev(struct rt2x00_
  	 * Free the driver data.
  	 */
  	kfree(rt2x00dev->drv_data);
diff --git a/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch b/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch
index ffee2189d2..ab09a68297 100644
--- a/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch
+++ b/package/kernel/mac80211/patches/rt2x00/606-rt2x00-allow_disabling_bands_through_platform_data.patch
@@ -12,7 +12,7 @@
  #endif /* _RT2X00_PLATFORM_H */
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1007,6 +1007,22 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -1008,6 +1008,22 @@ static int rt2x00lib_probe_hw_modes(stru
  	unsigned int num_rates;
  	unsigned int i;
  
diff --git a/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch b/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch
index 37553bb80a..79f99ffdf4 100644
--- a/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch
+++ b/package/kernel/mac80211/patches/rt2x00/607-rt2x00-add_platform_data_mac_addr.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -989,6 +989,12 @@ static void rt2x00lib_rate(struct ieee80
+@@ -990,6 +990,12 @@ static void rt2x00lib_rate(struct ieee80
  
  void rt2x00lib_set_mac_address(struct rt2x00_dev *rt2x00dev, u8 *eeprom_mac_addr)
  {
diff --git a/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch b/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch
index 6211809c0a..31f2f0261f 100644
--- a/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch
+++ b/package/kernel/mac80211/patches/rt2x00/608-rt2x00-allow_disabling_bands_through_dts.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1012,6 +1012,16 @@ static int rt2x00lib_probe_hw_modes(stru
+@@ -1013,6 +1013,16 @@ static int rt2x00lib_probe_hw_modes(stru
  	struct ieee80211_rate *rates;
  	unsigned int num_rates;
  	unsigned int i;
diff --git a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch
index aa2b25ba7f..9564f02edd 100644
--- a/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch
+++ b/package/kernel/mac80211/patches/rt2x00/611-rt2x00-add-AP+STA-support.patch
@@ -1,6 +1,6 @@
 --- a/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
 +++ b/drivers/net/wireless/ralink/rt2x00/rt2x00dev.c
-@@ -1359,7 +1359,7 @@ static inline void rt2x00lib_set_if_comb
+@@ -1362,7 +1362,7 @@ static inline void rt2x00lib_set_if_comb
  	 */
  	if_limit = &rt2x00dev->if_limits_ap;
  	if_limit->max = rt2x00dev->ops->max_ap_intf;
diff --git a/package/kernel/mac80211/patches/subsys/306-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch b/package/kernel/mac80211/patches/subsys/306-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch
index 68a55b1e86..d58d467db4 100644
--- a/package/kernel/mac80211/patches/subsys/306-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch
+++ b/package/kernel/mac80211/patches/subsys/306-mac80211-use-coarse-boottime-for-airtime-fairness-co.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3821,7 +3821,7 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3822,7 +3822,7 @@ struct ieee80211_txq *ieee80211_next_txq
  {
  	struct ieee80211_local *local = hw_to_local(hw);
  	struct airtime_sched_info *air_sched;
@@ -22,7 +22,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	struct ieee80211_txq *ret = NULL;
  	struct airtime_info *air_info;
  	struct txq_info *txqi = NULL;
-@@ -3948,7 +3948,7 @@ void ieee80211_update_airtime_weight(str
+@@ -3949,7 +3949,7 @@ void ieee80211_update_airtime_weight(str
  	u64 weight_sum = 0;
  
  	if (unlikely(!now))
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	lockdep_assert_held(&air_sched->lock);
  
-@@ -3974,7 +3974,7 @@ void ieee80211_schedule_txq(struct ieee8
+@@ -3975,7 +3975,7 @@ void ieee80211_schedule_txq(struct ieee8
  	struct ieee80211_local *local = hw_to_local(hw);
  	struct txq_info *txqi = to_txq_info(txq);
  	struct airtime_sched_info *air_sched;
@@ -40,7 +40,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	struct airtime_info *air_info;
  	u8 ac = txq->ac;
  	bool was_active;
-@@ -4032,7 +4032,7 @@ static void __ieee80211_unschedule_txq(s
+@@ -4033,7 +4033,7 @@ static void __ieee80211_unschedule_txq(s
  
  	if (!purge)
  		airtime_set_active(air_sched, air_info,
@@ -49,7 +49,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	rb_erase_cached(&txqi->schedule_order,
  			&air_sched->active_txqs);
-@@ -4120,7 +4120,7 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -4121,7 +4121,7 @@ bool ieee80211_txq_may_transmit(struct i
  	if (RB_EMPTY_NODE(&txqi->schedule_order))
  		goto out;
  
diff --git a/package/kernel/mac80211/patches/subsys/312-mac80211-split-beacon-retrieval-functions.patch b/package/kernel/mac80211/patches/subsys/312-mac80211-split-beacon-retrieval-functions.patch
index 36764db336..1113880bea 100644
--- a/package/kernel/mac80211/patches/subsys/312-mac80211-split-beacon-retrieval-functions.patch
+++ b/package/kernel/mac80211/patches/subsys/312-mac80211-split-beacon-retrieval-functions.patch
@@ -14,7 +14,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
 
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -4988,6 +4988,115 @@ static int ieee80211_beacon_protect(stru
+@@ -4989,6 +4989,115 @@ static int ieee80211_beacon_protect(stru
  	return 0;
  }
  
@@ -130,7 +130,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  static struct sk_buff *
  __ieee80211_beacon_get(struct ieee80211_hw *hw,
  		       struct ieee80211_vif *vif,
-@@ -4997,12 +5106,8 @@ __ieee80211_beacon_get(struct ieee80211_
+@@ -4998,12 +5107,8 @@ __ieee80211_beacon_get(struct ieee80211_
  	struct ieee80211_local *local = hw_to_local(hw);
  	struct beacon_data *beacon = NULL;
  	struct sk_buff *skb = NULL;
@@ -143,7 +143,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  
  	rcu_read_lock();
  
-@@ -5019,48 +5124,11 @@ __ieee80211_beacon_get(struct ieee80211_
+@@ -5020,48 +5125,11 @@ __ieee80211_beacon_get(struct ieee80211_
  		struct ieee80211_if_ap *ap = &sdata->u.ap;
  
  		beacon = rcu_dereference(ap->beacon);
@@ -196,7 +196,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	} else if (sdata->vif.type == NL80211_IFTYPE_ADHOC) {
  		struct ieee80211_if_ibss *ifibss = &sdata->u.ibss;
  		struct ieee80211_hdr *hdr;
-@@ -5086,6 +5154,9 @@ __ieee80211_beacon_get(struct ieee80211_
+@@ -5087,6 +5155,9 @@ __ieee80211_beacon_get(struct ieee80211_
  		hdr = (struct ieee80211_hdr *) skb->data;
  		hdr->frame_control = cpu_to_le16(IEEE80211_FTYPE_MGMT |
  						 IEEE80211_STYPE_BEACON);
@@ -206,7 +206,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	} else if (ieee80211_vif_is_mesh(&sdata->vif)) {
  		struct ieee80211_if_mesh *ifmsh = &sdata->u.mesh;
  
-@@ -5125,51 +5196,13 @@ __ieee80211_beacon_get(struct ieee80211_
+@@ -5126,51 +5197,13 @@ __ieee80211_beacon_get(struct ieee80211_
  		}
  
  		skb_put_data(skb, beacon->tail, beacon->tail_len);
diff --git a/package/kernel/mac80211/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch b/package/kernel/mac80211/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch
index 052c7b708d..9302483c19 100644
--- a/package/kernel/mac80211/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch
+++ b/package/kernel/mac80211/patches/subsys/313-nl80211-MBSSID-and-EMA-support-in-AP-mode.patch
@@ -294,7 +294,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  		/* done */
  		state->split_start = 0;
  		break;
-@@ -5021,6 +5066,96 @@ static int validate_beacon_tx_rate(struc
+@@ -5024,6 +5069,96 @@ static int validate_beacon_tx_rate(struc
  	return 0;
  }
  
@@ -391,7 +391,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  static int nl80211_parse_beacon(struct cfg80211_registered_device *rdev,
  				struct nlattr *attrs[],
  				struct cfg80211_beacon_data *bcn)
-@@ -5101,6 +5236,17 @@ static int nl80211_parse_beacon(struct c
+@@ -5104,6 +5239,17 @@ static int nl80211_parse_beacon(struct c
  		bcn->ftm_responder = -1;
  	}
  
@@ -409,7 +409,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	return 0;
  }
  
-@@ -5557,6 +5703,17 @@ static int nl80211_start_ap(struct sk_bu
+@@ -5560,6 +5706,17 @@ static int nl80211_start_ap(struct sk_bu
  			goto out;
  	}
  
@@ -427,7 +427,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	nl80211_calculate_ap_params(&params);
  
  	if (info->attrs[NL80211_ATTR_EXTERNAL_AUTH_SUPPORT])
-@@ -5578,6 +5735,11 @@ static int nl80211_start_ap(struct sk_bu
+@@ -5581,6 +5738,11 @@ static int nl80211_start_ap(struct sk_bu
  
  out:
  	kfree(params.acl);
@@ -439,7 +439,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  
  	return err;
  }
-@@ -5602,12 +5764,14 @@ static int nl80211_set_beacon(struct sk_
+@@ -5605,12 +5767,14 @@ static int nl80211_set_beacon(struct sk_
  
  	err = nl80211_parse_beacon(rdev, info->attrs, &params);
  	if (err)
@@ -455,7 +455,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	return err;
  }
  
-@@ -9284,12 +9448,14 @@ static int nl80211_channel_switch(struct
+@@ -9287,12 +9451,14 @@ static int nl80211_channel_switch(struct
  
  	err = nl80211_parse_beacon(rdev, info->attrs, &params.beacon_after);
  	if (err)
@@ -473,7 +473,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  
  	err = nla_parse_nested_deprecated(csa_attrs, NL80211_ATTR_MAX,
  					  info->attrs[NL80211_ATTR_CSA_IES],
-@@ -9408,6 +9574,8 @@ skip_beacons:
+@@ -9411,6 +9577,8 @@ skip_beacons:
  	wdev_unlock(wdev);
  
  free:
@@ -482,7 +482,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	kfree(csa_attrs);
  	return err;
  }
-@@ -14960,6 +15128,8 @@ static int nl80211_color_change(struct s
+@@ -14963,6 +15131,8 @@ static int nl80211_color_change(struct s
  	wdev_unlock(wdev);
  
  out:
diff --git a/package/kernel/mac80211/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch b/package/kernel/mac80211/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch
index fe3fc51b74..9a26fe0ec1 100644
--- a/package/kernel/mac80211/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch
+++ b/package/kernel/mac80211/patches/subsys/314-cfg80211-implement-APIs-for-dedicated-radar-detectio.patch
@@ -294,7 +294,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  };
  
  /* policy for the key attributes */
-@@ -9288,12 +9289,6 @@ static int nl80211_start_radar_detection
+@@ -9291,12 +9292,6 @@ static int nl80211_start_radar_detection
  	if (err)
  		return err;
  
@@ -307,7 +307,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	err = cfg80211_chandef_dfs_required(wiphy, &chandef, wdev->iftype);
  	if (err < 0)
  		return err;
-@@ -9304,6 +9299,16 @@ static int nl80211_start_radar_detection
+@@ -9307,6 +9302,16 @@ static int nl80211_start_radar_detection
  	if (!cfg80211_chandef_dfs_usable(wiphy, &chandef))
  		return -EINVAL;
  
diff --git a/package/kernel/mac80211/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch b/package/kernel/mac80211/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch
index 9a0cade81c..988ebf09d5 100644
--- a/package/kernel/mac80211/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch
+++ b/package/kernel/mac80211/patches/subsys/318-cfg80211-allow-continuous-radar-monitoring-on-offcha.patch
@@ -118,7 +118,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  				     NL80211_RADAR_CAC_ABORTED);
 --- a/net/wireless/nl80211.c
 +++ b/net/wireless/nl80211.c
-@@ -9279,42 +9279,60 @@ static int nl80211_start_radar_detection
+@@ -9282,42 +9282,60 @@ static int nl80211_start_radar_detection
  	struct cfg80211_chan_def chandef;
  	enum nl80211_dfs_regions dfs_region;
  	unsigned int cac_time_ms;
@@ -198,7 +198,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  
  	cac_time_ms = cfg80211_chandef_dfs_cac_time(&rdev->wiphy, &chandef);
  	if (WARN_ON(!cac_time_ms))
-@@ -9327,6 +9345,9 @@ static int nl80211_start_radar_detection
+@@ -9330,6 +9348,9 @@ static int nl80211_start_radar_detection
  		wdev->cac_start_time = jiffies;
  		wdev->cac_time_ms = cac_time_ms;
  	}
@@ -208,7 +208,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	return err;
  }
  
-@@ -15962,7 +15983,8 @@ static const struct genl_small_ops nl802
+@@ -15965,7 +15986,8 @@ static const struct genl_small_ops nl802
  		.validate = GENL_DONT_VALIDATE_STRICT | GENL_DONT_VALIDATE_DUMP,
  		.doit = nl80211_start_radar_detection,
  		.flags = GENL_UNS_ADMIN_PERM,
diff --git a/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch b/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch
index d4d1894c18..9358844500 100644
--- a/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch
+++ b/package/kernel/mac80211/patches/subsys/320-cfg80211-rename-offchannel_chain-structs-to-backgrou.patch
@@ -481,7 +481,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  };
  
  /* policy for the key attributes */
-@@ -9307,9 +9307,9 @@ static int nl80211_start_radar_detection
+@@ -9310,9 +9310,9 @@ static int nl80211_start_radar_detection
  		goto unlock;
  	}
  
diff --git a/package/kernel/mac80211/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch b/package/kernel/mac80211/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch
index be3aa5a619..3e89207101 100644
--- a/package/kernel/mac80211/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch
+++ b/package/kernel/mac80211/patches/subsys/324-mac80211-MBSSID-beacon-handling-in-AP-mode.patch
@@ -269,7 +269,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	IEEE80211_TX_STATUS_MSG	= 2,
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -5042,6 +5042,19 @@ ieee80211_beacon_get_finish(struct ieee8
+@@ -5043,6 +5043,19 @@ ieee80211_beacon_get_finish(struct ieee8
  		       IEEE80211_TX_CTL_FIRST_FRAGMENT;
  }
  
@@ -289,7 +289,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  static struct sk_buff *
  ieee80211_beacon_get_ap(struct ieee80211_hw *hw,
  			struct ieee80211_vif *vif,
-@@ -5055,6 +5068,7 @@ ieee80211_beacon_get_ap(struct ieee80211
+@@ -5056,6 +5069,7 @@ ieee80211_beacon_get_ap(struct ieee80211
  	struct ieee80211_if_ap *ap = &sdata->u.ap;
  	struct sk_buff *skb = NULL;
  	u16 csa_off_base = 0;
@@ -297,7 +297,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  
  	if (beacon->cntdwn_counter_offsets[0]) {
  		if (!is_template)
-@@ -5064,11 +5078,12 @@ ieee80211_beacon_get_ap(struct ieee80211
+@@ -5065,11 +5079,12 @@ ieee80211_beacon_get_ap(struct ieee80211
  	}
  
  	/* headroom, head length,
@@ -312,7 +312,7 @@ Signed-off-by: Johannes Berg <johannes.berg at intel.com>
  	if (!skb)
  		return NULL;
  
-@@ -5082,6 +5097,11 @@ ieee80211_beacon_get_ap(struct ieee80211
+@@ -5083,6 +5098,11 @@ ieee80211_beacon_get_ap(struct ieee80211
  		offs->tim_length = skb->len - beacon->head_len;
  		offs->cntdwn_counter_offs[0] = beacon->cntdwn_counter_offsets[0];
  
diff --git a/package/kernel/mac80211/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch b/package/kernel/mac80211/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch
index 3b39701d2d..03f6a93206 100644
--- a/package/kernel/mac80211/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch
+++ b/package/kernel/mac80211/patches/subsys/330-mac80211-switch-airtime-fairness-back-to-deficit-rou.patch
@@ -627,7 +627,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	}
  
  	for (i = 0; i < IEEE80211_NUM_TIDS; i++)
-@@ -1890,59 +1894,24 @@ void ieee80211_sta_set_buffered(struct i
+@@ -1892,59 +1896,24 @@ void ieee80211_sta_set_buffered(struct i
  }
  EXPORT_SYMBOL(ieee80211_sta_set_buffered);
  
@@ -699,7 +699,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  EXPORT_SYMBOL(ieee80211_sta_register_airtime);
  
-@@ -2386,7 +2355,7 @@ void sta_set_sinfo(struct sta_info *sta,
+@@ -2388,7 +2357,7 @@ void sta_set_sinfo(struct sta_info *sta,
  	}
  
  	if (!(sinfo->filled & BIT_ULL(NL80211_STA_INFO_AIRTIME_WEIGHT))) {
@@ -811,7 +811,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  void ieee80211_txq_set_params(struct ieee80211_local *local)
-@@ -3820,259 +3821,102 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
+@@ -3821,259 +3822,102 @@ EXPORT_SYMBOL(ieee80211_tx_dequeue);
  struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
  {
  	struct ieee80211_local *local = hw_to_local(hw);
@@ -1133,7 +1133,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	struct ieee80211_local *local = hw_to_local(hw);
  
  	if (!wiphy_ext_feature_isset(local->hw.wiphy, NL80211_EXT_FEATURE_AQL))
-@@ -4087,12 +3931,15 @@ bool ieee80211_txq_airtime_check(struct
+@@ -4088,12 +3932,15 @@ bool ieee80211_txq_airtime_check(struct
  	if (unlikely(txq->tid == IEEE80211_NUM_TIDS))
  		return true;
  
@@ -1151,7 +1151,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		return true;
  
  	return false;
-@@ -4102,59 +3949,60 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec
+@@ -4103,59 +3950,60 @@ EXPORT_SYMBOL(ieee80211_txq_airtime_chec
  bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw,
  				struct ieee80211_txq *txq)
  {
diff --git a/package/kernel/mac80211/patches/subsys/331-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch b/package/kernel/mac80211/patches/subsys/331-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch
index 1937060c77..95465de9ed 100644
--- a/package/kernel/mac80211/patches/subsys/331-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch
+++ b/package/kernel/mac80211/patches/subsys/331-mac80211-make-sta-airtime-deficit-field-s32-instead-.patch
@@ -41,7 +41,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	u32 aql_limit_high;
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3848,7 +3848,7 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3849,7 +3849,7 @@ struct ieee80211_txq *ieee80211_next_txq
  		struct sta_info *sta = container_of(txqi->txq.sta,
  						    struct sta_info, sta);
  		bool aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq);
diff --git a/package/kernel/mac80211/patches/subsys/332-mac80211-consider-aql_tx_pending-when-checking-airti.patch b/package/kernel/mac80211/patches/subsys/332-mac80211-consider-aql_tx_pending-when-checking-airti.patch
index e13f399f39..4f5d1a4281 100644
--- a/package/kernel/mac80211/patches/subsys/332-mac80211-consider-aql_tx_pending-when-checking-airti.patch
+++ b/package/kernel/mac80211/patches/subsys/332-mac80211-consider-aql_tx_pending-when-checking-airti.patch
@@ -14,7 +14,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3818,6 +3818,13 @@ out:
+@@ -3819,6 +3819,13 @@ out:
  }
  EXPORT_SYMBOL(ieee80211_tx_dequeue);
  
@@ -28,7 +28,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
  {
  	struct ieee80211_local *local = hw_to_local(hw);
-@@ -3848,7 +3855,7 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3849,7 +3856,7 @@ struct ieee80211_txq *ieee80211_next_txq
  		struct sta_info *sta = container_of(txqi->txq.sta,
  						    struct sta_info, sta);
  		bool aql_check = ieee80211_txq_airtime_check(hw, &txqi->txq);
@@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  		if (aql_check)
  			found_eligible_txq = true;
-@@ -3973,7 +3980,7 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -3974,7 +3981,7 @@ bool ieee80211_txq_may_transmit(struct i
  			continue;
  		}
  		sta = container_of(iter->txq.sta, struct sta_info, sta);
diff --git a/package/kernel/mac80211/patches/subsys/333-mac80211-keep-recently-active-tx-queues-in-schedulin.patch b/package/kernel/mac80211/patches/subsys/333-mac80211-keep-recently-active-tx-queues-in-schedulin.patch
index 9ca3940276..d36e103d5e 100644
--- a/package/kernel/mac80211/patches/subsys/333-mac80211-keep-recently-active-tx-queues-in-schedulin.patch
+++ b/package/kernel/mac80211/patches/subsys/333-mac80211-keep-recently-active-tx-queues-in-schedulin.patch
@@ -37,7 +37,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	u32 aql_limit_low;
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3825,6 +3825,36 @@ static inline s32 ieee80211_sta_deficit(
+@@ -3826,6 +3826,36 @@ static inline s32 ieee80211_sta_deficit(
  	return air_info->deficit - atomic_read(&air_info->aql_tx_pending);
  }
  
@@ -74,7 +74,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  struct ieee80211_txq *ieee80211_next_txq(struct ieee80211_hw *hw, u8 ac)
  {
  	struct ieee80211_local *local = hw_to_local(hw);
-@@ -3871,7 +3901,6 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3872,7 +3902,6 @@ struct ieee80211_txq *ieee80211_next_txq
  		}
  	}
  
@@ -82,7 +82,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	if (txqi->schedule_round == local->schedule_round[ac])
  		goto out;
  
-@@ -3891,12 +3920,13 @@ void __ieee80211_schedule_txq(struct iee
+@@ -3892,12 +3921,13 @@ void __ieee80211_schedule_txq(struct iee
  {
  	struct ieee80211_local *local = hw_to_local(hw);
  	struct txq_info *txqi = to_txq_info(txq);
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		/* If airtime accounting is active, always enqueue STAs at the
  		 * head of the list to ensure that they only get moved to the
  		 * back by the airtime DRR scheduler once they have a negative
-@@ -3904,7 +3934,7 @@ void __ieee80211_schedule_txq(struct iee
+@@ -3905,7 +3935,7 @@ void __ieee80211_schedule_txq(struct iee
  		 * get immediately moved to the back of the list on the next
  		 * call to ieee80211_next_txq().
  		 */
@@ -107,7 +107,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		    wiphy_ext_feature_isset(local->hw.wiphy,
  					    NL80211_EXT_FEATURE_AIRTIME_FAIRNESS))
  			list_add(&txqi->schedule_order,
-@@ -3912,6 +3942,8 @@ void __ieee80211_schedule_txq(struct iee
+@@ -3913,6 +3943,8 @@ void __ieee80211_schedule_txq(struct iee
  		else
  			list_add_tail(&txqi->schedule_order,
  				      &local->active_txqs[txq->ac]);
diff --git a/package/kernel/mac80211/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch b/package/kernel/mac80211/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch
index 10a520a2a5..80eb8cfcf8 100644
--- a/package/kernel/mac80211/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch
+++ b/package/kernel/mac80211/patches/subsys/334-mac80211-add-a-per-PHY-AQL-limit-to-improve-fairness.patch
@@ -35,7 +35,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	local->airtime_flags = AIRTIME_USE_TX | AIRTIME_USE_RX;
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -1930,6 +1930,7 @@ void ieee80211_sta_update_pending_airtim
+@@ -1932,6 +1932,7 @@ void ieee80211_sta_update_pending_airtim
  				   &sta->airtime[ac].aql_tx_pending);
  
  		atomic_add(tx_airtime, &local->aql_total_pending_airtime);
@@ -43,7 +43,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		return;
  	}
  
-@@ -1941,14 +1942,17 @@ void ieee80211_sta_update_pending_airtim
+@@ -1943,14 +1944,17 @@ void ieee80211_sta_update_pending_airtim
  				       tx_pending, 0);
  	}
  
@@ -66,7 +66,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  int sta_info_move_state(struct sta_info *sta,
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3864,6 +3864,9 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3865,6 +3865,9 @@ struct ieee80211_txq *ieee80211_next_txq
  
  	spin_lock_bh(&local->active_txq_lock[ac]);
  
@@ -76,7 +76,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   begin:
  	txqi = list_first_entry_or_null(&local->active_txqs[ac],
  					struct txq_info,
-@@ -3985,6 +3988,25 @@ bool ieee80211_txq_airtime_check(struct
+@@ -3986,6 +3989,25 @@ bool ieee80211_txq_airtime_check(struct
  }
  EXPORT_SYMBOL(ieee80211_txq_airtime_check);
  
@@ -102,7 +102,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  bool ieee80211_txq_may_transmit(struct ieee80211_hw *hw,
  				struct ieee80211_txq *txq)
  {
-@@ -4001,6 +4023,9 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -4002,6 +4024,9 @@ bool ieee80211_txq_may_transmit(struct i
  	if (list_empty(&txqi->schedule_order))
  		goto out;
  
@@ -112,7 +112,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	list_for_each_entry_safe(iter, tmp, &local->active_txqs[ac],
  				 schedule_order) {
  		if (iter == txqi)
-@@ -4040,7 +4065,15 @@ void ieee80211_txq_schedule_start(struct
+@@ -4041,7 +4066,15 @@ void ieee80211_txq_schedule_start(struct
  	struct ieee80211_local *local = hw_to_local(hw);
  
  	spin_lock_bh(&local->active_txq_lock[ac]);
diff --git a/package/kernel/mac80211/patches/subsys/336-mac80211-only-accumulate-airtime-deficit-for-active-.patch b/package/kernel/mac80211/patches/subsys/336-mac80211-only-accumulate-airtime-deficit-for-active-.patch
index 828ab09f89..dff936cc6f 100644
--- a/package/kernel/mac80211/patches/subsys/336-mac80211-only-accumulate-airtime-deficit-for-active-.patch
+++ b/package/kernel/mac80211/patches/subsys/336-mac80211-only-accumulate-airtime-deficit-for-active-.patch
@@ -13,7 +13,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -1901,6 +1901,7 @@ void ieee80211_sta_register_airtime(stru
+@@ -1903,6 +1903,7 @@ void ieee80211_sta_register_airtime(stru
  	struct ieee80211_local *local = sta->sdata->local;
  	u8 ac = ieee80211_ac_from_tid(tid);
  	u32 airtime = 0;
@@ -21,7 +21,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  	if (sta->local->airtime_flags & AIRTIME_USE_TX)
  		airtime += tx_airtime;
-@@ -1910,7 +1911,11 @@ void ieee80211_sta_register_airtime(stru
+@@ -1912,7 +1913,11 @@ void ieee80211_sta_register_airtime(stru
  	spin_lock_bh(&local->active_txq_lock[ac]);
  	sta->airtime[ac].tx_airtime += tx_airtime;
  	sta->airtime[ac].rx_airtime += rx_airtime;
diff --git a/package/kernel/mac80211/patches/subsys/337-mac80211-increase-quantum-for-airtime-scheduler.patch b/package/kernel/mac80211/patches/subsys/337-mac80211-increase-quantum-for-airtime-scheduler.patch
index 84b8821e52..9f07ecc1d6 100644
--- a/package/kernel/mac80211/patches/subsys/337-mac80211-increase-quantum-for-airtime-scheduler.patch
+++ b/package/kernel/mac80211/patches/subsys/337-mac80211-increase-quantum-for-airtime-scheduler.patch
@@ -23,7 +23,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3895,7 +3895,7 @@ struct ieee80211_txq *ieee80211_next_txq
+@@ -3896,7 +3896,7 @@ struct ieee80211_txq *ieee80211_next_txq
  
  		if (deficit < 0)
  			sta->airtime[txqi->txq.ac].deficit +=
@@ -32,7 +32,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  		if (deficit < 0 || !aql_check) {
  			list_move_tail(&txqi->schedule_order,
-@@ -4038,7 +4038,8 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -4039,7 +4039,8 @@ bool ieee80211_txq_may_transmit(struct i
  		}
  		sta = container_of(iter->txq.sta, struct sta_info, sta);
  		if (ieee80211_sta_deficit(sta, ac) < 0)
@@ -42,7 +42,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		list_move_tail(&iter->schedule_order, &local->active_txqs[ac]);
  	}
  
-@@ -4046,7 +4047,7 @@ bool ieee80211_txq_may_transmit(struct i
+@@ -4047,7 +4048,7 @@ bool ieee80211_txq_may_transmit(struct i
  	if (sta->airtime[ac].deficit >= 0)
  		goto out;
  
diff --git a/package/kernel/mac80211/patches/subsys/339-mac80211-exclude-multicast-packets-from-AQL-pending-.patch b/package/kernel/mac80211/patches/subsys/339-mac80211-exclude-multicast-packets-from-AQL-pending-.patch
index 24bb16b593..61872c55cb 100644
--- a/package/kernel/mac80211/patches/subsys/339-mac80211-exclude-multicast-packets-from-AQL-pending-.patch
+++ b/package/kernel/mac80211/patches/subsys/339-mac80211-exclude-multicast-packets-from-AQL-pending-.patch
@@ -19,9 +19,9 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/mac80211/tx.c
 +++ b/net/mac80211/tx.c
-@@ -3793,7 +3793,7 @@ begin:
+@@ -3794,7 +3794,7 @@ begin:
  encap_out:
- 	IEEE80211_SKB_CB(skb)->control.vif = vif;
+ 	info->control.vif = vif;
  
 -	if (vif &&
 +	if (tx.sta &&
diff --git a/package/kernel/mac80211/patches/subsys/348-wifi-mac80211-flush-queues-on-STA-removal.patch b/package/kernel/mac80211/patches/subsys/348-wifi-mac80211-flush-queues-on-STA-removal.patch
index a5198c34fe..ad01f4701e 100644
--- a/package/kernel/mac80211/patches/subsys/348-wifi-mac80211-flush-queues-on-STA-removal.patch
+++ b/package/kernel/mac80211/patches/subsys/348-wifi-mac80211-flush-queues-on-STA-removal.patch
@@ -19,7 +19,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman at intel.com>
 
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -1071,6 +1071,14 @@ static void __sta_info_destroy_part2(str
+@@ -1073,6 +1073,14 @@ static void __sta_info_destroy_part2(str
  		WARN_ON_ONCE(ret);
  	}
  
diff --git a/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-add-flush_sta-method.patch b/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-add-flush_sta-method.patch
index 1ab844363c..1141abcda2 100644
--- a/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-add-flush_sta-method.patch
+++ b/package/kernel/mac80211/patches/subsys/350-wifi-mac80211-add-flush_sta-method.patch
@@ -58,7 +58,7 @@ Reviewed-by: Greenman, Gregory <gregory.greenman at intel.com>
  				      struct ieee80211_channel_switch *ch_switch)
 --- a/net/mac80211/sta_info.c
 +++ b/net/mac80211/sta_info.c
-@@ -1076,8 +1076,12 @@ static void __sta_info_destroy_part2(str
+@@ -1078,8 +1078,12 @@ static void __sta_info_destroy_part2(str
  	 * frames sitting on hardware queues might be sent out without
  	 * any encryption at all.
  	 */



From lede-commits at lists.infradead.org  Sun Apr 21 08:58:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 11:58:21 -0400
Subject: [openwrt/openwrt]  lldpd: extended interface(s) parsing to handle
 patterns
In-Reply-To: <171371510120.803508.10039339224038647808@git-01.infra.openwrt.org>
References: <171371510120.803508.10039339224038647808@git-01.infra.openwrt.org>
Message-ID: <mailman.29261.1713715106.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4a81d868db85a7954a73bc6dc4a957bbd6abc813

commit 4a81d868db85a7954a73bc6dc4a957bbd6abc813
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Fri Apr 12 21:27:56 2024 +0200

    lldpd: extended interface(s) parsing to handle patterns
    
    For interface type parameters, the man page documents patterns:
    ```
    *,!eth*,!!eth1
    
    uses all interfaces, except interfaces starting with "eth",
    but including "eth1".
    ```
    
    * Renamed `_ifname` to `_l2dev`.
    * get the l2dev via network_get_physdev (and not l3dev)
    * Glob pattern `*` is also valid - use noglob for this
    
    The net result is that now interface 'names' including globs '*' and '!'
    inversions are included in the generated lldpd configs.
    
    Temporarily `set -o noglob` and then `set +o noglob` to disable & enable
    globbing respectively, because when we pass `*` as an interface choice,
    other file and pathnames get sucked in from where the init script runs,
    and the `*` never makes it to lldpd.
    
    Tested extensively on: 22.03.6, 23.05.3
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
    [ squash with commit bumping release version ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/network/services/lldpd/Makefile         |  2 +-
 package/network/services/lldpd/files/lldpd.init | 14 +++++++++++---
 2 files changed, 12 insertions(+), 4 deletions(-)

diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile
index 18cdda33ce..5a9a9732d2 100644
--- a/package/network/services/lldpd/Makefile
+++ b/package/network/services/lldpd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lldpd
 PKG_VERSION:=1.0.17
-PKG_RELEASE:=3
+PKG_RELEASE:=4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/lldpd/lldpd/releases/download/$(PKG_VERSION)/
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index 31cd7fd389..dbe79d2f4a 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -80,12 +80,20 @@ get_config_cid_ifaces() {
 	config_get _ifaces 'config' "$2"
 
 	local _iface _ifnames=""
+	# Set noglob to prevent '*' capturing diverse file names in the for ... in
+	set -o noglob
 	for _iface in $_ifaces; do
-		local _ifname=""
-		if network_get_device _ifname "$_iface" || [ -e "/sys/class/net/$_iface" ]; then
-			append _ifnames "${_ifname:-$_iface}" ","
+
+		local _l2device=""
+		if network_get_physdev _l2device "$_iface" || [ -e "/sys/class/net/$_iface" ]; then
+			append _ifnames "${_l2device:-$_iface}" ","
+		else
+			# Glob case (interface is e.g. '!eth1' or 'eth*' or '*')
+			append _ifnames "$_iface" ","
 		fi
 	done
+	# Turn noglob off i.e. enable glob again
+	set +o noglob
 
 	export -n "${1}=$_ifnames"
 }



From lede-commits at lists.infradead.org  Sun Apr 21 08:59:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 11:59:30 -0400
Subject: [openwrt/openwrt]  toolchain/wrapper: fill and reference info.mk in
 staging_dir ext toolchain
In-Reply-To: <171371517070.806257.15218389512146846430@git-01.infra.openwrt.org>
References: <171371517070.806257.15218389512146846430@git-01.infra.openwrt.org>
Message-ID: <mailman.29262.1713715175.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0e161968a7358cc23af28b627ecb794b3cdaea72

commit 0e161968a7358cc23af28b627ecb794b3cdaea72
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sat Apr 20 18:29:23 2024 +0200

    toolchain/wrapper: fill and reference info.mk in staging_dir ext toolchain
    
    Currently when external toolchain is used, a info.mk is created (with
    to-be-filled values) but is never actually filled with real values and
    is never actually used in rules.mk.
    
    This info.mk is used down the code with special packages like libgcc to
    reference info like gcc version and package special library.
    
    To mimic what is done with internal toolchain, add the include in
    rules.mk for info.mk also for external library and in fix
    toolchain/wrapper to fill the staging_dir info.mk.
    
    The logic is to check if the external toolchain provide an info.mk and
    if it doesn't we at least fill the GCC_VERSION with the value set in the
    .config file.
    
    With this special library like libgcc correctly reference and have set the
    GCC_VERSION variable.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 rules.mk                   |  1 +
 toolchain/wrapper/Makefile | 10 ++++++++++
 2 files changed, 11 insertions(+)

diff --git a/rules.mk b/rules.mk
index 6f05047f26..84586ac26b 100644
--- a/rules.mk
+++ b/rules.mk
@@ -194,6 +194,7 @@ ifndef DUMP
     endif
   else
     ifeq ($(CONFIG_NATIVE_TOOLCHAIN),)
+      -include $(TOOLCHAIN_DIR)/info.mk
       TARGET_CROSS:=$(call qstrip,$(CONFIG_TOOLCHAIN_PREFIX))
       TOOLCHAIN_ROOT_DIR:=$(call qstrip,$(CONFIG_TOOLCHAIN_ROOT))
       TOOLCHAIN_BIN_DIRS:=$(patsubst ./%,$(TOOLCHAIN_ROOT_DIR)/%,$(call qstrip,$(CONFIG_TOOLCHAIN_BIN_PATH)))
diff --git a/toolchain/wrapper/Makefile b/toolchain/wrapper/Makefile
index 3398e407c9..e1f8389b1f 100644
--- a/toolchain/wrapper/Makefile
+++ b/toolchain/wrapper/Makefile
@@ -38,6 +38,14 @@ $$(if $$($(1)), \
 endef
 
 
+define Host/SetToolchainInfo
+	if [ -f $(CONFIG_TOOLCHAIN_ROOT)/info.mk ]; then \
+		$(CP) $(CONFIG_TOOLCHAIN_ROOT)/info.mk $(TOOLCHAIN_DIR)/; \
+	else \
+		$(SED) 's,GCC_VERSION=.*,GCC_VERSION=$(CONFIG_GCC_VERSION),' $(TOOLCHAIN_DIR)/info.mk; \
+	fi
+endef
+
 define Host/Prepare
 	$(call toolchain_test,CONFIG_SOFT_FLOAT,softfloat)
 	$(call toolchain_test,CONFIG_IPV6,ipv6)
@@ -53,10 +61,12 @@ endef
 
 define Host/Install
 	$(call toolchain_util,--wrap "$(TOOLCHAIN_DIR)/bin")
+	$(call Host/SetToolchainInfo)
 endef
 
 define Host/Clean
 	rm -rf $(TOOLCHAIN_DIR)/bin
+	rm -rf $(TOOLCHAIN_DIR)/info.mk
 endef
 
 $(eval $(call HostBuild))



From lede-commits at lists.infradead.org  Sun Apr 21 09:02:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 12:02:46 -0400
Subject: [openwrt/openwrt]  generic: 6.1: backport support for generic spi-nor
 from SFDP data
In-Reply-To: <171371536618.813802.17434696750792260820@git-01.infra.openwrt.org>
References: <171371536618.813802.17434696750792260820@git-01.infra.openwrt.org>
Message-ID: <mailman.29263.1713715370.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/869d72e988604ed6e89cfe12aea3f1d879ab2088

commit 869d72e988604ed6e89cfe12aea3f1d879ab2088
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sat Mar 2 15:40:00 2024 +0100

    generic: 6.1: backport support for generic spi-nor from SFDP data
    
    Backport patches for support of generic spi-nor from SFDP data for
    kernel 6.1.
    
    Kernel 5.15 have major rework of the info flags and it's not trustable
    to backport this amount of changes and expect correct function of it.
    
    All affected patches automatically refreshed using make
    target/linux/refresh.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...mtd-nor-support-mtd-name-from-device-tree.patch |   2 +-
 ...v6.2-mtd-spi-nor-add-generic-flash-driver.patch | 117 +++++++++++++++++++++
 ...rite-support-for-minor-aligned-partitions.patch |   6 +-
 .../479-mtd-spi-nor-add-xtx-xt25f128b.patch        |   2 +-
 ...-spi-nor-Add-calibration-support-for-spi-.patch |   4 +-
 5 files changed, 124 insertions(+), 7 deletions(-)

diff --git a/target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch
index 119868eddb..ebb240d4ae 100644
--- a/target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch
+++ b/target/linux/ath79/patches-6.1/400-mtd-nor-support-mtd-name-from-device-tree.patch
@@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
 
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -2942,12 +2942,19 @@ static void spi_nor_set_mtd_info(struct
+@@ -2964,12 +2964,19 @@ static void spi_nor_set_mtd_info(struct
  {
  	struct mtd_info *mtd = &nor->mtd;
  	struct device *dev = nor->dev;
diff --git a/target/linux/generic/backport-6.1/410-v6.2-mtd-spi-nor-add-generic-flash-driver.patch b/target/linux/generic/backport-6.1/410-v6.2-mtd-spi-nor-add-generic-flash-driver.patch
new file mode 100644
index 0000000000..4978dcedbf
--- /dev/null
+++ b/target/linux/generic/backport-6.1/410-v6.2-mtd-spi-nor-add-generic-flash-driver.patch
@@ -0,0 +1,117 @@
+From 773bbe10449731c9525457873e0c2342e5cf883b Mon Sep 17 00:00:00 2001
+From: Michael Walle <michael at walle.cc>
+Date: Thu, 11 Aug 2022 00:06:53 +0200
+Subject: [PATCH] mtd: spi-nor: add generic flash driver
+
+Our SFDP parsing is everything we need to support all basic operations
+of a flash device. If the flash isn't found in our in-kernel flash
+database, gracefully fall back to a driver described solely by its SFDP
+tables.
+
+Signed-off-by: Michael Walle <michael at walle.cc>
+Signed-off-by: Tudor Ambarus <tudor.ambarus at microchip.com>
+Tested-by: Tudor Ambarus <tudor.ambarus at microchip.com>
+Reviewed-by: Takahiro Kuwano <Takahiro.Kuwano at infineon.com>
+Link: https://lore.kernel.org/r/20220810220654.1297699-7-michael at walle.cc
+---
+ drivers/mtd/spi-nor/core.c | 26 ++++++++++++++++++++++++--
+ drivers/mtd/spi-nor/core.h |  1 +
+ drivers/mtd/spi-nor/sfdp.c | 27 +++++++++++++++++++++++++++
+ 3 files changed, 52 insertions(+), 2 deletions(-)
+
+--- a/drivers/mtd/spi-nor/core.c
++++ b/drivers/mtd/spi-nor/core.c
+@@ -1636,6 +1636,16 @@ static const struct spi_nor_manufacturer
+ 	&spi_nor_xmc,
+ };
+ 
++static const struct flash_info spi_nor_generic_flash = {
++	.name = "spi-nor-generic",
++	/*
++	 * JESD216 rev A doesn't specify the page size, therefore we need a
++	 * sane default.
++	 */
++	.page_size = 256,
++	.parse_sfdp = true,
++};
++
+ static const struct flash_info *spi_nor_match_id(struct spi_nor *nor,
+ 						 const u8 *id)
+ {
+@@ -1669,6 +1679,14 @@ static const struct flash_info *spi_nor_
+ 	}
+ 
+ 	info = spi_nor_match_id(nor, id);
++
++	/* Fallback to a generic flash described only by its SFDP data. */
++	if (!info) {
++		ret = spi_nor_check_sfdp_signature(nor);
++		if (!ret)
++			info = &spi_nor_generic_flash;
++	}
++
+ 	if (!info) {
+ 		dev_err(nor->dev, "unrecognized JEDEC id bytes: %*ph\n",
+ 			SPI_NOR_MAX_ID_LEN, id);
+@@ -2105,8 +2123,12 @@ static int spi_nor_select_pp(struct spi_
+  * spi_nor_select_uniform_erase() - select optimum uniform erase type
+  * @map:		the erase map of the SPI NOR
+  * @wanted_size:	the erase type size to search for. Contains the value of
+- *			info->sector_size or of the "small sector" size in case
+- *			CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is defined.
++ *			info->sector_size, the "small sector" size in case
++ *			CONFIG_MTD_SPI_NOR_USE_4K_SECTORS is defined or 0 if
++ *			there is no information about the sector size. The
++ *			latter is the case if the flash parameters are parsed
++ *			solely by SFDP, then the largest supported erase type
++ *			is selected.
+  *
+  * Once the optimum uniform sector erase command is found, disable all the
+  * other.
+--- a/drivers/mtd/spi-nor/core.h
++++ b/drivers/mtd/spi-nor/core.h
+@@ -708,6 +708,8 @@ int spi_nor_controller_ops_read_reg(stru
+ int spi_nor_controller_ops_write_reg(struct spi_nor *nor, u8 opcode,
+ 				     const u8 *buf, size_t len);
+ 
++int spi_nor_check_sfdp_signature(struct spi_nor *nor);
++
+ static inline struct spi_nor *mtd_to_spi_nor(struct mtd_info *mtd)
+ {
+ 	return container_of(mtd, struct spi_nor, mtd);
+--- a/drivers/mtd/spi-nor/sfdp.c
++++ b/drivers/mtd/spi-nor/sfdp.c
+@@ -1250,6 +1250,33 @@ static void spi_nor_post_sfdp_fixups(str
+ }
+ 
+ /**
++ * spi_nor_check_sfdp_signature() - check for a valid SFDP signature
++ * @nor:	pointer to a 'struct spi_nor'
++ *
++ * Used to detect if the flash supports the RDSFDP command as well as the
++ * presence of a valid SFDP table.
++ *
++ * Return: 0 on success, -errno otherwise.
++ */
++int spi_nor_check_sfdp_signature(struct spi_nor *nor)
++{
++	u32 signature;
++	int err;
++
++	/* Get the SFDP header. */
++	err = spi_nor_read_sfdp_dma_unsafe(nor, 0, sizeof(signature),
++					   &signature);
++	if (err < 0)
++		return err;
++
++	/* Check the SFDP signature. */
++	if (le32_to_cpu(signature) != SFDP_SIGNATURE)
++		return -EINVAL;
++
++	return 0;
++}
++
++/**
+  * spi_nor_parse_sfdp() - parse the Serial Flash Discoverable Parameters.
+  * @nor:		pointer to a 'struct spi_nor'
+  *
diff --git a/target/linux/generic/pending-6.1/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch b/target/linux/generic/pending-6.1/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch
index c7da2f8834..66a6feff60 100644
--- a/target/linux/generic/pending-6.1/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch
+++ b/target/linux/generic/pending-6.1/402-mtd-spi-nor-write-support-for-minor-aligned-partitions.patch
@@ -202,7 +202,7 @@ Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
  	return !!nor->params->erase_map.uniform_erase_type;
  }
  
-@@ -2158,6 +2160,7 @@ static int spi_nor_select_erase(struct s
+@@ -2180,6 +2182,7 @@ static int spi_nor_select_erase(struct s
  {
  	struct spi_nor_erase_map *map = &nor->params->erase_map;
  	const struct spi_nor_erase_type *erase = NULL;
@@ -210,7 +210,7 @@ Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
  	struct mtd_info *mtd = &nor->mtd;
  	u32 wanted_size = nor->info->sector_size;
  	int i;
-@@ -2190,8 +2193,9 @@ static int spi_nor_select_erase(struct s
+@@ -2212,8 +2215,9 @@ static int spi_nor_select_erase(struct s
  	 */
  	for (i = SNOR_ERASE_TYPE_MAX - 1; i >= 0; i--) {
  		if (map->erase_type[i].size) {
@@ -222,7 +222,7 @@ Reported-by: Dan Carpenter <dan.carpenter at oracle.com>
  		}
  	}
  
-@@ -2199,6 +2203,9 @@ static int spi_nor_select_erase(struct s
+@@ -2221,6 +2225,9 @@ static int spi_nor_select_erase(struct s
  		return -EINVAL;
  
  	mtd->erasesize = erase->size;
diff --git a/target/linux/generic/pending-6.1/479-mtd-spi-nor-add-xtx-xt25f128b.patch b/target/linux/generic/pending-6.1/479-mtd-spi-nor-add-xtx-xt25f128b.patch
index d2a9fb3436..371f1a7276 100644
--- a/target/linux/generic/pending-6.1/479-mtd-spi-nor-add-xtx-xt25f128b.patch
+++ b/target/linux/generic/pending-6.1/479-mtd-spi-nor-add-xtx-xt25f128b.patch
@@ -68,7 +68,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +	&spi_nor_xtx,
  };
  
- static const struct flash_info *spi_nor_match_id(struct spi_nor *nor,
+ static const struct flash_info spi_nor_generic_flash = {
 --- a/drivers/mtd/spi-nor/core.h
 +++ b/drivers/mtd/spi-nor/core.h
 @@ -633,6 +633,7 @@ extern const struct spi_nor_manufacturer
diff --git a/target/linux/mediatek/patches-6.1/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch b/target/linux/mediatek/patches-6.1/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch
index 1f747d1f4f..ac8a55e187 100644
--- a/target/linux/mediatek/patches-6.1/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch
+++ b/target/linux/mediatek/patches-6.1/436-drivers-mtd-spi-nor-Add-calibration-support-for-spi-.patch
@@ -26,7 +26,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
  
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -2900,6 +2900,18 @@ static const struct flash_info *spi_nor_
+@@ -2922,6 +2922,18 @@ static const struct flash_info *spi_nor_
  	return NULL;
  }
  
@@ -45,7 +45,7 @@ Signed-off-by: SkyLake.Huang <skylake.huang at mediatek.com>
  static const struct flash_info *spi_nor_get_flash_info(struct spi_nor *nor,
  						       const char *name)
  {
-@@ -3003,6 +3015,9 @@ int spi_nor_scan(struct spi_nor *nor, co
+@@ -3025,6 +3037,9 @@ int spi_nor_scan(struct spi_nor *nor, co
  	if (!nor->bouncebuf)
  		return -ENOMEM;
  



From lede-commits at lists.infradead.org  Sun Apr 21 09:08:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 12:08:26 -0400
Subject: [openwrt/openwrt]  generic: 5.15: Make support for BoHong bh25q128as
 generic
In-Reply-To: <171371570638.826116.17165310310888718340@git-01.infra.openwrt.org>
References: <171371570638.826116.17165310310888718340@git-01.infra.openwrt.org>
Message-ID: <mailman.29264.1713715710.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4cb814d403bb564a6a93baca3a4dcb13e7dc56ac

commit 4cb814d403bb564a6a93baca3a4dcb13e7dc56ac
Author: R Maru <deviantmaru at gmail.com>
AuthorDate: Fri Mar 8 15:55:52 2024 -0600

    generic: 5.15: Make support for BoHong bh25q128as generic
    
    Move the patch for BoHong bh25q128as out of ramips to make it
    generic. Not including 6.1.y since the mtd subsystem has changed,
    and does not need these changes.
    
    Patch was dropped with ramips updating to 6.1, hence we reintroudce it
    here for 5.15 generic.
    
    5.15.y functionality was verified on a Wavlink WL-WN586X3 Rev.a.
    
    Signed-off-by: R Maru <deviantmaru at gmail.com>
    [ rebase and add extra info in commit description ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...spi-nor-Add-support-for-BoHong-bh25q128as.patch | 75 ++++++++++++++++++++++
 .../479-mtd-spi-nor-add-xtx-xt25f128b.patch        |  6 +-
 2 files changed, 78 insertions(+), 3 deletions(-)

diff --git a/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch b/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
new file mode 100644
index 0000000000..0e68aa5907
--- /dev/null
+++ b/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
@@ -0,0 +1,75 @@
+From 52d14545d2fc276b1bf9ccf48d4612fab6edfb6a Mon Sep 17 00:00:00 2001
+From: David Bauer <mail at david-bauer.net>
+Date: Thu, 6 May 2021 17:49:55 +0200
+Subject: [PATCH] mtd: spi-nor: Add support for BoHong bh25q128as
+
+Add MTD support for the BoHong bh25q128as SPI NOR chip.
+The chip has 16MB of total capacity, divided into a total of 256
+sectors, each 64KB sized. The chip also supports 4KB sectors.
+Additionally, it supports dual and quad read modes.
+
+Functionality was verified on an Tenbay WR1800K / MTK MT7621 board.
+
+Signed-off-by: David Bauer <mail at david-bauer.net>
+---
+ drivers/mtd/spi-nor/Makefile |  1 +
+ drivers/mtd/spi-nor/bohong.c | 21 +++++++++++++++++++++
+ drivers/mtd/spi-nor/core.c   |  1 +
+ drivers/mtd/spi-nor/core.h   |  1 +
+ 4 files changed, 24 insertions(+)
+ create mode 100644 drivers/mtd/spi-nor/bohong.c
+
+--- a/drivers/mtd/spi-nor/Makefile
++++ b/drivers/mtd/spi-nor/Makefile
+@@ -2,6 +2,7 @@
+ 
+ spi-nor-objs			:= core.o sfdp.o swp.o otp.o sysfs.o
+ spi-nor-objs			+= atmel.o
++spi-nor-objs			+= bohong.o
+ spi-nor-objs			+= catalyst.o
+ spi-nor-objs			+= eon.o
+ spi-nor-objs			+= esmt.o
+--- /dev/null
++++ b/drivers/mtd/spi-nor/bohong.c
+@@ -0,0 +1,21 @@
++// SPDX-License-Identifier: GPL-2.0
++/*
++ * Copyright (C) 2005, Intec Automation Inc.
++ * Copyright (C) 2014, Freescale Semiconductor, Inc.
++ */
++
++#include <linux/mtd/spi-nor.h>
++
++#include "core.h"
++
++static const struct flash_info bohong_parts[] = {
++	/* BoHong Microelectronics */
++	{ "bh25q128as", INFO(0x684018, 0, 64 * 1024, 256)
++		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
++};
++
++const struct spi_nor_manufacturer spi_nor_bohong = {
++	.name = "bohong",
++	.parts = bohong_parts,
++	.nparts = ARRAY_SIZE(bohong_parts),
++};
+--- a/drivers/mtd/spi-nor/core.c
++++ b/drivers/mtd/spi-nor/core.c
+@@ -2001,6 +2001,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
+ 
+ static const struct spi_nor_manufacturer *manufacturers[] = {
+ 	&spi_nor_atmel,
++	&spi_nor_bohong,
+ 	&spi_nor_catalyst,
+ 	&spi_nor_eon,
+ 	&spi_nor_esmt,
+--- a/drivers/mtd/spi-nor/core.h
++++ b/drivers/mtd/spi-nor/core.h
+@@ -631,6 +631,7 @@ struct sfdp {
+ 
+ /* Manufacturer drivers. */
+ extern const struct spi_nor_manufacturer spi_nor_atmel;
++extern const struct spi_nor_manufacturer spi_nor_bohong;
+ extern const struct spi_nor_manufacturer spi_nor_catalyst;
+ extern const struct spi_nor_manufacturer spi_nor_eon;
+ extern const struct spi_nor_manufacturer spi_nor_esmt;
diff --git a/target/linux/generic/pending-5.15/479-mtd-spi-nor-add-xtx-xt25f128b.patch b/target/linux/generic/pending-5.15/479-mtd-spi-nor-add-xtx-xt25f128b.patch
index 3e1958c8a0..46471588ec 100644
--- a/target/linux/generic/pending-5.15/479-mtd-spi-nor-add-xtx-xt25f128b.patch
+++ b/target/linux/generic/pending-5.15/479-mtd-spi-nor-add-xtx-xt25f128b.patch
@@ -31,7 +31,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/drivers/mtd/spi-nor/Makefile
 +++ b/drivers/mtd/spi-nor/Makefile
-@@ -17,6 +17,7 @@ spi-nor-objs			+= sst.o
+@@ -18,6 +18,7 @@ spi-nor-objs			+= sst.o
  spi-nor-objs			+= winbond.o
  spi-nor-objs			+= xilinx.o
  spi-nor-objs			+= xmc.o
@@ -59,7 +59,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +};
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -1860,6 +1860,7 @@ static const struct spi_nor_manufacturer
+@@ -1861,6 +1861,7 @@ static const struct spi_nor_manufacturer
  	&spi_nor_winbond,
  	&spi_nor_xilinx,
  	&spi_nor_xmc,
@@ -69,7 +69,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static const struct flash_info *
 --- a/drivers/mtd/spi-nor/core.h
 +++ b/drivers/mtd/spi-nor/core.h
-@@ -489,6 +489,7 @@ extern const struct spi_nor_manufacturer
+@@ -490,6 +490,7 @@ extern const struct spi_nor_manufacturer
  extern const struct spi_nor_manufacturer spi_nor_winbond;
  extern const struct spi_nor_manufacturer spi_nor_xilinx;
  extern const struct spi_nor_manufacturer spi_nor_xmc;



From lede-commits at lists.infradead.org  Sun Apr 21 10:25:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 13:25:40 -0400
Subject: [openwrt/openwrt]  wireless-regdb: update to 2024.01.23
In-Reply-To: <171372034031.998366.5326075061206310658@git-01.infra.openwrt.org>
References: <171372034031.998366.5326075061206310658@git-01.infra.openwrt.org>
Message-ID: <mailman.29268.1713720352.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/fef1a52bd681534277cd2c7494dcf7266c460267

commit fef1a52bd681534277cd2c7494dcf7266c460267
Author: Yuu Toriyama <PascalCoffeeLake at gmail.com>
AuthorDate: Sun Feb 4 04:09:14 2024 +0900

    wireless-regdb: update to 2024.01.23
    
    The maintainer and repository of wireless-regdb has changed.
        https://lore.kernel.org/all/CAGb2v657baNMPKU3QADijx7hZa=GUcSv2LEDdn6N=QQaFX8r-g at mail.gmail.com/
    
    Changes:
        37dcea0 wireless-regdb: Update keys and maintainer information
        9e0aee6 wireless-regdb: Makefile: Reproducible signatures
        8c784a1 wireless-regdb: Update regulatory rules for China (CN)
        149c709 wireless-regdb: Update regulatory rules for Japan (JP) for December 2023
        bd69898 wireless-regdb: Update regulatory rules for Singapore (SG) for September 2023
        d695bf2 wireless-regdb: Update and disable 5470-5730MHz band according to TPC requirement for Singapore (SG)
        4541300 wireless-regdb: update regulatory database based on preceding changes
    
    Signed-off-by: Yuu Toriyama <PascalCoffeeLake at gmail.com>
    (cherry picked from commit b463737826eaa6c519eba93e13757a0cd3e09d47)
---
 package/firmware/wireless-regdb/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/wireless-regdb/Makefile b/package/firmware/wireless-regdb/Makefile
index dfff35ff4d..431d07c35b 100644
--- a/package/firmware/wireless-regdb/Makefile
+++ b/package/firmware/wireless-regdb/Makefile
@@ -1,12 +1,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wireless-regdb
-PKG_VERSION:=2023.09.01
+PKG_VERSION:=2024.01.23
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@KERNEL/software/network/wireless-regdb/
-PKG_HASH:=26d4c2a727cc59239b84735aad856b7c7d0b04e30aa5c235c4f7f47f5f053491
+PKG_HASH:=c8a61c9acf76fa7eb4239e89f640dee3e87098d9f69b4d3518c9c60fc6d20c55
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 
@@ -16,7 +16,7 @@ define Package/wireless-regdb
   PKGARCH:=all
   SECTION:=firmware
   CATEGORY:=Firmware
-  URL:=https://git.kernel.org/pub/scm/linux/kernel/git/sforshee/wireless-regdb.git/
+  URL:=https://git.kernel.org/pub/scm/linux/kernel/git/wens/wireless-regdb.git/
   TITLE:=Wireless Regulatory Database
 endef
 



From lede-commits at lists.infradead.org  Sun Apr 21 10:40:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 13:40:20 -0400
Subject: [openwrt/openwrt]  github: permits blank issue
In-Reply-To: <171372122097.1032382.9192523805842716905@git-01.infra.openwrt.org>
References: <171372122097.1032382.9192523805842716905@git-01.infra.openwrt.org>
Message-ID: <mailman.29271.1713721225.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9c9362fa31b6f0c8172b08618cce7ae6aadf8108

commit 9c9362fa31b6f0c8172b08618cce7ae6aadf8108
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun Apr 21 18:15:58 2024 +0200

    github: permits blank issue
    
    Blank issue might be used by devs to create tracking issue or by
    advanced user to report more strange issue.
    
    These kind of issue won't be parsed and won't be tagged. Normally bBug
    report should be used for 99% of the cases.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .github/ISSUE_TEMPLATE/config.yml | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml
index 91e2489077..39d9234453 100644
--- a/.github/ISSUE_TEMPLATE/config.yml
+++ b/.github/ISSUE_TEMPLATE/config.yml
@@ -1,5 +1,5 @@
 ---
-blank_issues_enabled: false
+blank_issues_enabled: true
 contact_links:
   - name: Feature request
     url: https://forum.openwrt.org/c/feature-requests



From lede-commits at lists.infradead.org  Sun Apr 21 10:40:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 13:40:21 -0400
Subject: [openwrt/openwrt]  github: add labels to bug-report issue to better
 identify type
In-Reply-To: <171372122097.1032382.9192523805842716905@git-01.infra.openwrt.org>
References: <171372122097.1032382.9192523805842716905@git-01.infra.openwrt.org>
Message-ID: <mailman.29272.1713721226.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d4c583a2baaa3289171337cc9d2b4b2da670629e

commit d4c583a2baaa3289171337cc9d2b4b2da670629e
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Sun Apr 21 18:23:30 2024 +0200

    github: add labels to bug-report issue to better identify type
    
    Add labels to bug-report issue to better identify type.
    Also introduce label to-triage to better handle issue by CI actions.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .github/ISSUE_TEMPLATE/bug-report.yml | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/.github/ISSUE_TEMPLATE/bug-report.yml b/.github/ISSUE_TEMPLATE/bug-report.yml
index 2ec7b7d7d8..59109dbc5f 100644
--- a/.github/ISSUE_TEMPLATE/bug-report.yml
+++ b/.github/ISSUE_TEMPLATE/bug-report.yml
@@ -2,6 +2,8 @@ name: Bug report
 description: Create a bug report to help us improve
 labels:
   - bug
+  - bug-report
+  - to-triage
 body:
   - type: textarea
     id: description



From lede-commits at lists.infradead.org  Sun Apr 21 13:51:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 16:51:31 -0400
Subject: [openwrt/openwrt]  kernel: backport ipeth CDC NCM support
In-Reply-To: <171373269195.1403803.17822850799202744730@git-01.infra.openwrt.org>
References: <171373269195.1403803.17822850799202744730@git-01.infra.openwrt.org>
Message-ID: <mailman.29288.1713732699.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/680f8738d02a1876ae4cd11aacf9cd56e520fadf

commit 680f8738d02a1876ae4cd11aacf9cd56e520fadf
Author: Georgi Valkov <gvalkov at gmail.com>
AuthorDate: Fri Apr 19 10:19:00 2024 +0300

    kernel: backport ipeth CDC NCM support
    
    Fixes no communication with tethered iOS devices in CDC NCM mode.
    Freshly booted iOS devices start in legacy mode, but are put into
    NCM mode by the official Apple driver.
    
    [1] https://github.com/torvalds/linux/commit/a2d274c62e44b1995c170595db3865c6fe701226
    
    Fixes: #12566
    Tested-by: Georgi Valkov <gvalkov at gmail.com>
    Signed-off-by: Foster Snowhill <forst at pen.gy>
    Signed-off-by: Georgi Valkov <gvalkov at gmail.com>
    [ better reference fixed issue ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 ...eth-fix-risk-of-NULL-pointer-deallocation.patch |  30 ++
 ...th-transmit-URBs-without-trailing-padding.patch |  35 +++
 ...v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch | 326 +++++++++++++++++++++
 ...-usbnet-ipheth-update-Kconfig-description.patch |  36 +++
 ...eth-fix-risk-of-NULL-pointer-deallocation.patch |  30 ++
 ...th-transmit-URBs-without-trailing-padding.patch |  35 +++
 ...v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch | 326 +++++++++++++++++++++
 ...-usbnet-ipheth-update-Kconfig-description.patch |  36 +++
 8 files changed, 854 insertions(+)

diff --git a/target/linux/generic/backport-5.15/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch b/target/linux/generic/backport-5.15/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch
new file mode 100644
index 0000000000..d9d6f36fce
--- /dev/null
+++ b/target/linux/generic/backport-5.15/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch
@@ -0,0 +1,30 @@
+From 2203718c2f59ffdd6c78d54e5add594aebb4461e Mon Sep 17 00:00:00 2001
+From: Georgi Valkov <gvalkov at gmail.com>
+Date: Wed, 7 Jun 2023 15:56:59 +0200
+Subject: [PATCH 1/4] usbnet: ipheth: fix risk of NULL pointer deallocation
+
+The cleanup precedure in ipheth_probe will attempt to free a
+NULL pointer in dev->ctrl_buf if the memory allocation for
+this buffer is not successful. While kfree ignores NULL pointers,
+and the existing code is safe, it is a better design to rearrange
+the goto labels and avoid this.
+
+Signed-off-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -510,8 +510,8 @@ err_register_netdev:
+ 	ipheth_free_urbs(dev);
+ err_alloc_urbs:
+ err_get_macaddr:
+-err_alloc_ctrl_buf:
+ 	kfree(dev->ctrl_buf);
++err_alloc_ctrl_buf:
+ err_endpoints:
+ 	free_netdev(netdev);
+ 	return retval;
diff --git a/target/linux/generic/backport-5.15/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch b/target/linux/generic/backport-5.15/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch
new file mode 100644
index 0000000000..adfec356d9
--- /dev/null
+++ b/target/linux/generic/backport-5.15/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch
@@ -0,0 +1,35 @@
+From 3e65efcca87a9bb5f3b864e0a43d167bc0a8688c Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:00 +0200
+Subject: [PATCH 2/4] usbnet: ipheth: transmit URBs without trailing padding
+
+The behaviour of the official iOS tethering driver on macOS is to not
+transmit any trailing padding at the end of URBs. This is applicable
+to both NCM and legacy modes, including older devices.
+
+Adapt the driver to not include trailing padding in TX URBs, matching
+the behaviour of the official macOS driver.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Tested-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -373,12 +373,10 @@ static netdev_tx_t ipheth_tx(struct sk_b
+ 	}
+ 
+ 	memcpy(dev->tx_buf, skb->data, skb->len);
+-	if (skb->len < IPHETH_BUF_SIZE)
+-		memset(dev->tx_buf + skb->len, 0, IPHETH_BUF_SIZE - skb->len);
+ 
+ 	usb_fill_bulk_urb(dev->tx_urb, udev,
+ 			  usb_sndbulkpipe(udev, dev->bulk_out),
+-			  dev->tx_buf, IPHETH_BUF_SIZE,
++			  dev->tx_buf, skb->len,
+ 			  ipheth_sndbulk_callback,
+ 			  dev);
+ 	dev->tx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
diff --git a/target/linux/generic/backport-5.15/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch b/target/linux/generic/backport-5.15/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch
new file mode 100644
index 0000000000..e3f2b9c331
--- /dev/null
+++ b/target/linux/generic/backport-5.15/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch
@@ -0,0 +1,326 @@
+From a2d274c62e44b1995c170595db3865c6fe701226 Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:01 +0200
+Subject: [PATCH 3/4] usbnet: ipheth: add CDC NCM support
+
+Recent iOS releases support CDC NCM encapsulation on RX. This mode is
+the default on macOS and Windows. In this mode, an iOS device may include
+one or more Ethernet frames inside a single URB.
+
+Freshly booted iOS devices start in legacy mode, but are put into
+NCM mode by the official Apple driver. When reconnecting such a device
+from a macOS/Windows machine to a Linux host, the device stays in
+NCM mode, making it unusable with the legacy ipheth driver code.
+
+To correctly support such a device, the driver has to either support
+the NCM mode too, or put the device back into legacy mode.
+
+To match the behaviour of the macOS/Windows driver, and since there
+is no documented control command to revert to legacy mode, implement
+NCM support. The device is attempted to be put into NCM mode by default,
+and falls back to legacy mode if the attempt fails.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Tested-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 180 +++++++++++++++++++++++++++++++++------
+ 1 file changed, 155 insertions(+), 25 deletions(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -52,6 +52,7 @@
+ #include <linux/ethtool.h>
+ #include <linux/usb.h>
+ #include <linux/workqueue.h>
++#include <linux/usb/cdc.h>
+ 
+ #define USB_VENDOR_APPLE        0x05ac
+ 
+@@ -59,8 +60,12 @@
+ #define IPHETH_USBINTF_SUBCLASS 253
+ #define IPHETH_USBINTF_PROTO    1
+ 
+-#define IPHETH_BUF_SIZE         1514
+ #define IPHETH_IP_ALIGN		2	/* padding at front of URB */
++#define IPHETH_NCM_HEADER_SIZE  (12 + 96) /* NCMH + NCM0 */
++#define IPHETH_TX_BUF_SIZE      ETH_FRAME_LEN
++#define IPHETH_RX_BUF_SIZE_LEGACY (IPHETH_IP_ALIGN + ETH_FRAME_LEN)
++#define IPHETH_RX_BUF_SIZE_NCM	65536
++
+ #define IPHETH_TX_TIMEOUT       (5 * HZ)
+ 
+ #define IPHETH_INTFNUM          2
+@@ -71,6 +76,7 @@
+ #define IPHETH_CTRL_TIMEOUT     (5 * HZ)
+ 
+ #define IPHETH_CMD_GET_MACADDR   0x00
++#define IPHETH_CMD_ENABLE_NCM    0x04
+ #define IPHETH_CMD_CARRIER_CHECK 0x45
+ 
+ #define IPHETH_CARRIER_CHECK_TIMEOUT round_jiffies_relative(1 * HZ)
+@@ -97,6 +103,8 @@ struct ipheth_device {
+ 	u8 bulk_out;
+ 	struct delayed_work carrier_work;
+ 	bool confirmed_pairing;
++	int (*rcvbulk_callback)(struct urb *urb);
++	size_t rx_buf_len;
+ };
+ 
+ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags);
+@@ -116,12 +124,12 @@ static int ipheth_alloc_urbs(struct iphe
+ 	if (rx_urb == NULL)
+ 		goto free_tx_urb;
+ 
+-	tx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE,
++	tx_buf = usb_alloc_coherent(iphone->udev, IPHETH_TX_BUF_SIZE,
+ 				    GFP_KERNEL, &tx_urb->transfer_dma);
+ 	if (tx_buf == NULL)
+ 		goto free_rx_urb;
+ 
+-	rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN,
++	rx_buf = usb_alloc_coherent(iphone->udev, iphone->rx_buf_len,
+ 				    GFP_KERNEL, &rx_urb->transfer_dma);
+ 	if (rx_buf == NULL)
+ 		goto free_tx_buf;
+@@ -134,7 +142,7 @@ static int ipheth_alloc_urbs(struct iphe
+ 	return 0;
+ 
+ free_tx_buf:
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
++	usb_free_coherent(iphone->udev, IPHETH_TX_BUF_SIZE, tx_buf,
+ 			  tx_urb->transfer_dma);
+ free_rx_urb:
+ 	usb_free_urb(rx_urb);
+@@ -146,9 +154,9 @@ error_nomem:
+ 
+ static void ipheth_free_urbs(struct ipheth_device *iphone)
+ {
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, iphone->rx_buf,
++	usb_free_coherent(iphone->udev, iphone->rx_buf_len, iphone->rx_buf,
+ 			  iphone->rx_urb->transfer_dma);
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
++	usb_free_coherent(iphone->udev, IPHETH_TX_BUF_SIZE, iphone->tx_buf,
+ 			  iphone->tx_urb->transfer_dma);
+ 	usb_free_urb(iphone->rx_urb);
+ 	usb_free_urb(iphone->tx_urb);
+@@ -160,15 +168,106 @@ static void ipheth_kill_urbs(struct iphe
+ 	usb_kill_urb(dev->rx_urb);
+ }
+ 
+-static void ipheth_rcvbulk_callback(struct urb *urb)
++static int ipheth_consume_skb(char *buf, int len, struct ipheth_device *dev)
+ {
+-	struct ipheth_device *dev;
+ 	struct sk_buff *skb;
+-	int status;
++
++	skb = dev_alloc_skb(len);
++	if (!skb) {
++		dev->net->stats.rx_dropped++;
++		return -ENOMEM;
++	}
++
++	skb_put_data(skb, buf, len);
++	skb->dev = dev->net;
++	skb->protocol = eth_type_trans(skb, dev->net);
++
++	dev->net->stats.rx_packets++;
++	dev->net->stats.rx_bytes += len;
++	netif_rx(skb);
++
++	return 0;
++}
++
++static int ipheth_rcvbulk_callback_legacy(struct urb *urb)
++{
++	struct ipheth_device *dev;
++	char *buf;
++	int len;
++
++	dev = urb->context;
++
++	if (urb->actual_length <= IPHETH_IP_ALIGN) {
++		dev->net->stats.rx_length_errors++;
++		return -EINVAL;
++	}
++	len = urb->actual_length - IPHETH_IP_ALIGN;
++	buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
++
++	return ipheth_consume_skb(buf, len, dev);
++}
++
++static int ipheth_rcvbulk_callback_ncm(struct urb *urb)
++{
++	struct usb_cdc_ncm_nth16 *ncmh;
++	struct usb_cdc_ncm_ndp16 *ncm0;
++	struct usb_cdc_ncm_dpe16 *dpe;
++	struct ipheth_device *dev;
++	int retval = -EINVAL;
+ 	char *buf;
+ 	int len;
+ 
+ 	dev = urb->context;
++
++	if (urb->actual_length < IPHETH_NCM_HEADER_SIZE) {
++		dev->net->stats.rx_length_errors++;
++		return retval;
++	}
++
++	ncmh = urb->transfer_buffer;
++	if (ncmh->dwSignature != cpu_to_le32(USB_CDC_NCM_NTH16_SIGN) ||
++	    le16_to_cpu(ncmh->wNdpIndex) >= urb->actual_length) {
++		dev->net->stats.rx_errors++;
++		return retval;
++	}
++
++	ncm0 = urb->transfer_buffer + le16_to_cpu(ncmh->wNdpIndex);
++	if (ncm0->dwSignature != cpu_to_le32(USB_CDC_NCM_NDP16_NOCRC_SIGN) ||
++	    le16_to_cpu(ncmh->wHeaderLength) + le16_to_cpu(ncm0->wLength) >=
++	    urb->actual_length) {
++		dev->net->stats.rx_errors++;
++		return retval;
++	}
++
++	dpe = ncm0->dpe16;
++	while (le16_to_cpu(dpe->wDatagramIndex) != 0 &&
++	       le16_to_cpu(dpe->wDatagramLength) != 0) {
++		if (le16_to_cpu(dpe->wDatagramIndex) >= urb->actual_length ||
++		    le16_to_cpu(dpe->wDatagramIndex) +
++		    le16_to_cpu(dpe->wDatagramLength) > urb->actual_length) {
++			dev->net->stats.rx_length_errors++;
++			return retval;
++		}
++
++		buf = urb->transfer_buffer + le16_to_cpu(dpe->wDatagramIndex);
++		len = le16_to_cpu(dpe->wDatagramLength);
++
++		retval = ipheth_consume_skb(buf, len, dev);
++		if (retval != 0)
++			return retval;
++
++		dpe++;
++	}
++
++	return 0;
++}
++
++static void ipheth_rcvbulk_callback(struct urb *urb)
++{
++	struct ipheth_device *dev;
++	int retval, status;
++
++	dev = urb->context;
+ 	if (dev == NULL)
+ 		return;
+ 
+@@ -191,25 +290,27 @@ static void ipheth_rcvbulk_callback(stru
+ 		dev->net->stats.rx_length_errors++;
+ 		return;
+ 	}
+-	len = urb->actual_length - IPHETH_IP_ALIGN;
+-	buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
+ 
+-	skb = dev_alloc_skb(len);
+-	if (!skb) {
+-		dev_err(&dev->intf->dev, "%s: dev_alloc_skb: -ENOMEM\n",
+-			__func__);
+-		dev->net->stats.rx_dropped++;
++	/* RX URBs starting with 0x00 0x01 do not encapsulate Ethernet frames,
++	 * but rather are control frames. Their purpose is not documented, and
++	 * they don't affect driver functionality, okay to drop them.
++	 * There is usually just one 4-byte control frame as the very first
++	 * URB received from the bulk IN endpoint.
++	 */
++	if (unlikely
++		(((char *)urb->transfer_buffer)[0] == 0 &&
++		 ((char *)urb->transfer_buffer)[1] == 1))
++		goto rx_submit;
++
++	retval = dev->rcvbulk_callback(urb);
++	if (retval != 0) {
++		dev_err(&dev->intf->dev, "%s: callback retval: %d\n",
++			__func__, retval);
+ 		return;
+ 	}
+ 
+-	skb_put_data(skb, buf, len);
+-	skb->dev = dev->net;
+-	skb->protocol = eth_type_trans(skb, dev->net);
+-
+-	dev->net->stats.rx_packets++;
+-	dev->net->stats.rx_bytes += len;
++rx_submit:
+ 	dev->confirmed_pairing = true;
+-	netif_rx(skb);
+ 	ipheth_rx_submit(dev, GFP_ATOMIC);
+ }
+ 
+@@ -310,6 +411,27 @@ static int ipheth_get_macaddr(struct iph
+ 	return retval;
+ }
+ 
++static int ipheth_enable_ncm(struct ipheth_device *dev)
++{
++	struct usb_device *udev = dev->udev;
++	int retval;
++
++	retval = usb_control_msg(udev,
++				 usb_sndctrlpipe(udev, IPHETH_CTRL_ENDP),
++				 IPHETH_CMD_ENABLE_NCM, /* request */
++				 0x41, /* request type */
++				 0x00, /* value */
++				 0x02, /* index */
++				 NULL,
++				 0,
++				 IPHETH_CTRL_TIMEOUT);
++
++	dev_info(&dev->intf->dev, "%s: usb_control_msg: %d\n",
++		 __func__, retval);
++
++	return retval;
++}
++
+ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
+ {
+ 	struct usb_device *udev = dev->udev;
+@@ -317,7 +439,7 @@ static int ipheth_rx_submit(struct iphet
+ 
+ 	usb_fill_bulk_urb(dev->rx_urb, udev,
+ 			  usb_rcvbulkpipe(udev, dev->bulk_in),
+-			  dev->rx_buf, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN,
++			  dev->rx_buf, dev->rx_buf_len,
+ 			  ipheth_rcvbulk_callback,
+ 			  dev);
+ 	dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+@@ -365,7 +487,7 @@ static netdev_tx_t ipheth_tx(struct sk_b
+ 	int retval;
+ 
+ 	/* Paranoid */
+-	if (skb->len > IPHETH_BUF_SIZE) {
++	if (skb->len > IPHETH_TX_BUF_SIZE) {
+ 		WARN(1, "%s: skb too large: %d bytes\n", __func__, skb->len);
+ 		dev->net->stats.tx_dropped++;
+ 		dev_kfree_skb_any(skb);
+@@ -448,6 +570,8 @@ static int ipheth_probe(struct usb_inter
+ 	dev->net = netdev;
+ 	dev->intf = intf;
+ 	dev->confirmed_pairing = false;
++	dev->rx_buf_len = IPHETH_RX_BUF_SIZE_LEGACY;
++	dev->rcvbulk_callback = ipheth_rcvbulk_callback_legacy;
+ 	/* Set up endpoints */
+ 	hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
+ 	if (hintf == NULL) {
+@@ -479,6 +603,12 @@ static int ipheth_probe(struct usb_inter
+ 	if (retval)
+ 		goto err_get_macaddr;
+ 
++	retval = ipheth_enable_ncm(dev);
++	if (!retval) {
++		dev->rx_buf_len = IPHETH_RX_BUF_SIZE_NCM;
++		dev->rcvbulk_callback = ipheth_rcvbulk_callback_ncm;
++	}
++
+ 	INIT_DELAYED_WORK(&dev->carrier_work, ipheth_carrier_check_work);
+ 
+ 	retval = ipheth_alloc_urbs(dev);
diff --git a/target/linux/generic/backport-5.15/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch b/target/linux/generic/backport-5.15/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch
new file mode 100644
index 0000000000..2ab7e8fedd
--- /dev/null
+++ b/target/linux/generic/backport-5.15/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch
@@ -0,0 +1,36 @@
+From 0c6e9d32ef0ccfcf2d875cbcff23bf345a54d585 Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:02 +0200
+Subject: [PATCH 4/4] usbnet: ipheth: update Kconfig description
+
+This module has for a long time not been limited to iPhone <= 3GS.
+Update description to match the actual state of the driver.
+
+Remove dead link from 2010, instead reference an existing userspace
+iOS device pairing implementation as part of libimobiledevice.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/Kconfig | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/usb/Kconfig
++++ b/drivers/net/usb/Kconfig
+@@ -582,12 +582,10 @@ config USB_IPHETH
+ 	default n
+ 	help
+ 	  Module used to share Internet connection (tethering) from your
+-	  iPhone (Original, 3G and 3GS) to your system.
+-	  Note that you need userspace libraries and programs that are needed
+-	  to pair your device with your system and that understand the iPhone
+-	  protocol.
+-
+-	  For more information: http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver
++	  iPhone to your system.
++	  Note that you need a corresponding userspace library/program
++	  to pair your device with your system, for example usbmuxd
++	  <https://github.com/libimobiledevice/usbmuxd>.
+ 
+ config USB_SIERRA_NET
+ 	tristate "USB-to-WWAN Driver for Sierra Wireless modems"
diff --git a/target/linux/generic/backport-6.1/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch b/target/linux/generic/backport-6.1/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch
new file mode 100644
index 0000000000..d9d6f36fce
--- /dev/null
+++ b/target/linux/generic/backport-6.1/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch
@@ -0,0 +1,30 @@
+From 2203718c2f59ffdd6c78d54e5add594aebb4461e Mon Sep 17 00:00:00 2001
+From: Georgi Valkov <gvalkov at gmail.com>
+Date: Wed, 7 Jun 2023 15:56:59 +0200
+Subject: [PATCH 1/4] usbnet: ipheth: fix risk of NULL pointer deallocation
+
+The cleanup precedure in ipheth_probe will attempt to free a
+NULL pointer in dev->ctrl_buf if the memory allocation for
+this buffer is not successful. While kfree ignores NULL pointers,
+and the existing code is safe, it is a better design to rearrange
+the goto labels and avoid this.
+
+Signed-off-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -510,8 +510,8 @@ err_register_netdev:
+ 	ipheth_free_urbs(dev);
+ err_alloc_urbs:
+ err_get_macaddr:
+-err_alloc_ctrl_buf:
+ 	kfree(dev->ctrl_buf);
++err_alloc_ctrl_buf:
+ err_endpoints:
+ 	free_netdev(netdev);
+ 	return retval;
diff --git a/target/linux/generic/backport-6.1/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch b/target/linux/generic/backport-6.1/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch
new file mode 100644
index 0000000000..adfec356d9
--- /dev/null
+++ b/target/linux/generic/backport-6.1/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch
@@ -0,0 +1,35 @@
+From 3e65efcca87a9bb5f3b864e0a43d167bc0a8688c Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:00 +0200
+Subject: [PATCH 2/4] usbnet: ipheth: transmit URBs without trailing padding
+
+The behaviour of the official iOS tethering driver on macOS is to not
+transmit any trailing padding at the end of URBs. This is applicable
+to both NCM and legacy modes, including older devices.
+
+Adapt the driver to not include trailing padding in TX URBs, matching
+the behaviour of the official macOS driver.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Tested-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -373,12 +373,10 @@ static netdev_tx_t ipheth_tx(struct sk_b
+ 	}
+ 
+ 	memcpy(dev->tx_buf, skb->data, skb->len);
+-	if (skb->len < IPHETH_BUF_SIZE)
+-		memset(dev->tx_buf + skb->len, 0, IPHETH_BUF_SIZE - skb->len);
+ 
+ 	usb_fill_bulk_urb(dev->tx_urb, udev,
+ 			  usb_sndbulkpipe(udev, dev->bulk_out),
+-			  dev->tx_buf, IPHETH_BUF_SIZE,
++			  dev->tx_buf, skb->len,
+ 			  ipheth_sndbulk_callback,
+ 			  dev);
+ 	dev->tx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
diff --git a/target/linux/generic/backport-6.1/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch b/target/linux/generic/backport-6.1/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch
new file mode 100644
index 0000000000..e3f2b9c331
--- /dev/null
+++ b/target/linux/generic/backport-6.1/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch
@@ -0,0 +1,326 @@
+From a2d274c62e44b1995c170595db3865c6fe701226 Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:01 +0200
+Subject: [PATCH 3/4] usbnet: ipheth: add CDC NCM support
+
+Recent iOS releases support CDC NCM encapsulation on RX. This mode is
+the default on macOS and Windows. In this mode, an iOS device may include
+one or more Ethernet frames inside a single URB.
+
+Freshly booted iOS devices start in legacy mode, but are put into
+NCM mode by the official Apple driver. When reconnecting such a device
+from a macOS/Windows machine to a Linux host, the device stays in
+NCM mode, making it unusable with the legacy ipheth driver code.
+
+To correctly support such a device, the driver has to either support
+the NCM mode too, or put the device back into legacy mode.
+
+To match the behaviour of the macOS/Windows driver, and since there
+is no documented control command to revert to legacy mode, implement
+NCM support. The device is attempted to be put into NCM mode by default,
+and falls back to legacy mode if the attempt fails.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Tested-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 180 +++++++++++++++++++++++++++++++++------
+ 1 file changed, 155 insertions(+), 25 deletions(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -52,6 +52,7 @@
+ #include <linux/ethtool.h>
+ #include <linux/usb.h>
+ #include <linux/workqueue.h>
++#include <linux/usb/cdc.h>
+ 
+ #define USB_VENDOR_APPLE        0x05ac
+ 
+@@ -59,8 +60,12 @@
+ #define IPHETH_USBINTF_SUBCLASS 253
+ #define IPHETH_USBINTF_PROTO    1
+ 
+-#define IPHETH_BUF_SIZE         1514
+ #define IPHETH_IP_ALIGN		2	/* padding at front of URB */
++#define IPHETH_NCM_HEADER_SIZE  (12 + 96) /* NCMH + NCM0 */
++#define IPHETH_TX_BUF_SIZE      ETH_FRAME_LEN
++#define IPHETH_RX_BUF_SIZE_LEGACY (IPHETH_IP_ALIGN + ETH_FRAME_LEN)
++#define IPHETH_RX_BUF_SIZE_NCM	65536
++
+ #define IPHETH_TX_TIMEOUT       (5 * HZ)
+ 
+ #define IPHETH_INTFNUM          2
+@@ -71,6 +76,7 @@
+ #define IPHETH_CTRL_TIMEOUT     (5 * HZ)
+ 
+ #define IPHETH_CMD_GET_MACADDR   0x00
++#define IPHETH_CMD_ENABLE_NCM    0x04
+ #define IPHETH_CMD_CARRIER_CHECK 0x45
+ 
+ #define IPHETH_CARRIER_CHECK_TIMEOUT round_jiffies_relative(1 * HZ)
+@@ -97,6 +103,8 @@ struct ipheth_device {
+ 	u8 bulk_out;
+ 	struct delayed_work carrier_work;
+ 	bool confirmed_pairing;
++	int (*rcvbulk_callback)(struct urb *urb);
++	size_t rx_buf_len;
+ };
+ 
+ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags);
+@@ -116,12 +124,12 @@ static int ipheth_alloc_urbs(struct iphe
+ 	if (rx_urb == NULL)
+ 		goto free_tx_urb;
+ 
+-	tx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE,
++	tx_buf = usb_alloc_coherent(iphone->udev, IPHETH_TX_BUF_SIZE,
+ 				    GFP_KERNEL, &tx_urb->transfer_dma);
+ 	if (tx_buf == NULL)
+ 		goto free_rx_urb;
+ 
+-	rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN,
++	rx_buf = usb_alloc_coherent(iphone->udev, iphone->rx_buf_len,
+ 				    GFP_KERNEL, &rx_urb->transfer_dma);
+ 	if (rx_buf == NULL)
+ 		goto free_tx_buf;
+@@ -134,7 +142,7 @@ static int ipheth_alloc_urbs(struct iphe
+ 	return 0;
+ 
+ free_tx_buf:
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
++	usb_free_coherent(iphone->udev, IPHETH_TX_BUF_SIZE, tx_buf,
+ 			  tx_urb->transfer_dma);
+ free_rx_urb:
+ 	usb_free_urb(rx_urb);
+@@ -146,9 +154,9 @@ error_nomem:
+ 
+ static void ipheth_free_urbs(struct ipheth_device *iphone)
+ {
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, iphone->rx_buf,
++	usb_free_coherent(iphone->udev, iphone->rx_buf_len, iphone->rx_buf,
+ 			  iphone->rx_urb->transfer_dma);
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
++	usb_free_coherent(iphone->udev, IPHETH_TX_BUF_SIZE, iphone->tx_buf,
+ 			  iphone->tx_urb->transfer_dma);
+ 	usb_free_urb(iphone->rx_urb);
+ 	usb_free_urb(iphone->tx_urb);
+@@ -160,15 +168,106 @@ static void ipheth_kill_urbs(struct iphe
+ 	usb_kill_urb(dev->rx_urb);
+ }
+ 
+-static void ipheth_rcvbulk_callback(struct urb *urb)
++static int ipheth_consume_skb(char *buf, int len, struct ipheth_device *dev)
+ {
+-	struct ipheth_device *dev;
+ 	struct sk_buff *skb;
+-	int status;
++
++	skb = dev_alloc_skb(len);
++	if (!skb) {
++		dev->net->stats.rx_dropped++;
++		return -ENOMEM;
++	}
++
++	skb_put_data(skb, buf, len);
++	skb->dev = dev->net;
++	skb->protocol = eth_type_trans(skb, dev->net);
++
++	dev->net->stats.rx_packets++;
++	dev->net->stats.rx_bytes += len;
++	netif_rx(skb);
++
++	return 0;
++}
++
++static int ipheth_rcvbulk_callback_legacy(struct urb *urb)
++{
++	struct ipheth_device *dev;
++	char *buf;
++	int len;
++
++	dev = urb->context;
++
++	if (urb->actual_length <= IPHETH_IP_ALIGN) {
++		dev->net->stats.rx_length_errors++;
++		return -EINVAL;
++	}
++	len = urb->actual_length - IPHETH_IP_ALIGN;
++	buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
++
++	return ipheth_consume_skb(buf, len, dev);
++}
++
++static int ipheth_rcvbulk_callback_ncm(struct urb *urb)
++{
++	struct usb_cdc_ncm_nth16 *ncmh;
++	struct usb_cdc_ncm_ndp16 *ncm0;
++	struct usb_cdc_ncm_dpe16 *dpe;
++	struct ipheth_device *dev;
++	int retval = -EINVAL;
+ 	char *buf;
+ 	int len;
+ 
+ 	dev = urb->context;
++
++	if (urb->actual_length < IPHETH_NCM_HEADER_SIZE) {
++		dev->net->stats.rx_length_errors++;
++		return retval;
++	}
++
++	ncmh = urb->transfer_buffer;
++	if (ncmh->dwSignature != cpu_to_le32(USB_CDC_NCM_NTH16_SIGN) ||
++	    le16_to_cpu(ncmh->wNdpIndex) >= urb->actual_length) {
++		dev->net->stats.rx_errors++;
++		return retval;
++	}
++
++	ncm0 = urb->transfer_buffer + le16_to_cpu(ncmh->wNdpIndex);
++	if (ncm0->dwSignature != cpu_to_le32(USB_CDC_NCM_NDP16_NOCRC_SIGN) ||
++	    le16_to_cpu(ncmh->wHeaderLength) + le16_to_cpu(ncm0->wLength) >=
++	    urb->actual_length) {
++		dev->net->stats.rx_errors++;
++		return retval;
++	}
++
++	dpe = ncm0->dpe16;
++	while (le16_to_cpu(dpe->wDatagramIndex) != 0 &&
++	       le16_to_cpu(dpe->wDatagramLength) != 0) {
++		if (le16_to_cpu(dpe->wDatagramIndex) >= urb->actual_length ||
++		    le16_to_cpu(dpe->wDatagramIndex) +
++		    le16_to_cpu(dpe->wDatagramLength) > urb->actual_length) {
++			dev->net->stats.rx_length_errors++;
++			return retval;
++		}
++
++		buf = urb->transfer_buffer + le16_to_cpu(dpe->wDatagramIndex);
++		len = le16_to_cpu(dpe->wDatagramLength);
++
++		retval = ipheth_consume_skb(buf, len, dev);
++		if (retval != 0)
++			return retval;
++
++		dpe++;
++	}
++
++	return 0;
++}
++
++static void ipheth_rcvbulk_callback(struct urb *urb)
++{
++	struct ipheth_device *dev;
++	int retval, status;
++
++	dev = urb->context;
+ 	if (dev == NULL)
+ 		return;
+ 
+@@ -191,25 +290,27 @@ static void ipheth_rcvbulk_callback(stru
+ 		dev->net->stats.rx_length_errors++;
+ 		return;
+ 	}
+-	len = urb->actual_length - IPHETH_IP_ALIGN;
+-	buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
+ 
+-	skb = dev_alloc_skb(len);
+-	if (!skb) {
+-		dev_err(&dev->intf->dev, "%s: dev_alloc_skb: -ENOMEM\n",
+-			__func__);
+-		dev->net->stats.rx_dropped++;
++	/* RX URBs starting with 0x00 0x01 do not encapsulate Ethernet frames,
++	 * but rather are control frames. Their purpose is not documented, and
++	 * they don't affect driver functionality, okay to drop them.
++	 * There is usually just one 4-byte control frame as the very first
++	 * URB received from the bulk IN endpoint.
++	 */
++	if (unlikely
++		(((char *)urb->transfer_buffer)[0] == 0 &&
++		 ((char *)urb->transfer_buffer)[1] == 1))
++		goto rx_submit;
++
++	retval = dev->rcvbulk_callback(urb);
++	if (retval != 0) {
++		dev_err(&dev->intf->dev, "%s: callback retval: %d\n",
++			__func__, retval);
+ 		return;
+ 	}
+ 
+-	skb_put_data(skb, buf, len);
+-	skb->dev = dev->net;
+-	skb->protocol = eth_type_trans(skb, dev->net);
+-
+-	dev->net->stats.rx_packets++;
+-	dev->net->stats.rx_bytes += len;
++rx_submit:
+ 	dev->confirmed_pairing = true;
+-	netif_rx(skb);
+ 	ipheth_rx_submit(dev, GFP_ATOMIC);
+ }
+ 
+@@ -310,6 +411,27 @@ static int ipheth_get_macaddr(struct iph
+ 	return retval;
+ }
+ 
++static int ipheth_enable_ncm(struct ipheth_device *dev)
++{
++	struct usb_device *udev = dev->udev;
++	int retval;
++
++	retval = usb_control_msg(udev,
++				 usb_sndctrlpipe(udev, IPHETH_CTRL_ENDP),
++				 IPHETH_CMD_ENABLE_NCM, /* request */
++				 0x41, /* request type */
++				 0x00, /* value */
++				 0x02, /* index */
++				 NULL,
++				 0,
++				 IPHETH_CTRL_TIMEOUT);
++
++	dev_info(&dev->intf->dev, "%s: usb_control_msg: %d\n",
++		 __func__, retval);
++
++	return retval;
++}
++
+ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
+ {
+ 	struct usb_device *udev = dev->udev;
+@@ -317,7 +439,7 @@ static int ipheth_rx_submit(struct iphet
+ 
+ 	usb_fill_bulk_urb(dev->rx_urb, udev,
+ 			  usb_rcvbulkpipe(udev, dev->bulk_in),
+-			  dev->rx_buf, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN,
++			  dev->rx_buf, dev->rx_buf_len,
+ 			  ipheth_rcvbulk_callback,
+ 			  dev);
+ 	dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+@@ -365,7 +487,7 @@ static netdev_tx_t ipheth_tx(struct sk_b
+ 	int retval;
+ 
+ 	/* Paranoid */
+-	if (skb->len > IPHETH_BUF_SIZE) {
++	if (skb->len > IPHETH_TX_BUF_SIZE) {
+ 		WARN(1, "%s: skb too large: %d bytes\n", __func__, skb->len);
+ 		dev->net->stats.tx_dropped++;
+ 		dev_kfree_skb_any(skb);
+@@ -448,6 +570,8 @@ static int ipheth_probe(struct usb_inter
+ 	dev->net = netdev;
+ 	dev->intf = intf;
+ 	dev->confirmed_pairing = false;
++	dev->rx_buf_len = IPHETH_RX_BUF_SIZE_LEGACY;
++	dev->rcvbulk_callback = ipheth_rcvbulk_callback_legacy;
+ 	/* Set up endpoints */
+ 	hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
+ 	if (hintf == NULL) {
+@@ -479,6 +603,12 @@ static int ipheth_probe(struct usb_inter
+ 	if (retval)
+ 		goto err_get_macaddr;
+ 
++	retval = ipheth_enable_ncm(dev);
++	if (!retval) {
++		dev->rx_buf_len = IPHETH_RX_BUF_SIZE_NCM;
++		dev->rcvbulk_callback = ipheth_rcvbulk_callback_ncm;
++	}
++
+ 	INIT_DELAYED_WORK(&dev->carrier_work, ipheth_carrier_check_work);
+ 
+ 	retval = ipheth_alloc_urbs(dev);
diff --git a/target/linux/generic/backport-6.1/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch b/target/linux/generic/backport-6.1/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch
new file mode 100644
index 0000000000..9089c4d8c3
--- /dev/null
+++ b/target/linux/generic/backport-6.1/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch
@@ -0,0 +1,36 @@
+From 0c6e9d32ef0ccfcf2d875cbcff23bf345a54d585 Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:02 +0200
+Subject: [PATCH 4/4] usbnet: ipheth: update Kconfig description
+
+This module has for a long time not been limited to iPhone <= 3GS.
+Update description to match the actual state of the driver.
+
+Remove dead link from 2010, instead reference an existing userspace
+iOS device pairing implementation as part of libimobiledevice.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/Kconfig | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/usb/Kconfig
++++ b/drivers/net/usb/Kconfig
+@@ -583,12 +583,10 @@ config USB_IPHETH
+ 	default n
+ 	help
+ 	  Module used to share Internet connection (tethering) from your
+-	  iPhone (Original, 3G and 3GS) to your system.
+-	  Note that you need userspace libraries and programs that are needed
+-	  to pair your device with your system and that understand the iPhone
+-	  protocol.
+-
+-	  For more information: http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver
++	  iPhone to your system.
++	  Note that you need a corresponding userspace library/program
++	  to pair your device with your system, for example usbmuxd
++	  <https://github.com/libimobiledevice/usbmuxd>.
+ 
+ config USB_SIERRA_NET
+ 	tristate "USB-to-WWAN Driver for Sierra Wireless modems"



From lede-commits at lists.infradead.org  Sun Apr 21 13:56:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 16:56:43 -0400
Subject: [openwrt/openwrt]  kernel: backport ipeth CDC NCM support
In-Reply-To: <171373300382.1413918.18246539854236899529@git-01.infra.openwrt.org>
References: <171373300382.1413918.18246539854236899529@git-01.infra.openwrt.org>
Message-ID: <mailman.29291.1713733009.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/2b6b6e2f3ce090b7ef5c4401c8366ac1ebc7f9b0

commit 2b6b6e2f3ce090b7ef5c4401c8366ac1ebc7f9b0
Author: Georgi Valkov <gvalkov at gmail.com>
AuthorDate: Fri Apr 19 10:19:00 2024 +0300

    kernel: backport ipeth CDC NCM support
    
    Fixes no communication with tethered iOS devices in CDC NCM mode.
    Freshly booted iOS devices start in legacy mode, but are put into
    NCM mode by the official Apple driver.
    
    [1] https://github.com/torvalds/linux/commit/a2d274c62e44b1995c170595db3865c6fe701226
    
    Fixes: #12566
    Tested-by: Georgi Valkov <gvalkov at gmail.com>
    Signed-off-by: Foster Snowhill <forst at pen.gy>
    Signed-off-by: Georgi Valkov <gvalkov at gmail.com>
    [ better reference fixed issue ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 680f8738d02a1876ae4cd11aacf9cd56e520fadf)
---
 ...eth-fix-risk-of-NULL-pointer-deallocation.patch |  30 ++
 ...th-transmit-URBs-without-trailing-padding.patch |  35 +++
 ...v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch | 326 +++++++++++++++++++++
 ...-usbnet-ipheth-update-Kconfig-description.patch |  36 +++
 4 files changed, 427 insertions(+)

diff --git a/target/linux/generic/backport-5.15/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch b/target/linux/generic/backport-5.15/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch
new file mode 100644
index 0000000000..d9d6f36fce
--- /dev/null
+++ b/target/linux/generic/backport-5.15/796-v6.5-01-usbnet-ipheth-fix-risk-of-NULL-pointer-deallocation.patch
@@ -0,0 +1,30 @@
+From 2203718c2f59ffdd6c78d54e5add594aebb4461e Mon Sep 17 00:00:00 2001
+From: Georgi Valkov <gvalkov at gmail.com>
+Date: Wed, 7 Jun 2023 15:56:59 +0200
+Subject: [PATCH 1/4] usbnet: ipheth: fix risk of NULL pointer deallocation
+
+The cleanup precedure in ipheth_probe will attempt to free a
+NULL pointer in dev->ctrl_buf if the memory allocation for
+this buffer is not successful. While kfree ignores NULL pointers,
+and the existing code is safe, it is a better design to rearrange
+the goto labels and avoid this.
+
+Signed-off-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -510,8 +510,8 @@ err_register_netdev:
+ 	ipheth_free_urbs(dev);
+ err_alloc_urbs:
+ err_get_macaddr:
+-err_alloc_ctrl_buf:
+ 	kfree(dev->ctrl_buf);
++err_alloc_ctrl_buf:
+ err_endpoints:
+ 	free_netdev(netdev);
+ 	return retval;
diff --git a/target/linux/generic/backport-5.15/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch b/target/linux/generic/backport-5.15/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch
new file mode 100644
index 0000000000..adfec356d9
--- /dev/null
+++ b/target/linux/generic/backport-5.15/796-v6.5-02-usbnet-ipheth-transmit-URBs-without-trailing-padding.patch
@@ -0,0 +1,35 @@
+From 3e65efcca87a9bb5f3b864e0a43d167bc0a8688c Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:00 +0200
+Subject: [PATCH 2/4] usbnet: ipheth: transmit URBs without trailing padding
+
+The behaviour of the official iOS tethering driver on macOS is to not
+transmit any trailing padding at the end of URBs. This is applicable
+to both NCM and legacy modes, including older devices.
+
+Adapt the driver to not include trailing padding in TX URBs, matching
+the behaviour of the official macOS driver.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Tested-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 4 +---
+ 1 file changed, 1 insertion(+), 3 deletions(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -373,12 +373,10 @@ static netdev_tx_t ipheth_tx(struct sk_b
+ 	}
+ 
+ 	memcpy(dev->tx_buf, skb->data, skb->len);
+-	if (skb->len < IPHETH_BUF_SIZE)
+-		memset(dev->tx_buf + skb->len, 0, IPHETH_BUF_SIZE - skb->len);
+ 
+ 	usb_fill_bulk_urb(dev->tx_urb, udev,
+ 			  usb_sndbulkpipe(udev, dev->bulk_out),
+-			  dev->tx_buf, IPHETH_BUF_SIZE,
++			  dev->tx_buf, skb->len,
+ 			  ipheth_sndbulk_callback,
+ 			  dev);
+ 	dev->tx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
diff --git a/target/linux/generic/backport-5.15/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch b/target/linux/generic/backport-5.15/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch
new file mode 100644
index 0000000000..e3f2b9c331
--- /dev/null
+++ b/target/linux/generic/backport-5.15/796-v6.5-03-usbnet-ipheth-add-CDC-NCM-support.patch
@@ -0,0 +1,326 @@
+From a2d274c62e44b1995c170595db3865c6fe701226 Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:01 +0200
+Subject: [PATCH 3/4] usbnet: ipheth: add CDC NCM support
+
+Recent iOS releases support CDC NCM encapsulation on RX. This mode is
+the default on macOS and Windows. In this mode, an iOS device may include
+one or more Ethernet frames inside a single URB.
+
+Freshly booted iOS devices start in legacy mode, but are put into
+NCM mode by the official Apple driver. When reconnecting such a device
+from a macOS/Windows machine to a Linux host, the device stays in
+NCM mode, making it unusable with the legacy ipheth driver code.
+
+To correctly support such a device, the driver has to either support
+the NCM mode too, or put the device back into legacy mode.
+
+To match the behaviour of the macOS/Windows driver, and since there
+is no documented control command to revert to legacy mode, implement
+NCM support. The device is attempted to be put into NCM mode by default,
+and falls back to legacy mode if the attempt fails.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Tested-by: Georgi Valkov <gvalkov at gmail.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/ipheth.c | 180 +++++++++++++++++++++++++++++++++------
+ 1 file changed, 155 insertions(+), 25 deletions(-)
+
+--- a/drivers/net/usb/ipheth.c
++++ b/drivers/net/usb/ipheth.c
+@@ -52,6 +52,7 @@
+ #include <linux/ethtool.h>
+ #include <linux/usb.h>
+ #include <linux/workqueue.h>
++#include <linux/usb/cdc.h>
+ 
+ #define USB_VENDOR_APPLE        0x05ac
+ 
+@@ -59,8 +60,12 @@
+ #define IPHETH_USBINTF_SUBCLASS 253
+ #define IPHETH_USBINTF_PROTO    1
+ 
+-#define IPHETH_BUF_SIZE         1514
+ #define IPHETH_IP_ALIGN		2	/* padding at front of URB */
++#define IPHETH_NCM_HEADER_SIZE  (12 + 96) /* NCMH + NCM0 */
++#define IPHETH_TX_BUF_SIZE      ETH_FRAME_LEN
++#define IPHETH_RX_BUF_SIZE_LEGACY (IPHETH_IP_ALIGN + ETH_FRAME_LEN)
++#define IPHETH_RX_BUF_SIZE_NCM	65536
++
+ #define IPHETH_TX_TIMEOUT       (5 * HZ)
+ 
+ #define IPHETH_INTFNUM          2
+@@ -71,6 +76,7 @@
+ #define IPHETH_CTRL_TIMEOUT     (5 * HZ)
+ 
+ #define IPHETH_CMD_GET_MACADDR   0x00
++#define IPHETH_CMD_ENABLE_NCM    0x04
+ #define IPHETH_CMD_CARRIER_CHECK 0x45
+ 
+ #define IPHETH_CARRIER_CHECK_TIMEOUT round_jiffies_relative(1 * HZ)
+@@ -97,6 +103,8 @@ struct ipheth_device {
+ 	u8 bulk_out;
+ 	struct delayed_work carrier_work;
+ 	bool confirmed_pairing;
++	int (*rcvbulk_callback)(struct urb *urb);
++	size_t rx_buf_len;
+ };
+ 
+ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags);
+@@ -116,12 +124,12 @@ static int ipheth_alloc_urbs(struct iphe
+ 	if (rx_urb == NULL)
+ 		goto free_tx_urb;
+ 
+-	tx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE,
++	tx_buf = usb_alloc_coherent(iphone->udev, IPHETH_TX_BUF_SIZE,
+ 				    GFP_KERNEL, &tx_urb->transfer_dma);
+ 	if (tx_buf == NULL)
+ 		goto free_rx_urb;
+ 
+-	rx_buf = usb_alloc_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN,
++	rx_buf = usb_alloc_coherent(iphone->udev, iphone->rx_buf_len,
+ 				    GFP_KERNEL, &rx_urb->transfer_dma);
+ 	if (rx_buf == NULL)
+ 		goto free_tx_buf;
+@@ -134,7 +142,7 @@ static int ipheth_alloc_urbs(struct iphe
+ 	return 0;
+ 
+ free_tx_buf:
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, tx_buf,
++	usb_free_coherent(iphone->udev, IPHETH_TX_BUF_SIZE, tx_buf,
+ 			  tx_urb->transfer_dma);
+ free_rx_urb:
+ 	usb_free_urb(rx_urb);
+@@ -146,9 +154,9 @@ error_nomem:
+ 
+ static void ipheth_free_urbs(struct ipheth_device *iphone)
+ {
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN, iphone->rx_buf,
++	usb_free_coherent(iphone->udev, iphone->rx_buf_len, iphone->rx_buf,
+ 			  iphone->rx_urb->transfer_dma);
+-	usb_free_coherent(iphone->udev, IPHETH_BUF_SIZE, iphone->tx_buf,
++	usb_free_coherent(iphone->udev, IPHETH_TX_BUF_SIZE, iphone->tx_buf,
+ 			  iphone->tx_urb->transfer_dma);
+ 	usb_free_urb(iphone->rx_urb);
+ 	usb_free_urb(iphone->tx_urb);
+@@ -160,15 +168,106 @@ static void ipheth_kill_urbs(struct iphe
+ 	usb_kill_urb(dev->rx_urb);
+ }
+ 
+-static void ipheth_rcvbulk_callback(struct urb *urb)
++static int ipheth_consume_skb(char *buf, int len, struct ipheth_device *dev)
+ {
+-	struct ipheth_device *dev;
+ 	struct sk_buff *skb;
+-	int status;
++
++	skb = dev_alloc_skb(len);
++	if (!skb) {
++		dev->net->stats.rx_dropped++;
++		return -ENOMEM;
++	}
++
++	skb_put_data(skb, buf, len);
++	skb->dev = dev->net;
++	skb->protocol = eth_type_trans(skb, dev->net);
++
++	dev->net->stats.rx_packets++;
++	dev->net->stats.rx_bytes += len;
++	netif_rx(skb);
++
++	return 0;
++}
++
++static int ipheth_rcvbulk_callback_legacy(struct urb *urb)
++{
++	struct ipheth_device *dev;
++	char *buf;
++	int len;
++
++	dev = urb->context;
++
++	if (urb->actual_length <= IPHETH_IP_ALIGN) {
++		dev->net->stats.rx_length_errors++;
++		return -EINVAL;
++	}
++	len = urb->actual_length - IPHETH_IP_ALIGN;
++	buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
++
++	return ipheth_consume_skb(buf, len, dev);
++}
++
++static int ipheth_rcvbulk_callback_ncm(struct urb *urb)
++{
++	struct usb_cdc_ncm_nth16 *ncmh;
++	struct usb_cdc_ncm_ndp16 *ncm0;
++	struct usb_cdc_ncm_dpe16 *dpe;
++	struct ipheth_device *dev;
++	int retval = -EINVAL;
+ 	char *buf;
+ 	int len;
+ 
+ 	dev = urb->context;
++
++	if (urb->actual_length < IPHETH_NCM_HEADER_SIZE) {
++		dev->net->stats.rx_length_errors++;
++		return retval;
++	}
++
++	ncmh = urb->transfer_buffer;
++	if (ncmh->dwSignature != cpu_to_le32(USB_CDC_NCM_NTH16_SIGN) ||
++	    le16_to_cpu(ncmh->wNdpIndex) >= urb->actual_length) {
++		dev->net->stats.rx_errors++;
++		return retval;
++	}
++
++	ncm0 = urb->transfer_buffer + le16_to_cpu(ncmh->wNdpIndex);
++	if (ncm0->dwSignature != cpu_to_le32(USB_CDC_NCM_NDP16_NOCRC_SIGN) ||
++	    le16_to_cpu(ncmh->wHeaderLength) + le16_to_cpu(ncm0->wLength) >=
++	    urb->actual_length) {
++		dev->net->stats.rx_errors++;
++		return retval;
++	}
++
++	dpe = ncm0->dpe16;
++	while (le16_to_cpu(dpe->wDatagramIndex) != 0 &&
++	       le16_to_cpu(dpe->wDatagramLength) != 0) {
++		if (le16_to_cpu(dpe->wDatagramIndex) >= urb->actual_length ||
++		    le16_to_cpu(dpe->wDatagramIndex) +
++		    le16_to_cpu(dpe->wDatagramLength) > urb->actual_length) {
++			dev->net->stats.rx_length_errors++;
++			return retval;
++		}
++
++		buf = urb->transfer_buffer + le16_to_cpu(dpe->wDatagramIndex);
++		len = le16_to_cpu(dpe->wDatagramLength);
++
++		retval = ipheth_consume_skb(buf, len, dev);
++		if (retval != 0)
++			return retval;
++
++		dpe++;
++	}
++
++	return 0;
++}
++
++static void ipheth_rcvbulk_callback(struct urb *urb)
++{
++	struct ipheth_device *dev;
++	int retval, status;
++
++	dev = urb->context;
+ 	if (dev == NULL)
+ 		return;
+ 
+@@ -191,25 +290,27 @@ static void ipheth_rcvbulk_callback(stru
+ 		dev->net->stats.rx_length_errors++;
+ 		return;
+ 	}
+-	len = urb->actual_length - IPHETH_IP_ALIGN;
+-	buf = urb->transfer_buffer + IPHETH_IP_ALIGN;
+ 
+-	skb = dev_alloc_skb(len);
+-	if (!skb) {
+-		dev_err(&dev->intf->dev, "%s: dev_alloc_skb: -ENOMEM\n",
+-			__func__);
+-		dev->net->stats.rx_dropped++;
++	/* RX URBs starting with 0x00 0x01 do not encapsulate Ethernet frames,
++	 * but rather are control frames. Their purpose is not documented, and
++	 * they don't affect driver functionality, okay to drop them.
++	 * There is usually just one 4-byte control frame as the very first
++	 * URB received from the bulk IN endpoint.
++	 */
++	if (unlikely
++		(((char *)urb->transfer_buffer)[0] == 0 &&
++		 ((char *)urb->transfer_buffer)[1] == 1))
++		goto rx_submit;
++
++	retval = dev->rcvbulk_callback(urb);
++	if (retval != 0) {
++		dev_err(&dev->intf->dev, "%s: callback retval: %d\n",
++			__func__, retval);
+ 		return;
+ 	}
+ 
+-	skb_put_data(skb, buf, len);
+-	skb->dev = dev->net;
+-	skb->protocol = eth_type_trans(skb, dev->net);
+-
+-	dev->net->stats.rx_packets++;
+-	dev->net->stats.rx_bytes += len;
++rx_submit:
+ 	dev->confirmed_pairing = true;
+-	netif_rx(skb);
+ 	ipheth_rx_submit(dev, GFP_ATOMIC);
+ }
+ 
+@@ -310,6 +411,27 @@ static int ipheth_get_macaddr(struct iph
+ 	return retval;
+ }
+ 
++static int ipheth_enable_ncm(struct ipheth_device *dev)
++{
++	struct usb_device *udev = dev->udev;
++	int retval;
++
++	retval = usb_control_msg(udev,
++				 usb_sndctrlpipe(udev, IPHETH_CTRL_ENDP),
++				 IPHETH_CMD_ENABLE_NCM, /* request */
++				 0x41, /* request type */
++				 0x00, /* value */
++				 0x02, /* index */
++				 NULL,
++				 0,
++				 IPHETH_CTRL_TIMEOUT);
++
++	dev_info(&dev->intf->dev, "%s: usb_control_msg: %d\n",
++		 __func__, retval);
++
++	return retval;
++}
++
+ static int ipheth_rx_submit(struct ipheth_device *dev, gfp_t mem_flags)
+ {
+ 	struct usb_device *udev = dev->udev;
+@@ -317,7 +439,7 @@ static int ipheth_rx_submit(struct iphet
+ 
+ 	usb_fill_bulk_urb(dev->rx_urb, udev,
+ 			  usb_rcvbulkpipe(udev, dev->bulk_in),
+-			  dev->rx_buf, IPHETH_BUF_SIZE + IPHETH_IP_ALIGN,
++			  dev->rx_buf, dev->rx_buf_len,
+ 			  ipheth_rcvbulk_callback,
+ 			  dev);
+ 	dev->rx_urb->transfer_flags |= URB_NO_TRANSFER_DMA_MAP;
+@@ -365,7 +487,7 @@ static netdev_tx_t ipheth_tx(struct sk_b
+ 	int retval;
+ 
+ 	/* Paranoid */
+-	if (skb->len > IPHETH_BUF_SIZE) {
++	if (skb->len > IPHETH_TX_BUF_SIZE) {
+ 		WARN(1, "%s: skb too large: %d bytes\n", __func__, skb->len);
+ 		dev->net->stats.tx_dropped++;
+ 		dev_kfree_skb_any(skb);
+@@ -448,6 +570,8 @@ static int ipheth_probe(struct usb_inter
+ 	dev->net = netdev;
+ 	dev->intf = intf;
+ 	dev->confirmed_pairing = false;
++	dev->rx_buf_len = IPHETH_RX_BUF_SIZE_LEGACY;
++	dev->rcvbulk_callback = ipheth_rcvbulk_callback_legacy;
+ 	/* Set up endpoints */
+ 	hintf = usb_altnum_to_altsetting(intf, IPHETH_ALT_INTFNUM);
+ 	if (hintf == NULL) {
+@@ -479,6 +603,12 @@ static int ipheth_probe(struct usb_inter
+ 	if (retval)
+ 		goto err_get_macaddr;
+ 
++	retval = ipheth_enable_ncm(dev);
++	if (!retval) {
++		dev->rx_buf_len = IPHETH_RX_BUF_SIZE_NCM;
++		dev->rcvbulk_callback = ipheth_rcvbulk_callback_ncm;
++	}
++
+ 	INIT_DELAYED_WORK(&dev->carrier_work, ipheth_carrier_check_work);
+ 
+ 	retval = ipheth_alloc_urbs(dev);
diff --git a/target/linux/generic/backport-5.15/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch b/target/linux/generic/backport-5.15/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch
new file mode 100644
index 0000000000..2ab7e8fedd
--- /dev/null
+++ b/target/linux/generic/backport-5.15/796-v6.5-04-usbnet-ipheth-update-Kconfig-description.patch
@@ -0,0 +1,36 @@
+From 0c6e9d32ef0ccfcf2d875cbcff23bf345a54d585 Mon Sep 17 00:00:00 2001
+From: Foster Snowhill <forst at pen.gy>
+Date: Wed, 7 Jun 2023 15:57:02 +0200
+Subject: [PATCH 4/4] usbnet: ipheth: update Kconfig description
+
+This module has for a long time not been limited to iPhone <= 3GS.
+Update description to match the actual state of the driver.
+
+Remove dead link from 2010, instead reference an existing userspace
+iOS device pairing implementation as part of libimobiledevice.
+
+Signed-off-by: Foster Snowhill <forst at pen.gy>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/usb/Kconfig | 10 ++++------
+ 1 file changed, 4 insertions(+), 6 deletions(-)
+
+--- a/drivers/net/usb/Kconfig
++++ b/drivers/net/usb/Kconfig
+@@ -582,12 +582,10 @@ config USB_IPHETH
+ 	default n
+ 	help
+ 	  Module used to share Internet connection (tethering) from your
+-	  iPhone (Original, 3G and 3GS) to your system.
+-	  Note that you need userspace libraries and programs that are needed
+-	  to pair your device with your system and that understand the iPhone
+-	  protocol.
+-
+-	  For more information: http://giagio.com/wiki/moin.cgi/iPhoneEthernetDriver
++	  iPhone to your system.
++	  Note that you need a corresponding userspace library/program
++	  to pair your device with your system, for example usbmuxd
++	  <https://github.com/libimobiledevice/usbmuxd>.
+ 
+ config USB_SIERRA_NET
+ 	tristate "USB-to-WWAN Driver for Sierra Wireless modems"



From lede-commits at lists.infradead.org  Sun Apr 21 14:38:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 17:38:48 -0400
Subject: [openwrt/openwrt]  sunxi: fix network bringup on Olinuxino Micro
 boards
In-Reply-To: <171373552880.1487593.18442886989567945566@git-01.infra.openwrt.org>
References: <171373552880.1487593.18442886989567945566@git-01.infra.openwrt.org>
Message-ID: <mailman.29292.1713735534.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/675d9a2d4141a9251e6feb0dd948b7f6533553ae

commit 675d9a2d4141a9251e6feb0dd948b7f6533553ae
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed Apr 17 00:42:56 2024 +0200

    sunxi: fix network bringup on Olinuxino Micro boards
    
    It's the A13-based Olinuxino Micro which has only wireless interfaces. The
    A20-based board is a fully-fledged one which has an ethernet interface.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/base-files/etc/board.d/02_network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network
index b295dc7daa..073565d4ee 100644
--- a/target/linux/sunxi/base-files/etc/board.d/02_network
+++ b/target/linux/sunxi/base-files/etc/board.d/02_network
@@ -17,7 +17,7 @@ sunxi_setup_interfaces()
 	lamobo,lamobo-r1)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
 		;;
-	olimex,a20-olinuxino-micro)
+	olimex,a13-olinuxino-micro)
 		ucidef_set_interface_lan "wlan0"
 		;;
 	xunlong,orangepi-r1)



From lede-commits at lists.infradead.org  Sun Apr 21 15:04:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 21 Apr 2024 18:04:21 -0400
Subject: [openwrt/openwrt]  sunxi: fix network bringup on Olinuxino Micro
 boards
In-Reply-To: <171373706149.1529991.11552054551782169071@git-01.infra.openwrt.org>
References: <171373706149.1529991.11552054551782169071@git-01.infra.openwrt.org>
Message-ID: <mailman.29293.1713737072.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/abc1245ec5511b6d4d149a062d5a8c5ccd2f221e

commit abc1245ec5511b6d4d149a062d5a8c5ccd2f221e
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed Apr 17 00:42:56 2024 +0200

    sunxi: fix network bringup on Olinuxino Micro boards
    
    It's the A13-based Olinuxino Micro which has only wireless interfaces. The
    A20-based board is a fully-fledged one which has an ethernet interface.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
    (cherry picked from commit 3ed8927cf5d7eb78d1427151cfa83bd535634d47)
---
 target/linux/sunxi/base-files/etc/board.d/02_network | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/sunxi/base-files/etc/board.d/02_network b/target/linux/sunxi/base-files/etc/board.d/02_network
index 46ace1f67c..39ffe22de1 100644
--- a/target/linux/sunxi/base-files/etc/board.d/02_network
+++ b/target/linux/sunxi/base-files/etc/board.d/02_network
@@ -17,7 +17,7 @@ sunxi_setup_interfaces()
 	lamobo,lamobo-r1)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3 lan4" wan
 		;;
-	olimex,a20-olinuxino-micro)
+	olimex,a13-olinuxino-micro)
 		ucidef_set_interface_lan "wlan0"
 		;;
 	xunlong,orangepi-r1)



From lede-commits at lists.infradead.org  Mon Apr 22 00:13:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 03:13:16 -0400
Subject: [openwrt/openwrt]  ppp: add sourcefilter option support
In-Reply-To: <171376999698.2049919.9839127519007107094@git-01.infra.openwrt.org>
References: <171376999698.2049919.9839127519007107094@git-01.infra.openwrt.org>
Message-ID: <mailman.29350.1713770008.1280.lede-commits@lists.infradead.org>

981213 pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/34161444184f62914652e505758353e517e5c6ac

commit 34161444184f62914652e505758353e517e5c6ac
Author: Chen Minqiang <ptpt52 at gmail.com>
AuthorDate: Mon Jan 22 22:35:41 2024 +0800

    ppp: add sourcefilter option support
    
    This make source based IPv6 routing option available for
    ppp/pptp/pppoe/pppoa
    
    Signed-off-by: Chen Minqiang <ptpt52 at gmail.com>
---
 package/network/services/ppp/files/lib/netifd/ppp6-up | 1 +
 package/network/services/ppp/files/ppp.sh             | 5 ++++-
 2 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/package/network/services/ppp/files/lib/netifd/ppp6-up b/package/network/services/ppp/files/lib/netifd/ppp6-up
index 3852bf63ff..9355f59678 100755
--- a/package/network/services/ppp/files/lib/netifd/ppp6-up
+++ b/package/network/services/ppp/files/lib/netifd/ppp6-up
@@ -27,6 +27,7 @@ if [ -n "$AUTOIPV6" ]; then
 	[ -n "$EXTENDPREFIX" ] && json_add_string extendprefix 1
 	[ -n "$IP6TABLE" ] && json_add_string ip6table $IP6TABLE
 	[ -n "$PEERDNS" ] && json_add_boolean peerdns $PEERDNS
+	[ "$NOSOURCEFILTER" = "1" ] && json_add_boolean sourcefilter "0"
 	json_close_object
 	ubus call network add_dynamic "$(json_dump)"
 fi
diff --git a/package/network/services/ppp/files/ppp.sh b/package/network/services/ppp/files/ppp.sh
index 6d3a8e29ff..074c1f12c8 100755
--- a/package/network/services/ppp/files/ppp.sh
+++ b/package/network/services/ppp/files/ppp.sh
@@ -82,13 +82,14 @@ ppp_generic_init_config() {
 	proto_config_add_boolean persist
 	proto_config_add_int maxfail
 	proto_config_add_int holdoff
+	proto_config_add_boolean sourcefilter
 }
 
 ppp_generic_setup() {
 	local config="$1"; shift
 	local localip
 
-	json_get_vars ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff peerdns
+	json_get_vars ip6table demand keepalive keepalive_adaptive username password pppd_options pppname unnumbered persist maxfail holdoff peerdns sourcefilter
 
 	[ ! -e /proc/sys/net/ipv6 ] && ipv6=0 || json_get_var ipv6 ipv6
 
@@ -133,6 +134,7 @@ ppp_generic_setup() {
 	[ "${keepalive_adaptive:-1}" -lt 1 ] && lcp_adaptive=""
 	[ -n "$connect" ] || json_get_var connect connect
 	[ -n "$disconnect" ] || json_get_var disconnect disconnect
+	[ "$sourcefilter" = "0" ] || sourcefilter=""
 
 	proto_run_command "$config" /usr/sbin/pppd \
 		nodetach ipparam "$config" \
@@ -143,6 +145,7 @@ ppp_generic_setup() {
 		${autoipv6:+set AUTOIPV6=1} \
 		${ip6table:+set IP6TABLE=$ip6table} \
 		${peerdns:+set PEERDNS=$peerdns} \
+		${sourcefilter:+set NOSOURCEFILTER=1} \
 		nodefaultroute \
 		usepeerdns \
 		$demand $persist maxfail $maxfail \



From lede-commits at lists.infradead.org  Mon Apr 22 00:51:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 03:51:37 -0400
Subject: [openwrt/openwrt]  at91: 6.1: set testing kernel
In-Reply-To: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
References: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
Message-ID: <mailman.29379.1713772299.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f0c215f700305613bc2d4b1d929c3aa4555cc66c

commit f0c215f700305613bc2d4b1d929c3aa4555cc66c
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Apr 18 00:18:47 2024 +0200

    at91: 6.1: set testing kernel
    
    Allow selecting 6.1 as testing kernel on at91.
    
    Tested-by: Claudiu Beznea <claudiu.beznea at tuxon.dev>
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/at91/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index 7867290b7e..10608bff77 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -11,6 +11,7 @@ FEATURES:=ext4 squashfs targz usbgadget ubifs
 SUBTARGETS:=sama7 sama5 sam9x
 
 KERNEL_PATCHVER:=5.15
+KERNEL_TESTING_PATCHVER:=6.1
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Mon Apr 22 00:51:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 03:51:35 -0400
Subject: [openwrt/openwrt]  at91: 6.1: import patch to fix pinctrl unused
 function warning
In-Reply-To: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
References: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
Message-ID: <mailman.29380.1713772299.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b3145f3526f2b582f097d33e05998adb841580be

commit b3145f3526f2b582f097d33e05998adb841580be
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Fri Apr 19 07:05:48 2024 +0200

    at91: 6.1: import patch to fix pinctrl unused function warning
    
    Fixes error in the form of [0]:
      drivers/pinctrl/pinctrl-at91.c:1668:12: error: 'at91_gpio_resume' defined but not used [-Werror=unused-function]
       1668 | static int at91_gpio_resume(struct device *dev)
            |            ^~~~~~~~~~~~~~~~
      drivers/pinctrl/pinctrl-at91.c:1650:12: error: 'at91_gpio_suspend' defined but not used [-Werror=unused-function]
       1650 | static int at91_gpio_suspend(struct device *dev)
            |            ^~~~~~~~~~~~~~~~~
    
    [0] - https://lore.kernel.org/all/20221215164301.934805-1-arnd at kernel.org/
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 ...at91-convert-to-NOIRQ_SYSTEM_SLEEP_PM_OPS.patch | 34 ++++++++++++++++++++++
 1 file changed, 34 insertions(+)

diff --git a/target/linux/at91/patches-6.1/0001-v6.3-pinctrl-at91-convert-to-NOIRQ_SYSTEM_SLEEP_PM_OPS.patch b/target/linux/at91/patches-6.1/0001-v6.3-pinctrl-at91-convert-to-NOIRQ_SYSTEM_SLEEP_PM_OPS.patch
new file mode 100644
index 0000000000..874e33059a
--- /dev/null
+++ b/target/linux/at91/patches-6.1/0001-v6.3-pinctrl-at91-convert-to-NOIRQ_SYSTEM_SLEEP_PM_OPS.patch
@@ -0,0 +1,34 @@
+From 5d8ae2928f71f0f9c2c3f8f13d00ecec35649ad3 Mon Sep 17 00:00:00 2001
+From: Arnd Bergmann <arnd at arndb.de>
+Date: Thu, 15 Dec 2022 17:42:54 +0100
+Subject: [PATCH] pinctrl: at91: convert to NOIRQ_SYSTEM_SLEEP_PM_OPS
+
+With the old SET_NOIRQ_SYSTEM_SLEEP_PM_OPS, some configs result in a
+build warning:
+
+drivers/pinctrl/pinctrl-at91.c:1668:12: error: 'at91_gpio_resume' defined but not used [-Werror=unused-function]
+ 1668 | static int at91_gpio_resume(struct device *dev)
+      |            ^~~~~~~~~~~~~~~~
+drivers/pinctrl/pinctrl-at91.c:1650:12: error: 'at91_gpio_suspend' defined but not used [-Werror=unused-function]
+ 1650 | static int at91_gpio_suspend(struct device *dev)
+      |            ^~~~~~~~~~~~~~~~~
+
+Signed-off-by: Arnd Bergmann <arnd at arndb.de>
+Reviewed-by: Ryan Wanner <Ryan.Wanner at microchip.com>
+Link: https://lore.kernel.org/r/20221215164301.934805-1-arnd at kernel.org
+Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
+---
+ drivers/pinctrl/pinctrl-at91.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/pinctrl/pinctrl-at91.c
++++ b/drivers/pinctrl/pinctrl-at91.c
+@@ -1921,7 +1921,7 @@ err:
+ }
+ 
+ static const struct dev_pm_ops at91_gpio_pm_ops = {
+-	SET_NOIRQ_SYSTEM_SLEEP_PM_OPS(at91_gpio_suspend, at91_gpio_resume)
++	NOIRQ_SYSTEM_SLEEP_PM_OPS(at91_gpio_suspend, at91_gpio_resume)
+ };
+ 
+ static struct platform_driver at91_gpio_driver = {



From lede-commits at lists.infradead.org  Mon Apr 22 00:51:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 03:51:32 -0400
Subject: [openwrt/openwrt]  kernel/at91: Create kernel files for v6.1 (from
 v5.15)
In-Reply-To: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
References: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
Message-ID: <mailman.29381.1713772303.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/db7e28cb987a8e6c408603db09ae1d3883f93156

commit db7e28cb987a8e6c408603db09ae1d3883f93156
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Apr 18 00:15:29 2024 +0200

    kernel/at91: Create kernel files for v6.1 (from v5.15)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 .../100-clk-at91-re-factor-clocks-suspend-resume.patch                    | 0
 .../101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch        | 0
 .../102-clk-at91-clk-master-add-register-definition-for-sama.patch        | 0
 .../103-clk-at91-clk-master-improve-readability-by-using-loc.patch        | 0
 .../104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch        | 0
 .../105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch           | 0
 .../106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch        | 0
 .../107-clk-at91-clk-master-add-notifier-for-divider.patch                | 0
 .../108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch            | 0
 .../109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch            | 0
 target/linux/at91/sam9x/{config-5.15 => config-6.1}                       | 0
 target/linux/at91/sama5/{config-5.15 => config-6.1}                       | 0
 target/linux/at91/sama7/{config-5.15 => config-6.1}                       | 0
 13 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/at91/patches-5.15/100-clk-at91-re-factor-clocks-suspend-resume.patch b/target/linux/at91/patches-6.1/100-clk-at91-re-factor-clocks-suspend-resume.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/100-clk-at91-re-factor-clocks-suspend-resume.patch
rename to target/linux/at91/patches-6.1/100-clk-at91-re-factor-clocks-suspend-resume.patch
diff --git a/target/linux/at91/patches-5.15/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch b/target/linux/at91/patches-6.1/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
rename to target/linux/at91/patches-6.1/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
diff --git a/target/linux/at91/patches-5.15/102-clk-at91-clk-master-add-register-definition-for-sama.patch b/target/linux/at91/patches-6.1/102-clk-at91-clk-master-add-register-definition-for-sama.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/102-clk-at91-clk-master-add-register-definition-for-sama.patch
rename to target/linux/at91/patches-6.1/102-clk-at91-clk-master-add-register-definition-for-sama.patch
diff --git a/target/linux/at91/patches-5.15/103-clk-at91-clk-master-improve-readability-by-using-loc.patch b/target/linux/at91/patches-6.1/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
rename to target/linux/at91/patches-6.1/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
diff --git a/target/linux/at91/patches-5.15/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch b/target/linux/at91/patches-6.1/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
rename to target/linux/at91/patches-6.1/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
diff --git a/target/linux/at91/patches-5.15/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch b/target/linux/at91/patches-6.1/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
rename to target/linux/at91/patches-6.1/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
diff --git a/target/linux/at91/patches-5.15/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch b/target/linux/at91/patches-6.1/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
rename to target/linux/at91/patches-6.1/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
diff --git a/target/linux/at91/patches-5.15/107-clk-at91-clk-master-add-notifier-for-divider.patch b/target/linux/at91/patches-6.1/107-clk-at91-clk-master-add-notifier-for-divider.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/107-clk-at91-clk-master-add-notifier-for-divider.patch
rename to target/linux/at91/patches-6.1/107-clk-at91-clk-master-add-notifier-for-divider.patch
diff --git a/target/linux/at91/patches-5.15/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch b/target/linux/at91/patches-6.1/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
rename to target/linux/at91/patches-6.1/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
diff --git a/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch b/target/linux/at91/patches-6.1/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
similarity index 100%
rename from target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
rename to target/linux/at91/patches-6.1/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
diff --git a/target/linux/at91/sam9x/config-5.15 b/target/linux/at91/sam9x/config-6.1
similarity index 100%
rename from target/linux/at91/sam9x/config-5.15
rename to target/linux/at91/sam9x/config-6.1
diff --git a/target/linux/at91/sama5/config-5.15 b/target/linux/at91/sama5/config-6.1
similarity index 100%
rename from target/linux/at91/sama5/config-5.15
rename to target/linux/at91/sama5/config-6.1
diff --git a/target/linux/at91/sama7/config-5.15 b/target/linux/at91/sama7/config-6.1
similarity index 100%
rename from target/linux/at91/sama7/config-5.15
rename to target/linux/at91/sama7/config-6.1



From lede-commits at lists.infradead.org  Mon Apr 22 00:51:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 03:51:36 -0400
Subject: [openwrt/openwrt]  at91: 6.1: update kernel config
In-Reply-To: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
References: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
Message-ID: <mailman.29382.1713772303.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e2e3ee41374ea6d421c474ff70b7973f53080db0

commit e2e3ee41374ea6d421c474ff70b7973f53080db0
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Apr 18 10:18:23 2024 +0200

    at91: 6.1: update kernel config
    
    Update the kernel config by running make kernel_oldconfig.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/at91/sam9x/config-6.1 | 34 +++++++++++++++++++++++-----
 target/linux/at91/sama5/config-6.1 | 46 +++++++++++++++++++++++++++++---------
 target/linux/at91/sama7/config-6.1 | 40 ++++++++++++++++++++++++---------
 3 files changed, 93 insertions(+), 27 deletions(-)

diff --git a/target/linux/at91/sam9x/config-6.1 b/target/linux/at91/sam9x/config-6.1
index 34c6d96b1c..ac4d7cd666 100644
--- a/target/linux/at91/sam9x/config-6.1
+++ b/target/linux/at91/sam9x/config-6.1
@@ -16,8 +16,7 @@ CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
 CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
-CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
 CONFIG_ARM_L1_CACHE_SHIFT=5
 CONFIG_ARM_PATCH_PHYS_VIRT=y
 CONFIG_ARM_THUMB=y
@@ -44,10 +43,13 @@ CONFIG_AT_XDMAC=y
 CONFIG_AUTO_ZRELADDR=y
 CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
 CONFIG_BLK_PM=y
-CONFIG_CLKSRC_MMIO=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_CONFIGFS_FS=y
 CONFIG_CPU_32v4T=y
@@ -63,6 +65,7 @@ CONFIG_CPU_COPY_V4WB=y
 CONFIG_CPU_CP15=y
 CONFIG_CPU_CP15_MMU=y
 # CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_NO_EFFICIENT_FFS=y
 CONFIG_CPU_PABRT_LEGACY=y
 CONFIG_CPU_PM=y
@@ -77,19 +80,22 @@ CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_DEFLATE=y
 CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_ZSTD=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 CONFIG_DMADEVICES=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_OF=y
 CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
 CONFIG_DTC=y
 CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
 CONFIG_EEPROM_AT24=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_EXT4_FS=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
@@ -99,6 +105,9 @@ CONFIG_FS_MBCACHE=y
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_BUG=y
@@ -122,7 +131,6 @@ CONFIG_GENERIC_STRNLEN_USER=y
 CONFIG_GLOB=y
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_CDEV=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
@@ -148,6 +156,7 @@ CONFIG_IIO_TRIGGERED_BUFFER=y
 CONFIG_INITRAMFS_SOURCE=""
 CONFIG_INPUT=y
 CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
@@ -162,6 +171,7 @@ CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_MACB=y
 CONFIG_MACB_USE_HWSTAMP=y
+# CONFIG_MCHP_EIC is not set
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
@@ -174,6 +184,7 @@ CONFIG_MFD_ATMEL_SMC=y
 CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MICREL_PHY=y
+CONFIG_MICROCHIP_CLOCKSOURCE_PIT64B=y
 CONFIG_MICROCHIP_PIT64B=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
@@ -201,6 +212,7 @@ CONFIG_NET_PTP_CLASSIFY=y
 CONFIG_NET_SELFTESTS=y
 CONFIG_NLS=y
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 # CONFIG_NVMEM_MICROCHIP_OTPC is not set
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
@@ -214,9 +226,14 @@ CONFIG_OF_MDIO=y
 CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
@@ -230,6 +247,7 @@ CONFIG_POWER_RESET_AT91_RESET=y
 CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PTP_1588_CLOCK=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_PWM=y
@@ -237,6 +255,7 @@ CONFIG_PWM_ATMEL=y
 CONFIG_PWM_ATMEL_HLCDC_PWM=y
 CONFIG_PWM_ATMEL_TCB=y
 CONFIG_PWM_SYSFS=y
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
@@ -261,6 +280,7 @@ CONFIG_SOC_AT91SAM9=y
 CONFIG_SOC_BUS=y
 CONFIG_SOC_SAM9X60=y
 CONFIG_SOC_SAM_V4_V5=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSE_IRQ=y
 CONFIG_SPI=y
 # CONFIG_SPI_AT91_USART is not set
@@ -279,6 +299,7 @@ CONFIG_SUSPEND=y
 CONFIG_SUSPEND_FREEZER=y
 CONFIG_SWPHY=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THREAD_INFO_IN_TASK=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
@@ -307,11 +328,14 @@ CONFIG_USB_SERIAL_PL2303=y
 CONFIG_USB_SUPPORT=y
 CONFIG_USE_OF=y
 # CONFIG_VFP is not set
+# CONFIG_VIDEO_ATMEL_XISC is not set
+# CONFIG_VIDEO_MICROCHIP_CSI2DC is not set
 CONFIG_WATCHDOG_CORE=y
 CONFIG_XXHASH=y
 CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
 CONFIG_ZSTD_COMPRESS=y
 CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/at91/sama5/config-6.1 b/target/linux/at91/sama5/config-6.1
index 47596039c8..a3168040c2 100644
--- a/target/linux/at91/sama5/config-6.1
+++ b/target/linux/at91/sama5/config-6.1
@@ -16,8 +16,7 @@ CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
 CONFIG_ARM_AT91_CPUIDLE=y
 CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
-CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
 CONFIG_ARM_HEAVY_MB=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
@@ -37,6 +36,7 @@ CONFIG_ATMEL_CLOCKSOURCE_TCB=y
 CONFIG_ATMEL_EBI=y
 CONFIG_ATMEL_PM=y
 CONFIG_ATMEL_SDRAMC=y
+# CONFIG_ATMEL_SECURE_PM is not set
 CONFIG_ATMEL_SSC=y
 CONFIG_ATMEL_TCB_CLKSRC=y
 CONFIG_AT_HDMAC=y
@@ -53,6 +53,9 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
 CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_PM=y
 CONFIG_CACHE_L2X0=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMA=y
 CONFIG_CMA_ALIGNMENT=8
@@ -69,6 +72,7 @@ CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 r
 CONFIG_CMDLINE_FROM_BOOTLOADER=y
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_AT91=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_CONFIGFS_FS=y
 CONFIG_CONTIG_ALLOC=y
@@ -85,6 +89,7 @@ CONFIG_CPU_HAS_ASID=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
 CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_SPECTRE=y
@@ -106,7 +111,9 @@ CONFIG_CRYPTO_HASH_INFO=y
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_JITTERENTROPY=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_RNG2=y
@@ -115,7 +122,9 @@ CONFIG_CRYPTO_SEQIV=y
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA512=y
 CONFIG_CRYPTO_ZSTD=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
 CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 CONFIG_DEBUG_MEMORY_INIT=y
 CONFIG_DEBUG_USER=y
@@ -124,18 +133,16 @@ CONFIG_DMA_CMA=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_OF=y
 CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DNOTIFY=y
 CONFIG_DRM=y
 CONFIG_DRM_ATMEL_HLCDC=y
 CONFIG_DRM_BRIDGE=y
-CONFIG_DRM_DP_AUX_BUS=y
 CONFIG_DRM_FBDEV_EMULATION=y
 CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_GEM_CMA_HELPER=y
-CONFIG_DRM_KMS_CMA_HELPER=y
+CONFIG_DRM_GEM_DMA_HELPER=y
 CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_NOMODESET=y
 CONFIG_DRM_PANEL=y
 CONFIG_DRM_PANEL_BRIDGE=y
 CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
@@ -146,6 +153,7 @@ CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
 CONFIG_EEPROM_AT24=y
 CONFIG_ELF_CORE=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_EXT4_FS=y
 CONFIG_FAT_FS=y
 CONFIG_FB=y
@@ -160,13 +168,15 @@ CONFIG_FB_SYS_FOPS=y
 CONFIG_FB_SYS_IMAGEBLIT=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FORCE_MAX_ZONEORDER=15
 CONFIG_FREEZER=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_CLOCKEVENTS=y
@@ -191,7 +201,6 @@ CONFIG_GENERIC_VDSO_32=y
 CONFIG_GLOB=y
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_CDEV=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
 # CONFIG_HARDEN_BRANCH_HISTORY is not set
 # CONFIG_HARDEN_BRANCH_PREDICTOR is not set
 CONFIG_HARDIRQS_SW_RESEND=y
@@ -226,6 +235,7 @@ CONFIG_INPUT_KEYBOARD=y
 CONFIG_INPUT_LEDS=y
 CONFIG_INPUT_TOUCHSCREEN=y
 CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_FORCED_THREADING=y
 CONFIG_IRQ_WORK=y
@@ -251,6 +261,7 @@ CONFIG_LZO_DECOMPRESS=y
 CONFIG_MACB=y
 CONFIG_MACB_USE_HWSTAMP=y
 CONFIG_MAGIC_SYSRQ=y
+# CONFIG_MCHP_EIC is not set
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
@@ -276,6 +287,7 @@ CONFIG_MFD_ATMEL_SMC=y
 CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MICREL_PHY=y
+# CONFIG_MICROCHIP_CLOCKSOURCE_PIT64B is not set
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGRATION=y
 CONFIG_MMC=y
@@ -308,6 +320,7 @@ CONFIG_NLS_UTF8=y
 CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 # CONFIG_NVMEM_MICROCHIP_OTPC is not set
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
@@ -323,10 +336,15 @@ CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_OUTER_CACHE=y
 CONFIG_OUTER_CACHE_SYNC=y
 CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
@@ -341,6 +359,7 @@ CONFIG_POWER_RESET_AT91_RESET=y
 CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 CONFIG_PRINTK_TIME=y
 CONFIG_PROC_VMCORE=y
@@ -351,6 +370,7 @@ CONFIG_PWM_ATMEL=y
 CONFIG_PWM_ATMEL_HLCDC_PWM=y
 CONFIG_PWM_ATMEL_TCB=y
 CONFIG_PWM_SYSFS=y
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
@@ -398,6 +418,7 @@ CONFIG_SND_DMAENGINE_PCM=y
 CONFIG_SND_JACK=y
 CONFIG_SND_JACK_INPUT_DEV=y
 # CONFIG_SND_MCHP_SOC_I2S_MCC is not set
+# CONFIG_SND_MCHP_SOC_PDMC is not set
 # CONFIG_SND_MCHP_SOC_SPDIFRX is not set
 # CONFIG_SND_MCHP_SOC_SPDIFTX is not set
 CONFIG_SND_PCM=y
@@ -412,12 +433,14 @@ CONFIG_SND_SPI=y
 CONFIG_SND_SUPPORT_OLD_API=y
 CONFIG_SND_TIMER=y
 CONFIG_SOC_BUS=y
+# CONFIG_SOC_LAN966 is not set
 CONFIG_SOC_SAMA5=y
 CONFIG_SOC_SAMA5D2=y
 CONFIG_SOC_SAMA5D3=y
 CONFIG_SOC_SAMA5D4=y
 # CONFIG_SOC_SAMA7G5 is not set
 CONFIG_SOC_SAM_V7=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SOUND=y
 CONFIG_SOUND_OSS_CORE=y
 CONFIG_SPARSE_IRQ=y
@@ -440,6 +463,7 @@ CONFIG_SWPHY=y
 # CONFIG_SWP_EMULATE is not set
 CONFIG_SYNC_FILE=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THREAD_INFO_IN_TASK=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
@@ -472,14 +496,13 @@ CONFIG_USB_SERIAL_PL2303=y
 CONFIG_USB_STORAGE=y
 CONFIG_USB_SUPPORT=y
 CONFIG_USE_OF=y
-CONFIG_V4L_PLATFORM_DRIVERS=y
 CONFIG_VFAT_FS=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
+# CONFIG_VIDEO_ATMEL_XISC is not set
 CONFIG_VIDEOMODE_HELPERS=y
-# CONFIG_VIDEO_CPIA2 is not set
 CONFIG_VIDEO_DEV=y
-CONFIG_VIDEO_V4L2=y
+# CONFIG_VIDEO_MICROCHIP_CSI2DC is not set
 CONFIG_VIDEO_V4L2_I2C=y
 CONFIG_VM_EVENT_COUNTERS=y
 CONFIG_WATCHDOG_CORE=y
@@ -489,5 +512,6 @@ CONFIG_ZBOOT_ROM_BSS=0x0
 CONFIG_ZBOOT_ROM_TEXT=0x0
 CONFIG_ZLIB_DEFLATE=y
 CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMMON=y
 CONFIG_ZSTD_COMPRESS=y
 CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/at91/sama7/config-6.1 b/target/linux/at91/sama7/config-6.1
index 228007b8c3..0fd9a69367 100644
--- a/target/linux/at91/sama7/config-6.1
+++ b/target/linux/at91/sama7/config-6.1
@@ -15,9 +15,8 @@ CONFIG_ARCH_SELECT_MEMORY_MODEL=y
 CONFIG_ARCH_SPARSEMEM_ENABLE=y
 CONFIG_ARCH_SUSPEND_POSSIBLE=y
 CONFIG_ARM=y
-CONFIG_ARM_CRYPTO=y
 CONFIG_ARM_GIC=y
-CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
 # CONFIG_ARM_PATCH_IDIV is not set
@@ -45,7 +44,9 @@ CONFIG_BLK_DEV_RAM_SIZE=8192
 CONFIG_BLK_DEV_SD=y
 # CONFIG_CACHE_L2X0 is not set
 CONFIG_CAN=y
-CONFIG_CLKSRC_MMIO=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_CMA=y
 CONFIG_CMA_ALIGNMENT=9
@@ -89,6 +90,7 @@ CONFIG_CPU_FREQ_GOV_POWERSAVE=y
 CONFIG_CPU_FREQ_GOV_USERSPACE=y
 CONFIG_CPU_FREQ_STAT=y
 CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_SPECTRE=y
 # CONFIG_CPU_SW_DOMAIN_PAN is not set
@@ -110,21 +112,24 @@ CONFIG_CRYPTO_ECDH=y
 CONFIG_CRYPTO_HMAC=y
 CONFIG_CRYPTO_JITTERENTROPY=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA1=y
 CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_LZO=y
 CONFIG_CRYPTO_RNG=y
 CONFIG_CRYPTO_RNG2=y
 CONFIG_CRYPTO_RNG_DEFAULT=y
 CONFIG_CRYPTO_SHA256=y
 CONFIG_CRYPTO_SHA512=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
 CONFIG_DCACHE_WORD_ACCESS=y
 CONFIG_DEBUG_AT91_SAMA7G5_FLEXCOM3=y
 CONFIG_DEBUG_AT91_UART=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL=y
 CONFIG_DEBUG_LL_INCLUDE="debug/at91.S"
 CONFIG_DEBUG_UART_PHYS=0xe1824200
 CONFIG_DEBUG_UART_VIRT=0xe0824200
-# CONFIG_DEBUG_UNCOMPRESS is not set
 CONFIG_DEBUG_USER=y
 CONFIG_DEVTMPFS=y
 CONFIG_DEVTMPFS_MOUNT=y
@@ -135,7 +140,6 @@ CONFIG_DMA_ENGINE=y
 CONFIG_DMA_ENGINE_RAID=y
 CONFIG_DMA_OF=y
 CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
 CONFIG_DTC=y
 CONFIG_DUMMY_CONSOLE=y
 CONFIG_EARLY_PRINTK=y
@@ -143,16 +147,19 @@ CONFIG_EDAC_ATOMIC_SCRUB=y
 CONFIG_EDAC_SUPPORT=y
 CONFIG_EEPROM_AT24=y
 # CONFIG_EFI_PARTITION is not set
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_EXT4_FS=y
 CONFIG_FANOTIFY=y
 CONFIG_FAT_FS=y
 CONFIG_FIXED_PHY=y
 CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FORCE_MAX_ZONEORDER=15
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_BUG=y
 CONFIG_GENERIC_CLOCKEVENTS=y
@@ -161,7 +168,6 @@ CONFIG_GENERIC_CPU_VULNERABILITIES=y
 CONFIG_GENERIC_EARLY_IOREMAP=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
 CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
 CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
 CONFIG_GENERIC_IRQ_SHOW=y
 CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
@@ -180,7 +186,6 @@ CONFIG_GLOB=y
 CONFIG_GPIOLIB_IRQCHIP=y
 CONFIG_GPIO_CDEV=y
 CONFIG_GRACE_PERIOD=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
 # CONFIG_HARDEN_BRANCH_HISTORY is not set
 # CONFIG_HARDEN_BRANCH_PREDICTOR is not set
 CONFIG_HARDIRQS_SW_RESEND=y
@@ -212,6 +217,7 @@ CONFIG_IP_PNP=y
 CONFIG_IP_PNP_DHCP=y
 # CONFIG_IP_PNP_RARP is not set
 CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
@@ -227,6 +233,7 @@ CONFIG_LZO_COMPRESS=y
 CONFIG_LZO_DECOMPRESS=y
 CONFIG_MACB=y
 CONFIG_MACB_USE_HWSTAMP=y
+# CONFIG_MCHP_EIC is not set
 CONFIG_MDIO_BUS=y
 CONFIG_MDIO_DEVICE=y
 CONFIG_MDIO_DEVRES=y
@@ -244,6 +251,7 @@ CONFIG_MFD_ATMEL_FLEXCOM=y
 CONFIG_MFD_CORE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MICREL_PHY=y
+CONFIG_MICROCHIP_CLOCKSOURCE_PIT64B=y
 CONFIG_MICROCHIP_PIT64B=y
 CONFIG_MIGHT_HAVE_CACHE_L2X0=y
 CONFIG_MIGRATION=y
@@ -272,6 +280,7 @@ CONFIG_NLS_UTF8=y
 CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 # CONFIG_NVMEM_MICROCHIP_OTPC is not set
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
@@ -285,10 +294,15 @@ CONFIG_OF_MDIO=y
 CONFIG_OLD_SIGACTION=y
 CONFIG_OLD_SIGSUSPEND3=y
 CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 CONFIG_PCCARD=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
 CONFIG_PINCTRL_AT91=y
@@ -299,6 +313,7 @@ CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_AT91_RESET=y
 CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
 CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
 # CONFIG_PREVENT_FIRMWARE_BUILD is not set
 CONFIG_PRINTK_TIME=y
 CONFIG_PTP_1588_CLOCK=y
@@ -306,6 +321,7 @@ CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_PWM=y
 CONFIG_PWM_ATMEL=y
 CONFIG_PWM_SYSFS=y
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_I2C=y
@@ -342,6 +358,7 @@ CONFIG_SND_DMAENGINE_PCM=y
 CONFIG_SND_JACK=y
 CONFIG_SND_JACK_INPUT_DEV=y
 CONFIG_SND_MCHP_SOC_I2S_MCC=y
+# CONFIG_SND_MCHP_SOC_PDMC is not set
 CONFIG_SND_MCHP_SOC_SPDIFRX=y
 CONFIG_SND_MCHP_SOC_SPDIFTX=y
 CONFIG_SND_PCM=y
@@ -354,12 +371,14 @@ CONFIG_SND_SOC_I2C_AND_SPI=y
 CONFIG_SND_SOC_PCM5102A=y
 CONFIG_SND_SOC_SPDIF=y
 CONFIG_SOC_BUS=y
+# CONFIG_SOC_LAN966 is not set
 # CONFIG_SOC_SAMA5D2 is not set
 # CONFIG_SOC_SAMA5D3 is not set
 # CONFIG_SOC_SAMA5D4 is not set
 CONFIG_SOC_SAMA7=y
 CONFIG_SOC_SAMA7G5=y
 CONFIG_SOC_SAM_V7=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SOUND=y
 CONFIG_SOUND_OSS_CORE=y
 CONFIG_SPARSE_IRQ=y
@@ -379,6 +398,7 @@ CONFIG_SWPHY=y
 CONFIG_SYSFS_DEPRECATED=y
 CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THREAD_INFO_IN_TASK=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
@@ -387,15 +407,13 @@ CONFIG_UACCESS_WITH_MEMCPY=y
 CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
 CONFIG_UNWINDER_ARM=y
 CONFIG_USE_OF=y
-CONFIG_V4L_PLATFORM_DRIVERS=y
 CONFIG_VFAT_FS=y
 CONFIG_VFP=y
 CONFIG_VFPv3=y
 # CONFIG_VIDEO_ATMEL_XISC is not set
 CONFIG_VIDEO_DEV=y
-CONFIG_VIDEO_V4L2=y
+# CONFIG_VIDEO_MICROCHIP_CSI2DC is not set
 CONFIG_VIDEO_V4L2_I2C=y
-CONFIG_VIDEO_V4L2_SUBDEV_API=y
 CONFIG_VT=y
 CONFIG_VT_CONSOLE=y
 # CONFIG_VT_HW_CONSOLE_BINDING is not set



From lede-commits at lists.infradead.org  Mon Apr 22 00:51:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 03:51:33 -0400
Subject: [openwrt/openwrt]  kernel/at91: Restore kernel files for v5.15
In-Reply-To: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
References: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
Message-ID: <mailman.29385.1713772304.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/de9ad1e704a686a7585607f1021fb8504a5d54fa

commit de9ad1e704a686a7585607f1021fb8504a5d54fa
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Apr 18 00:15:30 2024 +0200

    kernel/at91: Restore kernel files for v5.15
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 ...-clk-at91-re-factor-clocks-suspend-resume.patch | 1342 ++++++++++++++++++++
 ...c-execute-suspend-resume-only-for-backup-.patch |   89 ++
 ...k-master-add-register-definition-for-sama.patch |  124 ++
 ...k-master-improve-readability-by-using-loc.patch |   40 +
 ...c-add-sama7g5-to-the-list-of-available-pm.patch |   39 +
 ...-clk-master-mask-mckr-against-layout-mask.patch |   46 +
 ...k-sam9x60-pll-add-notifier-for-div-part-o.patch |  312 +++++
 ...-at91-clk-master-add-notifier-for-divider.patch |  519 ++++++++
 ...1-sama7g5-set-low-limit-for-mck0-at-32KHz.patch |   26 +
 ...-clk_core_get_rate_recalc-in-clk_rate_get.patch |   32 +
 target/linux/at91/sam9x/config-5.15                |  317 +++++
 target/linux/at91/sama5/config-5.15                |  493 +++++++
 target/linux/at91/sama7/config-5.15                |  406 ++++++
 13 files changed, 3785 insertions(+)

diff --git a/target/linux/at91/patches-5.15/100-clk-at91-re-factor-clocks-suspend-resume.patch b/target/linux/at91/patches-5.15/100-clk-at91-re-factor-clocks-suspend-resume.patch
new file mode 100644
index 0000000000..5d399f6535
--- /dev/null
+++ b/target/linux/at91/patches-5.15/100-clk-at91-re-factor-clocks-suspend-resume.patch
@@ -0,0 +1,1342 @@
+From 65bb4687b2a5c6f02f44345540c3389d6e7523e7 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:05 +0300
+Subject: [PATCH 234/247] clk: at91: re-factor clocks suspend/resume
+
+SAMA5D2 and SAMA7G5 have a special power saving mode (backup mode) where
+most of the SoC's components are powered off (including PMC). Resuming
+from this mode is done with the help of bootloader. Peripherals are not
+aware of the power saving mode thus most of them are disabling clocks in
+proper suspend API and re-enable them in resume API without taking into
+account the previously setup rate. Moreover some of the peripherals are
+acting as wakeup sources and are not disabling the clocks in this
+scenario, when suspending. Since backup mode cuts the power for
+peripherals, in resume part these clocks needs to be re-configured.
+
+The initial PMC suspend/resume code was designed only for SAMA5D2's PMC
+(as it was the only one supporting backup mode). SAMA7G supports also
+backup mode and its PMC is different (few new functionalities, different
+registers offsets, different offsets in registers for each
+functionalities). To address both SAMA5D2 and SAMA7G5 PMC add
+.save_context()/.resume_context() support to each clocks driver and call
+this from PMC driver.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-2-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/clk-generated.c    |  46 +++++--
+ drivers/clk/at91/clk-main.c         |  66 ++++++++++
+ drivers/clk/at91/clk-master.c       | 194 ++++++++++++++++++++++++++--
+ drivers/clk/at91/clk-peripheral.c   |  40 +++++-
+ drivers/clk/at91/clk-pll.c          |  39 ++++++
+ drivers/clk/at91/clk-programmable.c |  29 ++++-
+ drivers/clk/at91/clk-sam9x60-pll.c  |  68 +++++++++-
+ drivers/clk/at91/clk-system.c       |  20 +++
+ drivers/clk/at91/clk-usb.c          |  27 ++++
+ drivers/clk/at91/clk-utmi.c         |  39 ++++++
+ drivers/clk/at91/pmc.c              | 147 +--------------------
+ drivers/clk/at91/pmc.h              |  24 ++--
+ 12 files changed, 558 insertions(+), 181 deletions(-)
+
+--- a/drivers/clk/at91/clk-generated.c
++++ b/drivers/clk/at91/clk-generated.c
+@@ -27,6 +27,7 @@ struct clk_generated {
+ 	u32 id;
+ 	u32 gckdiv;
+ 	const struct clk_pcr_layout *layout;
++	struct at91_clk_pms pms;
+ 	u8 parent_id;
+ 	int chg_pid;
+ };
+@@ -34,25 +35,35 @@ struct clk_generated {
+ #define to_clk_generated(hw) \
+ 	container_of(hw, struct clk_generated, hw)
+ 
+-static int clk_generated_enable(struct clk_hw *hw)
++static int clk_generated_set(struct clk_generated *gck, int status)
+ {
+-	struct clk_generated *gck = to_clk_generated(hw);
+ 	unsigned long flags;
+-
+-	pr_debug("GCLK: %s, gckdiv = %d, parent id = %d\n",
+-		 __func__, gck->gckdiv, gck->parent_id);
++	unsigned int enable = status ? AT91_PMC_PCR_GCKEN : 0;
+ 
+ 	spin_lock_irqsave(gck->lock, flags);
+ 	regmap_write(gck->regmap, gck->layout->offset,
+ 		     (gck->id & gck->layout->pid_mask));
+ 	regmap_update_bits(gck->regmap, gck->layout->offset,
+ 			   AT91_PMC_PCR_GCKDIV_MASK | gck->layout->gckcss_mask |
+-			   gck->layout->cmd | AT91_PMC_PCR_GCKEN,
++			   gck->layout->cmd | enable,
+ 			   field_prep(gck->layout->gckcss_mask, gck->parent_id) |
+ 			   gck->layout->cmd |
+ 			   FIELD_PREP(AT91_PMC_PCR_GCKDIV_MASK, gck->gckdiv) |
+-			   AT91_PMC_PCR_GCKEN);
++			   enable);
+ 	spin_unlock_irqrestore(gck->lock, flags);
++
++	return 0;
++}
++
++static int clk_generated_enable(struct clk_hw *hw)
++{
++	struct clk_generated *gck = to_clk_generated(hw);
++
++	pr_debug("GCLK: %s, gckdiv = %d, parent id = %d\n",
++		 __func__, gck->gckdiv, gck->parent_id);
++
++	clk_generated_set(gck, 1);
++
+ 	return 0;
+ }
+ 
+@@ -249,6 +260,23 @@ static int clk_generated_set_rate(struct
+ 	return 0;
+ }
+ 
++static int clk_generated_save_context(struct clk_hw *hw)
++{
++	struct clk_generated *gck = to_clk_generated(hw);
++
++	gck->pms.status = clk_generated_is_enabled(&gck->hw);
++
++	return 0;
++}
++
++static void clk_generated_restore_context(struct clk_hw *hw)
++{
++	struct clk_generated *gck = to_clk_generated(hw);
++
++	if (gck->pms.status)
++		clk_generated_set(gck, gck->pms.status);
++}
++
+ static const struct clk_ops generated_ops = {
+ 	.enable = clk_generated_enable,
+ 	.disable = clk_generated_disable,
+@@ -258,6 +286,8 @@ static const struct clk_ops generated_op
+ 	.get_parent = clk_generated_get_parent,
+ 	.set_parent = clk_generated_set_parent,
+ 	.set_rate = clk_generated_set_rate,
++	.save_context = clk_generated_save_context,
++	.restore_context = clk_generated_restore_context,
+ };
+ 
+ /**
+@@ -324,8 +354,6 @@ at91_clk_register_generated(struct regma
+ 	if (ret) {
+ 		kfree(gck);
+ 		hw = ERR_PTR(ret);
+-	} else {
+-		pmc_register_id(id);
+ 	}
+ 
+ 	return hw;
+--- a/drivers/clk/at91/clk-main.c
++++ b/drivers/clk/at91/clk-main.c
+@@ -28,6 +28,7 @@
+ struct clk_main_osc {
+ 	struct clk_hw hw;
+ 	struct regmap *regmap;
++	struct at91_clk_pms pms;
+ };
+ 
+ #define to_clk_main_osc(hw) container_of(hw, struct clk_main_osc, hw)
+@@ -37,6 +38,7 @@ struct clk_main_rc_osc {
+ 	struct regmap *regmap;
+ 	unsigned long frequency;
+ 	unsigned long accuracy;
++	struct at91_clk_pms pms;
+ };
+ 
+ #define to_clk_main_rc_osc(hw) container_of(hw, struct clk_main_rc_osc, hw)
+@@ -51,6 +53,7 @@ struct clk_rm9200_main {
+ struct clk_sam9x5_main {
+ 	struct clk_hw hw;
+ 	struct regmap *regmap;
++	struct at91_clk_pms pms;
+ 	u8 parent;
+ };
+ 
+@@ -120,10 +123,29 @@ static int clk_main_osc_is_prepared(stru
+ 	return (status & AT91_PMC_MOSCS) && clk_main_parent_select(tmp);
+ }
+ 
++static int clk_main_osc_save_context(struct clk_hw *hw)
++{
++	struct clk_main_osc *osc = to_clk_main_osc(hw);
++
++	osc->pms.status = clk_main_osc_is_prepared(hw);
++
++	return 0;
++}
++
++static void clk_main_osc_restore_context(struct clk_hw *hw)
++{
++	struct clk_main_osc *osc = to_clk_main_osc(hw);
++
++	if (osc->pms.status)
++		clk_main_osc_prepare(hw);
++}
++
+ static const struct clk_ops main_osc_ops = {
+ 	.prepare = clk_main_osc_prepare,
+ 	.unprepare = clk_main_osc_unprepare,
+ 	.is_prepared = clk_main_osc_is_prepared,
++	.save_context = clk_main_osc_save_context,
++	.restore_context = clk_main_osc_restore_context,
+ };
+ 
+ struct clk_hw * __init
+@@ -240,12 +262,31 @@ static unsigned long clk_main_rc_osc_rec
+ 	return osc->accuracy;
+ }
+ 
++static int clk_main_rc_osc_save_context(struct clk_hw *hw)
++{
++	struct clk_main_rc_osc *osc = to_clk_main_rc_osc(hw);
++
++	osc->pms.status = clk_main_rc_osc_is_prepared(hw);
++
++	return 0;
++}
++
++static void clk_main_rc_osc_restore_context(struct clk_hw *hw)
++{
++	struct clk_main_rc_osc *osc = to_clk_main_rc_osc(hw);
++
++	if (osc->pms.status)
++		clk_main_rc_osc_prepare(hw);
++}
++
+ static const struct clk_ops main_rc_osc_ops = {
+ 	.prepare = clk_main_rc_osc_prepare,
+ 	.unprepare = clk_main_rc_osc_unprepare,
+ 	.is_prepared = clk_main_rc_osc_is_prepared,
+ 	.recalc_rate = clk_main_rc_osc_recalc_rate,
+ 	.recalc_accuracy = clk_main_rc_osc_recalc_accuracy,
++	.save_context = clk_main_rc_osc_save_context,
++	.restore_context = clk_main_rc_osc_restore_context,
+ };
+ 
+ struct clk_hw * __init
+@@ -465,12 +506,37 @@ static u8 clk_sam9x5_main_get_parent(str
+ 	return clk_main_parent_select(status);
+ }
+ 
++static int clk_sam9x5_main_save_context(struct clk_hw *hw)
++{
++	struct clk_sam9x5_main *clkmain = to_clk_sam9x5_main(hw);
++
++	clkmain->pms.status = clk_main_rc_osc_is_prepared(&clkmain->hw);
++	clkmain->pms.parent = clk_sam9x5_main_get_parent(&clkmain->hw);
++
++	return 0;
++}
++
++static void clk_sam9x5_main_restore_context(struct clk_hw *hw)
++{
++	struct clk_sam9x5_main *clkmain = to_clk_sam9x5_main(hw);
++	int ret;
++
++	ret = clk_sam9x5_main_set_parent(hw, clkmain->pms.parent);
++	if (ret)
++		return;
++
++	if (clkmain->pms.status)
++		clk_sam9x5_main_prepare(hw);
++}
++
+ static const struct clk_ops sam9x5_main_ops = {
+ 	.prepare = clk_sam9x5_main_prepare,
+ 	.is_prepared = clk_sam9x5_main_is_prepared,
+ 	.recalc_rate = clk_sam9x5_main_recalc_rate,
+ 	.set_parent = clk_sam9x5_main_set_parent,
+ 	.get_parent = clk_sam9x5_main_get_parent,
++	.save_context = clk_sam9x5_main_save_context,
++	.restore_context = clk_sam9x5_main_restore_context,
+ };
+ 
+ struct clk_hw * __init
+--- a/drivers/clk/at91/clk-master.c
++++ b/drivers/clk/at91/clk-master.c
+@@ -37,6 +37,7 @@ struct clk_master {
+ 	spinlock_t *lock;
+ 	const struct clk_master_layout *layout;
+ 	const struct clk_master_characteristics *characteristics;
++	struct at91_clk_pms pms;
+ 	u32 *mux_table;
+ 	u32 mckr;
+ 	int chg_pid;
+@@ -112,10 +113,52 @@ static unsigned long clk_master_div_reca
+ 	return rate;
+ }
+ 
++static int clk_master_div_save_context(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
++	unsigned long flags;
++	unsigned int mckr, div;
++
++	spin_lock_irqsave(master->lock, flags);
++	regmap_read(master->regmap, master->layout->offset, &mckr);
++	spin_unlock_irqrestore(master->lock, flags);
++
++	mckr &= master->layout->mask;
++	div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
++	div = master->characteristics->divisors[div];
++
++	master->pms.parent_rate = clk_hw_get_rate(parent_hw);
++	master->pms.rate = DIV_ROUND_CLOSEST(master->pms.parent_rate, div);
++
++	return 0;
++}
++
++static void clk_master_div_restore_context(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++	unsigned long flags;
++	unsigned int mckr;
++	u8 div;
++
++	spin_lock_irqsave(master->lock, flags);
++	regmap_read(master->regmap, master->layout->offset, &mckr);
++	spin_unlock_irqrestore(master->lock, flags);
++
++	mckr &= master->layout->mask;
++	div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
++	div = master->characteristics->divisors[div];
++
++	if (div != DIV_ROUND_CLOSEST(master->pms.parent_rate, master->pms.rate))
++		pr_warn("MCKR DIV not configured properly by firmware!\n");
++}
++
+ static const struct clk_ops master_div_ops = {
+ 	.prepare = clk_master_prepare,
+ 	.is_prepared = clk_master_is_prepared,
+ 	.recalc_rate = clk_master_div_recalc_rate,
++	.save_context = clk_master_div_save_context,
++	.restore_context = clk_master_div_restore_context,
+ };
+ 
+ static int clk_master_div_set_rate(struct clk_hw *hw, unsigned long rate,
+@@ -125,7 +168,9 @@ static int clk_master_div_set_rate(struc
+ 	const struct clk_master_characteristics *characteristics =
+ 						master->characteristics;
+ 	unsigned long flags;
++	unsigned int mckr, tmp;
+ 	int div, i;
++	int ret;
+ 
+ 	div = DIV_ROUND_CLOSEST(parent_rate, rate);
+ 	if (div > ARRAY_SIZE(characteristics->divisors))
+@@ -145,11 +190,24 @@ static int clk_master_div_set_rate(struc
+ 		return -EINVAL;
+ 
+ 	spin_lock_irqsave(master->lock, flags);
+-	regmap_update_bits(master->regmap, master->layout->offset,
+-			   (MASTER_DIV_MASK << MASTER_DIV_SHIFT),
+-			   (div << MASTER_DIV_SHIFT));
++	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
++	if (ret)
++		goto unlock;
++
++	tmp = mckr & master->layout->mask;
++	tmp = (tmp >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
++	if (tmp == div)
++		goto unlock;
++
++	mckr &= ~(MASTER_DIV_MASK << MASTER_DIV_SHIFT);
++	mckr |= (div << MASTER_DIV_SHIFT);
++	ret = regmap_write(master->regmap, master->layout->offset, mckr);
++	if (ret)
++		goto unlock;
++
+ 	while (!clk_master_ready(master))
+ 		cpu_relax();
++unlock:
+ 	spin_unlock_irqrestore(master->lock, flags);
+ 
+ 	return 0;
+@@ -197,12 +255,25 @@ static int clk_master_div_determine_rate
+ 	return 0;
+ }
+ 
++static void clk_master_div_restore_context_chg(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++	int ret;
++
++	ret = clk_master_div_set_rate(hw, master->pms.rate,
++				      master->pms.parent_rate);
++	if (ret)
++		pr_warn("Failed to restore MCK DIV clock\n");
++}
++
+ static const struct clk_ops master_div_ops_chg = {
+ 	.prepare = clk_master_prepare,
+ 	.is_prepared = clk_master_is_prepared,
+ 	.recalc_rate = clk_master_div_recalc_rate,
+ 	.determine_rate = clk_master_div_determine_rate,
+ 	.set_rate = clk_master_div_set_rate,
++	.save_context = clk_master_div_save_context,
++	.restore_context = clk_master_div_restore_context_chg,
+ };
+ 
+ static void clk_sama7g5_master_best_diff(struct clk_rate_request *req,
+@@ -272,7 +343,8 @@ static int clk_master_pres_set_rate(stru
+ {
+ 	struct clk_master *master = to_clk_master(hw);
+ 	unsigned long flags;
+-	unsigned int pres;
++	unsigned int pres, mckr, tmp;
++	int ret;
+ 
+ 	pres = DIV_ROUND_CLOSEST(parent_rate, rate);
+ 	if (pres > MASTER_PRES_MAX)
+@@ -284,15 +356,27 @@ static int clk_master_pres_set_rate(stru
+ 		pres = ffs(pres) - 1;
+ 
+ 	spin_lock_irqsave(master->lock, flags);
+-	regmap_update_bits(master->regmap, master->layout->offset,
+-			   (MASTER_PRES_MASK << master->layout->pres_shift),
+-			   (pres << master->layout->pres_shift));
++	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
++	if (ret)
++		goto unlock;
++
++	mckr &= master->layout->mask;
++	tmp = (mckr >> master->layout->pres_shift) & MASTER_PRES_MASK;
++	if (pres == tmp)
++		goto unlock;
++
++	mckr &= ~(MASTER_PRES_MASK << master->layout->pres_shift);
++	mckr |= (pres << master->layout->pres_shift);
++	ret = regmap_write(master->regmap, master->layout->offset, mckr);
++	if (ret)
++		goto unlock;
+ 
+ 	while (!clk_master_ready(master))
+ 		cpu_relax();
++unlock:
+ 	spin_unlock_irqrestore(master->lock, flags);
+ 
+-	return 0;
++	return ret;
+ }
+ 
+ static unsigned long clk_master_pres_recalc_rate(struct clk_hw *hw,
+@@ -330,11 +414,68 @@ static u8 clk_master_pres_get_parent(str
+ 	return mckr & AT91_PMC_CSS;
+ }
+ 
++static int clk_master_pres_save_context(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
++	unsigned long flags;
++	unsigned int val, pres;
++
++	spin_lock_irqsave(master->lock, flags);
++	regmap_read(master->regmap, master->layout->offset, &val);
++	spin_unlock_irqrestore(master->lock, flags);
++
++	val &= master->layout->mask;
++	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
++	if (pres == MASTER_PRES_MAX && master->characteristics->have_div3_pres)
++		pres = 3;
++	else
++		pres = (1 << pres);
++
++	master->pms.parent = val & AT91_PMC_CSS;
++	master->pms.parent_rate = clk_hw_get_rate(parent_hw);
++	master->pms.rate = DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres);
++
++	return 0;
++}
++
++static void clk_master_pres_restore_context(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++	unsigned long flags;
++	unsigned int val, pres;
++
++	spin_lock_irqsave(master->lock, flags);
++	regmap_read(master->regmap, master->layout->offset, &val);
++	spin_unlock_irqrestore(master->lock, flags);
++
++	val &= master->layout->mask;
++	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
++	if (pres == MASTER_PRES_MAX && master->characteristics->have_div3_pres)
++		pres = 3;
++	else
++		pres = (1 << pres);
++
++	if (master->pms.rate !=
++	    DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres) ||
++	    (master->pms.parent != (val & AT91_PMC_CSS)))
++		pr_warn("MCKR PRES was not configured properly by firmware!\n");
++}
++
++static void clk_master_pres_restore_context_chg(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++
++	clk_master_pres_set_rate(hw, master->pms.rate, master->pms.parent_rate);
++}
++
+ static const struct clk_ops master_pres_ops = {
+ 	.prepare = clk_master_prepare,
+ 	.is_prepared = clk_master_is_prepared,
+ 	.recalc_rate = clk_master_pres_recalc_rate,
+ 	.get_parent = clk_master_pres_get_parent,
++	.save_context = clk_master_pres_save_context,
++	.restore_context = clk_master_pres_restore_context,
+ };
+ 
+ static const struct clk_ops master_pres_ops_chg = {
+@@ -344,6 +485,8 @@ static const struct clk_ops master_pres_
+ 	.recalc_rate = clk_master_pres_recalc_rate,
+ 	.get_parent = clk_master_pres_get_parent,
+ 	.set_rate = clk_master_pres_set_rate,
++	.save_context = clk_master_pres_save_context,
++	.restore_context = clk_master_pres_restore_context_chg,
+ };
+ 
+ static struct clk_hw * __init
+@@ -539,20 +682,21 @@ static int clk_sama7g5_master_set_parent
+ 	return 0;
+ }
+ 
+-static int clk_sama7g5_master_enable(struct clk_hw *hw)
++static void clk_sama7g5_master_set(struct clk_master *master,
++				   unsigned int status)
+ {
+-	struct clk_master *master = to_clk_master(hw);
+ 	unsigned long flags;
+ 	unsigned int val, cparent;
++	unsigned int enable = status ? PMC_MCR_EN : 0;
+ 
+ 	spin_lock_irqsave(master->lock, flags);
+ 
+ 	regmap_write(master->regmap, PMC_MCR, PMC_MCR_ID(master->id));
+ 	regmap_read(master->regmap, PMC_MCR, &val);
+ 	regmap_update_bits(master->regmap, PMC_MCR,
+-			   PMC_MCR_EN | PMC_MCR_CSS | PMC_MCR_DIV |
++			   enable | PMC_MCR_CSS | PMC_MCR_DIV |
+ 			   PMC_MCR_CMD | PMC_MCR_ID_MSK,
+-			   PMC_MCR_EN | (master->parent << PMC_MCR_CSS_SHIFT) |
++			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
+ 			   (master->div << MASTER_DIV_SHIFT) |
+ 			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
+ 
+@@ -563,6 +707,13 @@ static int clk_sama7g5_master_enable(str
+ 		cpu_relax();
+ 
+ 	spin_unlock_irqrestore(master->lock, flags);
++}
++
++static int clk_sama7g5_master_enable(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++
++	clk_sama7g5_master_set(master, 1);
+ 
+ 	return 0;
+ }
+@@ -620,6 +771,23 @@ static int clk_sama7g5_master_set_rate(s
+ 	return 0;
+ }
+ 
++static int clk_sama7g5_master_save_context(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++
++	master->pms.status = clk_sama7g5_master_is_enabled(hw);
++
++	return 0;
++}
++
++static void clk_sama7g5_master_restore_context(struct clk_hw *hw)
++{
++	struct clk_master *master = to_clk_master(hw);
++
++	if (master->pms.status)
++		clk_sama7g5_master_set(master, master->pms.status);
++}
++
+ static const struct clk_ops sama7g5_master_ops = {
+ 	.enable = clk_sama7g5_master_enable,
+ 	.disable = clk_sama7g5_master_disable,
+@@ -629,6 +797,8 @@ static const struct clk_ops sama7g5_mast
+ 	.set_rate = clk_sama7g5_master_set_rate,
+ 	.get_parent = clk_sama7g5_master_get_parent,
+ 	.set_parent = clk_sama7g5_master_set_parent,
++	.save_context = clk_sama7g5_master_save_context,
++	.restore_context = clk_sama7g5_master_restore_context,
+ };
+ 
+ struct clk_hw * __init
+--- a/drivers/clk/at91/clk-peripheral.c
++++ b/drivers/clk/at91/clk-peripheral.c
+@@ -37,6 +37,7 @@ struct clk_sam9x5_peripheral {
+ 	u32 id;
+ 	u32 div;
+ 	const struct clk_pcr_layout *layout;
++	struct at91_clk_pms pms;
+ 	bool auto_div;
+ 	int chg_pid;
+ };
+@@ -155,10 +156,11 @@ static void clk_sam9x5_peripheral_autodi
+ 	periph->div = shift;
+ }
+ 
+-static int clk_sam9x5_peripheral_enable(struct clk_hw *hw)
++static int clk_sam9x5_peripheral_set(struct clk_sam9x5_peripheral *periph,
++				     unsigned int status)
+ {
+-	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
+ 	unsigned long flags;
++	unsigned int enable = status ? AT91_PMC_PCR_EN : 0;
+ 
+ 	if (periph->id < PERIPHERAL_ID_MIN)
+ 		return 0;
+@@ -168,15 +170,21 @@ static int clk_sam9x5_peripheral_enable(
+ 		     (periph->id & periph->layout->pid_mask));
+ 	regmap_update_bits(periph->regmap, periph->layout->offset,
+ 			   periph->layout->div_mask | periph->layout->cmd |
+-			   AT91_PMC_PCR_EN,
++			   enable,
+ 			   field_prep(periph->layout->div_mask, periph->div) |
+-			   periph->layout->cmd |
+-			   AT91_PMC_PCR_EN);
++			   periph->layout->cmd | enable);
+ 	spin_unlock_irqrestore(periph->lock, flags);
+ 
+ 	return 0;
+ }
+ 
++static int clk_sam9x5_peripheral_enable(struct clk_hw *hw)
++{
++	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
++
++	return clk_sam9x5_peripheral_set(periph, 1);
++}
++
+ static void clk_sam9x5_peripheral_disable(struct clk_hw *hw)
+ {
+ 	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
+@@ -393,6 +401,23 @@ static int clk_sam9x5_peripheral_set_rat
+ 	return -EINVAL;
+ }
+ 
++static int clk_sam9x5_peripheral_save_context(struct clk_hw *hw)
++{
++	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
++
++	periph->pms.status = clk_sam9x5_peripheral_is_enabled(hw);
++
++	return 0;
++}
++
++static void clk_sam9x5_peripheral_restore_context(struct clk_hw *hw)
++{
++	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
++
++	if (periph->pms.status)
++		clk_sam9x5_peripheral_set(periph, periph->pms.status);
++}
++
+ static const struct clk_ops sam9x5_peripheral_ops = {
+ 	.enable = clk_sam9x5_peripheral_enable,
+ 	.disable = clk_sam9x5_peripheral_disable,
+@@ -400,6 +425,8 @@ static const struct clk_ops sam9x5_perip
+ 	.recalc_rate = clk_sam9x5_peripheral_recalc_rate,
+ 	.round_rate = clk_sam9x5_peripheral_round_rate,
+ 	.set_rate = clk_sam9x5_peripheral_set_rate,
++	.save_context = clk_sam9x5_peripheral_save_context,
++	.restore_context = clk_sam9x5_peripheral_restore_context,
+ };
+ 
+ static const struct clk_ops sam9x5_peripheral_chg_ops = {
+@@ -409,6 +436,8 @@ static const struct clk_ops sam9x5_perip
+ 	.recalc_rate = clk_sam9x5_peripheral_recalc_rate,
+ 	.determine_rate = clk_sam9x5_peripheral_determine_rate,
+ 	.set_rate = clk_sam9x5_peripheral_set_rate,
++	.save_context = clk_sam9x5_peripheral_save_context,
++	.restore_context = clk_sam9x5_peripheral_restore_context,
+ };
+ 
+ struct clk_hw * __init
+@@ -460,7 +489,6 @@ at91_clk_register_sam9x5_peripheral(stru
+ 		hw = ERR_PTR(ret);
+ 	} else {
+ 		clk_sam9x5_peripheral_autodiv(periph);
+-		pmc_register_id(id);
+ 	}
+ 
+ 	return hw;
+--- a/drivers/clk/at91/clk-pll.c
++++ b/drivers/clk/at91/clk-pll.c
+@@ -40,6 +40,7 @@ struct clk_pll {
+ 	u16 mul;
+ 	const struct clk_pll_layout *layout;
+ 	const struct clk_pll_characteristics *characteristics;
++	struct at91_clk_pms pms;
+ };
+ 
+ static inline bool clk_pll_ready(struct regmap *regmap, int id)
+@@ -260,6 +261,42 @@ static int clk_pll_set_rate(struct clk_h
+ 	return 0;
+ }
+ 
++static int clk_pll_save_context(struct clk_hw *hw)
++{
++	struct clk_pll *pll = to_clk_pll(hw);
++	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
++
++	pll->pms.parent_rate = clk_hw_get_rate(parent_hw);
++	pll->pms.rate = clk_pll_recalc_rate(&pll->hw, pll->pms.parent_rate);
++	pll->pms.status = clk_pll_ready(pll->regmap, PLL_REG(pll->id));
++
++	return 0;
++}
++
++static void clk_pll_restore_context(struct clk_hw *hw)
++{
++	struct clk_pll *pll = to_clk_pll(hw);
++	unsigned long calc_rate;
++	unsigned int pllr, pllr_out, pllr_count;
++	u8 out = 0;
++
++	if (pll->characteristics->out)
++		out = pll->characteristics->out[pll->range];
++
++	regmap_read(pll->regmap, PLL_REG(pll->id), &pllr);
++
++	calc_rate = (pll->pms.parent_rate / PLL_DIV(pllr)) *
++		     (PLL_MUL(pllr, pll->layout) + 1);
++	pllr_count = (pllr >> PLL_COUNT_SHIFT) & PLL_MAX_COUNT;
++	pllr_out = (pllr >> PLL_OUT_SHIFT) & out;
++
++	if (pll->pms.rate != calc_rate ||
++	    pll->pms.status != clk_pll_ready(pll->regmap, PLL_REG(pll->id)) ||
++	    pllr_count != PLL_MAX_COUNT ||
++	    (out && pllr_out != out))
++		pr_warn("PLLAR was not configured properly by firmware\n");
++}
++
+ static const struct clk_ops pll_ops = {
+ 	.prepare = clk_pll_prepare,
+ 	.unprepare = clk_pll_unprepare,
+@@ -267,6 +304,8 @@ static const struct clk_ops pll_ops = {
+ 	.recalc_rate = clk_pll_recalc_rate,
+ 	.round_rate = clk_pll_round_rate,
+ 	.set_rate = clk_pll_set_rate,
++	.save_context = clk_pll_save_context,
++	.restore_context = clk_pll_restore_context,
+ };
+ 
+ struct clk_hw * __init
+--- a/drivers/clk/at91/clk-programmable.c
++++ b/drivers/clk/at91/clk-programmable.c
+@@ -24,6 +24,7 @@ struct clk_programmable {
+ 	u32 *mux_table;
+ 	u8 id;
+ 	const struct clk_programmable_layout *layout;
++	struct at91_clk_pms pms;
+ };
+ 
+ #define to_clk_programmable(hw) container_of(hw, struct clk_programmable, hw)
+@@ -177,12 +178,38 @@ static int clk_programmable_set_rate(str
+ 	return 0;
+ }
+ 
++static int clk_programmable_save_context(struct clk_hw *hw)
++{
++	struct clk_programmable *prog = to_clk_programmable(hw);
++	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
++
++	prog->pms.parent = clk_programmable_get_parent(hw);
++	prog->pms.parent_rate = clk_hw_get_rate(parent_hw);
++	prog->pms.rate = clk_programmable_recalc_rate(hw, prog->pms.parent_rate);
++
++	return 0;
++}
++
++static void clk_programmable_restore_context(struct clk_hw *hw)
++{
++	struct clk_programmable *prog = to_clk_programmable(hw);
++	int ret;
++
++	ret = clk_programmable_set_parent(hw, prog->pms.parent);
++	if (ret)
++		return;
++
++	clk_programmable_set_rate(hw, prog->pms.rate, prog->pms.parent_rate);
++}
++
+ static const struct clk_ops programmable_ops = {
+ 	.recalc_rate = clk_programmable_recalc_rate,
+ 	.determine_rate = clk_programmable_determine_rate,
+ 	.get_parent = clk_programmable_get_parent,
+ 	.set_parent = clk_programmable_set_parent,
+ 	.set_rate = clk_programmable_set_rate,
++	.save_context = clk_programmable_save_context,
++	.restore_context = clk_programmable_restore_context,
+ };
+ 
+ struct clk_hw * __init
+@@ -221,8 +248,6 @@ at91_clk_register_programmable(struct re
+ 	if (ret) {
+ 		kfree(prog);
+ 		hw = ERR_PTR(ret);
+-	} else {
+-		pmc_register_pck(id);
+ 	}
+ 
+ 	return hw;
+--- a/drivers/clk/at91/clk-sam9x60-pll.c
++++ b/drivers/clk/at91/clk-sam9x60-pll.c
+@@ -38,12 +38,14 @@ struct sam9x60_pll_core {
+ 
+ struct sam9x60_frac {
+ 	struct sam9x60_pll_core core;
++	struct at91_clk_pms pms;
+ 	u32 frac;
+ 	u16 mul;
+ };
+ 
+ struct sam9x60_div {
+ 	struct sam9x60_pll_core core;
++	struct at91_clk_pms pms;
+ 	u8 div;
+ };
+ 
+@@ -75,9 +77,8 @@ static unsigned long sam9x60_frac_pll_re
+ 		DIV_ROUND_CLOSEST_ULL((u64)parent_rate * frac->frac, (1 << 22));
+ }
+ 
+-static int sam9x60_frac_pll_prepare(struct clk_hw *hw)
++static int sam9x60_frac_pll_set(struct sam9x60_pll_core *core)
+ {
+-	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
+ 	struct sam9x60_frac *frac = to_sam9x60_frac(core);
+ 	struct regmap *regmap = core->regmap;
+ 	unsigned int val, cfrac, cmul;
+@@ -141,6 +142,13 @@ unlock:
+ 	return 0;
+ }
+ 
++static int sam9x60_frac_pll_prepare(struct clk_hw *hw)
++{
++	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
++
++	return sam9x60_frac_pll_set(core);
++}
++
+ static void sam9x60_frac_pll_unprepare(struct clk_hw *hw)
+ {
+ 	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
+@@ -280,6 +288,25 @@ unlock:
+ 	return ret;
+ }
+ 
++static int sam9x60_frac_pll_save_context(struct clk_hw *hw)
++{
++	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
++	struct sam9x60_frac *frac = to_sam9x60_frac(core);
++
++	frac->pms.status = sam9x60_pll_ready(core->regmap, core->id);
++
++	return 0;
++}
++
++static void sam9x60_frac_pll_restore_context(struct clk_hw *hw)
++{
++	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
++	struct sam9x60_frac *frac = to_sam9x60_frac(core);
++
++	if (frac->pms.status)
++		sam9x60_frac_pll_set(core);
++}
++
+ static const struct clk_ops sam9x60_frac_pll_ops = {
+ 	.prepare = sam9x60_frac_pll_prepare,
+ 	.unprepare = sam9x60_frac_pll_unprepare,
+@@ -287,6 +314,8 @@ static const struct clk_ops sam9x60_frac
+ 	.recalc_rate = sam9x60_frac_pll_recalc_rate,
+ 	.round_rate = sam9x60_frac_pll_round_rate,
+ 	.set_rate = sam9x60_frac_pll_set_rate,
++	.save_context = sam9x60_frac_pll_save_context,
++	.restore_context = sam9x60_frac_pll_restore_context,
+ };
+ 
+ static const struct clk_ops sam9x60_frac_pll_ops_chg = {
+@@ -296,11 +325,12 @@ static const struct clk_ops sam9x60_frac
+ 	.recalc_rate = sam9x60_frac_pll_recalc_rate,
+ 	.round_rate = sam9x60_frac_pll_round_rate,
+ 	.set_rate = sam9x60_frac_pll_set_rate_chg,
++	.save_context = sam9x60_frac_pll_save_context,
++	.restore_context = sam9x60_frac_pll_restore_context,
+ };
+ 
+-static int sam9x60_div_pll_prepare(struct clk_hw *hw)
++static int sam9x60_div_pll_set(struct sam9x60_pll_core *core)
+ {
+-	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
+ 	struct sam9x60_div *div = to_sam9x60_div(core);
+ 	struct regmap *regmap = core->regmap;
+ 	unsigned long flags;
+@@ -334,6 +364,13 @@ unlock:
+ 	return 0;
+ }
+ 
++static int sam9x60_div_pll_prepare(struct clk_hw *hw)
++{
++	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
++
++	return sam9x60_div_pll_set(core);
++}
++
+ static void sam9x60_div_pll_unprepare(struct clk_hw *hw)
+ {
+ 	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
+@@ -482,6 +519,25 @@ unlock:
+ 	return 0;
+ }
+ 
++static int sam9x60_div_pll_save_context(struct clk_hw *hw)
++{
++	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
++	struct sam9x60_div *div = to_sam9x60_div(core);
++
++	div->pms.status = sam9x60_div_pll_is_prepared(hw);
++
++	return 0;
++}
++
++static void sam9x60_div_pll_restore_context(struct clk_hw *hw)
++{
++	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
++	struct sam9x60_div *div = to_sam9x60_div(core);
++
++	if (div->pms.status)
++		sam9x60_div_pll_set(core);
++}
++
+ static const struct clk_ops sam9x60_div_pll_ops = {
+ 	.prepare = sam9x60_div_pll_prepare,
+ 	.unprepare = sam9x60_div_pll_unprepare,
+@@ -489,6 +545,8 @@ static const struct clk_ops sam9x60_div_
+ 	.recalc_rate = sam9x60_div_pll_recalc_rate,
+ 	.round_rate = sam9x60_div_pll_round_rate,
+ 	.set_rate = sam9x60_div_pll_set_rate,
++	.save_context = sam9x60_div_pll_save_context,
++	.restore_context = sam9x60_div_pll_restore_context,
+ };
+ 
+ static const struct clk_ops sam9x60_div_pll_ops_chg = {
+@@ -498,6 +556,8 @@ static const struct clk_ops sam9x60_div_
+ 	.recalc_rate = sam9x60_div_pll_recalc_rate,
+ 	.round_rate = sam9x60_div_pll_round_rate,
+ 	.set_rate = sam9x60_div_pll_set_rate_chg,
++	.save_context = sam9x60_div_pll_save_context,
++	.restore_context = sam9x60_div_pll_restore_context,
+ };
+ 
+ struct clk_hw * __init
+--- a/drivers/clk/at91/clk-system.c
++++ b/drivers/clk/at91/clk-system.c
+@@ -20,6 +20,7 @@
+ struct clk_system {
+ 	struct clk_hw hw;
+ 	struct regmap *regmap;
++	struct at91_clk_pms pms;
+ 	u8 id;
+ };
+ 
+@@ -77,10 +78,29 @@ static int clk_system_is_prepared(struct
+ 	return !!(status & (1 << sys->id));
+ }
+ 
++static int clk_system_save_context(struct clk_hw *hw)
++{
++	struct clk_system *sys = to_clk_system(hw);
++
++	sys->pms.status = clk_system_is_prepared(hw);
++
++	return 0;
++}
++
++static void clk_system_restore_context(struct clk_hw *hw)
++{
++	struct clk_system *sys = to_clk_system(hw);
++
++	if (sys->pms.status)
++		clk_system_prepare(&sys->hw);
++}
++
+ static const struct clk_ops system_ops = {
+ 	.prepare = clk_system_prepare,
+ 	.unprepare = clk_system_unprepare,
+ 	.is_prepared = clk_system_is_prepared,
++	.save_context = clk_system_save_context,
++	.restore_context = clk_system_restore_context,
+ };
+ 
+ struct clk_hw * __init
+--- a/drivers/clk/at91/clk-usb.c
++++ b/drivers/clk/at91/clk-usb.c
+@@ -24,6 +24,7 @@
+ struct at91sam9x5_clk_usb {
+ 	struct clk_hw hw;
+ 	struct regmap *regmap;
++	struct at91_clk_pms pms;
+ 	u32 usbs_mask;
+ 	u8 num_parents;
+ };
+@@ -148,12 +149,38 @@ static int at91sam9x5_clk_usb_set_rate(s
+ 	return 0;
+ }
+ 
++static int at91sam9x5_usb_save_context(struct clk_hw *hw)
++{
++	struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw);
++	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
++
++	usb->pms.parent = at91sam9x5_clk_usb_get_parent(hw);
++	usb->pms.parent_rate = clk_hw_get_rate(parent_hw);
++	usb->pms.rate = at91sam9x5_clk_usb_recalc_rate(hw, usb->pms.parent_rate);
++
++	return 0;
++}
++
++static void at91sam9x5_usb_restore_context(struct clk_hw *hw)
++{
++	struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw);
++	int ret;
++
++	ret = at91sam9x5_clk_usb_set_parent(hw, usb->pms.parent);
++	if (ret)
++		return;
++
++	at91sam9x5_clk_usb_set_rate(hw, usb->pms.rate, usb->pms.parent_rate);
++}
++
+ static const struct clk_ops at91sam9x5_usb_ops = {
+ 	.recalc_rate = at91sam9x5_clk_usb_recalc_rate,
+ 	.determine_rate = at91sam9x5_clk_usb_determine_rate,
+ 	.get_parent = at91sam9x5_clk_usb_get_parent,
+ 	.set_parent = at91sam9x5_clk_usb_set_parent,
+ 	.set_rate = at91sam9x5_clk_usb_set_rate,
++	.save_context = at91sam9x5_usb_save_context,
++	.restore_context = at91sam9x5_usb_restore_context,
+ };
+ 
+ static int at91sam9n12_clk_usb_enable(struct clk_hw *hw)
+--- a/drivers/clk/at91/clk-utmi.c
++++ b/drivers/clk/at91/clk-utmi.c
+@@ -23,6 +23,7 @@ struct clk_utmi {
+ 	struct clk_hw hw;
+ 	struct regmap *regmap_pmc;
+ 	struct regmap *regmap_sfr;
++	struct at91_clk_pms pms;
+ };
+ 
+ #define to_clk_utmi(hw) container_of(hw, struct clk_utmi, hw)
+@@ -113,11 +114,30 @@ static unsigned long clk_utmi_recalc_rat
+ 	return UTMI_RATE;
+ }
+ 
++static int clk_utmi_save_context(struct clk_hw *hw)
++{
++	struct clk_utmi *utmi = to_clk_utmi(hw);
++
++	utmi->pms.status = clk_utmi_is_prepared(hw);
++
++	return 0;
++}
++
++static void clk_utmi_restore_context(struct clk_hw *hw)
++{
++	struct clk_utmi *utmi = to_clk_utmi(hw);
++
++	if (utmi->pms.status)
++		clk_utmi_prepare(hw);
++}
++
+ static const struct clk_ops utmi_ops = {
+ 	.prepare = clk_utmi_prepare,
+ 	.unprepare = clk_utmi_unprepare,
+ 	.is_prepared = clk_utmi_is_prepared,
+ 	.recalc_rate = clk_utmi_recalc_rate,
++	.save_context = clk_utmi_save_context,
++	.restore_context = clk_utmi_restore_context,
+ };
+ 
+ static struct clk_hw * __init
+@@ -232,10 +252,29 @@ static int clk_utmi_sama7g5_is_prepared(
+ 	return 0;
+ }
+ 
++static int clk_utmi_sama7g5_save_context(struct clk_hw *hw)
++{
++	struct clk_utmi *utmi = to_clk_utmi(hw);
++
++	utmi->pms.status = clk_utmi_sama7g5_is_prepared(hw);
++
++	return 0;
++}
++
++static void clk_utmi_sama7g5_restore_context(struct clk_hw *hw)
++{
++	struct clk_utmi *utmi = to_clk_utmi(hw);
++
++	if (utmi->pms.status)
++		clk_utmi_sama7g5_prepare(hw);
++}
++
+ static const struct clk_ops sama7g5_utmi_ops = {
+ 	.prepare = clk_utmi_sama7g5_prepare,
+ 	.is_prepared = clk_utmi_sama7g5_is_prepared,
+ 	.recalc_rate = clk_utmi_recalc_rate,
++	.save_context = clk_utmi_sama7g5_save_context,
++	.restore_context = clk_utmi_sama7g5_restore_context,
+ };
+ 
+ struct clk_hw * __init
+--- a/drivers/clk/at91/pmc.c
++++ b/drivers/clk/at91/pmc.c
+@@ -3,6 +3,7 @@
+  *  Copyright (C) 2013 Boris BREZILLON <b.brezillon at overkiz.com>
+  */
+ 
++#include <linux/clk.h>
+ #include <linux/clk-provider.h>
+ #include <linux/clkdev.h>
+ #include <linux/clk/at91_pmc.h>
+@@ -14,8 +15,6 @@
+ 
+ #include <asm/proc-fns.h>
+ 
+-#include <dt-bindings/clock/at91.h>
+-
+ #include "pmc.h"
+ 
+ #define PMC_MAX_IDS 128
+@@ -111,147 +110,19 @@ struct pmc_data *pmc_data_allocate(unsig
+ }
+ 
+ #ifdef CONFIG_PM
+-static struct regmap *pmcreg;
+-
+-static u8 registered_ids[PMC_MAX_IDS];
+-static u8 registered_pcks[PMC_MAX_PCKS];
+-
+-static struct
+-{
+-	u32 scsr;
+-	u32 pcsr0;
+-	u32 uckr;
+-	u32 mor;
+-	u32 mcfr;
+-	u32 pllar;
+-	u32 mckr;
+-	u32 usb;
+-	u32 imr;
+-	u32 pcsr1;
+-	u32 pcr[PMC_MAX_IDS];
+-	u32 audio_pll0;
+-	u32 audio_pll1;
+-	u32 pckr[PMC_MAX_PCKS];
+-} pmc_cache;
+-
+-/*
+- * As Peripheral ID 0 is invalid on AT91 chips, the identifier is stored
+- * without alteration in the table, and 0 is for unused clocks.
+- */
+-void pmc_register_id(u8 id)
++static int at91_pmc_suspend(void)
+ {
+-	int i;
+-
+-	for (i = 0; i < PMC_MAX_IDS; i++) {
+-		if (registered_ids[i] == 0) {
+-			registered_ids[i] = id;
+-			break;
+-		}
+-		if (registered_ids[i] == id)
+-			break;
+-	}
++	return clk_save_context();
+ }
+ 
+-/*
+- * As Programmable Clock 0 is valid on AT91 chips, there is an offset
+- * of 1 between the stored value and the real clock ID.
+- */
+-void pmc_register_pck(u8 pck)
++static void at91_pmc_resume(void)
+ {
+-	int i;
+-
+-	for (i = 0; i < PMC_MAX_PCKS; i++) {
+-		if (registered_pcks[i] == 0) {
+-			registered_pcks[i] = pck + 1;
+-			break;
+-		}
+-		if (registered_pcks[i] == (pck + 1))
+-			break;
+-	}
+-}
+-
+-static int pmc_suspend(void)
+-{
+-	int i;
+-	u8 num;
+-
+-	regmap_read(pmcreg, AT91_PMC_SCSR, &pmc_cache.scsr);
+-	regmap_read(pmcreg, AT91_PMC_PCSR, &pmc_cache.pcsr0);
+-	regmap_read(pmcreg, AT91_CKGR_UCKR, &pmc_cache.uckr);
+-	regmap_read(pmcreg, AT91_CKGR_MOR, &pmc_cache.mor);
+-	regmap_read(pmcreg, AT91_CKGR_MCFR, &pmc_cache.mcfr);
+-	regmap_read(pmcreg, AT91_CKGR_PLLAR, &pmc_cache.pllar);
+-	regmap_read(pmcreg, AT91_PMC_MCKR, &pmc_cache.mckr);
+-	regmap_read(pmcreg, AT91_PMC_USB, &pmc_cache.usb);
+-	regmap_read(pmcreg, AT91_PMC_IMR, &pmc_cache.imr);
+-	regmap_read(pmcreg, AT91_PMC_PCSR1, &pmc_cache.pcsr1);
+-
+-	for (i = 0; registered_ids[i]; i++) {
+-		regmap_write(pmcreg, AT91_PMC_PCR,
+-			     (registered_ids[i] & AT91_PMC_PCR_PID_MASK));
+-		regmap_read(pmcreg, AT91_PMC_PCR,
+-			    &pmc_cache.pcr[registered_ids[i]]);
+-	}
+-	for (i = 0; registered_pcks[i]; i++) {
+-		num = registered_pcks[i] - 1;
+-		regmap_read(pmcreg, AT91_PMC_PCKR(num), &pmc_cache.pckr[num]);
+-	}
+-
+-	return 0;
+-}
+-
+-static bool pmc_ready(unsigned int mask)
+-{
+-	unsigned int status;
+-
+-	regmap_read(pmcreg, AT91_PMC_SR, &status);
+-
+-	return ((status & mask) == mask) ? 1 : 0;
+-}
+-
+-static void pmc_resume(void)
+-{
+-	int i;
+-	u8 num;
+-	u32 tmp;
+-	u32 mask = AT91_PMC_MCKRDY | AT91_PMC_LOCKA;
+-
+-	regmap_read(pmcreg, AT91_PMC_MCKR, &tmp);
+-	if (pmc_cache.mckr != tmp)
+-		pr_warn("MCKR was not configured properly by the firmware\n");
+-	regmap_read(pmcreg, AT91_CKGR_PLLAR, &tmp);
+-	if (pmc_cache.pllar != tmp)
+-		pr_warn("PLLAR was not configured properly by the firmware\n");
+-
+-	regmap_write(pmcreg, AT91_PMC_SCER, pmc_cache.scsr);
+-	regmap_write(pmcreg, AT91_PMC_PCER, pmc_cache.pcsr0);
+-	regmap_write(pmcreg, AT91_CKGR_UCKR, pmc_cache.uckr);
+-	regmap_write(pmcreg, AT91_CKGR_MOR, pmc_cache.mor);
+-	regmap_write(pmcreg, AT91_CKGR_MCFR, pmc_cache.mcfr);
+-	regmap_write(pmcreg, AT91_PMC_USB, pmc_cache.usb);
+-	regmap_write(pmcreg, AT91_PMC_IMR, pmc_cache.imr);
+-	regmap_write(pmcreg, AT91_PMC_PCER1, pmc_cache.pcsr1);
+-
+-	for (i = 0; registered_ids[i]; i++) {
+-		regmap_write(pmcreg, AT91_PMC_PCR,
+-			     pmc_cache.pcr[registered_ids[i]] |
+-			     AT91_PMC_PCR_CMD);
+-	}
+-	for (i = 0; registered_pcks[i]; i++) {
+-		num = registered_pcks[i] - 1;
+-		regmap_write(pmcreg, AT91_PMC_PCKR(num), pmc_cache.pckr[num]);
+-	}
+-
+-	if (pmc_cache.uckr & AT91_PMC_UPLLEN)
+-		mask |= AT91_PMC_LOCKU;
+-
+-	while (!pmc_ready(mask))
+-		cpu_relax();
++	clk_restore_context();
+ }
+ 
+ static struct syscore_ops pmc_syscore_ops = {
+-	.suspend = pmc_suspend,
+-	.resume = pmc_resume,
++	.suspend = at91_pmc_suspend,
++	.resume = at91_pmc_resume,
+ };
+ 
+ static const struct of_device_id sama5d2_pmc_dt_ids[] = {
+@@ -271,11 +142,7 @@ static int __init pmc_register_ops(void)
+ 		of_node_put(np);
+ 		return -ENODEV;
+ 	}
+-
+-	pmcreg = device_node_to_regmap(np);
+ 	of_node_put(np);
+-	if (IS_ERR(pmcreg))
+-		return PTR_ERR(pmcreg);
+ 
+ 	register_syscore_ops(&pmc_syscore_ops);
+ 
+--- a/drivers/clk/at91/pmc.h
++++ b/drivers/clk/at91/pmc.h
+@@ -13,6 +13,8 @@
+ #include <linux/regmap.h>
+ #include <linux/spinlock.h>
+ 
++#include <dt-bindings/clock/at91.h>
++
+ extern spinlock_t pmc_pcr_lock;
+ 
+ struct pmc_data {
+@@ -98,6 +100,20 @@ struct clk_pcr_layout {
+ 	u32 pid_mask;
+ };
+ 
++/**
++ * struct at91_clk_pms - Power management state for AT91 clock
++ * @rate: clock rate
++ * @parent_rate: clock parent rate
++ * @status: clock status (enabled or disabled)
++ * @parent: clock parent index
++ */
++struct at91_clk_pms {
++	unsigned long rate;
++	unsigned long parent_rate;
++	unsigned int status;
++	unsigned int parent;
++};
++
+ #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
+ #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
+ 
+@@ -248,12 +264,4 @@ struct clk_hw * __init
+ at91_clk_sama7g5_register_utmi(struct regmap *regmap, const char *name,
+ 			       const char *parent_name);
+ 
+-#ifdef CONFIG_PM
+-void pmc_register_id(u8 id);
+-void pmc_register_pck(u8 pck);
+-#else
+-static inline void pmc_register_id(u8 id) {}
+-static inline void pmc_register_pck(u8 pck) {}
+-#endif
+-
+ #endif /* __PMC_H_ */
diff --git a/target/linux/at91/patches-5.15/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch b/target/linux/at91/patches-5.15/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
new file mode 100644
index 0000000000..19f1f6fdf2
--- /dev/null
+++ b/target/linux/at91/patches-5.15/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
@@ -0,0 +1,89 @@
+From 63a0c32028148e91ea91cfbf95841c4ecd69d21b Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:06 +0300
+Subject: [PATCH 235/247] clk: at91: pmc: execute suspend/resume only for
+ backup mode
+
+Before going to backup mode architecture specific PM code sets the first
+word in securam (file arch/arm/mach-at91/pm.c, function at91_pm_begin()).
+Thus take this into account when suspending/resuming clocks. This will
+avoid executing unnecessary instructions when suspending to non backup
+modes.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-3-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/pmc.c | 39 +++++++++++++++++++++++++++++++++++++++
+ 1 file changed, 39 insertions(+)
+
+--- a/drivers/clk/at91/pmc.c
++++ b/drivers/clk/at91/pmc.c
+@@ -8,6 +8,7 @@
+ #include <linux/clkdev.h>
+ #include <linux/clk/at91_pmc.h>
+ #include <linux/of.h>
++#include <linux/of_address.h>
+ #include <linux/mfd/syscon.h>
+ #include <linux/platform_device.h>
+ #include <linux/regmap.h>
+@@ -110,13 +111,35 @@ struct pmc_data *pmc_data_allocate(unsig
+ }
+ 
+ #ifdef CONFIG_PM
++
++/* Address in SECURAM that say if we suspend to backup mode. */
++static void __iomem *at91_pmc_backup_suspend;
++
+ static int at91_pmc_suspend(void)
+ {
++	unsigned int backup;
++
++	if (!at91_pmc_backup_suspend)
++		return 0;
++
++	backup = readl_relaxed(at91_pmc_backup_suspend);
++	if (!backup)
++		return 0;
++
+ 	return clk_save_context();
+ }
+ 
+ static void at91_pmc_resume(void)
+ {
++	unsigned int backup;
++
++	if (!at91_pmc_backup_suspend)
++		return;
++
++	backup = readl_relaxed(at91_pmc_backup_suspend);
++	if (!backup)
++		return;
++
+ 	clk_restore_context();
+ }
+ 
+@@ -144,6 +167,22 @@ static int __init pmc_register_ops(void)
+ 	}
+ 	of_node_put(np);
+ 
++	np = of_find_compatible_node(NULL, NULL, "atmel,sama5d2-securam");
++	if (!np)
++		return -ENODEV;
++
++	if (!of_device_is_available(np)) {
++		of_node_put(np);
++		return -ENODEV;
++	}
++	of_node_put(np);
++
++	at91_pmc_backup_suspend = of_iomap(np, 0);
++	if (!at91_pmc_backup_suspend) {
++		pr_warn("%s(): unable to map securam\n", __func__);
++		return -ENOMEM;
++	}
++
+ 	register_syscore_ops(&pmc_syscore_ops);
+ 
+ 	return 0;
diff --git a/target/linux/at91/patches-5.15/102-clk-at91-clk-master-add-register-definition-for-sama.patch b/target/linux/at91/patches-5.15/102-clk-at91-clk-master-add-register-definition-for-sama.patch
new file mode 100644
index 0000000000..726d9b33e4
--- /dev/null
+++ b/target/linux/at91/patches-5.15/102-clk-at91-clk-master-add-register-definition-for-sama.patch
@@ -0,0 +1,124 @@
+From c716562753d1e51a1c53647aa77a332f97187d15 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:08 +0300
+Subject: [PATCH 237/247] clk: at91: clk-master: add register definition for
+ sama7g5's master clock
+
+SAMA7G5 has 4 master clocks (MCK1..4) which are controlled though the
+register at offset 0x30 (relative to PMC). In the last/first phase of
+suspend/resume procedure (which is architecture specific) the parent
+of master clocks are changed (via assembly code) for more power saving
+(see file arch/arm/mach-at91/pm_suspend.S, macros at91_mckx_ps_enable
+and at91_mckx_ps_restore). Thus the macros corresponding to register
+at offset 0x30 need to be shared b/w clk-master.c and pm_suspend.S.
+commit ec03f18cc222 ("clk: at91: add register definition for sama7g5's
+master clock") introduced the proper macros but didn't adapted the
+clk-master.c as well. Thus, this commit adapt the clk-master.c to use
+the macros introduced in commit ec03f18cc222 ("clk: at91: add register
+definition for sama7g5's master clock").
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-5-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/clk-master.c | 50 ++++++++++++++++-------------------
+ 1 file changed, 23 insertions(+), 27 deletions(-)
+
+--- a/drivers/clk/at91/clk-master.c
++++ b/drivers/clk/at91/clk-master.c
+@@ -17,15 +17,7 @@
+ #define MASTER_DIV_SHIFT	8
+ #define MASTER_DIV_MASK		0x7
+ 
+-#define PMC_MCR			0x30
+-#define PMC_MCR_ID_MSK		GENMASK(3, 0)
+-#define PMC_MCR_CMD		BIT(7)
+-#define PMC_MCR_DIV		GENMASK(10, 8)
+-#define PMC_MCR_CSS		GENMASK(20, 16)
+ #define PMC_MCR_CSS_SHIFT	(16)
+-#define PMC_MCR_EN		BIT(28)
+-
+-#define PMC_MCR_ID(x)		((x) & PMC_MCR_ID_MSK)
+ 
+ #define MASTER_MAX_ID		4
+ 
+@@ -687,20 +679,22 @@ static void clk_sama7g5_master_set(struc
+ {
+ 	unsigned long flags;
+ 	unsigned int val, cparent;
+-	unsigned int enable = status ? PMC_MCR_EN : 0;
++	unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
+ 
+ 	spin_lock_irqsave(master->lock, flags);
+ 
+-	regmap_write(master->regmap, PMC_MCR, PMC_MCR_ID(master->id));
+-	regmap_read(master->regmap, PMC_MCR, &val);
+-	regmap_update_bits(master->regmap, PMC_MCR,
+-			   enable | PMC_MCR_CSS | PMC_MCR_DIV |
+-			   PMC_MCR_CMD | PMC_MCR_ID_MSK,
++	regmap_write(master->regmap, AT91_PMC_MCR_V2,
++		     AT91_PMC_MCR_V2_ID(master->id));
++	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
++	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
++			   enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
++			   AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
+ 			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
+ 			   (master->div << MASTER_DIV_SHIFT) |
+-			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
++			   AT91_PMC_MCR_V2_CMD |
++			   AT91_PMC_MCR_V2_ID(master->id));
+ 
+-	cparent = (val & PMC_MCR_CSS) >> PMC_MCR_CSS_SHIFT;
++	cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
+ 
+ 	/* Wait here only if parent is being changed. */
+ 	while ((cparent != master->parent) && !clk_master_ready(master))
+@@ -725,10 +719,12 @@ static void clk_sama7g5_master_disable(s
+ 
+ 	spin_lock_irqsave(master->lock, flags);
+ 
+-	regmap_write(master->regmap, PMC_MCR, master->id);
+-	regmap_update_bits(master->regmap, PMC_MCR,
+-			   PMC_MCR_EN | PMC_MCR_CMD | PMC_MCR_ID_MSK,
+-			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
++	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
++	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
++			   AT91_PMC_MCR_V2_EN | AT91_PMC_MCR_V2_CMD |
++			   AT91_PMC_MCR_V2_ID_MSK,
++			   AT91_PMC_MCR_V2_CMD |
++			   AT91_PMC_MCR_V2_ID(master->id));
+ 
+ 	spin_unlock_irqrestore(master->lock, flags);
+ }
+@@ -741,12 +737,12 @@ static int clk_sama7g5_master_is_enabled
+ 
+ 	spin_lock_irqsave(master->lock, flags);
+ 
+-	regmap_write(master->regmap, PMC_MCR, master->id);
+-	regmap_read(master->regmap, PMC_MCR, &val);
++	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
++	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
+ 
+ 	spin_unlock_irqrestore(master->lock, flags);
+ 
+-	return !!(val & PMC_MCR_EN);
++	return !!(val & AT91_PMC_MCR_V2_EN);
+ }
+ 
+ static int clk_sama7g5_master_set_rate(struct clk_hw *hw, unsigned long rate,
+@@ -842,10 +838,10 @@ at91_clk_sama7g5_register_master(struct
+ 	master->mux_table = mux_table;
+ 
+ 	spin_lock_irqsave(master->lock, flags);
+-	regmap_write(master->regmap, PMC_MCR, master->id);
+-	regmap_read(master->regmap, PMC_MCR, &val);
+-	master->parent = (val & PMC_MCR_CSS) >> PMC_MCR_CSS_SHIFT;
+-	master->div = (val & PMC_MCR_DIV) >> MASTER_DIV_SHIFT;
++	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
++	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
++	master->parent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
++	master->div = (val & AT91_PMC_MCR_V2_DIV) >> MASTER_DIV_SHIFT;
+ 	spin_unlock_irqrestore(master->lock, flags);
+ 
+ 	hw = &master->hw;
diff --git a/target/linux/at91/patches-5.15/103-clk-at91-clk-master-improve-readability-by-using-loc.patch b/target/linux/at91/patches-5.15/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
new file mode 100644
index 0000000000..a5b57a67ad
--- /dev/null
+++ b/target/linux/at91/patches-5.15/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
@@ -0,0 +1,40 @@
+From 17b53ad1574cb5f41789993289d3d94f7a50f0ce Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:09 +0300
+Subject: [PATCH 238/247] clk: at91: clk-master: improve readability by using
+ local variables
+
+Improve readability in clk_sama7g5_master_set() by using local
+variables.
+
+Suggested-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-6-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/clk-master.c | 6 +++---
+ 1 file changed, 3 insertions(+), 3 deletions(-)
+
+--- a/drivers/clk/at91/clk-master.c
++++ b/drivers/clk/at91/clk-master.c
+@@ -680,6 +680,8 @@ static void clk_sama7g5_master_set(struc
+ 	unsigned long flags;
+ 	unsigned int val, cparent;
+ 	unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
++	unsigned int parent = master->parent << PMC_MCR_CSS_SHIFT;
++	unsigned int div = master->div << MASTER_DIV_SHIFT;
+ 
+ 	spin_lock_irqsave(master->lock, flags);
+ 
+@@ -689,9 +691,7 @@ static void clk_sama7g5_master_set(struc
+ 	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
+ 			   enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
+ 			   AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
+-			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
+-			   (master->div << MASTER_DIV_SHIFT) |
+-			   AT91_PMC_MCR_V2_CMD |
++			   enable | parent | div | AT91_PMC_MCR_V2_CMD |
+ 			   AT91_PMC_MCR_V2_ID(master->id));
+ 
+ 	cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
diff --git a/target/linux/at91/patches-5.15/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch b/target/linux/at91/patches-5.15/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
new file mode 100644
index 0000000000..2918de1700
--- /dev/null
+++ b/target/linux/at91/patches-5.15/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
@@ -0,0 +1,39 @@
+From 8a38e0dda46c9d941a61d8b2e6c14704531b7871 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:10 +0300
+Subject: [PATCH 239/247] clk: at91: pmc: add sama7g5 to the list of available
+ pmcs
+
+Add SAMA7G5 to the list of available PMCs such that the suspend/resume
+code for clocks to be used on backup mode.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-7-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/pmc.c | 5 +++--
+ 1 file changed, 3 insertions(+), 2 deletions(-)
+
+--- a/drivers/clk/at91/pmc.c
++++ b/drivers/clk/at91/pmc.c
+@@ -148,8 +148,9 @@ static struct syscore_ops pmc_syscore_op
+ 	.resume = at91_pmc_resume,
+ };
+ 
+-static const struct of_device_id sama5d2_pmc_dt_ids[] = {
++static const struct of_device_id pmc_dt_ids[] = {
+ 	{ .compatible = "atmel,sama5d2-pmc" },
++	{ .compatible = "microchip,sama7g5-pmc", },
+ 	{ /* sentinel */ }
+ };
+ 
+@@ -157,7 +158,7 @@ static int __init pmc_register_ops(void)
+ {
+ 	struct device_node *np;
+ 
+-	np = of_find_matching_node(NULL, sama5d2_pmc_dt_ids);
++	np = of_find_matching_node(NULL, pmc_dt_ids);
+ 	if (!np)
+ 		return -ENODEV;
+ 
diff --git a/target/linux/at91/patches-5.15/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch b/target/linux/at91/patches-5.15/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
new file mode 100644
index 0000000000..ea869c9485
--- /dev/null
+++ b/target/linux/at91/patches-5.15/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
@@ -0,0 +1,46 @@
+From 27c11c09346b7b9f67eeb39db1b943f4a9742ff3 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:13 +0300
+Subject: [PATCH 241/247] clk: at91: clk-master: mask mckr against layout->mask
+
+Mask values read/written from/to MCKR against layout->mask as this
+mask may be different b/w PMC versions.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-10-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/clk-master.c | 7 +++++--
+ 1 file changed, 5 insertions(+), 2 deletions(-)
+
+--- a/drivers/clk/at91/clk-master.c
++++ b/drivers/clk/at91/clk-master.c
+@@ -186,8 +186,8 @@ static int clk_master_div_set_rate(struc
+ 	if (ret)
+ 		goto unlock;
+ 
+-	tmp = mckr & master->layout->mask;
+-	tmp = (tmp >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
++	mckr &= master->layout->mask;
++	tmp = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
+ 	if (tmp == div)
+ 		goto unlock;
+ 
+@@ -384,6 +384,7 @@ static unsigned long clk_master_pres_rec
+ 	regmap_read(master->regmap, master->layout->offset, &val);
+ 	spin_unlock_irqrestore(master->lock, flags);
+ 
++	val &= master->layout->mask;
+ 	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
+ 	if (pres == MASTER_PRES_MAX && characteristics->have_div3_pres)
+ 		pres = 3;
+@@ -403,6 +404,8 @@ static u8 clk_master_pres_get_parent(str
+ 	regmap_read(master->regmap, master->layout->offset, &mckr);
+ 	spin_unlock_irqrestore(master->lock, flags);
+ 
++	mckr &= master->layout->mask;
++
+ 	return mckr & AT91_PMC_CSS;
+ }
+ 
diff --git a/target/linux/at91/patches-5.15/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch b/target/linux/at91/patches-5.15/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
new file mode 100644
index 0000000000..e5ebdc4ea4
--- /dev/null
+++ b/target/linux/at91/patches-5.15/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
@@ -0,0 +1,312 @@
+From e76d2af5009f52aa02d3db7ae32d150ad66398f9 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:15 +0300
+Subject: [PATCH 243/247] clk: at91: clk-sam9x60-pll: add notifier for div part
+ of PLL
+
+SAM9X60's PLL which is also part of SAMA7G5 is composed of 2 parts:
+one fractional part and one divider. On SAMA7G5 the CPU PLL could be
+changed at run-time to implement DVFS. The hardware clock tree on
+SAMA7G5 for CPU PLL is as follows:
+
+                       +---- div1 ----------------> cpuck
+                       |
+FRAC PLL ---> DIV PLL -+-> prescaler ---> div0 ---> mck0
+
+The div1 block is not implemented in Linux; on prescaler block it has
+been discovered a bug on some scenarios and will be removed from Linux
+in next commits. Thus, the final clock tree that will be used in Linux
+will be as follows:
+
+                       +-----------> cpuck
+                       |
+FRAC PLL ---> DIV PLL -+-> div0 ---> mck0
+
+It has been proposed in [1] to not introduce a new CPUFreq driver but
+to overload the proper clock drivers with proper operation such that
+cpufreq-dt to be used. To accomplish this DIV PLL and div0 implement
+clock notifiers which applies safe dividers before FRAC PLL is changed.
+The current commit treats only the DIV PLL by adding a notifier that
+sets a safe divider on PRE_RATE_CHANGE events. The safe divider is
+provided by initialization clock code (sama7g5.c). The div0 is treated
+in next commits (to keep the changes as clean as possible).
+
+[1] https://lore.kernel.org/lkml/20210105104426.4tmgc2l3vyicwedd at vireshk-i7/
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-12-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/clk-sam9x60-pll.c | 102 ++++++++++++++++++++++-------
+ drivers/clk/at91/pmc.h             |   3 +-
+ drivers/clk/at91/sam9x60.c         |   6 +-
+ drivers/clk/at91/sama7g5.c         |  13 +++-
+ 4 files changed, 95 insertions(+), 29 deletions(-)
+
+--- a/drivers/clk/at91/clk-sam9x60-pll.c
++++ b/drivers/clk/at91/clk-sam9x60-pll.c
+@@ -5,6 +5,7 @@
+  */
+ 
+ #include <linux/bitfield.h>
++#include <linux/clk.h>
+ #include <linux/clk-provider.h>
+ #include <linux/clkdev.h>
+ #include <linux/clk/at91_pmc.h>
+@@ -47,12 +48,15 @@ struct sam9x60_div {
+ 	struct sam9x60_pll_core core;
+ 	struct at91_clk_pms pms;
+ 	u8 div;
++	u8 safe_div;
+ };
+ 
+ #define to_sam9x60_pll_core(hw)	container_of(hw, struct sam9x60_pll_core, hw)
+ #define to_sam9x60_frac(core)	container_of(core, struct sam9x60_frac, core)
+ #define to_sam9x60_div(core)	container_of(core, struct sam9x60_div, core)
+ 
++static struct sam9x60_div *notifier_div;
++
+ static inline bool sam9x60_pll_ready(struct regmap *regmap, int id)
+ {
+ 	unsigned int status;
+@@ -329,6 +333,26 @@ static const struct clk_ops sam9x60_frac
+ 	.restore_context = sam9x60_frac_pll_restore_context,
+ };
+ 
++/* This function should be called with spinlock acquired. */
++static void sam9x60_div_pll_set_div(struct sam9x60_pll_core *core, u32 div,
++				    bool enable)
++{
++	struct regmap *regmap = core->regmap;
++	u32 ena_msk = enable ? core->layout->endiv_mask : 0;
++	u32 ena_val = enable ? (1 << core->layout->endiv_shift) : 0;
++
++	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
++			   core->layout->div_mask | ena_msk,
++			   (div << core->layout->div_shift) | ena_val);
++
++	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
++			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
++			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
++
++	while (!sam9x60_pll_ready(regmap, core->id))
++		cpu_relax();
++}
++
+ static int sam9x60_div_pll_set(struct sam9x60_pll_core *core)
+ {
+ 	struct sam9x60_div *div = to_sam9x60_div(core);
+@@ -346,17 +370,7 @@ static int sam9x60_div_pll_set(struct sa
+ 	if (!!(val & core->layout->endiv_mask) && cdiv == div->div)
+ 		goto unlock;
+ 
+-	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
+-			   core->layout->div_mask | core->layout->endiv_mask,
+-			   (div->div << core->layout->div_shift) |
+-			   (1 << core->layout->endiv_shift));
+-
+-	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
+-			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
+-			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
+-
+-	while (!sam9x60_pll_ready(regmap, core->id))
+-		cpu_relax();
++	sam9x60_div_pll_set_div(core, div->div, 1);
+ 
+ unlock:
+ 	spin_unlock_irqrestore(core->lock, flags);
+@@ -502,16 +516,7 @@ static int sam9x60_div_pll_set_rate_chg(
+ 	if (cdiv == div->div)
+ 		goto unlock;
+ 
+-	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
+-			   core->layout->div_mask,
+-			   (div->div << core->layout->div_shift));
+-
+-	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
+-			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
+-			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
+-
+-	while (!sam9x60_pll_ready(regmap, core->id))
+-		cpu_relax();
++	sam9x60_div_pll_set_div(core, div->div, 0);
+ 
+ unlock:
+ 	spin_unlock_irqrestore(core->lock, irqflags);
+@@ -538,6 +543,48 @@ static void sam9x60_div_pll_restore_cont
+ 		sam9x60_div_pll_set(core);
+ }
+ 
++static int sam9x60_div_pll_notifier_fn(struct notifier_block *notifier,
++				       unsigned long code, void *data)
++{
++	struct sam9x60_div *div = notifier_div;
++	struct sam9x60_pll_core core = div->core;
++	struct regmap *regmap = core.regmap;
++	unsigned long irqflags;
++	u32 val, cdiv;
++	int ret = NOTIFY_DONE;
++
++	if (code != PRE_RATE_CHANGE)
++		return ret;
++
++	/*
++	 * We switch to safe divider to avoid overclocking of other domains
++	 * feed by us while the frac PLL (our parent) is changed.
++	 */
++	div->div = div->safe_div;
++
++	spin_lock_irqsave(core.lock, irqflags);
++	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK,
++			   core.id);
++	regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val);
++	cdiv = (val & core.layout->div_mask) >> core.layout->div_shift;
++
++	/* Stop if nothing changed. */
++	if (cdiv == div->safe_div)
++		goto unlock;
++
++	sam9x60_div_pll_set_div(&core, div->div, 0);
++	ret = NOTIFY_OK;
++
++unlock:
++	spin_unlock_irqrestore(core.lock, irqflags);
++
++	return ret;
++}
++
++static struct notifier_block sam9x60_div_pll_notifier = {
++	.notifier_call = sam9x60_div_pll_notifier_fn,
++};
++
+ static const struct clk_ops sam9x60_div_pll_ops = {
+ 	.prepare = sam9x60_div_pll_prepare,
+ 	.unprepare = sam9x60_div_pll_unprepare,
+@@ -647,7 +694,8 @@ struct clk_hw * __init
+ sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
+ 			     const char *name, const char *parent_name, u8 id,
+ 			     const struct clk_pll_characteristics *characteristics,
+-			     const struct clk_pll_layout *layout, u32 flags)
++			     const struct clk_pll_layout *layout, u32 flags,
++			     u32 safe_div)
+ {
+ 	struct sam9x60_div *div;
+ 	struct clk_hw *hw;
+@@ -656,9 +704,13 @@ sam9x60_clk_register_div_pll(struct regm
+ 	unsigned int val;
+ 	int ret;
+ 
+-	if (id > PLL_MAX_ID || !lock)
++	/* We only support one changeable PLL. */
++	if (id > PLL_MAX_ID || !lock || (safe_div && notifier_div))
+ 		return ERR_PTR(-EINVAL);
+ 
++	if (safe_div >= PLL_DIV_MAX)
++		safe_div = PLL_DIV_MAX - 1;
++
+ 	div = kzalloc(sizeof(*div), GFP_KERNEL);
+ 	if (!div)
+ 		return ERR_PTR(-ENOMEM);
+@@ -678,6 +730,7 @@ sam9x60_clk_register_div_pll(struct regm
+ 	div->core.layout = layout;
+ 	div->core.regmap = regmap;
+ 	div->core.lock = lock;
++	div->safe_div = safe_div;
+ 
+ 	spin_lock_irqsave(div->core.lock, irqflags);
+ 
+@@ -693,6 +746,9 @@ sam9x60_clk_register_div_pll(struct regm
+ 	if (ret) {
+ 		kfree(div);
+ 		hw = ERR_PTR(ret);
++	} else if (div->safe_div) {
++		notifier_div = div;
++		clk_notifier_register(hw->clk, &sam9x60_div_pll_notifier);
+ 	}
+ 
+ 	return hw;
+--- a/drivers/clk/at91/pmc.h
++++ b/drivers/clk/at91/pmc.h
+@@ -214,7 +214,8 @@ struct clk_hw * __init
+ sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
+ 			     const char *name, const char *parent_name, u8 id,
+ 			     const struct clk_pll_characteristics *characteristics,
+-			     const struct clk_pll_layout *layout, u32 flags);
++			     const struct clk_pll_layout *layout, u32 flags,
++			     u32 safe_div);
+ 
+ struct clk_hw * __init
+ sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock,
+--- a/drivers/clk/at91/sam9x60.c
++++ b/drivers/clk/at91/sam9x60.c
+@@ -242,7 +242,7 @@ static void __init sam9x60_pmc_setup(str
+ 					    * This feeds CPU. It should not
+ 					    * be disabled.
+ 					    */
+-					  CLK_IS_CRITICAL | CLK_SET_RATE_GATE);
++					  CLK_IS_CRITICAL | CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+@@ -260,7 +260,7 @@ static void __init sam9x60_pmc_setup(str
+ 					  &pll_div_layout,
+ 					  CLK_SET_RATE_GATE |
+ 					  CLK_SET_PARENT_GATE |
+-					  CLK_SET_RATE_PARENT);
++					  CLK_SET_RATE_PARENT, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+@@ -279,7 +279,7 @@ static void __init sam9x60_pmc_setup(str
+ 	hw = at91_clk_register_master_div(regmap, "masterck_div",
+ 					  "masterck_pres", &sam9x60_master_layout,
+ 					  &mck_characteristics, &mck_lock,
+-					  CLK_SET_RATE_GATE);
++					  CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/sama7g5.c
++++ b/drivers/clk/at91/sama7g5.c
+@@ -127,6 +127,8 @@ static const struct clk_pll_characterist
+  * @t:		clock type
+  * @f:		clock flags
+  * @eid:	export index in sama7g5->chws[] array
++ * @safe_div:	intermediate divider need to be set on PRE_RATE_CHANGE
++ *		notification
+  */
+ static const struct {
+ 	const char *n;
+@@ -136,6 +138,7 @@ static const struct {
+ 	unsigned long f;
+ 	u8 t;
+ 	u8 eid;
++	u8 safe_div;
+ } sama7g5_plls[][PLL_ID_MAX] = {
+ 	[PLL_ID_CPU] = {
+ 		{ .n = "cpupll_fracck",
+@@ -156,7 +159,12 @@ static const struct {
+ 		  .t = PLL_TYPE_DIV,
+ 		   /* This feeds CPU. It should not be disabled. */
+ 		  .f = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
+-		  .eid = PMC_CPUPLL, },
++		  .eid = PMC_CPUPLL,
++		  /*
++		   * Safe div=15 should be safe even for switching b/w 1GHz and
++		   * 90MHz (frac pll might go up to 1.2GHz).
++		   */
++		  .safe_div = 15, },
+ 	},
+ 
+ 	[PLL_ID_SYS] = {
+@@ -966,7 +974,8 @@ static void __init sama7g5_pmc_setup(str
+ 					sama7g5_plls[i][j].p, i,
+ 					sama7g5_plls[i][j].c,
+ 					sama7g5_plls[i][j].l,
+-					sama7g5_plls[i][j].f);
++					sama7g5_plls[i][j].f,
++					sama7g5_plls[i][j].safe_div);
+ 				break;
+ 
+ 			default:
diff --git a/target/linux/at91/patches-5.15/107-clk-at91-clk-master-add-notifier-for-divider.patch b/target/linux/at91/patches-5.15/107-clk-at91-clk-master-add-notifier-for-divider.patch
new file mode 100644
index 0000000000..83839e6a74
--- /dev/null
+++ b/target/linux/at91/patches-5.15/107-clk-at91-clk-master-add-notifier-for-divider.patch
@@ -0,0 +1,519 @@
+From 75d5d1d584ae73ba0c36d1d7255db6153ca4d3f3 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:16 +0300
+Subject: [PATCH 244/247] clk: at91: clk-master: add notifier for divider
+
+SAMA7G5 supports DVFS by changing cpuck. On SAMA7G5 mck0 shares the same
+parent with cpuck as seen in the following clock tree:
+
+                       +----------> cpuck
+                       |
+FRAC PLL ---> DIV PLL -+-> DIV ---> mck0
+
+mck0 could go b/w 32KHz and 200MHz on SAMA7G5. To avoid mck0 overclocking
+while changing FRAC PLL or DIV PLL the commit implements a notifier for
+mck0 which applies a safe divider to register (maximum value of the divider
+which is 5) on PRE_RATE_CHANGE events (such that changes on PLL to not
+overclock mck0) and sets the maximum allowed rate on POST_RATE_CHANGE
+events.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-13-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/at91rm9200.c  |   2 +-
+ drivers/clk/at91/at91sam9260.c |   2 +-
+ drivers/clk/at91/at91sam9g45.c |   2 +-
+ drivers/clk/at91/at91sam9n12.c |   2 +-
+ drivers/clk/at91/at91sam9rl.c  |   2 +-
+ drivers/clk/at91/at91sam9x5.c  |   2 +-
+ drivers/clk/at91/clk-master.c  | 244 +++++++++++++++++++++++----------
+ drivers/clk/at91/dt-compat.c   |   2 +-
+ drivers/clk/at91/pmc.h         |   2 +-
+ drivers/clk/at91/sama5d2.c     |   2 +-
+ drivers/clk/at91/sama5d3.c     |   2 +-
+ drivers/clk/at91/sama5d4.c     |   2 +-
+ drivers/clk/at91/sama7g5.c     |   2 +-
+ 13 files changed, 186 insertions(+), 82 deletions(-)
+
+--- a/drivers/clk/at91/at91rm9200.c
++++ b/drivers/clk/at91/at91rm9200.c
+@@ -152,7 +152,7 @@ static void __init at91rm9200_pmc_setup(
+ 					  "masterck_pres",
+ 					  &at91rm9200_master_layout,
+ 					  &rm9200_mck_characteristics,
+-					  &rm9200_mck_lock, CLK_SET_RATE_GATE);
++					  &rm9200_mck_lock, CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/at91sam9260.c
++++ b/drivers/clk/at91/at91sam9260.c
+@@ -429,7 +429,7 @@ static void __init at91sam926x_pmc_setup
+ 					  &at91rm9200_master_layout,
+ 					  data->mck_characteristics,
+ 					  &at91sam9260_mck_lock,
+-					  CLK_SET_RATE_GATE);
++					  CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/at91sam9g45.c
++++ b/drivers/clk/at91/at91sam9g45.c
+@@ -164,7 +164,7 @@ static void __init at91sam9g45_pmc_setup
+ 					  &at91rm9200_master_layout,
+ 					  &mck_characteristics,
+ 					  &at91sam9g45_mck_lock,
+-					  CLK_SET_RATE_GATE);
++					  CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/at91sam9n12.c
++++ b/drivers/clk/at91/at91sam9n12.c
+@@ -191,7 +191,7 @@ static void __init at91sam9n12_pmc_setup
+ 					  &at91sam9x5_master_layout,
+ 					  &mck_characteristics,
+ 					  &at91sam9n12_mck_lock,
+-					  CLK_SET_RATE_GATE);
++					  CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/at91sam9rl.c
++++ b/drivers/clk/at91/at91sam9rl.c
+@@ -132,7 +132,7 @@ static void __init at91sam9rl_pmc_setup(
+ 					  "masterck_pres",
+ 					  &at91rm9200_master_layout,
+ 					  &sam9rl_mck_characteristics,
+-					  &sam9rl_mck_lock, CLK_SET_RATE_GATE);
++					  &sam9rl_mck_lock, CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/at91sam9x5.c
++++ b/drivers/clk/at91/at91sam9x5.c
+@@ -210,7 +210,7 @@ static void __init at91sam9x5_pmc_setup(
+ 					  "masterck_pres",
+ 					  &at91sam9x5_master_layout,
+ 					  &mck_characteristics, &mck_lock,
+-					  CLK_SET_RATE_GATE);
++					  CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/clk-master.c
++++ b/drivers/clk/at91/clk-master.c
+@@ -5,6 +5,7 @@
+ 
+ #include <linux/clk-provider.h>
+ #include <linux/clkdev.h>
++#include <linux/clk.h>
+ #include <linux/clk/at91_pmc.h>
+ #include <linux/of.h>
+ #include <linux/mfd/syscon.h>
+@@ -36,8 +37,12 @@ struct clk_master {
+ 	u8 id;
+ 	u8 parent;
+ 	u8 div;
++	u32 safe_div;
+ };
+ 
++/* MCK div reference to be used by notifier. */
++static struct clk_master *master_div;
++
+ static inline bool clk_master_ready(struct clk_master *master)
+ {
+ 	unsigned int bit = master->id ? AT91_PMC_MCKXRDY : AT91_PMC_MCKRDY;
+@@ -153,107 +158,81 @@ static const struct clk_ops master_div_o
+ 	.restore_context = clk_master_div_restore_context,
+ };
+ 
+-static int clk_master_div_set_rate(struct clk_hw *hw, unsigned long rate,
+-				   unsigned long parent_rate)
++/* This function must be called with lock acquired. */
++static int clk_master_div_set(struct clk_master *master,
++			      unsigned long parent_rate, int div)
+ {
+-	struct clk_master *master = to_clk_master(hw);
+ 	const struct clk_master_characteristics *characteristics =
+ 						master->characteristics;
+-	unsigned long flags;
+-	unsigned int mckr, tmp;
+-	int div, i;
++	unsigned long rate = parent_rate;
++	unsigned int max_div = 0, div_index = 0, max_div_index = 0;
++	unsigned int i, mckr, tmp;
+ 	int ret;
+ 
+-	div = DIV_ROUND_CLOSEST(parent_rate, rate);
+-	if (div > ARRAY_SIZE(characteristics->divisors))
+-		return -EINVAL;
+-
+ 	for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
+ 		if (!characteristics->divisors[i])
+ 			break;
+ 
+-		if (div == characteristics->divisors[i]) {
+-			div = i;
+-			break;
++		if (div == characteristics->divisors[i])
++			div_index = i;
++
++		if (max_div < characteristics->divisors[i]) {
++			max_div = characteristics->divisors[i];
++			max_div_index = i;
+ 		}
+ 	}
+ 
+-	if (i == ARRAY_SIZE(characteristics->divisors))
+-		return -EINVAL;
++	if (div > max_div)
++		div_index = max_div_index;
+ 
+-	spin_lock_irqsave(master->lock, flags);
+ 	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
+ 	if (ret)
+-		goto unlock;
++		return ret;
+ 
+ 	mckr &= master->layout->mask;
+ 	tmp = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
+-	if (tmp == div)
+-		goto unlock;
++	if (tmp == div_index)
++		return 0;
++
++	rate /= characteristics->divisors[div_index];
++	if (rate < characteristics->output.min)
++		pr_warn("master clk div is underclocked");
++	else if (rate > characteristics->output.max)
++		pr_warn("master clk div is overclocked");
+ 
+ 	mckr &= ~(MASTER_DIV_MASK << MASTER_DIV_SHIFT);
+-	mckr |= (div << MASTER_DIV_SHIFT);
++	mckr |= (div_index << MASTER_DIV_SHIFT);
+ 	ret = regmap_write(master->regmap, master->layout->offset, mckr);
+ 	if (ret)
+-		goto unlock;
++		return ret;
+ 
+ 	while (!clk_master_ready(master))
+ 		cpu_relax();
+-unlock:
+-	spin_unlock_irqrestore(master->lock, flags);
++
++	master->div = characteristics->divisors[div_index];
+ 
+ 	return 0;
+ }
+ 
+-static int clk_master_div_determine_rate(struct clk_hw *hw,
+-					 struct clk_rate_request *req)
++static unsigned long clk_master_div_recalc_rate_chg(struct clk_hw *hw,
++						    unsigned long parent_rate)
+ {
+ 	struct clk_master *master = to_clk_master(hw);
+-	const struct clk_master_characteristics *characteristics =
+-						master->characteristics;
+-	struct clk_hw *parent;
+-	unsigned long parent_rate, tmp_rate, best_rate = 0;
+-	int i, best_diff = INT_MIN, tmp_diff;
+-
+-	parent = clk_hw_get_parent(hw);
+-	if (!parent)
+-		return -EINVAL;
+-
+-	parent_rate = clk_hw_get_rate(parent);
+-	if (!parent_rate)
+-		return -EINVAL;
+ 
+-	for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
+-		if (!characteristics->divisors[i])
+-			break;
+-
+-		tmp_rate = DIV_ROUND_CLOSEST_ULL(parent_rate,
+-						 characteristics->divisors[i]);
+-		tmp_diff = abs(tmp_rate - req->rate);
+-
+-		if (!best_rate || best_diff > tmp_diff) {
+-			best_diff = tmp_diff;
+-			best_rate = tmp_rate;
+-		}
+-
+-		if (!best_diff)
+-			break;
+-	}
+-
+-	req->best_parent_rate = best_rate;
+-	req->best_parent_hw = parent;
+-	req->rate = best_rate;
+-
+-	return 0;
++	return DIV_ROUND_CLOSEST_ULL(parent_rate, master->div);
+ }
+ 
+ static void clk_master_div_restore_context_chg(struct clk_hw *hw)
+ {
+ 	struct clk_master *master = to_clk_master(hw);
++	unsigned long flags;
+ 	int ret;
+ 
+-	ret = clk_master_div_set_rate(hw, master->pms.rate,
+-				      master->pms.parent_rate);
++	spin_lock_irqsave(master->lock, flags);
++	ret = clk_master_div_set(master, master->pms.parent_rate,
++				 DIV_ROUND_CLOSEST(master->pms.parent_rate,
++						   master->pms.rate));
++	spin_unlock_irqrestore(master->lock, flags);
+ 	if (ret)
+ 		pr_warn("Failed to restore MCK DIV clock\n");
+ }
+@@ -261,13 +240,116 @@ static void clk_master_div_restore_conte
+ static const struct clk_ops master_div_ops_chg = {
+ 	.prepare = clk_master_prepare,
+ 	.is_prepared = clk_master_is_prepared,
+-	.recalc_rate = clk_master_div_recalc_rate,
+-	.determine_rate = clk_master_div_determine_rate,
+-	.set_rate = clk_master_div_set_rate,
++	.recalc_rate = clk_master_div_recalc_rate_chg,
+ 	.save_context = clk_master_div_save_context,
+ 	.restore_context = clk_master_div_restore_context_chg,
+ };
+ 
++static int clk_master_div_notifier_fn(struct notifier_block *notifier,
++				      unsigned long code, void *data)
++{
++	const struct clk_master_characteristics *characteristics =
++						master_div->characteristics;
++	struct clk_notifier_data *cnd = data;
++	unsigned long flags, new_parent_rate, new_rate;
++	unsigned int mckr, div, new_div = 0;
++	int ret, i;
++	long tmp_diff;
++	long best_diff = -1;
++
++	spin_lock_irqsave(master_div->lock, flags);
++	switch (code) {
++	case PRE_RATE_CHANGE:
++		/*
++		 * We want to avoid any overclocking of MCK DIV domain. To do
++		 * this we set a safe divider (the underclocking is not of
++		 * interest as we can go as low as 32KHz). The relation
++		 * b/w this clock and its parents are as follows:
++		 *
++		 * FRAC PLL -> DIV PLL -> MCK DIV
++		 *
++		 * With the proper safe divider we should be good even with FRAC
++		 * PLL at its maximum value.
++		 */
++		ret = regmap_read(master_div->regmap, master_div->layout->offset,
++				  &mckr);
++		if (ret) {
++			ret = NOTIFY_STOP_MASK;
++			goto unlock;
++		}
++
++		mckr &= master_div->layout->mask;
++		div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
++
++		/* Switch to safe divider. */
++		clk_master_div_set(master_div,
++				   cnd->old_rate * characteristics->divisors[div],
++				   master_div->safe_div);
++		break;
++
++	case POST_RATE_CHANGE:
++		/*
++		 * At this point we want to restore MCK DIV domain to its maximum
++		 * allowed rate.
++		 */
++		ret = regmap_read(master_div->regmap, master_div->layout->offset,
++				  &mckr);
++		if (ret) {
++			ret = NOTIFY_STOP_MASK;
++			goto unlock;
++		}
++
++		mckr &= master_div->layout->mask;
++		div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
++		new_parent_rate = cnd->new_rate * characteristics->divisors[div];
++
++		for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
++			if (!characteristics->divisors[i])
++				break;
++
++			new_rate = DIV_ROUND_CLOSEST_ULL(new_parent_rate,
++							 characteristics->divisors[i]);
++
++			tmp_diff = characteristics->output.max - new_rate;
++			if (tmp_diff < 0)
++				continue;
++
++			if (best_diff < 0 || best_diff > tmp_diff) {
++				new_div = characteristics->divisors[i];
++				best_diff = tmp_diff;
++			}
++
++			if (!tmp_diff)
++				break;
++		}
++
++		if (!new_div) {
++			ret = NOTIFY_STOP_MASK;
++			goto unlock;
++		}
++
++		/* Update the div to preserve MCK DIV clock rate. */
++		clk_master_div_set(master_div, new_parent_rate,
++				   new_div);
++
++		ret = NOTIFY_OK;
++		break;
++
++	default:
++		ret = NOTIFY_DONE;
++		break;
++	}
++
++unlock:
++	spin_unlock_irqrestore(master_div->lock, flags);
++
++	return ret;
++}
++
++static struct notifier_block clk_master_div_notifier = {
++	.notifier_call = clk_master_div_notifier_fn,
++};
++
+ static void clk_sama7g5_master_best_diff(struct clk_rate_request *req,
+ 					 struct clk_hw *parent,
+ 					 unsigned long parent_rate,
+@@ -496,6 +578,8 @@ at91_clk_register_master_internal(struct
+ 	struct clk_master *master;
+ 	struct clk_init_data init;
+ 	struct clk_hw *hw;
++	unsigned int mckr;
++	unsigned long irqflags;
+ 	int ret;
+ 
+ 	if (!name || !num_parents || !parent_names || !lock)
+@@ -518,6 +602,16 @@ at91_clk_register_master_internal(struct
+ 	master->chg_pid = chg_pid;
+ 	master->lock = lock;
+ 
++	if (ops == &master_div_ops_chg) {
++		spin_lock_irqsave(master->lock, irqflags);
++		regmap_read(master->regmap, master->layout->offset, &mckr);
++		spin_unlock_irqrestore(master->lock, irqflags);
++
++		mckr &= layout->mask;
++		mckr = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
++		master->div = characteristics->divisors[mckr];
++	}
++
+ 	hw = &master->hw;
+ 	ret = clk_hw_register(NULL, &master->hw);
+ 	if (ret) {
+@@ -554,19 +648,29 @@ at91_clk_register_master_div(struct regm
+ 		const char *name, const char *parent_name,
+ 		const struct clk_master_layout *layout,
+ 		const struct clk_master_characteristics *characteristics,
+-		spinlock_t *lock, u32 flags)
++		spinlock_t *lock, u32 flags, u32 safe_div)
+ {
+ 	const struct clk_ops *ops;
++	struct clk_hw *hw;
+ 
+ 	if (flags & CLK_SET_RATE_GATE)
+ 		ops = &master_div_ops;
+ 	else
+ 		ops = &master_div_ops_chg;
+ 
+-	return at91_clk_register_master_internal(regmap, name, 1,
+-						 &parent_name, layout,
+-						 characteristics, ops,
+-						 lock, flags, -EINVAL);
++	hw = at91_clk_register_master_internal(regmap, name, 1,
++					       &parent_name, layout,
++					       characteristics, ops,
++					       lock, flags, -EINVAL);
++
++	if (!IS_ERR(hw) && safe_div) {
++		master_div = to_clk_master(hw);
++		master_div->safe_div = safe_div;
++		clk_notifier_register(hw->clk,
++				      &clk_master_div_notifier);
++	}
++
++	return hw;
+ }
+ 
+ static unsigned long
+--- a/drivers/clk/at91/dt-compat.c
++++ b/drivers/clk/at91/dt-compat.c
+@@ -399,7 +399,7 @@ of_at91_clk_master_setup(struct device_n
+ 
+ 	hw = at91_clk_register_master_div(regmap, name, "masterck_pres",
+ 					  layout, characteristics,
+-					  &mck_lock, CLK_SET_RATE_GATE);
++					  &mck_lock, CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto out_free_characteristics;
+ 
+--- a/drivers/clk/at91/pmc.h
++++ b/drivers/clk/at91/pmc.h
+@@ -182,7 +182,7 @@ at91_clk_register_master_div(struct regm
+ 			     const char *parent_names,
+ 			     const struct clk_master_layout *layout,
+ 			     const struct clk_master_characteristics *characteristics,
+-			     spinlock_t *lock, u32 flags);
++			     spinlock_t *lock, u32 flags, u32 safe_div);
+ 
+ struct clk_hw * __init
+ at91_clk_sama7g5_register_master(struct regmap *regmap,
+--- a/drivers/clk/at91/sama5d2.c
++++ b/drivers/clk/at91/sama5d2.c
+@@ -249,7 +249,7 @@ static void __init sama5d2_pmc_setup(str
+ 					  "masterck_pres",
+ 					  &at91sam9x5_master_layout,
+ 					  &mck_characteristics, &mck_lock,
+-					  CLK_SET_RATE_GATE);
++					  CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/sama5d3.c
++++ b/drivers/clk/at91/sama5d3.c
+@@ -184,7 +184,7 @@ static void __init sama5d3_pmc_setup(str
+ 					  "masterck_pres",
+ 					  &at91sam9x5_master_layout,
+ 					  &mck_characteristics, &mck_lock,
+-					  CLK_SET_RATE_GATE);
++					  CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/sama5d4.c
++++ b/drivers/clk/at91/sama5d4.c
+@@ -199,7 +199,7 @@ static void __init sama5d4_pmc_setup(str
+ 					  "masterck_pres",
+ 					  &at91sam9x5_master_layout,
+ 					  &mck_characteristics, &mck_lock,
+-					  CLK_SET_RATE_GATE);
++					  CLK_SET_RATE_GATE, 0);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
+--- a/drivers/clk/at91/sama7g5.c
++++ b/drivers/clk/at91/sama7g5.c
+@@ -993,7 +993,7 @@ static void __init sama7g5_pmc_setup(str
+ 	parent_names[0] = "cpupll_divpmcck";
+ 	hw = at91_clk_register_master_div(regmap, "mck0", "cpupll_divpmcck",
+ 					  &mck0_layout, &mck0_characteristics,
+-					  &pmc_mck0_lock, 0);
++					  &pmc_mck0_lock, CLK_GET_RATE_NOCACHE, 5);
+ 	if (IS_ERR(hw))
+ 		goto err_free;
+ 
diff --git a/target/linux/at91/patches-5.15/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch b/target/linux/at91/patches-5.15/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
new file mode 100644
index 0000000000..6cdec0add7
--- /dev/null
+++ b/target/linux/at91/patches-5.15/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
@@ -0,0 +1,26 @@
+From 9fd5a49f6da9de5da83f4a53eccefad647ab15ed Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:18 +0300
+Subject: [PATCH 246/247] clk: at91: sama7g5: set low limit for mck0 at 32KHz
+
+MCK0 could go as low as 32KHz. Set this limit.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-15-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/at91/sama7g5.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/clk/at91/sama7g5.c
++++ b/drivers/clk/at91/sama7g5.c
+@@ -849,7 +849,7 @@ static const struct {
+ 
+ /* MCK0 characteristics. */
+ static const struct clk_master_characteristics mck0_characteristics = {
+-	.output = { .min = 50000000, .max = 200000000 },
++	.output = { .min = 32768, .max = 200000000 },
+ 	.divisors = { 1, 2, 4, 3, 5 },
+ 	.have_div3_pres = 1,
+ };
diff --git a/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch b/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
new file mode 100644
index 0000000000..5b69d0cbc1
--- /dev/null
+++ b/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
@@ -0,0 +1,32 @@
+From fe07791494a78d5a4be1363385e6ba7940740644 Mon Sep 17 00:00:00 2001
+From: Claudiu Beznea <claudiu.beznea at microchip.com>
+Date: Mon, 11 Oct 2021 14:27:19 +0300
+Subject: [PATCH 247/247] clk: use clk_core_get_rate_recalc() in clk_rate_get()
+
+In case clock flags contains CLK_GET_RATE_NOCACHE the clk_rate_get()
+will return the cached rate. Thus, use clk_core_get_rate_recalc() which
+takes proper action when clock flags contains CLK_GET_RATE_NOCACHE.
+
+Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
+Link: https://lore.kernel.org/r/20211011112719.3951784-16-claudiu.beznea at microchip.com
+Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
+[sboyd at kernel.org: Grab prepare lock around operation]
+Signed-off-by: Stephen Boyd <sboyd at kernel.org>
+---
+ drivers/clk/clk.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/clk/clk.c
++++ b/drivers/clk/clk.c
+@@ -3145,7 +3145,10 @@ static int clk_rate_get(void *data, u64
+ {
+ 	struct clk_core *core = data;
+ 
+-	*val = core->rate;
++	clk_prepare_lock();
++	*val = clk_core_get_rate_recalc(core);
++	clk_prepare_unlock();
++
+ 	return 0;
+ }
+ 
diff --git a/target/linux/at91/sam9x/config-5.15 b/target/linux/at91/sam9x/config-5.15
new file mode 100644
index 0000000000..34c6d96b1c
--- /dev/null
+++ b/target/linux/at91/sam9x/config-5.15
@@ -0,0 +1,317 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_AT91=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+# CONFIG_ARCH_MULTI_V4 is not set
+CONFIG_ARCH_MULTI_V4T=y
+CONFIG_ARCH_MULTI_V4_V5=y
+CONFIG_ARCH_MULTI_V5=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_CRYPTO=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_L1_CACHE_SHIFT=5
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+# CONFIG_AT91RM9200_WATCHDOG is not set
+CONFIG_AT91SAM9X_WATCHDOG=y
+# CONFIG_AT91_ADC is not set
+CONFIG_AT91_SAMA5D2_ADC=y
+CONFIG_AT91_SOC_ID=y
+# CONFIG_AT91_SOC_SFR is not set
+CONFIG_ATMEL_AIC5_IRQ=y
+CONFIG_ATMEL_AIC_IRQ=y
+CONFIG_ATMEL_CLOCKSOURCE_PIT=y
+CONFIG_ATMEL_CLOCKSOURCE_TCB=y
+CONFIG_ATMEL_EBI=y
+CONFIG_ATMEL_PIT=y
+CONFIG_ATMEL_PM=y
+CONFIG_ATMEL_SDRAMC=y
+CONFIG_ATMEL_SSC=y
+CONFIG_ATMEL_ST=y
+CONFIG_ATMEL_TCB_CLKSRC=y
+CONFIG_AT_HDMAC=y
+CONFIG_AT_XDMAC=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_PM=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_AT91=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CPU_32v4T=y
+CONFIG_CPU_32v5=y
+CONFIG_CPU_ABRT_EV4T=y
+CONFIG_CPU_ABRT_EV5TJ=y
+CONFIG_CPU_ARM920T=y
+CONFIG_CPU_ARM926T=y
+# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
+CONFIG_CPU_CACHE_V4WT=y
+CONFIG_CPU_CACHE_VIVT=y
+CONFIG_CPU_COPY_V4WB=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
+CONFIG_CPU_NO_EFFICIENT_FFS=y
+CONFIG_CPU_PABRT_LEGACY=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V4WBI=y
+CONFIG_CPU_USE_DOMAINS=y
+CONFIG_CRC16=y
+CONFIG_CRC7=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_REMAP=y
+CONFIG_DTC=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=y
+CONFIG_EXT4_FS=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FREEZER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_CACHE=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ATMEL=y
+CONFIG_HZ=128
+CONFIG_HZ_FIXED=128
+CONFIG_HZ_PERIODIC=y
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_AT91=y
+# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_GPIO=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_TRIGGERED_BUFFER=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACB=y
+CONFIG_MACB_USE_HWSTAMP=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
+CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_FLEXCOM=y
+CONFIG_MFD_ATMEL_HLCDC=y
+CONFIG_MFD_ATMEL_SMC=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MICREL_PHY=y
+CONFIG_MICROCHIP_PIT64B=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_ATMELMCI=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_OF_AT91=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_DATAFLASH=y
+# CONFIG_MTD_DATAFLASH_OTP is not set
+# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_GLUEBI=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_KUSER_HELPERS=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NLS=y
+CONFIG_NVMEM=y
+# CONFIG_NVMEM_MICROCHIP_OTPC is not set
+CONFIG_NVMEM_SYSFS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+# CONFIG_PINCTRL_AT91PIO4 is not set
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_AT91_POWEROFF=y
+CONFIG_POWER_RESET_AT91_RESET=y
+CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_ATMEL=y
+CONFIG_PWM_ATMEL_HLCDC_PWM=y
+CONFIG_PWM_ATMEL_TCB=y
+CONFIG_PWM_SYSFS=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_AT91RM9200=y
+CONFIG_RTC_DRV_AT91SAM9=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_SAMA5D4_WATCHDOG=y
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_SERIAL_ATMEL_PDC=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SOC_AT91RM9200=y
+CONFIG_SOC_AT91SAM9=y
+CONFIG_SOC_BUS=y
+CONFIG_SOC_SAM9X60=y
+CONFIG_SOC_SAM_V4_V5=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+# CONFIG_SPI_AT91_USART is not set
+CONFIG_SPI_ATMEL=y
+CONFIG_SPI_ATMEL_QUADSPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_SPIDEV=y
+CONFIG_SPLIT_PTLOCK_CPUS=999999
+CONFIG_SRAM=y
+CONFIG_SRAM_EXEC=y
+CONFIG_SRCU=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_SWPHY=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TINY_SRCU=y
+CONFIG_UBIFS_FS=y
+CONFIG_UBIFS_FS_ADVANCED_COMPR=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_ACM=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+# CONFIG_USB_AT91 is not set
+# CONFIG_USB_ATMEL_USBA is not set
+CONFIG_USB_COMMON=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_AT91=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_AT91=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_SERIAL=y
+# CONFIG_USB_SERIAL_CONSOLE is not set
+CONFIG_USB_SERIAL_FTDI_SIO=y
+CONFIG_USB_SERIAL_PL2303=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+# CONFIG_VFP is not set
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XXHASH=y
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/at91/sama5/config-5.15 b/target/linux/at91/sama5/config-5.15
new file mode 100644
index 0000000000..47596039c8
--- /dev/null
+++ b/target/linux/at91/sama5/config-5.15
@@ -0,0 +1,493 @@
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_AT91=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_AT91_CPUIDLE=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_CRYPTO=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HEAVY_MB=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_AT91SAM9X_WATCHDOG=y
+CONFIG_AT91_ADC=y
+CONFIG_AT91_SAMA5D2_ADC=y
+CONFIG_AT91_SOC_ID=y
+# CONFIG_AT91_SOC_SFR is not set
+CONFIG_ATMEL_AIC5_IRQ=y
+# CONFIG_ATMEL_CLOCKSOURCE_PIT is not set
+CONFIG_ATMEL_CLOCKSOURCE_TCB=y
+CONFIG_ATMEL_EBI=y
+CONFIG_ATMEL_PM=y
+CONFIG_ATMEL_SDRAMC=y
+CONFIG_ATMEL_SSC=y
+CONFIG_ATMEL_TCB_CLKSRC=y
+CONFIG_AT_HDMAC=y
+CONFIG_AT_XDMAC=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_BATTERY_ACT8945A=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=4
+CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_PM=y
+CONFIG_CACHE_L2X0=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=16
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+# CONFIG_CMA_SYSFS is not set
+CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_AT91=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONTIG_ALLOC=y
+CONFIG_COREDUMP=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRASH_CORE=y
+CONFIG_CRASH_DUMP=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_HASH_INFO=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RNG_DEFAULT=y
+CONFIG_CRYPTO_SEQIV=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_CRYPTO_ZSTD=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DEBUG_USER=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_CMA=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_REMAP=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DNOTIFY=y
+CONFIG_DRM=y
+CONFIG_DRM_ATMEL_HLCDC=y
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_DP_AUX_BUS=y
+CONFIG_DRM_FBDEV_EMULATION=y
+CONFIG_DRM_FBDEV_OVERALLOC=100
+CONFIG_DRM_GEM_CMA_HELPER=y
+CONFIG_DRM_KMS_CMA_HELPER=y
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DRM_PANEL_SIMPLE=y
+CONFIG_DTC=y
+CONFIG_DVB_CORE=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=y
+CONFIG_ELF_CORE=y
+CONFIG_EXT4_FS=y
+CONFIG_FAT_FS=y
+CONFIG_FB=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CMDLINE=y
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_FOPS=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FORCE_MAX_ZONEORDER=15
+CONFIG_FREEZER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_CACHE=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+# CONFIG_HARDEN_BRANCH_HISTORY is not set
+# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HAVE_SMP=y
+CONFIG_HDMI=y
+CONFIG_HID=y
+CONFIG_HID_GENERIC=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_ATMEL=y
+CONFIG_HZ_FIXED=0
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_AT91=y
+# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_GPIO=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_TRIGGERED_BUFFER=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_LEDS=y
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+# CONFIG_JFFS2_FS is not set
+CONFIG_KCMP=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_XZ is not set
+CONFIG_KEXEC=y
+CONFIG_KEXEC_CORE=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_QT1070=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_PWM=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=y
+CONFIG_LIBFDT=y
+CONFIG_LOCALVERSION_AUTO=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACB=y
+CONFIG_MACB_USE_HWSTAMP=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
+CONFIG_MEDIA_ATTACH=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
+CONFIG_MEDIA_PLATFORM_SUPPORT=y
+CONFIG_MEDIA_RADIO_SUPPORT=y
+CONFIG_MEDIA_SDR_SUPPORT=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_TEST_SUPPORT=y
+CONFIG_MEDIA_TUNER=y
+CONFIG_MEDIA_USB_SUPPORT=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
+CONFIG_MEMORY_ISOLATION=y
+CONFIG_MFD_ACT8945A=y
+CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_FLEXCOM=y
+CONFIG_MFD_ATMEL_HLCDC=y
+CONFIG_MFD_ATMEL_SMC=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MICREL_PHY=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_ATMELMCI=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_OF_AT91=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MODULES_USE_ELF_REL=y
+# CONFIG_MTD_CFI_AMDSTD is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_BEB_LIMIT=20
+# CONFIG_MTD_UBI_BLOCK is not set
+CONFIG_MTD_UBI_FASTMAP=y
+CONFIG_MTD_UBI_WL_THRESHOLD=4096
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+# CONFIG_NEON is not set
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NLS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NVMEM=y
+# CONFIG_NVMEM_MICROCHIP_OTPC is not set
+CONFIG_NVMEM_SYSFS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_PINCTRL_AT91PIO4=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_AT91_POWEROFF=y
+CONFIG_POWER_RESET_AT91_RESET=y
+CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_PRINTK_TIME=y
+CONFIG_PROC_VMCORE=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_ATMEL=y
+CONFIG_PWM_ATMEL_HLCDC_PWM=y
+CONFIG_PWM_ATMEL_TCB=y
+CONFIG_PWM_SYSFS=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_ACT8865=y
+CONFIG_REGULATOR_ACT8945A=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_AT91RM9200=y
+# CONFIG_RTC_DRV_AT91SAM9 is not set
+# CONFIG_RTC_DRV_CMOS is not set
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_SAMA5D4_WATCHDOG=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+# CONFIG_SCSI_LOWLEVEL is not set
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_SERIAL_ATMEL_PDC=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SG_POOL=y
+CONFIG_SND=y
+CONFIG_SND_ARM=y
+# CONFIG_SND_AT73C213 is not set
+# CONFIG_SND_AT91_SOC_SAM9G20_WM8731 is not set
+# CONFIG_SND_AT91_SOC_SAM9X5_WM8731 is not set
+CONFIG_SND_ATMEL_SOC=y
+CONFIG_SND_ATMEL_SOC_CLASSD=y
+CONFIG_SND_ATMEL_SOC_DMA=y
+CONFIG_SND_ATMEL_SOC_I2S=y
+CONFIG_SND_ATMEL_SOC_PDC=y
+# CONFIG_SND_ATMEL_SOC_PDMIC is not set
+CONFIG_SND_ATMEL_SOC_SSC=y
+CONFIG_SND_ATMEL_SOC_SSC_DMA=y
+# CONFIG_SND_ATMEL_SOC_SSC_PDC is not set
+# CONFIG_SND_ATMEL_SOC_TSE850_PCM5142 is not set
+CONFIG_SND_ATMEL_SOC_WM8904=y
+# CONFIG_SND_COMPRESS_OFFLOAD is not set
+CONFIG_SND_DMAENGINE_PCM=y
+CONFIG_SND_JACK=y
+CONFIG_SND_JACK_INPUT_DEV=y
+# CONFIG_SND_MCHP_SOC_I2S_MCC is not set
+# CONFIG_SND_MCHP_SOC_SPDIFRX is not set
+# CONFIG_SND_MCHP_SOC_SPDIFTX is not set
+CONFIG_SND_PCM=y
+CONFIG_SND_PCM_TIMER=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+CONFIG_SND_SOC_MIKROE_PROTO=y
+CONFIG_SND_SOC_WM8731=y
+CONFIG_SND_SOC_WM8904=y
+CONFIG_SND_SPI=y
+CONFIG_SND_SUPPORT_OLD_API=y
+CONFIG_SND_TIMER=y
+CONFIG_SOC_BUS=y
+CONFIG_SOC_SAMA5=y
+CONFIG_SOC_SAMA5D2=y
+CONFIG_SOC_SAMA5D3=y
+CONFIG_SOC_SAMA5D4=y
+# CONFIG_SOC_SAMA7G5 is not set
+CONFIG_SOC_SAM_V7=y
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+# CONFIG_SPI_AT91_USART is not set
+CONFIG_SPI_ATMEL=y
+CONFIG_SPI_ATMEL_QUADSPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_GPIO=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+# CONFIG_SQUASHFS is not set
+CONFIG_SRAM=y
+CONFIG_SRAM_EXEC=y
+CONFIG_SRCU=y
+# CONFIG_STANDALONE is not set
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_SWPHY=y
+# CONFIG_SWP_EMULATE is not set
+CONFIG_SYNC_FILE=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TINY_SRCU=y
+CONFIG_TOUCHSCREEN_ATMEL_MXT=y
+CONFIG_UACCESS_WITH_MEMCPY=y
+CONFIG_UBIFS_FS=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_ACM=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+# CONFIG_USB_AT91 is not set
+# CONFIG_USB_ATMEL_USBA is not set
+CONFIG_USB_COMMON=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_AT91=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_HID=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_AT91=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+# CONFIG_USB_PWC is not set
+CONFIG_USB_SERIAL=y
+# CONFIG_USB_SERIAL_CONSOLE is not set
+CONFIG_USB_SERIAL_FTDI_SIO=y
+CONFIG_USB_SERIAL_PL2303=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_VFAT_FS=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_VIDEOMODE_HELPERS=y
+# CONFIG_VIDEO_CPIA2 is not set
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_V4L2_I2C=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_WATCHDOG_CORE=y
+# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
+CONFIG_XXHASH=y
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y
+CONFIG_ZSTD_COMPRESS=y
+CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/at91/sama7/config-5.15 b/target/linux/at91/sama7/config-5.15
new file mode 100644
index 0000000000..228007b8c3
--- /dev/null
+++ b/target/linux/at91/sama7/config-5.15
@@ -0,0 +1,406 @@
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_ALLOW_DEV_COREDUMP is not set
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_AT91=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=0
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_CRYPTO=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+# CONFIG_ARM_PATCH_IDIV is not set
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+# CONFIG_AT91SAM9X_WATCHDOG is not set
+# CONFIG_AT91_ADC is not set
+CONFIG_AT91_SAMA5D2_ADC=y
+CONFIG_AT91_SOC_ID=y
+# CONFIG_AT91_SOC_SFR is not set
+CONFIG_ATMEL_CLOCKSOURCE_TCB=y
+# CONFIG_ATMEL_EBI is not set
+CONFIG_ATMEL_SDRAMC=y
+CONFIG_ATMEL_TCB_CLKSRC=y
+# CONFIG_AT_HDMAC is not set
+CONFIG_AT_XDMAC=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=1
+CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_BLK_DEV_SD=y
+# CONFIG_CACHE_L2X0 is not set
+CONFIG_CAN=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=9
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=256
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+# CONFIG_CMA_SYSFS is not set
+CONFIG_CMDLINE="console=ttyS0,115200 earlyprintk nocache ignore_loglevel"
+CONFIG_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_AT91=y
+# CONFIG_COMPACTION is not set
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CONTIG_ALLOC=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_CPUFREQ_DT_PLATDEV=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+CONFIG_CPU_FREQ_GOV_COMMON=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_SPECTRE=y
+# CONFIG_CPU_SW_DOMAIN_PAN is not set
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+CONFIG_CRC_CCITT=y
+CONFIG_CRC_ITU_T=y
+CONFIG_CRYPTO_CMAC=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_DEFLATE=y
+CONFIG_CRYPTO_DRBG=y
+CONFIG_CRYPTO_DRBG_HMAC=y
+CONFIG_CRYPTO_DRBG_MENU=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_ECC=y
+CONFIG_CRYPTO_ECDH=y
+CONFIG_CRYPTO_HMAC=y
+CONFIG_CRYPTO_JITTERENTROPY=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA256=y
+CONFIG_CRYPTO_LZO=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_RNG_DEFAULT=y
+CONFIG_CRYPTO_SHA256=y
+CONFIG_CRYPTO_SHA512=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_AT91_SAMA7G5_FLEXCOM3=y
+CONFIG_DEBUG_AT91_UART=y
+CONFIG_DEBUG_LL=y
+CONFIG_DEBUG_LL_INCLUDE="debug/at91.S"
+CONFIG_DEBUG_UART_PHYS=0xe1824200
+CONFIG_DEBUG_UART_VIRT=0xe0824200
+# CONFIG_DEBUG_UNCOMPRESS is not set
+CONFIG_DEBUG_USER=y
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+CONFIG_DMADEVICES=y
+CONFIG_DMATEST=y
+CONFIG_DMA_CMA=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_ENGINE_RAID=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_REMAP=y
+CONFIG_DTC=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_EARLY_PRINTK=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_EEPROM_AT24=y
+# CONFIG_EFI_PARTITION is not set
+CONFIG_EXT4_FS=y
+CONFIG_FANOTIFY=y
+CONFIG_FAT_FS=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FORCE_MAX_ZONEORDER=15
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GRACE_PERIOD=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+# CONFIG_HARDEN_BRANCH_HISTORY is not set
+# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HAVE_SMP=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HZ_FIXED=0
+CONFIG_I2C=y
+CONFIG_I2C_AT91=y
+# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_CONFIGFS=y
+# CONFIG_IIO_HRTIMER_TRIGGER is not set
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_SW_TRIGGER=y
+# CONFIG_IIO_TIGHTLOOP_TRIGGER is not set
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_TRIGGERED_BUFFER=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_IP_PNP=y
+# CONFIG_IP_PNP_BOOTP is not set
+CONFIG_IP_PNP_DHCP=y
+# CONFIG_IP_PNP_RARP is not set
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LIBFDT=y
+CONFIG_LOCKD=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOG_BUF_SHIFT=16
+CONFIG_LSM="N"
+CONFIG_LZO_COMPRESS=y
+CONFIG_LZO_DECOMPRESS=y
+CONFIG_MACB=y
+CONFIG_MACB_USE_HWSTAMP=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_CONTROLLER=y
+CONFIG_MEDIA_PLATFORM_SUPPORT=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_SUPPORT_FILTER=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
+CONFIG_MEMORY_ISOLATION=y
+CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7
+CONFIG_MFD_AT91_USART=y
+CONFIG_MFD_ATMEL_FLEXCOM=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MICREL_PHY=y
+CONFIG_MICROCHIP_PIT64B=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+# CONFIG_MMC_ATMELMCI is not set
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_OF_AT91=y
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MODULE_FORCE_LOAD=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_PER_CPU_KM=y
+CONFIG_NEON=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NFS_FS=y
+CONFIG_NLS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NLS_UTF8=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NVMEM=y
+# CONFIG_NVMEM_MICROCHIP_OTPC is not set
+CONFIG_NVMEM_SYSFS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PCCARD=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AT91=y
+CONFIG_PINCTRL_AT91PIO4=y
+CONFIG_PM_OPP=y
+CONFIG_POWER_RESET=y
+# CONFIG_POWER_RESET_AT91_POWEROFF is not set
+CONFIG_POWER_RESET_AT91_RESET=y
+CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
+CONFIG_PPS=y
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_PRINTK_TIME=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_ATMEL=y
+CONFIG_PWM_SYSFS=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_MCP16502=y
+CONFIG_ROOT_NFS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_AT91RM9200=y
+CONFIG_RTC_DRV_AT91SAM9=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+# CONFIG_RUNTIME_TESTING_MENU is not set
+CONFIG_SAMA5D4_WATCHDOG=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_SERIAL_ATMEL_PDC=y
+# CONFIG_SERIAL_ATMEL_TTYAT is not set
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SGL_ALLOC=y
+CONFIG_SG_POOL=y
+CONFIG_SND=y
+CONFIG_SND_ATMEL_SOC=y
+# CONFIG_SND_ATMEL_SOC_CLASSD is not set
+# CONFIG_SND_ATMEL_SOC_I2S is not set
+# CONFIG_SND_ATMEL_SOC_PDMIC is not set
+# CONFIG_SND_COMPRESS_OFFLOAD is not set
+CONFIG_SND_DMAENGINE_PCM=y
+CONFIG_SND_JACK=y
+CONFIG_SND_JACK_INPUT_DEV=y
+CONFIG_SND_MCHP_SOC_I2S_MCC=y
+CONFIG_SND_MCHP_SOC_SPDIFRX=y
+CONFIG_SND_MCHP_SOC_SPDIFTX=y
+CONFIG_SND_PCM=y
+CONFIG_SND_SIMPLE_CARD=y
+CONFIG_SND_SIMPLE_CARD_UTILS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SOC_MIKROE_PROTO is not set
+CONFIG_SND_SOC_PCM5102A=y
+CONFIG_SND_SOC_SPDIF=y
+CONFIG_SOC_BUS=y
+# CONFIG_SOC_SAMA5D2 is not set
+# CONFIG_SOC_SAMA5D3 is not set
+# CONFIG_SOC_SAMA5D4 is not set
+CONFIG_SOC_SAMA7=y
+CONFIG_SOC_SAMA7G5=y
+CONFIG_SOC_SAM_V7=y
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+# CONFIG_SPI_AT91_USART is not set
+CONFIG_SPI_ATMEL=y
+# CONFIG_SPI_ATMEL_QUADSPI is not set
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SRCU=y
+CONFIG_STACKTRACE=y
+# CONFIG_STANDALONE is not set
+CONFIG_SUNRPC=y
+# CONFIG_SWAP is not set
+CONFIG_SWPHY=y
+# CONFIG_SWP_EMULATE is not set
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TINY_SRCU=y
+CONFIG_UACCESS_WITH_MEMCPY=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USE_OF=y
+CONFIG_V4L_PLATFORM_DRIVERS=y
+CONFIG_VFAT_FS=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+# CONFIG_VIDEO_ATMEL_XISC is not set
+CONFIG_VIDEO_DEV=y
+CONFIG_VIDEO_V4L2=y
+CONFIG_VIDEO_V4L2_I2C=y
+CONFIG_VIDEO_V4L2_SUBDEV_API=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_WATCHDOG_CORE=y
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y



From lede-commits at lists.infradead.org  Mon Apr 22 00:51:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 03:51:34 -0400
Subject: [openwrt/openwrt]  at91: 6.1: remove upstreamed patches
In-Reply-To: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
References: <171377229238.2087154.18413695090808024408@git-01.infra.openwrt.org>
Message-ID: <mailman.29388.1713772304.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/db2c9072600176e3fcd34a7632bfd864bc808502

commit db2c9072600176e3fcd34a7632bfd864bc808502
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Thu Apr 18 10:10:39 2024 +0200

    at91: 6.1: remove upstreamed patches
    
    Remove the upstreamed patches.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 ...-clk-at91-re-factor-clocks-suspend-resume.patch | 1342 --------------------
 ...c-execute-suspend-resume-only-for-backup-.patch |   89 --
 ...k-master-add-register-definition-for-sama.patch |  124 --
 ...k-master-improve-readability-by-using-loc.patch |   40 -
 ...c-add-sama7g5-to-the-list-of-available-pm.patch |   39 -
 ...-clk-master-mask-mckr-against-layout-mask.patch |   46 -
 ...k-sam9x60-pll-add-notifier-for-div-part-o.patch |  312 -----
 ...-at91-clk-master-add-notifier-for-divider.patch |  519 --------
 ...1-sama7g5-set-low-limit-for-mck0-at-32KHz.patch |   26 -
 ...-clk_core_get_rate_recalc-in-clk_rate_get.patch |   32 -
 10 files changed, 2569 deletions(-)

diff --git a/target/linux/at91/patches-6.1/100-clk-at91-re-factor-clocks-suspend-resume.patch b/target/linux/at91/patches-6.1/100-clk-at91-re-factor-clocks-suspend-resume.patch
deleted file mode 100644
index 5d399f6535..0000000000
--- a/target/linux/at91/patches-6.1/100-clk-at91-re-factor-clocks-suspend-resume.patch
+++ /dev/null
@@ -1,1342 +0,0 @@
-From 65bb4687b2a5c6f02f44345540c3389d6e7523e7 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:05 +0300
-Subject: [PATCH 234/247] clk: at91: re-factor clocks suspend/resume
-
-SAMA5D2 and SAMA7G5 have a special power saving mode (backup mode) where
-most of the SoC's components are powered off (including PMC). Resuming
-from this mode is done with the help of bootloader. Peripherals are not
-aware of the power saving mode thus most of them are disabling clocks in
-proper suspend API and re-enable them in resume API without taking into
-account the previously setup rate. Moreover some of the peripherals are
-acting as wakeup sources and are not disabling the clocks in this
-scenario, when suspending. Since backup mode cuts the power for
-peripherals, in resume part these clocks needs to be re-configured.
-
-The initial PMC suspend/resume code was designed only for SAMA5D2's PMC
-(as it was the only one supporting backup mode). SAMA7G supports also
-backup mode and its PMC is different (few new functionalities, different
-registers offsets, different offsets in registers for each
-functionalities). To address both SAMA5D2 and SAMA7G5 PMC add
-.save_context()/.resume_context() support to each clocks driver and call
-this from PMC driver.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-2-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-generated.c    |  46 +++++--
- drivers/clk/at91/clk-main.c         |  66 ++++++++++
- drivers/clk/at91/clk-master.c       | 194 ++++++++++++++++++++++++++--
- drivers/clk/at91/clk-peripheral.c   |  40 +++++-
- drivers/clk/at91/clk-pll.c          |  39 ++++++
- drivers/clk/at91/clk-programmable.c |  29 ++++-
- drivers/clk/at91/clk-sam9x60-pll.c  |  68 +++++++++-
- drivers/clk/at91/clk-system.c       |  20 +++
- drivers/clk/at91/clk-usb.c          |  27 ++++
- drivers/clk/at91/clk-utmi.c         |  39 ++++++
- drivers/clk/at91/pmc.c              | 147 +--------------------
- drivers/clk/at91/pmc.h              |  24 ++--
- 12 files changed, 558 insertions(+), 181 deletions(-)
-
---- a/drivers/clk/at91/clk-generated.c
-+++ b/drivers/clk/at91/clk-generated.c
-@@ -27,6 +27,7 @@ struct clk_generated {
- 	u32 id;
- 	u32 gckdiv;
- 	const struct clk_pcr_layout *layout;
-+	struct at91_clk_pms pms;
- 	u8 parent_id;
- 	int chg_pid;
- };
-@@ -34,25 +35,35 @@ struct clk_generated {
- #define to_clk_generated(hw) \
- 	container_of(hw, struct clk_generated, hw)
- 
--static int clk_generated_enable(struct clk_hw *hw)
-+static int clk_generated_set(struct clk_generated *gck, int status)
- {
--	struct clk_generated *gck = to_clk_generated(hw);
- 	unsigned long flags;
--
--	pr_debug("GCLK: %s, gckdiv = %d, parent id = %d\n",
--		 __func__, gck->gckdiv, gck->parent_id);
-+	unsigned int enable = status ? AT91_PMC_PCR_GCKEN : 0;
- 
- 	spin_lock_irqsave(gck->lock, flags);
- 	regmap_write(gck->regmap, gck->layout->offset,
- 		     (gck->id & gck->layout->pid_mask));
- 	regmap_update_bits(gck->regmap, gck->layout->offset,
- 			   AT91_PMC_PCR_GCKDIV_MASK | gck->layout->gckcss_mask |
--			   gck->layout->cmd | AT91_PMC_PCR_GCKEN,
-+			   gck->layout->cmd | enable,
- 			   field_prep(gck->layout->gckcss_mask, gck->parent_id) |
- 			   gck->layout->cmd |
- 			   FIELD_PREP(AT91_PMC_PCR_GCKDIV_MASK, gck->gckdiv) |
--			   AT91_PMC_PCR_GCKEN);
-+			   enable);
- 	spin_unlock_irqrestore(gck->lock, flags);
-+
-+	return 0;
-+}
-+
-+static int clk_generated_enable(struct clk_hw *hw)
-+{
-+	struct clk_generated *gck = to_clk_generated(hw);
-+
-+	pr_debug("GCLK: %s, gckdiv = %d, parent id = %d\n",
-+		 __func__, gck->gckdiv, gck->parent_id);
-+
-+	clk_generated_set(gck, 1);
-+
- 	return 0;
- }
- 
-@@ -249,6 +260,23 @@ static int clk_generated_set_rate(struct
- 	return 0;
- }
- 
-+static int clk_generated_save_context(struct clk_hw *hw)
-+{
-+	struct clk_generated *gck = to_clk_generated(hw);
-+
-+	gck->pms.status = clk_generated_is_enabled(&gck->hw);
-+
-+	return 0;
-+}
-+
-+static void clk_generated_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_generated *gck = to_clk_generated(hw);
-+
-+	if (gck->pms.status)
-+		clk_generated_set(gck, gck->pms.status);
-+}
-+
- static const struct clk_ops generated_ops = {
- 	.enable = clk_generated_enable,
- 	.disable = clk_generated_disable,
-@@ -258,6 +286,8 @@ static const struct clk_ops generated_op
- 	.get_parent = clk_generated_get_parent,
- 	.set_parent = clk_generated_set_parent,
- 	.set_rate = clk_generated_set_rate,
-+	.save_context = clk_generated_save_context,
-+	.restore_context = clk_generated_restore_context,
- };
- 
- /**
-@@ -324,8 +354,6 @@ at91_clk_register_generated(struct regma
- 	if (ret) {
- 		kfree(gck);
- 		hw = ERR_PTR(ret);
--	} else {
--		pmc_register_id(id);
- 	}
- 
- 	return hw;
---- a/drivers/clk/at91/clk-main.c
-+++ b/drivers/clk/at91/clk-main.c
-@@ -28,6 +28,7 @@
- struct clk_main_osc {
- 	struct clk_hw hw;
- 	struct regmap *regmap;
-+	struct at91_clk_pms pms;
- };
- 
- #define to_clk_main_osc(hw) container_of(hw, struct clk_main_osc, hw)
-@@ -37,6 +38,7 @@ struct clk_main_rc_osc {
- 	struct regmap *regmap;
- 	unsigned long frequency;
- 	unsigned long accuracy;
-+	struct at91_clk_pms pms;
- };
- 
- #define to_clk_main_rc_osc(hw) container_of(hw, struct clk_main_rc_osc, hw)
-@@ -51,6 +53,7 @@ struct clk_rm9200_main {
- struct clk_sam9x5_main {
- 	struct clk_hw hw;
- 	struct regmap *regmap;
-+	struct at91_clk_pms pms;
- 	u8 parent;
- };
- 
-@@ -120,10 +123,29 @@ static int clk_main_osc_is_prepared(stru
- 	return (status & AT91_PMC_MOSCS) && clk_main_parent_select(tmp);
- }
- 
-+static int clk_main_osc_save_context(struct clk_hw *hw)
-+{
-+	struct clk_main_osc *osc = to_clk_main_osc(hw);
-+
-+	osc->pms.status = clk_main_osc_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_main_osc_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_main_osc *osc = to_clk_main_osc(hw);
-+
-+	if (osc->pms.status)
-+		clk_main_osc_prepare(hw);
-+}
-+
- static const struct clk_ops main_osc_ops = {
- 	.prepare = clk_main_osc_prepare,
- 	.unprepare = clk_main_osc_unprepare,
- 	.is_prepared = clk_main_osc_is_prepared,
-+	.save_context = clk_main_osc_save_context,
-+	.restore_context = clk_main_osc_restore_context,
- };
- 
- struct clk_hw * __init
-@@ -240,12 +262,31 @@ static unsigned long clk_main_rc_osc_rec
- 	return osc->accuracy;
- }
- 
-+static int clk_main_rc_osc_save_context(struct clk_hw *hw)
-+{
-+	struct clk_main_rc_osc *osc = to_clk_main_rc_osc(hw);
-+
-+	osc->pms.status = clk_main_rc_osc_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_main_rc_osc_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_main_rc_osc *osc = to_clk_main_rc_osc(hw);
-+
-+	if (osc->pms.status)
-+		clk_main_rc_osc_prepare(hw);
-+}
-+
- static const struct clk_ops main_rc_osc_ops = {
- 	.prepare = clk_main_rc_osc_prepare,
- 	.unprepare = clk_main_rc_osc_unprepare,
- 	.is_prepared = clk_main_rc_osc_is_prepared,
- 	.recalc_rate = clk_main_rc_osc_recalc_rate,
- 	.recalc_accuracy = clk_main_rc_osc_recalc_accuracy,
-+	.save_context = clk_main_rc_osc_save_context,
-+	.restore_context = clk_main_rc_osc_restore_context,
- };
- 
- struct clk_hw * __init
-@@ -465,12 +506,37 @@ static u8 clk_sam9x5_main_get_parent(str
- 	return clk_main_parent_select(status);
- }
- 
-+static int clk_sam9x5_main_save_context(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_main *clkmain = to_clk_sam9x5_main(hw);
-+
-+	clkmain->pms.status = clk_main_rc_osc_is_prepared(&clkmain->hw);
-+	clkmain->pms.parent = clk_sam9x5_main_get_parent(&clkmain->hw);
-+
-+	return 0;
-+}
-+
-+static void clk_sam9x5_main_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_main *clkmain = to_clk_sam9x5_main(hw);
-+	int ret;
-+
-+	ret = clk_sam9x5_main_set_parent(hw, clkmain->pms.parent);
-+	if (ret)
-+		return;
-+
-+	if (clkmain->pms.status)
-+		clk_sam9x5_main_prepare(hw);
-+}
-+
- static const struct clk_ops sam9x5_main_ops = {
- 	.prepare = clk_sam9x5_main_prepare,
- 	.is_prepared = clk_sam9x5_main_is_prepared,
- 	.recalc_rate = clk_sam9x5_main_recalc_rate,
- 	.set_parent = clk_sam9x5_main_set_parent,
- 	.get_parent = clk_sam9x5_main_get_parent,
-+	.save_context = clk_sam9x5_main_save_context,
-+	.restore_context = clk_sam9x5_main_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -37,6 +37,7 @@ struct clk_master {
- 	spinlock_t *lock;
- 	const struct clk_master_layout *layout;
- 	const struct clk_master_characteristics *characteristics;
-+	struct at91_clk_pms pms;
- 	u32 *mux_table;
- 	u32 mckr;
- 	int chg_pid;
-@@ -112,10 +113,52 @@ static unsigned long clk_master_div_reca
- 	return rate;
- }
- 
-+static int clk_master_div_save_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+	unsigned long flags;
-+	unsigned int mckr, div;
-+
-+	spin_lock_irqsave(master->lock, flags);
-+	regmap_read(master->regmap, master->layout->offset, &mckr);
-+	spin_unlock_irqrestore(master->lock, flags);
-+
-+	mckr &= master->layout->mask;
-+	div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+	div = master->characteristics->divisors[div];
-+
-+	master->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	master->pms.rate = DIV_ROUND_CLOSEST(master->pms.parent_rate, div);
-+
-+	return 0;
-+}
-+
-+static void clk_master_div_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	unsigned long flags;
-+	unsigned int mckr;
-+	u8 div;
-+
-+	spin_lock_irqsave(master->lock, flags);
-+	regmap_read(master->regmap, master->layout->offset, &mckr);
-+	spin_unlock_irqrestore(master->lock, flags);
-+
-+	mckr &= master->layout->mask;
-+	div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+	div = master->characteristics->divisors[div];
-+
-+	if (div != DIV_ROUND_CLOSEST(master->pms.parent_rate, master->pms.rate))
-+		pr_warn("MCKR DIV not configured properly by firmware!\n");
-+}
-+
- static const struct clk_ops master_div_ops = {
- 	.prepare = clk_master_prepare,
- 	.is_prepared = clk_master_is_prepared,
- 	.recalc_rate = clk_master_div_recalc_rate,
-+	.save_context = clk_master_div_save_context,
-+	.restore_context = clk_master_div_restore_context,
- };
- 
- static int clk_master_div_set_rate(struct clk_hw *hw, unsigned long rate,
-@@ -125,7 +168,9 @@ static int clk_master_div_set_rate(struc
- 	const struct clk_master_characteristics *characteristics =
- 						master->characteristics;
- 	unsigned long flags;
-+	unsigned int mckr, tmp;
- 	int div, i;
-+	int ret;
- 
- 	div = DIV_ROUND_CLOSEST(parent_rate, rate);
- 	if (div > ARRAY_SIZE(characteristics->divisors))
-@@ -145,11 +190,24 @@ static int clk_master_div_set_rate(struc
- 		return -EINVAL;
- 
- 	spin_lock_irqsave(master->lock, flags);
--	regmap_update_bits(master->regmap, master->layout->offset,
--			   (MASTER_DIV_MASK << MASTER_DIV_SHIFT),
--			   (div << MASTER_DIV_SHIFT));
-+	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
-+	if (ret)
-+		goto unlock;
-+
-+	tmp = mckr & master->layout->mask;
-+	tmp = (tmp >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+	if (tmp == div)
-+		goto unlock;
-+
-+	mckr &= ~(MASTER_DIV_MASK << MASTER_DIV_SHIFT);
-+	mckr |= (div << MASTER_DIV_SHIFT);
-+	ret = regmap_write(master->regmap, master->layout->offset, mckr);
-+	if (ret)
-+		goto unlock;
-+
- 	while (!clk_master_ready(master))
- 		cpu_relax();
-+unlock:
- 	spin_unlock_irqrestore(master->lock, flags);
- 
- 	return 0;
-@@ -197,12 +255,25 @@ static int clk_master_div_determine_rate
- 	return 0;
- }
- 
-+static void clk_master_div_restore_context_chg(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	int ret;
-+
-+	ret = clk_master_div_set_rate(hw, master->pms.rate,
-+				      master->pms.parent_rate);
-+	if (ret)
-+		pr_warn("Failed to restore MCK DIV clock\n");
-+}
-+
- static const struct clk_ops master_div_ops_chg = {
- 	.prepare = clk_master_prepare,
- 	.is_prepared = clk_master_is_prepared,
- 	.recalc_rate = clk_master_div_recalc_rate,
- 	.determine_rate = clk_master_div_determine_rate,
- 	.set_rate = clk_master_div_set_rate,
-+	.save_context = clk_master_div_save_context,
-+	.restore_context = clk_master_div_restore_context_chg,
- };
- 
- static void clk_sama7g5_master_best_diff(struct clk_rate_request *req,
-@@ -272,7 +343,8 @@ static int clk_master_pres_set_rate(stru
- {
- 	struct clk_master *master = to_clk_master(hw);
- 	unsigned long flags;
--	unsigned int pres;
-+	unsigned int pres, mckr, tmp;
-+	int ret;
- 
- 	pres = DIV_ROUND_CLOSEST(parent_rate, rate);
- 	if (pres > MASTER_PRES_MAX)
-@@ -284,15 +356,27 @@ static int clk_master_pres_set_rate(stru
- 		pres = ffs(pres) - 1;
- 
- 	spin_lock_irqsave(master->lock, flags);
--	regmap_update_bits(master->regmap, master->layout->offset,
--			   (MASTER_PRES_MASK << master->layout->pres_shift),
--			   (pres << master->layout->pres_shift));
-+	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
-+	if (ret)
-+		goto unlock;
-+
-+	mckr &= master->layout->mask;
-+	tmp = (mckr >> master->layout->pres_shift) & MASTER_PRES_MASK;
-+	if (pres == tmp)
-+		goto unlock;
-+
-+	mckr &= ~(MASTER_PRES_MASK << master->layout->pres_shift);
-+	mckr |= (pres << master->layout->pres_shift);
-+	ret = regmap_write(master->regmap, master->layout->offset, mckr);
-+	if (ret)
-+		goto unlock;
- 
- 	while (!clk_master_ready(master))
- 		cpu_relax();
-+unlock:
- 	spin_unlock_irqrestore(master->lock, flags);
- 
--	return 0;
-+	return ret;
- }
- 
- static unsigned long clk_master_pres_recalc_rate(struct clk_hw *hw,
-@@ -330,11 +414,68 @@ static u8 clk_master_pres_get_parent(str
- 	return mckr & AT91_PMC_CSS;
- }
- 
-+static int clk_master_pres_save_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+	unsigned long flags;
-+	unsigned int val, pres;
-+
-+	spin_lock_irqsave(master->lock, flags);
-+	regmap_read(master->regmap, master->layout->offset, &val);
-+	spin_unlock_irqrestore(master->lock, flags);
-+
-+	val &= master->layout->mask;
-+	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
-+	if (pres == MASTER_PRES_MAX && master->characteristics->have_div3_pres)
-+		pres = 3;
-+	else
-+		pres = (1 << pres);
-+
-+	master->pms.parent = val & AT91_PMC_CSS;
-+	master->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	master->pms.rate = DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres);
-+
-+	return 0;
-+}
-+
-+static void clk_master_pres_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	unsigned long flags;
-+	unsigned int val, pres;
-+
-+	spin_lock_irqsave(master->lock, flags);
-+	regmap_read(master->regmap, master->layout->offset, &val);
-+	spin_unlock_irqrestore(master->lock, flags);
-+
-+	val &= master->layout->mask;
-+	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
-+	if (pres == MASTER_PRES_MAX && master->characteristics->have_div3_pres)
-+		pres = 3;
-+	else
-+		pres = (1 << pres);
-+
-+	if (master->pms.rate !=
-+	    DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres) ||
-+	    (master->pms.parent != (val & AT91_PMC_CSS)))
-+		pr_warn("MCKR PRES was not configured properly by firmware!\n");
-+}
-+
-+static void clk_master_pres_restore_context_chg(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+
-+	clk_master_pres_set_rate(hw, master->pms.rate, master->pms.parent_rate);
-+}
-+
- static const struct clk_ops master_pres_ops = {
- 	.prepare = clk_master_prepare,
- 	.is_prepared = clk_master_is_prepared,
- 	.recalc_rate = clk_master_pres_recalc_rate,
- 	.get_parent = clk_master_pres_get_parent,
-+	.save_context = clk_master_pres_save_context,
-+	.restore_context = clk_master_pres_restore_context,
- };
- 
- static const struct clk_ops master_pres_ops_chg = {
-@@ -344,6 +485,8 @@ static const struct clk_ops master_pres_
- 	.recalc_rate = clk_master_pres_recalc_rate,
- 	.get_parent = clk_master_pres_get_parent,
- 	.set_rate = clk_master_pres_set_rate,
-+	.save_context = clk_master_pres_save_context,
-+	.restore_context = clk_master_pres_restore_context_chg,
- };
- 
- static struct clk_hw * __init
-@@ -539,20 +682,21 @@ static int clk_sama7g5_master_set_parent
- 	return 0;
- }
- 
--static int clk_sama7g5_master_enable(struct clk_hw *hw)
-+static void clk_sama7g5_master_set(struct clk_master *master,
-+				   unsigned int status)
- {
--	struct clk_master *master = to_clk_master(hw);
- 	unsigned long flags;
- 	unsigned int val, cparent;
-+	unsigned int enable = status ? PMC_MCR_EN : 0;
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
- 	regmap_write(master->regmap, PMC_MCR, PMC_MCR_ID(master->id));
- 	regmap_read(master->regmap, PMC_MCR, &val);
- 	regmap_update_bits(master->regmap, PMC_MCR,
--			   PMC_MCR_EN | PMC_MCR_CSS | PMC_MCR_DIV |
-+			   enable | PMC_MCR_CSS | PMC_MCR_DIV |
- 			   PMC_MCR_CMD | PMC_MCR_ID_MSK,
--			   PMC_MCR_EN | (master->parent << PMC_MCR_CSS_SHIFT) |
-+			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
- 			   (master->div << MASTER_DIV_SHIFT) |
- 			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
- 
-@@ -563,6 +707,13 @@ static int clk_sama7g5_master_enable(str
- 		cpu_relax();
- 
- 	spin_unlock_irqrestore(master->lock, flags);
-+}
-+
-+static int clk_sama7g5_master_enable(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+
-+	clk_sama7g5_master_set(master, 1);
- 
- 	return 0;
- }
-@@ -620,6 +771,23 @@ static int clk_sama7g5_master_set_rate(s
- 	return 0;
- }
- 
-+static int clk_sama7g5_master_save_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+
-+	master->pms.status = clk_sama7g5_master_is_enabled(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_sama7g5_master_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+
-+	if (master->pms.status)
-+		clk_sama7g5_master_set(master, master->pms.status);
-+}
-+
- static const struct clk_ops sama7g5_master_ops = {
- 	.enable = clk_sama7g5_master_enable,
- 	.disable = clk_sama7g5_master_disable,
-@@ -629,6 +797,8 @@ static const struct clk_ops sama7g5_mast
- 	.set_rate = clk_sama7g5_master_set_rate,
- 	.get_parent = clk_sama7g5_master_get_parent,
- 	.set_parent = clk_sama7g5_master_set_parent,
-+	.save_context = clk_sama7g5_master_save_context,
-+	.restore_context = clk_sama7g5_master_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-peripheral.c
-+++ b/drivers/clk/at91/clk-peripheral.c
-@@ -37,6 +37,7 @@ struct clk_sam9x5_peripheral {
- 	u32 id;
- 	u32 div;
- 	const struct clk_pcr_layout *layout;
-+	struct at91_clk_pms pms;
- 	bool auto_div;
- 	int chg_pid;
- };
-@@ -155,10 +156,11 @@ static void clk_sam9x5_peripheral_autodi
- 	periph->div = shift;
- }
- 
--static int clk_sam9x5_peripheral_enable(struct clk_hw *hw)
-+static int clk_sam9x5_peripheral_set(struct clk_sam9x5_peripheral *periph,
-+				     unsigned int status)
- {
--	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
- 	unsigned long flags;
-+	unsigned int enable = status ? AT91_PMC_PCR_EN : 0;
- 
- 	if (periph->id < PERIPHERAL_ID_MIN)
- 		return 0;
-@@ -168,15 +170,21 @@ static int clk_sam9x5_peripheral_enable(
- 		     (periph->id & periph->layout->pid_mask));
- 	regmap_update_bits(periph->regmap, periph->layout->offset,
- 			   periph->layout->div_mask | periph->layout->cmd |
--			   AT91_PMC_PCR_EN,
-+			   enable,
- 			   field_prep(periph->layout->div_mask, periph->div) |
--			   periph->layout->cmd |
--			   AT91_PMC_PCR_EN);
-+			   periph->layout->cmd | enable);
- 	spin_unlock_irqrestore(periph->lock, flags);
- 
- 	return 0;
- }
- 
-+static int clk_sam9x5_peripheral_enable(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
-+
-+	return clk_sam9x5_peripheral_set(periph, 1);
-+}
-+
- static void clk_sam9x5_peripheral_disable(struct clk_hw *hw)
- {
- 	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
-@@ -393,6 +401,23 @@ static int clk_sam9x5_peripheral_set_rat
- 	return -EINVAL;
- }
- 
-+static int clk_sam9x5_peripheral_save_context(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
-+
-+	periph->pms.status = clk_sam9x5_peripheral_is_enabled(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_sam9x5_peripheral_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
-+
-+	if (periph->pms.status)
-+		clk_sam9x5_peripheral_set(periph, periph->pms.status);
-+}
-+
- static const struct clk_ops sam9x5_peripheral_ops = {
- 	.enable = clk_sam9x5_peripheral_enable,
- 	.disable = clk_sam9x5_peripheral_disable,
-@@ -400,6 +425,8 @@ static const struct clk_ops sam9x5_perip
- 	.recalc_rate = clk_sam9x5_peripheral_recalc_rate,
- 	.round_rate = clk_sam9x5_peripheral_round_rate,
- 	.set_rate = clk_sam9x5_peripheral_set_rate,
-+	.save_context = clk_sam9x5_peripheral_save_context,
-+	.restore_context = clk_sam9x5_peripheral_restore_context,
- };
- 
- static const struct clk_ops sam9x5_peripheral_chg_ops = {
-@@ -409,6 +436,8 @@ static const struct clk_ops sam9x5_perip
- 	.recalc_rate = clk_sam9x5_peripheral_recalc_rate,
- 	.determine_rate = clk_sam9x5_peripheral_determine_rate,
- 	.set_rate = clk_sam9x5_peripheral_set_rate,
-+	.save_context = clk_sam9x5_peripheral_save_context,
-+	.restore_context = clk_sam9x5_peripheral_restore_context,
- };
- 
- struct clk_hw * __init
-@@ -460,7 +489,6 @@ at91_clk_register_sam9x5_peripheral(stru
- 		hw = ERR_PTR(ret);
- 	} else {
- 		clk_sam9x5_peripheral_autodiv(periph);
--		pmc_register_id(id);
- 	}
- 
- 	return hw;
---- a/drivers/clk/at91/clk-pll.c
-+++ b/drivers/clk/at91/clk-pll.c
-@@ -40,6 +40,7 @@ struct clk_pll {
- 	u16 mul;
- 	const struct clk_pll_layout *layout;
- 	const struct clk_pll_characteristics *characteristics;
-+	struct at91_clk_pms pms;
- };
- 
- static inline bool clk_pll_ready(struct regmap *regmap, int id)
-@@ -260,6 +261,42 @@ static int clk_pll_set_rate(struct clk_h
- 	return 0;
- }
- 
-+static int clk_pll_save_context(struct clk_hw *hw)
-+{
-+	struct clk_pll *pll = to_clk_pll(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+
-+	pll->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	pll->pms.rate = clk_pll_recalc_rate(&pll->hw, pll->pms.parent_rate);
-+	pll->pms.status = clk_pll_ready(pll->regmap, PLL_REG(pll->id));
-+
-+	return 0;
-+}
-+
-+static void clk_pll_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_pll *pll = to_clk_pll(hw);
-+	unsigned long calc_rate;
-+	unsigned int pllr, pllr_out, pllr_count;
-+	u8 out = 0;
-+
-+	if (pll->characteristics->out)
-+		out = pll->characteristics->out[pll->range];
-+
-+	regmap_read(pll->regmap, PLL_REG(pll->id), &pllr);
-+
-+	calc_rate = (pll->pms.parent_rate / PLL_DIV(pllr)) *
-+		     (PLL_MUL(pllr, pll->layout) + 1);
-+	pllr_count = (pllr >> PLL_COUNT_SHIFT) & PLL_MAX_COUNT;
-+	pllr_out = (pllr >> PLL_OUT_SHIFT) & out;
-+
-+	if (pll->pms.rate != calc_rate ||
-+	    pll->pms.status != clk_pll_ready(pll->regmap, PLL_REG(pll->id)) ||
-+	    pllr_count != PLL_MAX_COUNT ||
-+	    (out && pllr_out != out))
-+		pr_warn("PLLAR was not configured properly by firmware\n");
-+}
-+
- static const struct clk_ops pll_ops = {
- 	.prepare = clk_pll_prepare,
- 	.unprepare = clk_pll_unprepare,
-@@ -267,6 +304,8 @@ static const struct clk_ops pll_ops = {
- 	.recalc_rate = clk_pll_recalc_rate,
- 	.round_rate = clk_pll_round_rate,
- 	.set_rate = clk_pll_set_rate,
-+	.save_context = clk_pll_save_context,
-+	.restore_context = clk_pll_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-programmable.c
-+++ b/drivers/clk/at91/clk-programmable.c
-@@ -24,6 +24,7 @@ struct clk_programmable {
- 	u32 *mux_table;
- 	u8 id;
- 	const struct clk_programmable_layout *layout;
-+	struct at91_clk_pms pms;
- };
- 
- #define to_clk_programmable(hw) container_of(hw, struct clk_programmable, hw)
-@@ -177,12 +178,38 @@ static int clk_programmable_set_rate(str
- 	return 0;
- }
- 
-+static int clk_programmable_save_context(struct clk_hw *hw)
-+{
-+	struct clk_programmable *prog = to_clk_programmable(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+
-+	prog->pms.parent = clk_programmable_get_parent(hw);
-+	prog->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	prog->pms.rate = clk_programmable_recalc_rate(hw, prog->pms.parent_rate);
-+
-+	return 0;
-+}
-+
-+static void clk_programmable_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_programmable *prog = to_clk_programmable(hw);
-+	int ret;
-+
-+	ret = clk_programmable_set_parent(hw, prog->pms.parent);
-+	if (ret)
-+		return;
-+
-+	clk_programmable_set_rate(hw, prog->pms.rate, prog->pms.parent_rate);
-+}
-+
- static const struct clk_ops programmable_ops = {
- 	.recalc_rate = clk_programmable_recalc_rate,
- 	.determine_rate = clk_programmable_determine_rate,
- 	.get_parent = clk_programmable_get_parent,
- 	.set_parent = clk_programmable_set_parent,
- 	.set_rate = clk_programmable_set_rate,
-+	.save_context = clk_programmable_save_context,
-+	.restore_context = clk_programmable_restore_context,
- };
- 
- struct clk_hw * __init
-@@ -221,8 +248,6 @@ at91_clk_register_programmable(struct re
- 	if (ret) {
- 		kfree(prog);
- 		hw = ERR_PTR(ret);
--	} else {
--		pmc_register_pck(id);
- 	}
- 
- 	return hw;
---- a/drivers/clk/at91/clk-sam9x60-pll.c
-+++ b/drivers/clk/at91/clk-sam9x60-pll.c
-@@ -38,12 +38,14 @@ struct sam9x60_pll_core {
- 
- struct sam9x60_frac {
- 	struct sam9x60_pll_core core;
-+	struct at91_clk_pms pms;
- 	u32 frac;
- 	u16 mul;
- };
- 
- struct sam9x60_div {
- 	struct sam9x60_pll_core core;
-+	struct at91_clk_pms pms;
- 	u8 div;
- };
- 
-@@ -75,9 +77,8 @@ static unsigned long sam9x60_frac_pll_re
- 		DIV_ROUND_CLOSEST_ULL((u64)parent_rate * frac->frac, (1 << 22));
- }
- 
--static int sam9x60_frac_pll_prepare(struct clk_hw *hw)
-+static int sam9x60_frac_pll_set(struct sam9x60_pll_core *core)
- {
--	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
- 	struct sam9x60_frac *frac = to_sam9x60_frac(core);
- 	struct regmap *regmap = core->regmap;
- 	unsigned int val, cfrac, cmul;
-@@ -141,6 +142,13 @@ unlock:
- 	return 0;
- }
- 
-+static int sam9x60_frac_pll_prepare(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+
-+	return sam9x60_frac_pll_set(core);
-+}
-+
- static void sam9x60_frac_pll_unprepare(struct clk_hw *hw)
- {
- 	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-@@ -280,6 +288,25 @@ unlock:
- 	return ret;
- }
- 
-+static int sam9x60_frac_pll_save_context(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+	struct sam9x60_frac *frac = to_sam9x60_frac(core);
-+
-+	frac->pms.status = sam9x60_pll_ready(core->regmap, core->id);
-+
-+	return 0;
-+}
-+
-+static void sam9x60_frac_pll_restore_context(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+	struct sam9x60_frac *frac = to_sam9x60_frac(core);
-+
-+	if (frac->pms.status)
-+		sam9x60_frac_pll_set(core);
-+}
-+
- static const struct clk_ops sam9x60_frac_pll_ops = {
- 	.prepare = sam9x60_frac_pll_prepare,
- 	.unprepare = sam9x60_frac_pll_unprepare,
-@@ -287,6 +314,8 @@ static const struct clk_ops sam9x60_frac
- 	.recalc_rate = sam9x60_frac_pll_recalc_rate,
- 	.round_rate = sam9x60_frac_pll_round_rate,
- 	.set_rate = sam9x60_frac_pll_set_rate,
-+	.save_context = sam9x60_frac_pll_save_context,
-+	.restore_context = sam9x60_frac_pll_restore_context,
- };
- 
- static const struct clk_ops sam9x60_frac_pll_ops_chg = {
-@@ -296,11 +325,12 @@ static const struct clk_ops sam9x60_frac
- 	.recalc_rate = sam9x60_frac_pll_recalc_rate,
- 	.round_rate = sam9x60_frac_pll_round_rate,
- 	.set_rate = sam9x60_frac_pll_set_rate_chg,
-+	.save_context = sam9x60_frac_pll_save_context,
-+	.restore_context = sam9x60_frac_pll_restore_context,
- };
- 
--static int sam9x60_div_pll_prepare(struct clk_hw *hw)
-+static int sam9x60_div_pll_set(struct sam9x60_pll_core *core)
- {
--	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
- 	struct sam9x60_div *div = to_sam9x60_div(core);
- 	struct regmap *regmap = core->regmap;
- 	unsigned long flags;
-@@ -334,6 +364,13 @@ unlock:
- 	return 0;
- }
- 
-+static int sam9x60_div_pll_prepare(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+
-+	return sam9x60_div_pll_set(core);
-+}
-+
- static void sam9x60_div_pll_unprepare(struct clk_hw *hw)
- {
- 	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-@@ -482,6 +519,25 @@ unlock:
- 	return 0;
- }
- 
-+static int sam9x60_div_pll_save_context(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+	struct sam9x60_div *div = to_sam9x60_div(core);
-+
-+	div->pms.status = sam9x60_div_pll_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void sam9x60_div_pll_restore_context(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+	struct sam9x60_div *div = to_sam9x60_div(core);
-+
-+	if (div->pms.status)
-+		sam9x60_div_pll_set(core);
-+}
-+
- static const struct clk_ops sam9x60_div_pll_ops = {
- 	.prepare = sam9x60_div_pll_prepare,
- 	.unprepare = sam9x60_div_pll_unprepare,
-@@ -489,6 +545,8 @@ static const struct clk_ops sam9x60_div_
- 	.recalc_rate = sam9x60_div_pll_recalc_rate,
- 	.round_rate = sam9x60_div_pll_round_rate,
- 	.set_rate = sam9x60_div_pll_set_rate,
-+	.save_context = sam9x60_div_pll_save_context,
-+	.restore_context = sam9x60_div_pll_restore_context,
- };
- 
- static const struct clk_ops sam9x60_div_pll_ops_chg = {
-@@ -498,6 +556,8 @@ static const struct clk_ops sam9x60_div_
- 	.recalc_rate = sam9x60_div_pll_recalc_rate,
- 	.round_rate = sam9x60_div_pll_round_rate,
- 	.set_rate = sam9x60_div_pll_set_rate_chg,
-+	.save_context = sam9x60_div_pll_save_context,
-+	.restore_context = sam9x60_div_pll_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-system.c
-+++ b/drivers/clk/at91/clk-system.c
-@@ -20,6 +20,7 @@
- struct clk_system {
- 	struct clk_hw hw;
- 	struct regmap *regmap;
-+	struct at91_clk_pms pms;
- 	u8 id;
- };
- 
-@@ -77,10 +78,29 @@ static int clk_system_is_prepared(struct
- 	return !!(status & (1 << sys->id));
- }
- 
-+static int clk_system_save_context(struct clk_hw *hw)
-+{
-+	struct clk_system *sys = to_clk_system(hw);
-+
-+	sys->pms.status = clk_system_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_system_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_system *sys = to_clk_system(hw);
-+
-+	if (sys->pms.status)
-+		clk_system_prepare(&sys->hw);
-+}
-+
- static const struct clk_ops system_ops = {
- 	.prepare = clk_system_prepare,
- 	.unprepare = clk_system_unprepare,
- 	.is_prepared = clk_system_is_prepared,
-+	.save_context = clk_system_save_context,
-+	.restore_context = clk_system_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-usb.c
-+++ b/drivers/clk/at91/clk-usb.c
-@@ -24,6 +24,7 @@
- struct at91sam9x5_clk_usb {
- 	struct clk_hw hw;
- 	struct regmap *regmap;
-+	struct at91_clk_pms pms;
- 	u32 usbs_mask;
- 	u8 num_parents;
- };
-@@ -148,12 +149,38 @@ static int at91sam9x5_clk_usb_set_rate(s
- 	return 0;
- }
- 
-+static int at91sam9x5_usb_save_context(struct clk_hw *hw)
-+{
-+	struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+
-+	usb->pms.parent = at91sam9x5_clk_usb_get_parent(hw);
-+	usb->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	usb->pms.rate = at91sam9x5_clk_usb_recalc_rate(hw, usb->pms.parent_rate);
-+
-+	return 0;
-+}
-+
-+static void at91sam9x5_usb_restore_context(struct clk_hw *hw)
-+{
-+	struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw);
-+	int ret;
-+
-+	ret = at91sam9x5_clk_usb_set_parent(hw, usb->pms.parent);
-+	if (ret)
-+		return;
-+
-+	at91sam9x5_clk_usb_set_rate(hw, usb->pms.rate, usb->pms.parent_rate);
-+}
-+
- static const struct clk_ops at91sam9x5_usb_ops = {
- 	.recalc_rate = at91sam9x5_clk_usb_recalc_rate,
- 	.determine_rate = at91sam9x5_clk_usb_determine_rate,
- 	.get_parent = at91sam9x5_clk_usb_get_parent,
- 	.set_parent = at91sam9x5_clk_usb_set_parent,
- 	.set_rate = at91sam9x5_clk_usb_set_rate,
-+	.save_context = at91sam9x5_usb_save_context,
-+	.restore_context = at91sam9x5_usb_restore_context,
- };
- 
- static int at91sam9n12_clk_usb_enable(struct clk_hw *hw)
---- a/drivers/clk/at91/clk-utmi.c
-+++ b/drivers/clk/at91/clk-utmi.c
-@@ -23,6 +23,7 @@ struct clk_utmi {
- 	struct clk_hw hw;
- 	struct regmap *regmap_pmc;
- 	struct regmap *regmap_sfr;
-+	struct at91_clk_pms pms;
- };
- 
- #define to_clk_utmi(hw) container_of(hw, struct clk_utmi, hw)
-@@ -113,11 +114,30 @@ static unsigned long clk_utmi_recalc_rat
- 	return UTMI_RATE;
- }
- 
-+static int clk_utmi_save_context(struct clk_hw *hw)
-+{
-+	struct clk_utmi *utmi = to_clk_utmi(hw);
-+
-+	utmi->pms.status = clk_utmi_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_utmi_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_utmi *utmi = to_clk_utmi(hw);
-+
-+	if (utmi->pms.status)
-+		clk_utmi_prepare(hw);
-+}
-+
- static const struct clk_ops utmi_ops = {
- 	.prepare = clk_utmi_prepare,
- 	.unprepare = clk_utmi_unprepare,
- 	.is_prepared = clk_utmi_is_prepared,
- 	.recalc_rate = clk_utmi_recalc_rate,
-+	.save_context = clk_utmi_save_context,
-+	.restore_context = clk_utmi_restore_context,
- };
- 
- static struct clk_hw * __init
-@@ -232,10 +252,29 @@ static int clk_utmi_sama7g5_is_prepared(
- 	return 0;
- }
- 
-+static int clk_utmi_sama7g5_save_context(struct clk_hw *hw)
-+{
-+	struct clk_utmi *utmi = to_clk_utmi(hw);
-+
-+	utmi->pms.status = clk_utmi_sama7g5_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_utmi_sama7g5_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_utmi *utmi = to_clk_utmi(hw);
-+
-+	if (utmi->pms.status)
-+		clk_utmi_sama7g5_prepare(hw);
-+}
-+
- static const struct clk_ops sama7g5_utmi_ops = {
- 	.prepare = clk_utmi_sama7g5_prepare,
- 	.is_prepared = clk_utmi_sama7g5_is_prepared,
- 	.recalc_rate = clk_utmi_recalc_rate,
-+	.save_context = clk_utmi_sama7g5_save_context,
-+	.restore_context = clk_utmi_sama7g5_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/pmc.c
-+++ b/drivers/clk/at91/pmc.c
-@@ -3,6 +3,7 @@
-  *  Copyright (C) 2013 Boris BREZILLON <b.brezillon at overkiz.com>
-  */
- 
-+#include <linux/clk.h>
- #include <linux/clk-provider.h>
- #include <linux/clkdev.h>
- #include <linux/clk/at91_pmc.h>
-@@ -14,8 +15,6 @@
- 
- #include <asm/proc-fns.h>
- 
--#include <dt-bindings/clock/at91.h>
--
- #include "pmc.h"
- 
- #define PMC_MAX_IDS 128
-@@ -111,147 +110,19 @@ struct pmc_data *pmc_data_allocate(unsig
- }
- 
- #ifdef CONFIG_PM
--static struct regmap *pmcreg;
--
--static u8 registered_ids[PMC_MAX_IDS];
--static u8 registered_pcks[PMC_MAX_PCKS];
--
--static struct
--{
--	u32 scsr;
--	u32 pcsr0;
--	u32 uckr;
--	u32 mor;
--	u32 mcfr;
--	u32 pllar;
--	u32 mckr;
--	u32 usb;
--	u32 imr;
--	u32 pcsr1;
--	u32 pcr[PMC_MAX_IDS];
--	u32 audio_pll0;
--	u32 audio_pll1;
--	u32 pckr[PMC_MAX_PCKS];
--} pmc_cache;
--
--/*
-- * As Peripheral ID 0 is invalid on AT91 chips, the identifier is stored
-- * without alteration in the table, and 0 is for unused clocks.
-- */
--void pmc_register_id(u8 id)
-+static int at91_pmc_suspend(void)
- {
--	int i;
--
--	for (i = 0; i < PMC_MAX_IDS; i++) {
--		if (registered_ids[i] == 0) {
--			registered_ids[i] = id;
--			break;
--		}
--		if (registered_ids[i] == id)
--			break;
--	}
-+	return clk_save_context();
- }
- 
--/*
-- * As Programmable Clock 0 is valid on AT91 chips, there is an offset
-- * of 1 between the stored value and the real clock ID.
-- */
--void pmc_register_pck(u8 pck)
-+static void at91_pmc_resume(void)
- {
--	int i;
--
--	for (i = 0; i < PMC_MAX_PCKS; i++) {
--		if (registered_pcks[i] == 0) {
--			registered_pcks[i] = pck + 1;
--			break;
--		}
--		if (registered_pcks[i] == (pck + 1))
--			break;
--	}
--}
--
--static int pmc_suspend(void)
--{
--	int i;
--	u8 num;
--
--	regmap_read(pmcreg, AT91_PMC_SCSR, &pmc_cache.scsr);
--	regmap_read(pmcreg, AT91_PMC_PCSR, &pmc_cache.pcsr0);
--	regmap_read(pmcreg, AT91_CKGR_UCKR, &pmc_cache.uckr);
--	regmap_read(pmcreg, AT91_CKGR_MOR, &pmc_cache.mor);
--	regmap_read(pmcreg, AT91_CKGR_MCFR, &pmc_cache.mcfr);
--	regmap_read(pmcreg, AT91_CKGR_PLLAR, &pmc_cache.pllar);
--	regmap_read(pmcreg, AT91_PMC_MCKR, &pmc_cache.mckr);
--	regmap_read(pmcreg, AT91_PMC_USB, &pmc_cache.usb);
--	regmap_read(pmcreg, AT91_PMC_IMR, &pmc_cache.imr);
--	regmap_read(pmcreg, AT91_PMC_PCSR1, &pmc_cache.pcsr1);
--
--	for (i = 0; registered_ids[i]; i++) {
--		regmap_write(pmcreg, AT91_PMC_PCR,
--			     (registered_ids[i] & AT91_PMC_PCR_PID_MASK));
--		regmap_read(pmcreg, AT91_PMC_PCR,
--			    &pmc_cache.pcr[registered_ids[i]]);
--	}
--	for (i = 0; registered_pcks[i]; i++) {
--		num = registered_pcks[i] - 1;
--		regmap_read(pmcreg, AT91_PMC_PCKR(num), &pmc_cache.pckr[num]);
--	}
--
--	return 0;
--}
--
--static bool pmc_ready(unsigned int mask)
--{
--	unsigned int status;
--
--	regmap_read(pmcreg, AT91_PMC_SR, &status);
--
--	return ((status & mask) == mask) ? 1 : 0;
--}
--
--static void pmc_resume(void)
--{
--	int i;
--	u8 num;
--	u32 tmp;
--	u32 mask = AT91_PMC_MCKRDY | AT91_PMC_LOCKA;
--
--	regmap_read(pmcreg, AT91_PMC_MCKR, &tmp);
--	if (pmc_cache.mckr != tmp)
--		pr_warn("MCKR was not configured properly by the firmware\n");
--	regmap_read(pmcreg, AT91_CKGR_PLLAR, &tmp);
--	if (pmc_cache.pllar != tmp)
--		pr_warn("PLLAR was not configured properly by the firmware\n");
--
--	regmap_write(pmcreg, AT91_PMC_SCER, pmc_cache.scsr);
--	regmap_write(pmcreg, AT91_PMC_PCER, pmc_cache.pcsr0);
--	regmap_write(pmcreg, AT91_CKGR_UCKR, pmc_cache.uckr);
--	regmap_write(pmcreg, AT91_CKGR_MOR, pmc_cache.mor);
--	regmap_write(pmcreg, AT91_CKGR_MCFR, pmc_cache.mcfr);
--	regmap_write(pmcreg, AT91_PMC_USB, pmc_cache.usb);
--	regmap_write(pmcreg, AT91_PMC_IMR, pmc_cache.imr);
--	regmap_write(pmcreg, AT91_PMC_PCER1, pmc_cache.pcsr1);
--
--	for (i = 0; registered_ids[i]; i++) {
--		regmap_write(pmcreg, AT91_PMC_PCR,
--			     pmc_cache.pcr[registered_ids[i]] |
--			     AT91_PMC_PCR_CMD);
--	}
--	for (i = 0; registered_pcks[i]; i++) {
--		num = registered_pcks[i] - 1;
--		regmap_write(pmcreg, AT91_PMC_PCKR(num), pmc_cache.pckr[num]);
--	}
--
--	if (pmc_cache.uckr & AT91_PMC_UPLLEN)
--		mask |= AT91_PMC_LOCKU;
--
--	while (!pmc_ready(mask))
--		cpu_relax();
-+	clk_restore_context();
- }
- 
- static struct syscore_ops pmc_syscore_ops = {
--	.suspend = pmc_suspend,
--	.resume = pmc_resume,
-+	.suspend = at91_pmc_suspend,
-+	.resume = at91_pmc_resume,
- };
- 
- static const struct of_device_id sama5d2_pmc_dt_ids[] = {
-@@ -271,11 +142,7 @@ static int __init pmc_register_ops(void)
- 		of_node_put(np);
- 		return -ENODEV;
- 	}
--
--	pmcreg = device_node_to_regmap(np);
- 	of_node_put(np);
--	if (IS_ERR(pmcreg))
--		return PTR_ERR(pmcreg);
- 
- 	register_syscore_ops(&pmc_syscore_ops);
- 
---- a/drivers/clk/at91/pmc.h
-+++ b/drivers/clk/at91/pmc.h
-@@ -13,6 +13,8 @@
- #include <linux/regmap.h>
- #include <linux/spinlock.h>
- 
-+#include <dt-bindings/clock/at91.h>
-+
- extern spinlock_t pmc_pcr_lock;
- 
- struct pmc_data {
-@@ -98,6 +100,20 @@ struct clk_pcr_layout {
- 	u32 pid_mask;
- };
- 
-+/**
-+ * struct at91_clk_pms - Power management state for AT91 clock
-+ * @rate: clock rate
-+ * @parent_rate: clock parent rate
-+ * @status: clock status (enabled or disabled)
-+ * @parent: clock parent index
-+ */
-+struct at91_clk_pms {
-+	unsigned long rate;
-+	unsigned long parent_rate;
-+	unsigned int status;
-+	unsigned int parent;
-+};
-+
- #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
- #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
- 
-@@ -248,12 +264,4 @@ struct clk_hw * __init
- at91_clk_sama7g5_register_utmi(struct regmap *regmap, const char *name,
- 			       const char *parent_name);
- 
--#ifdef CONFIG_PM
--void pmc_register_id(u8 id);
--void pmc_register_pck(u8 pck);
--#else
--static inline void pmc_register_id(u8 id) {}
--static inline void pmc_register_pck(u8 pck) {}
--#endif
--
- #endif /* __PMC_H_ */
diff --git a/target/linux/at91/patches-6.1/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch b/target/linux/at91/patches-6.1/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
deleted file mode 100644
index 19f1f6fdf2..0000000000
--- a/target/linux/at91/patches-6.1/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 63a0c32028148e91ea91cfbf95841c4ecd69d21b Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:06 +0300
-Subject: [PATCH 235/247] clk: at91: pmc: execute suspend/resume only for
- backup mode
-
-Before going to backup mode architecture specific PM code sets the first
-word in securam (file arch/arm/mach-at91/pm.c, function at91_pm_begin()).
-Thus take this into account when suspending/resuming clocks. This will
-avoid executing unnecessary instructions when suspending to non backup
-modes.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-3-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/pmc.c | 39 +++++++++++++++++++++++++++++++++++++++
- 1 file changed, 39 insertions(+)
-
---- a/drivers/clk/at91/pmc.c
-+++ b/drivers/clk/at91/pmc.c
-@@ -8,6 +8,7 @@
- #include <linux/clkdev.h>
- #include <linux/clk/at91_pmc.h>
- #include <linux/of.h>
-+#include <linux/of_address.h>
- #include <linux/mfd/syscon.h>
- #include <linux/platform_device.h>
- #include <linux/regmap.h>
-@@ -110,13 +111,35 @@ struct pmc_data *pmc_data_allocate(unsig
- }
- 
- #ifdef CONFIG_PM
-+
-+/* Address in SECURAM that say if we suspend to backup mode. */
-+static void __iomem *at91_pmc_backup_suspend;
-+
- static int at91_pmc_suspend(void)
- {
-+	unsigned int backup;
-+
-+	if (!at91_pmc_backup_suspend)
-+		return 0;
-+
-+	backup = readl_relaxed(at91_pmc_backup_suspend);
-+	if (!backup)
-+		return 0;
-+
- 	return clk_save_context();
- }
- 
- static void at91_pmc_resume(void)
- {
-+	unsigned int backup;
-+
-+	if (!at91_pmc_backup_suspend)
-+		return;
-+
-+	backup = readl_relaxed(at91_pmc_backup_suspend);
-+	if (!backup)
-+		return;
-+
- 	clk_restore_context();
- }
- 
-@@ -144,6 +167,22 @@ static int __init pmc_register_ops(void)
- 	}
- 	of_node_put(np);
- 
-+	np = of_find_compatible_node(NULL, NULL, "atmel,sama5d2-securam");
-+	if (!np)
-+		return -ENODEV;
-+
-+	if (!of_device_is_available(np)) {
-+		of_node_put(np);
-+		return -ENODEV;
-+	}
-+	of_node_put(np);
-+
-+	at91_pmc_backup_suspend = of_iomap(np, 0);
-+	if (!at91_pmc_backup_suspend) {
-+		pr_warn("%s(): unable to map securam\n", __func__);
-+		return -ENOMEM;
-+	}
-+
- 	register_syscore_ops(&pmc_syscore_ops);
- 
- 	return 0;
diff --git a/target/linux/at91/patches-6.1/102-clk-at91-clk-master-add-register-definition-for-sama.patch b/target/linux/at91/patches-6.1/102-clk-at91-clk-master-add-register-definition-for-sama.patch
deleted file mode 100644
index 726d9b33e4..0000000000
--- a/target/linux/at91/patches-6.1/102-clk-at91-clk-master-add-register-definition-for-sama.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From c716562753d1e51a1c53647aa77a332f97187d15 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:08 +0300
-Subject: [PATCH 237/247] clk: at91: clk-master: add register definition for
- sama7g5's master clock
-
-SAMA7G5 has 4 master clocks (MCK1..4) which are controlled though the
-register at offset 0x30 (relative to PMC). In the last/first phase of
-suspend/resume procedure (which is architecture specific) the parent
-of master clocks are changed (via assembly code) for more power saving
-(see file arch/arm/mach-at91/pm_suspend.S, macros at91_mckx_ps_enable
-and at91_mckx_ps_restore). Thus the macros corresponding to register
-at offset 0x30 need to be shared b/w clk-master.c and pm_suspend.S.
-commit ec03f18cc222 ("clk: at91: add register definition for sama7g5's
-master clock") introduced the proper macros but didn't adapted the
-clk-master.c as well. Thus, this commit adapt the clk-master.c to use
-the macros introduced in commit ec03f18cc222 ("clk: at91: add register
-definition for sama7g5's master clock").
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-5-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-master.c | 50 ++++++++++++++++-------------------
- 1 file changed, 23 insertions(+), 27 deletions(-)
-
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -17,15 +17,7 @@
- #define MASTER_DIV_SHIFT	8
- #define MASTER_DIV_MASK		0x7
- 
--#define PMC_MCR			0x30
--#define PMC_MCR_ID_MSK		GENMASK(3, 0)
--#define PMC_MCR_CMD		BIT(7)
--#define PMC_MCR_DIV		GENMASK(10, 8)
--#define PMC_MCR_CSS		GENMASK(20, 16)
- #define PMC_MCR_CSS_SHIFT	(16)
--#define PMC_MCR_EN		BIT(28)
--
--#define PMC_MCR_ID(x)		((x) & PMC_MCR_ID_MSK)
- 
- #define MASTER_MAX_ID		4
- 
-@@ -687,20 +679,22 @@ static void clk_sama7g5_master_set(struc
- {
- 	unsigned long flags;
- 	unsigned int val, cparent;
--	unsigned int enable = status ? PMC_MCR_EN : 0;
-+	unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
--	regmap_write(master->regmap, PMC_MCR, PMC_MCR_ID(master->id));
--	regmap_read(master->regmap, PMC_MCR, &val);
--	regmap_update_bits(master->regmap, PMC_MCR,
--			   enable | PMC_MCR_CSS | PMC_MCR_DIV |
--			   PMC_MCR_CMD | PMC_MCR_ID_MSK,
-+	regmap_write(master->regmap, AT91_PMC_MCR_V2,
-+		     AT91_PMC_MCR_V2_ID(master->id));
-+	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
-+	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
-+			   enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
-+			   AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
- 			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
- 			   (master->div << MASTER_DIV_SHIFT) |
--			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
-+			   AT91_PMC_MCR_V2_CMD |
-+			   AT91_PMC_MCR_V2_ID(master->id));
- 
--	cparent = (val & PMC_MCR_CSS) >> PMC_MCR_CSS_SHIFT;
-+	cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
- 
- 	/* Wait here only if parent is being changed. */
- 	while ((cparent != master->parent) && !clk_master_ready(master))
-@@ -725,10 +719,12 @@ static void clk_sama7g5_master_disable(s
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
--	regmap_write(master->regmap, PMC_MCR, master->id);
--	regmap_update_bits(master->regmap, PMC_MCR,
--			   PMC_MCR_EN | PMC_MCR_CMD | PMC_MCR_ID_MSK,
--			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
-+	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
-+	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
-+			   AT91_PMC_MCR_V2_EN | AT91_PMC_MCR_V2_CMD |
-+			   AT91_PMC_MCR_V2_ID_MSK,
-+			   AT91_PMC_MCR_V2_CMD |
-+			   AT91_PMC_MCR_V2_ID(master->id));
- 
- 	spin_unlock_irqrestore(master->lock, flags);
- }
-@@ -741,12 +737,12 @@ static int clk_sama7g5_master_is_enabled
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
--	regmap_write(master->regmap, PMC_MCR, master->id);
--	regmap_read(master->regmap, PMC_MCR, &val);
-+	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
-+	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
- 
- 	spin_unlock_irqrestore(master->lock, flags);
- 
--	return !!(val & PMC_MCR_EN);
-+	return !!(val & AT91_PMC_MCR_V2_EN);
- }
- 
- static int clk_sama7g5_master_set_rate(struct clk_hw *hw, unsigned long rate,
-@@ -842,10 +838,10 @@ at91_clk_sama7g5_register_master(struct
- 	master->mux_table = mux_table;
- 
- 	spin_lock_irqsave(master->lock, flags);
--	regmap_write(master->regmap, PMC_MCR, master->id);
--	regmap_read(master->regmap, PMC_MCR, &val);
--	master->parent = (val & PMC_MCR_CSS) >> PMC_MCR_CSS_SHIFT;
--	master->div = (val & PMC_MCR_DIV) >> MASTER_DIV_SHIFT;
-+	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
-+	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
-+	master->parent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
-+	master->div = (val & AT91_PMC_MCR_V2_DIV) >> MASTER_DIV_SHIFT;
- 	spin_unlock_irqrestore(master->lock, flags);
- 
- 	hw = &master->hw;
diff --git a/target/linux/at91/patches-6.1/103-clk-at91-clk-master-improve-readability-by-using-loc.patch b/target/linux/at91/patches-6.1/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
deleted file mode 100644
index a5b57a67ad..0000000000
--- a/target/linux/at91/patches-6.1/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 17b53ad1574cb5f41789993289d3d94f7a50f0ce Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:09 +0300
-Subject: [PATCH 238/247] clk: at91: clk-master: improve readability by using
- local variables
-
-Improve readability in clk_sama7g5_master_set() by using local
-variables.
-
-Suggested-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-6-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-master.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -680,6 +680,8 @@ static void clk_sama7g5_master_set(struc
- 	unsigned long flags;
- 	unsigned int val, cparent;
- 	unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
-+	unsigned int parent = master->parent << PMC_MCR_CSS_SHIFT;
-+	unsigned int div = master->div << MASTER_DIV_SHIFT;
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
-@@ -689,9 +691,7 @@ static void clk_sama7g5_master_set(struc
- 	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
- 			   enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
- 			   AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
--			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
--			   (master->div << MASTER_DIV_SHIFT) |
--			   AT91_PMC_MCR_V2_CMD |
-+			   enable | parent | div | AT91_PMC_MCR_V2_CMD |
- 			   AT91_PMC_MCR_V2_ID(master->id));
- 
- 	cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
diff --git a/target/linux/at91/patches-6.1/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch b/target/linux/at91/patches-6.1/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
deleted file mode 100644
index 2918de1700..0000000000
--- a/target/linux/at91/patches-6.1/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 8a38e0dda46c9d941a61d8b2e6c14704531b7871 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:10 +0300
-Subject: [PATCH 239/247] clk: at91: pmc: add sama7g5 to the list of available
- pmcs
-
-Add SAMA7G5 to the list of available PMCs such that the suspend/resume
-code for clocks to be used on backup mode.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-7-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/pmc.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/clk/at91/pmc.c
-+++ b/drivers/clk/at91/pmc.c
-@@ -148,8 +148,9 @@ static struct syscore_ops pmc_syscore_op
- 	.resume = at91_pmc_resume,
- };
- 
--static const struct of_device_id sama5d2_pmc_dt_ids[] = {
-+static const struct of_device_id pmc_dt_ids[] = {
- 	{ .compatible = "atmel,sama5d2-pmc" },
-+	{ .compatible = "microchip,sama7g5-pmc", },
- 	{ /* sentinel */ }
- };
- 
-@@ -157,7 +158,7 @@ static int __init pmc_register_ops(void)
- {
- 	struct device_node *np;
- 
--	np = of_find_matching_node(NULL, sama5d2_pmc_dt_ids);
-+	np = of_find_matching_node(NULL, pmc_dt_ids);
- 	if (!np)
- 		return -ENODEV;
- 
diff --git a/target/linux/at91/patches-6.1/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch b/target/linux/at91/patches-6.1/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
deleted file mode 100644
index ea869c9485..0000000000
--- a/target/linux/at91/patches-6.1/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 27c11c09346b7b9f67eeb39db1b943f4a9742ff3 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:13 +0300
-Subject: [PATCH 241/247] clk: at91: clk-master: mask mckr against layout->mask
-
-Mask values read/written from/to MCKR against layout->mask as this
-mask may be different b/w PMC versions.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-10-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-master.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -186,8 +186,8 @@ static int clk_master_div_set_rate(struc
- 	if (ret)
- 		goto unlock;
- 
--	tmp = mckr & master->layout->mask;
--	tmp = (tmp >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+	mckr &= master->layout->mask;
-+	tmp = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
- 	if (tmp == div)
- 		goto unlock;
- 
-@@ -384,6 +384,7 @@ static unsigned long clk_master_pres_rec
- 	regmap_read(master->regmap, master->layout->offset, &val);
- 	spin_unlock_irqrestore(master->lock, flags);
- 
-+	val &= master->layout->mask;
- 	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
- 	if (pres == MASTER_PRES_MAX && characteristics->have_div3_pres)
- 		pres = 3;
-@@ -403,6 +404,8 @@ static u8 clk_master_pres_get_parent(str
- 	regmap_read(master->regmap, master->layout->offset, &mckr);
- 	spin_unlock_irqrestore(master->lock, flags);
- 
-+	mckr &= master->layout->mask;
-+
- 	return mckr & AT91_PMC_CSS;
- }
- 
diff --git a/target/linux/at91/patches-6.1/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch b/target/linux/at91/patches-6.1/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
deleted file mode 100644
index e5ebdc4ea4..0000000000
--- a/target/linux/at91/patches-6.1/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-From e76d2af5009f52aa02d3db7ae32d150ad66398f9 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:15 +0300
-Subject: [PATCH 243/247] clk: at91: clk-sam9x60-pll: add notifier for div part
- of PLL
-
-SAM9X60's PLL which is also part of SAMA7G5 is composed of 2 parts:
-one fractional part and one divider. On SAMA7G5 the CPU PLL could be
-changed at run-time to implement DVFS. The hardware clock tree on
-SAMA7G5 for CPU PLL is as follows:
-
-                       +---- div1 ----------------> cpuck
-                       |
-FRAC PLL ---> DIV PLL -+-> prescaler ---> div0 ---> mck0
-
-The div1 block is not implemented in Linux; on prescaler block it has
-been discovered a bug on some scenarios and will be removed from Linux
-in next commits. Thus, the final clock tree that will be used in Linux
-will be as follows:
-
-                       +-----------> cpuck
-                       |
-FRAC PLL ---> DIV PLL -+-> div0 ---> mck0
-
-It has been proposed in [1] to not introduce a new CPUFreq driver but
-to overload the proper clock drivers with proper operation such that
-cpufreq-dt to be used. To accomplish this DIV PLL and div0 implement
-clock notifiers which applies safe dividers before FRAC PLL is changed.
-The current commit treats only the DIV PLL by adding a notifier that
-sets a safe divider on PRE_RATE_CHANGE events. The safe divider is
-provided by initialization clock code (sama7g5.c). The div0 is treated
-in next commits (to keep the changes as clean as possible).
-
-[1] https://lore.kernel.org/lkml/20210105104426.4tmgc2l3vyicwedd at vireshk-i7/
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-12-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-sam9x60-pll.c | 102 ++++++++++++++++++++++-------
- drivers/clk/at91/pmc.h             |   3 +-
- drivers/clk/at91/sam9x60.c         |   6 +-
- drivers/clk/at91/sama7g5.c         |  13 +++-
- 4 files changed, 95 insertions(+), 29 deletions(-)
-
---- a/drivers/clk/at91/clk-sam9x60-pll.c
-+++ b/drivers/clk/at91/clk-sam9x60-pll.c
-@@ -5,6 +5,7 @@
-  */
- 
- #include <linux/bitfield.h>
-+#include <linux/clk.h>
- #include <linux/clk-provider.h>
- #include <linux/clkdev.h>
- #include <linux/clk/at91_pmc.h>
-@@ -47,12 +48,15 @@ struct sam9x60_div {
- 	struct sam9x60_pll_core core;
- 	struct at91_clk_pms pms;
- 	u8 div;
-+	u8 safe_div;
- };
- 
- #define to_sam9x60_pll_core(hw)	container_of(hw, struct sam9x60_pll_core, hw)
- #define to_sam9x60_frac(core)	container_of(core, struct sam9x60_frac, core)
- #define to_sam9x60_div(core)	container_of(core, struct sam9x60_div, core)
- 
-+static struct sam9x60_div *notifier_div;
-+
- static inline bool sam9x60_pll_ready(struct regmap *regmap, int id)
- {
- 	unsigned int status;
-@@ -329,6 +333,26 @@ static const struct clk_ops sam9x60_frac
- 	.restore_context = sam9x60_frac_pll_restore_context,
- };
- 
-+/* This function should be called with spinlock acquired. */
-+static void sam9x60_div_pll_set_div(struct sam9x60_pll_core *core, u32 div,
-+				    bool enable)
-+{
-+	struct regmap *regmap = core->regmap;
-+	u32 ena_msk = enable ? core->layout->endiv_mask : 0;
-+	u32 ena_val = enable ? (1 << core->layout->endiv_shift) : 0;
-+
-+	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
-+			   core->layout->div_mask | ena_msk,
-+			   (div << core->layout->div_shift) | ena_val);
-+
-+	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
-+			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
-+			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
-+
-+	while (!sam9x60_pll_ready(regmap, core->id))
-+		cpu_relax();
-+}
-+
- static int sam9x60_div_pll_set(struct sam9x60_pll_core *core)
- {
- 	struct sam9x60_div *div = to_sam9x60_div(core);
-@@ -346,17 +370,7 @@ static int sam9x60_div_pll_set(struct sa
- 	if (!!(val & core->layout->endiv_mask) && cdiv == div->div)
- 		goto unlock;
- 
--	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
--			   core->layout->div_mask | core->layout->endiv_mask,
--			   (div->div << core->layout->div_shift) |
--			   (1 << core->layout->endiv_shift));
--
--	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
--			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
--			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
--
--	while (!sam9x60_pll_ready(regmap, core->id))
--		cpu_relax();
-+	sam9x60_div_pll_set_div(core, div->div, 1);
- 
- unlock:
- 	spin_unlock_irqrestore(core->lock, flags);
-@@ -502,16 +516,7 @@ static int sam9x60_div_pll_set_rate_chg(
- 	if (cdiv == div->div)
- 		goto unlock;
- 
--	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
--			   core->layout->div_mask,
--			   (div->div << core->layout->div_shift));
--
--	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
--			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
--			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
--
--	while (!sam9x60_pll_ready(regmap, core->id))
--		cpu_relax();
-+	sam9x60_div_pll_set_div(core, div->div, 0);
- 
- unlock:
- 	spin_unlock_irqrestore(core->lock, irqflags);
-@@ -538,6 +543,48 @@ static void sam9x60_div_pll_restore_cont
- 		sam9x60_div_pll_set(core);
- }
- 
-+static int sam9x60_div_pll_notifier_fn(struct notifier_block *notifier,
-+				       unsigned long code, void *data)
-+{
-+	struct sam9x60_div *div = notifier_div;
-+	struct sam9x60_pll_core core = div->core;
-+	struct regmap *regmap = core.regmap;
-+	unsigned long irqflags;
-+	u32 val, cdiv;
-+	int ret = NOTIFY_DONE;
-+
-+	if (code != PRE_RATE_CHANGE)
-+		return ret;
-+
-+	/*
-+	 * We switch to safe divider to avoid overclocking of other domains
-+	 * feed by us while the frac PLL (our parent) is changed.
-+	 */
-+	div->div = div->safe_div;
-+
-+	spin_lock_irqsave(core.lock, irqflags);
-+	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK,
-+			   core.id);
-+	regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val);
-+	cdiv = (val & core.layout->div_mask) >> core.layout->div_shift;
-+
-+	/* Stop if nothing changed. */
-+	if (cdiv == div->safe_div)
-+		goto unlock;
-+
-+	sam9x60_div_pll_set_div(&core, div->div, 0);
-+	ret = NOTIFY_OK;
-+
-+unlock:
-+	spin_unlock_irqrestore(core.lock, irqflags);
-+
-+	return ret;
-+}
-+
-+static struct notifier_block sam9x60_div_pll_notifier = {
-+	.notifier_call = sam9x60_div_pll_notifier_fn,
-+};
-+
- static const struct clk_ops sam9x60_div_pll_ops = {
- 	.prepare = sam9x60_div_pll_prepare,
- 	.unprepare = sam9x60_div_pll_unprepare,
-@@ -647,7 +694,8 @@ struct clk_hw * __init
- sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
- 			     const char *name, const char *parent_name, u8 id,
- 			     const struct clk_pll_characteristics *characteristics,
--			     const struct clk_pll_layout *layout, u32 flags)
-+			     const struct clk_pll_layout *layout, u32 flags,
-+			     u32 safe_div)
- {
- 	struct sam9x60_div *div;
- 	struct clk_hw *hw;
-@@ -656,9 +704,13 @@ sam9x60_clk_register_div_pll(struct regm
- 	unsigned int val;
- 	int ret;
- 
--	if (id > PLL_MAX_ID || !lock)
-+	/* We only support one changeable PLL. */
-+	if (id > PLL_MAX_ID || !lock || (safe_div && notifier_div))
- 		return ERR_PTR(-EINVAL);
- 
-+	if (safe_div >= PLL_DIV_MAX)
-+		safe_div = PLL_DIV_MAX - 1;
-+
- 	div = kzalloc(sizeof(*div), GFP_KERNEL);
- 	if (!div)
- 		return ERR_PTR(-ENOMEM);
-@@ -678,6 +730,7 @@ sam9x60_clk_register_div_pll(struct regm
- 	div->core.layout = layout;
- 	div->core.regmap = regmap;
- 	div->core.lock = lock;
-+	div->safe_div = safe_div;
- 
- 	spin_lock_irqsave(div->core.lock, irqflags);
- 
-@@ -693,6 +746,9 @@ sam9x60_clk_register_div_pll(struct regm
- 	if (ret) {
- 		kfree(div);
- 		hw = ERR_PTR(ret);
-+	} else if (div->safe_div) {
-+		notifier_div = div;
-+		clk_notifier_register(hw->clk, &sam9x60_div_pll_notifier);
- 	}
- 
- 	return hw;
---- a/drivers/clk/at91/pmc.h
-+++ b/drivers/clk/at91/pmc.h
-@@ -214,7 +214,8 @@ struct clk_hw * __init
- sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
- 			     const char *name, const char *parent_name, u8 id,
- 			     const struct clk_pll_characteristics *characteristics,
--			     const struct clk_pll_layout *layout, u32 flags);
-+			     const struct clk_pll_layout *layout, u32 flags,
-+			     u32 safe_div);
- 
- struct clk_hw * __init
- sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock,
---- a/drivers/clk/at91/sam9x60.c
-+++ b/drivers/clk/at91/sam9x60.c
-@@ -242,7 +242,7 @@ static void __init sam9x60_pmc_setup(str
- 					    * This feeds CPU. It should not
- 					    * be disabled.
- 					    */
--					  CLK_IS_CRITICAL | CLK_SET_RATE_GATE);
-+					  CLK_IS_CRITICAL | CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
-@@ -260,7 +260,7 @@ static void __init sam9x60_pmc_setup(str
- 					  &pll_div_layout,
- 					  CLK_SET_RATE_GATE |
- 					  CLK_SET_PARENT_GATE |
--					  CLK_SET_RATE_PARENT);
-+					  CLK_SET_RATE_PARENT, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
-@@ -279,7 +279,7 @@ static void __init sam9x60_pmc_setup(str
- 	hw = at91_clk_register_master_div(regmap, "masterck_div",
- 					  "masterck_pres", &sam9x60_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/sama7g5.c
-+++ b/drivers/clk/at91/sama7g5.c
-@@ -127,6 +127,8 @@ static const struct clk_pll_characterist
-  * @t:		clock type
-  * @f:		clock flags
-  * @eid:	export index in sama7g5->chws[] array
-+ * @safe_div:	intermediate divider need to be set on PRE_RATE_CHANGE
-+ *		notification
-  */
- static const struct {
- 	const char *n;
-@@ -136,6 +138,7 @@ static const struct {
- 	unsigned long f;
- 	u8 t;
- 	u8 eid;
-+	u8 safe_div;
- } sama7g5_plls[][PLL_ID_MAX] = {
- 	[PLL_ID_CPU] = {
- 		{ .n = "cpupll_fracck",
-@@ -156,7 +159,12 @@ static const struct {
- 		  .t = PLL_TYPE_DIV,
- 		   /* This feeds CPU. It should not be disabled. */
- 		  .f = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
--		  .eid = PMC_CPUPLL, },
-+		  .eid = PMC_CPUPLL,
-+		  /*
-+		   * Safe div=15 should be safe even for switching b/w 1GHz and
-+		   * 90MHz (frac pll might go up to 1.2GHz).
-+		   */
-+		  .safe_div = 15, },
- 	},
- 
- 	[PLL_ID_SYS] = {
-@@ -966,7 +974,8 @@ static void __init sama7g5_pmc_setup(str
- 					sama7g5_plls[i][j].p, i,
- 					sama7g5_plls[i][j].c,
- 					sama7g5_plls[i][j].l,
--					sama7g5_plls[i][j].f);
-+					sama7g5_plls[i][j].f,
-+					sama7g5_plls[i][j].safe_div);
- 				break;
- 
- 			default:
diff --git a/target/linux/at91/patches-6.1/107-clk-at91-clk-master-add-notifier-for-divider.patch b/target/linux/at91/patches-6.1/107-clk-at91-clk-master-add-notifier-for-divider.patch
deleted file mode 100644
index 83839e6a74..0000000000
--- a/target/linux/at91/patches-6.1/107-clk-at91-clk-master-add-notifier-for-divider.patch
+++ /dev/null
@@ -1,519 +0,0 @@
-From 75d5d1d584ae73ba0c36d1d7255db6153ca4d3f3 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:16 +0300
-Subject: [PATCH 244/247] clk: at91: clk-master: add notifier for divider
-
-SAMA7G5 supports DVFS by changing cpuck. On SAMA7G5 mck0 shares the same
-parent with cpuck as seen in the following clock tree:
-
-                       +----------> cpuck
-                       |
-FRAC PLL ---> DIV PLL -+-> DIV ---> mck0
-
-mck0 could go b/w 32KHz and 200MHz on SAMA7G5. To avoid mck0 overclocking
-while changing FRAC PLL or DIV PLL the commit implements a notifier for
-mck0 which applies a safe divider to register (maximum value of the divider
-which is 5) on PRE_RATE_CHANGE events (such that changes on PLL to not
-overclock mck0) and sets the maximum allowed rate on POST_RATE_CHANGE
-events.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-13-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/at91rm9200.c  |   2 +-
- drivers/clk/at91/at91sam9260.c |   2 +-
- drivers/clk/at91/at91sam9g45.c |   2 +-
- drivers/clk/at91/at91sam9n12.c |   2 +-
- drivers/clk/at91/at91sam9rl.c  |   2 +-
- drivers/clk/at91/at91sam9x5.c  |   2 +-
- drivers/clk/at91/clk-master.c  | 244 +++++++++++++++++++++++----------
- drivers/clk/at91/dt-compat.c   |   2 +-
- drivers/clk/at91/pmc.h         |   2 +-
- drivers/clk/at91/sama5d2.c     |   2 +-
- drivers/clk/at91/sama5d3.c     |   2 +-
- drivers/clk/at91/sama5d4.c     |   2 +-
- drivers/clk/at91/sama7g5.c     |   2 +-
- 13 files changed, 186 insertions(+), 82 deletions(-)
-
---- a/drivers/clk/at91/at91rm9200.c
-+++ b/drivers/clk/at91/at91rm9200.c
-@@ -152,7 +152,7 @@ static void __init at91rm9200_pmc_setup(
- 					  "masterck_pres",
- 					  &at91rm9200_master_layout,
- 					  &rm9200_mck_characteristics,
--					  &rm9200_mck_lock, CLK_SET_RATE_GATE);
-+					  &rm9200_mck_lock, CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9260.c
-+++ b/drivers/clk/at91/at91sam9260.c
-@@ -429,7 +429,7 @@ static void __init at91sam926x_pmc_setup
- 					  &at91rm9200_master_layout,
- 					  data->mck_characteristics,
- 					  &at91sam9260_mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9g45.c
-+++ b/drivers/clk/at91/at91sam9g45.c
-@@ -164,7 +164,7 @@ static void __init at91sam9g45_pmc_setup
- 					  &at91rm9200_master_layout,
- 					  &mck_characteristics,
- 					  &at91sam9g45_mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9n12.c
-+++ b/drivers/clk/at91/at91sam9n12.c
-@@ -191,7 +191,7 @@ static void __init at91sam9n12_pmc_setup
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics,
- 					  &at91sam9n12_mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9rl.c
-+++ b/drivers/clk/at91/at91sam9rl.c
-@@ -132,7 +132,7 @@ static void __init at91sam9rl_pmc_setup(
- 					  "masterck_pres",
- 					  &at91rm9200_master_layout,
- 					  &sam9rl_mck_characteristics,
--					  &sam9rl_mck_lock, CLK_SET_RATE_GATE);
-+					  &sam9rl_mck_lock, CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9x5.c
-+++ b/drivers/clk/at91/at91sam9x5.c
-@@ -210,7 +210,7 @@ static void __init at91sam9x5_pmc_setup(
- 					  "masterck_pres",
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -5,6 +5,7 @@
- 
- #include <linux/clk-provider.h>
- #include <linux/clkdev.h>
-+#include <linux/clk.h>
- #include <linux/clk/at91_pmc.h>
- #include <linux/of.h>
- #include <linux/mfd/syscon.h>
-@@ -36,8 +37,12 @@ struct clk_master {
- 	u8 id;
- 	u8 parent;
- 	u8 div;
-+	u32 safe_div;
- };
- 
-+/* MCK div reference to be used by notifier. */
-+static struct clk_master *master_div;
-+
- static inline bool clk_master_ready(struct clk_master *master)
- {
- 	unsigned int bit = master->id ? AT91_PMC_MCKXRDY : AT91_PMC_MCKRDY;
-@@ -153,107 +158,81 @@ static const struct clk_ops master_div_o
- 	.restore_context = clk_master_div_restore_context,
- };
- 
--static int clk_master_div_set_rate(struct clk_hw *hw, unsigned long rate,
--				   unsigned long parent_rate)
-+/* This function must be called with lock acquired. */
-+static int clk_master_div_set(struct clk_master *master,
-+			      unsigned long parent_rate, int div)
- {
--	struct clk_master *master = to_clk_master(hw);
- 	const struct clk_master_characteristics *characteristics =
- 						master->characteristics;
--	unsigned long flags;
--	unsigned int mckr, tmp;
--	int div, i;
-+	unsigned long rate = parent_rate;
-+	unsigned int max_div = 0, div_index = 0, max_div_index = 0;
-+	unsigned int i, mckr, tmp;
- 	int ret;
- 
--	div = DIV_ROUND_CLOSEST(parent_rate, rate);
--	if (div > ARRAY_SIZE(characteristics->divisors))
--		return -EINVAL;
--
- 	for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
- 		if (!characteristics->divisors[i])
- 			break;
- 
--		if (div == characteristics->divisors[i]) {
--			div = i;
--			break;
-+		if (div == characteristics->divisors[i])
-+			div_index = i;
-+
-+		if (max_div < characteristics->divisors[i]) {
-+			max_div = characteristics->divisors[i];
-+			max_div_index = i;
- 		}
- 	}
- 
--	if (i == ARRAY_SIZE(characteristics->divisors))
--		return -EINVAL;
-+	if (div > max_div)
-+		div_index = max_div_index;
- 
--	spin_lock_irqsave(master->lock, flags);
- 	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
- 	if (ret)
--		goto unlock;
-+		return ret;
- 
- 	mckr &= master->layout->mask;
- 	tmp = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
--	if (tmp == div)
--		goto unlock;
-+	if (tmp == div_index)
-+		return 0;
-+
-+	rate /= characteristics->divisors[div_index];
-+	if (rate < characteristics->output.min)
-+		pr_warn("master clk div is underclocked");
-+	else if (rate > characteristics->output.max)
-+		pr_warn("master clk div is overclocked");
- 
- 	mckr &= ~(MASTER_DIV_MASK << MASTER_DIV_SHIFT);
--	mckr |= (div << MASTER_DIV_SHIFT);
-+	mckr |= (div_index << MASTER_DIV_SHIFT);
- 	ret = regmap_write(master->regmap, master->layout->offset, mckr);
- 	if (ret)
--		goto unlock;
-+		return ret;
- 
- 	while (!clk_master_ready(master))
- 		cpu_relax();
--unlock:
--	spin_unlock_irqrestore(master->lock, flags);
-+
-+	master->div = characteristics->divisors[div_index];
- 
- 	return 0;
- }
- 
--static int clk_master_div_determine_rate(struct clk_hw *hw,
--					 struct clk_rate_request *req)
-+static unsigned long clk_master_div_recalc_rate_chg(struct clk_hw *hw,
-+						    unsigned long parent_rate)
- {
- 	struct clk_master *master = to_clk_master(hw);
--	const struct clk_master_characteristics *characteristics =
--						master->characteristics;
--	struct clk_hw *parent;
--	unsigned long parent_rate, tmp_rate, best_rate = 0;
--	int i, best_diff = INT_MIN, tmp_diff;
--
--	parent = clk_hw_get_parent(hw);
--	if (!parent)
--		return -EINVAL;
--
--	parent_rate = clk_hw_get_rate(parent);
--	if (!parent_rate)
--		return -EINVAL;
- 
--	for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
--		if (!characteristics->divisors[i])
--			break;
--
--		tmp_rate = DIV_ROUND_CLOSEST_ULL(parent_rate,
--						 characteristics->divisors[i]);
--		tmp_diff = abs(tmp_rate - req->rate);
--
--		if (!best_rate || best_diff > tmp_diff) {
--			best_diff = tmp_diff;
--			best_rate = tmp_rate;
--		}
--
--		if (!best_diff)
--			break;
--	}
--
--	req->best_parent_rate = best_rate;
--	req->best_parent_hw = parent;
--	req->rate = best_rate;
--
--	return 0;
-+	return DIV_ROUND_CLOSEST_ULL(parent_rate, master->div);
- }
- 
- static void clk_master_div_restore_context_chg(struct clk_hw *hw)
- {
- 	struct clk_master *master = to_clk_master(hw);
-+	unsigned long flags;
- 	int ret;
- 
--	ret = clk_master_div_set_rate(hw, master->pms.rate,
--				      master->pms.parent_rate);
-+	spin_lock_irqsave(master->lock, flags);
-+	ret = clk_master_div_set(master, master->pms.parent_rate,
-+				 DIV_ROUND_CLOSEST(master->pms.parent_rate,
-+						   master->pms.rate));
-+	spin_unlock_irqrestore(master->lock, flags);
- 	if (ret)
- 		pr_warn("Failed to restore MCK DIV clock\n");
- }
-@@ -261,13 +240,116 @@ static void clk_master_div_restore_conte
- static const struct clk_ops master_div_ops_chg = {
- 	.prepare = clk_master_prepare,
- 	.is_prepared = clk_master_is_prepared,
--	.recalc_rate = clk_master_div_recalc_rate,
--	.determine_rate = clk_master_div_determine_rate,
--	.set_rate = clk_master_div_set_rate,
-+	.recalc_rate = clk_master_div_recalc_rate_chg,
- 	.save_context = clk_master_div_save_context,
- 	.restore_context = clk_master_div_restore_context_chg,
- };
- 
-+static int clk_master_div_notifier_fn(struct notifier_block *notifier,
-+				      unsigned long code, void *data)
-+{
-+	const struct clk_master_characteristics *characteristics =
-+						master_div->characteristics;
-+	struct clk_notifier_data *cnd = data;
-+	unsigned long flags, new_parent_rate, new_rate;
-+	unsigned int mckr, div, new_div = 0;
-+	int ret, i;
-+	long tmp_diff;
-+	long best_diff = -1;
-+
-+	spin_lock_irqsave(master_div->lock, flags);
-+	switch (code) {
-+	case PRE_RATE_CHANGE:
-+		/*
-+		 * We want to avoid any overclocking of MCK DIV domain. To do
-+		 * this we set a safe divider (the underclocking is not of
-+		 * interest as we can go as low as 32KHz). The relation
-+		 * b/w this clock and its parents are as follows:
-+		 *
-+		 * FRAC PLL -> DIV PLL -> MCK DIV
-+		 *
-+		 * With the proper safe divider we should be good even with FRAC
-+		 * PLL at its maximum value.
-+		 */
-+		ret = regmap_read(master_div->regmap, master_div->layout->offset,
-+				  &mckr);
-+		if (ret) {
-+			ret = NOTIFY_STOP_MASK;
-+			goto unlock;
-+		}
-+
-+		mckr &= master_div->layout->mask;
-+		div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+
-+		/* Switch to safe divider. */
-+		clk_master_div_set(master_div,
-+				   cnd->old_rate * characteristics->divisors[div],
-+				   master_div->safe_div);
-+		break;
-+
-+	case POST_RATE_CHANGE:
-+		/*
-+		 * At this point we want to restore MCK DIV domain to its maximum
-+		 * allowed rate.
-+		 */
-+		ret = regmap_read(master_div->regmap, master_div->layout->offset,
-+				  &mckr);
-+		if (ret) {
-+			ret = NOTIFY_STOP_MASK;
-+			goto unlock;
-+		}
-+
-+		mckr &= master_div->layout->mask;
-+		div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+		new_parent_rate = cnd->new_rate * characteristics->divisors[div];
-+
-+		for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
-+			if (!characteristics->divisors[i])
-+				break;
-+
-+			new_rate = DIV_ROUND_CLOSEST_ULL(new_parent_rate,
-+							 characteristics->divisors[i]);
-+
-+			tmp_diff = characteristics->output.max - new_rate;
-+			if (tmp_diff < 0)
-+				continue;
-+
-+			if (best_diff < 0 || best_diff > tmp_diff) {
-+				new_div = characteristics->divisors[i];
-+				best_diff = tmp_diff;
-+			}
-+
-+			if (!tmp_diff)
-+				break;
-+		}
-+
-+		if (!new_div) {
-+			ret = NOTIFY_STOP_MASK;
-+			goto unlock;
-+		}
-+
-+		/* Update the div to preserve MCK DIV clock rate. */
-+		clk_master_div_set(master_div, new_parent_rate,
-+				   new_div);
-+
-+		ret = NOTIFY_OK;
-+		break;
-+
-+	default:
-+		ret = NOTIFY_DONE;
-+		break;
-+	}
-+
-+unlock:
-+	spin_unlock_irqrestore(master_div->lock, flags);
-+
-+	return ret;
-+}
-+
-+static struct notifier_block clk_master_div_notifier = {
-+	.notifier_call = clk_master_div_notifier_fn,
-+};
-+
- static void clk_sama7g5_master_best_diff(struct clk_rate_request *req,
- 					 struct clk_hw *parent,
- 					 unsigned long parent_rate,
-@@ -496,6 +578,8 @@ at91_clk_register_master_internal(struct
- 	struct clk_master *master;
- 	struct clk_init_data init;
- 	struct clk_hw *hw;
-+	unsigned int mckr;
-+	unsigned long irqflags;
- 	int ret;
- 
- 	if (!name || !num_parents || !parent_names || !lock)
-@@ -518,6 +602,16 @@ at91_clk_register_master_internal(struct
- 	master->chg_pid = chg_pid;
- 	master->lock = lock;
- 
-+	if (ops == &master_div_ops_chg) {
-+		spin_lock_irqsave(master->lock, irqflags);
-+		regmap_read(master->regmap, master->layout->offset, &mckr);
-+		spin_unlock_irqrestore(master->lock, irqflags);
-+
-+		mckr &= layout->mask;
-+		mckr = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+		master->div = characteristics->divisors[mckr];
-+	}
-+
- 	hw = &master->hw;
- 	ret = clk_hw_register(NULL, &master->hw);
- 	if (ret) {
-@@ -554,19 +648,29 @@ at91_clk_register_master_div(struct regm
- 		const char *name, const char *parent_name,
- 		const struct clk_master_layout *layout,
- 		const struct clk_master_characteristics *characteristics,
--		spinlock_t *lock, u32 flags)
-+		spinlock_t *lock, u32 flags, u32 safe_div)
- {
- 	const struct clk_ops *ops;
-+	struct clk_hw *hw;
- 
- 	if (flags & CLK_SET_RATE_GATE)
- 		ops = &master_div_ops;
- 	else
- 		ops = &master_div_ops_chg;
- 
--	return at91_clk_register_master_internal(regmap, name, 1,
--						 &parent_name, layout,
--						 characteristics, ops,
--						 lock, flags, -EINVAL);
-+	hw = at91_clk_register_master_internal(regmap, name, 1,
-+					       &parent_name, layout,
-+					       characteristics, ops,
-+					       lock, flags, -EINVAL);
-+
-+	if (!IS_ERR(hw) && safe_div) {
-+		master_div = to_clk_master(hw);
-+		master_div->safe_div = safe_div;
-+		clk_notifier_register(hw->clk,
-+				      &clk_master_div_notifier);
-+	}
-+
-+	return hw;
- }
- 
- static unsigned long
---- a/drivers/clk/at91/dt-compat.c
-+++ b/drivers/clk/at91/dt-compat.c
-@@ -399,7 +399,7 @@ of_at91_clk_master_setup(struct device_n
- 
- 	hw = at91_clk_register_master_div(regmap, name, "masterck_pres",
- 					  layout, characteristics,
--					  &mck_lock, CLK_SET_RATE_GATE);
-+					  &mck_lock, CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto out_free_characteristics;
- 
---- a/drivers/clk/at91/pmc.h
-+++ b/drivers/clk/at91/pmc.h
-@@ -182,7 +182,7 @@ at91_clk_register_master_div(struct regm
- 			     const char *parent_names,
- 			     const struct clk_master_layout *layout,
- 			     const struct clk_master_characteristics *characteristics,
--			     spinlock_t *lock, u32 flags);
-+			     spinlock_t *lock, u32 flags, u32 safe_div);
- 
- struct clk_hw * __init
- at91_clk_sama7g5_register_master(struct regmap *regmap,
---- a/drivers/clk/at91/sama5d2.c
-+++ b/drivers/clk/at91/sama5d2.c
-@@ -249,7 +249,7 @@ static void __init sama5d2_pmc_setup(str
- 					  "masterck_pres",
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/sama5d3.c
-+++ b/drivers/clk/at91/sama5d3.c
-@@ -184,7 +184,7 @@ static void __init sama5d3_pmc_setup(str
- 					  "masterck_pres",
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/sama5d4.c
-+++ b/drivers/clk/at91/sama5d4.c
-@@ -199,7 +199,7 @@ static void __init sama5d4_pmc_setup(str
- 					  "masterck_pres",
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/sama7g5.c
-+++ b/drivers/clk/at91/sama7g5.c
-@@ -993,7 +993,7 @@ static void __init sama7g5_pmc_setup(str
- 	parent_names[0] = "cpupll_divpmcck";
- 	hw = at91_clk_register_master_div(regmap, "mck0", "cpupll_divpmcck",
- 					  &mck0_layout, &mck0_characteristics,
--					  &pmc_mck0_lock, 0);
-+					  &pmc_mck0_lock, CLK_GET_RATE_NOCACHE, 5);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
diff --git a/target/linux/at91/patches-6.1/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch b/target/linux/at91/patches-6.1/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
deleted file mode 100644
index 6cdec0add7..0000000000
--- a/target/linux/at91/patches-6.1/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 9fd5a49f6da9de5da83f4a53eccefad647ab15ed Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:18 +0300
-Subject: [PATCH 246/247] clk: at91: sama7g5: set low limit for mck0 at 32KHz
-
-MCK0 could go as low as 32KHz. Set this limit.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-15-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/sama7g5.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/clk/at91/sama7g5.c
-+++ b/drivers/clk/at91/sama7g5.c
-@@ -849,7 +849,7 @@ static const struct {
- 
- /* MCK0 characteristics. */
- static const struct clk_master_characteristics mck0_characteristics = {
--	.output = { .min = 50000000, .max = 200000000 },
-+	.output = { .min = 32768, .max = 200000000 },
- 	.divisors = { 1, 2, 4, 3, 5 },
- 	.have_div3_pres = 1,
- };
diff --git a/target/linux/at91/patches-6.1/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch b/target/linux/at91/patches-6.1/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
deleted file mode 100644
index 5b69d0cbc1..0000000000
--- a/target/linux/at91/patches-6.1/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From fe07791494a78d5a4be1363385e6ba7940740644 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:19 +0300
-Subject: [PATCH 247/247] clk: use clk_core_get_rate_recalc() in clk_rate_get()
-
-In case clock flags contains CLK_GET_RATE_NOCACHE the clk_rate_get()
-will return the cached rate. Thus, use clk_core_get_rate_recalc() which
-takes proper action when clock flags contains CLK_GET_RATE_NOCACHE.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-16-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-[sboyd at kernel.org: Grab prepare lock around operation]
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/clk.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/clk/clk.c
-+++ b/drivers/clk/clk.c
-@@ -3145,7 +3145,10 @@ static int clk_rate_get(void *data, u64
- {
- 	struct clk_core *core = data;
- 
--	*val = core->rate;
-+	clk_prepare_lock();
-+	*val = clk_core_get_rate_recalc(core);
-+	clk_prepare_unlock();
-+
- 	return 0;
- }
- 



From lede-commits at lists.infradead.org  Mon Apr 22 02:03:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 05:03:20 -0400
Subject: [openwrt/openwrt]  bridger: update to Git HEAD (2024-04-22)
In-Reply-To: <171377660003.2149196.17191606182833469348@git-01.infra.openwrt.org>
References: <171377660003.2149196.17191606182833469348@git-01.infra.openwrt.org>
Message-ID: <mailman.29427.1713776608.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/786e3dec012b0e61404db201918d2345ef977c44

commit 786e3dec012b0e61404db201918d2345ef977c44
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Apr 22 10:59:19 2024 +0200

    bridger: update to Git HEAD (2024-04-22)
    
    ec8c620fd5f4 split bridge-local disable into rx and tx
    40b1c5b6be4e flow: do not attempt to offload bridge-local flows
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/services/bridger/Makefile           | 6 +++---
 package/network/services/bridger/files/bridger.conf | 3 ++-
 package/network/services/bridger/files/bridger.init | 7 +++++--
 3 files changed, 10 insertions(+), 6 deletions(-)

diff --git a/package/network/services/bridger/Makefile b/package/network/services/bridger/Makefile
index b38c2ddbc5..d44e038967 100644
--- a/package/network/services/bridger/Makefile
+++ b/package/network/services/bridger/Makefile
@@ -10,9 +10,9 @@ include $(TOPDIR)/rules.mk
 PKG_NAME:=bridger
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=https://github.com/nbd168/bridger
-PKG_SOURCE_DATE:=2024-04-15
-PKG_SOURCE_VERSION:=a08e51e679dd7e1eaf70ea7fd6b6433e167d4c2d
-PKG_MIRROR_HASH:=e80ac0cc3c5b27afb233c03fed3fbcef34a1b3fdbe0d48532ad1d5c3aac4088d
+PKG_SOURCE_DATE:=2024-04-22
+PKG_SOURCE_VERSION:=40b1c5b6be4e73a6749cf2997c664520eb20055d
+PKG_MIRROR_HASH:=b3ba2ab5ffa1af55f8da2cae5a90df486474b97ed4c359ec40c986aa6e82c300
 
 PKG_LICENSE:=GPL-2.0
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
diff --git a/package/network/services/bridger/files/bridger.conf b/package/network/services/bridger/files/bridger.conf
index 2ff6b5b787..bad8508f14 100644
--- a/package/network/services/bridger/files/bridger.conf
+++ b/package/network/services/bridger/files/bridger.conf
@@ -1,6 +1,7 @@
 config defaults
 	# handle bridge local rx/tx
-	option bridge_local 0
+	option bridge_local_tx 1
+	option bridge_local_rx 0
 
 	# example for blacklisting individual devices or bridges
 	# list blacklist eth0
diff --git a/package/network/services/bridger/files/bridger.init b/package/network/services/bridger/files/bridger.init
index c9983ae9cc..057b18a94f 100644
--- a/package/network/services/bridger/files/bridger.init
+++ b/package/network/services/bridger/files/bridger.init
@@ -16,8 +16,11 @@ get_defaults() {
 	done
 	json_close_array
 
-	config_get_bool bridge_local "$cfg" bridge_local 0
-	json_add_boolean bridge_local "$bridge_local"
+	config_get_bool bridge_local_tx "$cfg" bridge_local_tx 1
+	json_add_boolean bridge_local_tx "$bridge_local_tx"
+
+	config_get_bool bridge_local_rx "$cfg" bridge_local_rx 0
+	json_add_boolean bridge_local_rx "$bridge_local_rx"
 }
 
 reload_service() {



From lede-commits at lists.infradead.org  Mon Apr 22 02:27:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 05:27:17 -0400
Subject: [openwrt/openwrt]  generic: 5.15: fix broken BoHong bh25q128as patch
In-Reply-To: <171377803718.2171824.16065268530642771649@git-01.infra.openwrt.org>
References: <171377803718.2171824.16065268530642771649@git-01.infra.openwrt.org>
Message-ID: <mailman.29438.1713778045.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e890820579f34bff0090a3194772e9b9e954cff2

commit e890820579f34bff0090a3194772e9b9e954cff2
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Apr 22 11:21:08 2024 +0200

    generic: 5.15: fix broken BoHong bh25q128as patch
    
    Fix broken BoHong bh25q128as patch that used wrong define for kernel
    5.15.
    
    Fixes: 4cb814d403bb ("generic: 5.15: Make support for BoHong bh25q128as generic")
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch b/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
index 0e68aa5907..ab3c24ff7f 100644
--- a/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
+++ b/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
@@ -44,8 +44,8 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 +
 +static const struct flash_info bohong_parts[] = {
 +	/* BoHong Microelectronics */
-+	{ "bh25q128as", INFO(0x684018, 0, 64 * 1024, 256)
-+		NO_SFDP_FLAGS(SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
++	{ "bh25q128as", INFO(0x684018, 0, 64 * 1024, 256,
++			     SECT_4K | SPI_NOR_DUAL_READ | SPI_NOR_QUAD_READ) },
 +};
 +
 +const struct spi_nor_manufacturer spi_nor_bohong = {



From lede-commits at lists.infradead.org  Mon Apr 22 02:27:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 05:27:18 -0400
Subject: [openwrt/openwrt]  pistachio: 6.1: refresh kernel patches
In-Reply-To: <171377803718.2171824.16065268530642771649@git-01.infra.openwrt.org>
References: <171377803718.2171824.16065268530642771649@git-01.infra.openwrt.org>
Message-ID: <mailman.29439.1713778045.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/116e8917bf9f386e975777c66345f2571b1d74df

commit 116e8917bf9f386e975777c66345f2571b1d74df
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Apr 22 11:24:10 2024 +0200

    pistachio: 6.1: refresh kernel patches
    
    Refresh kernel patches with make target/linux/refresh.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch     | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch b/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch
index b30f79b773..a8ebab9cd2 100644
--- a/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch
+++ b/target/linux/pistachio/patches-6.1/401-mtd-nor-support-mtd-name-from-device-tree.patch
@@ -10,7 +10,7 @@ Signed-off-by: Abhimanyu Vishwakarma <Abhimanyu.Vishwakarma at imgtec.com>
 
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -2942,12 +2942,20 @@ static void spi_nor_set_mtd_info(struct
+@@ -2964,12 +2964,20 @@ static void spi_nor_set_mtd_info(struct
  {
  	struct mtd_info *mtd = &nor->mtd;
  	struct device *dev = nor->dev;



From lede-commits at lists.infradead.org  Mon Apr 22 02:27:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 22 Apr 2024 05:27:19 -0400
Subject: [openwrt/openwrt]  generic: 5.15: refresh kernel patches
In-Reply-To: <171377803718.2171824.16065268530642771649@git-01.infra.openwrt.org>
References: <171377803718.2171824.16065268530642771649@git-01.infra.openwrt.org>
Message-ID: <mailman.29440.1713778047.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e0363233c958cf591597006f6a0853dc1b0a012f

commit e0363233c958cf591597006f6a0853dc1b0a012f
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Apr 22 11:26:18 2024 +0200

    generic: 5.15: refresh kernel patches
    
    Refresh kernel patches with make target/linux/refresh.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch           | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch b/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
index ab3c24ff7f..6363cb61af 100644
--- a/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
+++ b/target/linux/generic/pending-5.15/405-mtd-spi-nor-Add-support-for-BoHong-bh25q128as.patch
@@ -55,7 +55,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 +};
 --- a/drivers/mtd/spi-nor/core.c
 +++ b/drivers/mtd/spi-nor/core.c
-@@ -2001,6 +2001,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
+@@ -1844,6 +1844,7 @@ int spi_nor_sr2_bit7_quad_enable(struct
  
  static const struct spi_nor_manufacturer *manufacturers[] = {
  	&spi_nor_atmel,
@@ -65,7 +65,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	&spi_nor_esmt,
 --- a/drivers/mtd/spi-nor/core.h
 +++ b/drivers/mtd/spi-nor/core.h
-@@ -631,6 +631,7 @@ struct sfdp {
+@@ -473,6 +473,7 @@ struct sfdp {
  
  /* Manufacturer drivers. */
  extern const struct spi_nor_manufacturer spi_nor_atmel;



From lede-commits at lists.infradead.org  Tue Apr 23 03:34:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 06:34:18 -0400
Subject: [openwrt/openwrt]  tools/cpio: update to 2.15
In-Reply-To: <171386845887.4165656.9662145555954450662@git-01.infra.openwrt.org>
References: <171386845887.4165656.9662145555954450662@git-01.infra.openwrt.org>
Message-ID: <mailman.29894.1713868466.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/82ba1d26357fe005da6a71c10f75d83227af299c

commit 82ba1d26357fe005da6a71c10f75d83227af299c
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed Jan 24 13:18:53 2024 +0100

    tools/cpio: update to 2.15
    
    Release Notes:
    https://lists.gnu.org/archive/html/info-gnu/2024-01/msg00006.html
    
    Fixes: #15228
    Signed-off-by: Nick Hainke <vincent at systemli.org>
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/cpio/Makefile | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/tools/cpio/Makefile b/tools/cpio/Makefile
index 1550785ddc..bd6e258980 100644
--- a/tools/cpio/Makefile
+++ b/tools/cpio/Makefile
@@ -3,11 +3,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=cpio
 PKG_CPE_ID:=cpe:/a:gnu:cpio
-PKG_VERSION:=2.14
+PKG_VERSION:=2.15
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=@GNU/cpio
-PKG_HASH:=fcdc15d60f7267a6fc7efcd6b9db7b6c8966c4f2fbbb964c24d41336fd3f2c12
+PKG_HASH:=937610b97c329a1ec9268553fb780037bcfff0dcffe9725ebc4fd9c1aa9075db
 
 include $(INCLUDE_DIR)/host-build.mk
 



From lede-commits at lists.infradead.org  Tue Apr 23 07:17:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 10:17:36 -0400
Subject: [openwrt/openwrt]  tools: b43-tools: fix compilation with GCC14
In-Reply-To: <171388185683.433931.1647251758816798824@git-01.infra.openwrt.org>
References: <171388185683.433931.1647251758816798824@git-01.infra.openwrt.org>
Message-ID: <mailman.30030.1713881862.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/a48786ef4034d9905357c44d09caba3303eb28d2

commit a48786ef4034d9905357c44d09caba3303eb28d2
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Fri Mar 29 18:57:03 2024 +0100

    tools: b43-tools: fix compilation with GCC14
    
    GCC14 no longer treats integer types and pointer types as equivalent in
    assignments (including implied assignments of function arguments and return
    values), and instead fails the compilation with a type error.
    
    So, as a workaround lets disable the newly introduced error
    -Werror=int-conversion and just make it print a warning to enable compiling
    with GCC14 as Fedora 40 now defaults to it.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/b43-tools/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/b43-tools/Makefile b/tools/b43-tools/Makefile
index bae498c78f..19918efde4 100644
--- a/tools/b43-tools/Makefile
+++ b/tools/b43-tools/Makefile
@@ -23,7 +23,7 @@ define Host/Compile
 		$(HOST_MAKE_FLAGS) \
 		$(1) QUIET_SPARSE=:
 	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/assembler \
-		CFLAGS="$(HOST_CFLAGS) -include endian.h" \
+		CFLAGS="$(HOST_CFLAGS) -include endian.h -Wno-error=int-conversion" \
 		$(HOST_MAKE_FLAGS) \
 		LDFLAGS= \
 		$(1) QUIET_SPARSE=:



From lede-commits at lists.infradead.org  Tue Apr 23 11:58:22 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 14:58:22 -0400
Subject: [openwrt/openwrt]  ubox: update to Git HEAD (2024-03-02)
In-Reply-To: <171389870210.983213.2794721144876407258@git-01.infra.openwrt.org>
References: <171389870210.983213.2794721144876407258@git-01.infra.openwrt.org>
Message-ID: <mailman.30121.1713898710.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c6e6d26f4ba8e46d5db010c6ea7d622993828ffe

commit c6e6d26f4ba8e46d5db010c6ea7d622993828ffe
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Fri Apr 19 18:23:00 2024 -0700

    ubox: update to Git HEAD (2024-03-02)
    
    d413903016c4 kmodloader: support duplicate module names and aliases
    1c9aaefc119a kmodloader: fix memleak adding to avl tree
    4c5c45c6beac kmodloader: fix invalid write during insmod, CodeQL warnings
    6a59975afc2c kmodloader: improve memory accounting and deallocation
    
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/system/ubox/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 024532f34b..9423eeafad 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -1,13 +1,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=ubox
-PKG_RELEASE:=2
+PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git
-PKG_SOURCE_DATE:=2024-01-24
-PKG_SOURCE_VERSION:=2c5887cb46883a28d69071c4349c3dabbbe3972c
-PKG_MIRROR_HASH:=5b7b00c358cc53b842c25e6f6dd21bf429d4913204a8186a72b13447658927cf
+PKG_SOURCE_DATE:=2024-03-02
+PKG_SOURCE_VERSION:=d413903016c4dc9190926e38ff72fbf7d3d69115
+PKG_MIRROR_HASH:=51f529b8b686725954bd8ea17b6734c1b5bb3ad8eb0bc57d19c89694a78d651c
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Tue Apr 23 12:59:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 15:59:30 -0400
Subject: [openwrt/openwrt]  ipq807x: add Spectrum SAX1V1K
In-Reply-To: <171390237091.1106855.15067219392257263456@git-01.infra.openwrt.org>
References: <171390237091.1106855.15067219392257263456@git-01.infra.openwrt.org>
Message-ID: <mailman.30146.1713902377.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3569b37b15c721513a0a5d4bd6d857be2523ec38

commit 3569b37b15c721513a0a5d4bd6d857be2523ec38
Author: Connor Yoon <j_connor at taliaent.com>
AuthorDate: Tue Mar 19 14:10:51 2024 +0100

    ipq807x: add Spectrum SAX1V1K
    
    Spectrum SAX1V1K is a AX WIFI router with 3 1G and 1 2.5G ports.
    The router is provided to Spectrum customers.
    It is OEM of Askey RT5010W
    https://forum.openwrt.org/t/spectrum-sax1v1k-askey-rt5010w-openwrt-support/149923
    
    It continues the original work by @MeisterLone to get this device supported.
    
    Specifications:
    ```
      ?  CPU: Qualcomm IPQ8072A Quad core Cortex-A53 2.2GHz
      ?  RAM: 2048MB of DDR3
      ?  Storage: 1024MB eMMC
      ?  Ethernet: 3x 1G RJ45 ports (QCA8075) + 1 2.5G Port (QCA8081)
      ?  WLAN:
         ? 2.4GHz: Qualcomm QCN5024 4x4 802.11b/g/n/ax 1174 Mbps PHY rate
         ? 5GHz: Qualcomm QCN5054 4x4 802.11a/b/g/n/ac/ax 2402 PHY rate
    
      ?  LED: 1 gpio-controlled dual color led (blue/red)
      ?  Buttons: 1x reset
      ?  Power: 12V DC jack
    ```
    
    Notes:
    ```
      ?  This commit adds only single partition support, that means
         sysupgrade is upgrading the current rootfs partition.
      ?  Installation can be done by serial connection only.
      ?  A poulated serial header is onboard
         https://forum.openwrt.org/t/spectrum-sax1v1k-askey-rt5010w-openwrt-support/149923/6
      ?  RX/TX is working, u-boot bootwait is active, secure boot is enabled.
    ```
    
    Installation Instructions:
    
            **Most part of the installation is performed from an initramfs image.**
    
            Boot initramfs : Using serial connection
            1. Boot up the device and wait till it displays "VERIFY_IB: Success. verify IB ok"
            2. Once that message appears,
                login with username 'root'
                password serial number of your router in uppercase.
            3. Use vi to paste the 'open.sh' script from @MeisterLone github on your device
                https://github.com/MeisterLone/Askey-RT5010W-D187-REV6/blob/master/Patch/open.sh
            4. chmod 755 open.sh
            5. ./open.sh
            6. Set your ip to 192.168.0.1
            7. Run a TFTP server and host the initramfs image on the TFTP server and name it "recovery.img"
            8. Reboot device. On boot it will try TFTP.
    
            Install OpenWrt from initramfs image:
            1. Use SCP (or other way) to transfer OpenWrt factory image
            2. Connect to device using SSH (on a LAN port)
            3. Flash firmware: sysupgrade
               # sysupgrade -n -v /tmp/openwrt_sysupgrade.bin
            4. Set U-boot env variable: bootcmd
               # fw_setenv bootcmd "run fix_uboot; run setup_and_boot"
            5. Reboot the device
               # reboot
            6. Once device is booted, residue of previous firmware will prevent openwrt to work properly.
                Factory Reset is MUST required
                # Once serial console is displaying to login, hold reset button for 10 sec
            7. Now everything should be operational.
    
            Note: this PR adds only single partition support, that means sysupgrade is
                  upgrading the current rootfs partition
    
    Signed-off-by: Connor Yoon <j_connor at taliaent.com>
---
 .../boot/uboot-envtools/files/qualcommax_ipq807x   |   5 +
 package/firmware/ipq-wifi/Makefile                 |   2 +
 .../arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts   | 219 +++++++++++++++++++++
 target/linux/qualcommax/image/ipq807x.mk           |  12 ++
 .../ipq807x/base-files/etc/board.d/02_network      |   1 +
 .../etc/hotplug.d/firmware/11-ath11k-caldata       |   3 +-
 .../ipq807x/base-files/lib/upgrade/platform.sh     |   3 +-
 7 files changed, 243 insertions(+), 2 deletions(-)

diff --git a/package/boot/uboot-envtools/files/qualcommax_ipq807x b/package/boot/uboot-envtools/files/qualcommax_ipq807x
index 86e7062cfc..312fdf8d87 100644
--- a/package/boot/uboot-envtools/files/qualcommax_ipq807x
+++ b/package/boot/uboot-envtools/files/qualcommax_ipq807x
@@ -56,6 +56,11 @@ qnap,301w)
 	[ -n "$idx" ] && \
 		ubootenv_add_uci_config "/dev/mtd$idx" "0x0" "0x20000" "0x20000" "1"
 	;;
+spectrum,sax1v1k)
+	mmcpart="$(find_mmc_part 0:APPSBLENV)"
+	[ -n "$mmcpart" ] && \
+		ubootenv_add_uci_config "$mmcpart" "0x0" "0x40000" "0x40000" "1"
+	;;
 esac
 
 config_load ubootenv
diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 41c772c967..ced4ece692 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -46,6 +46,7 @@ ALLWIFIBOARDS:= \
 	prpl_haze \
 	qnap_301w \
 	redmi_ax6 \
+	spectrum_sax1v1k \
 	wallys_dr40x9 \
 	xiaomi_ax3600 \
 	xiaomi_ax9000 \
@@ -165,6 +166,7 @@ $(eval $(call generate-ipq-wifi-package,netgear_wax630,Netgear WAX630))
 $(eval $(call generate-ipq-wifi-package,qnap_301w,QNAP 301w))
 $(eval $(call generate-ipq-wifi-package,prpl_haze,prpl Haze))
 $(eval $(call generate-ipq-wifi-package,redmi_ax6,Redmi AX6))
+$(eval $(call generate-ipq-wifi-package,spectrum_sax1v1k,Spectrum SAX1V1K))
 $(eval $(call generate-ipq-wifi-package,wallys_dr40x9,Wallys DR40X9))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax3600,Xiaomi AX3600))
 $(eval $(call generate-ipq-wifi-package,xiaomi_ax9000,Xiaomi AX9000))
diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts
new file mode 100644
index 0000000000..01ac1c5fd6
--- /dev/null
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-sax1v1k.dts
@@ -0,0 +1,219 @@
+// SPDX-License-Identifier: GPL-2.0-or-later OR MIT
+
+/dts-v1/;
+
+#include "ipq8074.dtsi"
+#include "ipq8074-hk-cpu.dtsi"
+#include "ipq8074-ess.dtsi"
+#include <dt-bindings/gpio/gpio.h>
+#include <dt-bindings/input/input.h>
+#include <dt-bindings/leds/common.h>
+
+/ {
+	model = "Spectrum SAX1V1K";
+	compatible = "spectrum,sax1v1k", "qcom,ipq8074";
+
+	aliases {
+		led-boot = &led_system_red;
+		led-failsafe = &led_system_red;
+		led-running = &led_system_blue;
+		led-upgrade = &led_system_red;
+		serial0 = &blsp1_uart5;
+		/* Aliases as required by u-boot to patch MAC addresses */
+		ethernet0 = &dp6_syn;
+		ethernet1 = &dp4;
+		ethernet2 = &dp3;
+		ethernet3 = &dp2;
+		label-mac-device = &dp6_syn;
+	};
+
+	chosen {
+		stdout-path = "serial0:115200n8";
+	};
+
+	keys {
+		compatible = "gpio-keys";
+
+		reset {
+			label = "reset";
+			gpios = <&tlmm 34 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_RESTART>;
+		};
+
+		wps {
+			label = "wps";
+			gpios = <&tlmm 63 GPIO_ACTIVE_LOW>;
+			linux,code = <KEY_WPS_BUTTON>;
+		};
+	};
+
+	leds {
+		compatible = "gpio-leds";
+
+		led_system_blue: system-blue {
+			gpios = <&tlmm 26 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_BLUE>;
+			function = LED_FUNCTION_STATUS;
+		};
+
+		led_system_red: system-red {
+			gpios = <&tlmm 25 GPIO_ACTIVE_HIGH>;
+			color = <LED_COLOR_ID_RED>;
+			function = LED_FUNCTION_STATUS;
+		};
+	};
+};
+
+&tlmm {
+	mdio_pins: mdio-pins {
+		mdc {
+			pins = "gpio68";
+			function = "mdc";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+
+		mdio {
+			pins = "gpio69";
+			function = "mdio";
+			drive-strength = <8>;
+			bias-pull-up;
+		};
+	};
+};
+
+&blsp1_uart5 {
+	status = "okay";
+};
+
+&prng {
+	status = "okay";
+};
+
+&cryptobam {
+	status = "okay";
+};
+
+&crypto {
+	status = "okay";
+};
+
+&qpic_bam {
+	status = "okay";
+};
+
+&mdio {
+	pinctrl-0 = <&mdio_pins>;
+	pinctrl-names = "default";
+	reset-gpios = <&tlmm 37 GPIO_ACTIVE_LOW>;
+	status = "okay";
+
+	ethernet-phy-package at 0 {
+		#address-cells = <1>;
+		#size-cells = <0>;
+		compatible = "qcom,qca8075-package";
+		reg = <0>;
+
+		qcom,package-mode = "qsgmii";
+
+		qca8075_1: ethernet-phy at 1 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <1>;
+		};
+
+		qca8075_2: ethernet-phy at 2 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <2>;
+		};
+
+		qca8075_3: ethernet-phy at 3 {
+			compatible = "ethernet-phy-ieee802.3-c22";
+			reg = <3>;
+		};
+	};
+
+	qca8081: ethernet-phy at 28 {
+		compatible = "ethernet-phy-id004d.d101";
+		reg = <28>;
+		reset-gpios = <&tlmm 44 GPIO_ACTIVE_LOW>;
+	};
+};
+
+&sdhc_1 {
+	/* Following same rule as QNAP 301W
+	 * the emmc has a problem with the hs400 > hs200 speed switch.
+	 * Therefore remove the mmc-hs400-1_8v property
+	*/
+	/delete-property/ mmc-hs400-1_8v;
+	mmc-hs200-1_8v;
+	mmc-ddr-1_8v;
+	vqmmc-supply = <&l11>;
+	status = "okay";
+};
+
+&switch {
+	switch_lan_bmp = <(ESS_PORT2 | ESS_PORT3 | ESS_PORT4)>; /* lan port bitmap */
+	switch_wan_bmp = <ESS_PORT6>; /* wan port bitmap */
+	switch_mac_mode = <MAC_MODE_QSGMII>; /* mac mode for uniphy instance0*/
+	switch_mac_mode2 = <MAC_MODE_SGMII_PLUS>; /* mac mode for uniphy instance2*/
+	status = "okay";
+
+	qcom,port_phyinfo {
+		port at 2 {
+			port_id = <2>;
+			phy_address = <1>;
+		};
+
+		port at 3 {
+			port_id = <3>;
+			phy_address = <2>;
+		};
+
+		port at 4 {
+			port_id = <4>;
+			phy_address = <3>;
+		};
+
+		port at 6 {
+			port_id = <6>;
+			phy_address = <28>;
+			port_mac_sel = "QGMAC_PORT";
+		};
+	};
+};
+
+&edma {
+	status = "okay";
+};
+
+&dp2 {
+	phy-mode = "qsgmii";
+	phy-handle = <&qca8075_1>;
+	label = "lan3";
+	status = "okay";
+};
+
+&dp3 {
+	phy-mode = "qsgmii";
+	phy-handle = <&qca8075_2>;
+	label = "lan2";
+	status = "okay";
+};
+
+&dp4 {
+	phy-mode = "qsgmii";
+	phy-handle = <&qca8075_3>;
+	label = "lan1";
+	status = "okay";
+};
+
+&dp6_syn {
+	phy-handle = <&qca8081>;
+	label = "wan";
+	status = "okay";
+};
+
+&wifi {
+	qcom,ath11k-calibration-variant = "Spectrum-SAX1V1K";
+	status = "okay";
+};
diff --git a/target/linux/qualcommax/image/ipq807x.mk b/target/linux/qualcommax/image/ipq807x.mk
index 027278b63c..e32250d458 100644
--- a/target/linux/qualcommax/image/ipq807x.mk
+++ b/target/linux/qualcommax/image/ipq807x.mk
@@ -247,6 +247,18 @@ define Device/redmi_ax6
 endef
 TARGET_DEVICES += redmi_ax6
 
+define Device/spectrum_sax1v1k
+	$(call Device/FitImage)
+	$(call Device/EmmcImage)
+	DEVICE_VENDOR := Spectrum
+	DEVICE_MODEL := SAX1V1K
+	DEVICE_DTS_CONFIG := config at rt5010w-d187-rev6
+	SOC := ipq8072
+	IMAGES := sysupgrade.bin
+	DEVICE_PACKAGES := ipq-wifi-spectrum_sax1v1k
+endef
+TARGET_DEVICES += spectrum_sax1v1k
+
 define Device/xiaomi_ax3600
 	$(call Device/FitImage)
 	$(call Device/UbiFit)
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
index 77c84d40fa..a6ec834785 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
@@ -27,6 +27,7 @@ ipq807x_setup_interfaces()
 	linksys,mx4200v2|\
 	prpl,haze|\
 	redmi,ax6|\
+	spectrum,sax1v1k|\
 	xiaomi,ax3600)
 		ucidef_set_interfaces_lan_wan "lan1 lan2 lan3" "wan"
 		;;
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
index f533bac48e..d0689d0db6 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
@@ -33,7 +33,8 @@ case "$FIRMWARE" in
 	zyxel,nbg7815)
 		caldata_extract "0:art" 0x1000 0x20000
 		;;
-	prpl,haze)
+	prpl,haze|\
+	spectrum,sax1v1k)
 		caldata_extract_mmc "0:ART" 0x1000 0x20000
 		;;
 	esac
diff --git a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
index 768bf649ce..b9668d0af4 100644
--- a/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
+++ b/target/linux/qualcommax/ipq807x/base-files/lib/upgrade/platform.sh
@@ -92,7 +92,8 @@ platform_do_upgrade() {
 		nand_do_upgrade "$1"
 		;;
 	prpl,haze|\
-	qnap,301w)
+	qnap,301w|\
+	spectrum,sax1v1k)
 		kernelname="0:HLOS"
 		rootfsname="rootfs"
 		mmc_do_upgrade "$1"



From lede-commits at lists.infradead.org  Tue Apr 23 13:34:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 16:34:00 -0400
Subject: [openwrt/openwrt]  mwlwifi: update to version 10.4.10-20240419
In-Reply-To: <171390444079.1199367.6260963699977115774@git-01.infra.openwrt.org>
References: <171390444079.1199367.6260963699977115774@git-01.infra.openwrt.org>
Message-ID: <mailman.30154.1713904446.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/63dd3f74ac3413b9fe069f136b376bd489164524

commit 63dd3f74ac3413b9fe069f136b376bd489164524
Author: Stefan Kalscheuer <stefan at stklcode.de>
AuthorDate: Fri Apr 19 17:31:24 2024 +0200

    mwlwifi: update to version 10.4.10-20240419
    
    This update contains a minor fix to resolve "detected write beyond size
    of field" warning during compilation:
    * "replace [0] with []" (1d0d08c)
    
    All patches still apply.
    
    References:
    * https://github.com/openwrt/openwrt/issues/15108
    
    Signed-off-by: Stefan Kalscheuer <stefan at stklcode.de>
---
 package/kernel/mwlwifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/kernel/mwlwifi/Makefile b/package/kernel/mwlwifi/Makefile
index b55b4604ca..94e687ce4a 100644
--- a/package/kernel/mwlwifi/Makefile
+++ b/package/kernel/mwlwifi/Makefile
@@ -15,9 +15,9 @@ PKG_LICENSE_FILES:=
 
 PKG_SOURCE_URL:=https://github.com/kaloz/mwlwifi
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2023-11-29
-PKG_SOURCE_VERSION:=ebf3167445f108346dcff9a31a708534c0bd7cc5
-PKG_MIRROR_HASH:=6dffc08208305366b9c25133b74693d5c2e544c1076b7b4ed846628c66be56c1
+PKG_SOURCE_DATE:=2024-04-19
+PKG_SOURCE_VERSION:=a737d348ef4fe00434b2bc44b2b6a68ea833d95b
+PKG_MIRROR_HASH:=d55f69c2fa48d02ba535b72b108fc77f5f13a52b29130a631489a053f1670d2c
 
 PKG_MAINTAINER:=Imre Kaloz <kaloz at openwrt.org>
 PKG_BUILD_PARALLEL:=1



From lede-commits at lists.infradead.org  Tue Apr 23 13:36:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 16:36:05 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq807x: use ath11k_patch_mac for
 RAX120v2
In-Reply-To: <171390456360.1206588.13778612320843529702@git-01.infra.openwrt.org>
References: <171390456360.1206588.13778612320843529702@git-01.infra.openwrt.org>
Message-ID: <mailman.30157.1713904569.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/48daac25ce78770e1580f23241cd66b74036f7c2

commit 48daac25ce78770e1580f23241cd66b74036f7c2
Author: Pawe? Owoc <frut3k7 at gmail.com>
AuthorDate: Mon Mar 4 19:29:51 2024 +0100

    qualcommax: ipq807x: use ath11k_patch_mac for RAX120v2
    
    Use ath11k_patch_mac and ath11k_set_macflag functions for RAX120v2 (pre-caldata does not contain valid MAC addresses)
    
    Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
---
 .../ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata   | 8 +++++++-
 1 file changed, 7 insertions(+), 1 deletion(-)

diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
index b373e8471d..8f207a38b0 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
@@ -17,7 +17,6 @@ case "$FIRMWARE" in
 	edgecore,eap102|\
 	edimax,cax1800|\
 	linksys,mx5300|\
-	netgear,rax120v2|\
 	netgear,wax218|\
 	netgear,wax620|\
 	netgear,wax630|\
@@ -44,6 +43,13 @@ case "$FIRMWARE" in
 		ath11k_remove_regdomain
 		ath11k_set_macflag
 		;;
+	netgear,rax120v2)
+		caldata_extract "0:art" 0x1000 0x20000
+		ath11k_patch_mac $(mtd_get_mac_binary boarddata1 0xc) 0
+		ath11k_patch_mac $(mtd_get_mac_binary boarddata1 0x0) 1
+		ath11k_patch_mac $(mtd_get_mac_binary boarddata1 0x6) 2
+		ath11k_set_macflag
+		;;
 	prpl,haze|\
 	spectrum,sax1v1k)
 		caldata_extract_mmc "0:ART" 0x1000 0x20000



From lede-commits at lists.infradead.org  Tue Apr 23 13:36:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 16:36:03 -0400
Subject: [openwrt/openwrt]  base-files: Add new functions for ath11k caldata
In-Reply-To: <171390456360.1206588.13778612320843529702@git-01.infra.openwrt.org>
References: <171390456360.1206588.13778612320843529702@git-01.infra.openwrt.org>
Message-ID: <mailman.30158.1713904569.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/652a6677d5fa3c1eb0b9b58b8bf5d95c7eb6c130

commit 652a6677d5fa3c1eb0b9b58b8bf5d95c7eb6c130
Author: Pawe? Owoc <frut3k7 at gmail.com>
AuthorDate: Mon Jan 29 23:36:58 2024 +0100

    base-files: Add new functions for ath11k caldata
    
    Add new functions for ath11k caldata:
    - ath11k_patch_mac (from 0 to 5)
    - ath11k_remove_regdomain
    - ath11k_set_macflag (some pre-caldata have the nvMacFlag flag unset which is needed to change the MAC address)
    
    Additionaly for ath10k caldata:
    - ath10k_remove_regdomain
    
    Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
---
 package/base-files/files/lib/functions.sh         | 24 ++++++
 package/base-files/files/lib/functions/caldata.sh | 96 +++++++++++++++--------
 package/base-files/files/lib/functions/system.sh  |  6 --
 3 files changed, 89 insertions(+), 37 deletions(-)

diff --git a/package/base-files/files/lib/functions.sh b/package/base-files/files/lib/functions.sh
index d23a56e0cf..7b3203f55a 100644
--- a/package/base-files/files/lib/functions.sh
+++ b/package/base-files/files/lib/functions.sh
@@ -32,6 +32,30 @@ xor() {
 	printf "%0${retlen}x" "$ret"
 }
 
+data_2bin() {
+	local data=$1
+	local len=${#1}
+	local bin_data
+
+	for i in $(seq 0 2 $(($len - 1))); do
+		bin_data="${bin_data}\x${data:i:2}"
+	done
+
+	echo -ne $bin_data
+}
+
+data_2xor_val() {
+	local data=$1
+	local len=${#1}
+	local xor_data
+
+	for i in $(seq 0 4 $(($len - 1))); do
+		xor_data="${xor_data}${data:i:4} "
+	done
+
+	echo -n ${xor_data:0:-1}
+}
+
 append() {
 	local var="$1"
 	local value="$2"
diff --git a/package/base-files/files/lib/functions/caldata.sh b/package/base-files/files/lib/functions/caldata.sh
index d7b88c7dce..09289728c0 100644
--- a/package/base-files/files/lib/functions/caldata.sh
+++ b/package/base-files/files/lib/functions/caldata.sh
@@ -70,7 +70,7 @@ caldata_extract_reverse() {
 	local caldata
 
 	mtd=$(find_mtd_chardev "$part")
-	reversed=$(hexdump -v -s $offset -n $count -e '/1 "%02x "' $mtd)
+	reversed=$(hexdump -v -s $offset -n $count -e '1/1 "%02x "' $mtd)
 
 	for byte in $reversed; do
 		caldata="\x${byte}${caldata}"
@@ -122,49 +122,43 @@ caldata_valid() {
 	return $?
 }
 
-caldata_patch_chksum() {
-	local mac=$1
-	local mac_offset=$(($2))
+caldata_patch_data() {
+	local data=$1
+	local data_count=$((${#1} / 2))
+	local data_offset=$(($2))
 	local chksum_offset=$(($3))
 	local target=$4
-	local xor_mac
-	local xor_fw_mac
-	local xor_fw_chksum
+	local fw_data
+	local fw_chksum
 
-	xor_mac=${mac//:/}
-	xor_mac="${xor_mac:0:4} ${xor_mac:4:4} ${xor_mac:8:4}"
+	[ -z "$data" -o -z "$data_offset" ] && return
 
-	xor_fw_mac=$(hexdump -v -n 6 -s $mac_offset -e '/1 "%02x"' /lib/firmware/$FIRMWARE)
-	xor_fw_mac="${xor_fw_mac:0:4} ${xor_fw_mac:4:4} ${xor_fw_mac:8:4}"
+	[ -n "$target" ] || target=/lib/firmware/$FIRMWARE
 
-	xor_fw_chksum=$(hexdump -v -n 2 -s $chksum_offset -e '/1 "%02x"' /lib/firmware/$FIRMWARE)
-	xor_fw_chksum=$(xor $xor_fw_chksum $xor_fw_mac $xor_mac)
+	fw_data=$(hexdump -v -n $data_count -s $data_offset -e '1/1 "%02x"' $target)
 
-	printf "%b" "\x${xor_fw_chksum:0:2}\x${xor_fw_chksum:2:2}" | \
-		dd of=$target conv=notrunc bs=1 seek=$chksum_offset count=2
-}
+	if [ "$data" != "$fw_data" ]; then
 
-caldata_patch_mac() {
-	local mac=$1
-	local mac_offset=$(($2))
-	local chksum_offset=$3
-	local target=$4
-
-	[ -z "$mac" -o -z "$mac_offset" ] && return
+		if [ -n "$chksum_offset" ]; then
+			fw_chksum=$(hexdump -v -n 2 -s $chksum_offset -e '1/1 "%02x"' $target)
+			fw_chksum=$(xor $fw_chksum $(data_2xor_val $fw_data) $(data_2xor_val $data))
 
-	[ -n "$target" ] || target=/lib/firmware/$FIRMWARE
+			data_2bin $fw_chksum | \
+				dd of=$target conv=notrunc bs=1 seek=$chksum_offset count=2 || \
+				caldata_die "failed to write chksum to eeprom file"
+		fi
 
-	[ -n "$chksum_offset" ] && caldata_patch_chksum "$mac" "$mac_offset" "$chksum_offset" "$target"
-
-	macaddr_2bin $mac | dd of=$target conv=notrunc oflag=seek_bytes bs=6 seek=$mac_offset count=1 || \
-		caldata_die "failed to write MAC address to eeprom file"
+		data_2bin $data | \
+			dd of=$target conv=notrunc bs=1 seek=$data_offset count=$data_count || \
+			caldata_die "failed to write data to eeprom file"
+	fi
 }
 
 ath9k_patch_mac() {
 	local mac=$1
 	local target=$2
 
-	caldata_patch_mac "$mac" 0x2 "" "$target"
+	caldata_patch_data "${mac//:/}" 0x2 "" "$target"
 }
 
 ath9k_patch_mac_crc() {
@@ -173,12 +167,52 @@ ath9k_patch_mac_crc() {
 	local chksum_offset=$((mac_offset - 10))
 	local target=$4
 
-	caldata_patch_mac "$mac" "$mac_offset" "$chksum_offset" "$target"
+	caldata_patch_data "${mac//:/}" "$mac_offset" "$chksum_offset" "$target"
 }
 
 ath10k_patch_mac() {
 	local mac=$1
 	local target=$2
 
-	caldata_patch_mac "$mac" 0x6 0x2 "$target"
+	caldata_patch_data "${mac//:/}" 0x6 0x2 "$target"
+}
+
+ath11k_patch_mac() {
+	local mac=$1
+	# mac_id from 0 to 5
+	local mac_id=$2
+	local target=$3
+
+	[ -z "$mac_id" ] && return
+
+	caldata_patch_data "${mac//:/}" $(printf "0x%x" $(($mac_id * 0x6 + 0xe))) 0xa "$target"
+}
+
+ath10k_remove_regdomain() {
+	local target=$1
+
+	caldata_patch_data "0000" 0xc 0x2 "$target"
+}
+
+ath11k_remove_regdomain() {
+	local target=$1
+	local regdomain
+	local regdomain_data
+
+	regdomain=$(hexdump -v -n 2 -s 0x34 -e '1/1 "%02x"' $target)
+	caldata_patch_data "0000" 0x34 0xa "$target"
+	
+	for offset in 0x450 0x458 0x500 0x5a8; do
+		regdomain_data=$(hexdump -v -n 2 -s $offset -e '1/1 "%02x"' $target)
+
+		if [ "$regdomain" == "$regdomain_data" ]; then
+			caldata_patch_data "0000" $offset 0xa "$target"
+		fi
+	done
+}
+
+ath11k_set_macflag() {
+	local target=$1
+
+	caldata_patch_data "0100" 0x3e 0xa "$target"
 }
diff --git a/package/base-files/files/lib/functions/system.sh b/package/base-files/files/lib/functions/system.sh
index 23484c8ad9..048e32f0e1 100644
--- a/package/base-files/files/lib/functions/system.sh
+++ b/package/base-files/files/lib/functions/system.sh
@@ -279,12 +279,6 @@ macaddr_random() {
 	echo "$(macaddr_unsetbit_mc "$(macaddr_setbit_la "${randsrc}")")"
 }
 
-macaddr_2bin() {
-	local mac=$1
-
-	echo -ne \\x${mac//:/\\x}
-}
-
 macaddr_canonicalize() {
 	local mac="$1"
 	local canon=""



From lede-commits at lists.infradead.org  Tue Apr 23 13:36:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 16:36:04 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq807x: use ath11k_patch_mac and
 ath11k_remove_regdomain for MX4200
In-Reply-To: <171390456360.1206588.13778612320843529702@git-01.infra.openwrt.org>
References: <171390456360.1206588.13778612320843529702@git-01.infra.openwrt.org>
Message-ID: <mailman.30161.1713904572.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/682393cd1a1ecfd90178b33b0fb1adb75fad4e5d

commit 682393cd1a1ecfd90178b33b0fb1adb75fad4e5d
Author: Pawe? Owoc <frut3k7 at gmail.com>
AuthorDate: Tue Jan 30 00:39:55 2024 +0100

    qualcommax: ipq807x: use ath11k_patch_mac and ath11k_remove_regdomain for MX4200
    
    Use ath11k_patch_mac, ath11k_remove_regdomain and ath11k_set_macflag functions for MX4200
    (only v2 variant requires MAC patching)
    
    Signed-off-by: Pawe? Owoc <frut3k7 at gmail.com>
---
 .../qualcommax/ipq807x/base-files/etc/board.d/02_network  |  1 -
 .../base-files/etc/hotplug.d/firmware/11-ath11k-caldata   | 15 +++++++++++++--
 .../base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac    |  7 -------
 3 files changed, 13 insertions(+), 10 deletions(-)

diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
index a6ec834785..d87e4246e1 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/board.d/02_network
@@ -69,7 +69,6 @@ ipq807x_setup_macs()
 	local label_mac=""
 
 	case "$board" in
-		linksys,mx4200v1|\
 		linksys,mx4200v2)
 			label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
 			for i in $(seq 3 5); do
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
index d0689d0db6..b373e8471d 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
@@ -16,8 +16,6 @@ case "$FIRMWARE" in
 	dynalink,dl-wrx36|\
 	edgecore,eap102|\
 	edimax,cax1800|\
-	linksys,mx4200v1|\
-	linksys,mx4200v2|\
 	linksys,mx5300|\
 	netgear,rax120v2|\
 	netgear,wax218|\
@@ -33,6 +31,19 @@ case "$FIRMWARE" in
 	zyxel,nbg7815)
 		caldata_extract "0:art" 0x1000 0x20000
 		;;
+	linksys,mx4200v1)
+		caldata_extract "0:art" 0x1000 0x20000
+		ath11k_remove_regdomain
+		;;
+	linksys,mx4200v2)
+		caldata_extract "0:art" 0x1000 0x20000
+		label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
+		ath11k_patch_mac $(macaddr_add $label_mac 2) 0
+		ath11k_patch_mac $(macaddr_add $label_mac 1) 1
+		ath11k_patch_mac $(macaddr_add $label_mac 3) 2
+		ath11k_remove_regdomain
+		ath11k_set_macflag
+		;;
 	prpl,haze|\
 	spectrum,sax1v1k)
 		caldata_extract_mmc "0:ART" 0x1000 0x20000
diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index dd85dcfe98..17284a0d9e 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -23,13 +23,6 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) 2 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) 3 > /sys${DEVPATH}/macaddress
 		;;
-	linksys,mx4200v1|\
-	linksys,mx4200v2)
-		label_mac=$(mtd_get_mac_ascii devinfo hw_mac_addr)
-		[ "$PHYNBR" = "0" ] && macaddr_add $label_mac 2 > /sys${DEVPATH}/macaddress
-		[ "$PHYNBR" = "1" ] && macaddr_add $label_mac 1 > /sys${DEVPATH}/macaddress
-		[ "$PHYNBR" = "2" ] && macaddr_add $label_mac 3 > /sys${DEVPATH}/macaddress
-		;;
 	zbtlink,zbt-z800ax)
 		[ "$PHYNBR" = "0" ] && macaddr_add $(get_mac_label) -1 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $(get_mac_label) -2 > /sys${DEVPATH}/macaddress



From lede-commits at lists.infradead.org  Tue Apr 23 13:38:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 16:38:09 -0400
Subject: [openwrt/openwrt]  x86: generic: config-6.6: add/remove default syms
In-Reply-To: <171390468926.1212647.15124588433725746763@git-01.infra.openwrt.org>
References: <171390468926.1212647.15124588433725746763@git-01.infra.openwrt.org>
Message-ID: <mailman.30162.1713904693.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/80a063156f2d0e0ce58dc65c910caea4e02bf35e

commit 80a063156f2d0e0ce58dc65c910caea4e02bf35e
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Wed Apr 17 15:05:00 2024 -0400

    x86: generic: config-6.6: add/remove default syms
    
    Add new default and remove deprecated symbols introduced by 6.6.28[1]
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/diff/arch/x86/Kconfig?id=v6.6.28&id2=v6.6.27
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 target/linux/x86/config-6.6 | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/linux/x86/config-6.6 b/target/linux/x86/config-6.6
index d9c2a0c4a2..7f00ffdb78 100644
--- a/target/linux/x86/config-6.6
+++ b/target/linux/x86/config-6.6
@@ -240,6 +240,7 @@ CONFIG_MICROCODE=y
 CONFIG_MICROCODE_LATE_LOADING=y
 CONFIG_MIGRATION=y
 CONFIG_MITIGATION_RFDS=y
+CONFIG_MITIGATION_SPECTRE_BHI=y
 # CONFIG_MK6 is not set
 # CONFIG_MK7 is not set
 # CONFIG_MK8 is not set
@@ -360,9 +361,6 @@ CONFIG_SG_POOL=y
 CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
-# CONFIG_SPECTRE_BHI_AUTO is not set
-# CONFIG_SPECTRE_BHI_OFF is not set
-CONFIG_SPECTRE_BHI_ON=y
 CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set



From lede-commits at lists.infradead.org  Tue Apr 23 13:38:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 16:38:10 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.28
In-Reply-To: <171390468926.1212647.15124588433725746763@git-01.infra.openwrt.org>
References: <171390468926.1212647.15124588433725746763@git-01.infra.openwrt.org>
Message-ID: <mailman.30163.1713904696.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5efd41c10b876bf25af3013e57f4bb5341dfe8b8

commit 5efd41c10b876bf25af3013e57f4bb5341dfe8b8
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Wed Apr 17 15:01:37 2024 -0400

    kernel: bump 6.6 to 6.6.28
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.28
    
    Removed upstream:
            pending-6.6/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
    
    All oither patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.28&id=8b6c4b62582606c62074a7e7c64156f56d2785f2
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6                                 |   4 +-
 ...-mt753x-remove-mt753x_phylink_pcs_link_up.patch |   4 +-
 ...530-support-OF-based-registration-of-swit.patch |   4 +-
 ...530-always-trap-frames-to-active-CPU-port.patch |  10 +-
 ...530-use-p5_interface_select-as-data-type-.patch |   4 +-
 ...530-store-port-5-SGMII-capability-of-MT75.patch |  22 +-
 ...530-improve-comments-regarding-switch-por.patch |  12 +-
 ...530-improve-code-path-for-setting-up-port.patch |   6 +-
 ...530-do-not-run-mt7530_setup_port5-if-port.patch |   4 +-
 ...sa-mt7530-move-XTAL-check-to-mt7530_setup.patch |   2 +-
 ...530-call-port-6-setup-from-mt7530_mac_con.patch |   2 +-
 ...-mt7530-remove-pad_setup-function-pointer.patch |  20 +-
 ...t7530-correct-port-capabilities-of-MT7988.patch |   2 +-
 ...530-do-not-clear-config-supported_interfa.patch |   2 +-
 ...530-remove-.mac_port_config-for-MT7988-an.patch |   8 +-
 ...530-set-interrupt-register-only-for-MT753.patch |   2 +-
 ...530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch |   2 +-
 ...530-get-rid-of-useless-error-returns-on-p.patch |  18 +-
 ...7530-get-rid-of-priv-info-cpu_port_config.patch |  34 +-
 ...t-dsa-mt7530-get-rid-of-mt753x_mac_config.patch |   4 +-
 ...530-put-initialising-PCS-devices-code-bac.patch |   4 +-
 ...530-sort-link-settings-ops-and-force-link.patch |   8 +-
 ...9-net-dsa-mt7530-simplify-link-operations.patch |   4 +-
 ...-net-dsa-mt7530-disable-LEDs-before-reset.patch |   2 +-
 ...530-fix-improper-frames-on-all-25MHz-and-.patch |   4 +-
 ...530-prevent-possible-incorrect-XTAL-frequ.patch |   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |   2 +-
 ...530-fix-enabling-EEE-on-MT7531-switch-on-.patch |   4 +-
 ...530-trap-link-local-frames-regardless-of-.patch | 483 ---------------------
 29 files changed, 98 insertions(+), 581 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 768285e092..7b0c2dd5de 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .27
-LINUX_KERNEL_HASH-6.6.27 = 639e50060e3c8f23ed017cb10cfeacc6ba88ff5583812bb76859b4cc6a128291
+LINUX_VERSION-6.6 = .28
+LINUX_KERNEL_HASH-6.6.28 = 818716ed13e7dba6aaeae24e3073993e260812ed128d10272e94b922ee6d3394
diff --git a/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch b/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
index 9f0937b810..ff6c592e12 100644
--- a/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
+++ b/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
@@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2860,15 +2860,6 @@ static void mt753x_phylink_mac_link_down
+@@ -3021,15 +3021,6 @@ static void mt753x_phylink_mac_link_down
  	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  }
  
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
  				       unsigned int mode,
  				       phy_interface_t interface,
-@@ -2956,8 +2947,6 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3117,8 +3108,6 @@ mt7531_cpu_port_config(struct dsa_switch
  		return ret;
  	mt7530_write(priv, MT7530_PMCR_P(port),
  		     PMCR_CPU_PORT_SETTING(priv->id));
diff --git a/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch b/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
index 83738408eb..46651e32df 100644
--- a/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
+++ b/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
@@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2182,24 +2182,40 @@ mt7530_free_irq_common(struct mt7530_pri
+@@ -2343,24 +2343,40 @@ mt7530_free_irq_common(struct mt7530_pri
  static void
  mt7530_free_irq(struct mt7530_priv *priv)
  {
@@ -92,7 +92,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	bus->priv = priv;
  	bus->name = KBUILD_MODNAME "-mii";
  	snprintf(bus->id, MII_BUS_ID_SIZE, KBUILD_MODNAME "-%d", idx++);
-@@ -2210,16 +2226,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2371,16 +2387,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  	bus->parent = dev;
  	bus->phy_mask = ~ds->phys_mii_mask;
  
diff --git a/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch b/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
index 56953fb364..108bbaba86 100644
--- a/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
+++ b/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1071,10 +1071,6 @@ mt753x_cpu_port_enable(struct dsa_switch
+@@ -1232,10 +1232,6 @@ mt753x_cpu_port_enable(struct dsa_switch
  	mt7530_set(priv, MT7530_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
  		   UNU_FFP(BIT(port)));
  
@@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
  	 * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that
  	 * is affine to the inbound user port.
-@@ -3128,6 +3124,36 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3289,6 +3285,36 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
  {
  	return 0;
-@@ -3183,6 +3209,7 @@ const struct dsa_switch_ops mt7530_switc
+@@ -3344,6 +3370,7 @@ const struct dsa_switch_ops mt7530_switc
  	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  #define  MIRROR_EN			BIT(3)
  #define  MIRROR_PORT(x)			((x) & 0x7)
  #define  MIRROR_MASK			0x7
-@@ -780,6 +780,7 @@ struct mt753x_info {
+@@ -785,6 +785,7 @@ struct mt753x_info {
   * @irq_domain:		IRQ domain of the switch irq_chip
   * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
   * @create_sgmii:	Pointer to function creating SGMII PCS instance(s)
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -806,6 +807,7 @@ struct mt7530_priv {
+@@ -811,6 +812,7 @@ struct mt7530_priv {
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
  	int (*create_sgmii)(struct mt7530_priv *priv, bool dual_sgmii);
diff --git a/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch b/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
index 5e6f8c22ff..ea79de61f9 100644
--- a/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
+++ b/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
@@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -703,7 +703,7 @@ struct mt7530_port {
+@@ -708,7 +708,7 @@ struct mt7530_port {
  
  /* Port 5 interface select definitions */
  enum p5_interface_select {
@@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	P5_INTF_SEL_PHY_P0,
  	P5_INTF_SEL_PHY_P4,
  	P5_INTF_SEL_GMAC5,
-@@ -796,7 +796,7 @@ struct mt7530_priv {
+@@ -801,7 +801,7 @@ struct mt7530_priv {
  	bool			mcm;
  	phy_interface_t		p6_interface;
  	phy_interface_t		p5_interface;
diff --git a/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch b/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
index 5bbdc6d0e0..2d1a487c98 100644
--- a/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
+++ b/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	default:
  		return "unknown";
  	}
-@@ -2524,6 +2510,12 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2685,6 +2671,12 @@ mt7531_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
@@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	/* all MACs must be forced link-down before sw reset */
  	for (i = 0; i < MT7530_NUM_PORTS; i++)
  		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
-@@ -2533,21 +2525,18 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2694,21 +2686,18 @@ mt7531_setup(struct dsa_switch *ds)
  		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
  		     SYS_CTRL_REG_RST);
  
@@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
  		   MT7531_GPIO0_INTERRUPT);
-@@ -2607,11 +2596,6 @@ static void mt7530_mac_port_get_caps(str
+@@ -2768,11 +2757,6 @@ static void mt7530_mac_port_get_caps(str
  	}
  }
  
@@ -153,7 +153,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
-@@ -2624,7 +2608,7 @@ static void mt7531_mac_port_get_caps(str
+@@ -2785,7 +2769,7 @@ static void mt7531_mac_port_get_caps(str
  		break;
  
  	case 5: /* 2nd cpu port supports either rgmii or sgmii/8023z */
@@ -162,7 +162,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			phy_interface_set_rgmii(config->supported_interfaces);
  			break;
  		}
-@@ -2691,7 +2675,7 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2852,7 +2836,7 @@ static int mt7531_rgmii_setup(struct mt7
  {
  	u32 val;
  
@@ -171,7 +171,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dev_err(priv->dev, "RGMII mode is not available for port %d\n",
  			port);
  		return -EINVAL;
-@@ -2934,7 +2918,7 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3095,7 +3079,7 @@ mt7531_cpu_port_config(struct dsa_switch
  
  	switch (port) {
  	case 5:
@@ -180,7 +180,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			interface = PHY_INTERFACE_MODE_RGMII;
  		else
  			interface = PHY_INTERFACE_MODE_2500BASEX;
-@@ -3086,7 +3070,7 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3247,7 +3231,7 @@ mt753x_setup(struct dsa_switch *ds)
  		mt7530_free_irq_common(priv);
  
  	if (priv->create_sgmii) {
@@ -191,7 +191,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -707,7 +707,6 @@ enum p5_interface_select {
+@@ -712,7 +712,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_PHY_P0,
  	P5_INTF_SEL_PHY_P4,
  	P5_INTF_SEL_GMAC5,
@@ -199,7 +199,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  };
  
  struct mt7530_priv;
-@@ -776,6 +775,8 @@ struct mt753x_info {
+@@ -781,6 +780,8 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -208,7 +208,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   * @irq:		IRQ number of the switch
   * @irq_domain:		IRQ domain of the switch irq_chip
   * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
-@@ -797,6 +798,7 @@ struct mt7530_priv {
+@@ -802,6 +803,7 @@ struct mt7530_priv {
  	phy_interface_t		p6_interface;
  	phy_interface_t		p5_interface;
  	enum p5_interface_select p5_intf_sel;
@@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	u8			mirror_rx;
  	u8			mirror_tx;
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
-@@ -806,7 +808,7 @@ struct mt7530_priv {
+@@ -811,7 +813,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch b/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
index c23074a030..5ad4e5bb70 100644
--- a/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
+++ b/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2574,12 +2574,14 @@ static void mt7530_mac_port_get_caps(str
+@@ -2735,12 +2735,14 @@ static void mt7530_mac_port_get_caps(str
  				     struct phylink_config *config)
  {
  	switch (port) {
@@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		phy_interface_set_rgmii(config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_MII,
  			  config->supported_interfaces);
-@@ -2587,7 +2589,8 @@ static void mt7530_mac_port_get_caps(str
+@@ -2748,7 +2750,8 @@ static void mt7530_mac_port_get_caps(str
  			  config->supported_interfaces);
  		break;
  
@@ -64,7 +64,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		__set_bit(PHY_INTERFACE_MODE_RGMII,
  			  config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_TRGMII,
-@@ -2602,19 +2605,24 @@ static void mt7531_mac_port_get_caps(str
+@@ -2763,19 +2766,24 @@ static void mt7531_mac_port_get_caps(str
  	struct mt7530_priv *priv = ds->priv;
  
  	switch (port) {
@@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		__set_bit(PHY_INTERFACE_MODE_SGMII,
  			  config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_1000BASEX,
-@@ -2633,11 +2641,13 @@ static void mt7988_mac_port_get_caps(str
+@@ -2794,11 +2802,13 @@ static void mt7988_mac_port_get_caps(str
  	phy_interface_zero(config->supported_interfaces);
  
  	switch (port) {
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	case 6:
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  config->supported_interfaces);
-@@ -2801,12 +2811,12 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2962,12 +2972,12 @@ mt753x_phylink_mac_config(struct dsa_swi
  	u32 mcr_cur, mcr_new;
  
  	switch (port) {
@@ -122,7 +122,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (priv->p5_interface == state->interface)
  			break;
  
-@@ -2816,7 +2826,7 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2977,7 +2987,7 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p5_intf_sel != P5_DISABLED)
  			priv->p5_interface = state->interface;
  		break;
diff --git a/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch b/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
index a0f565906b..ec51e3f679 100644
--- a/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
+++ b/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2362,16 +2362,15 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2523,16 +2523,15 @@ mt7530_setup(struct dsa_switch *ds)
  		return ret;
  
  	/* Setup port 5 */
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		for_each_child_of_node(dn, mac_np) {
  			if (!of_device_is_compatible(mac_np,
  						     "mediatek,eth-mac"))
-@@ -2402,6 +2401,8 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2563,6 +2562,8 @@ mt7530_setup(struct dsa_switch *ds)
  			of_node_put(phy_node);
  			break;
  		}
@@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  #ifdef CONFIG_GPIOLIB
-@@ -2412,8 +2413,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2573,8 +2574,6 @@ mt7530_setup(struct dsa_switch *ds)
  	}
  #endif /* CONFIG_GPIOLIB */
  
diff --git a/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch b/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
index 9eecede95e..888261373b 100644
--- a/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
+++ b/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	default:
  		dev_err(ds->dev, "Unsupported p5_intf_sel %d\n",
  			priv->p5_intf_sel);
-@@ -2367,8 +2364,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2528,8 +2525,6 @@ mt7530_setup(struct dsa_switch *ds)
  		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
  		 * is detected.
  		 */
@@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		for_each_child_of_node(dn, mac_np) {
  			if (!of_device_is_compatible(mac_np,
  						     "mediatek,eth-mac"))
-@@ -2400,7 +2395,9 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2561,7 +2556,9 @@ mt7530_setup(struct dsa_switch *ds)
  			break;
  		}
  
diff --git a/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch b/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
index 575352dbb1..1a3e28d836 100644
--- a/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
+++ b/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	switch (interface) {
  	case PHY_INTERFACE_MODE_RGMII:
  		trgint = 0;
-@@ -2295,6 +2288,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2456,6 +2449,12 @@ mt7530_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
diff --git a/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch b/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
index dd886adaa2..5d79a7f3c4 100644
--- a/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
+++ b/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
@@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	return 0;
  }
  
-@@ -2649,11 +2653,10 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2810,11 +2814,10 @@ mt7530_mac_config(struct dsa_switch *ds,
  {
  	struct mt7530_priv *priv = ds->priv;
  
diff --git a/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch b/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
index efe554b292..0c7d6132a2 100644
--- a/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
+++ b/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
@@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void
  mt7531_pll_setup(struct mt7530_priv *priv)
  {
-@@ -2640,14 +2628,6 @@ static void mt7988_mac_port_get_caps(str
+@@ -2801,14 +2789,6 @@ static void mt7988_mac_port_get_caps(str
  }
  
  static int
@@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2812,8 +2792,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2973,8 +2953,6 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p6_interface == state->interface)
  			break;
  
@@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (mt753x_mac_config(ds, port, mode, state) < 0)
  			goto unsupported;
  
-@@ -3130,11 +3108,6 @@ mt753x_conduit_state_change(struct dsa_s
+@@ -3291,11 +3269,6 @@ mt753x_conduit_state_change(struct dsa_s
  	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
  }
  
@@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int mt7988_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
-@@ -3198,7 +3171,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3359,7 +3332,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7530_phy_write_c22,
  		.phy_read_c45 = mt7530_phy_read_c45,
  		.phy_write_c45 = mt7530_phy_write_c45,
@@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3210,7 +3182,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3371,7 +3343,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7530_phy_write_c22,
  		.phy_read_c45 = mt7530_phy_read_c45,
  		.phy_write_c45 = mt7530_phy_write_c45,
@@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3222,7 +3193,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3383,7 +3354,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7531_ind_c22_phy_write,
  		.phy_read_c45 = mt7531_ind_c45_phy_read,
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
-@@ -3235,7 +3205,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3396,7 +3366,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7531_ind_c22_phy_write,
  		.phy_read_c45 = mt7531_ind_c45_phy_read,
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.cpu_port_config = mt7988_cpu_port_config,
  		.mac_port_get_caps = mt7988_mac_port_get_caps,
  		.mac_port_config = mt7988_mac_config,
-@@ -3265,9 +3234,8 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3426,9 +3395,8 @@ mt7530_probe_common(struct mt7530_priv *
  	/* Sanity check if these required device operations are filled
  	 * properly.
  	 */
@@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -724,8 +724,6 @@ struct mt753x_pcs {
+@@ -729,8 +729,6 @@ struct mt753x_pcs {
   * @phy_write_c22:	Holding the way writing PHY port using C22
   * @phy_read_c45:	Holding the way reading PHY port using C45
   * @phy_write_c45:	Holding the way writing PHY port using C45
@@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   * @phy_mode_supported:	Check if the PHY type is being supported on a certain
   *			port
   * @mac_port_validate:	Holding the way to set addition validate type for a
-@@ -746,7 +744,6 @@ struct mt753x_info {
+@@ -751,7 +749,6 @@ struct mt753x_info {
  			    int regnum);
  	int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad,
  			     int regnum, u16 val);
diff --git a/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch b/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
index b707c3f6e9..19577a375b 100644
--- a/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
+++ b/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
@@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2613,7 +2613,7 @@ static void mt7988_mac_port_get_caps(str
+@@ -2774,7 +2774,7 @@ static void mt7988_mac_port_get_caps(str
  
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
diff --git a/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch b/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
index 4d781836da..1b45cc50ce 100644
--- a/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
+++ b/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2609,8 +2609,6 @@ static void mt7531_mac_port_get_caps(str
+@@ -2770,8 +2770,6 @@ static void mt7531_mac_port_get_caps(str
  static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
diff --git a/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch b/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
index d05b8ea5b9..90cdf29d8f 100644
--- a/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
+++ b/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2692,17 +2692,6 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2853,17 +2853,6 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -51,7 +51,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2742,6 +2731,9 @@ mt753x_mac_config(struct dsa_switch *ds,
+@@ -2903,6 +2892,9 @@ mt753x_mac_config(struct dsa_switch *ds,
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -61,7 +61,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return priv->info->mac_port_config(ds, port, mode, state->interface);
  }
  
-@@ -3205,7 +3197,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3366,7 +3358,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
  		.cpu_port_config = mt7988_cpu_port_config,
  		.mac_port_get_caps = mt7988_mac_port_get_caps,
@@ -69,7 +69,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	},
  };
  EXPORT_SYMBOL_GPL(mt753x_table);
-@@ -3233,8 +3224,7 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3394,8 +3385,7 @@ mt7530_probe_common(struct mt7530_priv *
  	 * properly.
  	 */
  	if (!priv->info->sw_setup || !priv->info->phy_read_c22 ||
diff --git a/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch b/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
index 143dd0dc1a..2d483ab403 100644
--- a/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
+++ b/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2091,7 +2091,7 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2252,7 +2252,7 @@ mt7530_setup_irq(struct mt7530_priv *pri
  	}
  
  	/* This register must be set for MT7530 to properly fire interrupts */
diff --git a/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch b/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
index 24d0ab1633..73519c3e2a 100644
--- a/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
+++ b/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
@@ -22,7 +22,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2487,14 +2487,12 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2648,14 +2648,12 @@ mt7531_setup(struct dsa_switch *ds)
  	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
  	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
  
diff --git a/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch b/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
index e311a9314f..0b2b3b5b33 100644
--- a/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
+++ b/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
@@ -36,7 +36,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2623,7 +2623,7 @@ static void mt7988_mac_port_get_caps(str
+@@ -2784,7 +2784,7 @@ static void mt7988_mac_port_get_caps(str
  	}
  }
  
@@ -45,7 +45,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2633,22 +2633,14 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2794,22 +2794,14 @@ mt7530_mac_config(struct dsa_switch *ds,
  		mt7530_setup_port5(priv->ds, interface);
  	else if (port == 6)
  		mt7530_setup_port6(priv->ds, interface);
@@ -71,7 +71,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	val = mt7530_read(priv, MT7531_CLKGEN_CTRL);
  	val |= GP_CLK_EN;
  	val &= ~GP_MODE_MASK;
-@@ -2676,20 +2668,14 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2837,20 +2829,14 @@ static int mt7531_rgmii_setup(struct mt7
  		case PHY_INTERFACE_MODE_RGMII_ID:
  			break;
  		default:
@@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2697,42 +2683,21 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2858,42 +2844,21 @@ mt7531_mac_config(struct dsa_switch *ds,
  	struct phy_device *phydev;
  	struct dsa_port *dp;
  
@@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static struct phylink_pcs *
-@@ -2761,17 +2726,11 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2922,17 +2887,11 @@ mt753x_phylink_mac_config(struct dsa_swi
  	u32 mcr_cur, mcr_new;
  
  	switch (port) {
@@ -162,7 +162,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  		if (priv->p5_intf_sel != P5_DISABLED)
  			priv->p5_interface = state->interface;
-@@ -2780,16 +2739,10 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2941,16 +2900,10 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p6_interface == state->interface)
  			break;
  
@@ -180,7 +180,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
-@@ -2872,7 +2825,6 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3033,7 +2986,6 @@ mt7531_cpu_port_config(struct dsa_switch
  	struct mt7530_priv *priv = ds->priv;
  	phy_interface_t interface;
  	int speed;
@@ -188,7 +188,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	switch (port) {
  	case 5:
-@@ -2897,9 +2849,8 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3058,9 +3010,8 @@ mt7531_cpu_port_config(struct dsa_switch
  	else
  		speed = SPEED_1000;
  
@@ -202,7 +202,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -750,9 +750,9 @@ struct mt753x_info {
+@@ -755,9 +755,9 @@ struct mt753x_info {
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
  				  phy_interface_t interface,
  				  unsigned long *supported);
diff --git a/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch b/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
index e07a7ee71b..27f29beee1 100644
--- a/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
+++ b/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
@@ -57,8 +57,8 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1002,18 +1002,10 @@ mt753x_trap_frames(struct mt7530_priv *p
- 		   MT753X_BPDU_CPU_ONLY);
+@@ -1163,18 +1163,10 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 			   MT753X_BPDU_CPU_ONLY);
  }
  
 -static int
@@ -77,7 +77,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	/* Enable Mediatek header mode on the cpu port */
  	mt7530_write(priv, MT7530_PVC_P(port),
-@@ -1039,8 +1031,6 @@ mt753x_cpu_port_enable(struct dsa_switch
+@@ -1200,8 +1192,6 @@ mt753x_cpu_port_enable(struct dsa_switch
  	/* Set to fallback mode for independent VLAN learning */
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK,
  		   MT7530_PORT_FALLBACK_MODE);
@@ -86,7 +86,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static int
-@@ -2297,8 +2287,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2458,8 +2448,6 @@ mt7530_setup(struct dsa_switch *ds)
  	val |= MHWTRAP_MANUAL;
  	mt7530_write(priv, MT7530_MHWTRAP, val);
  
@@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mt753x_trap_frames(priv);
  
  	/* Enable and reset MIB counters */
-@@ -2313,9 +2301,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2474,9 +2462,7 @@ mt7530_setup(struct dsa_switch *ds)
  		mt7530_set(priv, MT7530_PSC_P(i), SA_DIS);
  
  		if (dsa_is_cpu_port(ds, i)) {
@@ -106,7 +106,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		} else {
  			mt7530_port_disable(ds, i);
  
-@@ -2419,9 +2405,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2580,9 +2566,7 @@ mt7531_setup_common(struct dsa_switch *d
  		mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR);
  
  		if (dsa_is_cpu_port(ds, i)) {
@@ -117,7 +117,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		} else {
  			mt7530_port_disable(ds, i);
  
-@@ -2510,10 +2494,6 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2671,10 +2655,6 @@ mt7531_setup(struct dsa_switch *ds)
  	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
  		   MT7531_GPIO0_INTERRUPT);
  
@@ -128,7 +128,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	/* Enable PHY core PLL, since phy_device has not yet been created
  	 * provided for phy_[read,write]_mmd_indirect is called, we provide
  	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
-@@ -2725,26 +2705,9 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2886,26 +2866,9 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
@@ -156,7 +156,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
  	mcr_new = mcr_cur;
  	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
-@@ -2780,17 +2743,10 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2941,17 +2904,10 @@ static void mt753x_phylink_mac_link_up(s
  
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
  
@@ -176,7 +176,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		mcr |= PMCR_FORCE_SPEED_1000;
  		break;
  	case SPEED_100:
-@@ -2808,6 +2764,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2969,6 +2925,7 @@ static void mt753x_phylink_mac_link_up(s
  	if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
  		switch (speed) {
  		case SPEED_1000:
@@ -184,7 +184,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  			mcr |= PMCR_FORCE_EEE1G;
  			break;
  		case SPEED_100:
-@@ -2819,61 +2776,6 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2980,61 +2937,6 @@ static void mt753x_phylink_mac_link_up(s
  	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
  }
  
@@ -246,7 +246,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -3132,7 +3034,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3293,7 +3195,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7531_ind_c22_phy_write,
  		.phy_read_c45 = mt7531_ind_c45_phy_read,
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
@@ -254,7 +254,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
-@@ -3144,7 +3045,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3305,7 +3206,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7531_ind_c22_phy_write,
  		.phy_read_c45 = mt7531_ind_c45_phy_read,
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
@@ -264,7 +264,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -331,13 +331,6 @@ enum mt7530_vlan_port_acc_frm {
+@@ -336,13 +336,6 @@ enum mt7530_vlan_port_acc_frm {
  					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
  					 PMCR_FORCE_FDX | PMCR_FORCE_LNK | \
  					 PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100)
@@ -278,7 +278,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  #define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
  #define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
-@@ -744,7 +737,6 @@ struct mt753x_info {
+@@ -749,7 +742,6 @@ struct mt753x_info {
  			    int regnum);
  	int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad,
  			     int regnum, u16 val);
@@ -286,7 +286,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
-@@ -770,7 +762,6 @@ struct mt753x_info {
+@@ -775,7 +767,6 @@ struct mt753x_info {
   * @ports:		Holding the state among ports
   * @reg_mutex:		The lock for protecting among process accessing
   *			registers
@@ -294,7 +294,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
   * @p5_intf_sel:	Holding the current port 5 interface select
   * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
   *			has got SGMII
-@@ -792,8 +783,6 @@ struct mt7530_priv {
+@@ -797,8 +788,6 @@ struct mt7530_priv {
  	const struct mt753x_info *info;
  	unsigned int		id;
  	bool			mcm;
diff --git a/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch b/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
index 95226ace49..97b63b6df5 100644
--- a/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
+++ b/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
@@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2670,16 +2670,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2831,16 +2831,6 @@ mt7531_mac_config(struct dsa_switch *ds,
  	}
  }
  
@@ -35,7 +35,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static struct phylink_pcs *
  mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
  			      phy_interface_t interface)
-@@ -2705,8 +2695,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2866,8 +2856,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
diff --git a/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch b/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
index 44668444cf..c130f2aaca 100644
--- a/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
+++ b/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2848,17 +2848,9 @@ static int
+@@ -3009,17 +3009,9 @@ static int
  mt753x_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	if (ret)
  		return ret;
  
-@@ -2870,6 +2862,14 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3031,6 +3023,14 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch b/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
index 4992230dc5..f07c6bd575 100644
--- a/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
+++ b/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
@@ -24,7 +24,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1054,7 +1054,6 @@ mt7530_port_enable(struct dsa_switch *ds
+@@ -1215,7 +1215,6 @@ mt7530_port_enable(struct dsa_switch *ds
  	priv->ports[port].enable = true;
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
  		   priv->ports[port].pm);
@@ -32,7 +32,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	mutex_unlock(&priv->reg_mutex);
  
-@@ -1074,7 +1073,6 @@ mt7530_port_disable(struct dsa_switch *d
+@@ -1235,7 +1234,6 @@ mt7530_port_disable(struct dsa_switch *d
  	priv->ports[port].enable = false;
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
  		   PCR_MATRIX_CLR);
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	mutex_unlock(&priv->reg_mutex);
  }
-@@ -2293,6 +2291,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2454,6 +2452,12 @@ mt7530_setup(struct dsa_switch *ds)
  	mt7530_mib_reset(ds);
  
  	for (i = 0; i < MT7530_NUM_PORTS; i++) {
@@ -53,7 +53,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		/* Disable forwarding by default on all ports */
  		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
  			   PCR_MATRIX_CLR);
-@@ -2395,6 +2399,12 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2556,6 +2560,12 @@ mt7531_setup_common(struct dsa_switch *d
  		     UNU_FFP_MASK);
  
  	for (i = 0; i < MT7530_NUM_PORTS; i++) {
diff --git a/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch b/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch
index ee5353673c..29536df9b8 100644
--- a/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch
+++ b/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch
@@ -45,7 +45,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2703,23 +2703,13 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2864,23 +2864,13 @@ mt753x_phylink_mac_config(struct dsa_swi
  			  const struct phylink_link_state *state)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -324,8 +324,6 @@ enum mt7530_vlan_port_acc_frm {
+@@ -329,8 +329,6 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch b/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch
index 19a04a7164..9356a54c71 100644
--- a/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch
+++ b/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch
@@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2228,6 +2228,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2389,6 +2389,12 @@ mt7530_setup(struct dsa_switch *ds)
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch b/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
index 57a775da39..b8124cad23 100644
--- a/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
+++ b/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
@@ -53,7 +53,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2274,8 +2274,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2435,8 +2435,6 @@ mt7530_setup(struct dsa_switch *ds)
  		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
  		     SYS_CTRL_REG_RST);
  
@@ -62,7 +62,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	/* Lower Tx driving for TRGMII path */
  	for (i = 0; i < NUM_TRGMII_CTRL; i++)
  		mt7530_write(priv, MT7530_TRGMII_TD_ODT(i),
-@@ -2291,6 +2289,9 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2452,6 +2450,9 @@ mt7530_setup(struct dsa_switch *ds)
  	val |= MHWTRAP_MANUAL;
  	mt7530_write(priv, MT7530_MHWTRAP, val);
  
diff --git a/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch b/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
index f1c4db49dc..6c813ed3ff 100644
--- a/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
+++ b/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
@@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2228,12 +2228,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2389,12 +2389,6 @@ mt7530_setup(struct dsa_switch *ds)
  		}
  	}
  
diff --git a/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch
index 0717c4dc1f..fd22200a84 100644
--- a/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-6.6/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1223,12 +1260,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1225,12 +1262,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch b/target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
index 17f03b48a4..9a4d4a918a 100644
--- a/target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
+++ b/target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
@@ -49,7 +49,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2505,18 +2505,25 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2666,18 +2666,25 @@ mt7531_setup(struct dsa_switch *ds)
  	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
  		   MT7531_GPIO0_INTERRUPT);
  
@@ -82,7 +82,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	/* Setup VLAN ID 0 for VLAN-unaware bridges */
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -616,6 +616,7 @@ enum mt7531_clk_skew {
+@@ -621,6 +621,7 @@ enum mt7531_clk_skew {
  #define  RG_SYSPLL_DDSFBK_EN		BIT(12)
  #define  RG_SYSPLL_BIAS_EN		BIT(11)
  #define  RG_SYSPLL_BIAS_LPF_EN		BIT(10)
diff --git a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch b/target/linux/generic/pending-6.6/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
deleted file mode 100644
index d88060896b..0000000000
--- a/target/linux/generic/pending-6.6/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
+++ /dev/null
@@ -1,483 +0,0 @@
-From b7427d66cb3d6dca5165de5f7d80d59f08c2795b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Tue, 9 Apr 2024 18:01:14 +0300
-Subject: [PATCH 2/2] net: dsa: mt7530: trap link-local frames regardless of ST
- Port State
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer
-(DLL) of the Open Systems Interconnection basic reference model (OSI/RM)
-are described; the medium access control (MAC) and logical link control
-(LLC) sublayers. The MAC sublayer is the one facing the physical layer.
-
-In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A
-Bridge component comprises a MAC Relay Entity for interconnecting the Ports
-of the Bridge, at least two Ports, and higher layer entities with at least
-a Spanning Tree Protocol Entity included.
-
-Each Bridge Port also functions as an end station and shall provide the MAC
-Service to an LLC Entity. Each instance of the MAC Service is provided to a
-distinct LLC Entity that supports protocol identification, multiplexing,
-and demultiplexing, for protocol data unit (PDU) transmission and reception
-by one or more higher layer entities.
-
-It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC
-Entity associated with each Bridge Port is modeled as being directly
-connected to the attached Local Area Network (LAN).
-
-On the switch with CPU port architecture, CPU port functions as Management
-Port, and the Management Port functionality is provided by software which
-functions as an end station. Software is connected to an IEEE 802 LAN that
-is wholly contained within the system that incorporates the Bridge.
-Software provides access to the LLC Entity associated with each Bridge Port
-by the value of the source port field on the special tag on the frame
-received by software.
-
-We call frames that carry control information to determine the active
-topology and current extent of each Virtual Local Area Network (VLAN),
-i.e., spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN
-Registration Protocol Data Units (MVRPDUs), and frames from other link
-constrained protocols, such as Extensible Authentication Protocol over LAN
-(EAPOL) and Link Layer Discovery Protocol (LLDP), link-local frames. They
-are not forwarded by a Bridge. Permanently configured entries in the
-filtering database (FDB) ensure that such frames are discarded by the
-Forwarding Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in
-detail:
-
-Each of the reserved MAC addresses specified in Table 8-1
-(01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be
-permanently configured in the FDB in C-VLAN components and ERs.
-
-Each of the reserved MAC addresses specified in Table 8-2
-(01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently
-configured in the FDB in S-VLAN components.
-
-Each of the reserved MAC addresses specified in Table 8-3
-(01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB
-in TPMR components.
-
-The FDB entries for reserved MAC addresses shall specify filtering for all
-Bridge Ports and all VIDs. Management shall not provide the capability to
-modify or remove entries for reserved MAC addresses.
-
-The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of
-propagation of PDUs within a Bridged Network, as follows:
-
-  The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that
-  no conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN)
-  component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward.
-  PDUs transmitted using this destination address, or any other addresses
-  that appear in Table 8-1, Table 8-2, and Table 8-3
-  (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can
-  therefore travel no further than those stations that can be reached via a
-  single individual LAN from the originating station.
-
-  The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an
-  address that no conformant S-VLAN component, C-VLAN component, or MAC
-  Bridge can forward; however, this address is relayed by a TPMR component.
-  PDUs using this destination address, or any of the other addresses that
-  appear in both Table 8-1 and Table 8-2 but not in Table 8-3
-  (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed
-  by any TPMRs but will propagate no further than the nearest S-VLAN
-  component, C-VLAN component, or MAC Bridge.
-
-  The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an
-  address that no conformant C-VLAN component, MAC Bridge can forward;
-  however, it is relayed by TPMR components and S-VLAN components. PDUs
-  using this destination address, or any of the other addresses that appear
-  in Table 8-1 but not in either Table 8-2 or Table 8-3
-  (01-80-C2-00-00-[00,0B,0C,0D,0F]), will be relayed by TPMR components and
-  S-VLAN components but will propagate no further than the nearest C-VLAN
-  component or MAC Bridge.
-
-Because the LLC Entity associated with each Bridge Port is provided via CPU
-port, we must not filter these frames but forward them to CPU port.
-
-In a Bridge, the transmission Port is majorly decided by ingress and egress
-rules, FDB, and spanning tree Port State functions of the Forwarding
-Process. For link-local frames, only CPU port should be designated as
-destination port in the FDB, and the other functions of the Forwarding
-Process must not interfere with the decision of the transmission Port. We
-call this process trapping frames to CPU port.
-
-Therefore, on the switch with CPU port architecture, link-local frames must
-be trapped to CPU port, and certain link-local frames received by a Port of
-a Bridge comprising a TPMR component or an S-VLAN component must be
-excluded from it.
-
-A Bridge of the switch with CPU port architecture cannot comprise a
-Two-Port MAC Relay (TPMR) component as a TPMR component supports only a
-subset of the functionality of a MAC Bridge. A Bridge comprising two Ports
-(Management Port doesn't count) of this architecture will either function
-as a standard MAC Bridge or a standard VLAN Bridge.
-
-Therefore, a Bridge of this architecture can only comprise S-VLAN
-components, C-VLAN components, or MAC Bridge components. Since there's no
-TPMR component, we don't need to relay PDUs using the destination addresses
-specified on the Nearest non-TPMR section, and the proportion of the
-Nearest Customer Bridge section where they must be relayed by TPMR
-components.
-
-One option to trap link-local frames to CPU port is to add static FDB
-entries with CPU port designated as destination port. However, because that
-Independent VLAN Learning (IVL) is being used on every VID, each entry only
-applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC
-Bridge component or a C-VLAN component, there would have to be 16 times
-4096 entries. This switch intellectual property can only hold a maximum of
-2048 entries. Using this option, there also isn't a mechanism to prevent
-link-local frames from being discarded when the spanning tree Port State of
-the reception Port is discarding.
-
-The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4
-registers. Whilst this applies to every VID, it doesn't contain all of the
-reserved MAC addresses without affecting the remaining Standard Group MAC
-Addresses. The REV_UN frame tag utilised using the RGAC4 register covers
-the remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination
-addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF
-destination addresses which may be relayed by MAC Bridges or VLAN Bridges.
-The latter option provides better but not complete conformance.
-
-This switch intellectual property also does not provide a mechanism to trap
-link-local frames with specific destination addresses to CPU port by
-Bridge, to conform to the filtering rules for the distinct Bridge
-components.
-
-Therefore, regardless of the type of the Bridge component, link-local
-frames with these destination addresses will be trapped to CPU port:
-
-01-80-C2-00-00-[00,01,02,03,0E]
-
-In a Bridge comprising a MAC Bridge component or a C-VLAN component:
-
-  Link-local frames with these destination addresses won't be trapped to
-  CPU port which won't conform to IEEE Std 802.1Q-2022:
-
-  01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F]
-
-In a Bridge comprising an S-VLAN component:
-
-  Link-local frames with these destination addresses will be trapped to CPU
-  port which won't conform to IEEE Std 802.1Q-2022:
-
-  01-80-C2-00-00-00
-
-  Link-local frames with these destination addresses won't be trapped to
-  CPU port which won't conform to IEEE Std 802.1Q-2022:
-
-  01-80-C2-00-00-[04,05,06,07,08,09,0A]
-
-Currently on this switch intellectual property, if the spanning tree Port
-State of the reception Port is discarding, link-local frames will be
-discarded.
-
-To trap link-local frames regardless of the spanning tree Port State, make
-the switch regard them as Bridge Protocol Data Units (BPDUs). This switch
-intellectual property only lets the frames regarded as BPDUs bypass the
-spanning tree Port State function of the Forwarding Process.
-
-With this change, the only remaining interference is the ingress rules.
-When the reception Port has no PVID assigned on software, VLAN-untagged
-frames won't be allowed in. There doesn't seem to be a mechanism on the
-switch intellectual property to have link-local frames bypass this function
-of the Forwarding Process.
-
-Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
-Reviewed-by: Daniel Golle <daniel at makrotopia.org>
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
- drivers/net/dsa/mt7530.c | 229 +++++++++++++++++++++++++++++++++------
- drivers/net/dsa/mt7530.h |   5 +
- 2 files changed, 200 insertions(+), 34 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -950,20 +950,173 @@ static void mt7530_setup_port5(struct ds
- 	mutex_unlock(&priv->reg_mutex);
- }
- 
--/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std
-- * 802.1Q?-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA
-- * must only be propagated to C-VLAN and MAC Bridge components. That means
-- * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
-- * these frames are supposed to be processed by the CPU (software). So we make
-- * the switch only forward them to the CPU port. And if received from a CPU
-- * port, forward to a single port. The software is responsible of making the
-- * switch conform to the latter by setting a single port as destination port on
-- * the special tag.
-- *
-- * This switch intellectual property cannot conform to this part of the standard
-- * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC
-- * DAs, it also includes :22-FF which the scope of propagation is not supposed
-- * to be restricted for these MAC DAs.
-+/* In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer (DLL)
-+ * of the Open Systems Interconnection basic reference model (OSI/RM) are
-+ * described; the medium access control (MAC) and logical link control (LLC)
-+ * sublayers. The MAC sublayer is the one facing the physical layer.
-+ *
-+ * In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A
-+ * Bridge component comprises a MAC Relay Entity for interconnecting the Ports
-+ * of the Bridge, at least two Ports, and higher layer entities with at least a
-+ * Spanning Tree Protocol Entity included.
-+ *
-+ * Each Bridge Port also functions as an end station and shall provide the MAC
-+ * Service to an LLC Entity. Each instance of the MAC Service is provided to a
-+ * distinct LLC Entity that supports protocol identification, multiplexing, and
-+ * demultiplexing, for protocol data unit (PDU) transmission and reception by
-+ * one or more higher layer entities.
-+ *
-+ * It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC
-+ * Entity associated with each Bridge Port is modeled as being directly
-+ * connected to the attached Local Area Network (LAN).
-+ *
-+ * On the switch with CPU port architecture, CPU port functions as Management
-+ * Port, and the Management Port functionality is provided by software which
-+ * functions as an end station. Software is connected to an IEEE 802 LAN that is
-+ * wholly contained within the system that incorporates the Bridge. Software
-+ * provides access to the LLC Entity associated with each Bridge Port by the
-+ * value of the source port field on the special tag on the frame received by
-+ * software.
-+ *
-+ * We call frames that carry control information to determine the active
-+ * topology and current extent of each Virtual Local Area Network (VLAN), i.e.,
-+ * spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN Registration
-+ * Protocol Data Units (MVRPDUs), and frames from other link constrained
-+ * protocols, such as Extensible Authentication Protocol over LAN (EAPOL) and
-+ * Link Layer Discovery Protocol (LLDP), link-local frames. They are not
-+ * forwarded by a Bridge. Permanently configured entries in the filtering
-+ * database (FDB) ensure that such frames are discarded by the Forwarding
-+ * Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in detail:
-+ *
-+ * Each of the reserved MAC addresses specified in Table 8-1
-+ * (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be
-+ * permanently configured in the FDB in C-VLAN components and ERs.
-+ *
-+ * Each of the reserved MAC addresses specified in Table 8-2
-+ * (01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently
-+ * configured in the FDB in S-VLAN components.
-+ *
-+ * Each of the reserved MAC addresses specified in Table 8-3
-+ * (01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB in
-+ * TPMR components.
-+ *
-+ * The FDB entries for reserved MAC addresses shall specify filtering for all
-+ * Bridge Ports and all VIDs. Management shall not provide the capability to
-+ * modify or remove entries for reserved MAC addresses.
-+ *
-+ * The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of
-+ * propagation of PDUs within a Bridged Network, as follows:
-+ *
-+ *   The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that no
-+ *   conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN)
-+ *   component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward.
-+ *   PDUs transmitted using this destination address, or any other addresses
-+ *   that appear in Table 8-1, Table 8-2, and Table 8-3
-+ *   (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can
-+ *   therefore travel no further than those stations that can be reached via a
-+ *   single individual LAN from the originating station.
-+ *
-+ *   The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an
-+ *   address that no conformant S-VLAN component, C-VLAN component, or MAC
-+ *   Bridge can forward; however, this address is relayed by a TPMR component.
-+ *   PDUs using this destination address, or any of the other addresses that
-+ *   appear in both Table 8-1 and Table 8-2 but not in Table 8-3
-+ *   (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed by
-+ *   any TPMRs but will propagate no further than the nearest S-VLAN component,
-+ *   C-VLAN component, or MAC Bridge.
-+ *
-+ *   The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an address
-+ *   that no conformant C-VLAN component, MAC Bridge can forward; however, it is
-+ *   relayed by TPMR components and S-VLAN components. PDUs using this
-+ *   destination address, or any of the other addresses that appear in Table 8-1
-+ *   but not in either Table 8-2 or Table 8-3 (01-80-C2-00-00-[00,0B,0C,0D,0F]),
-+ *   will be relayed by TPMR components and S-VLAN components but will propagate
-+ *   no further than the nearest C-VLAN component or MAC Bridge.
-+ *
-+ * Because the LLC Entity associated with each Bridge Port is provided via CPU
-+ * port, we must not filter these frames but forward them to CPU port.
-+ *
-+ * In a Bridge, the transmission Port is majorly decided by ingress and egress
-+ * rules, FDB, and spanning tree Port State functions of the Forwarding Process.
-+ * For link-local frames, only CPU port should be designated as destination port
-+ * in the FDB, and the other functions of the Forwarding Process must not
-+ * interfere with the decision of the transmission Port. We call this process
-+ * trapping frames to CPU port.
-+ *
-+ * Therefore, on the switch with CPU port architecture, link-local frames must
-+ * be trapped to CPU port, and certain link-local frames received by a Port of a
-+ * Bridge comprising a TPMR component or an S-VLAN component must be excluded
-+ * from it.
-+ *
-+ * A Bridge of the switch with CPU port architecture cannot comprise a Two-Port
-+ * MAC Relay (TPMR) component as a TPMR component supports only a subset of the
-+ * functionality of a MAC Bridge. A Bridge comprising two Ports (Management Port
-+ * doesn't count) of this architecture will either function as a standard MAC
-+ * Bridge or a standard VLAN Bridge.
-+ *
-+ * Therefore, a Bridge of this architecture can only comprise S-VLAN components,
-+ * C-VLAN components, or MAC Bridge components. Since there's no TPMR component,
-+ * we don't need to relay PDUs using the destination addresses specified on the
-+ * Nearest non-TPMR section, and the proportion of the Nearest Customer Bridge
-+ * section where they must be relayed by TPMR components.
-+ *
-+ * One option to trap link-local frames to CPU port is to add static FDB entries
-+ * with CPU port designated as destination port. However, because that
-+ * Independent VLAN Learning (IVL) is being used on every VID, each entry only
-+ * applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC
-+ * Bridge component or a C-VLAN component, there would have to be 16 times 4096
-+ * entries. This switch intellectual property can only hold a maximum of 2048
-+ * entries. Using this option, there also isn't a mechanism to prevent
-+ * link-local frames from being discarded when the spanning tree Port State of
-+ * the reception Port is discarding.
-+ *
-+ * The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4
-+ * registers. Whilst this applies to every VID, it doesn't contain all of the
-+ * reserved MAC addresses without affecting the remaining Standard Group MAC
-+ * Addresses. The REV_UN frame tag utilised using the RGAC4 register covers the
-+ * remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination
-+ * addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF
-+ * destination addresses which may be relayed by MAC Bridges or VLAN Bridges.
-+ * The latter option provides better but not complete conformance.
-+ *
-+ * This switch intellectual property also does not provide a mechanism to trap
-+ * link-local frames with specific destination addresses to CPU port by Bridge,
-+ * to conform to the filtering rules for the distinct Bridge components.
-+ *
-+ * Therefore, regardless of the type of the Bridge component, link-local frames
-+ * with these destination addresses will be trapped to CPU port:
-+ *
-+ * 01-80-C2-00-00-[00,01,02,03,0E]
-+ *
-+ * In a Bridge comprising a MAC Bridge component or a C-VLAN component:
-+ *
-+ *   Link-local frames with these destination addresses won't be trapped to CPU
-+ *   port which won't conform to IEEE Std 802.1Q-2022:
-+ *
-+ *   01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F]
-+ *
-+ * In a Bridge comprising an S-VLAN component:
-+ *
-+ *   Link-local frames with these destination addresses will be trapped to CPU
-+ *   port which won't conform to IEEE Std 802.1Q-2022:
-+ *
-+ *   01-80-C2-00-00-00
-+ *
-+ *   Link-local frames with these destination addresses won't be trapped to CPU
-+ *   port which won't conform to IEEE Std 802.1Q-2022:
-+ *
-+ *   01-80-C2-00-00-[04,05,06,07,08,09,0A]
-+ *
-+ * To trap link-local frames to CPU port as conformant as this switch
-+ * intellectual property can allow, link-local frames are made to be regarded as
-+ * Bridge Protocol Data Units (BPDUs). This is because this switch intellectual
-+ * property only lets the frames regarded as BPDUs bypass the spanning tree Port
-+ * State function of the Forwarding Process.
-+ *
-+ * The only remaining interference is the ingress rules. When the reception Port
-+ * has no PVID assigned on software, VLAN-untagged frames won't be allowed in.
-+ * There doesn't seem to be a mechanism on the switch intellectual property to
-+ * have link-local frames bypass this function of the Forwarding Process.
-  */
- static void
- mt753x_trap_frames(struct mt7530_priv *priv)
-@@ -971,35 +1124,43 @@ mt753x_trap_frames(struct mt7530_priv *p
- 	/* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them
- 	 * VLAN-untagged.
- 	 */
--	mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK |
--		   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
--		   MT753X_BPDU_PORT_FW_MASK,
--		   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
--		   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_BPDU_CPU_ONLY);
-+	mt7530_rmw(priv, MT753X_BPC,
-+		   MT753X_PAE_BPDU_FR | MT753X_PAE_EG_TAG_MASK |
-+			   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
-+			   MT753X_BPDU_PORT_FW_MASK,
-+		   MT753X_PAE_BPDU_FR |
-+			   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+			   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_BPDU_CPU_ONLY);
- 
- 	/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress
- 	 * them VLAN-untagged.
- 	 */
--	mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK |
--		   MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK |
--		   MT753X_R01_PORT_FW_MASK,
--		   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
--		   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_BPDU_CPU_ONLY);
-+	mt7530_rmw(priv, MT753X_RGAC1,
-+		   MT753X_R02_BPDU_FR | MT753X_R02_EG_TAG_MASK |
-+			   MT753X_R02_PORT_FW_MASK | MT753X_R01_BPDU_FR |
-+			   MT753X_R01_EG_TAG_MASK | MT753X_R01_PORT_FW_MASK,
-+		   MT753X_R02_BPDU_FR |
-+			   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+			   MT753X_R01_BPDU_FR |
-+			   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_BPDU_CPU_ONLY);
- 
- 	/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress
- 	 * them VLAN-untagged.
- 	 */
--	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK |
--		   MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK |
--		   MT753X_R03_PORT_FW_MASK,
--		   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
--		   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_BPDU_CPU_ONLY);
-+	mt7530_rmw(priv, MT753X_RGAC2,
-+		   MT753X_R0E_BPDU_FR | MT753X_R0E_EG_TAG_MASK |
-+			   MT753X_R0E_PORT_FW_MASK | MT753X_R03_BPDU_FR |
-+			   MT753X_R03_EG_TAG_MASK | MT753X_R03_PORT_FW_MASK,
-+		   MT753X_R0E_BPDU_FR |
-+			   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+			   MT753X_R03_BPDU_FR |
-+			   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_BPDU_CPU_ONLY);
- }
- 
- static void
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -65,6 +65,7 @@ enum mt753x_id {
- 
- /* Registers for BPDU and PAE frame control*/
- #define MT753X_BPC			0x24
-+#define  MT753X_PAE_BPDU_FR		BIT(25)
- #define  MT753X_PAE_EG_TAG_MASK		GENMASK(24, 22)
- #define  MT753X_PAE_EG_TAG(x)		FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x)
- #define  MT753X_PAE_PORT_FW_MASK	GENMASK(18, 16)
-@@ -75,20 +76,24 @@ enum mt753x_id {
- 
- /* Register for :01 and :02 MAC DA frame control */
- #define MT753X_RGAC1			0x28
-+#define  MT753X_R02_BPDU_FR		BIT(25)
- #define  MT753X_R02_EG_TAG_MASK		GENMASK(24, 22)
- #define  MT753X_R02_EG_TAG(x)		FIELD_PREP(MT753X_R02_EG_TAG_MASK, x)
- #define  MT753X_R02_PORT_FW_MASK	GENMASK(18, 16)
- #define  MT753X_R02_PORT_FW(x)		FIELD_PREP(MT753X_R02_PORT_FW_MASK, x)
-+#define  MT753X_R01_BPDU_FR		BIT(9)
- #define  MT753X_R01_EG_TAG_MASK		GENMASK(8, 6)
- #define  MT753X_R01_EG_TAG(x)		FIELD_PREP(MT753X_R01_EG_TAG_MASK, x)
- #define  MT753X_R01_PORT_FW_MASK	GENMASK(2, 0)
- 
- /* Register for :03 and :0E MAC DA frame control */
- #define MT753X_RGAC2			0x2c
-+#define  MT753X_R0E_BPDU_FR		BIT(25)
- #define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
- #define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
- #define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
- #define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
-+#define  MT753X_R03_BPDU_FR		BIT(9)
- #define  MT753X_R03_EG_TAG_MASK		GENMASK(8, 6)
- #define  MT753X_R03_EG_TAG(x)		FIELD_PREP(MT753X_R03_EG_TAG_MASK, x)
- #define  MT753X_R03_PORT_FW_MASK	GENMASK(2, 0)



From lede-commits at lists.infradead.org  Tue Apr 23 13:41:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 16:41:15 -0400
Subject: [openwrt/openwrt]  bcm53xx: 6.6: fix ASM cache workaround linking
In-Reply-To: <171390487517.1221968.2235353729997745575@git-01.infra.openwrt.org>
References: <171390487517.1221968.2235353729997745575@git-01.infra.openwrt.org>
Message-ID: <mailman.30166.1713904879.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a8befdee43e2119b2697c584a83a008a26650ff6

commit a8befdee43e2119b2697c584a83a008a26650ff6
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Mon Apr 1 19:46:34 2024 +0200

    bcm53xx: 6.6: fix ASM cache workaround linking
    
    Kernel 6.6 checks for orphan sections and prints a warning about them,
    which in turn will make CI fails as we have Werror enabled there.
    
    Issue is that cache-v7-min.S produces .init.text section which is an
    orphan section since it is not being handled by the vmlinux.lds.S linker
    script.
    
    So, lets put the generated .init.text section under .text.
    
    Fixes: f0d8ce4f482c ("bcm53xx: add testing support for kernel 6.6")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch | 10 ++++++++++
 1 file changed, 10 insertions(+)

diff --git a/target/linux/bcm53xx/patches-6.6/300-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch b/target/linux/bcm53xx/patches-6.6/300-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch
index 0247a66ccc..789326310a 100644
--- a/target/linux/bcm53xx/patches-6.6/300-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch
+++ b/target/linux/bcm53xx/patches-6.6/300-ARM-BCM5301X-Disable-MMU-and-Dcache-during-decompres.patch
@@ -99,3 +99,13 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
  	subs	r9, r9, #1			@ decrement the index
  	bge	loop2
  	subs	r4, r4, #1			@ decrement the way
+--- a/arch/arm/boot/compressed/vmlinux.lds.S
++++ b/arch/arm/boot/compressed/vmlinux.lds.S
+@@ -41,6 +41,7 @@ SECTIONS
+     *(.start)
+     *(.text)
+     *(.text.*)
++    *(.init.text)
+     ARM_STUBS_TEXT
+   }
+   .table : ALIGN(4) {



From lede-commits at lists.infradead.org  Tue Apr 23 18:28:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 23 Apr 2024 21:28:21 -0400
Subject: [openwrt/openwrt]  mediatek: mt7988a: sync dts compatible string
In-Reply-To: <171392210178.2168462.12845968026535630735@git-01.infra.openwrt.org>
References: <171392210178.2168462.12845968026535630735@git-01.infra.openwrt.org>
Message-ID: <mailman.30211.1713922119.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9bc08af753295840dd5b2f450a2ecd6ace7e7f14

commit 9bc08af753295840dd5b2f450a2ecd6ace7e7f14
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Apr 23 23:34:30 2024 +0100

    mediatek: mt7988a: sync dts compatible string
    
    Use 'mediatek,mt7988a' instead of 'mediatek,mt7988' as compatible
    string to be in-sync with upstream and no longer break the cpufreq
    driver which was also kept in sync with upstream.
    
    Fixes: 56dd6b473b ("mediatek: sync cpufreq support with changed compatible string")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 2 +-
 .../mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts     | 2 +-
 .../linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a.dtsi  | 2 +-
 .../files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts  | 2 +-
 .../mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts     | 2 +-
 .../linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi  | 2 +-
 6 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index f5c0c7ee2f..deae4378de 100644
--- a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -14,7 +14,7 @@
 / {
 	model = "Bananapi BPI-R4";
 	compatible = "bananapi,bpi-r4",
-		     "mediatek,mt7988";
+		     "mediatek,mt7988a";
 
 	aliases {
 		serial0 = &uart0;
diff --git a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts
index 11dbf98301..5012e7a498 100644
--- a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts
+++ b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts
@@ -13,7 +13,7 @@
 / {
 	model = "MediaTek MT7988A Reference Board";
 	compatible = "mediatek,mt7988a-rfb",
-		     "mediatek,mt7988";
+		     "mediatek,mt7988a";
 
 	chosen {
 		bootargs = "console=ttyS0,115200n1 loglevel=8  \
diff --git a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 52bfed89ee..caad6e5577 100644
--- a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -23,7 +23,7 @@
 #define MT7988_TOPRGU_XFI_PLL_GRST		16
 
 / {
-	compatible = "mediatek,mt7988";
+	compatible = "mediatek,mt7988a";
 	interrupt-parent = <&gic>;
 	#address-cells = <2>;
 	#size-cells = <2>;
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index 416958428f..d72051d187 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -14,7 +14,7 @@
 / {
 	model = "Bananapi BPI-R4";
 	compatible = "bananapi,bpi-r4",
-		     "mediatek,mt7988";
+		     "mediatek,mt7988a";
 
 	aliases {
 		serial0 = &uart0;
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts
index 11dbf98301..5012e7a498 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a-rfb.dts
@@ -13,7 +13,7 @@
 / {
 	model = "MediaTek MT7988A Reference Board";
 	compatible = "mediatek,mt7988a-rfb",
-		     "mediatek,mt7988";
+		     "mediatek,mt7988a";
 
 	chosen {
 		bootargs = "console=ttyS0,115200n1 loglevel=8  \
diff --git a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
index 52bfed89ee..caad6e5577 100644
--- a/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
+++ b/target/linux/mediatek/files-6.6/arch/arm64/boot/dts/mediatek/mt7988a.dtsi
@@ -23,7 +23,7 @@
 #define MT7988_TOPRGU_XFI_PLL_GRST		16
 
 / {
-	compatible = "mediatek,mt7988";
+	compatible = "mediatek,mt7988a";
 	interrupt-parent = <&gic>;
 	#address-cells = <2>;
 	#size-cells = <2>;



From lede-commits at lists.infradead.org  Wed Apr 24 03:15:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 06:15:11 -0400
Subject: [openwrt/openwrt]  scripts: ubinize-image.sh: fix support for static
 volume
In-Reply-To: <171395371107.3954823.16623041228397191915@git-01.infra.openwrt.org>
References: <171395371107.3954823.16623041228397191915@git-01.infra.openwrt.org>
Message-ID: <mailman.30404.1713953717.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/da13ff30efdb921fe22d02334432c578ba95996a

commit da13ff30efdb921fe22d02334432c578ba95996a
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Apr 23 11:39:34 2024 +0100

    scripts: ubinize-image.sh: fix support for static volume
    
    Apart from being misspelled ('dymamic' vs. 'dynamic') and a mismatch of
    the number of parameters, there is also simply no need to add the 'dynamic'
    volume type keyword as 6th parameter as that's the default anyway.
    Fix and simplify the ubinize-image.sh script to work as intended.
    
    Fixes: 6c17d71973 ("scripts: ubinize-image.sh: support static volumes, make size optional")
    Reported-by: Hannu Nyman <hannu.nyman at iki.fi>
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 scripts/ubinize-image.sh | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/scripts/ubinize-image.sh b/scripts/ubinize-image.sh
index 06a6310980..d8b8cd3ae2 100755
--- a/scripts/ubinize-image.sh
+++ b/scripts/ubinize-image.sh
@@ -90,10 +90,10 @@ ubilayout() {
 			rootsize="$( round_up "$( stat -c%s "$2" )" 1024 )"
 			;;
 		esac
-		ubivol $vol_id rootfs "$2" "$autoresize" "$rootsize" dynamic
+		ubivol $vol_id rootfs "$2" "$autoresize" "$rootsize"
 
 		vol_id=$(( vol_id + 1 ))
-		[ "$rootfs_type" = "ubifs" ] || ubivol $vol_id rootfs_data "" 1 dymamic
+		[ "$rootfs_type" = "ubifs" ] || ubivol $vol_id rootfs_data "" 1
 	fi
 }
 



From lede-commits at lists.infradead.org  Wed Apr 24 03:43:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 06:43:54 -0400
Subject: [openwrt/openwrt]  tools/zstd: enable position independent code
 compilation
In-Reply-To: <171395543421.4041757.6969291050143483940@git-01.infra.openwrt.org>
References: <171395543421.4041757.6969291050143483940@git-01.infra.openwrt.org>
Message-ID: <mailman.30421.1713955440.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/98cc65d9a0c4e7beb4b9a8f8482ab8908435290b

commit 98cc65d9a0c4e7beb4b9a8f8482ab8908435290b
Author: Bryan Roessler <bryanroessler at gmail.com>
AuthorDate: Tue Apr 23 21:37:25 2024 -0400

    tools/zstd: enable position independent code compilation
    
    Currently, trying to compile LLVM-BPF will fail with:
    [2225/3517] Linking CXX shared library lib/libLLVM-15.so
    FAILED: lib/libLLVM-15.so
    /usr/bin/ld: staging_dir/host/lib/libzstd.a(zstd_common.o): relocation R_X86_64_32 against `.rodata.str1.1' can not be used when making a shared object; recompile with -fPIC
    /usr/bin/ld: failed to set dynamic section sizes: bad value
    collect2: error: ld returned 1 exit status
    
    So, to fix it enable PIC for the host ZSTD.
    
    Fixes: #15247
    Signed-off-by: Bryan Roessler <bryanroessler at gmail.com>
---
 tools/zstd/Makefile | 2 ++
 1 file changed, 2 insertions(+)

diff --git a/tools/zstd/Makefile b/tools/zstd/Makefile
index f962809f82..e1d36c59cf 100644
--- a/tools/zstd/Makefile
+++ b/tools/zstd/Makefile
@@ -17,6 +17,8 @@ include $(INCLUDE_DIR)/host-build.mk
 
 HOSTCC:= $(HOSTCC_NOCACHE)
 
+HOST_CFLAGS += $(HOST_FPIC)
+
 HOST_MAKE_FLAGS += \
 	BACKTRACE=0 \
 	HAVE_THREAD=1 \



From lede-commits at lists.infradead.org  Wed Apr 24 13:06:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 16:06:32 -0400
Subject: [openwrt/openwrt]  generic: mt7530: move accepted patches to
 backport-6.{1,6}
In-Reply-To: <171398919105.1721309.15692418572139342924@git-01.infra.openwrt.org>
References: <171398919105.1721309.15692418572139342924@git-01.infra.openwrt.org>
Message-ID: <mailman.30608.1713989196.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/70853560f83af2786ed1884e5db8e4214d58e8cf

commit 70853560f83af2786ed1884e5db8e4214d58e8cf
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Apr 23 13:08:02 2024 +0100

    generic: mt7530: move accepted patches to backport-6.{1,6}
    
    Move two accepted patches for the MT7530 DSA driver from pending-6.{1,6}
    to backport-6.{1,6}.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...0-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch} | 0
 ...-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch} | 0
 ...0-31-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch} | 0
 3 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/generic/pending-6.1/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch b/target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
rename to target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
diff --git a/target/linux/generic/pending-6.1/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch b/target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/796-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
rename to target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
diff --git a/target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch b/target/linux/generic/backport-6.6/790-31-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
similarity index 100%
rename from target/linux/generic/pending-6.6/795-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
rename to target/linux/generic/backport-6.6/790-31-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch



From lede-commits at lists.infradead.org  Wed Apr 24 13:06:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 16:06:31 -0400
Subject: [openwrt/openwrt]  mediatek: correct address of MT753x switch IC
In-Reply-To: <171398919105.1721309.15692418572139342924@git-01.infra.openwrt.org>
References: <171398919105.1721309.15692418572139342924@git-01.infra.openwrt.org>
Message-ID: <mailman.30609.1713989196.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8b66f1a06d05afbc1450978f6e20516c8308da25

commit 8b66f1a06d05afbc1450978f6e20516c8308da25
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Apr 23 12:14:07 2024 +0100

    mediatek: correct address of MT753x switch IC
    
    For all boards currently working with the mt7530 DSA driver we can
    be sure that the address of the switch on the MDIO bus is 31 --
    simply because that address is hard-coded in the driver and the
    address from the Device Tree is being ignore.
    
    An upcoming patch will add support for MT753x ICs which are programmed
    to addresses different from 0x1f using bootstrap pins. As a result the
    address from the Device Tree will then be taken into account, which
    will break currently working boards which got the address set to
    anything else than 31.
    
    While at it also unify the syntax in Device Tree to always us a decimal
    value for the 'reg' property.
    
     * mt7622-buffalo-wsr-3200ax4s.dts
       Cosmetic change 'reg = <0x1f>' -> 'reg = <31>'
    
     * mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
       Wrong address: 0 -> 31
    
     * mt7622-elecom-wrc-x3200gst3.dts
       Wrong address: 0 -> 31
    
     * mt7622-linksys-e8450.dtsi
       Wrong address: 0 -> 31
    
     * mt7622-ruijie-rg-ew3200.dtsi
       Wrong address: 0 -> 31
    
     * mt7622-xiaomi-redmi-router-ax6s.dts
       Wrong address: 0 -> 31
    
     * mt7629-iptime-a6004mx.dts
       Wrong address: 2 -> 31
    
     * mt7981b-zbtlink-zbt-z8102ax.dts
       Cosmetic change 'reg = <0x1f>' -> 'reg = <31>'
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts          | 2 +-
 target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi | 4 ++--
 target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts          | 4 ++--
 target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi                | 4 ++--
 target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi             | 4 ++--
 target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts      | 4 ++--
 target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts                | 4 ++--
 target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts          | 2 +-
 8 files changed, 14 insertions(+), 14 deletions(-)

diff --git a/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts b/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
index 678c31b711..82cc970fdd 100644
--- a/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
+++ b/target/linux/mediatek/dts/mt7622-buffalo-wsr-3200ax4s.dts
@@ -39,7 +39,7 @@
 &mdio {
 	switch at 1f {
 		compatible = "mediatek,mt7531";
-		reg = <0x1f>;
+		reg = <31>;
 		reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
 
 		ports {
diff --git a/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi b/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
index 10cee7bcef..0560bbd33e 100644
--- a/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
+++ b/target/linux/mediatek/dts/mt7622-dlink-eagle-pro-ai-ax3200-a1.dtsi
@@ -76,9 +76,9 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		switch: switch at 0 {
+		switch: switch at 1f {
 			compatible = "mediatek,mt7531";
-			reg = <0>;
+			reg = <31>;
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
diff --git a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
index f3a688b2d6..2bf4a33a50 100644
--- a/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
+++ b/target/linux/mediatek/dts/mt7622-elecom-wrc-x3200gst3.dts
@@ -209,9 +209,9 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		switch at 0 {
+		switch at 1f {
 			compatible = "mediatek,mt7531";
-			reg = <0>;
+			reg = <31>;
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
diff --git a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi
index bd686073cb..48b25f7a4a 100644
--- a/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi
+++ b/target/linux/mediatek/dts/mt7622-linksys-e8450.dtsi
@@ -138,9 +138,9 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		switch at 0 {
+		switch at 1f {
 			compatible = "mediatek,mt7531";
-			reg = <0>;
+			reg = <31>;
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
diff --git a/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi b/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi
index a240f9bfce..24ed92788e 100644
--- a/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi
+++ b/target/linux/mediatek/dts/mt7622-ruijie-rg-ew3200.dtsi
@@ -97,9 +97,9 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		switch at 0 {
+		switch at 1f {
 			compatible = "mediatek,mt7531";
-			reg = <0>;
+			reg = <31>;
 			reset-gpios = <&pio 54 GPIO_ACTIVE_HIGH>;
 			interrupt-controller;
 			#interrupt-cells = <2>;
diff --git a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
index c0db31fd3a..ebc8731bc7 100644
--- a/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
+++ b/target/linux/mediatek/dts/mt7622-xiaomi-redmi-router-ax6s.dts
@@ -164,9 +164,9 @@
 		#address-cells = <1>;
 		#size-cells = <0>;
 
-		switch at 0 {
+		switch at 1f {
 			compatible = "mediatek,mt7531";
-			reg = <0>;
+			reg = <31>;
 			interrupt-controller;
 			#interrupt-cells = <1>;
 			interrupt-parent = <&pio>;
diff --git a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts
index 78286714ea..7a3fa4deff 100644
--- a/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts
+++ b/target/linux/mediatek/dts/mt7629-iptime-a6004mx.dts
@@ -127,9 +127,9 @@
 			reg = <0>;
 		};
 
-		switch at 2 {
+		switch at 1f {
 			compatible = "mediatek,mt7531";
-			reg = <2>;
+			reg = <31>;
 			reset-gpios = <&pio 28 0>;
 			interrupt-controller;
 			#interrupt-cells = <1>;
diff --git a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
index de35d15098..f4d5271f97 100644
--- a/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
+++ b/target/linux/mediatek/dts/mt7981b-zbtlink-zbt-z8102ax.dts
@@ -161,7 +161,7 @@
 &mdio_bus {
 	switch: switch at 1f {
 		compatible = "mediatek,mt7531";
-		reg = <0x1f>;
+		reg = <31>;
 		reset-gpios = <&pio 39 GPIO_ACTIVE_HIGH>;
 		interrupt-controller;
 		#interrupt-cells = <1>;



From lede-commits at lists.infradead.org  Wed Apr 24 13:06:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 16:06:34 -0400
Subject: [openwrt/openwrt]  generic: 6.1, 6.6: mt7530: import pending patches
In-Reply-To: <171398919105.1721309.15692418572139342924@git-01.infra.openwrt.org>
References: <171398919105.1721309.15692418572139342924@git-01.infra.openwrt.org>
Message-ID: <mailman.30610.1713989201.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/d40691a5fb9415976bc917d1d96a0a6da99f2dc1

commit d40691a5fb9415976bc917d1d96a0a6da99f2dc1
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Wed Apr 24 02:26:01 2024 +0100

    generic: 6.1, 6.6: mt7530: import pending patches
    
     net: dsa: mt7530: explain exposing MDIO bus of MT7531AE better
     net: dsa: mt7530: do not pass port variable to mt7531_rgmii_setup()
     net: dsa: mt7530: use priv->ds->num_ports instead of MT7530_NUM_PORTS
     net: dsa: mt7530: get rid of mac_port_validate member of mt753x_info
     net: dsa: mt7530: refactor MT7530_PMEEECR_P()
     net: dsa: mt7530: get rid of function sanity check
     net: dsa: mt7530: define MAC speed capabilities per switch model
     net: dsa: mt7530: return mt7530_setup_mdio & mt7531_setup_common on error
     net: dsa: mt7530: move MT753X_MTRAP operations for MT7530
     net: dsa: mt7530: refactor MT7530_HWTRAP and MT7530_MHWTRAP
     net: dsa: mt7530: refactor MT7530_MFC and MT7531_CFC, add MT7531_QRY_FFP
     net: dsa: mt7530: rename mt753x_bpdu_port_fw enum to mt753x_to_cpu_fw
     net: dsa: mt7530: rename p5_intf_sel and use only for MT7530 switch
     net: dsa: mt7530: refactor MT7530_PMCR_P()
     net: dsa: mt7530: disable EEE abilities on failure on MT7531 and MT7988
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...530-disable-EEE-abilities-on-failure-on-M.patch |  88 +++++++
 ...-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch | 200 ++++++++++++++++
 ...530-rename-p5_intf_sel-and-use-only-for-M.patch | 185 +++++++++++++++
 ...530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch | 169 ++++++++++++++
 ...530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch | 201 ++++++++++++++++
 ...530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch | 257 +++++++++++++++++++++
 ...530-move-MT753X_MTRAP-operations-for-MT75.patch | 117 ++++++++++
 ...530-return-mt7530_setup_mdio-mt7531_setup.patch |  39 ++++
 ...530-define-MAC-speed-capabilities-per-swi.patch |  75 ++++++
 ...a-mt7530-get-rid-of-function-sanity-check.patch |  33 +++
 ...-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch |  71 ++++++
 ...530-get-rid-of-mac_port_validate-member-o.patch |  46 ++++
 ...530-use-priv-ds-num_ports-instead-of-MT75.patch |  57 +++++
 ...530-do-not-pass-port-variable-to-mt7531_r.patch |  37 +++
 ...530-explain-exposing-MDIO-bus-of-MT7531AE.patch |  33 +++
 ...530-disable-EEE-abilities-on-failure-on-M.patch |  88 +++++++
 ...-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch | 200 ++++++++++++++++
 ...530-rename-p5_intf_sel-and-use-only-for-M.patch | 185 +++++++++++++++
 ...530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch | 169 ++++++++++++++
 ...530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch | 201 ++++++++++++++++
 ...530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch | 257 +++++++++++++++++++++
 ...530-move-MT753X_MTRAP-operations-for-MT75.patch | 117 ++++++++++
 ...530-return-mt7530_setup_mdio-mt7531_setup.patch |  39 ++++
 ...530-define-MAC-speed-capabilities-per-swi.patch |  75 ++++++
 ...a-mt7530-get-rid-of-function-sanity-check.patch |  33 +++
 ...-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch |  71 ++++++
 ...530-get-rid-of-mac_port_validate-member-o.patch |  48 ++++
 ...530-use-priv-ds-num_ports-instead-of-MT75.patch |  57 +++++
 ...530-do-not-pass-port-variable-to-mt7531_r.patch |  37 +++
 ...530-explain-exposing-MDIO-bus-of-MT7531AE.patch |  33 +++
 30 files changed, 3218 insertions(+)

diff --git a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
new file mode 100644
index 0000000000..44cf60cf14
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
@@ -0,0 +1,88 @@
+From 856e8954a0a88d1a4d2b43e9002b9249131a156f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:08 +0300
+Subject: [PATCH 01/15] net: dsa: mt7530: disable EEE abilities on failure on
+ MT7531 and MT7988
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7531_FORCE_EEE1G and MT7531_FORCE_EEE100 bits let the
+PMCR_FORCE_EEE1G and PMCR_FORCE_EEE100 bits determine the 1G/100 EEE
+abilities of the MAC. If MT7531_FORCE_EEE1G and MT7531_FORCE_EEE100 are
+unset, the abilities are left to be determined by PHY auto polling.
+
+The commit 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
+made it so that the PMCR_FORCE_EEE1G and PMCR_FORCE_EEE100 bits are set on
+mt753x_phylink_mac_link_up(). But it did not set the MT7531_FORCE_EEE1G and
+MT7531_FORCE_EEE100 bits. Because of this, the EEE abilities will be
+determined by PHY auto polling, regardless of the result of phy_init_eee().
+
+Define these bits and add them to the MT7531_FORCE_MODE mask which is set
+in mt7531_setup_common(). With this, there won't be any EEE abilities set
+when phy_init_eee() returns a negative value.
+
+Thanks to Russell for explaining when phy_init_eee() could return a
+negative value below.
+
+Looking at phy_init_eee(), it could return a negative value when:
+
+1. phydev->drv is NULL
+2. if genphy_c45_eee_is_active() returns negative
+3. if genphy_c45_eee_is_active() returns zero, it returns -EPROTONOSUPPORT
+4. if phy_set_bits_mmd() fails (e.g. communication error with the PHY)
+
+If we then look at genphy_c45_eee_is_active(), then:
+
+genphy_c45_read_eee_adv() and genphy_c45_read_eee_lpa() propagate their
+non-zero return values, otherwise this function returns zero or positive
+integer.
+
+If we then look at genphy_c45_read_eee_adv(), then a failure of
+phy_read_mmd() would cause a negative value to be returned.
+
+Looking at genphy_c45_read_eee_lpa(), the same is true.
+
+So, it can be summarised as:
+
+- phydev->drv is NULL
+- there is a communication error accessing the PHY
+- EEE is not active
+
+otherwise, it returns zero on success.
+
+If one wishes to determine whether an error occurred vs EEE not being
+supported through negotiation for the negotiated speed, if it returns
+-EPROTONOSUPPORT in the latter case. Other error codes mean either the
+driver has been unloaded or communication error.
+
+In conclusion, determining the EEE abilities by PHY auto polling shouldn't
+result in having any EEE abilities enabled, when one of the last two
+situations in the summary happens. And it seems that if phydev->drv is
+NULL, there would be bigger problems with the device than a broken link. So
+this is not a bugfix.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -328,11 +328,15 @@ enum mt7530_vlan_port_acc_frm {
+ #define  MT7531_FORCE_DPX		BIT(29)
+ #define  MT7531_FORCE_RX_FC		BIT(28)
+ #define  MT7531_FORCE_TX_FC		BIT(27)
++#define  MT7531_FORCE_EEE100		BIT(26)
++#define  MT7531_FORCE_EEE1G		BIT(25)
+ #define  MT7531_FORCE_MODE		(MT7531_FORCE_LNK | \
+ 					 MT7531_FORCE_SPD | \
+ 					 MT7531_FORCE_DPX | \
+ 					 MT7531_FORCE_RX_FC | \
+-					 MT7531_FORCE_TX_FC)
++					 MT7531_FORCE_TX_FC | \
++					 MT7531_FORCE_EEE100 | \
++					 MT7531_FORCE_EEE1G)
+ #define  PMCR_LINK_SETTINGS_MASK	(PMCR_TX_EN | PMCR_FORCE_SPEED_1000 | \
+ 					 PMCR_RX_EN | PMCR_FORCE_SPEED_100 | \
+ 					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
diff --git a/target/linux/generic/pending-6.1/795-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch b/target/linux/generic/pending-6.1/795-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
new file mode 100644
index 0000000000..3cbd62e929
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
@@ -0,0 +1,200 @@
+From 712ad00d2f43814c81a7abfcbc339690a05fb6a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:09 +0300
+Subject: [PATCH 02/15] net: dsa: mt7530: refactor MT7530_PMCR_P()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530_PMCR_P() registers are on MT7530, MT7531, and the switch on the
+MT7988 SoC. Rename the definition for them to MT753X_PMCR_P(). Bit 15 is
+for MT7530 only. Add MT7530 prefix to the definition for bit 15.
+
+Use GENMASK and FIELD_PREP for PMCR_IFG_XMIT().
+
+Rename PMCR_TX_EN and PMCR_RX_EN to PMCR_MAC_TX_EN and PMCR_MAC_TX_EN to
+follow the naming on the "MT7621 Giga Switch Programming Guide v0.3",
+"MT7531 Reference Manual for Development Board v1.0", and "MT7988A Wi-Fi 7
+Generation Router Platform: Datasheet (Open Version) v0.1" documents.
+
+These documents show that PMCR_RX_FC_EN is at bit 5. Correct this along
+with renaming it to PMCR_FORCE_RX_FC_EN, and the same for PMCR_TX_FC_EN.
+
+Remove PMCR_SPEED_MASK which doesn't have a use.
+
+Rename the force mode definitions for MT7531 to FORCE_MODE. Add MASK at the
+end for the mask that includes all force mode definitions.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 24 ++++++++---------
+ drivers/net/dsa/mt7530.h | 58 +++++++++++++++++++++-------------------
+ 2 files changed, 42 insertions(+), 40 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -889,7 +889,7 @@ static void mt7530_setup_port5(struct ds
+ 		val &= ~MHWTRAP_P5_MAC_SEL & ~MHWTRAP_P5_DIS;
+ 
+ 		/* Setup the MAC by default for the cpu port */
+-		mt7530_write(priv, MT7530_PMCR_P(5), 0x56300);
++		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+ 		break;
+ 	case P5_INTF_SEL_GMAC5:
+ 		/* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */
+@@ -2435,8 +2435,8 @@ mt7530_setup(struct dsa_switch *ds)
+ 		/* Clear link settings and enable force mode to force link down
+ 		 * on all ports until they're enabled later.
+ 		 */
+-		mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
+-			   PMCR_FORCE_MODE, PMCR_FORCE_MODE);
++		mt7530_rmw(priv, MT753X_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
++			   MT7530_FORCE_MODE, MT7530_FORCE_MODE);
+ 
+ 		/* Disable forwarding by default on all ports */
+ 		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
+@@ -2546,8 +2546,8 @@ mt7531_setup_common(struct dsa_switch *d
+ 		/* Clear link settings and enable force mode to force link down
+ 		 * on all ports until they're enabled later.
+ 		 */
+-		mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
+-			   MT7531_FORCE_MODE, MT7531_FORCE_MODE);
++		mt7530_rmw(priv, MT753X_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
++			   MT7531_FORCE_MODE_MASK, MT7531_FORCE_MODE_MASK);
+ 
+ 		/* Disable forwarding by default on all ports */
+ 		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
+@@ -2630,7 +2630,7 @@ mt7531_setup(struct dsa_switch *ds)
+ 
+ 	/* Force link down on all ports before internal reset */
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++)
+-		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
++		mt7530_write(priv, MT753X_PMCR_P(i), MT7531_FORCE_MODE_LNK);
+ 
+ 	/* Reset the switch through internal reset */
+ 	mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_SW_RST | SYS_CTRL_REG_RST);
+@@ -2872,7 +2872,7 @@ mt753x_phylink_mac_config(struct phylink
+ 
+ 	/* Are we connected to external phy */
+ 	if (port == 5 && dsa_is_user_port(ds, 5))
+-		mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY);
++		mt7530_set(priv, MT753X_PMCR_P(port), PMCR_EXT_PHY);
+ }
+ 
+ static void mt753x_phylink_mac_link_down(struct phylink_config *config,
+@@ -2882,7 +2882,7 @@ static void mt753x_phylink_mac_link_down
+ 	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct mt7530_priv *priv = dp->ds->priv;
+ 
+-	mt7530_clear(priv, MT7530_PMCR_P(dp->index), PMCR_LINK_SETTINGS_MASK);
++	mt7530_clear(priv, MT753X_PMCR_P(dp->index), PMCR_LINK_SETTINGS_MASK);
+ }
+ 
+ static void mt753x_phylink_mac_link_up(struct phylink_config *config,
+@@ -2896,7 +2896,7 @@ static void mt753x_phylink_mac_link_up(s
+ 	struct mt7530_priv *priv = dp->ds->priv;
+ 	u32 mcr;
+ 
+-	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
++	mcr = PMCR_MAC_RX_EN | PMCR_MAC_TX_EN | PMCR_FORCE_LNK;
+ 
+ 	switch (speed) {
+ 	case SPEED_1000:
+@@ -2911,9 +2911,9 @@ static void mt753x_phylink_mac_link_up(s
+ 	if (duplex == DUPLEX_FULL) {
+ 		mcr |= PMCR_FORCE_FDX;
+ 		if (tx_pause)
+-			mcr |= PMCR_TX_FC_EN;
++			mcr |= PMCR_FORCE_TX_FC_EN;
+ 		if (rx_pause)
+-			mcr |= PMCR_RX_FC_EN;
++			mcr |= PMCR_FORCE_RX_FC_EN;
+ 	}
+ 
+ 	if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
+@@ -2928,7 +2928,7 @@ static void mt753x_phylink_mac_link_up(s
+ 		}
+ 	}
+ 
+-	mt7530_set(priv, MT7530_PMCR_P(dp->index), mcr);
++	mt7530_set(priv, MT753X_PMCR_P(dp->index), mcr);
+ }
+ 
+ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -304,44 +304,46 @@ enum mt7530_vlan_port_acc_frm {
+ #define  G0_PORT_VID_DEF		G0_PORT_VID(0)
+ 
+ /* Register for port MAC control register */
+-#define MT7530_PMCR_P(x)		(0x3000 + ((x) * 0x100))
+-#define  PMCR_IFG_XMIT(x)		(((x) & 0x3) << 18)
++#define MT753X_PMCR_P(x)		(0x3000 + ((x) * 0x100))
++#define  PMCR_IFG_XMIT_MASK		GENMASK(19, 18)
++#define  PMCR_IFG_XMIT(x)		FIELD_PREP(PMCR_IFG_XMIT_MASK, x)
+ #define  PMCR_EXT_PHY			BIT(17)
+ #define  PMCR_MAC_MODE			BIT(16)
+-#define  PMCR_FORCE_MODE		BIT(15)
+-#define  PMCR_TX_EN			BIT(14)
+-#define  PMCR_RX_EN			BIT(13)
++#define  MT7530_FORCE_MODE		BIT(15)
++#define  PMCR_MAC_TX_EN			BIT(14)
++#define  PMCR_MAC_RX_EN			BIT(13)
+ #define  PMCR_BACKOFF_EN		BIT(9)
+ #define  PMCR_BACKPR_EN			BIT(8)
+ #define  PMCR_FORCE_EEE1G		BIT(7)
+ #define  PMCR_FORCE_EEE100		BIT(6)
+-#define  PMCR_TX_FC_EN			BIT(5)
+-#define  PMCR_RX_FC_EN			BIT(4)
++#define  PMCR_FORCE_RX_FC_EN		BIT(5)
++#define  PMCR_FORCE_TX_FC_EN		BIT(4)
+ #define  PMCR_FORCE_SPEED_1000		BIT(3)
+ #define  PMCR_FORCE_SPEED_100		BIT(2)
+ #define  PMCR_FORCE_FDX			BIT(1)
+ #define  PMCR_FORCE_LNK			BIT(0)
+-#define  PMCR_SPEED_MASK		(PMCR_FORCE_SPEED_100 | \
+-					 PMCR_FORCE_SPEED_1000)
+-#define  MT7531_FORCE_LNK		BIT(31)
+-#define  MT7531_FORCE_SPD		BIT(30)
+-#define  MT7531_FORCE_DPX		BIT(29)
+-#define  MT7531_FORCE_RX_FC		BIT(28)
+-#define  MT7531_FORCE_TX_FC		BIT(27)
+-#define  MT7531_FORCE_EEE100		BIT(26)
+-#define  MT7531_FORCE_EEE1G		BIT(25)
+-#define  MT7531_FORCE_MODE		(MT7531_FORCE_LNK | \
+-					 MT7531_FORCE_SPD | \
+-					 MT7531_FORCE_DPX | \
+-					 MT7531_FORCE_RX_FC | \
+-					 MT7531_FORCE_TX_FC | \
+-					 MT7531_FORCE_EEE100 | \
+-					 MT7531_FORCE_EEE1G)
+-#define  PMCR_LINK_SETTINGS_MASK	(PMCR_TX_EN | PMCR_FORCE_SPEED_1000 | \
+-					 PMCR_RX_EN | PMCR_FORCE_SPEED_100 | \
+-					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
+-					 PMCR_FORCE_FDX | PMCR_FORCE_LNK | \
+-					 PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100)
++#define  MT7531_FORCE_MODE_LNK		BIT(31)
++#define  MT7531_FORCE_MODE_SPD		BIT(30)
++#define  MT7531_FORCE_MODE_DPX		BIT(29)
++#define  MT7531_FORCE_MODE_RX_FC	BIT(28)
++#define  MT7531_FORCE_MODE_TX_FC	BIT(27)
++#define  MT7531_FORCE_MODE_EEE100	BIT(26)
++#define  MT7531_FORCE_MODE_EEE1G	BIT(25)
++#define  MT7531_FORCE_MODE_MASK		(MT7531_FORCE_MODE_LNK | \
++					 MT7531_FORCE_MODE_SPD | \
++					 MT7531_FORCE_MODE_DPX | \
++					 MT7531_FORCE_MODE_RX_FC | \
++					 MT7531_FORCE_MODE_TX_FC | \
++					 MT7531_FORCE_MODE_EEE100 | \
++					 MT7531_FORCE_MODE_EEE1G)
++#define  PMCR_LINK_SETTINGS_MASK	(PMCR_MAC_TX_EN | PMCR_MAC_RX_EN | \
++					 PMCR_FORCE_EEE1G | \
++					 PMCR_FORCE_EEE100 | \
++					 PMCR_FORCE_RX_FC_EN | \
++					 PMCR_FORCE_TX_FC_EN | \
++					 PMCR_FORCE_SPEED_1000 | \
++					 PMCR_FORCE_SPEED_100 | \
++					 PMCR_FORCE_FDX | PMCR_FORCE_LNK)
+ 
+ #define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
+ #define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
diff --git a/target/linux/generic/pending-6.1/795-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch b/target/linux/generic/pending-6.1/795-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
new file mode 100644
index 0000000000..9697e7eb4f
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
@@ -0,0 +1,185 @@
+From 875ec5b67ab88e969b171e6e9ea803e3ed759614 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:10 +0300
+Subject: [PATCH 03/15] net: dsa: mt7530: rename p5_intf_sel and use only for
+ MT7530 switch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The p5_intf_sel pointer is used to store the information of whether PHY
+muxing is used or not. PHY muxing is a feature specific to port 5 of the
+MT7530 switch. Do not use it for other switch models.
+
+Rename the pointer to p5_mode to store the mode the port is being used in.
+Rename the p5_interface_select enum to mt7530_p5_mode, the string
+representation to mt7530_p5_mode_str, and the enum elements.
+
+If PHY muxing is not detected, the default mode, GMAC5, will be used.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 62 +++++++++++++++++-----------------------
+ drivers/net/dsa/mt7530.h | 15 +++++-----
+ 2 files changed, 33 insertions(+), 44 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -850,19 +850,15 @@ mt7530_set_ageing_time(struct dsa_switch
+ 	return 0;
+ }
+ 
+-static const char *p5_intf_modes(unsigned int p5_interface)
++static const char *mt7530_p5_mode_str(unsigned int mode)
+ {
+-	switch (p5_interface) {
+-	case P5_DISABLED:
+-		return "DISABLED";
+-	case P5_INTF_SEL_PHY_P0:
+-		return "PHY P0";
+-	case P5_INTF_SEL_PHY_P4:
+-		return "PHY P4";
+-	case P5_INTF_SEL_GMAC5:
+-		return "GMAC5";
++	switch (mode) {
++	case MUX_PHY_P0:
++		return "MUX PHY P0";
++	case MUX_PHY_P4:
++		return "MUX PHY P4";
+ 	default:
+-		return "unknown";
++		return "GMAC5";
+ 	}
+ }
+ 
+@@ -879,23 +875,23 @@ static void mt7530_setup_port5(struct ds
+ 	val |= MHWTRAP_MANUAL | MHWTRAP_P5_MAC_SEL | MHWTRAP_P5_DIS;
+ 	val &= ~MHWTRAP_P5_RGMII_MODE & ~MHWTRAP_PHY0_SEL;
+ 
+-	switch (priv->p5_intf_sel) {
+-	case P5_INTF_SEL_PHY_P0:
+-		/* MT7530_P5_MODE_GPHY_P0: 2nd GMAC -> P5 -> P0 */
++	switch (priv->p5_mode) {
++	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
++	case MUX_PHY_P0:
+ 		val |= MHWTRAP_PHY0_SEL;
+ 		fallthrough;
+-	case P5_INTF_SEL_PHY_P4:
+-		/* MT7530_P5_MODE_GPHY_P4: 2nd GMAC -> P5 -> P4 */
++
++	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
++	case MUX_PHY_P4:
+ 		val &= ~MHWTRAP_P5_MAC_SEL & ~MHWTRAP_P5_DIS;
+ 
+ 		/* Setup the MAC by default for the cpu port */
+ 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+ 		break;
+-	case P5_INTF_SEL_GMAC5:
+-		/* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */
+-		val &= ~MHWTRAP_P5_DIS;
+-		break;
++
++	/* GMAC5: P5 -> SoC MAC or external PHY */
+ 	default:
++		val &= ~MHWTRAP_P5_DIS;
+ 		break;
+ 	}
+ 
+@@ -923,8 +919,8 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	mt7530_write(priv, MT7530_MHWTRAP, val);
+ 
+-	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n",
+-		val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface));
++	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, mode=%s, phy-mode=%s\n", val,
++		mt7530_p5_mode_str(priv->p5_mode), phy_modes(interface));
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+@@ -2467,13 +2463,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 	if (ret)
+ 		return ret;
+ 
+-	/* Setup port 5 */
+-	if (!dsa_is_unused_port(ds, 5)) {
+-		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+-	} else {
++	/* Check for PHY muxing on port 5 */
++	if (dsa_is_unused_port(ds, 5)) {
+ 		/* Scan the ethernet nodes. Look for GMAC1, lookup the used PHY.
+-		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
+-		 * is detected.
++		 * Set priv->p5_mode to the appropriate value if PHY muxing is
++		 * detected.
+ 		 */
+ 		for_each_child_of_node(dn, mac_np) {
+ 			if (!of_device_is_compatible(mac_np,
+@@ -2497,17 +2491,16 @@ mt7530_setup(struct dsa_switch *ds)
+ 				}
+ 				id = of_mdio_parse_addr(ds->dev, phy_node);
+ 				if (id == 0)
+-					priv->p5_intf_sel = P5_INTF_SEL_PHY_P0;
++					priv->p5_mode = MUX_PHY_P0;
+ 				if (id == 4)
+-					priv->p5_intf_sel = P5_INTF_SEL_PHY_P4;
++					priv->p5_mode = MUX_PHY_P4;
+ 			}
+ 			of_node_put(mac_np);
+ 			of_node_put(phy_node);
+ 			break;
+ 		}
+ 
+-		if (priv->p5_intf_sel == P5_INTF_SEL_PHY_P0 ||
+-		    priv->p5_intf_sel == P5_INTF_SEL_PHY_P4)
++		if (priv->p5_mode == MUX_PHY_P0 || priv->p5_mode == MUX_PHY_P4)
+ 			mt7530_setup_port5(ds, interface);
+ 	}
+ 
+@@ -2645,9 +2638,6 @@ mt7531_setup(struct dsa_switch *ds)
+ 			   MT7531_EXT_P_MDIO_12);
+ 	}
+ 
+-	if (!dsa_is_unused_port(ds, 5))
+-		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+-
+ 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
+ 		   MT7531_GPIO0_INTERRUPT);
+ 
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -708,12 +708,11 @@ struct mt7530_port {
+ 	struct phylink_pcs *sgmii_pcs;
+ };
+ 
+-/* Port 5 interface select definitions */
+-enum p5_interface_select {
+-	P5_DISABLED,
+-	P5_INTF_SEL_PHY_P0,
+-	P5_INTF_SEL_PHY_P4,
+-	P5_INTF_SEL_GMAC5,
++/* Port 5 mode definitions of the MT7530 switch */
++enum mt7530_p5_mode {
++	GMAC5,
++	MUX_PHY_P0,
++	MUX_PHY_P4,
+ };
+ 
+ struct mt7530_priv;
+@@ -769,7 +768,7 @@ struct mt753x_info {
+  * @ports:		Holding the state among ports
+  * @reg_mutex:		The lock for protecting among process accessing
+  *			registers
+- * @p5_intf_sel:	Holding the current port 5 interface select
++ * @p5_mode:		Holding the current mode of port 5 of the MT7530 switch
+  * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
+  *			has got SGMII
+  * @irq:		IRQ number of the switch
+@@ -791,7 +790,7 @@ struct mt7530_priv {
+ 	const struct mt753x_info *info;
+ 	unsigned int		id;
+ 	bool			mcm;
+-	enum p5_interface_select p5_intf_sel;
++	enum mt7530_p5_mode	p5_mode;
+ 	bool			p5_sgmii;
+ 	u8			mirror_rx;
+ 	u8			mirror_tx;
diff --git a/target/linux/generic/pending-6.1/795-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch b/target/linux/generic/pending-6.1/795-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
new file mode 100644
index 0000000000..77a2df8586
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
@@ -0,0 +1,169 @@
+From 83fe3df057e641cd0e88425e579d7a5a370ca430 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:11 +0300
+Subject: [PATCH 04/15] net: dsa: mt7530: rename mt753x_bpdu_port_fw enum to
+ mt753x_to_cpu_fw
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The mt753x_bpdu_port_fw enum is globally used for manipulating the process
+of deciding the forwardable ports, specifically concerning the CPU port(s).
+Therefore, rename it and the values in it to mt753x_to_cpu_fw.
+
+Change FOLLOW_MFC to SYSTEM_DEFAULT to be on par with the switch documents.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 44 ++++++++++-------------
+ drivers/net/dsa/mt7530.h | 76 ++++++++++++++++++++--------------------
+ 2 files changed, 56 insertions(+), 64 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1100,42 +1100,34 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 	 * VLAN-untagged.
+ 	 */
+ 	mt7530_rmw(priv, MT753X_BPC,
+-		   MT753X_PAE_BPDU_FR | MT753X_PAE_EG_TAG_MASK |
+-			   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
+-			   MT753X_BPDU_PORT_FW_MASK,
+-		   MT753X_PAE_BPDU_FR |
+-			   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-			   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_BPDU_CPU_ONLY);
++		   PAE_BPDU_FR | PAE_EG_TAG_MASK | PAE_PORT_FW_MASK |
++			   BPDU_EG_TAG_MASK | BPDU_PORT_FW_MASK,
++		   PAE_BPDU_FR | PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   PAE_PORT_FW(TO_CPU_FW_CPU_ONLY) |
++			   BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   TO_CPU_FW_CPU_ONLY);
+ 
+ 	/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress
+ 	 * them VLAN-untagged.
+ 	 */
+ 	mt7530_rmw(priv, MT753X_RGAC1,
+-		   MT753X_R02_BPDU_FR | MT753X_R02_EG_TAG_MASK |
+-			   MT753X_R02_PORT_FW_MASK | MT753X_R01_BPDU_FR |
+-			   MT753X_R01_EG_TAG_MASK | MT753X_R01_PORT_FW_MASK,
+-		   MT753X_R02_BPDU_FR |
+-			   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-			   MT753X_R01_BPDU_FR |
+-			   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_BPDU_CPU_ONLY);
++		   R02_BPDU_FR | R02_EG_TAG_MASK | R02_PORT_FW_MASK |
++			   R01_BPDU_FR | R01_EG_TAG_MASK | R01_PORT_FW_MASK,
++		   R02_BPDU_FR | R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   R02_PORT_FW(TO_CPU_FW_CPU_ONLY) | R01_BPDU_FR |
++			   R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   TO_CPU_FW_CPU_ONLY);
+ 
+ 	/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress
+ 	 * them VLAN-untagged.
+ 	 */
+ 	mt7530_rmw(priv, MT753X_RGAC2,
+-		   MT753X_R0E_BPDU_FR | MT753X_R0E_EG_TAG_MASK |
+-			   MT753X_R0E_PORT_FW_MASK | MT753X_R03_BPDU_FR |
+-			   MT753X_R03_EG_TAG_MASK | MT753X_R03_PORT_FW_MASK,
+-		   MT753X_R0E_BPDU_FR |
+-			   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-			   MT753X_R03_BPDU_FR |
+-			   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_BPDU_CPU_ONLY);
++		   R0E_BPDU_FR | R0E_EG_TAG_MASK | R0E_PORT_FW_MASK |
++			   R03_BPDU_FR | R03_EG_TAG_MASK | R03_PORT_FW_MASK,
++		   R0E_BPDU_FR | R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   R0E_PORT_FW(TO_CPU_FW_CPU_ONLY) | R03_BPDU_FR |
++			   R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   TO_CPU_FW_CPU_ONLY);
+ }
+ 
+ static void
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -67,47 +67,47 @@ enum mt753x_id {
+ #define MT753X_MIRROR_MASK(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+ 					 MT7531_MIRROR_MASK : MIRROR_MASK)
+ 
+-/* Registers for BPDU and PAE frame control*/
++/* Register for BPDU and PAE frame control */
+ #define MT753X_BPC			0x24
+-#define  MT753X_PAE_BPDU_FR		BIT(25)
+-#define  MT753X_PAE_EG_TAG_MASK		GENMASK(24, 22)
+-#define  MT753X_PAE_EG_TAG(x)		FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x)
+-#define  MT753X_PAE_PORT_FW_MASK	GENMASK(18, 16)
+-#define  MT753X_PAE_PORT_FW(x)		FIELD_PREP(MT753X_PAE_PORT_FW_MASK, x)
+-#define  MT753X_BPDU_EG_TAG_MASK	GENMASK(8, 6)
+-#define  MT753X_BPDU_EG_TAG(x)		FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x)
+-#define  MT753X_BPDU_PORT_FW_MASK	GENMASK(2, 0)
++#define  PAE_BPDU_FR			BIT(25)
++#define  PAE_EG_TAG_MASK		GENMASK(24, 22)
++#define  PAE_EG_TAG(x)			FIELD_PREP(PAE_EG_TAG_MASK, x)
++#define  PAE_PORT_FW_MASK		GENMASK(18, 16)
++#define  PAE_PORT_FW(x)			FIELD_PREP(PAE_PORT_FW_MASK, x)
++#define  BPDU_EG_TAG_MASK		GENMASK(8, 6)
++#define  BPDU_EG_TAG(x)			FIELD_PREP(BPDU_EG_TAG_MASK, x)
++#define  BPDU_PORT_FW_MASK		GENMASK(2, 0)
+ 
+-/* Register for :01 and :02 MAC DA frame control */
++/* Register for 01-80-C2-00-00-[01,02] MAC DA frame control */
+ #define MT753X_RGAC1			0x28
+-#define  MT753X_R02_BPDU_FR		BIT(25)
+-#define  MT753X_R02_EG_TAG_MASK		GENMASK(24, 22)
+-#define  MT753X_R02_EG_TAG(x)		FIELD_PREP(MT753X_R02_EG_TAG_MASK, x)
+-#define  MT753X_R02_PORT_FW_MASK	GENMASK(18, 16)
+-#define  MT753X_R02_PORT_FW(x)		FIELD_PREP(MT753X_R02_PORT_FW_MASK, x)
+-#define  MT753X_R01_BPDU_FR		BIT(9)
+-#define  MT753X_R01_EG_TAG_MASK		GENMASK(8, 6)
+-#define  MT753X_R01_EG_TAG(x)		FIELD_PREP(MT753X_R01_EG_TAG_MASK, x)
+-#define  MT753X_R01_PORT_FW_MASK	GENMASK(2, 0)
++#define  R02_BPDU_FR			BIT(25)
++#define  R02_EG_TAG_MASK		GENMASK(24, 22)
++#define  R02_EG_TAG(x)			FIELD_PREP(R02_EG_TAG_MASK, x)
++#define  R02_PORT_FW_MASK		GENMASK(18, 16)
++#define  R02_PORT_FW(x)			FIELD_PREP(R02_PORT_FW_MASK, x)
++#define  R01_BPDU_FR			BIT(9)
++#define  R01_EG_TAG_MASK		GENMASK(8, 6)
++#define  R01_EG_TAG(x)			FIELD_PREP(R01_EG_TAG_MASK, x)
++#define  R01_PORT_FW_MASK		GENMASK(2, 0)
+ 
+-/* Register for :03 and :0E MAC DA frame control */
++/* Register for 01-80-C2-00-00-[03,0E] MAC DA frame control */
+ #define MT753X_RGAC2			0x2c
+-#define  MT753X_R0E_BPDU_FR		BIT(25)
+-#define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
+-#define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
+-#define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
+-#define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
+-#define  MT753X_R03_BPDU_FR		BIT(9)
+-#define  MT753X_R03_EG_TAG_MASK		GENMASK(8, 6)
+-#define  MT753X_R03_EG_TAG(x)		FIELD_PREP(MT753X_R03_EG_TAG_MASK, x)
+-#define  MT753X_R03_PORT_FW_MASK	GENMASK(2, 0)
++#define  R0E_BPDU_FR			BIT(25)
++#define  R0E_EG_TAG_MASK		GENMASK(24, 22)
++#define  R0E_EG_TAG(x)			FIELD_PREP(R0E_EG_TAG_MASK, x)
++#define  R0E_PORT_FW_MASK		GENMASK(18, 16)
++#define  R0E_PORT_FW(x)			FIELD_PREP(R0E_PORT_FW_MASK, x)
++#define  R03_BPDU_FR			BIT(9)
++#define  R03_EG_TAG_MASK		GENMASK(8, 6)
++#define  R03_EG_TAG(x)			FIELD_PREP(R03_EG_TAG_MASK, x)
++#define  R03_PORT_FW_MASK		GENMASK(2, 0)
+ 
+-enum mt753x_bpdu_port_fw {
+-	MT753X_BPDU_FOLLOW_MFC,
+-	MT753X_BPDU_CPU_EXCLUDE = 4,
+-	MT753X_BPDU_CPU_INCLUDE = 5,
+-	MT753X_BPDU_CPU_ONLY = 6,
+-	MT753X_BPDU_DROP = 7,
++enum mt753x_to_cpu_fw {
++	TO_CPU_FW_SYSTEM_DEFAULT,
++	TO_CPU_FW_CPU_EXCLUDE = 4,
++	TO_CPU_FW_CPU_INCLUDE = 5,
++	TO_CPU_FW_CPU_ONLY = 6,
++	TO_CPU_FW_DROP = 7,
+ };
+ 
+ /* Registers for address table access */
diff --git a/target/linux/generic/pending-6.1/795-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch b/target/linux/generic/pending-6.1/795-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
new file mode 100644
index 0000000000..95cdfac02e
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
@@ -0,0 +1,201 @@
+From 1dbc1bdc2869e6d2929235c70d64e393aa5a5fa2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:12 +0300
+Subject: [PATCH 05/15] net: dsa: mt7530: refactor MT7530_MFC and MT7531_CFC,
+ add MT7531_QRY_FFP
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530_MFC register is on MT7530, MT7531, and the switch on the MT7988
+SoC. Rename it to MT753X_MFC. Bit 7 to 0 differs between MT7530 and
+MT7531/MT7988. Add MT7530 prefix to these definitions, and define the
+IGMP/MLD Query Frame Flooding Ports mask for MT7531.
+
+Rename the cases of MIRROR_MASK to MIRROR_PORT_MASK.
+
+Move mt753x_mirror_port_get() and mt753x_port_mirror_set() to mt7530.h as
+macros.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 38 ++++++++--------------
+ drivers/net/dsa/mt7530.h | 69 +++++++++++++++++++++++++---------------
+ 2 files changed, 57 insertions(+), 50 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1140,7 +1140,7 @@ mt753x_cpu_port_enable(struct dsa_switch
+ 		     PORT_SPEC_TAG);
+ 
+ 	/* Enable flooding on the CPU port */
+-	mt7530_set(priv, MT7530_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
++	mt7530_set(priv, MT753X_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
+ 		   UNU_FFP(BIT(port)));
+ 
+ 	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
+@@ -1304,15 +1304,15 @@ mt7530_port_bridge_flags(struct dsa_swit
+ 			   flags.val & BR_LEARNING ? 0 : SA_DIS);
+ 
+ 	if (flags.mask & BR_FLOOD)
+-		mt7530_rmw(priv, MT7530_MFC, UNU_FFP(BIT(port)),
++		mt7530_rmw(priv, MT753X_MFC, UNU_FFP(BIT(port)),
+ 			   flags.val & BR_FLOOD ? UNU_FFP(BIT(port)) : 0);
+ 
+ 	if (flags.mask & BR_MCAST_FLOOD)
+-		mt7530_rmw(priv, MT7530_MFC, UNM_FFP(BIT(port)),
++		mt7530_rmw(priv, MT753X_MFC, UNM_FFP(BIT(port)),
+ 			   flags.val & BR_MCAST_FLOOD ? UNM_FFP(BIT(port)) : 0);
+ 
+ 	if (flags.mask & BR_BCAST_FLOOD)
+-		mt7530_rmw(priv, MT7530_MFC, BC_FFP(BIT(port)),
++		mt7530_rmw(priv, MT753X_MFC, BC_FFP(BIT(port)),
+ 			   flags.val & BR_BCAST_FLOOD ? BC_FFP(BIT(port)) : 0);
+ 
+ 	return 0;
+@@ -1848,20 +1848,6 @@ mt7530_port_vlan_del(struct dsa_switch *
+ 	return 0;
+ }
+ 
+-static int mt753x_mirror_port_get(unsigned int id, u32 val)
+-{
+-	return (id == ID_MT7531 || id == ID_MT7988) ?
+-		       MT7531_MIRROR_PORT_GET(val) :
+-		       MIRROR_PORT(val);
+-}
+-
+-static int mt753x_mirror_port_set(unsigned int id, u32 val)
+-{
+-	return (id == ID_MT7531 || id == ID_MT7988) ?
+-		       MT7531_MIRROR_PORT_SET(val) :
+-		       MIRROR_PORT(val);
+-}
+-
+ static int mt753x_port_mirror_add(struct dsa_switch *ds, int port,
+ 				  struct dsa_mall_mirror_tc_entry *mirror,
+ 				  bool ingress, struct netlink_ext_ack *extack)
+@@ -1877,14 +1863,14 @@ static int mt753x_port_mirror_add(struct
+ 	val = mt7530_read(priv, MT753X_MIRROR_REG(priv->id));
+ 
+ 	/* MT7530 only supports one monitor port */
+-	monitor_port = mt753x_mirror_port_get(priv->id, val);
++	monitor_port = MT753X_MIRROR_PORT_GET(priv->id, val);
+ 	if (val & MT753X_MIRROR_EN(priv->id) &&
+ 	    monitor_port != mirror->to_local_port)
+ 		return -EEXIST;
+ 
+ 	val |= MT753X_MIRROR_EN(priv->id);
+-	val &= ~MT753X_MIRROR_MASK(priv->id);
+-	val |= mt753x_mirror_port_set(priv->id, mirror->to_local_port);
++	val &= ~MT753X_MIRROR_PORT_MASK(priv->id);
++	val |= MT753X_MIRROR_PORT_SET(priv->id, mirror->to_local_port);
+ 	mt7530_write(priv, MT753X_MIRROR_REG(priv->id), val);
+ 
+ 	val = mt7530_read(priv, MT7530_PCR_P(port));
+@@ -2524,7 +2510,7 @@ mt7531_setup_common(struct dsa_switch *d
+ 	mt7530_mib_reset(ds);
+ 
+ 	/* Disable flooding on all ports */
+-	mt7530_clear(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK |
++	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
+ 		     UNU_FFP_MASK);
+ 
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++) {
+@@ -3086,10 +3072,12 @@ mt753x_conduit_state_change(struct dsa_s
+ 	else
+ 		priv->active_cpu_ports &= ~mask;
+ 
+-	if (priv->active_cpu_ports)
+-		val = CPU_EN | CPU_PORT(__ffs(priv->active_cpu_ports));
++	if (priv->active_cpu_ports) {
++		val = MT7530_CPU_EN |
++		      MT7530_CPU_PORT(__ffs(priv->active_cpu_ports));
++	}
+ 
+-	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
++	mt7530_rmw(priv, MT753X_MFC, MT7530_CPU_EN | MT7530_CPU_PORT_MASK, val);
+ }
+ 
+ static int mt7988_setup(struct dsa_switch *ds)
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -36,36 +36,55 @@ enum mt753x_id {
+ #define MT753X_AGC			0xc
+ #define  LOCAL_EN			BIT(7)
+ 
+-/* Registers to mac forward control for unknown frames */
+-#define MT7530_MFC			0x10
+-#define  BC_FFP(x)			(((x) & 0xff) << 24)
+-#define  BC_FFP_MASK			BC_FFP(~0)
+-#define  UNM_FFP(x)			(((x) & 0xff) << 16)
+-#define  UNM_FFP_MASK			UNM_FFP(~0)
+-#define  UNU_FFP(x)			(((x) & 0xff) << 8)
+-#define  UNU_FFP_MASK			UNU_FFP(~0)
+-#define  CPU_EN				BIT(7)
+-#define  CPU_PORT_MASK			GENMASK(6, 4)
+-#define  CPU_PORT(x)			FIELD_PREP(CPU_PORT_MASK, x)
+-#define  MIRROR_EN			BIT(3)
+-#define  MIRROR_PORT(x)			((x) & 0x7)
+-#define  MIRROR_MASK			0x7
++/* Register for MAC forward control */
++#define MT753X_MFC			0x10
++#define  BC_FFP_MASK			GENMASK(31, 24)
++#define  BC_FFP(x)			FIELD_PREP(BC_FFP_MASK, x)
++#define  UNM_FFP_MASK			GENMASK(23, 16)
++#define  UNM_FFP(x)			FIELD_PREP(UNM_FFP_MASK, x)
++#define  UNU_FFP_MASK			GENMASK(15, 8)
++#define  UNU_FFP(x)			FIELD_PREP(UNU_FFP_MASK, x)
++#define  MT7530_CPU_EN			BIT(7)
++#define  MT7530_CPU_PORT_MASK		GENMASK(6, 4)
++#define  MT7530_CPU_PORT(x)		FIELD_PREP(MT7530_CPU_PORT_MASK, x)
++#define  MT7530_MIRROR_EN		BIT(3)
++#define  MT7530_MIRROR_PORT_MASK	GENMASK(2, 0)
++#define  MT7530_MIRROR_PORT_GET(x)	FIELD_GET(MT7530_MIRROR_PORT_MASK, x)
++#define  MT7530_MIRROR_PORT_SET(x)	FIELD_PREP(MT7530_MIRROR_PORT_MASK, x)
++#define  MT7531_QRY_FFP_MASK		GENMASK(7, 0)
++#define  MT7531_QRY_FFP(x)		FIELD_PREP(MT7531_QRY_FFP_MASK, x)
+ 
+-/* Registers for CPU forward control */
++/* Register for CPU forward control */
+ #define MT7531_CFC			0x4
+ #define  MT7531_MIRROR_EN		BIT(19)
+-#define  MT7531_MIRROR_MASK		(MIRROR_MASK << 16)
+-#define  MT7531_MIRROR_PORT_GET(x)	(((x) >> 16) & MIRROR_MASK)
+-#define  MT7531_MIRROR_PORT_SET(x)	(((x) & MIRROR_MASK) << 16)
++#define  MT7531_MIRROR_PORT_MASK	GENMASK(18, 16)
++#define  MT7531_MIRROR_PORT_GET(x)	FIELD_GET(MT7531_MIRROR_PORT_MASK, x)
++#define  MT7531_MIRROR_PORT_SET(x)	FIELD_PREP(MT7531_MIRROR_PORT_MASK, x)
+ #define  MT7531_CPU_PMAP_MASK		GENMASK(7, 0)
+ #define  MT7531_CPU_PMAP(x)		FIELD_PREP(MT7531_CPU_PMAP_MASK, x)
+ 
+-#define MT753X_MIRROR_REG(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+-					 MT7531_CFC : MT7530_MFC)
+-#define MT753X_MIRROR_EN(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+-					 MT7531_MIRROR_EN : MIRROR_EN)
+-#define MT753X_MIRROR_MASK(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+-					 MT7531_MIRROR_MASK : MIRROR_MASK)
++#define MT753X_MIRROR_REG(id)		((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_CFC : MT753X_MFC)
++
++#define MT753X_MIRROR_EN(id)		((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_MIRROR_EN : MT7530_MIRROR_EN)
++
++#define MT753X_MIRROR_PORT_MASK(id)	((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_MIRROR_PORT_MASK : \
++					 MT7530_MIRROR_PORT_MASK)
++
++#define MT753X_MIRROR_PORT_GET(id, val)	((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_MIRROR_PORT_GET(val) : \
++					 MT7530_MIRROR_PORT_GET(val))
++
++#define MT753X_MIRROR_PORT_SET(id, val)	((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_MIRROR_PORT_SET(val) : \
++					 MT7530_MIRROR_PORT_SET(val))
+ 
+ /* Register for BPDU and PAE frame control */
+ #define MT753X_BPC			0x24
diff --git a/target/linux/generic/pending-6.1/795-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch b/target/linux/generic/pending-6.1/795-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
new file mode 100644
index 0000000000..d2497d5c90
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
@@ -0,0 +1,257 @@
+From 3ccf67597d35c06a7319e407b1c42f78a7966779 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:13 +0300
+Subject: [PATCH 06/15] net: dsa: mt7530: refactor MT7530_HWTRAP and
+ MT7530_MHWTRAP
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530_HWTRAP and MT7530_MHWTRAP registers are on MT7530 and MT7531.
+It's called hardware trap on MT7530, software trap on MT7531. That's
+because some bits of the trap on MT7530 cannot be modified by software
+whilst all bits of the trap on MT7531 can. Rename the definitions for them
+to MT753X_TRAP and MT753X_MTRAP. Add MT7530 and MT7531 prefixes to the
+definitions specific to the switch model.
+
+Remove the extra parentheses from MT7530_XTAL_40MHZ and MT7530_XTAL_20MHZ.
+
+Rename MHWTRAP_PHY0_SEL, MHWTRAP_MANUAL, and MHWTRAP_PHY_ACCESS to be on
+par with the "MT7621 Giga Switch Programming Guide v0.3" document.
+
+Make an enumaration for the XTAL frequency. Set the data type of the xtal
+variable on mt7531_pll_setup() to it.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 59 ++++++++++++++++++++--------------------
+ drivers/net/dsa/mt7530.h | 50 ++++++++++++++++------------------
+ 2 files changed, 54 insertions(+), 55 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -403,23 +403,23 @@ mt7530_setup_port6(struct dsa_switch *ds
+ 
+ 	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1));
+ 
+-	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
++	xtal = mt7530_read(priv, MT753X_MTRAP) & MT7530_XTAL_MASK;
+ 
+-	if (xtal == HWTRAP_XTAL_25MHZ)
++	if (xtal == MT7530_XTAL_25MHZ)
+ 		ssc_delta = 0x57;
+ 	else
+ 		ssc_delta = 0x87;
+ 
+ 	if (priv->id == ID_MT7621) {
+ 		/* PLL frequency: 125MHz: 1.0GBit */
+-		if (xtal == HWTRAP_XTAL_40MHZ)
++		if (xtal == MT7530_XTAL_40MHZ)
+ 			ncpo1 = 0x0640;
+-		if (xtal == HWTRAP_XTAL_25MHZ)
++		if (xtal == MT7530_XTAL_25MHZ)
+ 			ncpo1 = 0x0a00;
+ 	} else { /* PLL frequency: 250MHz: 2.0Gbit */
+-		if (xtal == HWTRAP_XTAL_40MHZ)
++		if (xtal == MT7530_XTAL_40MHZ)
+ 			ncpo1 = 0x0c80;
+-		if (xtal == HWTRAP_XTAL_25MHZ)
++		if (xtal == MT7530_XTAL_25MHZ)
+ 			ncpo1 = 0x1400;
+ 	}
+ 
+@@ -442,19 +442,20 @@ mt7530_setup_port6(struct dsa_switch *ds
+ static void
+ mt7531_pll_setup(struct mt7530_priv *priv)
+ {
++	enum mt7531_xtal_fsel xtal;
+ 	u32 top_sig;
+ 	u32 hwstrap;
+-	u32 xtal;
+ 	u32 val;
+ 
+ 	val = mt7530_read(priv, MT7531_CREV);
+ 	top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR);
+-	hwstrap = mt7530_read(priv, MT7531_HWTRAP);
++	hwstrap = mt7530_read(priv, MT753X_TRAP);
+ 	if ((val & CHIP_REV_M) > 0)
+-		xtal = (top_sig & PAD_MCM_SMI_EN) ? HWTRAP_XTAL_FSEL_40MHZ :
+-						    HWTRAP_XTAL_FSEL_25MHZ;
++		xtal = (top_sig & PAD_MCM_SMI_EN) ? MT7531_XTAL_FSEL_40MHZ :
++						    MT7531_XTAL_FSEL_25MHZ;
+ 	else
+-		xtal = hwstrap & HWTRAP_XTAL_FSEL_MASK;
++		xtal = (hwstrap & MT7531_XTAL25) ? MT7531_XTAL_FSEL_25MHZ :
++						   MT7531_XTAL_FSEL_40MHZ;
+ 
+ 	/* Step 1 : Disable MT7531 COREPLL */
+ 	val = mt7530_read(priv, MT7531_PLLGP_EN);
+@@ -483,13 +484,13 @@ mt7531_pll_setup(struct mt7530_priv *pri
+ 	usleep_range(25, 35);
+ 
+ 	switch (xtal) {
+-	case HWTRAP_XTAL_FSEL_25MHZ:
++	case MT7531_XTAL_FSEL_25MHZ:
+ 		val = mt7530_read(priv, MT7531_PLLGP_CR0);
+ 		val &= ~RG_COREPLL_SDM_PCW_M;
+ 		val |= 0x140000 << RG_COREPLL_SDM_PCW_S;
+ 		mt7530_write(priv, MT7531_PLLGP_CR0, val);
+ 		break;
+-	case HWTRAP_XTAL_FSEL_40MHZ:
++	case MT7531_XTAL_FSEL_40MHZ:
+ 		val = mt7530_read(priv, MT7531_PLLGP_CR0);
+ 		val &= ~RG_COREPLL_SDM_PCW_M;
+ 		val |= 0x190000 << RG_COREPLL_SDM_PCW_S;
+@@ -870,20 +871,20 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	mutex_lock(&priv->reg_mutex);
+ 
+-	val = mt7530_read(priv, MT7530_MHWTRAP);
++	val = mt7530_read(priv, MT753X_MTRAP);
+ 
+-	val |= MHWTRAP_MANUAL | MHWTRAP_P5_MAC_SEL | MHWTRAP_P5_DIS;
+-	val &= ~MHWTRAP_P5_RGMII_MODE & ~MHWTRAP_PHY0_SEL;
++	val |= MT7530_CHG_TRAP | MT7530_P5_MAC_SEL | MT7530_P5_DIS;
++	val &= ~MT7530_P5_RGMII_MODE & ~MT7530_P5_PHY0_SEL;
+ 
+ 	switch (priv->p5_mode) {
+ 	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
+ 	case MUX_PHY_P0:
+-		val |= MHWTRAP_PHY0_SEL;
++		val |= MT7530_P5_PHY0_SEL;
+ 		fallthrough;
+ 
+ 	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
+ 	case MUX_PHY_P4:
+-		val &= ~MHWTRAP_P5_MAC_SEL & ~MHWTRAP_P5_DIS;
++		val &= ~MT7530_P5_MAC_SEL & ~MT7530_P5_DIS;
+ 
+ 		/* Setup the MAC by default for the cpu port */
+ 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+@@ -891,13 +892,13 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	/* GMAC5: P5 -> SoC MAC or external PHY */
+ 	default:
+-		val &= ~MHWTRAP_P5_DIS;
++		val &= ~MT7530_P5_DIS;
+ 		break;
+ 	}
+ 
+ 	/* Setup RGMII settings */
+ 	if (phy_interface_mode_is_rgmii(interface)) {
+-		val |= MHWTRAP_P5_RGMII_MODE;
++		val |= MT7530_P5_RGMII_MODE;
+ 
+ 		/* P5 RGMII RX Clock Control: delay setting for 1000M */
+ 		mt7530_write(priv, MT7530_P5RGMIIRXCR, CSR_RGMII_EDGE_ALIGN);
+@@ -917,7 +918,7 @@ static void mt7530_setup_port5(struct ds
+ 			     P5_IO_CLK_DRV(1) | P5_IO_DATA_DRV(1));
+ 	}
+ 
+-	mt7530_write(priv, MT7530_MHWTRAP, val);
++	mt7530_write(priv, MT753X_MTRAP, val);
+ 
+ 	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, mode=%s, phy-mode=%s\n", val,
+ 		mt7530_p5_mode_str(priv->p5_mode), phy_modes(interface));
+@@ -2356,7 +2357,7 @@ mt7530_setup(struct dsa_switch *ds)
+ 	}
+ 
+ 	/* Waiting for MT7530 got to stable */
+-	INIT_MT7530_DUMMY_POLL(&p, priv, MT7530_HWTRAP);
++	INIT_MT7530_DUMMY_POLL(&p, priv, MT753X_TRAP);
+ 	ret = readx_poll_timeout(_mt7530_read, &p, val, val != 0,
+ 				 20, 1000000);
+ 	if (ret < 0) {
+@@ -2371,7 +2372,7 @@ mt7530_setup(struct dsa_switch *ds)
+ 		return -ENODEV;
+ 	}
+ 
+-	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_20MHZ) {
++	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_20MHZ) {
+ 		dev_err(priv->dev,
+ 			"MT7530 with a 20MHz XTAL is not supported!\n");
+ 		return -EINVAL;
+@@ -2392,12 +2393,12 @@ mt7530_setup(struct dsa_switch *ds)
+ 			   RD_TAP_MASK, RD_TAP(16));
+ 
+ 	/* Enable port 6 */
+-	val = mt7530_read(priv, MT7530_MHWTRAP);
+-	val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS;
+-	val |= MHWTRAP_MANUAL;
+-	mt7530_write(priv, MT7530_MHWTRAP, val);
++	val = mt7530_read(priv, MT753X_MTRAP);
++	val &= ~MT7530_P6_DIS & ~MT7530_PHY_INDIRECT_ACCESS;
++	val |= MT7530_CHG_TRAP;
++	mt7530_write(priv, MT753X_MTRAP, val);
+ 
+-	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ)
++	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
+ 		mt7530_pll_setup(priv);
+ 
+ 	mt753x_trap_frames(priv);
+@@ -2577,7 +2578,7 @@ mt7531_setup(struct dsa_switch *ds)
+ 	}
+ 
+ 	/* Waiting for MT7530 got to stable */
+-	INIT_MT7530_DUMMY_POLL(&p, priv, MT7530_HWTRAP);
++	INIT_MT7530_DUMMY_POLL(&p, priv, MT753X_TRAP);
+ 	ret = readx_poll_timeout(_mt7530_read, &p, val, val != 0,
+ 				 20, 1000000);
+ 	if (ret < 0) {
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -495,32 +495,30 @@ enum mt7531_clk_skew {
+ 	MT7531_CLK_SKEW_REVERSE = 3,
+ };
+ 
+-/* Register for hw trap status */
+-#define MT7530_HWTRAP			0x7800
+-#define  HWTRAP_XTAL_MASK		(BIT(10) | BIT(9))
+-#define  HWTRAP_XTAL_25MHZ		(BIT(10) | BIT(9))
+-#define  HWTRAP_XTAL_40MHZ		(BIT(10))
+-#define  HWTRAP_XTAL_20MHZ		(BIT(9))
++/* Register for trap status */
++#define MT753X_TRAP			0x7800
++#define  MT7530_XTAL_MASK		(BIT(10) | BIT(9))
++#define  MT7530_XTAL_25MHZ		(BIT(10) | BIT(9))
++#define  MT7530_XTAL_40MHZ		BIT(10)
++#define  MT7530_XTAL_20MHZ		BIT(9)
++#define  MT7531_XTAL25			BIT(7)
+ 
+-#define MT7531_HWTRAP			0x7800
+-#define  HWTRAP_XTAL_FSEL_MASK		BIT(7)
+-#define  HWTRAP_XTAL_FSEL_25MHZ		BIT(7)
+-#define  HWTRAP_XTAL_FSEL_40MHZ		0
+-/* Unique fields of (M)HWSTRAP for MT7531 */
+-#define  XTAL_FSEL_S			7
+-#define  XTAL_FSEL_M			BIT(7)
+-#define  PHY_EN				BIT(6)
+-#define  CHG_STRAP			BIT(8)
++/* Register for trap modification */
++#define MT753X_MTRAP			0x7804
++#define  MT7530_P5_PHY0_SEL		BIT(20)
++#define  MT7530_CHG_TRAP		BIT(16)
++#define  MT7530_P5_MAC_SEL		BIT(13)
++#define  MT7530_P6_DIS			BIT(8)
++#define  MT7530_P5_RGMII_MODE		BIT(7)
++#define  MT7530_P5_DIS			BIT(6)
++#define  MT7530_PHY_INDIRECT_ACCESS	BIT(5)
++#define  MT7531_CHG_STRAP		BIT(8)
++#define  MT7531_PHY_EN			BIT(6)
+ 
+-/* Register for hw trap modification */
+-#define MT7530_MHWTRAP			0x7804
+-#define  MHWTRAP_PHY0_SEL		BIT(20)
+-#define  MHWTRAP_MANUAL			BIT(16)
+-#define  MHWTRAP_P5_MAC_SEL		BIT(13)
+-#define  MHWTRAP_P6_DIS			BIT(8)
+-#define  MHWTRAP_P5_RGMII_MODE		BIT(7)
+-#define  MHWTRAP_P5_DIS			BIT(6)
+-#define  MHWTRAP_PHY_ACCESS		BIT(5)
++enum mt7531_xtal_fsel {
++	MT7531_XTAL_FSEL_25MHZ,
++	MT7531_XTAL_FSEL_40MHZ,
++};
+ 
+ /* Register for TOP signal control */
+ #define MT7530_TOP_SIG_CTRL		0x7808
diff --git a/target/linux/generic/pending-6.1/795-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch b/target/linux/generic/pending-6.1/795-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
new file mode 100644
index 0000000000..e7da939588
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
@@ -0,0 +1,117 @@
+From 2982f395c9a513b168f1e685588f70013cba2f5f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:14 +0300
+Subject: [PATCH 07/15] net: dsa: mt7530: move MT753X_MTRAP operations for
+ MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On MT7530, the media-independent interfaces of port 5 and 6 are controlled
+by the MT7530_P5_DIS and MT7530_P6_DIS bits of the hardware trap. Deal with
+these bits only when the relevant port is being enabled or disabled. This
+ensures that these ports will be disabled when they are not in use.
+
+Do not set MT7530_CHG_TRAP on mt7530_setup_port5() as that's already being
+done on mt7530_setup().
+
+Instead of globally setting MT7530_P5_MAC_SEL, clear it, then set it only
+on the appropriate case.
+
+If PHY muxing is detected, clear MT7530_P5_DIS before calling
+mt7530_setup_port5().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 38 +++++++++++++++++++++++++++-----------
+ 1 file changed, 27 insertions(+), 11 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -873,8 +873,7 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	val = mt7530_read(priv, MT753X_MTRAP);
+ 
+-	val |= MT7530_CHG_TRAP | MT7530_P5_MAC_SEL | MT7530_P5_DIS;
+-	val &= ~MT7530_P5_RGMII_MODE & ~MT7530_P5_PHY0_SEL;
++	val &= ~MT7530_P5_PHY0_SEL & ~MT7530_P5_MAC_SEL & ~MT7530_P5_RGMII_MODE;
+ 
+ 	switch (priv->p5_mode) {
+ 	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
+@@ -884,15 +883,13 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
+ 	case MUX_PHY_P4:
+-		val &= ~MT7530_P5_MAC_SEL & ~MT7530_P5_DIS;
+-
+ 		/* Setup the MAC by default for the cpu port */
+ 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+ 		break;
+ 
+ 	/* GMAC5: P5 -> SoC MAC or external PHY */
+ 	default:
+-		val &= ~MT7530_P5_DIS;
++		val |= MT7530_P5_MAC_SEL;
+ 		break;
+ 	}
+ 
+@@ -1186,6 +1183,14 @@ mt7530_port_enable(struct dsa_switch *ds
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ 
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return 0;
++
++	if (port == 5)
++		mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
++	else if (port == 6)
++		mt7530_clear(priv, MT753X_MTRAP, MT7530_P6_DIS);
++
+ 	return 0;
+ }
+ 
+@@ -1204,6 +1209,14 @@ mt7530_port_disable(struct dsa_switch *d
+ 		   PCR_MATRIX_CLR);
+ 
+ 	mutex_unlock(&priv->reg_mutex);
++
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return;
++
++	if (port == 5)
++		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
++	else if (port == 6)
++		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
+ }
+ 
+ static int
+@@ -2392,11 +2405,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 		mt7530_rmw(priv, MT7530_TRGMII_RD(i),
+ 			   RD_TAP_MASK, RD_TAP(16));
+ 
+-	/* Enable port 6 */
+-	val = mt7530_read(priv, MT753X_MTRAP);
+-	val &= ~MT7530_P6_DIS & ~MT7530_PHY_INDIRECT_ACCESS;
+-	val |= MT7530_CHG_TRAP;
+-	mt7530_write(priv, MT753X_MTRAP, val);
++	/* Allow modifying the trap and directly access PHY registers via the
++	 * MDIO bus the switch is on.
++	 */
++	mt7530_rmw(priv, MT753X_MTRAP, MT7530_CHG_TRAP |
++		   MT7530_PHY_INDIRECT_ACCESS, MT7530_CHG_TRAP);
+ 
+ 	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
+ 		mt7530_pll_setup(priv);
+@@ -2479,8 +2492,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 			break;
+ 		}
+ 
+-		if (priv->p5_mode == MUX_PHY_P0 || priv->p5_mode == MUX_PHY_P4)
++		if (priv->p5_mode == MUX_PHY_P0 ||
++		    priv->p5_mode == MUX_PHY_P4) {
++			mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
+ 			mt7530_setup_port5(ds, interface);
++		}
+ 	}
+ 
+ #ifdef CONFIG_GPIOLIB
diff --git a/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch b/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
new file mode 100644
index 0000000000..7cc145327c
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
@@ -0,0 +1,39 @@
+From 1f5669efca65564c7533704917f79003c6b36c9c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:15 +0300
+Subject: [PATCH 08/15] net: dsa: mt7530: return mt7530_setup_mdio &
+ mt7531_setup_common on error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The mt7530_setup_mdio() and mt7531_setup_common() functions should be
+checked for errors. Return if the functions return a non-zero value.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2658,7 +2658,9 @@ mt7531_setup(struct dsa_switch *ds)
+ 					 0);
+ 	}
+ 
+-	mt7531_setup_common(ds);
++	ret = mt7531_setup_common(ds);
++	if (ret)
++		return ret;
+ 
+ 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
+ 	ret = mt7530_setup_vlan0(priv);
+@@ -3017,6 +3019,8 @@ mt753x_setup(struct dsa_switch *ds)
+ 	ret = mt7530_setup_mdio(priv);
+ 	if (ret && priv->irq)
+ 		mt7530_free_irq_common(priv);
++	if (ret)
++		return ret;
+ 
+ 	/* Initialise the PCS devices */
+ 	for (i = 0; i < priv->ds->num_ports; i++) {
diff --git a/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch b/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
new file mode 100644
index 0000000000..f4d19db274
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
@@ -0,0 +1,75 @@
+From 6cc2d4ccd77509df74b7b8ef46bbc6ba0a571318 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:16 +0300
+Subject: [PATCH 09/15] net: dsa: mt7530: define MAC speed capabilities per
+ switch model
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With the support of the MT7988 SoC switch, the MAC speed capabilities
+defined on mt753x_phylink_get_caps() won't apply to all switch models
+anymore. Move them to more appropriate locations instead of overwriting
+config->mac_capabilities.
+
+Remove the comment on mt753x_phylink_get_caps() as it's become invalid with
+the support of MT7531 and MT7988 SoC switch.
+
+Add break to case 6 of mt7988_mac_port_get_caps() to be explicit.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2676,6 +2676,8 @@ mt7531_setup(struct dsa_switch *ds)
+ static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port,
+ 				     struct phylink_config *config)
+ {
++	config->mac_capabilities |= MAC_10 | MAC_100 | MAC_1000FD;
++
+ 	switch (port) {
+ 	/* Ports which are connected to switch PHYs. There is no MII pinout. */
+ 	case 0 ... 4:
+@@ -2707,6 +2709,8 @@ static void mt7531_mac_port_get_caps(str
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
++	config->mac_capabilities |= MAC_10 | MAC_100 | MAC_1000FD;
++
+ 	switch (port) {
+ 	/* Ports which are connected to switch PHYs. There is no MII pinout. */
+ 	case 0 ... 4:
+@@ -2746,14 +2750,17 @@ static void mt7988_mac_port_get_caps(str
+ 	case 0 ... 3:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
++
++		config->mac_capabilities |= MAC_10 | MAC_100 | MAC_1000FD;
+ 		break;
+ 
+ 	/* Port 6 is connected to SoC's XGMII MAC. There is no MII pinout. */
+ 	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+-		config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
+-					   MAC_10000FD;
++
++		config->mac_capabilities |= MAC_10000FD;
++		break;
+ 	}
+ }
+ 
+@@ -2923,9 +2930,7 @@ static void mt753x_phylink_get_caps(stru
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+-	/* This switch only supports full-duplex at 1Gbps */
+-	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
+-				   MAC_10 | MAC_100 | MAC_1000FD;
++	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE;
+ 
+ 	/* This driver does not make use of the speed, duplex, pause or the
+ 	 * advertisement in its mac_config, so it is safe to mark this driver
diff --git a/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch b/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
new file mode 100644
index 0000000000..5bb7756c51
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
@@ -0,0 +1,33 @@
+From dd0f15fc877c10567699190bce0f55e96f4ad6b5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:17 +0300
+Subject: [PATCH 10/15] net: dsa: mt7530: get rid of function sanity check
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Get rid of checking whether functions are filled properly. priv->info which
+is an mt753x_info structure is filled and checked for before this check.
+It's unnecessary checking whether it's filled properly.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -3220,13 +3220,6 @@ mt7530_probe_common(struct mt7530_priv *
+ 	if (!priv->info)
+ 		return -EINVAL;
+ 
+-	/* Sanity check if these required device operations are filled
+-	 * properly.
+-	 */
+-	if (!priv->info->sw_setup || !priv->info->phy_read ||
+-	    !priv->info->phy_write || !priv->info->mac_port_get_caps)
+-		return -EINVAL;
+-
+ 	priv->id = priv->info->id;
+ 	priv->dev = dev;
+ 	priv->ds->priv = priv;
diff --git a/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch b/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
new file mode 100644
index 0000000000..f8147b6412
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
@@ -0,0 +1,71 @@
+From 2dff9759602b069f97ccc939e15a47ca051b2983 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:18 +0300
+Subject: [PATCH 11/15] net: dsa: mt7530: refactor MT7530_PMEEECR_P()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530_PMEEECR_P() register is on MT7530, MT7531, and the switch on the
+MT7988 SoC. Rename the definition for them to MT753X_PMEEECR_P(). Use the
+FIELD_PREP and FIELD_GET macros. Rename GET_LPI_THRESH() and
+SET_LPI_THRESH() to LPI_THRESH_GET() and LPI_THRESH_SET().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c |  8 ++++----
+ drivers/net/dsa/mt7530.h | 13 +++++++------
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -3048,10 +3048,10 @@ static int mt753x_get_mac_eee(struct dsa
+ 			      struct ethtool_eee *e)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	u32 eeecr = mt7530_read(priv, MT7530_PMEEECR_P(port));
++	u32 eeecr = mt7530_read(priv, MT753X_PMEEECR_P(port));
+ 
+ 	e->tx_lpi_enabled = !(eeecr & LPI_MODE_EN);
+-	e->tx_lpi_timer = GET_LPI_THRESH(eeecr);
++	e->tx_lpi_timer = LPI_THRESH_GET(eeecr);
+ 
+ 	return 0;
+ }
+@@ -3065,11 +3065,11 @@ static int mt753x_set_mac_eee(struct dsa
+ 	if (e->tx_lpi_timer > 0xFFF)
+ 		return -EINVAL;
+ 
+-	set = SET_LPI_THRESH(e->tx_lpi_timer);
++	set = LPI_THRESH_SET(e->tx_lpi_timer);
+ 	if (!e->tx_lpi_enabled)
+ 		/* Force LPI Mode without a delay */
+ 		set |= LPI_MODE_EN;
+-	mt7530_rmw(priv, MT7530_PMEEECR_P(port), mask, set);
++	mt7530_rmw(priv, MT753X_PMEEECR_P(port), mask, set);
+ 
+ 	return 0;
+ }
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -364,13 +364,14 @@ enum mt7530_vlan_port_acc_frm {
+ 					 PMCR_FORCE_SPEED_100 | \
+ 					 PMCR_FORCE_FDX | PMCR_FORCE_LNK)
+ 
+-#define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
+-#define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
+-#define  WAKEUP_TIME_100(x)		(((x) & 0xFF) << 16)
++#define MT753X_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
++#define  WAKEUP_TIME_1000_MASK		GENMASK(31, 24)
++#define  WAKEUP_TIME_1000(x)		FIELD_PREP(WAKEUP_TIME_1000_MASK, x)
++#define  WAKEUP_TIME_100_MASK		GENMASK(23, 16)
++#define  WAKEUP_TIME_100(x)		FIELD_PREP(WAKEUP_TIME_100_MASK, x)
+ #define  LPI_THRESH_MASK		GENMASK(15, 4)
+-#define  LPI_THRESH_SHT			4
+-#define  SET_LPI_THRESH(x)		(((x) << LPI_THRESH_SHT) & LPI_THRESH_MASK)
+-#define  GET_LPI_THRESH(x)		(((x) & LPI_THRESH_MASK) >> LPI_THRESH_SHT)
++#define  LPI_THRESH_GET(x)		FIELD_GET(LPI_THRESH_MASK, x)
++#define  LPI_THRESH_SET(x)		FIELD_PREP(LPI_THRESH_MASK, x)
+ #define  LPI_MODE_EN			BIT(0)
+ 
+ #define MT7530_PMSR_P(x)		(0x3008 + (x) * 0x100)
diff --git a/target/linux/generic/pending-6.1/795-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch b/target/linux/generic/pending-6.1/795-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
new file mode 100644
index 0000000000..7ce2d4c04e
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
@@ -0,0 +1,46 @@
+From 21d67c2fabfe40baf33202d3287b67b6c16f8382 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:19 +0300
+Subject: [PATCH 12/15] net: dsa: mt7530: get rid of mac_port_validate member
+ of mt753x_info
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The mac_port_validate member of the mt753x_info structure is not being
+used, remove it. Improve the member description section in the process.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.h | 10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -743,13 +743,12 @@ struct mt753x_pcs {
+ 
+ /* struct mt753x_info -	This is the main data structure for holding the specific
+  *			part for each supported device
++ * @id:			Holding the identifier to a switch model
++ * @pcs_ops:		Holding the pointer to the MAC PCS operations structure
+  * @sw_setup:		Holding the handler to a device initialization
+  * @phy_read:		Holding the way reading PHY port
+  * @phy_write:		Holding the way writing PHY port
+- * @phy_mode_supported:	Check if the PHY type is being supported on a certain
+- *			port
+- * @mac_port_validate:	Holding the way to set addition validate type for a
+- *			certan MAC port
++ * @mac_port_get_caps:	Holding the handler that provides MAC capabilities
+  * @mac_port_config:	Holding the way setting up the PHY attribute to a
+  *			certain MAC port
+  */
+@@ -763,9 +762,6 @@ struct mt753x_info {
+ 	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
+ 	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
+ 				  struct phylink_config *config);
+-	void (*mac_port_validate)(struct dsa_switch *ds, int port,
+-				  phy_interface_t interface,
+-				  unsigned long *supported);
+ 	void (*mac_port_config)(struct dsa_switch *ds, int port,
+ 				unsigned int mode,
+ 				phy_interface_t interface);
diff --git a/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch b/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
new file mode 100644
index 0000000000..0037f97499
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
@@ -0,0 +1,57 @@
+From 6efc8ae3eb0363328f479191a0cf0dc12a16e090 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:20 +0300
+Subject: [PATCH 13/15] net: dsa: mt7530: use priv->ds->num_ports instead of
+ MT7530_NUM_PORTS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use priv->ds->num_ports on all for loops which configure the switch
+registers. In the future, the value of MT7530_NUM_PORTS will depend on
+priv->id. Therefore, this change prepares the subdriver for a simpler
+implementation.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1404,7 +1404,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
+ 	mt7530_rmw(priv, MT7530_PPBV1_P(port), G0_PORT_VID_MASK,
+ 		   G0_PORT_VID_DEF);
+ 
+-	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++	for (i = 0; i < priv->ds->num_ports; i++) {
+ 		if (dsa_is_user_port(ds, i) &&
+ 		    dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
+ 			all_user_ports_removed = false;
+@@ -2419,7 +2419,7 @@ mt7530_setup(struct dsa_switch *ds)
+ 	/* Enable and reset MIB counters */
+ 	mt7530_mib_reset(ds);
+ 
+-	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++	for (i = 0; i < priv->ds->num_ports; i++) {
+ 		/* Clear link settings and enable force mode to force link down
+ 		 * on all ports until they're enabled later.
+ 		 */
+@@ -2530,7 +2530,7 @@ mt7531_setup_common(struct dsa_switch *d
+ 	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
+ 		     UNU_FFP_MASK);
+ 
+-	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++	for (i = 0; i < priv->ds->num_ports; i++) {
+ 		/* Clear link settings and enable force mode to force link down
+ 		 * on all ports until they're enabled later.
+ 		 */
+@@ -2617,7 +2617,7 @@ mt7531_setup(struct dsa_switch *ds)
+ 	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
+ 
+ 	/* Force link down on all ports before internal reset */
+-	for (i = 0; i < MT7530_NUM_PORTS; i++)
++	for (i = 0; i < priv->ds->num_ports; i++)
+ 		mt7530_write(priv, MT753X_PMCR_P(i), MT7531_FORCE_MODE_LNK);
+ 
+ 	/* Reset the switch through internal reset */
diff --git a/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch b/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
new file mode 100644
index 0000000000..ee8e13ea70
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
@@ -0,0 +1,37 @@
+From 4794c12e3aefe05dd0063c2b6b0101854b143bac Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:21 +0300
+Subject: [PATCH 14/15] net: dsa: mt7530: do not pass port variable to
+ mt7531_rgmii_setup()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The mt7531_rgmii_setup() function does not use the port variable, do not
+pass the variable to it.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2776,7 +2776,7 @@ mt7530_mac_config(struct dsa_switch *ds,
+ 		mt7530_setup_port6(priv->ds, interface);
+ }
+ 
+-static void mt7531_rgmii_setup(struct mt7530_priv *priv, u32 port,
++static void mt7531_rgmii_setup(struct mt7530_priv *priv,
+ 			       phy_interface_t interface,
+ 			       struct phy_device *phydev)
+ {
+@@ -2827,7 +2827,7 @@ mt7531_mac_config(struct dsa_switch *ds,
+ 	if (phy_interface_mode_is_rgmii(interface)) {
+ 		dp = dsa_to_port(ds, port);
+ 		phydev = dp->slave->phydev;
+-		mt7531_rgmii_setup(priv, port, interface, phydev);
++		mt7531_rgmii_setup(priv, interface, phydev);
+ 	}
+ }
+ 
diff --git a/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch b/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
new file mode 100644
index 0000000000..666bcb75e8
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
@@ -0,0 +1,33 @@
+From c45832fe783f468aaaace09ae95a30cbf0acf724 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:22 +0300
+Subject: [PATCH 15/15] net: dsa: mt7530: explain exposing MDIO bus of MT7531AE
+ better
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Unlike MT7531BE, the GPIO 6-12 pins are not used for RGMII on MT7531AE.
+Therefore, the GPIO 11-12 pins are set to function as MDC and MDIO to
+expose the MDIO bus of the switch. Replace the comment with a better
+explanation.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2626,7 +2626,10 @@ mt7531_setup(struct dsa_switch *ds)
+ 	if (!priv->p5_sgmii) {
+ 		mt7531_pll_setup(priv);
+ 	} else {
+-		/* Let ds->slave_mii_bus be able to access external phy. */
++		/* Unlike MT7531BE, the GPIO 6-12 pins are not used for RGMII on
++		 * MT7531AE. Set the GPIO 11-12 pins to function as MDC and MDIO
++		 * to expose the MDIO bus of the switch.
++		 */
+ 		mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO11_RG_RXD2_MASK,
+ 			   MT7531_EXT_P_MDC_11);
+ 		mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO12_RG_RXD3_MASK,
diff --git a/target/linux/generic/pending-6.6/745-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch b/target/linux/generic/pending-6.6/745-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
new file mode 100644
index 0000000000..44cf60cf14
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
@@ -0,0 +1,88 @@
+From 856e8954a0a88d1a4d2b43e9002b9249131a156f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:08 +0300
+Subject: [PATCH 01/15] net: dsa: mt7530: disable EEE abilities on failure on
+ MT7531 and MT7988
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7531_FORCE_EEE1G and MT7531_FORCE_EEE100 bits let the
+PMCR_FORCE_EEE1G and PMCR_FORCE_EEE100 bits determine the 1G/100 EEE
+abilities of the MAC. If MT7531_FORCE_EEE1G and MT7531_FORCE_EEE100 are
+unset, the abilities are left to be determined by PHY auto polling.
+
+The commit 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
+made it so that the PMCR_FORCE_EEE1G and PMCR_FORCE_EEE100 bits are set on
+mt753x_phylink_mac_link_up(). But it did not set the MT7531_FORCE_EEE1G and
+MT7531_FORCE_EEE100 bits. Because of this, the EEE abilities will be
+determined by PHY auto polling, regardless of the result of phy_init_eee().
+
+Define these bits and add them to the MT7531_FORCE_MODE mask which is set
+in mt7531_setup_common(). With this, there won't be any EEE abilities set
+when phy_init_eee() returns a negative value.
+
+Thanks to Russell for explaining when phy_init_eee() could return a
+negative value below.
+
+Looking at phy_init_eee(), it could return a negative value when:
+
+1. phydev->drv is NULL
+2. if genphy_c45_eee_is_active() returns negative
+3. if genphy_c45_eee_is_active() returns zero, it returns -EPROTONOSUPPORT
+4. if phy_set_bits_mmd() fails (e.g. communication error with the PHY)
+
+If we then look at genphy_c45_eee_is_active(), then:
+
+genphy_c45_read_eee_adv() and genphy_c45_read_eee_lpa() propagate their
+non-zero return values, otherwise this function returns zero or positive
+integer.
+
+If we then look at genphy_c45_read_eee_adv(), then a failure of
+phy_read_mmd() would cause a negative value to be returned.
+
+Looking at genphy_c45_read_eee_lpa(), the same is true.
+
+So, it can be summarised as:
+
+- phydev->drv is NULL
+- there is a communication error accessing the PHY
+- EEE is not active
+
+otherwise, it returns zero on success.
+
+If one wishes to determine whether an error occurred vs EEE not being
+supported through negotiation for the negotiated speed, if it returns
+-EPROTONOSUPPORT in the latter case. Other error codes mean either the
+driver has been unloaded or communication error.
+
+In conclusion, determining the EEE abilities by PHY auto polling shouldn't
+result in having any EEE abilities enabled, when one of the last two
+situations in the summary happens. And it seems that if phydev->drv is
+NULL, there would be bigger problems with the device than a broken link. So
+this is not a bugfix.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.h | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -328,11 +328,15 @@ enum mt7530_vlan_port_acc_frm {
+ #define  MT7531_FORCE_DPX		BIT(29)
+ #define  MT7531_FORCE_RX_FC		BIT(28)
+ #define  MT7531_FORCE_TX_FC		BIT(27)
++#define  MT7531_FORCE_EEE100		BIT(26)
++#define  MT7531_FORCE_EEE1G		BIT(25)
+ #define  MT7531_FORCE_MODE		(MT7531_FORCE_LNK | \
+ 					 MT7531_FORCE_SPD | \
+ 					 MT7531_FORCE_DPX | \
+ 					 MT7531_FORCE_RX_FC | \
+-					 MT7531_FORCE_TX_FC)
++					 MT7531_FORCE_TX_FC | \
++					 MT7531_FORCE_EEE100 | \
++					 MT7531_FORCE_EEE1G)
+ #define  PMCR_LINK_SETTINGS_MASK	(PMCR_TX_EN | PMCR_FORCE_SPEED_1000 | \
+ 					 PMCR_RX_EN | PMCR_FORCE_SPEED_100 | \
+ 					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
diff --git a/target/linux/generic/pending-6.6/745-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch b/target/linux/generic/pending-6.6/745-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
new file mode 100644
index 0000000000..89fad45dd5
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
@@ -0,0 +1,200 @@
+From 712ad00d2f43814c81a7abfcbc339690a05fb6a0 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:09 +0300
+Subject: [PATCH 02/15] net: dsa: mt7530: refactor MT7530_PMCR_P()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530_PMCR_P() registers are on MT7530, MT7531, and the switch on the
+MT7988 SoC. Rename the definition for them to MT753X_PMCR_P(). Bit 15 is
+for MT7530 only. Add MT7530 prefix to the definition for bit 15.
+
+Use GENMASK and FIELD_PREP for PMCR_IFG_XMIT().
+
+Rename PMCR_TX_EN and PMCR_RX_EN to PMCR_MAC_TX_EN and PMCR_MAC_TX_EN to
+follow the naming on the "MT7621 Giga Switch Programming Guide v0.3",
+"MT7531 Reference Manual for Development Board v1.0", and "MT7988A Wi-Fi 7
+Generation Router Platform: Datasheet (Open Version) v0.1" documents.
+
+These documents show that PMCR_RX_FC_EN is at bit 5. Correct this along
+with renaming it to PMCR_FORCE_RX_FC_EN, and the same for PMCR_TX_FC_EN.
+
+Remove PMCR_SPEED_MASK which doesn't have a use.
+
+Rename the force mode definitions for MT7531 to FORCE_MODE. Add MASK at the
+end for the mask that includes all force mode definitions.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 24 ++++++++---------
+ drivers/net/dsa/mt7530.h | 58 +++++++++++++++++++++-------------------
+ 2 files changed, 42 insertions(+), 40 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -896,7 +896,7 @@ static void mt7530_setup_port5(struct ds
+ 		val &= ~MHWTRAP_P5_MAC_SEL & ~MHWTRAP_P5_DIS;
+ 
+ 		/* Setup the MAC by default for the cpu port */
+-		mt7530_write(priv, MT7530_PMCR_P(5), 0x56300);
++		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+ 		break;
+ 	case P5_INTF_SEL_GMAC5:
+ 		/* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */
+@@ -2444,8 +2444,8 @@ mt7530_setup(struct dsa_switch *ds)
+ 		/* Clear link settings and enable force mode to force link down
+ 		 * on all ports until they're enabled later.
+ 		 */
+-		mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
+-			   PMCR_FORCE_MODE, PMCR_FORCE_MODE);
++		mt7530_rmw(priv, MT753X_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
++			   MT7530_FORCE_MODE, MT7530_FORCE_MODE);
+ 
+ 		/* Disable forwarding by default on all ports */
+ 		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
+@@ -2555,8 +2555,8 @@ mt7531_setup_common(struct dsa_switch *d
+ 		/* Clear link settings and enable force mode to force link down
+ 		 * on all ports until they're enabled later.
+ 		 */
+-		mt7530_rmw(priv, MT7530_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
+-			   MT7531_FORCE_MODE, MT7531_FORCE_MODE);
++		mt7530_rmw(priv, MT753X_PMCR_P(i), PMCR_LINK_SETTINGS_MASK |
++			   MT7531_FORCE_MODE_MASK, MT7531_FORCE_MODE_MASK);
+ 
+ 		/* Disable forwarding by default on all ports */
+ 		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
+@@ -2639,7 +2639,7 @@ mt7531_setup(struct dsa_switch *ds)
+ 
+ 	/* Force link down on all ports before internal reset */
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++)
+-		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
++		mt7530_write(priv, MT753X_PMCR_P(i), MT7531_FORCE_MODE_LNK);
+ 
+ 	/* Reset the switch through internal reset */
+ 	mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_SW_RST | SYS_CTRL_REG_RST);
+@@ -2881,7 +2881,7 @@ mt753x_phylink_mac_config(struct phylink
+ 
+ 	/* Are we connected to external phy */
+ 	if (port == 5 && dsa_is_user_port(ds, 5))
+-		mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY);
++		mt7530_set(priv, MT753X_PMCR_P(port), PMCR_EXT_PHY);
+ }
+ 
+ static void mt753x_phylink_mac_link_down(struct phylink_config *config,
+@@ -2891,7 +2891,7 @@ static void mt753x_phylink_mac_link_down
+ 	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct mt7530_priv *priv = dp->ds->priv;
+ 
+-	mt7530_clear(priv, MT7530_PMCR_P(dp->index), PMCR_LINK_SETTINGS_MASK);
++	mt7530_clear(priv, MT753X_PMCR_P(dp->index), PMCR_LINK_SETTINGS_MASK);
+ }
+ 
+ static void mt753x_phylink_mac_link_up(struct phylink_config *config,
+@@ -2905,7 +2905,7 @@ static void mt753x_phylink_mac_link_up(s
+ 	struct mt7530_priv *priv = dp->ds->priv;
+ 	u32 mcr;
+ 
+-	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
++	mcr = PMCR_MAC_RX_EN | PMCR_MAC_TX_EN | PMCR_FORCE_LNK;
+ 
+ 	switch (speed) {
+ 	case SPEED_1000:
+@@ -2920,9 +2920,9 @@ static void mt753x_phylink_mac_link_up(s
+ 	if (duplex == DUPLEX_FULL) {
+ 		mcr |= PMCR_FORCE_FDX;
+ 		if (tx_pause)
+-			mcr |= PMCR_TX_FC_EN;
++			mcr |= PMCR_FORCE_TX_FC_EN;
+ 		if (rx_pause)
+-			mcr |= PMCR_RX_FC_EN;
++			mcr |= PMCR_FORCE_RX_FC_EN;
+ 	}
+ 
+ 	if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
+@@ -2937,7 +2937,7 @@ static void mt753x_phylink_mac_link_up(s
+ 		}
+ 	}
+ 
+-	mt7530_set(priv, MT7530_PMCR_P(dp->index), mcr);
++	mt7530_set(priv, MT753X_PMCR_P(dp->index), mcr);
+ }
+ 
+ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -304,44 +304,46 @@ enum mt7530_vlan_port_acc_frm {
+ #define  G0_PORT_VID_DEF		G0_PORT_VID(0)
+ 
+ /* Register for port MAC control register */
+-#define MT7530_PMCR_P(x)		(0x3000 + ((x) * 0x100))
+-#define  PMCR_IFG_XMIT(x)		(((x) & 0x3) << 18)
++#define MT753X_PMCR_P(x)		(0x3000 + ((x) * 0x100))
++#define  PMCR_IFG_XMIT_MASK		GENMASK(19, 18)
++#define  PMCR_IFG_XMIT(x)		FIELD_PREP(PMCR_IFG_XMIT_MASK, x)
+ #define  PMCR_EXT_PHY			BIT(17)
+ #define  PMCR_MAC_MODE			BIT(16)
+-#define  PMCR_FORCE_MODE		BIT(15)
+-#define  PMCR_TX_EN			BIT(14)
+-#define  PMCR_RX_EN			BIT(13)
++#define  MT7530_FORCE_MODE		BIT(15)
++#define  PMCR_MAC_TX_EN			BIT(14)
++#define  PMCR_MAC_RX_EN			BIT(13)
+ #define  PMCR_BACKOFF_EN		BIT(9)
+ #define  PMCR_BACKPR_EN			BIT(8)
+ #define  PMCR_FORCE_EEE1G		BIT(7)
+ #define  PMCR_FORCE_EEE100		BIT(6)
+-#define  PMCR_TX_FC_EN			BIT(5)
+-#define  PMCR_RX_FC_EN			BIT(4)
++#define  PMCR_FORCE_RX_FC_EN		BIT(5)
++#define  PMCR_FORCE_TX_FC_EN		BIT(4)
+ #define  PMCR_FORCE_SPEED_1000		BIT(3)
+ #define  PMCR_FORCE_SPEED_100		BIT(2)
+ #define  PMCR_FORCE_FDX			BIT(1)
+ #define  PMCR_FORCE_LNK			BIT(0)
+-#define  PMCR_SPEED_MASK		(PMCR_FORCE_SPEED_100 | \
+-					 PMCR_FORCE_SPEED_1000)
+-#define  MT7531_FORCE_LNK		BIT(31)
+-#define  MT7531_FORCE_SPD		BIT(30)
+-#define  MT7531_FORCE_DPX		BIT(29)
+-#define  MT7531_FORCE_RX_FC		BIT(28)
+-#define  MT7531_FORCE_TX_FC		BIT(27)
+-#define  MT7531_FORCE_EEE100		BIT(26)
+-#define  MT7531_FORCE_EEE1G		BIT(25)
+-#define  MT7531_FORCE_MODE		(MT7531_FORCE_LNK | \
+-					 MT7531_FORCE_SPD | \
+-					 MT7531_FORCE_DPX | \
+-					 MT7531_FORCE_RX_FC | \
+-					 MT7531_FORCE_TX_FC | \
+-					 MT7531_FORCE_EEE100 | \
+-					 MT7531_FORCE_EEE1G)
+-#define  PMCR_LINK_SETTINGS_MASK	(PMCR_TX_EN | PMCR_FORCE_SPEED_1000 | \
+-					 PMCR_RX_EN | PMCR_FORCE_SPEED_100 | \
+-					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
+-					 PMCR_FORCE_FDX | PMCR_FORCE_LNK | \
+-					 PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100)
++#define  MT7531_FORCE_MODE_LNK		BIT(31)
++#define  MT7531_FORCE_MODE_SPD		BIT(30)
++#define  MT7531_FORCE_MODE_DPX		BIT(29)
++#define  MT7531_FORCE_MODE_RX_FC	BIT(28)
++#define  MT7531_FORCE_MODE_TX_FC	BIT(27)
++#define  MT7531_FORCE_MODE_EEE100	BIT(26)
++#define  MT7531_FORCE_MODE_EEE1G	BIT(25)
++#define  MT7531_FORCE_MODE_MASK		(MT7531_FORCE_MODE_LNK | \
++					 MT7531_FORCE_MODE_SPD | \
++					 MT7531_FORCE_MODE_DPX | \
++					 MT7531_FORCE_MODE_RX_FC | \
++					 MT7531_FORCE_MODE_TX_FC | \
++					 MT7531_FORCE_MODE_EEE100 | \
++					 MT7531_FORCE_MODE_EEE1G)
++#define  PMCR_LINK_SETTINGS_MASK	(PMCR_MAC_TX_EN | PMCR_MAC_RX_EN | \
++					 PMCR_FORCE_EEE1G | \
++					 PMCR_FORCE_EEE100 | \
++					 PMCR_FORCE_RX_FC_EN | \
++					 PMCR_FORCE_TX_FC_EN | \
++					 PMCR_FORCE_SPEED_1000 | \
++					 PMCR_FORCE_SPEED_100 | \
++					 PMCR_FORCE_FDX | PMCR_FORCE_LNK)
+ 
+ #define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
+ #define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
diff --git a/target/linux/generic/pending-6.6/745-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch b/target/linux/generic/pending-6.6/745-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
new file mode 100644
index 0000000000..601171a594
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
@@ -0,0 +1,185 @@
+From 875ec5b67ab88e969b171e6e9ea803e3ed759614 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:10 +0300
+Subject: [PATCH 03/15] net: dsa: mt7530: rename p5_intf_sel and use only for
+ MT7530 switch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The p5_intf_sel pointer is used to store the information of whether PHY
+muxing is used or not. PHY muxing is a feature specific to port 5 of the
+MT7530 switch. Do not use it for other switch models.
+
+Rename the pointer to p5_mode to store the mode the port is being used in.
+Rename the p5_interface_select enum to mt7530_p5_mode, the string
+representation to mt7530_p5_mode_str, and the enum elements.
+
+If PHY muxing is not detected, the default mode, GMAC5, will be used.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 62 +++++++++++++++++-----------------------
+ drivers/net/dsa/mt7530.h | 15 +++++-----
+ 2 files changed, 33 insertions(+), 44 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -857,19 +857,15 @@ mt7530_set_ageing_time(struct dsa_switch
+ 	return 0;
+ }
+ 
+-static const char *p5_intf_modes(unsigned int p5_interface)
++static const char *mt7530_p5_mode_str(unsigned int mode)
+ {
+-	switch (p5_interface) {
+-	case P5_DISABLED:
+-		return "DISABLED";
+-	case P5_INTF_SEL_PHY_P0:
+-		return "PHY P0";
+-	case P5_INTF_SEL_PHY_P4:
+-		return "PHY P4";
+-	case P5_INTF_SEL_GMAC5:
+-		return "GMAC5";
++	switch (mode) {
++	case MUX_PHY_P0:
++		return "MUX PHY P0";
++	case MUX_PHY_P4:
++		return "MUX PHY P4";
+ 	default:
+-		return "unknown";
++		return "GMAC5";
+ 	}
+ }
+ 
+@@ -886,23 +882,23 @@ static void mt7530_setup_port5(struct ds
+ 	val |= MHWTRAP_MANUAL | MHWTRAP_P5_MAC_SEL | MHWTRAP_P5_DIS;
+ 	val &= ~MHWTRAP_P5_RGMII_MODE & ~MHWTRAP_PHY0_SEL;
+ 
+-	switch (priv->p5_intf_sel) {
+-	case P5_INTF_SEL_PHY_P0:
+-		/* MT7530_P5_MODE_GPHY_P0: 2nd GMAC -> P5 -> P0 */
++	switch (priv->p5_mode) {
++	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
++	case MUX_PHY_P0:
+ 		val |= MHWTRAP_PHY0_SEL;
+ 		fallthrough;
+-	case P5_INTF_SEL_PHY_P4:
+-		/* MT7530_P5_MODE_GPHY_P4: 2nd GMAC -> P5 -> P4 */
++
++	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
++	case MUX_PHY_P4:
+ 		val &= ~MHWTRAP_P5_MAC_SEL & ~MHWTRAP_P5_DIS;
+ 
+ 		/* Setup the MAC by default for the cpu port */
+ 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+ 		break;
+-	case P5_INTF_SEL_GMAC5:
+-		/* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */
+-		val &= ~MHWTRAP_P5_DIS;
+-		break;
++
++	/* GMAC5: P5 -> SoC MAC or external PHY */
+ 	default:
++		val &= ~MHWTRAP_P5_DIS;
+ 		break;
+ 	}
+ 
+@@ -930,8 +926,8 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	mt7530_write(priv, MT7530_MHWTRAP, val);
+ 
+-	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n",
+-		val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface));
++	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, mode=%s, phy-mode=%s\n", val,
++		mt7530_p5_mode_str(priv->p5_mode), phy_modes(interface));
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ }
+@@ -2476,13 +2472,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 	if (ret)
+ 		return ret;
+ 
+-	/* Setup port 5 */
+-	if (!dsa_is_unused_port(ds, 5)) {
+-		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+-	} else {
++	/* Check for PHY muxing on port 5 */
++	if (dsa_is_unused_port(ds, 5)) {
+ 		/* Scan the ethernet nodes. Look for GMAC1, lookup the used PHY.
+-		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
+-		 * is detected.
++		 * Set priv->p5_mode to the appropriate value if PHY muxing is
++		 * detected.
+ 		 */
+ 		for_each_child_of_node(dn, mac_np) {
+ 			if (!of_device_is_compatible(mac_np,
+@@ -2506,17 +2500,16 @@ mt7530_setup(struct dsa_switch *ds)
+ 				}
+ 				id = of_mdio_parse_addr(ds->dev, phy_node);
+ 				if (id == 0)
+-					priv->p5_intf_sel = P5_INTF_SEL_PHY_P0;
++					priv->p5_mode = MUX_PHY_P0;
+ 				if (id == 4)
+-					priv->p5_intf_sel = P5_INTF_SEL_PHY_P4;
++					priv->p5_mode = MUX_PHY_P4;
+ 			}
+ 			of_node_put(mac_np);
+ 			of_node_put(phy_node);
+ 			break;
+ 		}
+ 
+-		if (priv->p5_intf_sel == P5_INTF_SEL_PHY_P0 ||
+-		    priv->p5_intf_sel == P5_INTF_SEL_PHY_P4)
++		if (priv->p5_mode == MUX_PHY_P0 || priv->p5_mode == MUX_PHY_P4)
+ 			mt7530_setup_port5(ds, interface);
+ 	}
+ 
+@@ -2654,9 +2647,6 @@ mt7531_setup(struct dsa_switch *ds)
+ 			   MT7531_EXT_P_MDIO_12);
+ 	}
+ 
+-	if (!dsa_is_unused_port(ds, 5))
+-		priv->p5_intf_sel = P5_INTF_SEL_GMAC5;
+-
+ 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
+ 		   MT7531_GPIO0_INTERRUPT);
+ 
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -708,12 +708,11 @@ struct mt7530_port {
+ 	struct phylink_pcs *sgmii_pcs;
+ };
+ 
+-/* Port 5 interface select definitions */
+-enum p5_interface_select {
+-	P5_DISABLED,
+-	P5_INTF_SEL_PHY_P0,
+-	P5_INTF_SEL_PHY_P4,
+-	P5_INTF_SEL_GMAC5,
++/* Port 5 mode definitions of the MT7530 switch */
++enum mt7530_p5_mode {
++	GMAC5,
++	MUX_PHY_P0,
++	MUX_PHY_P4,
+ };
+ 
+ struct mt7530_priv;
+@@ -776,7 +775,7 @@ struct mt753x_info {
+  * @ports:		Holding the state among ports
+  * @reg_mutex:		The lock for protecting among process accessing
+  *			registers
+- * @p5_intf_sel:	Holding the current port 5 interface select
++ * @p5_mode:		Holding the current mode of port 5 of the MT7530 switch
+  * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
+  *			has got SGMII
+  * @irq:		IRQ number of the switch
+@@ -798,7 +797,7 @@ struct mt7530_priv {
+ 	const struct mt753x_info *info;
+ 	unsigned int		id;
+ 	bool			mcm;
+-	enum p5_interface_select p5_intf_sel;
++	enum mt7530_p5_mode	p5_mode;
+ 	bool			p5_sgmii;
+ 	u8			mirror_rx;
+ 	u8			mirror_tx;
diff --git a/target/linux/generic/pending-6.6/745-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch b/target/linux/generic/pending-6.6/745-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
new file mode 100644
index 0000000000..948baf58d0
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
@@ -0,0 +1,169 @@
+From 83fe3df057e641cd0e88425e579d7a5a370ca430 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:11 +0300
+Subject: [PATCH 04/15] net: dsa: mt7530: rename mt753x_bpdu_port_fw enum to
+ mt753x_to_cpu_fw
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The mt753x_bpdu_port_fw enum is globally used for manipulating the process
+of deciding the forwardable ports, specifically concerning the CPU port(s).
+Therefore, rename it and the values in it to mt753x_to_cpu_fw.
+
+Change FOLLOW_MFC to SYSTEM_DEFAULT to be on par with the switch documents.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 44 ++++++++++-------------
+ drivers/net/dsa/mt7530.h | 76 ++++++++++++++++++++--------------------
+ 2 files changed, 56 insertions(+), 64 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1107,42 +1107,34 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 	 * VLAN-untagged.
+ 	 */
+ 	mt7530_rmw(priv, MT753X_BPC,
+-		   MT753X_PAE_BPDU_FR | MT753X_PAE_EG_TAG_MASK |
+-			   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
+-			   MT753X_BPDU_PORT_FW_MASK,
+-		   MT753X_PAE_BPDU_FR |
+-			   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-			   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_BPDU_CPU_ONLY);
++		   PAE_BPDU_FR | PAE_EG_TAG_MASK | PAE_PORT_FW_MASK |
++			   BPDU_EG_TAG_MASK | BPDU_PORT_FW_MASK,
++		   PAE_BPDU_FR | PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   PAE_PORT_FW(TO_CPU_FW_CPU_ONLY) |
++			   BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   TO_CPU_FW_CPU_ONLY);
+ 
+ 	/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress
+ 	 * them VLAN-untagged.
+ 	 */
+ 	mt7530_rmw(priv, MT753X_RGAC1,
+-		   MT753X_R02_BPDU_FR | MT753X_R02_EG_TAG_MASK |
+-			   MT753X_R02_PORT_FW_MASK | MT753X_R01_BPDU_FR |
+-			   MT753X_R01_EG_TAG_MASK | MT753X_R01_PORT_FW_MASK,
+-		   MT753X_R02_BPDU_FR |
+-			   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-			   MT753X_R01_BPDU_FR |
+-			   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_BPDU_CPU_ONLY);
++		   R02_BPDU_FR | R02_EG_TAG_MASK | R02_PORT_FW_MASK |
++			   R01_BPDU_FR | R01_EG_TAG_MASK | R01_PORT_FW_MASK,
++		   R02_BPDU_FR | R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   R02_PORT_FW(TO_CPU_FW_CPU_ONLY) | R01_BPDU_FR |
++			   R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   TO_CPU_FW_CPU_ONLY);
+ 
+ 	/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress
+ 	 * them VLAN-untagged.
+ 	 */
+ 	mt7530_rmw(priv, MT753X_RGAC2,
+-		   MT753X_R0E_BPDU_FR | MT753X_R0E_EG_TAG_MASK |
+-			   MT753X_R0E_PORT_FW_MASK | MT753X_R03_BPDU_FR |
+-			   MT753X_R03_EG_TAG_MASK | MT753X_R03_PORT_FW_MASK,
+-		   MT753X_R0E_BPDU_FR |
+-			   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
+-			   MT753X_R03_BPDU_FR |
+-			   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
+-			   MT753X_BPDU_CPU_ONLY);
++		   R0E_BPDU_FR | R0E_EG_TAG_MASK | R0E_PORT_FW_MASK |
++			   R03_BPDU_FR | R03_EG_TAG_MASK | R03_PORT_FW_MASK,
++		   R0E_BPDU_FR | R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   R0E_PORT_FW(TO_CPU_FW_CPU_ONLY) | R03_BPDU_FR |
++			   R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
++			   TO_CPU_FW_CPU_ONLY);
+ }
+ 
+ static void
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -67,47 +67,47 @@ enum mt753x_id {
+ #define MT753X_MIRROR_MASK(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+ 					 MT7531_MIRROR_MASK : MIRROR_MASK)
+ 
+-/* Registers for BPDU and PAE frame control*/
++/* Register for BPDU and PAE frame control */
+ #define MT753X_BPC			0x24
+-#define  MT753X_PAE_BPDU_FR		BIT(25)
+-#define  MT753X_PAE_EG_TAG_MASK		GENMASK(24, 22)
+-#define  MT753X_PAE_EG_TAG(x)		FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x)
+-#define  MT753X_PAE_PORT_FW_MASK	GENMASK(18, 16)
+-#define  MT753X_PAE_PORT_FW(x)		FIELD_PREP(MT753X_PAE_PORT_FW_MASK, x)
+-#define  MT753X_BPDU_EG_TAG_MASK	GENMASK(8, 6)
+-#define  MT753X_BPDU_EG_TAG(x)		FIELD_PREP(MT753X_BPDU_EG_TAG_MASK, x)
+-#define  MT753X_BPDU_PORT_FW_MASK	GENMASK(2, 0)
++#define  PAE_BPDU_FR			BIT(25)
++#define  PAE_EG_TAG_MASK		GENMASK(24, 22)
++#define  PAE_EG_TAG(x)			FIELD_PREP(PAE_EG_TAG_MASK, x)
++#define  PAE_PORT_FW_MASK		GENMASK(18, 16)
++#define  PAE_PORT_FW(x)			FIELD_PREP(PAE_PORT_FW_MASK, x)
++#define  BPDU_EG_TAG_MASK		GENMASK(8, 6)
++#define  BPDU_EG_TAG(x)			FIELD_PREP(BPDU_EG_TAG_MASK, x)
++#define  BPDU_PORT_FW_MASK		GENMASK(2, 0)
+ 
+-/* Register for :01 and :02 MAC DA frame control */
++/* Register for 01-80-C2-00-00-[01,02] MAC DA frame control */
+ #define MT753X_RGAC1			0x28
+-#define  MT753X_R02_BPDU_FR		BIT(25)
+-#define  MT753X_R02_EG_TAG_MASK		GENMASK(24, 22)
+-#define  MT753X_R02_EG_TAG(x)		FIELD_PREP(MT753X_R02_EG_TAG_MASK, x)
+-#define  MT753X_R02_PORT_FW_MASK	GENMASK(18, 16)
+-#define  MT753X_R02_PORT_FW(x)		FIELD_PREP(MT753X_R02_PORT_FW_MASK, x)
+-#define  MT753X_R01_BPDU_FR		BIT(9)
+-#define  MT753X_R01_EG_TAG_MASK		GENMASK(8, 6)
+-#define  MT753X_R01_EG_TAG(x)		FIELD_PREP(MT753X_R01_EG_TAG_MASK, x)
+-#define  MT753X_R01_PORT_FW_MASK	GENMASK(2, 0)
++#define  R02_BPDU_FR			BIT(25)
++#define  R02_EG_TAG_MASK		GENMASK(24, 22)
++#define  R02_EG_TAG(x)			FIELD_PREP(R02_EG_TAG_MASK, x)
++#define  R02_PORT_FW_MASK		GENMASK(18, 16)
++#define  R02_PORT_FW(x)			FIELD_PREP(R02_PORT_FW_MASK, x)
++#define  R01_BPDU_FR			BIT(9)
++#define  R01_EG_TAG_MASK		GENMASK(8, 6)
++#define  R01_EG_TAG(x)			FIELD_PREP(R01_EG_TAG_MASK, x)
++#define  R01_PORT_FW_MASK		GENMASK(2, 0)
+ 
+-/* Register for :03 and :0E MAC DA frame control */
++/* Register for 01-80-C2-00-00-[03,0E] MAC DA frame control */
+ #define MT753X_RGAC2			0x2c
+-#define  MT753X_R0E_BPDU_FR		BIT(25)
+-#define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
+-#define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
+-#define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
+-#define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
+-#define  MT753X_R03_BPDU_FR		BIT(9)
+-#define  MT753X_R03_EG_TAG_MASK		GENMASK(8, 6)
+-#define  MT753X_R03_EG_TAG(x)		FIELD_PREP(MT753X_R03_EG_TAG_MASK, x)
+-#define  MT753X_R03_PORT_FW_MASK	GENMASK(2, 0)
++#define  R0E_BPDU_FR			BIT(25)
++#define  R0E_EG_TAG_MASK		GENMASK(24, 22)
++#define  R0E_EG_TAG(x)			FIELD_PREP(R0E_EG_TAG_MASK, x)
++#define  R0E_PORT_FW_MASK		GENMASK(18, 16)
++#define  R0E_PORT_FW(x)			FIELD_PREP(R0E_PORT_FW_MASK, x)
++#define  R03_BPDU_FR			BIT(9)
++#define  R03_EG_TAG_MASK		GENMASK(8, 6)
++#define  R03_EG_TAG(x)			FIELD_PREP(R03_EG_TAG_MASK, x)
++#define  R03_PORT_FW_MASK		GENMASK(2, 0)
+ 
+-enum mt753x_bpdu_port_fw {
+-	MT753X_BPDU_FOLLOW_MFC,
+-	MT753X_BPDU_CPU_EXCLUDE = 4,
+-	MT753X_BPDU_CPU_INCLUDE = 5,
+-	MT753X_BPDU_CPU_ONLY = 6,
+-	MT753X_BPDU_DROP = 7,
++enum mt753x_to_cpu_fw {
++	TO_CPU_FW_SYSTEM_DEFAULT,
++	TO_CPU_FW_CPU_EXCLUDE = 4,
++	TO_CPU_FW_CPU_INCLUDE = 5,
++	TO_CPU_FW_CPU_ONLY = 6,
++	TO_CPU_FW_DROP = 7,
+ };
+ 
+ /* Registers for address table access */
diff --git a/target/linux/generic/pending-6.6/745-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch b/target/linux/generic/pending-6.6/745-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
new file mode 100644
index 0000000000..a5d293b509
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
@@ -0,0 +1,201 @@
+From 1dbc1bdc2869e6d2929235c70d64e393aa5a5fa2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:12 +0300
+Subject: [PATCH 05/15] net: dsa: mt7530: refactor MT7530_MFC and MT7531_CFC,
+ add MT7531_QRY_FFP
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530_MFC register is on MT7530, MT7531, and the switch on the MT7988
+SoC. Rename it to MT753X_MFC. Bit 7 to 0 differs between MT7530 and
+MT7531/MT7988. Add MT7530 prefix to these definitions, and define the
+IGMP/MLD Query Frame Flooding Ports mask for MT7531.
+
+Rename the cases of MIRROR_MASK to MIRROR_PORT_MASK.
+
+Move mt753x_mirror_port_get() and mt753x_port_mirror_set() to mt7530.h as
+macros.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 38 ++++++++--------------
+ drivers/net/dsa/mt7530.h | 69 +++++++++++++++++++++++++---------------
+ 2 files changed, 57 insertions(+), 50 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1147,7 +1147,7 @@ mt753x_cpu_port_enable(struct dsa_switch
+ 		     PORT_SPEC_TAG);
+ 
+ 	/* Enable flooding on the CPU port */
+-	mt7530_set(priv, MT7530_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
++	mt7530_set(priv, MT753X_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
+ 		   UNU_FFP(BIT(port)));
+ 
+ 	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
+@@ -1311,15 +1311,15 @@ mt7530_port_bridge_flags(struct dsa_swit
+ 			   flags.val & BR_LEARNING ? 0 : SA_DIS);
+ 
+ 	if (flags.mask & BR_FLOOD)
+-		mt7530_rmw(priv, MT7530_MFC, UNU_FFP(BIT(port)),
++		mt7530_rmw(priv, MT753X_MFC, UNU_FFP(BIT(port)),
+ 			   flags.val & BR_FLOOD ? UNU_FFP(BIT(port)) : 0);
+ 
+ 	if (flags.mask & BR_MCAST_FLOOD)
+-		mt7530_rmw(priv, MT7530_MFC, UNM_FFP(BIT(port)),
++		mt7530_rmw(priv, MT753X_MFC, UNM_FFP(BIT(port)),
+ 			   flags.val & BR_MCAST_FLOOD ? UNM_FFP(BIT(port)) : 0);
+ 
+ 	if (flags.mask & BR_BCAST_FLOOD)
+-		mt7530_rmw(priv, MT7530_MFC, BC_FFP(BIT(port)),
++		mt7530_rmw(priv, MT753X_MFC, BC_FFP(BIT(port)),
+ 			   flags.val & BR_BCAST_FLOOD ? BC_FFP(BIT(port)) : 0);
+ 
+ 	return 0;
+@@ -1855,20 +1855,6 @@ mt7530_port_vlan_del(struct dsa_switch *
+ 	return 0;
+ }
+ 
+-static int mt753x_mirror_port_get(unsigned int id, u32 val)
+-{
+-	return (id == ID_MT7531 || id == ID_MT7988) ?
+-		       MT7531_MIRROR_PORT_GET(val) :
+-		       MIRROR_PORT(val);
+-}
+-
+-static int mt753x_mirror_port_set(unsigned int id, u32 val)
+-{
+-	return (id == ID_MT7531 || id == ID_MT7988) ?
+-		       MT7531_MIRROR_PORT_SET(val) :
+-		       MIRROR_PORT(val);
+-}
+-
+ static int mt753x_port_mirror_add(struct dsa_switch *ds, int port,
+ 				  struct dsa_mall_mirror_tc_entry *mirror,
+ 				  bool ingress, struct netlink_ext_ack *extack)
+@@ -1884,14 +1870,14 @@ static int mt753x_port_mirror_add(struct
+ 	val = mt7530_read(priv, MT753X_MIRROR_REG(priv->id));
+ 
+ 	/* MT7530 only supports one monitor port */
+-	monitor_port = mt753x_mirror_port_get(priv->id, val);
++	monitor_port = MT753X_MIRROR_PORT_GET(priv->id, val);
+ 	if (val & MT753X_MIRROR_EN(priv->id) &&
+ 	    monitor_port != mirror->to_local_port)
+ 		return -EEXIST;
+ 
+ 	val |= MT753X_MIRROR_EN(priv->id);
+-	val &= ~MT753X_MIRROR_MASK(priv->id);
+-	val |= mt753x_mirror_port_set(priv->id, mirror->to_local_port);
++	val &= ~MT753X_MIRROR_PORT_MASK(priv->id);
++	val |= MT753X_MIRROR_PORT_SET(priv->id, mirror->to_local_port);
+ 	mt7530_write(priv, MT753X_MIRROR_REG(priv->id), val);
+ 
+ 	val = mt7530_read(priv, MT7530_PCR_P(port));
+@@ -2533,7 +2519,7 @@ mt7531_setup_common(struct dsa_switch *d
+ 	mt7530_mib_reset(ds);
+ 
+ 	/* Disable flooding on all ports */
+-	mt7530_clear(priv, MT7530_MFC, BC_FFP_MASK | UNM_FFP_MASK |
++	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
+ 		     UNU_FFP_MASK);
+ 
+ 	for (i = 0; i < MT7530_NUM_PORTS; i++) {
+@@ -3089,10 +3075,12 @@ mt753x_conduit_state_change(struct dsa_s
+ 	else
+ 		priv->active_cpu_ports &= ~mask;
+ 
+-	if (priv->active_cpu_ports)
+-		val = CPU_EN | CPU_PORT(__ffs(priv->active_cpu_ports));
++	if (priv->active_cpu_ports) {
++		val = MT7530_CPU_EN |
++		      MT7530_CPU_PORT(__ffs(priv->active_cpu_ports));
++	}
+ 
+-	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
++	mt7530_rmw(priv, MT753X_MFC, MT7530_CPU_EN | MT7530_CPU_PORT_MASK, val);
+ }
+ 
+ static int mt7988_setup(struct dsa_switch *ds)
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -36,36 +36,55 @@ enum mt753x_id {
+ #define MT753X_AGC			0xc
+ #define  LOCAL_EN			BIT(7)
+ 
+-/* Registers to mac forward control for unknown frames */
+-#define MT7530_MFC			0x10
+-#define  BC_FFP(x)			(((x) & 0xff) << 24)
+-#define  BC_FFP_MASK			BC_FFP(~0)
+-#define  UNM_FFP(x)			(((x) & 0xff) << 16)
+-#define  UNM_FFP_MASK			UNM_FFP(~0)
+-#define  UNU_FFP(x)			(((x) & 0xff) << 8)
+-#define  UNU_FFP_MASK			UNU_FFP(~0)
+-#define  CPU_EN				BIT(7)
+-#define  CPU_PORT_MASK			GENMASK(6, 4)
+-#define  CPU_PORT(x)			FIELD_PREP(CPU_PORT_MASK, x)
+-#define  MIRROR_EN			BIT(3)
+-#define  MIRROR_PORT(x)			((x) & 0x7)
+-#define  MIRROR_MASK			0x7
++/* Register for MAC forward control */
++#define MT753X_MFC			0x10
++#define  BC_FFP_MASK			GENMASK(31, 24)
++#define  BC_FFP(x)			FIELD_PREP(BC_FFP_MASK, x)
++#define  UNM_FFP_MASK			GENMASK(23, 16)
++#define  UNM_FFP(x)			FIELD_PREP(UNM_FFP_MASK, x)
++#define  UNU_FFP_MASK			GENMASK(15, 8)
++#define  UNU_FFP(x)			FIELD_PREP(UNU_FFP_MASK, x)
++#define  MT7530_CPU_EN			BIT(7)
++#define  MT7530_CPU_PORT_MASK		GENMASK(6, 4)
++#define  MT7530_CPU_PORT(x)		FIELD_PREP(MT7530_CPU_PORT_MASK, x)
++#define  MT7530_MIRROR_EN		BIT(3)
++#define  MT7530_MIRROR_PORT_MASK	GENMASK(2, 0)
++#define  MT7530_MIRROR_PORT_GET(x)	FIELD_GET(MT7530_MIRROR_PORT_MASK, x)
++#define  MT7530_MIRROR_PORT_SET(x)	FIELD_PREP(MT7530_MIRROR_PORT_MASK, x)
++#define  MT7531_QRY_FFP_MASK		GENMASK(7, 0)
++#define  MT7531_QRY_FFP(x)		FIELD_PREP(MT7531_QRY_FFP_MASK, x)
+ 
+-/* Registers for CPU forward control */
++/* Register for CPU forward control */
+ #define MT7531_CFC			0x4
+ #define  MT7531_MIRROR_EN		BIT(19)
+-#define  MT7531_MIRROR_MASK		(MIRROR_MASK << 16)
+-#define  MT7531_MIRROR_PORT_GET(x)	(((x) >> 16) & MIRROR_MASK)
+-#define  MT7531_MIRROR_PORT_SET(x)	(((x) & MIRROR_MASK) << 16)
++#define  MT7531_MIRROR_PORT_MASK	GENMASK(18, 16)
++#define  MT7531_MIRROR_PORT_GET(x)	FIELD_GET(MT7531_MIRROR_PORT_MASK, x)
++#define  MT7531_MIRROR_PORT_SET(x)	FIELD_PREP(MT7531_MIRROR_PORT_MASK, x)
+ #define  MT7531_CPU_PMAP_MASK		GENMASK(7, 0)
+ #define  MT7531_CPU_PMAP(x)		FIELD_PREP(MT7531_CPU_PMAP_MASK, x)
+ 
+-#define MT753X_MIRROR_REG(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+-					 MT7531_CFC : MT7530_MFC)
+-#define MT753X_MIRROR_EN(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+-					 MT7531_MIRROR_EN : MIRROR_EN)
+-#define MT753X_MIRROR_MASK(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
+-					 MT7531_MIRROR_MASK : MIRROR_MASK)
++#define MT753X_MIRROR_REG(id)		((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_CFC : MT753X_MFC)
++
++#define MT753X_MIRROR_EN(id)		((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_MIRROR_EN : MT7530_MIRROR_EN)
++
++#define MT753X_MIRROR_PORT_MASK(id)	((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_MIRROR_PORT_MASK : \
++					 MT7530_MIRROR_PORT_MASK)
++
++#define MT753X_MIRROR_PORT_GET(id, val)	((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_MIRROR_PORT_GET(val) : \
++					 MT7530_MIRROR_PORT_GET(val))
++
++#define MT753X_MIRROR_PORT_SET(id, val)	((id == ID_MT7531 || \
++					  id == ID_MT7988) ? \
++					 MT7531_MIRROR_PORT_SET(val) : \
++					 MT7530_MIRROR_PORT_SET(val))
+ 
+ /* Register for BPDU and PAE frame control */
+ #define MT753X_BPC			0x24
diff --git a/target/linux/generic/pending-6.6/745-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch b/target/linux/generic/pending-6.6/745-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
new file mode 100644
index 0000000000..1f66575f02
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
@@ -0,0 +1,257 @@
+From 3ccf67597d35c06a7319e407b1c42f78a7966779 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:13 +0300
+Subject: [PATCH 06/15] net: dsa: mt7530: refactor MT7530_HWTRAP and
+ MT7530_MHWTRAP
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530_HWTRAP and MT7530_MHWTRAP registers are on MT7530 and MT7531.
+It's called hardware trap on MT7530, software trap on MT7531. That's
+because some bits of the trap on MT7530 cannot be modified by software
+whilst all bits of the trap on MT7531 can. Rename the definitions for them
+to MT753X_TRAP and MT753X_MTRAP. Add MT7530 and MT7531 prefixes to the
+definitions specific to the switch model.
+
+Remove the extra parentheses from MT7530_XTAL_40MHZ and MT7530_XTAL_20MHZ.
+
+Rename MHWTRAP_PHY0_SEL, MHWTRAP_MANUAL, and MHWTRAP_PHY_ACCESS to be on
+par with the "MT7621 Giga Switch Programming Guide v0.3" document.
+
+Make an enumaration for the XTAL frequency. Set the data type of the xtal
+variable on mt7531_pll_setup() to it.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 59 ++++++++++++++++++++--------------------
+ drivers/net/dsa/mt7530.h | 50 ++++++++++++++++------------------
+ 2 files changed, 54 insertions(+), 55 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -417,23 +417,23 @@ mt7530_setup_port6(struct dsa_switch *ds
+ 
+ 	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1));
+ 
+-	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
++	xtal = mt7530_read(priv, MT753X_MTRAP) & MT7530_XTAL_MASK;
+ 
+-	if (xtal == HWTRAP_XTAL_25MHZ)
++	if (xtal == MT7530_XTAL_25MHZ)
+ 		ssc_delta = 0x57;
+ 	else
+ 		ssc_delta = 0x87;
+ 
+ 	if (priv->id == ID_MT7621) {
+ 		/* PLL frequency: 125MHz: 1.0GBit */
+-		if (xtal == HWTRAP_XTAL_40MHZ)
++		if (xtal == MT7530_XTAL_40MHZ)
+ 			ncpo1 = 0x0640;
+-		if (xtal == HWTRAP_XTAL_25MHZ)
++		if (xtal == MT7530_XTAL_25MHZ)
+ 			ncpo1 = 0x0a00;
+ 	} else { /* PLL frequency: 250MHz: 2.0Gbit */
+-		if (xtal == HWTRAP_XTAL_40MHZ)
++		if (xtal == MT7530_XTAL_40MHZ)
+ 			ncpo1 = 0x0c80;
+-		if (xtal == HWTRAP_XTAL_25MHZ)
++		if (xtal == MT7530_XTAL_25MHZ)
+ 			ncpo1 = 0x1400;
+ 	}
+ 
+@@ -456,19 +456,20 @@ mt7530_setup_port6(struct dsa_switch *ds
+ static void
+ mt7531_pll_setup(struct mt7530_priv *priv)
+ {
++	enum mt7531_xtal_fsel xtal;
+ 	u32 top_sig;
+ 	u32 hwstrap;
+-	u32 xtal;
+ 	u32 val;
+ 
+ 	val = mt7530_read(priv, MT7531_CREV);
+ 	top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR);
+-	hwstrap = mt7530_read(priv, MT7531_HWTRAP);
++	hwstrap = mt7530_read(priv, MT753X_TRAP);
+ 	if ((val & CHIP_REV_M) > 0)
+-		xtal = (top_sig & PAD_MCM_SMI_EN) ? HWTRAP_XTAL_FSEL_40MHZ :
+-						    HWTRAP_XTAL_FSEL_25MHZ;
++		xtal = (top_sig & PAD_MCM_SMI_EN) ? MT7531_XTAL_FSEL_40MHZ :
++						    MT7531_XTAL_FSEL_25MHZ;
+ 	else
+-		xtal = hwstrap & HWTRAP_XTAL_FSEL_MASK;
++		xtal = (hwstrap & MT7531_XTAL25) ? MT7531_XTAL_FSEL_25MHZ :
++						   MT7531_XTAL_FSEL_40MHZ;
+ 
+ 	/* Step 1 : Disable MT7531 COREPLL */
+ 	val = mt7530_read(priv, MT7531_PLLGP_EN);
+@@ -497,13 +498,13 @@ mt7531_pll_setup(struct mt7530_priv *pri
+ 	usleep_range(25, 35);
+ 
+ 	switch (xtal) {
+-	case HWTRAP_XTAL_FSEL_25MHZ:
++	case MT7531_XTAL_FSEL_25MHZ:
+ 		val = mt7530_read(priv, MT7531_PLLGP_CR0);
+ 		val &= ~RG_COREPLL_SDM_PCW_M;
+ 		val |= 0x140000 << RG_COREPLL_SDM_PCW_S;
+ 		mt7530_write(priv, MT7531_PLLGP_CR0, val);
+ 		break;
+-	case HWTRAP_XTAL_FSEL_40MHZ:
++	case MT7531_XTAL_FSEL_40MHZ:
+ 		val = mt7530_read(priv, MT7531_PLLGP_CR0);
+ 		val &= ~RG_COREPLL_SDM_PCW_M;
+ 		val |= 0x190000 << RG_COREPLL_SDM_PCW_S;
+@@ -877,20 +878,20 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	mutex_lock(&priv->reg_mutex);
+ 
+-	val = mt7530_read(priv, MT7530_MHWTRAP);
++	val = mt7530_read(priv, MT753X_MTRAP);
+ 
+-	val |= MHWTRAP_MANUAL | MHWTRAP_P5_MAC_SEL | MHWTRAP_P5_DIS;
+-	val &= ~MHWTRAP_P5_RGMII_MODE & ~MHWTRAP_PHY0_SEL;
++	val |= MT7530_CHG_TRAP | MT7530_P5_MAC_SEL | MT7530_P5_DIS;
++	val &= ~MT7530_P5_RGMII_MODE & ~MT7530_P5_PHY0_SEL;
+ 
+ 	switch (priv->p5_mode) {
+ 	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
+ 	case MUX_PHY_P0:
+-		val |= MHWTRAP_PHY0_SEL;
++		val |= MT7530_P5_PHY0_SEL;
+ 		fallthrough;
+ 
+ 	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
+ 	case MUX_PHY_P4:
+-		val &= ~MHWTRAP_P5_MAC_SEL & ~MHWTRAP_P5_DIS;
++		val &= ~MT7530_P5_MAC_SEL & ~MT7530_P5_DIS;
+ 
+ 		/* Setup the MAC by default for the cpu port */
+ 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+@@ -898,13 +899,13 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	/* GMAC5: P5 -> SoC MAC or external PHY */
+ 	default:
+-		val &= ~MHWTRAP_P5_DIS;
++		val &= ~MT7530_P5_DIS;
+ 		break;
+ 	}
+ 
+ 	/* Setup RGMII settings */
+ 	if (phy_interface_mode_is_rgmii(interface)) {
+-		val |= MHWTRAP_P5_RGMII_MODE;
++		val |= MT7530_P5_RGMII_MODE;
+ 
+ 		/* P5 RGMII RX Clock Control: delay setting for 1000M */
+ 		mt7530_write(priv, MT7530_P5RGMIIRXCR, CSR_RGMII_EDGE_ALIGN);
+@@ -924,7 +925,7 @@ static void mt7530_setup_port5(struct ds
+ 			     P5_IO_CLK_DRV(1) | P5_IO_DATA_DRV(1));
+ 	}
+ 
+-	mt7530_write(priv, MT7530_MHWTRAP, val);
++	mt7530_write(priv, MT753X_MTRAP, val);
+ 
+ 	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, mode=%s, phy-mode=%s\n", val,
+ 		mt7530_p5_mode_str(priv->p5_mode), phy_modes(interface));
+@@ -2365,7 +2366,7 @@ mt7530_setup(struct dsa_switch *ds)
+ 	}
+ 
+ 	/* Waiting for MT7530 got to stable */
+-	INIT_MT7530_DUMMY_POLL(&p, priv, MT7530_HWTRAP);
++	INIT_MT7530_DUMMY_POLL(&p, priv, MT753X_TRAP);
+ 	ret = readx_poll_timeout(_mt7530_read, &p, val, val != 0,
+ 				 20, 1000000);
+ 	if (ret < 0) {
+@@ -2380,7 +2381,7 @@ mt7530_setup(struct dsa_switch *ds)
+ 		return -ENODEV;
+ 	}
+ 
+-	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_20MHZ) {
++	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_20MHZ) {
+ 		dev_err(priv->dev,
+ 			"MT7530 with a 20MHz XTAL is not supported!\n");
+ 		return -EINVAL;
+@@ -2401,12 +2402,12 @@ mt7530_setup(struct dsa_switch *ds)
+ 			   RD_TAP_MASK, RD_TAP(16));
+ 
+ 	/* Enable port 6 */
+-	val = mt7530_read(priv, MT7530_MHWTRAP);
+-	val &= ~MHWTRAP_P6_DIS & ~MHWTRAP_PHY_ACCESS;
+-	val |= MHWTRAP_MANUAL;
+-	mt7530_write(priv, MT7530_MHWTRAP, val);
++	val = mt7530_read(priv, MT753X_MTRAP);
++	val &= ~MT7530_P6_DIS & ~MT7530_PHY_INDIRECT_ACCESS;
++	val |= MT7530_CHG_TRAP;
++	mt7530_write(priv, MT753X_MTRAP, val);
+ 
+-	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ)
++	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
+ 		mt7530_pll_setup(priv);
+ 
+ 	mt753x_trap_frames(priv);
+@@ -2586,7 +2587,7 @@ mt7531_setup(struct dsa_switch *ds)
+ 	}
+ 
+ 	/* Waiting for MT7530 got to stable */
+-	INIT_MT7530_DUMMY_POLL(&p, priv, MT7530_HWTRAP);
++	INIT_MT7530_DUMMY_POLL(&p, priv, MT753X_TRAP);
+ 	ret = readx_poll_timeout(_mt7530_read, &p, val, val != 0,
+ 				 20, 1000000);
+ 	if (ret < 0) {
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -495,32 +495,30 @@ enum mt7531_clk_skew {
+ 	MT7531_CLK_SKEW_REVERSE = 3,
+ };
+ 
+-/* Register for hw trap status */
+-#define MT7530_HWTRAP			0x7800
+-#define  HWTRAP_XTAL_MASK		(BIT(10) | BIT(9))
+-#define  HWTRAP_XTAL_25MHZ		(BIT(10) | BIT(9))
+-#define  HWTRAP_XTAL_40MHZ		(BIT(10))
+-#define  HWTRAP_XTAL_20MHZ		(BIT(9))
++/* Register for trap status */
++#define MT753X_TRAP			0x7800
++#define  MT7530_XTAL_MASK		(BIT(10) | BIT(9))
++#define  MT7530_XTAL_25MHZ		(BIT(10) | BIT(9))
++#define  MT7530_XTAL_40MHZ		BIT(10)
++#define  MT7530_XTAL_20MHZ		BIT(9)
++#define  MT7531_XTAL25			BIT(7)
+ 
+-#define MT7531_HWTRAP			0x7800
+-#define  HWTRAP_XTAL_FSEL_MASK		BIT(7)
+-#define  HWTRAP_XTAL_FSEL_25MHZ		BIT(7)
+-#define  HWTRAP_XTAL_FSEL_40MHZ		0
+-/* Unique fields of (M)HWSTRAP for MT7531 */
+-#define  XTAL_FSEL_S			7
+-#define  XTAL_FSEL_M			BIT(7)
+-#define  PHY_EN				BIT(6)
+-#define  CHG_STRAP			BIT(8)
++/* Register for trap modification */
++#define MT753X_MTRAP			0x7804
++#define  MT7530_P5_PHY0_SEL		BIT(20)
++#define  MT7530_CHG_TRAP		BIT(16)
++#define  MT7530_P5_MAC_SEL		BIT(13)
++#define  MT7530_P6_DIS			BIT(8)
++#define  MT7530_P5_RGMII_MODE		BIT(7)
++#define  MT7530_P5_DIS			BIT(6)
++#define  MT7530_PHY_INDIRECT_ACCESS	BIT(5)
++#define  MT7531_CHG_STRAP		BIT(8)
++#define  MT7531_PHY_EN			BIT(6)
+ 
+-/* Register for hw trap modification */
+-#define MT7530_MHWTRAP			0x7804
+-#define  MHWTRAP_PHY0_SEL		BIT(20)
+-#define  MHWTRAP_MANUAL			BIT(16)
+-#define  MHWTRAP_P5_MAC_SEL		BIT(13)
+-#define  MHWTRAP_P6_DIS			BIT(8)
+-#define  MHWTRAP_P5_RGMII_MODE		BIT(7)
+-#define  MHWTRAP_P5_DIS			BIT(6)
+-#define  MHWTRAP_PHY_ACCESS		BIT(5)
++enum mt7531_xtal_fsel {
++	MT7531_XTAL_FSEL_25MHZ,
++	MT7531_XTAL_FSEL_40MHZ,
++};
+ 
+ /* Register for TOP signal control */
+ #define MT7530_TOP_SIG_CTRL		0x7808
diff --git a/target/linux/generic/pending-6.6/745-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch b/target/linux/generic/pending-6.6/745-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
new file mode 100644
index 0000000000..f7802c02db
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
@@ -0,0 +1,117 @@
+From 2982f395c9a513b168f1e685588f70013cba2f5f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:14 +0300
+Subject: [PATCH 07/15] net: dsa: mt7530: move MT753X_MTRAP operations for
+ MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On MT7530, the media-independent interfaces of port 5 and 6 are controlled
+by the MT7530_P5_DIS and MT7530_P6_DIS bits of the hardware trap. Deal with
+these bits only when the relevant port is being enabled or disabled. This
+ensures that these ports will be disabled when they are not in use.
+
+Do not set MT7530_CHG_TRAP on mt7530_setup_port5() as that's already being
+done on mt7530_setup().
+
+Instead of globally setting MT7530_P5_MAC_SEL, clear it, then set it only
+on the appropriate case.
+
+If PHY muxing is detected, clear MT7530_P5_DIS before calling
+mt7530_setup_port5().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 38 +++++++++++++++++++++++++++-----------
+ 1 file changed, 27 insertions(+), 11 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -880,8 +880,7 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	val = mt7530_read(priv, MT753X_MTRAP);
+ 
+-	val |= MT7530_CHG_TRAP | MT7530_P5_MAC_SEL | MT7530_P5_DIS;
+-	val &= ~MT7530_P5_RGMII_MODE & ~MT7530_P5_PHY0_SEL;
++	val &= ~MT7530_P5_PHY0_SEL & ~MT7530_P5_MAC_SEL & ~MT7530_P5_RGMII_MODE;
+ 
+ 	switch (priv->p5_mode) {
+ 	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
+@@ -891,15 +890,13 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
+ 	case MUX_PHY_P4:
+-		val &= ~MT7530_P5_MAC_SEL & ~MT7530_P5_DIS;
+-
+ 		/* Setup the MAC by default for the cpu port */
+ 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+ 		break;
+ 
+ 	/* GMAC5: P5 -> SoC MAC or external PHY */
+ 	default:
+-		val &= ~MT7530_P5_DIS;
++		val |= MT7530_P5_MAC_SEL;
+ 		break;
+ 	}
+ 
+@@ -1193,6 +1190,14 @@ mt7530_port_enable(struct dsa_switch *ds
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ 
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return 0;
++
++	if (port == 5)
++		mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
++	else if (port == 6)
++		mt7530_clear(priv, MT753X_MTRAP, MT7530_P6_DIS);
++
+ 	return 0;
+ }
+ 
+@@ -1211,6 +1216,14 @@ mt7530_port_disable(struct dsa_switch *d
+ 		   PCR_MATRIX_CLR);
+ 
+ 	mutex_unlock(&priv->reg_mutex);
++
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return;
++
++	if (port == 5)
++		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
++	else if (port == 6)
++		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
+ }
+ 
+ static int
+@@ -2401,11 +2414,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 		mt7530_rmw(priv, MT7530_TRGMII_RD(i),
+ 			   RD_TAP_MASK, RD_TAP(16));
+ 
+-	/* Enable port 6 */
+-	val = mt7530_read(priv, MT753X_MTRAP);
+-	val &= ~MT7530_P6_DIS & ~MT7530_PHY_INDIRECT_ACCESS;
+-	val |= MT7530_CHG_TRAP;
+-	mt7530_write(priv, MT753X_MTRAP, val);
++	/* Allow modifying the trap and directly access PHY registers via the
++	 * MDIO bus the switch is on.
++	 */
++	mt7530_rmw(priv, MT753X_MTRAP, MT7530_CHG_TRAP |
++		   MT7530_PHY_INDIRECT_ACCESS, MT7530_CHG_TRAP);
+ 
+ 	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
+ 		mt7530_pll_setup(priv);
+@@ -2488,8 +2501,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 			break;
+ 		}
+ 
+-		if (priv->p5_mode == MUX_PHY_P0 || priv->p5_mode == MUX_PHY_P4)
++		if (priv->p5_mode == MUX_PHY_P0 ||
++		    priv->p5_mode == MUX_PHY_P4) {
++			mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
+ 			mt7530_setup_port5(ds, interface);
++		}
+ 	}
+ 
+ #ifdef CONFIG_GPIOLIB
diff --git a/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch b/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
new file mode 100644
index 0000000000..2eaa77c8cf
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
@@ -0,0 +1,39 @@
+From 1f5669efca65564c7533704917f79003c6b36c9c Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:15 +0300
+Subject: [PATCH 08/15] net: dsa: mt7530: return mt7530_setup_mdio &
+ mt7531_setup_common on error
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The mt7530_setup_mdio() and mt7531_setup_common() functions should be
+checked for errors. Return if the functions return a non-zero value.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 6 +++++-
+ 1 file changed, 5 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2667,7 +2667,9 @@ mt7531_setup(struct dsa_switch *ds)
+ 					 0);
+ 	}
+ 
+-	mt7531_setup_common(ds);
++	ret = mt7531_setup_common(ds);
++	if (ret)
++		return ret;
+ 
+ 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
+ 	ret = mt7530_setup_vlan0(priv);
+@@ -3020,6 +3022,8 @@ mt753x_setup(struct dsa_switch *ds)
+ 	ret = mt7530_setup_mdio(priv);
+ 	if (ret && priv->irq)
+ 		mt7530_free_irq_common(priv);
++	if (ret)
++		return ret;
+ 
+ 	/* Initialise the PCS devices */
+ 	for (i = 0; i < priv->ds->num_ports; i++) {
diff --git a/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch b/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
new file mode 100644
index 0000000000..9a592c759d
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
@@ -0,0 +1,75 @@
+From 6cc2d4ccd77509df74b7b8ef46bbc6ba0a571318 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:16 +0300
+Subject: [PATCH 09/15] net: dsa: mt7530: define MAC speed capabilities per
+ switch model
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+With the support of the MT7988 SoC switch, the MAC speed capabilities
+defined on mt753x_phylink_get_caps() won't apply to all switch models
+anymore. Move them to more appropriate locations instead of overwriting
+config->mac_capabilities.
+
+Remove the comment on mt753x_phylink_get_caps() as it's become invalid with
+the support of MT7531 and MT7988 SoC switch.
+
+Add break to case 6 of mt7988_mac_port_get_caps() to be explicit.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 15 ++++++++++-----
+ 1 file changed, 10 insertions(+), 5 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2685,6 +2685,8 @@ mt7531_setup(struct dsa_switch *ds)
+ static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port,
+ 				     struct phylink_config *config)
+ {
++	config->mac_capabilities |= MAC_10 | MAC_100 | MAC_1000FD;
++
+ 	switch (port) {
+ 	/* Ports which are connected to switch PHYs. There is no MII pinout. */
+ 	case 0 ... 4:
+@@ -2716,6 +2718,8 @@ static void mt7531_mac_port_get_caps(str
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
++	config->mac_capabilities |= MAC_10 | MAC_100 | MAC_1000FD;
++
+ 	switch (port) {
+ 	/* Ports which are connected to switch PHYs. There is no MII pinout. */
+ 	case 0 ... 4:
+@@ -2755,14 +2759,17 @@ static void mt7988_mac_port_get_caps(str
+ 	case 0 ... 3:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
++
++		config->mac_capabilities |= MAC_10 | MAC_100 | MAC_1000FD;
+ 		break;
+ 
+ 	/* Port 6 is connected to SoC's XGMII MAC. There is no MII pinout. */
+ 	case 6:
+ 		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
+ 			  config->supported_interfaces);
+-		config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
+-					   MAC_10000FD;
++
++		config->mac_capabilities |= MAC_10000FD;
++		break;
+ 	}
+ }
+ 
+@@ -2932,9 +2939,7 @@ static void mt753x_phylink_get_caps(stru
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+ 
+-	/* This switch only supports full-duplex at 1Gbps */
+-	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
+-				   MAC_10 | MAC_100 | MAC_1000FD;
++	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE;
+ 
+ 	priv->info->mac_port_get_caps(ds, port, config);
+ }
diff --git a/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch b/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
new file mode 100644
index 0000000000..bc84ecb778
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
@@ -0,0 +1,33 @@
+From dd0f15fc877c10567699190bce0f55e96f4ad6b5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:17 +0300
+Subject: [PATCH 10/15] net: dsa: mt7530: get rid of function sanity check
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Get rid of checking whether functions are filled properly. priv->info which
+is an mt753x_info structure is filled and checked for before this check.
+It's unnecessary checking whether it's filled properly.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 7 -------
+ 1 file changed, 7 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -3232,13 +3232,6 @@ mt7530_probe_common(struct mt7530_priv *
+ 	if (!priv->info)
+ 		return -EINVAL;
+ 
+-	/* Sanity check if these required device operations are filled
+-	 * properly.
+-	 */
+-	if (!priv->info->sw_setup || !priv->info->phy_read_c22 ||
+-	    !priv->info->phy_write_c22 || !priv->info->mac_port_get_caps)
+-		return -EINVAL;
+-
+ 	priv->id = priv->info->id;
+ 	priv->dev = dev;
+ 	priv->ds->priv = priv;
diff --git a/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch b/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
new file mode 100644
index 0000000000..e75db9ba30
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
@@ -0,0 +1,71 @@
+From 2dff9759602b069f97ccc939e15a47ca051b2983 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:18 +0300
+Subject: [PATCH 11/15] net: dsa: mt7530: refactor MT7530_PMEEECR_P()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The MT7530_PMEEECR_P() register is on MT7530, MT7531, and the switch on the
+MT7988 SoC. Rename the definition for them to MT753X_PMEEECR_P(). Use the
+FIELD_PREP and FIELD_GET macros. Rename GET_LPI_THRESH() and
+SET_LPI_THRESH() to LPI_THRESH_GET() and LPI_THRESH_SET().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c |  8 ++++----
+ drivers/net/dsa/mt7530.h | 13 +++++++------
+ 2 files changed, 11 insertions(+), 10 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -3051,10 +3051,10 @@ static int mt753x_get_mac_eee(struct dsa
+ 			      struct ethtool_eee *e)
+ {
+ 	struct mt7530_priv *priv = ds->priv;
+-	u32 eeecr = mt7530_read(priv, MT7530_PMEEECR_P(port));
++	u32 eeecr = mt7530_read(priv, MT753X_PMEEECR_P(port));
+ 
+ 	e->tx_lpi_enabled = !(eeecr & LPI_MODE_EN);
+-	e->tx_lpi_timer = GET_LPI_THRESH(eeecr);
++	e->tx_lpi_timer = LPI_THRESH_GET(eeecr);
+ 
+ 	return 0;
+ }
+@@ -3068,11 +3068,11 @@ static int mt753x_set_mac_eee(struct dsa
+ 	if (e->tx_lpi_timer > 0xFFF)
+ 		return -EINVAL;
+ 
+-	set = SET_LPI_THRESH(e->tx_lpi_timer);
++	set = LPI_THRESH_SET(e->tx_lpi_timer);
+ 	if (!e->tx_lpi_enabled)
+ 		/* Force LPI Mode without a delay */
+ 		set |= LPI_MODE_EN;
+-	mt7530_rmw(priv, MT7530_PMEEECR_P(port), mask, set);
++	mt7530_rmw(priv, MT753X_PMEEECR_P(port), mask, set);
+ 
+ 	return 0;
+ }
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -364,13 +364,14 @@ enum mt7530_vlan_port_acc_frm {
+ 					 PMCR_FORCE_SPEED_100 | \
+ 					 PMCR_FORCE_FDX | PMCR_FORCE_LNK)
+ 
+-#define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
+-#define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
+-#define  WAKEUP_TIME_100(x)		(((x) & 0xFF) << 16)
++#define MT753X_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
++#define  WAKEUP_TIME_1000_MASK		GENMASK(31, 24)
++#define  WAKEUP_TIME_1000(x)		FIELD_PREP(WAKEUP_TIME_1000_MASK, x)
++#define  WAKEUP_TIME_100_MASK		GENMASK(23, 16)
++#define  WAKEUP_TIME_100(x)		FIELD_PREP(WAKEUP_TIME_100_MASK, x)
+ #define  LPI_THRESH_MASK		GENMASK(15, 4)
+-#define  LPI_THRESH_SHT			4
+-#define  SET_LPI_THRESH(x)		(((x) << LPI_THRESH_SHT) & LPI_THRESH_MASK)
+-#define  GET_LPI_THRESH(x)		(((x) & LPI_THRESH_MASK) >> LPI_THRESH_SHT)
++#define  LPI_THRESH_GET(x)		FIELD_GET(LPI_THRESH_MASK, x)
++#define  LPI_THRESH_SET(x)		FIELD_PREP(LPI_THRESH_MASK, x)
+ #define  LPI_MODE_EN			BIT(0)
+ 
+ #define MT7530_PMSR_P(x)		(0x3008 + (x) * 0x100)
diff --git a/target/linux/generic/pending-6.6/745-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch b/target/linux/generic/pending-6.6/745-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
new file mode 100644
index 0000000000..d083708548
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
@@ -0,0 +1,48 @@
+From 21d67c2fabfe40baf33202d3287b67b6c16f8382 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:19 +0300
+Subject: [PATCH 12/15] net: dsa: mt7530: get rid of mac_port_validate member
+ of mt753x_info
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The mac_port_validate member of the mt753x_info structure is not being
+used, remove it. Improve the member description section in the process.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.h | 10 +++-------
+ 1 file changed, 3 insertions(+), 7 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -743,15 +743,14 @@ struct mt753x_pcs {
+ 
+ /* struct mt753x_info -	This is the main data structure for holding the specific
+  *			part for each supported device
++ * @id:			Holding the identifier to a switch model
++ * @pcs_ops:		Holding the pointer to the MAC PCS operations structure
+  * @sw_setup:		Holding the handler to a device initialization
+  * @phy_read_c22:	Holding the way reading PHY port using C22
+  * @phy_write_c22:	Holding the way writing PHY port using C22
+  * @phy_read_c45:	Holding the way reading PHY port using C45
+  * @phy_write_c45:	Holding the way writing PHY port using C45
+- * @phy_mode_supported:	Check if the PHY type is being supported on a certain
+- *			port
+- * @mac_port_validate:	Holding the way to set addition validate type for a
+- *			certan MAC port
++ * @mac_port_get_caps:	Holding the handler that provides MAC capabilities
+  * @mac_port_config:	Holding the way setting up the PHY attribute to a
+  *			certain MAC port
+  */
+@@ -770,9 +769,6 @@ struct mt753x_info {
+ 			     int regnum, u16 val);
+ 	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
+ 				  struct phylink_config *config);
+-	void (*mac_port_validate)(struct dsa_switch *ds, int port,
+-				  phy_interface_t interface,
+-				  unsigned long *supported);
+ 	void (*mac_port_config)(struct dsa_switch *ds, int port,
+ 				unsigned int mode,
+ 				phy_interface_t interface);
diff --git a/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch b/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
new file mode 100644
index 0000000000..f63d4d7705
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
@@ -0,0 +1,57 @@
+From 6efc8ae3eb0363328f479191a0cf0dc12a16e090 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:20 +0300
+Subject: [PATCH 13/15] net: dsa: mt7530: use priv->ds->num_ports instead of
+ MT7530_NUM_PORTS
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Use priv->ds->num_ports on all for loops which configure the switch
+registers. In the future, the value of MT7530_NUM_PORTS will depend on
+priv->id. Therefore, this change prepares the subdriver for a simpler
+implementation.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 8 ++++----
+ 1 file changed, 4 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1411,7 +1411,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
+ 	mt7530_rmw(priv, MT7530_PPBV1_P(port), G0_PORT_VID_MASK,
+ 		   G0_PORT_VID_DEF);
+ 
+-	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++	for (i = 0; i < priv->ds->num_ports; i++) {
+ 		if (dsa_is_user_port(ds, i) &&
+ 		    dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
+ 			all_user_ports_removed = false;
+@@ -2428,7 +2428,7 @@ mt7530_setup(struct dsa_switch *ds)
+ 	/* Enable and reset MIB counters */
+ 	mt7530_mib_reset(ds);
+ 
+-	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++	for (i = 0; i < priv->ds->num_ports; i++) {
+ 		/* Clear link settings and enable force mode to force link down
+ 		 * on all ports until they're enabled later.
+ 		 */
+@@ -2539,7 +2539,7 @@ mt7531_setup_common(struct dsa_switch *d
+ 	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
+ 		     UNU_FFP_MASK);
+ 
+-	for (i = 0; i < MT7530_NUM_PORTS; i++) {
++	for (i = 0; i < priv->ds->num_ports; i++) {
+ 		/* Clear link settings and enable force mode to force link down
+ 		 * on all ports until they're enabled later.
+ 		 */
+@@ -2626,7 +2626,7 @@ mt7531_setup(struct dsa_switch *ds)
+ 	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
+ 
+ 	/* Force link down on all ports before internal reset */
+-	for (i = 0; i < MT7530_NUM_PORTS; i++)
++	for (i = 0; i < priv->ds->num_ports; i++)
+ 		mt7530_write(priv, MT753X_PMCR_P(i), MT7531_FORCE_MODE_LNK);
+ 
+ 	/* Reset the switch through internal reset */
diff --git a/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch b/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
new file mode 100644
index 0000000000..9ba12b1269
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
@@ -0,0 +1,37 @@
+From c078ebbf5f6f6d8390035a9f92eeab766b78884d Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:21 +0300
+Subject: [PATCH 14/15] net: dsa: mt7530: do not pass port variable to
+ mt7531_rgmii_setup()
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The mt7531_rgmii_setup() function does not use the port variable, do not
+pass the variable to it.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 4 ++--
+ 1 file changed, 2 insertions(+), 2 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2785,7 +2785,7 @@ mt7530_mac_config(struct dsa_switch *ds,
+ 		mt7530_setup_port6(priv->ds, interface);
+ }
+ 
+-static void mt7531_rgmii_setup(struct mt7530_priv *priv, u32 port,
++static void mt7531_rgmii_setup(struct mt7530_priv *priv,
+ 			       phy_interface_t interface,
+ 			       struct phy_device *phydev)
+ {
+@@ -2836,7 +2836,7 @@ mt7531_mac_config(struct dsa_switch *ds,
+ 	if (phy_interface_mode_is_rgmii(interface)) {
+ 		dp = dsa_to_port(ds, port);
+ 		phydev = dp->slave->phydev;
+-		mt7531_rgmii_setup(priv, port, interface, phydev);
++		mt7531_rgmii_setup(priv, interface, phydev);
+ 	}
+ }
+ 
diff --git a/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch b/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
new file mode 100644
index 0000000000..58c3e0bc3c
--- /dev/null
+++ b/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
@@ -0,0 +1,33 @@
+From e7a9cc3cc00b40e0bc2bae40bd2ece0e48fa51d5 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:22 +0300
+Subject: [PATCH 15/15] net: dsa: mt7530: explain exposing MDIO bus of MT7531AE
+ better
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Unlike MT7531BE, the GPIO 6-12 pins are not used for RGMII on MT7531AE.
+Therefore, the GPIO 11-12 pins are set to function as MDC and MDIO to
+expose the MDIO bus of the switch. Replace the comment with a better
+explanation.
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 5 ++++-
+ 1 file changed, 4 insertions(+), 1 deletion(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2635,7 +2635,10 @@ mt7531_setup(struct dsa_switch *ds)
+ 	if (!priv->p5_sgmii) {
+ 		mt7531_pll_setup(priv);
+ 	} else {
+-		/* Let ds->slave_mii_bus be able to access external phy. */
++		/* Unlike MT7531BE, the GPIO 6-12 pins are not used for RGMII on
++		 * MT7531AE. Set the GPIO 11-12 pins to function as MDC and MDIO
++		 * to expose the MDIO bus of the switch.
++		 */
+ 		mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO11_RG_RXD2_MASK,
+ 			   MT7531_EXT_P_MDC_11);
+ 		mt7530_rmw(priv, MT7531_GPIO_MODE1, MT7531_GPIO12_RG_RXD3_MASK,



From lede-commits at lists.infradead.org  Wed Apr 24 13:06:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 16:06:33 -0400
Subject: [openwrt/openwrt]  generic: 6.1, 6.6: mt7530: import accepted patches
In-Reply-To: <171398919105.1721309.15692418572139342924@git-01.infra.openwrt.org>
References: <171398919105.1721309.15692418572139342924@git-01.infra.openwrt.org>
Message-ID: <mailman.30613.1713989202.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ac8bfe316b816e9b40e58da55e44197f5b395dd2

commit ac8bfe316b816e9b40e58da55e44197f5b395dd2
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Tue Apr 23 13:11:52 2024 +0100

    generic: 6.1, 6.6: mt7530: import accepted patches
    
    Import patches for the MT7530 DSA driver from net-next tree:
     cae425cb43fe net: dsa: allow DSA switch drivers to provide their own phylink mac ops
     dd0c9855b413 net: dsa: introduce dsa_phylink_to_port()
     7c5e37d7ee78 net: dsa: mt7530: simplify core operations
     868ff5f4944a net: dsa: mt7530-mdio: read PHY address of switch from device tree
     2c606d138518 net: dsa: mt7530: fix port mirroring for MT7988 SoC switch
     d59cf049c837 net: dsa: mt7530: fix mirroring frames received on local port
     62d6d91db98a net: dsa: mt7530: provide own phylink MAC operations
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ....10-net-dsa-introduce-dsa_phylink_to_port.patch |  99 +++++++++
 ...ow-DSA-switch-drivers-to-provide-their-ow.patch | 117 ++++++++++
 ...-mt7530-provide-own-phylink-MAC-operations.patc | 135 ++++++++++++
 ...530-fix-mirroring-frames-received-on-loca.patch |  70 ++++++
 ...530-fix-port-mirroring-for-MT7988-SoC-swi.patch |  49 +++++
 ...530-mdio-read-PHY-address-of-switch-from-.patch | 238 +++++++++++++++++++++
 ...0-net-dsa-mt7530-simplify-core-operations.patch | 186 ++++++++++++++++
 ....10-net-dsa-introduce-dsa_phylink_to_port.patch |  90 ++++++++
 ...ow-DSA-switch-drivers-to-provide-their-ow.patch | 119 +++++++++++
 ...mt7530-provide-own-phylink-MAC-operations.patch | 135 ++++++++++++
 ...530-fix-mirroring-frames-received-on-loca.patch |  70 ++++++
 ...530-fix-port-mirroring-for-MT7988-SoC-swi.patch |  49 +++++
 ...530-mdio-read-PHY-address-of-switch-from-.patch | 238 +++++++++++++++++++++
 ...0-net-dsa-mt7530-simplify-core-operations.patch | 186 ++++++++++++++++
 14 files changed, 1781 insertions(+)

diff --git a/target/linux/generic/backport-6.1/765-v6.10-net-dsa-introduce-dsa_phylink_to_port.patch b/target/linux/generic/backport-6.1/765-v6.10-net-dsa-introduce-dsa_phylink_to_port.patch
new file mode 100644
index 0000000000..4cef7194eb
--- /dev/null
+++ b/target/linux/generic/backport-6.1/765-v6.10-net-dsa-introduce-dsa_phylink_to_port.patch
@@ -0,0 +1,99 @@
+From f13b2b33c7674fa0988dfaa9adb95d7d912b489f Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Wed, 10 Apr 2024 20:42:38 +0100
+Subject: [PATCH 1/2] net: dsa: introduce dsa_phylink_to_port()
+
+We convert from a phylink_config struct to a dsa_port struct in many
+places, let's provide a helper for this.
+
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/E1rudqA-006K9B-85 at rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ include/net/dsa.h |  6 ++++++
+ net/dsa/port.c    | 12 ++++++------
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+--- a/include/net/dsa.h
++++ b/include/net/dsa.h
+@@ -337,6 +337,12 @@ struct dsa_port {
+ 	struct list_head	vlans;
+ };
+ 
++static inline struct dsa_port *
++dsa_phylink_to_port(struct phylink_config *config)
++{
++	return container_of(config, struct dsa_port, pl_config);
++}
++
+ /* TODO: ideally DSA ports would have a single dp->link_dp member,
+  * and no dst->rtable nor this struct dsa_link would be needed,
+  * but this would require some more complex tree walking,
+--- a/net/dsa/port.c
++++ b/net/dsa/port.c
+@@ -1552,7 +1552,7 @@ static void dsa_port_phylink_validate(st
+ 				      unsigned long *supported,
+ 				      struct phylink_link_state *state)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 
+ 	if (!ds->ops->phylink_validate) {
+@@ -1567,7 +1567,7 @@ static void dsa_port_phylink_validate(st
+ static void dsa_port_phylink_mac_pcs_get_state(struct phylink_config *config,
+ 					       struct phylink_link_state *state)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 	int err;
+ 
+@@ -1589,7 +1589,7 @@ static struct phylink_pcs *
+ dsa_port_phylink_mac_select_pcs(struct phylink_config *config,
+ 				phy_interface_t interface)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct phylink_pcs *pcs = ERR_PTR(-EOPNOTSUPP);
+ 	struct dsa_switch *ds = dp->ds;
+ 
+@@ -1603,7 +1603,7 @@ static void dsa_port_phylink_mac_config(
+ 					unsigned int mode,
+ 					const struct phylink_link_state *state)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 
+ 	if (!ds->ops->phylink_mac_config)
+@@ -1614,7 +1614,7 @@ static void dsa_port_phylink_mac_config(
+ 
+ static void dsa_port_phylink_mac_an_restart(struct phylink_config *config)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 
+ 	if (!ds->ops->phylink_mac_an_restart)
+@@ -1627,7 +1627,7 @@ static void dsa_port_phylink_mac_link_do
+ 					   unsigned int mode,
+ 					   phy_interface_t interface)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct phy_device *phydev = NULL;
+ 	struct dsa_switch *ds = dp->ds;
+ 
+@@ -1650,7 +1650,7 @@ static void dsa_port_phylink_mac_link_up
+ 					 int speed, int duplex,
+ 					 bool tx_pause, bool rx_pause)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 
+ 	if (!ds->ops->phylink_mac_link_up) {
diff --git a/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch b/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch
new file mode 100644
index 0000000000..51250ac97a
--- /dev/null
+++ b/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch
@@ -0,0 +1,117 @@
+From c22d8240fcd73a1c3ec8dcb055bd583fb970c375 Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Wed, 10 Apr 2024 20:42:43 +0100
+Subject: [PATCH 2/2] net: dsa: allow DSA switch drivers to provide their own
+ phylink mac ops
+
+Rather than having a shim for each and every phylink MAC operation,
+allow DSA switch drivers to provide their own ops structure. When a
+DSA driver provides the phylink MAC operations, the shimmed ops must
+not be provided, so fail an attempt to register a switch with both
+the phylink_mac_ops in struct dsa_switch and the phylink_mac_*
+operations populated in dsa_switch_ops populated.
+
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Link: https://lore.kernel.org/r/E1rudqF-006K9H-Cc at rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ include/net/dsa.h |  5 +++++
+ net/dsa/dsa.c     | 11 +++++++++++
+ net/dsa/port.c    | 26 ++++++++++++++++++++------
+ 3 files changed, 36 insertions(+), 6 deletions(-)
+
+--- a/include/net/dsa.h
++++ b/include/net/dsa.h
+@@ -468,6 +468,11 @@ struct dsa_switch {
+ 	const struct dsa_switch_ops	*ops;
+ 
+ 	/*
++	 * Allow a DSA switch driver to override the phylink MAC ops
++	 */
++	const struct phylink_mac_ops	*phylink_mac_ops;
++
++	/*
+ 	 * Slave mii_bus and devices for the individual ports.
+ 	 */
+ 	u32			phys_mii_mask;
+--- a/net/dsa/port.c
++++ b/net/dsa/port.c
+@@ -1675,6 +1675,7 @@ static const struct phylink_mac_ops dsa_
+ 
+ int dsa_port_phylink_create(struct dsa_port *dp)
+ {
++	const struct phylink_mac_ops *mac_ops;
+ 	struct dsa_switch *ds = dp->ds;
+ 	phy_interface_t mode;
+ 	struct phylink *pl;
+@@ -1694,8 +1695,12 @@ int dsa_port_phylink_create(struct dsa_p
+ 	if (ds->ops->phylink_get_caps)
+ 		ds->ops->phylink_get_caps(ds, dp->index, &dp->pl_config);
+ 
+-	pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn),
+-			    mode, &dsa_port_phylink_mac_ops);
++	mac_ops = &dsa_port_phylink_mac_ops;
++	if (ds->phylink_mac_ops)
++		mac_ops = ds->phylink_mac_ops;
++
++	pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn), mode,
++			    mac_ops);
+ 	if (IS_ERR(pl)) {
+ 		pr_err("error creating PHYLINK: %ld\n", PTR_ERR(pl));
+ 		return PTR_ERR(pl);
+@@ -1961,12 +1966,23 @@ static void dsa_shared_port_validate_of(
+ 		dn, dsa_port_is_cpu(dp) ? "CPU" : "DSA", dp->index);
+ }
+ 
++static void dsa_shared_port_link_down(struct dsa_port *dp)
++{
++	struct dsa_switch *ds = dp->ds;
++
++	if (ds->phylink_mac_ops && ds->phylink_mac_ops->mac_link_down)
++		ds->phylink_mac_ops->mac_link_down(&dp->pl_config, MLO_AN_FIXED,
++						   PHY_INTERFACE_MODE_NA);
++	else if (ds->ops->phylink_mac_link_down)
++		ds->ops->phylink_mac_link_down(ds, dp->index, MLO_AN_FIXED,
++					       PHY_INTERFACE_MODE_NA);
++}
++
+ int dsa_shared_port_link_register_of(struct dsa_port *dp)
+ {
+ 	struct dsa_switch *ds = dp->ds;
+ 	bool missing_link_description;
+ 	bool missing_phy_mode;
+-	int port = dp->index;
+ 
+ 	dsa_shared_port_validate_of(dp, &missing_phy_mode,
+ 				    &missing_link_description);
+@@ -1982,9 +1998,7 @@ int dsa_shared_port_link_register_of(str
+ 				 "Skipping phylink registration for %s port %d\n",
+ 				 dsa_port_is_cpu(dp) ? "CPU" : "DSA", dp->index);
+ 		} else {
+-			if (ds->ops->phylink_mac_link_down)
+-				ds->ops->phylink_mac_link_down(ds, port,
+-					MLO_AN_FIXED, PHY_INTERFACE_MODE_NA);
++			dsa_shared_port_link_down(dp);
+ 
+ 			return dsa_shared_port_phylink_register(dp);
+ 		}
+--- a/net/dsa/dsa2.c
++++ b/net/dsa/dsa2.c
+@@ -1736,6 +1736,15 @@ static int dsa_switch_probe(struct dsa_s
+ 	if (!ds->num_ports)
+ 		return -EINVAL;
+ 
++	if (ds->phylink_mac_ops) {
++		if (ds->ops->phylink_mac_select_pcs ||
++		    ds->ops->phylink_mac_config ||
++		    ds->ops->phylink_mac_link_down ||
++		    ds->ops->phylink_mac_link_up ||
++		    ds->ops->adjust_link)
++			return -EINVAL;
++	}
++
+ 	if (np) {
+ 		err = dsa_switch_parse_of(ds, np);
+ 		if (err)
diff --git a/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patc b/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patc
new file mode 100644
index 0000000000..ca2657d57d
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patc
@@ -0,0 +1,135 @@
+From 5754b3bdcd872aa229881b8f07f84a8404c7d72a Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Fri, 12 Apr 2024 16:15:34 +0100
+Subject: [PATCH 1/5] net: dsa: mt7530: provide own phylink MAC operations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Convert mt753x to provide its own phylink MAC operations, thus avoiding
+the shim layer in DSA's port.c
+
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Tested-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/E1rvIco-006bQu-Fq at rmk-PC.armlinux.org.uk
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 46 +++++++++++++++++++++++++---------------
+ 1 file changed, 29 insertions(+), 17 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2841,28 +2841,34 @@ mt7531_mac_config(struct dsa_switch *ds,
+ }
+ 
+ static struct phylink_pcs *
+-mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
++mt753x_phylink_mac_select_pcs(struct phylink_config *config,
+ 			      phy_interface_t interface)
+ {
+-	struct mt7530_priv *priv = ds->priv;
++	struct dsa_port *dp = dsa_phylink_to_port(config);
++	struct mt7530_priv *priv = dp->ds->priv;
+ 
+ 	switch (interface) {
+ 	case PHY_INTERFACE_MODE_TRGMII:
+-		return &priv->pcs[port].pcs;
++		return &priv->pcs[dp->index].pcs;
+ 	case PHY_INTERFACE_MODE_SGMII:
+ 	case PHY_INTERFACE_MODE_1000BASEX:
+ 	case PHY_INTERFACE_MODE_2500BASEX:
+-		return priv->ports[port].sgmii_pcs;
++		return priv->ports[dp->index].sgmii_pcs;
+ 	default:
+ 		return NULL;
+ 	}
+ }
+ 
+ static void
+-mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
++mt753x_phylink_mac_config(struct phylink_config *config, unsigned int mode,
+ 			  const struct phylink_link_state *state)
+ {
+-	struct mt7530_priv *priv = ds->priv;
++	struct dsa_port *dp = dsa_phylink_to_port(config);
++	struct dsa_switch *ds = dp->ds;
++	struct mt7530_priv *priv;
++	int port = dp->index;
++
++	priv = ds->priv;
+ 
+ 	if ((port == 5 || port == 6) && priv->info->mac_port_config)
+ 		priv->info->mac_port_config(ds, port, mode, state->interface);
+@@ -2872,23 +2878,25 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 		mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY);
+ }
+ 
+-static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
++static void mt753x_phylink_mac_link_down(struct phylink_config *config,
+ 					 unsigned int mode,
+ 					 phy_interface_t interface)
+ {
+-	struct mt7530_priv *priv = ds->priv;
++	struct dsa_port *dp = dsa_phylink_to_port(config);
++	struct mt7530_priv *priv = dp->ds->priv;
+ 
+-	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
++	mt7530_clear(priv, MT7530_PMCR_P(dp->index), PMCR_LINK_SETTINGS_MASK);
+ }
+ 
+-static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
++static void mt753x_phylink_mac_link_up(struct phylink_config *config,
++				       struct phy_device *phydev,
+ 				       unsigned int mode,
+ 				       phy_interface_t interface,
+-				       struct phy_device *phydev,
+ 				       int speed, int duplex,
+ 				       bool tx_pause, bool rx_pause)
+ {
+-	struct mt7530_priv *priv = ds->priv;
++	struct dsa_port *dp = dsa_phylink_to_port(config);
++	struct mt7530_priv *priv = dp->ds->priv;
+ 	u32 mcr;
+ 
+ 	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
+@@ -2923,7 +2931,7 @@ static void mt753x_phylink_mac_link_up(s
+ 		}
+ 	}
+ 
+-	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
++	mt7530_set(priv, MT7530_PMCR_P(dp->index), mcr);
+ }
+ 
+ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
+@@ -3148,16 +3156,19 @@ const struct dsa_switch_ops mt7530_switc
+ 	.port_mirror_add	= mt753x_port_mirror_add,
+ 	.port_mirror_del	= mt753x_port_mirror_del,
+ 	.phylink_get_caps	= mt753x_phylink_get_caps,
+-	.phylink_mac_select_pcs	= mt753x_phylink_mac_select_pcs,
+-	.phylink_mac_config	= mt753x_phylink_mac_config,
+-	.phylink_mac_link_down	= mt753x_phylink_mac_link_down,
+-	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
+ 	.get_mac_eee		= mt753x_get_mac_eee,
+ 	.set_mac_eee		= mt753x_set_mac_eee,
+ 	.master_state_change	= mt753x_conduit_state_change,
+ };
+ EXPORT_SYMBOL_GPL(mt7530_switch_ops);
+ 
++static const struct phylink_mac_ops mt753x_phylink_mac_ops = {
++	.mac_select_pcs	= mt753x_phylink_mac_select_pcs,
++	.mac_config	= mt753x_phylink_mac_config,
++	.mac_link_down	= mt753x_phylink_mac_link_down,
++	.mac_link_up	= mt753x_phylink_mac_link_up,
++};
++
+ const struct mt753x_info mt753x_table[] = {
+ 	[ID_MT7621] = {
+ 		.id = ID_MT7621,
+@@ -3227,6 +3238,7 @@ mt7530_probe_common(struct mt7530_priv *
+ 	priv->dev = dev;
+ 	priv->ds->priv = priv;
+ 	priv->ds->ops = &mt7530_switch_ops;
++	priv->ds->phylink_mac_ops = &mt753x_phylink_mac_ops;
+ 	mutex_init(&priv->reg_mutex);
+ 	dev_set_drvdata(dev, priv);
+ 
diff --git a/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch b/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
new file mode 100644
index 0000000000..7640a9cb41
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
@@ -0,0 +1,70 @@
+From d4097ddef078a113643a6dcde01e99741f852adb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Sat, 13 Apr 2024 16:01:39 +0300
+Subject: [PATCH 2/5] net: dsa: mt7530: fix mirroring frames received on local
+ port
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This switch intellectual property provides a bit on the ARL global control
+register which controls allowing mirroring frames which are received on the
+local port (monitor port). This bit is unset after reset.
+
+This ability must be enabled to fully support the port mirroring feature on
+this switch intellectual property.
+
+Therefore, this patch fixes the traffic not being reflected on a port,
+which would be configured like below:
+
+  tc qdisc add dev swp0 clsact
+
+  tc filter add dev swp0 ingress matchall skip_sw \
+  action mirred egress mirror dev swp0
+
+As a side note, this configuration provides the hairpinning feature for a
+single port.
+
+Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring")
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mt7530.c | 6 ++++++
+ drivers/net/dsa/mt7530.h | 4 ++++
+ 2 files changed, 10 insertions(+)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2471,6 +2471,9 @@ mt7530_setup(struct dsa_switch *ds)
+ 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
+ 	}
+ 
++	/* Allow mirroring frames received on the local port (monitor port). */
++	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
++
+ 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
+ 	ret = mt7530_setup_vlan0(priv);
+ 	if (ret)
+@@ -2582,6 +2585,9 @@ mt7531_setup_common(struct dsa_switch *d
+ 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
+ 	}
+ 
++	/* Allow mirroring frames received on the local port (monitor port). */
++	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
++
+ 	/* Flush the FDB table */
+ 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
+ 	if (ret < 0)
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -32,6 +32,10 @@ enum mt753x_id {
+ #define SYSC_REG_RSTCTRL		0x34
+ #define  RESET_MCM			BIT(2)
+ 
++/* Register for ARL global control */
++#define MT753X_AGC			0xc
++#define  LOCAL_EN			BIT(7)
++
+ /* Registers to mac forward control for unknown frames */
+ #define MT7530_MFC			0x10
+ #define  BC_FFP(x)			(((x) & 0xff) << 24)
diff --git a/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch b/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
new file mode 100644
index 0000000000..304ea21adc
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
@@ -0,0 +1,49 @@
+From 019a17a5e76940ea86114838d1d638d4dc8d3750 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Sat, 13 Apr 2024 16:01:40 +0300
+Subject: [PATCH 3/5] net: dsa: mt7530: fix port mirroring for MT7988 SoC
+ switch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The "MT7988A Wi-Fi 7 Generation Router Platform: Datasheet (Open Version)
+v0.1" document shows bits 16 to 18 as the MIRROR_PORT field of the CPU
+forward control register. Currently, the MT7530 DSA subdriver configures
+bits 0 to 2 of the CPU forward control register which breaks the port
+mirroring feature for the MT7988 SoC switch.
+
+Fix this by using the MT7531_MIRROR_PORT_GET() and MT7531_MIRROR_PORT_SET()
+macros which utilise the correct bits.
+
+Fixes: 110c18bfed41 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch")
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mt7530.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1876,14 +1876,16 @@ mt7530_port_vlan_del(struct dsa_switch *
+ 
+ static int mt753x_mirror_port_get(unsigned int id, u32 val)
+ {
+-	return (id == ID_MT7531) ? MT7531_MIRROR_PORT_GET(val) :
+-				   MIRROR_PORT(val);
++	return (id == ID_MT7531 || id == ID_MT7988) ?
++		       MT7531_MIRROR_PORT_GET(val) :
++		       MIRROR_PORT(val);
+ }
+ 
+ static int mt753x_mirror_port_set(unsigned int id, u32 val)
+ {
+-	return (id == ID_MT7531) ? MT7531_MIRROR_PORT_SET(val) :
+-				   MIRROR_PORT(val);
++	return (id == ID_MT7531 || id == ID_MT7988) ?
++		       MT7531_MIRROR_PORT_SET(val) :
++		       MIRROR_PORT(val);
+ }
+ 
+ static int mt753x_port_mirror_add(struct dsa_switch *ds, int port,
diff --git a/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch b/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch
new file mode 100644
index 0000000000..6b6a255e26
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch
@@ -0,0 +1,238 @@
+From 5053a6cf1d50d785078562470d2a63695a9f3bf2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 18 Apr 2024 08:35:30 +0300
+Subject: [PATCH 4/5] net: dsa: mt7530-mdio: read PHY address of switch from
+ device tree
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Read the PHY address the switch listens on from the reg property of the
+switch node on the device tree. This change brings support for MT7530
+switches on boards with such bootstrapping configuration where the switch
+listens on a different PHY address than the hardcoded PHY address on the
+driver, 31.
+
+As described on the "MT7621 Programming Guide v0.4" document, the MT7530
+switch and its PHYs can be configured to listen on the range of 7-12,
+15-20, 23-28, and 31 and 0-4 PHY addresses.
+
+There are operations where the switch PHY registers are used. For the PHY
+address of the control PHY, transform the MT753X_CTRL_PHY_ADDR constant
+into a macro and use it. The PHY address for the control PHY is 0 when the
+switch listens on 31. In any other case, it is one greater than the PHY
+address the switch listens on.
+
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Tested-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530-mdio.c | 28 +++++++++++++-------------
+ drivers/net/dsa/mt7530.c      | 37 +++++++++++++++++++++++------------
+ drivers/net/dsa/mt7530.h      |  4 +++-
+ 3 files changed, 41 insertions(+), 28 deletions(-)
+
+--- a/drivers/net/dsa/mt7530-mdio.c
++++ b/drivers/net/dsa/mt7530-mdio.c
+@@ -18,7 +18,8 @@
+ static int
+ mt7530_regmap_write(void *context, unsigned int reg, unsigned int val)
+ {
+-	struct mii_bus *bus = context;
++	struct mt7530_priv *priv = context;
++	struct mii_bus *bus = priv->bus;
+ 	u16 page, r, lo, hi;
+ 	int ret;
+ 
+@@ -27,36 +28,35 @@ mt7530_regmap_write(void *context, unsig
+ 	lo = val & 0xffff;
+ 	hi = val >> 16;
+ 
+-	/* MT7530 uses 31 as the pseudo port */
+-	ret = bus->write(bus, 0x1f, 0x1f, page);
++	ret = bus->write(bus, priv->mdiodev->addr, 0x1f, page);
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	ret = bus->write(bus, 0x1f, r,  lo);
++	ret = bus->write(bus, priv->mdiodev->addr, r, lo);
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	ret = bus->write(bus, 0x1f, 0x10, hi);
++	ret = bus->write(bus, priv->mdiodev->addr, 0x10, hi);
+ 	return ret;
+ }
+ 
+ static int
+ mt7530_regmap_read(void *context, unsigned int reg, unsigned int *val)
+ {
+-	struct mii_bus *bus = context;
++	struct mt7530_priv *priv = context;
++	struct mii_bus *bus = priv->bus;
+ 	u16 page, r, lo, hi;
+ 	int ret;
+ 
+ 	page = (reg >> 6) & 0x3ff;
+ 	r = (reg >> 2) & 0xf;
+ 
+-	/* MT7530 uses 31 as the pseudo port */
+-	ret = bus->write(bus, 0x1f, 0x1f, page);
++	ret = bus->write(bus, priv->mdiodev->addr, 0x1f, page);
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	lo = bus->read(bus, 0x1f, r);
+-	hi = bus->read(bus, 0x1f, 0x10);
++	lo = bus->read(bus, priv->mdiodev->addr, r);
++	hi = bus->read(bus, priv->mdiodev->addr, 0x10);
+ 
+ 	*val = (hi << 16) | (lo & 0xffff);
+ 
+@@ -107,8 +107,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+ 		mt7531_pcs_config[i]->unlock = mt7530_mdio_regmap_unlock;
+ 		mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
+ 
+-		regmap = devm_regmap_init(priv->dev,
+-					  &mt7530_regmap_bus, priv->bus,
++		regmap = devm_regmap_init(priv->dev, &mt7530_regmap_bus, priv,
+ 					  mt7531_pcs_config[i]);
+ 		if (IS_ERR(regmap)) {
+ 			ret = PTR_ERR(regmap);
+@@ -153,6 +152,7 @@ mt7530_probe(struct mdio_device *mdiodev
+ 
+ 	priv->bus = mdiodev->bus;
+ 	priv->dev = &mdiodev->dev;
++	priv->mdiodev = mdiodev;
+ 
+ 	ret = mt7530_probe_common(priv);
+ 	if (ret)
+@@ -203,8 +203,8 @@ mt7530_probe(struct mdio_device *mdiodev
+ 	regmap_config->reg_stride = 4;
+ 	regmap_config->max_register = MT7530_CREV;
+ 	regmap_config->disable_locking = true;
+-	priv->regmap = devm_regmap_init(priv->dev, &mt7530_regmap_bus,
+-					priv->bus, regmap_config);
++	priv->regmap = devm_regmap_init(priv->dev, &mt7530_regmap_bus, priv,
++					regmap_config);
+ 	if (IS_ERR(priv->regmap))
+ 		return PTR_ERR(priv->regmap);
+ 
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -86,22 +86,26 @@ core_read_mmd_indirect(struct mt7530_pri
+ 	int value, ret;
+ 
+ 	/* Write the desired MMD Devad */
+-	ret = bus->write(bus, 0, MII_MMD_CTRL, devad);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_CTRL, devad);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the desired MMD register address */
+-	ret = bus->write(bus, 0, MII_MMD_DATA, prtad);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_DATA, prtad);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Select the Function : DATA with no post increment */
+-	ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR));
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Read the content of the MMD's selected register */
+-	value = bus->read(bus, 0, MII_MMD_DATA);
++	value = bus->read(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			  MII_MMD_DATA);
+ 
+ 	return value;
+ err:
+@@ -118,22 +122,26 @@ core_write_mmd_indirect(struct mt7530_pr
+ 	int ret;
+ 
+ 	/* Write the desired MMD Devad */
+-	ret = bus->write(bus, 0, MII_MMD_CTRL, devad);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_CTRL, devad);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the desired MMD register address */
+-	ret = bus->write(bus, 0, MII_MMD_DATA, prtad);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_DATA, prtad);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Select the Function : DATA with no post increment */
+-	ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR));
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the data into MMD's selected register */
+-	ret = bus->write(bus, 0, MII_MMD_DATA, data);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_DATA, data);
+ err:
+ 	if (ret < 0)
+ 		dev_err(&bus->dev,
+@@ -2670,16 +2678,19 @@ mt7531_setup(struct dsa_switch *ds)
+ 	 * phy_[read,write]_mmd_indirect is called, we provide our own
+ 	 * mt7531_ind_mmd_phy_[read,write] to complete this function.
+ 	 */
+-	val = mt7531_ind_c45_phy_read(priv, MT753X_CTRL_PHY_ADDR,
++	val = mt7531_ind_c45_phy_read(priv,
++				      MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+ 				      MDIO_MMD_VEND2, CORE_PLL_GROUP4);
+ 	val |= MT7531_RG_SYSPLL_DMY2 | MT7531_PHY_PLL_BYPASS_MODE;
+ 	val &= ~MT7531_PHY_PLL_OFF;
+-	mt7531_ind_c45_phy_write(priv, MT753X_CTRL_PHY_ADDR, MDIO_MMD_VEND2,
+-				 CORE_PLL_GROUP4, val);
++	mt7531_ind_c45_phy_write(priv,
++				 MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++				 MDIO_MMD_VEND2, CORE_PLL_GROUP4, val);
+ 
+ 	/* Disable EEE advertisement on the switch PHYs. */
+-	for (i = MT753X_CTRL_PHY_ADDR;
+-	     i < MT753X_CTRL_PHY_ADDR + MT7530_NUM_PHYS; i++) {
++	for (i = MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr);
++	     i < MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr) + MT7530_NUM_PHYS;
++	     i++) {
+ 		mt7531_ind_c45_phy_write(priv, i, MDIO_MMD_AN, MDIO_AN_EEE_ADV,
+ 					 0);
+ 	}
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -629,7 +629,7 @@ enum mt7531_clk_skew {
+ #define  MT7531_PHY_PLL_OFF		BIT(5)
+ #define  MT7531_PHY_PLL_BYPASS_MODE	BIT(4)
+ 
+-#define MT753X_CTRL_PHY_ADDR		0
++#define MT753X_CTRL_PHY_ADDR(addr)	((addr + 1) & 0x1f)
+ 
+ #define CORE_PLL_GROUP5			0x404
+ #define  RG_LCDDS_PCW_NCPO1(x)		((x) & 0xffff)
+@@ -771,6 +771,7 @@ struct mt753x_info {
+  * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
+  * @create_sgmii:	Pointer to function creating SGMII PCS instance(s)
+  * @active_cpu_ports:	Holding the active CPU ports
++ * @mdiodev:		The pointer to the MDIO device structure
+  */
+ struct mt7530_priv {
+ 	struct device		*dev;
+@@ -797,6 +798,7 @@ struct mt7530_priv {
+ 	u32 irq_enable;
+ 	int (*create_sgmii)(struct mt7530_priv *priv);
+ 	u8 active_cpu_ports;
++	struct mdio_device *mdiodev;
+ };
+ 
+ struct mt7530_hw_vlan_entry {
diff --git a/target/linux/generic/backport-6.1/790-53-v6.10-net-dsa-mt7530-simplify-core-operations.patch b/target/linux/generic/backport-6.1/790-53-v6.10-net-dsa-mt7530-simplify-core-operations.patch
new file mode 100644
index 0000000000..d9d70f1d4d
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-53-v6.10-net-dsa-mt7530-simplify-core-operations.patch
@@ -0,0 +1,186 @@
+From 9764a08b3d260f4e7799d34bbfe64463db940d74 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 18 Apr 2024 08:35:31 +0300
+Subject: [PATCH 5/5] net: dsa: mt7530: simplify core operations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The core_rmw() function calls core_read_mmd_indirect() to read the
+requested register, and then calls core_write_mmd_indirect() to write the
+requested value to the register. Because Clause 22 is used to access Clause
+45 registers, some operations on core_write_mmd_indirect() are
+unnecessarily run. Get rid of core_read_mmd_indirect() and
+core_write_mmd_indirect(), and run only the necessary operations on
+core_write() and core_rmw().
+
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Tested-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 108 ++++++++++++++++-----------------------
+ 1 file changed, 43 insertions(+), 65 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -74,116 +74,94 @@ static const struct mt7530_mib_desc mt75
+ 	MIB_DESC(1, 0xb8, "RxArlDrop"),
+ };
+ 
+-/* Since phy_device has not yet been created and
+- * phy_{read,write}_mmd_indirect is not available, we provide our own
+- * core_{read,write}_mmd_indirect with core_{clear,write,set} wrappers
+- * to complete this function.
+- */
+-static int
+-core_read_mmd_indirect(struct mt7530_priv *priv, int prtad, int devad)
++static void
++mt7530_mutex_lock(struct mt7530_priv *priv)
++{
++	if (priv->bus)
++		mutex_lock_nested(&priv->bus->mdio_lock, MDIO_MUTEX_NESTED);
++}
++
++static void
++mt7530_mutex_unlock(struct mt7530_priv *priv)
++{
++	if (priv->bus)
++		mutex_unlock(&priv->bus->mdio_lock);
++}
++
++static void
++core_write(struct mt7530_priv *priv, u32 reg, u32 val)
+ {
+ 	struct mii_bus *bus = priv->bus;
+-	int value, ret;
++	int ret;
++
++	mt7530_mutex_lock(priv);
+ 
+ 	/* Write the desired MMD Devad */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_CTRL, devad);
++			 MII_MMD_CTRL, MDIO_MMD_VEND2);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the desired MMD register address */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_DATA, prtad);
++			 MII_MMD_DATA, reg);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Select the Function : DATA with no post increment */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
++			 MII_MMD_CTRL, MDIO_MMD_VEND2 | MII_MMD_CTRL_NOINCR);
+ 	if (ret < 0)
+ 		goto err;
+ 
+-	/* Read the content of the MMD's selected register */
+-	value = bus->read(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			  MII_MMD_DATA);
+-
+-	return value;
++	/* Write the data into MMD's selected register */
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_DATA, val);
+ err:
+-	dev_err(&bus->dev,  "failed to read mmd register\n");
++	if (ret < 0)
++		dev_err(&bus->dev, "failed to write mmd register\n");
+ 
+-	return ret;
++	mt7530_mutex_unlock(priv);
+ }
+ 
+-static int
+-core_write_mmd_indirect(struct mt7530_priv *priv, int prtad,
+-			int devad, u32 data)
++static void
++core_rmw(struct mt7530_priv *priv, u32 reg, u32 mask, u32 set)
+ {
+ 	struct mii_bus *bus = priv->bus;
++	u32 val;
+ 	int ret;
+ 
++	mt7530_mutex_lock(priv);
++
+ 	/* Write the desired MMD Devad */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_CTRL, devad);
++			 MII_MMD_CTRL, MDIO_MMD_VEND2);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the desired MMD register address */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_DATA, prtad);
++			 MII_MMD_DATA, reg);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Select the Function : DATA with no post increment */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
++			 MII_MMD_CTRL, MDIO_MMD_VEND2 | MII_MMD_CTRL_NOINCR);
+ 	if (ret < 0)
+ 		goto err;
+ 
++	/* Read the content of the MMD's selected register */
++	val = bus->read(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			MII_MMD_DATA);
++	val &= ~mask;
++	val |= set;
+ 	/* Write the data into MMD's selected register */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_DATA, data);
++			 MII_MMD_DATA, val);
+ err:
+ 	if (ret < 0)
+-		dev_err(&bus->dev,
+-			"failed to write mmd register\n");
+-	return ret;
+-}
+-
+-static void
+-mt7530_mutex_lock(struct mt7530_priv *priv)
+-{
+-	if (priv->bus)
+-		mutex_lock_nested(&priv->bus->mdio_lock, MDIO_MUTEX_NESTED);
+-}
+-
+-static void
+-mt7530_mutex_unlock(struct mt7530_priv *priv)
+-{
+-	if (priv->bus)
+-		mutex_unlock(&priv->bus->mdio_lock);
+-}
+-
+-static void
+-core_write(struct mt7530_priv *priv, u32 reg, u32 val)
+-{
+-	mt7530_mutex_lock(priv);
+-
+-	core_write_mmd_indirect(priv, reg, MDIO_MMD_VEND2, val);
+-
+-	mt7530_mutex_unlock(priv);
+-}
+-
+-static void
+-core_rmw(struct mt7530_priv *priv, u32 reg, u32 mask, u32 set)
+-{
+-	u32 val;
+-
+-	mt7530_mutex_lock(priv);
+-
+-	val = core_read_mmd_indirect(priv, reg, MDIO_MMD_VEND2);
+-	val &= ~mask;
+-	val |= set;
+-	core_write_mmd_indirect(priv, reg, MDIO_MMD_VEND2, val);
++		dev_err(&bus->dev, "failed to write mmd register\n");
+ 
+ 	mt7530_mutex_unlock(priv);
+ }
diff --git a/target/linux/generic/backport-6.6/763-v6.10-net-dsa-introduce-dsa_phylink_to_port.patch b/target/linux/generic/backport-6.6/763-v6.10-net-dsa-introduce-dsa_phylink_to_port.patch
new file mode 100644
index 0000000000..0e7ace9d1a
--- /dev/null
+++ b/target/linux/generic/backport-6.6/763-v6.10-net-dsa-introduce-dsa_phylink_to_port.patch
@@ -0,0 +1,90 @@
+From f13b2b33c7674fa0988dfaa9adb95d7d912b489f Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Wed, 10 Apr 2024 20:42:38 +0100
+Subject: [PATCH 1/2] net: dsa: introduce dsa_phylink_to_port()
+
+We convert from a phylink_config struct to a dsa_port struct in many
+places, let's provide a helper for this.
+
+Reviewed-by: Andrew Lunn <andrew at lunn.ch>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Link: https://lore.kernel.org/r/E1rudqA-006K9B-85 at rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ include/net/dsa.h |  6 ++++++
+ net/dsa/port.c    | 12 ++++++------
+ 2 files changed, 12 insertions(+), 6 deletions(-)
+
+--- a/include/net/dsa.h
++++ b/include/net/dsa.h
+@@ -327,6 +327,12 @@ struct dsa_port {
+ 	};
+ };
+ 
++static inline struct dsa_port *
++dsa_phylink_to_port(struct phylink_config *config)
++{
++	return container_of(config, struct dsa_port, pl_config);
++}
++
+ /* TODO: ideally DSA ports would have a single dp->link_dp member,
+  * and no dst->rtable nor this struct dsa_link would be needed,
+  * but this would require some more complex tree walking,
+--- a/net/dsa/port.c
++++ b/net/dsa/port.c
+@@ -1572,7 +1572,7 @@ static struct phylink_pcs *
+ dsa_port_phylink_mac_select_pcs(struct phylink_config *config,
+ 				phy_interface_t interface)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct phylink_pcs *pcs = ERR_PTR(-EOPNOTSUPP);
+ 	struct dsa_switch *ds = dp->ds;
+ 
+@@ -1586,7 +1586,7 @@ static int dsa_port_phylink_mac_prepare(
+ 					unsigned int mode,
+ 					phy_interface_t interface)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 	int err = 0;
+ 
+@@ -1601,7 +1601,7 @@ static void dsa_port_phylink_mac_config(
+ 					unsigned int mode,
+ 					const struct phylink_link_state *state)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 
+ 	if (!ds->ops->phylink_mac_config)
+@@ -1614,7 +1614,7 @@ static int dsa_port_phylink_mac_finish(s
+ 				       unsigned int mode,
+ 				       phy_interface_t interface)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 	int err = 0;
+ 
+@@ -1629,7 +1629,7 @@ static void dsa_port_phylink_mac_link_do
+ 					   unsigned int mode,
+ 					   phy_interface_t interface)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct phy_device *phydev = NULL;
+ 	struct dsa_switch *ds = dp->ds;
+ 
+@@ -1652,7 +1652,7 @@ static void dsa_port_phylink_mac_link_up
+ 					 int speed, int duplex,
+ 					 bool tx_pause, bool rx_pause)
+ {
+-	struct dsa_port *dp = container_of(config, struct dsa_port, pl_config);
++	struct dsa_port *dp = dsa_phylink_to_port(config);
+ 	struct dsa_switch *ds = dp->ds;
+ 
+ 	if (!ds->ops->phylink_mac_link_up) {
diff --git a/target/linux/generic/backport-6.6/764-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch b/target/linux/generic/backport-6.6/764-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch
new file mode 100644
index 0000000000..7c9ab16d4a
--- /dev/null
+++ b/target/linux/generic/backport-6.6/764-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch
@@ -0,0 +1,119 @@
+From c22d8240fcd73a1c3ec8dcb055bd583fb970c375 Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Wed, 10 Apr 2024 20:42:43 +0100
+Subject: [PATCH 2/2] net: dsa: allow DSA switch drivers to provide their own
+ phylink mac ops
+
+Rather than having a shim for each and every phylink MAC operation,
+allow DSA switch drivers to provide their own ops structure. When a
+DSA driver provides the phylink MAC operations, the shimmed ops must
+not be provided, so fail an attempt to register a switch with both
+the phylink_mac_ops in struct dsa_switch and the phylink_mac_*
+operations populated in dsa_switch_ops populated.
+
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Link: https://lore.kernel.org/r/E1rudqF-006K9H-Cc at rmk-PC.armlinux.org.uk
+Signed-off-by: Jakub Kicinski <kuba at kernel.org>
+---
+ include/net/dsa.h |  5 +++++
+ net/dsa/dsa.c     | 11 +++++++++++
+ net/dsa/port.c    | 26 ++++++++++++++++++++------
+ 3 files changed, 36 insertions(+), 6 deletions(-)
+
+--- a/include/net/dsa.h
++++ b/include/net/dsa.h
+@@ -458,6 +458,11 @@ struct dsa_switch {
+ 	const struct dsa_switch_ops	*ops;
+ 
+ 	/*
++	 * Allow a DSA switch driver to override the phylink MAC ops
++	 */
++	const struct phylink_mac_ops	*phylink_mac_ops;
++
++	/*
+ 	 * Slave mii_bus and devices for the individual ports.
+ 	 */
+ 	u32			phys_mii_mask;
+--- a/net/dsa/dsa.c
++++ b/net/dsa/dsa.c
+@@ -1510,6 +1510,17 @@ static int dsa_switch_probe(struct dsa_s
+ 	if (!ds->num_ports)
+ 		return -EINVAL;
+ 
++	if (ds->phylink_mac_ops) {
++		if (ds->ops->phylink_mac_select_pcs ||
++		    ds->ops->phylink_mac_prepare ||
++		    ds->ops->phylink_mac_config ||
++		    ds->ops->phylink_mac_finish ||
++		    ds->ops->phylink_mac_link_down ||
++		    ds->ops->phylink_mac_link_up ||
++		    ds->ops->adjust_link)
++			return -EINVAL;
++	}
++
+ 	if (np) {
+ 		err = dsa_switch_parse_of(ds, np);
+ 		if (err)
+--- a/net/dsa/port.c
++++ b/net/dsa/port.c
+@@ -1677,6 +1677,7 @@ static const struct phylink_mac_ops dsa_
+ 
+ int dsa_port_phylink_create(struct dsa_port *dp)
+ {
++	const struct phylink_mac_ops *mac_ops;
+ 	struct dsa_switch *ds = dp->ds;
+ 	phy_interface_t mode;
+ 	struct phylink *pl;
+@@ -1700,8 +1701,12 @@ int dsa_port_phylink_create(struct dsa_p
+ 		}
+ 	}
+ 
+-	pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn),
+-			    mode, &dsa_port_phylink_mac_ops);
++	mac_ops = &dsa_port_phylink_mac_ops;
++	if (ds->phylink_mac_ops)
++		mac_ops = ds->phylink_mac_ops;
++
++	pl = phylink_create(&dp->pl_config, of_fwnode_handle(dp->dn), mode,
++			    mac_ops);
+ 	if (IS_ERR(pl)) {
+ 		pr_err("error creating PHYLINK: %ld\n", PTR_ERR(pl));
+ 		return PTR_ERR(pl);
+@@ -1967,12 +1972,23 @@ static void dsa_shared_port_validate_of(
+ 		dn, dsa_port_is_cpu(dp) ? "CPU" : "DSA", dp->index);
+ }
+ 
++static void dsa_shared_port_link_down(struct dsa_port *dp)
++{
++	struct dsa_switch *ds = dp->ds;
++
++	if (ds->phylink_mac_ops && ds->phylink_mac_ops->mac_link_down)
++		ds->phylink_mac_ops->mac_link_down(&dp->pl_config, MLO_AN_FIXED,
++						   PHY_INTERFACE_MODE_NA);
++	else if (ds->ops->phylink_mac_link_down)
++		ds->ops->phylink_mac_link_down(ds, dp->index, MLO_AN_FIXED,
++					       PHY_INTERFACE_MODE_NA);
++}
++
+ int dsa_shared_port_link_register_of(struct dsa_port *dp)
+ {
+ 	struct dsa_switch *ds = dp->ds;
+ 	bool missing_link_description;
+ 	bool missing_phy_mode;
+-	int port = dp->index;
+ 
+ 	dsa_shared_port_validate_of(dp, &missing_phy_mode,
+ 				    &missing_link_description);
+@@ -1988,9 +2004,7 @@ int dsa_shared_port_link_register_of(str
+ 				 "Skipping phylink registration for %s port %d\n",
+ 				 dsa_port_is_cpu(dp) ? "CPU" : "DSA", dp->index);
+ 		} else {
+-			if (ds->ops->phylink_mac_link_down)
+-				ds->ops->phylink_mac_link_down(ds, port,
+-					MLO_AN_FIXED, PHY_INTERFACE_MODE_NA);
++			dsa_shared_port_link_down(dp);
+ 
+ 			return dsa_shared_port_phylink_register(dp);
+ 		}
diff --git a/target/linux/generic/backport-6.6/790-33-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch b/target/linux/generic/backport-6.6/790-33-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
new file mode 100644
index 0000000000..7cbdc9e50d
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-33-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
@@ -0,0 +1,135 @@
+From 5754b3bdcd872aa229881b8f07f84a8404c7d72a Mon Sep 17 00:00:00 2001
+From: "Russell King (Oracle)" <rmk+kernel at armlinux.org.uk>
+Date: Fri, 12 Apr 2024 16:15:34 +0100
+Subject: [PATCH 1/5] net: dsa: mt7530: provide own phylink MAC operations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Convert mt753x to provide its own phylink MAC operations, thus avoiding
+the shim layer in DSA's port.c
+
+Signed-off-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
+Tested-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Link: https://lore.kernel.org/r/E1rvIco-006bQu-Fq at rmk-PC.armlinux.org.uk
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 46 +++++++++++++++++++++++++---------------
+ 1 file changed, 29 insertions(+), 17 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2850,28 +2850,34 @@ mt7531_mac_config(struct dsa_switch *ds,
+ }
+ 
+ static struct phylink_pcs *
+-mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
++mt753x_phylink_mac_select_pcs(struct phylink_config *config,
+ 			      phy_interface_t interface)
+ {
+-	struct mt7530_priv *priv = ds->priv;
++	struct dsa_port *dp = dsa_phylink_to_port(config);
++	struct mt7530_priv *priv = dp->ds->priv;
+ 
+ 	switch (interface) {
+ 	case PHY_INTERFACE_MODE_TRGMII:
+-		return &priv->pcs[port].pcs;
++		return &priv->pcs[dp->index].pcs;
+ 	case PHY_INTERFACE_MODE_SGMII:
+ 	case PHY_INTERFACE_MODE_1000BASEX:
+ 	case PHY_INTERFACE_MODE_2500BASEX:
+-		return priv->ports[port].sgmii_pcs;
++		return priv->ports[dp->index].sgmii_pcs;
+ 	default:
+ 		return NULL;
+ 	}
+ }
+ 
+ static void
+-mt753x_phylink_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
++mt753x_phylink_mac_config(struct phylink_config *config, unsigned int mode,
+ 			  const struct phylink_link_state *state)
+ {
+-	struct mt7530_priv *priv = ds->priv;
++	struct dsa_port *dp = dsa_phylink_to_port(config);
++	struct dsa_switch *ds = dp->ds;
++	struct mt7530_priv *priv;
++	int port = dp->index;
++
++	priv = ds->priv;
+ 
+ 	if ((port == 5 || port == 6) && priv->info->mac_port_config)
+ 		priv->info->mac_port_config(ds, port, mode, state->interface);
+@@ -2881,23 +2887,25 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 		mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY);
+ }
+ 
+-static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
++static void mt753x_phylink_mac_link_down(struct phylink_config *config,
+ 					 unsigned int mode,
+ 					 phy_interface_t interface)
+ {
+-	struct mt7530_priv *priv = ds->priv;
++	struct dsa_port *dp = dsa_phylink_to_port(config);
++	struct mt7530_priv *priv = dp->ds->priv;
+ 
+-	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
++	mt7530_clear(priv, MT7530_PMCR_P(dp->index), PMCR_LINK_SETTINGS_MASK);
+ }
+ 
+-static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
++static void mt753x_phylink_mac_link_up(struct phylink_config *config,
++				       struct phy_device *phydev,
+ 				       unsigned int mode,
+ 				       phy_interface_t interface,
+-				       struct phy_device *phydev,
+ 				       int speed, int duplex,
+ 				       bool tx_pause, bool rx_pause)
+ {
+-	struct mt7530_priv *priv = ds->priv;
++	struct dsa_port *dp = dsa_phylink_to_port(config);
++	struct mt7530_priv *priv = dp->ds->priv;
+ 	u32 mcr;
+ 
+ 	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
+@@ -2932,7 +2940,7 @@ static void mt753x_phylink_mac_link_up(s
+ 		}
+ 	}
+ 
+-	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
++	mt7530_set(priv, MT7530_PMCR_P(dp->index), mcr);
+ }
+ 
+ static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
+@@ -3152,16 +3160,19 @@ const struct dsa_switch_ops mt7530_switc
+ 	.port_mirror_add	= mt753x_port_mirror_add,
+ 	.port_mirror_del	= mt753x_port_mirror_del,
+ 	.phylink_get_caps	= mt753x_phylink_get_caps,
+-	.phylink_mac_select_pcs	= mt753x_phylink_mac_select_pcs,
+-	.phylink_mac_config	= mt753x_phylink_mac_config,
+-	.phylink_mac_link_down	= mt753x_phylink_mac_link_down,
+-	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
+ 	.get_mac_eee		= mt753x_get_mac_eee,
+ 	.set_mac_eee		= mt753x_set_mac_eee,
+ 	.master_state_change	= mt753x_conduit_state_change,
+ };
+ EXPORT_SYMBOL_GPL(mt7530_switch_ops);
+ 
++static const struct phylink_mac_ops mt753x_phylink_mac_ops = {
++	.mac_select_pcs	= mt753x_phylink_mac_select_pcs,
++	.mac_config	= mt753x_phylink_mac_config,
++	.mac_link_down	= mt753x_phylink_mac_link_down,
++	.mac_link_up	= mt753x_phylink_mac_link_up,
++};
++
+ const struct mt753x_info mt753x_table[] = {
+ 	[ID_MT7621] = {
+ 		.id = ID_MT7621,
+@@ -3239,6 +3250,7 @@ mt7530_probe_common(struct mt7530_priv *
+ 	priv->dev = dev;
+ 	priv->ds->priv = priv;
+ 	priv->ds->ops = &mt7530_switch_ops;
++	priv->ds->phylink_mac_ops = &mt753x_phylink_mac_ops;
+ 	mutex_init(&priv->reg_mutex);
+ 	dev_set_drvdata(dev, priv);
+ 
diff --git a/target/linux/generic/backport-6.6/790-34-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch b/target/linux/generic/backport-6.6/790-34-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
new file mode 100644
index 0000000000..11f9a68cee
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-34-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
@@ -0,0 +1,70 @@
+From d4097ddef078a113643a6dcde01e99741f852adb Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Sat, 13 Apr 2024 16:01:39 +0300
+Subject: [PATCH 2/5] net: dsa: mt7530: fix mirroring frames received on local
+ port
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+This switch intellectual property provides a bit on the ARL global control
+register which controls allowing mirroring frames which are received on the
+local port (monitor port). This bit is unset after reset.
+
+This ability must be enabled to fully support the port mirroring feature on
+this switch intellectual property.
+
+Therefore, this patch fixes the traffic not being reflected on a port,
+which would be configured like below:
+
+  tc qdisc add dev swp0 clsact
+
+  tc filter add dev swp0 ingress matchall skip_sw \
+  action mirred egress mirror dev swp0
+
+As a side note, this configuration provides the hairpinning feature for a
+single port.
+
+Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring")
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mt7530.c | 6 ++++++
+ drivers/net/dsa/mt7530.h | 4 ++++
+ 2 files changed, 10 insertions(+)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -2480,6 +2480,9 @@ mt7530_setup(struct dsa_switch *ds)
+ 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
+ 	}
+ 
++	/* Allow mirroring frames received on the local port (monitor port). */
++	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
++
+ 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
+ 	ret = mt7530_setup_vlan0(priv);
+ 	if (ret)
+@@ -2591,6 +2594,9 @@ mt7531_setup_common(struct dsa_switch *d
+ 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
+ 	}
+ 
++	/* Allow mirroring frames received on the local port (monitor port). */
++	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
++
+ 	/* Flush the FDB table */
+ 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
+ 	if (ret < 0)
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -32,6 +32,10 @@ enum mt753x_id {
+ #define SYSC_REG_RSTCTRL		0x34
+ #define  RESET_MCM			BIT(2)
+ 
++/* Register for ARL global control */
++#define MT753X_AGC			0xc
++#define  LOCAL_EN			BIT(7)
++
+ /* Registers to mac forward control for unknown frames */
+ #define MT7530_MFC			0x10
+ #define  BC_FFP(x)			(((x) & 0xff) << 24)
diff --git a/target/linux/generic/backport-6.6/790-35-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch b/target/linux/generic/backport-6.6/790-35-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
new file mode 100644
index 0000000000..d5ba8ef1c4
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-35-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
@@ -0,0 +1,49 @@
+From 019a17a5e76940ea86114838d1d638d4dc8d3750 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Sat, 13 Apr 2024 16:01:40 +0300
+Subject: [PATCH 3/5] net: dsa: mt7530: fix port mirroring for MT7988 SoC
+ switch
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The "MT7988A Wi-Fi 7 Generation Router Platform: Datasheet (Open Version)
+v0.1" document shows bits 16 to 18 as the MIRROR_PORT field of the CPU
+forward control register. Currently, the MT7530 DSA subdriver configures
+bits 0 to 2 of the CPU forward control register which breaks the port
+mirroring feature for the MT7988 SoC switch.
+
+Fix this by using the MT7531_MIRROR_PORT_GET() and MT7531_MIRROR_PORT_SET()
+macros which utilise the correct bits.
+
+Fixes: 110c18bfed41 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch")
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Acked-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: David S. Miller <davem at davemloft.net>
+---
+ drivers/net/dsa/mt7530.c | 10 ++++++----
+ 1 file changed, 6 insertions(+), 4 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1883,14 +1883,16 @@ mt7530_port_vlan_del(struct dsa_switch *
+ 
+ static int mt753x_mirror_port_get(unsigned int id, u32 val)
+ {
+-	return (id == ID_MT7531) ? MT7531_MIRROR_PORT_GET(val) :
+-				   MIRROR_PORT(val);
++	return (id == ID_MT7531 || id == ID_MT7988) ?
++		       MT7531_MIRROR_PORT_GET(val) :
++		       MIRROR_PORT(val);
+ }
+ 
+ static int mt753x_mirror_port_set(unsigned int id, u32 val)
+ {
+-	return (id == ID_MT7531) ? MT7531_MIRROR_PORT_SET(val) :
+-				   MIRROR_PORT(val);
++	return (id == ID_MT7531 || id == ID_MT7988) ?
++		       MT7531_MIRROR_PORT_SET(val) :
++		       MIRROR_PORT(val);
+ }
+ 
+ static int mt753x_port_mirror_add(struct dsa_switch *ds, int port,
diff --git a/target/linux/generic/backport-6.6/790-36-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch b/target/linux/generic/backport-6.6/790-36-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch
new file mode 100644
index 0000000000..a6cbb0fc6b
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-36-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch
@@ -0,0 +1,238 @@
+From 5053a6cf1d50d785078562470d2a63695a9f3bf2 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 18 Apr 2024 08:35:30 +0300
+Subject: [PATCH 4/5] net: dsa: mt7530-mdio: read PHY address of switch from
+ device tree
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Read the PHY address the switch listens on from the reg property of the
+switch node on the device tree. This change brings support for MT7530
+switches on boards with such bootstrapping configuration where the switch
+listens on a different PHY address than the hardcoded PHY address on the
+driver, 31.
+
+As described on the "MT7621 Programming Guide v0.4" document, the MT7530
+switch and its PHYs can be configured to listen on the range of 7-12,
+15-20, 23-28, and 31 and 0-4 PHY addresses.
+
+There are operations where the switch PHY registers are used. For the PHY
+address of the control PHY, transform the MT753X_CTRL_PHY_ADDR constant
+into a macro and use it. The PHY address for the control PHY is 0 when the
+switch listens on 31. In any other case, it is one greater than the PHY
+address the switch listens on.
+
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Tested-by: Daniel Golle <daniel at makrotopia.org>
+Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530-mdio.c | 28 +++++++++++++-------------
+ drivers/net/dsa/mt7530.c      | 37 +++++++++++++++++++++++------------
+ drivers/net/dsa/mt7530.h      |  4 +++-
+ 3 files changed, 41 insertions(+), 28 deletions(-)
+
+--- a/drivers/net/dsa/mt7530-mdio.c
++++ b/drivers/net/dsa/mt7530-mdio.c
+@@ -18,7 +18,8 @@
+ static int
+ mt7530_regmap_write(void *context, unsigned int reg, unsigned int val)
+ {
+-	struct mii_bus *bus = context;
++	struct mt7530_priv *priv = context;
++	struct mii_bus *bus = priv->bus;
+ 	u16 page, r, lo, hi;
+ 	int ret;
+ 
+@@ -27,36 +28,35 @@ mt7530_regmap_write(void *context, unsig
+ 	lo = val & 0xffff;
+ 	hi = val >> 16;
+ 
+-	/* MT7530 uses 31 as the pseudo port */
+-	ret = bus->write(bus, 0x1f, 0x1f, page);
++	ret = bus->write(bus, priv->mdiodev->addr, 0x1f, page);
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	ret = bus->write(bus, 0x1f, r,  lo);
++	ret = bus->write(bus, priv->mdiodev->addr, r, lo);
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	ret = bus->write(bus, 0x1f, 0x10, hi);
++	ret = bus->write(bus, priv->mdiodev->addr, 0x10, hi);
+ 	return ret;
+ }
+ 
+ static int
+ mt7530_regmap_read(void *context, unsigned int reg, unsigned int *val)
+ {
+-	struct mii_bus *bus = context;
++	struct mt7530_priv *priv = context;
++	struct mii_bus *bus = priv->bus;
+ 	u16 page, r, lo, hi;
+ 	int ret;
+ 
+ 	page = (reg >> 6) & 0x3ff;
+ 	r = (reg >> 2) & 0xf;
+ 
+-	/* MT7530 uses 31 as the pseudo port */
+-	ret = bus->write(bus, 0x1f, 0x1f, page);
++	ret = bus->write(bus, priv->mdiodev->addr, 0x1f, page);
+ 	if (ret < 0)
+ 		return ret;
+ 
+-	lo = bus->read(bus, 0x1f, r);
+-	hi = bus->read(bus, 0x1f, 0x10);
++	lo = bus->read(bus, priv->mdiodev->addr, r);
++	hi = bus->read(bus, priv->mdiodev->addr, 0x10);
+ 
+ 	*val = (hi << 16) | (lo & 0xffff);
+ 
+@@ -107,8 +107,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+ 		mt7531_pcs_config[i]->unlock = mt7530_mdio_regmap_unlock;
+ 		mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
+ 
+-		regmap = devm_regmap_init(priv->dev,
+-					  &mt7530_regmap_bus, priv->bus,
++		regmap = devm_regmap_init(priv->dev, &mt7530_regmap_bus, priv,
+ 					  mt7531_pcs_config[i]);
+ 		if (IS_ERR(regmap)) {
+ 			ret = PTR_ERR(regmap);
+@@ -153,6 +152,7 @@ mt7530_probe(struct mdio_device *mdiodev
+ 
+ 	priv->bus = mdiodev->bus;
+ 	priv->dev = &mdiodev->dev;
++	priv->mdiodev = mdiodev;
+ 
+ 	ret = mt7530_probe_common(priv);
+ 	if (ret)
+@@ -203,8 +203,8 @@ mt7530_probe(struct mdio_device *mdiodev
+ 	regmap_config->reg_stride = 4;
+ 	regmap_config->max_register = MT7530_CREV;
+ 	regmap_config->disable_locking = true;
+-	priv->regmap = devm_regmap_init(priv->dev, &mt7530_regmap_bus,
+-					priv->bus, regmap_config);
++	priv->regmap = devm_regmap_init(priv->dev, &mt7530_regmap_bus, priv,
++					regmap_config);
+ 	if (IS_ERR(priv->regmap))
+ 		return PTR_ERR(priv->regmap);
+ 
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -86,22 +86,26 @@ core_read_mmd_indirect(struct mt7530_pri
+ 	int value, ret;
+ 
+ 	/* Write the desired MMD Devad */
+-	ret = bus->write(bus, 0, MII_MMD_CTRL, devad);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_CTRL, devad);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the desired MMD register address */
+-	ret = bus->write(bus, 0, MII_MMD_DATA, prtad);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_DATA, prtad);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Select the Function : DATA with no post increment */
+-	ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR));
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Read the content of the MMD's selected register */
+-	value = bus->read(bus, 0, MII_MMD_DATA);
++	value = bus->read(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			  MII_MMD_DATA);
+ 
+ 	return value;
+ err:
+@@ -118,22 +122,26 @@ core_write_mmd_indirect(struct mt7530_pr
+ 	int ret;
+ 
+ 	/* Write the desired MMD Devad */
+-	ret = bus->write(bus, 0, MII_MMD_CTRL, devad);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_CTRL, devad);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the desired MMD register address */
+-	ret = bus->write(bus, 0, MII_MMD_DATA, prtad);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_DATA, prtad);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Select the Function : DATA with no post increment */
+-	ret = bus->write(bus, 0, MII_MMD_CTRL, (devad | MII_MMD_CTRL_NOINCR));
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the data into MMD's selected register */
+-	ret = bus->write(bus, 0, MII_MMD_DATA, data);
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_DATA, data);
+ err:
+ 	if (ret < 0)
+ 		dev_err(&bus->dev,
+@@ -2679,16 +2687,19 @@ mt7531_setup(struct dsa_switch *ds)
+ 	 * phy_[read,write]_mmd_indirect is called, we provide our own
+ 	 * mt7531_ind_mmd_phy_[read,write] to complete this function.
+ 	 */
+-	val = mt7531_ind_c45_phy_read(priv, MT753X_CTRL_PHY_ADDR,
++	val = mt7531_ind_c45_phy_read(priv,
++				      MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+ 				      MDIO_MMD_VEND2, CORE_PLL_GROUP4);
+ 	val |= MT7531_RG_SYSPLL_DMY2 | MT7531_PHY_PLL_BYPASS_MODE;
+ 	val &= ~MT7531_PHY_PLL_OFF;
+-	mt7531_ind_c45_phy_write(priv, MT753X_CTRL_PHY_ADDR, MDIO_MMD_VEND2,
+-				 CORE_PLL_GROUP4, val);
++	mt7531_ind_c45_phy_write(priv,
++				 MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++				 MDIO_MMD_VEND2, CORE_PLL_GROUP4, val);
+ 
+ 	/* Disable EEE advertisement on the switch PHYs. */
+-	for (i = MT753X_CTRL_PHY_ADDR;
+-	     i < MT753X_CTRL_PHY_ADDR + MT7530_NUM_PHYS; i++) {
++	for (i = MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr);
++	     i < MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr) + MT7530_NUM_PHYS;
++	     i++) {
+ 		mt7531_ind_c45_phy_write(priv, i, MDIO_MMD_AN, MDIO_AN_EEE_ADV,
+ 					 0);
+ 	}
+--- a/drivers/net/dsa/mt7530.h
++++ b/drivers/net/dsa/mt7530.h
+@@ -629,7 +629,7 @@ enum mt7531_clk_skew {
+ #define  MT7531_PHY_PLL_OFF		BIT(5)
+ #define  MT7531_PHY_PLL_BYPASS_MODE	BIT(4)
+ 
+-#define MT753X_CTRL_PHY_ADDR		0
++#define MT753X_CTRL_PHY_ADDR(addr)	((addr + 1) & 0x1f)
+ 
+ #define CORE_PLL_GROUP5			0x404
+ #define  RG_LCDDS_PCW_NCPO1(x)		((x) & 0xffff)
+@@ -778,6 +778,7 @@ struct mt753x_info {
+  * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
+  * @create_sgmii:	Pointer to function creating SGMII PCS instance(s)
+  * @active_cpu_ports:	Holding the active CPU ports
++ * @mdiodev:		The pointer to the MDIO device structure
+  */
+ struct mt7530_priv {
+ 	struct device		*dev;
+@@ -804,6 +805,7 @@ struct mt7530_priv {
+ 	u32 irq_enable;
+ 	int (*create_sgmii)(struct mt7530_priv *priv);
+ 	u8 active_cpu_ports;
++	struct mdio_device *mdiodev;
+ };
+ 
+ struct mt7530_hw_vlan_entry {
diff --git a/target/linux/generic/backport-6.6/790-37-v6.10-net-dsa-mt7530-simplify-core-operations.patch b/target/linux/generic/backport-6.6/790-37-v6.10-net-dsa-mt7530-simplify-core-operations.patch
new file mode 100644
index 0000000000..d9d70f1d4d
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-37-v6.10-net-dsa-mt7530-simplify-core-operations.patch
@@ -0,0 +1,186 @@
+From 9764a08b3d260f4e7799d34bbfe64463db940d74 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Thu, 18 Apr 2024 08:35:31 +0300
+Subject: [PATCH 5/5] net: dsa: mt7530: simplify core operations
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+The core_rmw() function calls core_read_mmd_indirect() to read the
+requested register, and then calls core_write_mmd_indirect() to write the
+requested value to the register. Because Clause 22 is used to access Clause
+45 registers, some operations on core_write_mmd_indirect() are
+unnecessarily run. Get rid of core_read_mmd_indirect() and
+core_write_mmd_indirect(), and run only the necessary operations on
+core_write() and core_rmw().
+
+Reviewed-by: Daniel Golle <daniel at makrotopia.org>
+Tested-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+Signed-off-by: Paolo Abeni <pabeni at redhat.com>
+---
+ drivers/net/dsa/mt7530.c | 108 ++++++++++++++++-----------------------
+ 1 file changed, 43 insertions(+), 65 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -74,116 +74,94 @@ static const struct mt7530_mib_desc mt75
+ 	MIB_DESC(1, 0xb8, "RxArlDrop"),
+ };
+ 
+-/* Since phy_device has not yet been created and
+- * phy_{read,write}_mmd_indirect is not available, we provide our own
+- * core_{read,write}_mmd_indirect with core_{clear,write,set} wrappers
+- * to complete this function.
+- */
+-static int
+-core_read_mmd_indirect(struct mt7530_priv *priv, int prtad, int devad)
++static void
++mt7530_mutex_lock(struct mt7530_priv *priv)
++{
++	if (priv->bus)
++		mutex_lock_nested(&priv->bus->mdio_lock, MDIO_MUTEX_NESTED);
++}
++
++static void
++mt7530_mutex_unlock(struct mt7530_priv *priv)
++{
++	if (priv->bus)
++		mutex_unlock(&priv->bus->mdio_lock);
++}
++
++static void
++core_write(struct mt7530_priv *priv, u32 reg, u32 val)
+ {
+ 	struct mii_bus *bus = priv->bus;
+-	int value, ret;
++	int ret;
++
++	mt7530_mutex_lock(priv);
+ 
+ 	/* Write the desired MMD Devad */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_CTRL, devad);
++			 MII_MMD_CTRL, MDIO_MMD_VEND2);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the desired MMD register address */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_DATA, prtad);
++			 MII_MMD_DATA, reg);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Select the Function : DATA with no post increment */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
++			 MII_MMD_CTRL, MDIO_MMD_VEND2 | MII_MMD_CTRL_NOINCR);
+ 	if (ret < 0)
+ 		goto err;
+ 
+-	/* Read the content of the MMD's selected register */
+-	value = bus->read(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			  MII_MMD_DATA);
+-
+-	return value;
++	/* Write the data into MMD's selected register */
++	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			 MII_MMD_DATA, val);
+ err:
+-	dev_err(&bus->dev,  "failed to read mmd register\n");
++	if (ret < 0)
++		dev_err(&bus->dev, "failed to write mmd register\n");
+ 
+-	return ret;
++	mt7530_mutex_unlock(priv);
+ }
+ 
+-static int
+-core_write_mmd_indirect(struct mt7530_priv *priv, int prtad,
+-			int devad, u32 data)
++static void
++core_rmw(struct mt7530_priv *priv, u32 reg, u32 mask, u32 set)
+ {
+ 	struct mii_bus *bus = priv->bus;
++	u32 val;
+ 	int ret;
+ 
++	mt7530_mutex_lock(priv);
++
+ 	/* Write the desired MMD Devad */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_CTRL, devad);
++			 MII_MMD_CTRL, MDIO_MMD_VEND2);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Write the desired MMD register address */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_DATA, prtad);
++			 MII_MMD_DATA, reg);
+ 	if (ret < 0)
+ 		goto err;
+ 
+ 	/* Select the Function : DATA with no post increment */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_CTRL, devad | MII_MMD_CTRL_NOINCR);
++			 MII_MMD_CTRL, MDIO_MMD_VEND2 | MII_MMD_CTRL_NOINCR);
+ 	if (ret < 0)
+ 		goto err;
+ 
++	/* Read the content of the MMD's selected register */
++	val = bus->read(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
++			MII_MMD_DATA);
++	val &= ~mask;
++	val |= set;
+ 	/* Write the data into MMD's selected register */
+ 	ret = bus->write(bus, MT753X_CTRL_PHY_ADDR(priv->mdiodev->addr),
+-			 MII_MMD_DATA, data);
++			 MII_MMD_DATA, val);
+ err:
+ 	if (ret < 0)
+-		dev_err(&bus->dev,
+-			"failed to write mmd register\n");
+-	return ret;
+-}
+-
+-static void
+-mt7530_mutex_lock(struct mt7530_priv *priv)
+-{
+-	if (priv->bus)
+-		mutex_lock_nested(&priv->bus->mdio_lock, MDIO_MUTEX_NESTED);
+-}
+-
+-static void
+-mt7530_mutex_unlock(struct mt7530_priv *priv)
+-{
+-	if (priv->bus)
+-		mutex_unlock(&priv->bus->mdio_lock);
+-}
+-
+-static void
+-core_write(struct mt7530_priv *priv, u32 reg, u32 val)
+-{
+-	mt7530_mutex_lock(priv);
+-
+-	core_write_mmd_indirect(priv, reg, MDIO_MMD_VEND2, val);
+-
+-	mt7530_mutex_unlock(priv);
+-}
+-
+-static void
+-core_rmw(struct mt7530_priv *priv, u32 reg, u32 mask, u32 set)
+-{
+-	u32 val;
+-
+-	mt7530_mutex_lock(priv);
+-
+-	val = core_read_mmd_indirect(priv, reg, MDIO_MMD_VEND2);
+-	val &= ~mask;
+-	val |= set;
+-	core_write_mmd_indirect(priv, reg, MDIO_MMD_VEND2, val);
++		dev_err(&bus->dev, "failed to write mmd register\n");
+ 
+ 	mt7530_mutex_unlock(priv);
+ }



From lede-commits at lists.infradead.org  Wed Apr 24 13:06:54 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 16:06:54 -0400
Subject: [openwrt/openwrt]  mediatek: sync cpufreq support with changed
 compatible string
In-Reply-To: <171398921452.1722814.12015854301700261643@git-01.infra.openwrt.org>
References: <171398921452.1722814.12015854301700261643@git-01.infra.openwrt.org>
Message-ID: <mailman.30616.1713989224.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9599a85dc25c7c739cd7c3d047cfce16f1cf8cce

commit 9599a85dc25c7c739cd7c3d047cfce16f1cf8cce
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Fri Apr 19 18:17:01 2024 +0100

    mediatek: sync cpufreq support with changed compatible string
    
    The compatible string for the MediaTek MT7988 SoC ended up being
    'mediatek,mt7988a' instead of 'mediatek,mt7988' in the now upstream
    dtsi. Adapt the cpufreq driver so support for frequency scaling is
    again usable.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...1-cpufreq-mediatek-Add-support-for-MT7988.patch | 32 ++++++++++++++++++----
 ...1-cpufreq-mediatek-Add-support-for-MT7988.patch | 32 ++++++++++++++++++----
 2 files changed, 52 insertions(+), 12 deletions(-)

diff --git a/target/linux/mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch b/target/linux/mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch
index 49cd62d0ae..96bc7cebd0 100644
--- a/target/linux/mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch
+++ b/target/linux/mediatek/patches-6.1/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch
@@ -1,11 +1,31 @@
-From 4983a1517e7ddbc6f53fc07607e4ebeb51412843 Mon Sep 17 00:00:00 2001
+From patchwork Fri Apr 19 16:59:07 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Daniel Golle <daniel at makrotopia.org>
+X-Patchwork-Id: 13636668
+Return-Path: 
+ <linux-mediatek-bounces+linux-mediatek=archiver.kernel.org at lists.infradead.org>
+Date: Fri, 19 Apr 2024 17:59:07 +0100
+From: Daniel Golle <daniel at makrotopia.org>
+To: "Rafael J. Wysocki" <rafael at kernel.org>,
+	Viresh Kumar <viresh.kumar at linaro.org>,
+	Matthias Brugger <matthias.bgg at gmail.com>,
+	AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>,
+	linux-pm at vger.kernel.org, linux-kernel at vger.kernel.org,
+	linux-arm-kernel at lists.infradead.org,
+	linux-mediatek at lists.infradead.org
+Subject: [PATCH] cpufreq: mediatek: Add support for MT7988A
+Message-ID: 
+ <acf4fb446aacfbf6ce7b6e94bf3aad303e0ad4d1.1713545923.git.daniel at makrotopia.org>
+Content-Disposition: inline
+List-Id: <linux-mediatek.lists.infradead.org>
+
 From: Sam Shih <sam.shih at mediatek.com>
-Date: Tue, 28 Feb 2023 19:59:22 +0800
-Subject: [PATCH 21/21] cpufreq: mediatek: Add support for MT7988
 
-This add cpufreq support for mediatek MT7988 SoC.
+This add cpufreq support for mediatek MT7988A SoC.
 
-The platform data of MT7988 is different from previous MediaTek SoCs,
+The platform data of MT7988A is different from previous MediaTek SoCs,
 so we add a new compatible and platform data for it.
 
 Signed-off-by: Sam Shih <sam.shih at mediatek.com>
@@ -35,7 +55,7 @@ Signed-off-by: Sam Shih <sam.shih at mediatek.com>
  	{ .compatible = "mediatek,mt2712", .data = &mt2701_platform_data },
  	{ .compatible = "mediatek,mt7622", .data = &mt7622_platform_data },
  	{ .compatible = "mediatek,mt7623", .data = &mt7623_platform_data },
-+	{ .compatible = "mediatek,mt7988", .data = &mt7988_platform_data },
++	{ .compatible = "mediatek,mt7988a", .data = &mt7988_platform_data },
  	{ .compatible = "mediatek,mt8167", .data = &mt8516_platform_data },
  	{ .compatible = "mediatek,mt817x", .data = &mt2701_platform_data },
  	{ .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },
diff --git a/target/linux/mediatek/patches-6.6/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch b/target/linux/mediatek/patches-6.6/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch
index f7b62f1d94..fbaac13b64 100644
--- a/target/linux/mediatek/patches-6.6/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch
+++ b/target/linux/mediatek/patches-6.6/350-21-cpufreq-mediatek-Add-support-for-MT7988.patch
@@ -1,11 +1,31 @@
-From 4983a1517e7ddbc6f53fc07607e4ebeb51412843 Mon Sep 17 00:00:00 2001
+From patchwork Fri Apr 19 16:59:07 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 7bit
+X-Patchwork-Submitter: Daniel Golle <daniel at makrotopia.org>
+X-Patchwork-Id: 13636668
+Return-Path: 
+ <linux-mediatek-bounces+linux-mediatek=archiver.kernel.org at lists.infradead.org>
+Date: Fri, 19 Apr 2024 17:59:07 +0100
+From: Daniel Golle <daniel at makrotopia.org>
+To: "Rafael J. Wysocki" <rafael at kernel.org>,
+	Viresh Kumar <viresh.kumar at linaro.org>,
+	Matthias Brugger <matthias.bgg at gmail.com>,
+	AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>,
+	linux-pm at vger.kernel.org, linux-kernel at vger.kernel.org,
+	linux-arm-kernel at lists.infradead.org,
+	linux-mediatek at lists.infradead.org
+Subject: [PATCH] cpufreq: mediatek: Add support for MT7988A
+Message-ID: 
+ <acf4fb446aacfbf6ce7b6e94bf3aad303e0ad4d1.1713545923.git.daniel at makrotopia.org>
+Content-Disposition: inline
+List-Id: <linux-mediatek.lists.infradead.org>
+
 From: Sam Shih <sam.shih at mediatek.com>
-Date: Tue, 28 Feb 2023 19:59:22 +0800
-Subject: [PATCH 21/21] cpufreq: mediatek: Add support for MT7988
 
-This add cpufreq support for mediatek MT7988 SoC.
+This add cpufreq support for mediatek MT7988A SoC.
 
-The platform data of MT7988 is different from previous MediaTek SoCs,
+The platform data of MT7988A is different from previous MediaTek SoCs,
 so we add a new compatible and platform data for it.
 
 Signed-off-by: Sam Shih <sam.shih at mediatek.com>
@@ -35,7 +55,7 @@ Signed-off-by: Sam Shih <sam.shih at mediatek.com>
  	{ .compatible = "mediatek,mt2712", .data = &mt2701_platform_data },
  	{ .compatible = "mediatek,mt7622", .data = &mt7622_platform_data },
  	{ .compatible = "mediatek,mt7623", .data = &mt7623_platform_data },
-+	{ .compatible = "mediatek,mt7988", .data = &mt7988_platform_data },
++	{ .compatible = "mediatek,mt7988a", .data = &mt7988_platform_data },
  	{ .compatible = "mediatek,mt8167", .data = &mt8516_platform_data },
  	{ .compatible = "mediatek,mt817x", .data = &mt2701_platform_data },
  	{ .compatible = "mediatek,mt8173", .data = &mt2701_platform_data },



From lede-commits at lists.infradead.org  Wed Apr 24 13:46:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 16:46:32 -0400
Subject: [openwrt/openwrt]  mbedtls: Update to 2.28.8
In-Reply-To: <171399159235.1861699.14164023974422627201@git-01.infra.openwrt.org>
References: <171399159235.1861699.14164023974422627201@git-01.infra.openwrt.org>
Message-ID: <mailman.30629.1713991597.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/360ac07eb933feaf29bb031f788f0bf81c473be7

commit 360ac07eb933feaf29bb031f788f0bf81c473be7
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 21 17:40:09 2024 +0200

    mbedtls: Update to 2.28.8
    
    This contains a fix for:
    CVE-2024-28960: An issue was discovered in Mbed TLS 2.18.0 through 2.28.x
    before 2.28.8 and 3.x before 3.6.0, and Mbed Crypto. The PSA Crypto
    API mishandles shared memory.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/libs/mbedtls/Makefile                                  |  6 +++---
 .../mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch    | 10 +++++-----
 2 files changed, 8 insertions(+), 8 deletions(-)

diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 3bfbe8758b..459c9924bd 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -8,13 +8,13 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mbedtls
-PKG_VERSION:=2.28.7
-PKG_RELEASE:=2
+PKG_VERSION:=2.28.8
+PKG_RELEASE:=1
 PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=1df6073f0cf6a4e1953890bf5e0de2a8c7e6be50d6d6c69fa9fefcb1d14e981a
+PKG_HASH:=4fef7de0d8d542510d726d643350acb3cdb9dc76ad45611b59c9aa08372b4213
 
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=gpl-2.0.txt
diff --git a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch
index 4ad2e8c7db..808450c0dd 100644
--- a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch
+++ b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch
@@ -11,7 +11,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 
 --- a/include/mbedtls/x509_crt.h
 +++ b/include/mbedtls/x509_crt.h
-@@ -608,7 +608,7 @@ int mbedtls_x509_crt_verify_info(char *b
+@@ -596,7 +596,7 @@ int mbedtls_x509_crt_verify_info(char *b
   * \param cn       The expected Common Name. This will be checked to be
   *                 present in the certificate's subjectAltNames extension or,
   *                 if this extension is absent, as a CN component in its
@@ -22,7 +22,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
   *                 If the verification couldn't be completed, the flag value is
 --- a/library/x509_crt.c
 +++ b/library/x509_crt.c
-@@ -57,6 +57,10 @@
+@@ -45,6 +45,10 @@
  
  #if defined(MBEDTLS_HAVE_TIME)
  #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
@@ -33,7 +33,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  #include <windows.h>
  #else
  #include <time.h>
-@@ -3002,6 +3006,61 @@ find_parent:
+@@ -2990,6 +2994,61 @@ find_parent:
      }
  }
  
@@ -95,7 +95,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  /*
   * Check for CN match
   */
-@@ -3022,24 +3081,51 @@ static int x509_crt_check_cn(const mbedt
+@@ -3010,24 +3069,51 @@ static int x509_crt_check_cn(const mbedt
      return -1;
  }
  
@@ -158,7 +158,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
  }
  
  /*
-@@ -3050,31 +3136,23 @@ static void x509_crt_verify_name(const m
+@@ -3038,31 +3124,23 @@ static void x509_crt_verify_name(const m
                                   uint32_t *flags)
  {
      const mbedtls_x509_name *name;



From lede-commits at lists.infradead.org  Wed Apr 24 14:03:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Wed, 24 Apr 2024 17:03:48 -0400
Subject: [openwrt/openwrt]  wolfssl: Update to 5.7.0
In-Reply-To: <171399262847.1911797.10697478308304348851@git-01.infra.openwrt.org>
References: <171399262847.1911797.10697478308304348851@git-01.infra.openwrt.org>
Message-ID: <mailman.30634.1713992633.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f475a44c03a303851959930030ab9e6acebb81a7

commit f475a44c03a303851959930030ab9e6acebb81a7
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 21 17:46:55 2024 +0200

    wolfssl: Update to 5.7.0
    
    This fixes multiple security problems:
     * [High] CVE-2024-0901 Potential denial of service and out of bounds
       read. Affects TLS 1.3 on the server side when accepting a connection
       from a malicious TLS 1.3 client. If using TLS 1.3 on the server side
       it is recommended to update the version of wolfSSL used.
    
     * [Med] CVE-2024-1545 Fault Injection vulnerability in
       RsaPrivateDecryption function that potentially allows an attacker
       that has access to the same system with a victims process to perform
       a Rowhammer fault injection. Thanks to Junkai Liang, Zhi Zhang, Xin
       Zhang, Qingni Shen for the report (Peking University, The University
       of Western Australia)."
    
     * [Med] Fault injection attack with EdDSA signature operations. This
       affects ed25519 sign operations where the system could be susceptible
       to Rowhammer attacks. Thanks to Junkai Liang, Zhi Zhang, Xin Zhang,
       Qingni Shen for the report (Peking University, The University of
       Western Australia).
    
    Size increased a little:
    wolfssl 5.6.6:
    516880 bin/packages/mips_24kc/base/libwolfssl5.6.6.e624513f_5.6.6-stable-r1_mips_24kc.ipk
    wolfssl: 5.7.0:
    519429 bin/packages/mips_24kc/base/libwolfssl5.7.0.e624513f_5.7.0-stable-r1_mips_24kc.ipk
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/libs/wolfssl/Makefile                                  | 4 ++--
 package/libs/wolfssl/patches/100-disable-hardening-check.patch | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/libs/wolfssl/Makefile b/package/libs/wolfssl/Makefile
index 8477fb85c5..60ba85e15f 100644
--- a/package/libs/wolfssl/Makefile
+++ b/package/libs/wolfssl/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=wolfssl
-PKG_VERSION:=5.6.6-stable
+PKG_VERSION:=5.7.0-stable
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/wolfSSL/wolfssl/archive/v$(PKG_VERSION)
-PKG_HASH:=3d2ca672d41c2c2fa667885a80d6fa03c3e91f0f4f72f87aef2bc947e8c87237
+PKG_HASH:=2de93e8af588ee856fe67a6d7fce23fc1b226b74d710b0e3946bc8061f6aa18f
 
 PKG_FIXUP:=libtool libtool-abiver
 PKG_INSTALL:=1
diff --git a/package/libs/wolfssl/patches/100-disable-hardening-check.patch b/package/libs/wolfssl/patches/100-disable-hardening-check.patch
index 019645d796..680d3588a6 100644
--- a/package/libs/wolfssl/patches/100-disable-hardening-check.patch
+++ b/package/libs/wolfssl/patches/100-disable-hardening-check.patch
@@ -1,6 +1,6 @@
 --- a/wolfssl/wolfcrypt/settings.h
 +++ b/wolfssl/wolfcrypt/settings.h
-@@ -2774,7 +2774,7 @@ extern void uITRON4_free(void *p) ;
+@@ -2945,7 +2945,7 @@ extern void uITRON4_free(void *p) ;
  
  /* warning for not using harden build options (default with ./configure) */
  /* do not warn if big integer support is disabled */



From lede-commits at lists.infradead.org  Thu Apr 25 06:32:02 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 09:32:02 -0400
Subject: [openwrt/openwrt]  mxs: switch default to 6.6
In-Reply-To: <171405192213.2476190.11247637585957635800@git-01.infra.openwrt.org>
References: <171405192213.2476190.11247637585957635800@git-01.infra.openwrt.org>
Message-ID: <mailman.30840.1714051929.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dbe9084adb86493539f797df994f0397e05cc963

commit dbe9084adb86493539f797df994f0397e05cc963
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Thu Apr 25 14:31:59 2024 +0200

    mxs: switch default to 6.6
    
    Switch the default kernel to 6.6.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/mxs/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/mxs/Makefile b/target/linux/mxs/Makefile
index 606d19e21c..07239c0e17 100644
--- a/target/linux/mxs/Makefile
+++ b/target/linux/mxs/Makefile
@@ -11,8 +11,7 @@ FEATURES:=ext4 rtc usb gpio
 CPU_TYPE:=arm926ej-s
 SUBTARGETS:=generic
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 KERNELNAME:=zImage dtbs
 



From lede-commits at lists.infradead.org  Thu Apr 25 06:32:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 09:32:03 -0400
Subject: [openwrt/openwrt]  mxs: drop 6.1 support
In-Reply-To: <171405192213.2476190.11247637585957635800@git-01.infra.openwrt.org>
References: <171405192213.2476190.11247637585957635800@git-01.infra.openwrt.org>
Message-ID: <mailman.30841.1714051929.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2d838f3f93a236f1f9d71b7185da5465fc83c90d

commit 2d838f3f93a236f1f9d71b7185da5465fc83c90d
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Thu Apr 25 14:32:46 2024 +0200

    mxs: drop 6.1 support
    
    Now that 6.6 is the default, remove the 6.1 config and the hack that
    was required for the arm32 DTS dir change.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/mxs/config-6.1     | 245 ----------------------------------------
 target/linux/mxs/image/Makefile |   2 -
 2 files changed, 247 deletions(-)

diff --git a/target/linux/mxs/config-6.1 b/target/linux/mxs/config-6.1
deleted file mode 100644
index b23aef6969..0000000000
--- a/target/linux/mxs/config-6.1
+++ /dev/null
@@ -1,245 +0,0 @@
-CONFIG_ALIGNMENT_TRAP=y
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_FORCE_MAX_ORDER=11
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MULTIPLATFORM=y
-CONFIG_ARCH_MULTI_CPU_AUTO=y
-# CONFIG_ARCH_MULTI_V4 is not set
-# CONFIG_ARCH_MULTI_V4T is not set
-CONFIG_ARCH_MULTI_V4_V5=y
-CONFIG_ARCH_MULTI_V5=y
-CONFIG_ARCH_MXS=y
-CONFIG_ARCH_NR_GPIO=0
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARM=y
-CONFIG_ARM_AMBA=y
-CONFIG_ARM_APPENDED_DTB=y
-CONFIG_ARM_ATAG_DTB_COMPAT=y
-CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
-CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_L1_CACHE_SHIFT=5
-CONFIG_ARM_PATCH_PHYS_VIRT=y
-CONFIG_ARM_THUMB=y
-CONFIG_ARM_UNWIND=y
-CONFIG_ATAGS=y
-CONFIG_AUTO_ZRELADDR=y
-CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
-CONFIG_BLK_PM=y
-CONFIG_CLKSRC_MMIO=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMDLINE="console=ttyAMA0,115200 root=/dev/mmcblk0p2 rw rootwait"
-CONFIG_CMDLINE_FROM_BOOTLOADER=y
-CONFIG_COMMON_CLK=y
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_COREDUMP=y
-CONFIG_CPU_32v5=y
-CONFIG_CPU_ABRT_EV5TJ=y
-CONFIG_CPU_ARM926T=y
-# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
-CONFIG_CPU_CACHE_VIVT=y
-CONFIG_CPU_COPY_V4WB=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
-# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CPU_PABRT_LEGACY=y
-CONFIG_CPU_PM=y
-CONFIG_CPU_THUMB_CAPABLE=y
-CONFIG_CPU_TLB_V4WBI=y
-CONFIG_CPU_USE_DOMAINS=y
-CONFIG_CRC16=y
-CONFIG_CROSS_MEMORY_ATTACH=y
-CONFIG_CRYPTO_CBC=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_DEV_MXS_DCP=y
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_HW=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_DEBUG_ALIGN_RODATA=y
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-CONFIG_DMADEVICES=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
-CONFIG_DTC=y
-CONFIG_EDAC_ATOMIC_SCRUB=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_EXT4_FS=y
-CONFIG_EXTCON=y
-CONFIG_FEC=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-# CONFIG_GIANFAR is not set
-CONFIG_GLOB=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GPIO_GENERIC=y
-CONFIG_GPIO_GENERIC_PLATFORM=y
-CONFIG_GPIO_MXS=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HZ_FIXED=0
-CONFIG_HZ_PERIODIC=y
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_ALGOPCA=y
-CONFIG_I2C_ALGOPCF=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_MUX=y
-CONFIG_I2C_MUX_PINCTRL=y
-CONFIG_I2C_MXS=y
-CONFIG_IIO=y
-CONFIG_IIO_BUFFER=y
-CONFIG_IIO_KFIFO_BUF=y
-CONFIG_IIO_SYSFS_TRIGGER=y
-CONFIG_IIO_TRIGGER=y
-# CONFIG_IIO_TRIGGERED_BUFFER is not set
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_MXS=y
-CONFIG_IRQ_WORK=y
-# CONFIG_ISDN is not set
-CONFIG_JBD2=y
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MFD_CORE=y
-CONFIG_MFD_MXS_LRADC=y
-CONFIG_MIGRATION=y
-CONFIG_MMC=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_MXS=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MXS_DMA=y
-# CONFIG_MXS_LRADC_ADC is not set
-CONFIG_MXS_TIMER=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_KUSER_HELPERS=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NLS=y
-CONFIG_NVMEM=y
-CONFIG_NVMEM_MXS_OCOTP=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_PHYLIB=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_IMX23=y
-CONFIG_PINCTRL_IMX28=y
-CONFIG_PINCTRL_MXS=y
-# CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PM=y
-CONFIG_PM_CLK=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PPS=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_RATIONAL=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_GPIO=y
-CONFIG_RESET_CONTROLLER=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_STMP=y
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_RTC_MC146818_LIB=y
-# CONFIG_SERIAL_8250 is not set
-CONFIG_SERIAL_AMBA_PL011=y
-CONFIG_SERIAL_AMBA_PL011_CONSOLE=y
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SERIAL_MXS_AUART=y
-CONFIG_SERIAL_MXS_AUART_CONSOLE=y
-CONFIG_SMSC_PHY=y
-CONFIG_SOC_BUS=y
-CONFIG_SOC_IMX23=y
-CONFIG_SOC_IMX28=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPI=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MXS=y
-CONFIG_SPLIT_PTLOCK_CPUS=999999
-CONFIG_SRCU=y
-CONFIG_STMP3XXX_RTC_WATCHDOG=y
-CONFIG_STMP_DEVICE=y
-CONFIG_SWPHY=y
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TINY_SRCU=y
-CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
-# CONFIG_UNUSED_BOARD_FILES is not set
-CONFIG_UNWINDER_ARM=y
-CONFIG_USB=y
-CONFIG_USB_CHIPIDEA=y
-CONFIG_USB_CHIPIDEA_HOST=y
-CONFIG_USB_CHIPIDEA_IMX=y
-CONFIG_USB_CHIPIDEA_UDC=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_HCD_PLATFORM is not set
-CONFIG_USB_GADGET=y
-CONFIG_USB_MXS_PHY=y
-CONFIG_USB_OTG=y
-CONFIG_USB_PHY=y
-CONFIG_USB_ROLE_SWITCH=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USB_ULPI_BUS=y
-CONFIG_USE_OF=y
-# CONFIG_VFP is not set
-CONFIG_WATCHDOG_CORE=y
-CONFIG_XZ_DEC_ARM=y
-CONFIG_XZ_DEC_BCJ=y
-CONFIG_ZBOOT_ROM_BSS=0
-CONFIG_ZBOOT_ROM_TEXT=0
diff --git a/target/linux/mxs/image/Makefile b/target/linux/mxs/image/Makefile
index 585211dc0b..fff7e7ca33 100644
--- a/target/linux/mxs/image/Makefile
+++ b/target/linux/mxs/image/Makefile
@@ -39,9 +39,7 @@ define Device/Default
   KERNEL_NAME := zImage
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
-ifneq ($(KERNEL),6.1)
   DTS_DIR := $(DTS_DIR)/nxp/mxs
-endif
   DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
 endef
 



From lede-commits at lists.infradead.org  Thu Apr 25 08:09:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 11:09:48 -0400
Subject: [openwrt/openwrt]  sunxi: 6.6: set testing kernel
In-Reply-To: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
References: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
Message-ID: <mailman.30869.1714057789.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ee4e69cc35fbe987c3ad27831392c1fbdcaae04f

commit ee4e69cc35fbe987c3ad27831392c1fbdcaae04f
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed Apr 17 13:49:15 2024 +0200

    sunxi: 6.6: set testing kernel
    
    Allow selecting 6.6 as testing kernel on sunxi.
    
    Runtime-tested:
     - Linksprite pcDuino (cortexa8)
     - Olimex A20 Micro (cortexa7)
     - Pine64 SoM (cortexa53)
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/sunxi/Makefile b/target/linux/sunxi/Makefile
index 511c02772e..3982b763fb 100644
--- a/target/linux/sunxi/Makefile
+++ b/target/linux/sunxi/Makefile
@@ -11,6 +11,7 @@ FEATURES:=usb ext4 display rootfs-part rtc squashfs
 SUBTARGETS:=cortexa8 cortexa7 cortexa53
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 KERNELNAME:=zImage dtbs
 



From lede-commits at lists.infradead.org  Thu Apr 25 08:09:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 11:09:42 -0400
Subject: [openwrt/openwrt]  kernel/sunxi: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
References: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
Message-ID: <mailman.30870.1714057789.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3c69b9a8183466a3ca7054131288b66752092cb3

commit 3c69b9a8183466a3ca7054131288b66752092cb3
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Apr 16 23:17:13 2024 +0200

    kernel/sunxi: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/{config-6.1 => config-6.6}                             | 0
 target/linux/sunxi/cortexa53/{config-6.1 => config-6.6}                   | 0
 target/linux/sunxi/cortexa7/{config-6.1 => config-6.6}                    | 0
 target/linux/sunxi/cortexa8/{config-6.1 => config-6.6}                    | 0
 .../001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch             | 0
 ...02-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch | 0
 .../003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch                 | 0
 .../004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch | 0
 .../005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch     | 0
 .../006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch     | 0
 .../007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch     | 0
 .../008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch       | 0
 .../009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch       | 0
 ...0-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch | 0
 ...011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch | 0
 ...12-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch | 0
 .../013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch    | 0
 ...4-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch | 0
 ...-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch | 0
 .../016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch  | 0
 .../102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch              | 0
 .../301-orangepi_pc2_usb_otg_to_host_key_power.patch                      | 0
 .../400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch        | 0
 .../{patches-6.1 => patches-6.6}/410-sunxi-add-bananapi-p2-zero.patch     | 0
 .../430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch        | 0
 .../431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch            | 0
 .../442-arm64-dts-orangepi-one-plus-enable-PWM.patch                      | 0
 .../450-arm64-dts-enable-wifi-on-pine64-boards.patch                      | 0
 28 files changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/sunxi/config-6.1 b/target/linux/sunxi/config-6.6
similarity index 100%
rename from target/linux/sunxi/config-6.1
rename to target/linux/sunxi/config-6.6
diff --git a/target/linux/sunxi/cortexa53/config-6.1 b/target/linux/sunxi/cortexa53/config-6.6
similarity index 100%
rename from target/linux/sunxi/cortexa53/config-6.1
rename to target/linux/sunxi/cortexa53/config-6.6
diff --git a/target/linux/sunxi/cortexa7/config-6.1 b/target/linux/sunxi/cortexa7/config-6.6
similarity index 100%
rename from target/linux/sunxi/cortexa7/config-6.1
rename to target/linux/sunxi/cortexa7/config-6.6
diff --git a/target/linux/sunxi/cortexa8/config-6.1 b/target/linux/sunxi/cortexa8/config-6.6
similarity index 100%
rename from target/linux/sunxi/cortexa8/config-6.1
rename to target/linux/sunxi/cortexa8/config-6.6
diff --git a/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch b/target/linux/sunxi/patches-6.6/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
rename to target/linux/sunxi/patches-6.6/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
diff --git a/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch b/target/linux/sunxi/patches-6.6/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
rename to target/linux/sunxi/patches-6.6/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
diff --git a/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.6/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
rename to target/linux/sunxi/patches-6.6/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
diff --git a/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.6/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
rename to target/linux/sunxi/patches-6.6/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
diff --git a/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch b/target/linux/sunxi/patches-6.6/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
rename to target/linux/sunxi/patches-6.6/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
diff --git a/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch b/target/linux/sunxi/patches-6.6/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
rename to target/linux/sunxi/patches-6.6/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
diff --git a/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch b/target/linux/sunxi/patches-6.6/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
rename to target/linux/sunxi/patches-6.6/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
diff --git a/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch b/target/linux/sunxi/patches-6.6/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch
rename to target/linux/sunxi/patches-6.6/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch
diff --git a/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch b/target/linux/sunxi/patches-6.6/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
rename to target/linux/sunxi/patches-6.6/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
diff --git a/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch b/target/linux/sunxi/patches-6.6/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
rename to target/linux/sunxi/patches-6.6/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
diff --git a/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch b/target/linux/sunxi/patches-6.6/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch
rename to target/linux/sunxi/patches-6.6/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch
diff --git a/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch b/target/linux/sunxi/patches-6.6/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
rename to target/linux/sunxi/patches-6.6/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
diff --git a/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch b/target/linux/sunxi/patches-6.6/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
rename to target/linux/sunxi/patches-6.6/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
diff --git a/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch b/target/linux/sunxi/patches-6.6/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
rename to target/linux/sunxi/patches-6.6/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
diff --git a/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch b/target/linux/sunxi/patches-6.6/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
rename to target/linux/sunxi/patches-6.6/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
diff --git a/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch b/target/linux/sunxi/patches-6.6/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch
rename to target/linux/sunxi/patches-6.6/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch
diff --git a/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch b/target/linux/sunxi/patches-6.6/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch
rename to target/linux/sunxi/patches-6.6/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch
diff --git a/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch b/target/linux/sunxi/patches-6.6/301-orangepi_pc2_usb_otg_to_host_key_power.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch
rename to target/linux/sunxi/patches-6.6/301-orangepi_pc2_usb_otg_to_host_key_power.patch
diff --git a/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch b/target/linux/sunxi/patches-6.6/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch
rename to target/linux/sunxi/patches-6.6/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch
diff --git a/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch b/target/linux/sunxi/patches-6.6/410-sunxi-add-bananapi-p2-zero.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch
rename to target/linux/sunxi/patches-6.6/410-sunxi-add-bananapi-p2-zero.patch
diff --git a/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch b/target/linux/sunxi/patches-6.6/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch
rename to target/linux/sunxi/patches-6.6/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch
diff --git a/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch b/target/linux/sunxi/patches-6.6/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch
rename to target/linux/sunxi/patches-6.6/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch
diff --git a/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch b/target/linux/sunxi/patches-6.6/442-arm64-dts-orangepi-one-plus-enable-PWM.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch
rename to target/linux/sunxi/patches-6.6/442-arm64-dts-orangepi-one-plus-enable-PWM.patch
diff --git a/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch b/target/linux/sunxi/patches-6.6/450-arm64-dts-enable-wifi-on-pine64-boards.patch
similarity index 100%
rename from target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch
rename to target/linux/sunxi/patches-6.6/450-arm64-dts-enable-wifi-on-pine64-boards.patch



From lede-commits at lists.infradead.org  Thu Apr 25 08:09:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 11:09:45 -0400
Subject: [openwrt/openwrt]  sunxi: 6.6: refresh kernel configs
In-Reply-To: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
References: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
Message-ID: <mailman.30871.1714057789.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/91224742263aa322f3a289219d06ce8860a36cc6

commit 91224742263aa322f3a289219d06ce8860a36cc6
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed Apr 17 13:48:08 2024 +0200

    sunxi: 6.6: refresh kernel configs
    
    Refresh kernel config.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/config-6.6          | 2 ++
 target/linux/sunxi/cortexa7/config-6.6 | 2 ++
 2 files changed, 4 insertions(+)

diff --git a/target/linux/sunxi/config-6.6 b/target/linux/sunxi/config-6.6
index a76834c13a..3e73f44c90 100644
--- a/target/linux/sunxi/config-6.6
+++ b/target/linux/sunxi/config-6.6
@@ -442,6 +442,8 @@ CONFIG_SPI_SUN6I=y
 CONFIG_SRCU=y
 CONFIG_STMMAC_ETH=y
 CONFIG_STMMAC_PLATFORM=y
+# CONFIG_SUN20I_GPADC is not set
+# CONFIG_SUN20I_PPU is not set
 CONFIG_SUN4I_A10_CCU=y
 # CONFIG_SUN4I_EMAC is not set
 CONFIG_SUN4I_TIMER=y
diff --git a/target/linux/sunxi/cortexa7/config-6.6 b/target/linux/sunxi/cortexa7/config-6.6
index eaa6b037be..105c090890 100644
--- a/target/linux/sunxi/cortexa7/config-6.6
+++ b/target/linux/sunxi/cortexa7/config-6.6
@@ -20,6 +20,8 @@ CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
 CONFIG_NET_SWITCHDEV=y
 CONFIG_NOP_USB_XCEIV=y
 CONFIG_RTC_DRV_SUN6I=y
+CONFIG_SUN20I_D1_CCU=y
+CONFIG_SUN20I_D1_R_CCU=y
 CONFIG_USB_MUSB_DUAL_ROLE=y
 CONFIG_USB_MUSB_HDRC=y
 CONFIG_USB_MUSB_SUNXI=y



From lede-commits at lists.infradead.org  Thu Apr 25 08:09:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 11:09:47 -0400
Subject: [openwrt/openwrt]  sunxi: 6.6: refresh patches
In-Reply-To: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
References: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
Message-ID: <mailman.30872.1714057789.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7de163d58b4fa0899ea68ae5a5b3eee10b45c1b7

commit 7de163d58b4fa0899ea68ae5a5b3eee10b45c1b7
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed Apr 17 13:45:49 2024 +0200

    sunxi: 6.6: refresh patches
    
    Refresh kernel patches.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 ...v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch | 10 +++++-----
 ...mal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch |  4 ++--
 ...rmal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch |  4 ++--
 ...9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch |  6 +++---
 ...mal-drivers-sun8i-Add-support-for-H616-THS-controller.patch |  4 ++--
 ...al-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch |  6 +++---
 .../301-orangepi_pc2_usb_otg_to_host_key_power.patch           |  4 ++--
 .../sunxi/patches-6.6/410-sunxi-add-bananapi-p2-zero.patch     |  8 ++++----
 8 files changed, 23 insertions(+), 23 deletions(-)

diff --git a/target/linux/sunxi/patches-6.6/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch b/target/linux/sunxi/patches-6.6/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
index 3453e2aa53..5f9cb0273a 100644
--- a/target/linux/sunxi/patches-6.6/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
+++ b/target/linux/sunxi/patches-6.6/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
@@ -37,7 +37,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara at arm.com
 
 --- a/drivers/soc/sunxi/sunxi_sram.c
 +++ b/drivers/soc/sunxi/sunxi_sram.c
-@@ -284,6 +284,7 @@ EXPORT_SYMBOL(sunxi_sram_release);
+@@ -287,6 +287,7 @@ EXPORT_SYMBOL(sunxi_sram_release);
  struct sunxi_sramc_variant {
  	int num_emac_clocks;
  	bool has_ldo_ctrl;
@@ -45,7 +45,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara at arm.com
  };
  
  static const struct sunxi_sramc_variant sun4i_a10_sramc_variant = {
-@@ -305,8 +306,10 @@ static const struct sunxi_sramc_variant
+@@ -308,8 +309,10 @@ static const struct sunxi_sramc_variant
  
  static const struct sunxi_sramc_variant sun50i_h616_sramc_variant = {
  	.num_emac_clocks = 2,
@@ -56,7 +56,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara at arm.com
  #define SUNXI_SRAM_EMAC_CLOCK_REG	0x30
  #define SUNXI_SYS_LDO_CTRL_REG		0x150
  
-@@ -315,6 +318,8 @@ static bool sunxi_sram_regmap_accessible
+@@ -318,6 +321,8 @@ static bool sunxi_sram_regmap_accessible
  {
  	const struct sunxi_sramc_variant *variant = dev_get_drvdata(dev);
  
@@ -65,7 +65,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara at arm.com
  	if (reg >= SUNXI_SRAM_EMAC_CLOCK_REG &&
  	    reg <  SUNXI_SRAM_EMAC_CLOCK_REG + variant->num_emac_clocks * 4)
  		return true;
-@@ -324,6 +329,20 @@ static bool sunxi_sram_regmap_accessible
+@@ -327,6 +332,20 @@ static bool sunxi_sram_regmap_accessible
  	return false;
  }
  
@@ -86,7 +86,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara at arm.com
  static struct regmap_config sunxi_sram_regmap_config = {
  	.reg_bits       = 32,
  	.val_bits       = 32,
-@@ -333,6 +352,9 @@ static struct regmap_config sunxi_sram_r
+@@ -336,6 +355,9 @@ static struct regmap_config sunxi_sram_r
  	/* other devices have no business accessing other registers */
  	.readable_reg	= sunxi_sram_regmap_accessible_reg,
  	.writeable_reg	= sunxi_sram_regmap_accessible_reg,
diff --git a/target/linux/sunxi/patches-6.6/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch b/target/linux/sunxi/patches-6.6/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
index 8b19989118..66f576eb38 100644
--- a/target/linux/sunxi/patches-6.6/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
+++ b/target/linux/sunxi/patches-6.6/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20231217210629.131486-3-bigunclemax at gmail.com
 
 --- a/drivers/thermal/sun8i_thermal.c
 +++ b/drivers/thermal/sun8i_thermal.c
-@@ -610,6 +610,18 @@ static const struct ths_thermal_chip sun
+@@ -606,6 +606,18 @@ static const struct ths_thermal_chip sun
  	.calc_temp = sun8i_ths_calc_temp,
  };
  
@@ -37,7 +37,7 @@ Link: https://lore.kernel.org/r/20231217210629.131486-3-bigunclemax at gmail.com
  static const struct of_device_id of_ths_match[] = {
  	{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
  	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
-@@ -618,6 +630,7 @@ static const struct of_device_id of_ths_
+@@ -614,6 +626,7 @@ static const struct of_device_id of_ths_
  	{ .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths },
  	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
  	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
diff --git a/target/linux/sunxi/patches-6.6/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch b/target/linux/sunxi/patches-6.6/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
index 3d01a507fa..a0dbad48c9 100644
--- a/target/linux/sunxi/patches-6.6/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
+++ b/target/linux/sunxi/patches-6.6/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
@@ -25,7 +25,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-5-andre.przywara at arm.com
 
 --- a/drivers/thermal/sun8i_thermal.c
 +++ b/drivers/thermal/sun8i_thermal.c
-@@ -224,16 +224,21 @@ static int sun50i_h6_ths_calibrate(struc
+@@ -222,16 +222,21 @@ static int sun50i_h6_ths_calibrate(struc
  	struct device *dev = tmdev->dev;
  	int i, ft_temp;
  
@@ -52,7 +52,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-5-andre.przywara at arm.com
  	 *
  	 * The calibration data on the H6 is the ambient temperature and
  	 * sensor values that are filled during the factory test stage.
-@@ -246,9 +251,16 @@ static int sun50i_h6_ths_calibrate(struc
+@@ -244,9 +249,16 @@ static int sun50i_h6_ths_calibrate(struc
  	ft_temp = (caldata[0] & FT_TEMP_MASK) * 100;
  
  	for (i = 0; i < tmdev->chip->sensor_num; i++) {
diff --git a/target/linux/sunxi/patches-6.6/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch b/target/linux/sunxi/patches-6.6/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
index 6db1e32cfb..9b5e9d374f 100644
--- a/target/linux/sunxi/patches-6.6/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
+++ b/target/linux/sunxi/patches-6.6/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
@@ -28,12 +28,12 @@ Link: https://lore.kernel.org/r/20240219153639.179814-6-andre.przywara at arm.com
 @@ -15,6 +15,7 @@
  #include <linux/module.h>
  #include <linux/nvmem-consumer.h>
- #include <linux/of_device.h>
+ #include <linux/of.h>
 +#include <linux/of_platform.h>
  #include <linux/platform_device.h>
  #include <linux/regmap.h>
  #include <linux/reset.h>
-@@ -68,6 +69,7 @@ struct tsensor {
+@@ -66,6 +67,7 @@ struct tsensor {
  struct ths_thermal_chip {
  	bool            has_mod_clk;
  	bool            has_bus_clk_reset;
@@ -41,7 +41,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-6-andre.przywara at arm.com
  	int		sensor_num;
  	int		offset;
  	int		scale;
-@@ -85,12 +87,16 @@ struct ths_device {
+@@ -83,12 +85,16 @@ struct ths_device {
  	const struct ths_thermal_chip		*chip;
  	struct device				*dev;
  	struct regmap				*regmap;
diff --git a/target/linux/sunxi/patches-6.6/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch b/target/linux/sunxi/patches-6.6/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
index e743d344c6..187bc0dd7b 100644
--- a/target/linux/sunxi/patches-6.6/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
+++ b/target/linux/sunxi/patches-6.6/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
@@ -19,7 +19,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-7-andre.przywara at arm.com
 
 --- a/drivers/thermal/sun8i_thermal.c
 +++ b/drivers/thermal/sun8i_thermal.c
-@@ -688,6 +688,20 @@ static const struct ths_thermal_chip sun
+@@ -684,6 +684,20 @@ static const struct ths_thermal_chip sun
  	.calc_temp = sun8i_ths_calc_temp,
  };
  
@@ -40,7 +40,7 @@ Link: https://lore.kernel.org/r/20240219153639.179814-7-andre.przywara at arm.com
  static const struct of_device_id of_ths_match[] = {
  	{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
  	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
-@@ -697,6 +711,7 @@ static const struct of_device_id of_ths_
+@@ -693,6 +707,7 @@ static const struct of_device_id of_ths_
  	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
  	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
  	{ .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths },
diff --git a/target/linux/sunxi/patches-6.6/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch b/target/linux/sunxi/patches-6.6/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
index 384bf55084..dd18cd953c 100644
--- a/target/linux/sunxi/patches-6.6/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
+++ b/target/linux/sunxi/patches-6.6/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
@@ -36,7 +36,7 @@ Link: https://lore.kernel.org/r/20240123-thermal-sun8i-registration-v3-1-3e5771b
 
 --- a/drivers/thermal/sun8i_thermal.c
 +++ b/drivers/thermal/sun8i_thermal.c
-@@ -197,6 +197,9 @@ static irqreturn_t sun8i_irq_thread(int
+@@ -195,6 +195,9 @@ static irqreturn_t sun8i_irq_thread(int
  	int i;
  
  	for_each_set_bit(i, &irq_bitmap, tmdev->chip->sensor_num) {
@@ -64,5 +64,5 @@ Link: https://lore.kernel.org/r/20240123-thermal-sun8i-registration-v3-1-3e5771b
 +			continue;
 +		}
  
- 		if (devm_thermal_add_hwmon_sysfs(tmdev->sensor[i].tzd))
- 			dev_warn(tmdev->dev,
+ 		devm_thermal_add_hwmon_sysfs(tmdev->dev, tmdev->sensor[i].tzd);
+ 	}
diff --git a/target/linux/sunxi/patches-6.6/301-orangepi_pc2_usb_otg_to_host_key_power.patch b/target/linux/sunxi/patches-6.6/301-orangepi_pc2_usb_otg_to_host_key_power.patch
index 2c5ccd7d96..eea47737fa 100644
--- a/target/linux/sunxi/patches-6.6/301-orangepi_pc2_usb_otg_to_host_key_power.patch
+++ b/target/linux/sunxi/patches-6.6/301-orangepi_pc2_usb_otg_to_host_key_power.patch
@@ -1,6 +1,6 @@
 --- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
 +++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
-@@ -59,7 +59,7 @@
+@@ -60,7 +60,7 @@
  
  		key-sw4 {
  			label = "sw4";
@@ -9,7 +9,7 @@
  			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
  			wakeup-source;
  		};
-@@ -220,7 +220,7 @@
+@@ -221,7 +221,7 @@
  };
  
  &usb_otg {
diff --git a/target/linux/sunxi/patches-6.6/410-sunxi-add-bananapi-p2-zero.patch b/target/linux/sunxi/patches-6.6/410-sunxi-add-bananapi-p2-zero.patch
index 5b8dd170c5..01044fef49 100644
--- a/target/linux/sunxi/patches-6.6/410-sunxi-add-bananapi-p2-zero.patch
+++ b/target/linux/sunxi/patches-6.6/410-sunxi-add-bananapi-p2-zero.patch
@@ -1,6 +1,6 @@
---- a/arch/arm/boot/dts/Makefile
-+++ b/arch/arm/boot/dts/Makefile
-@@ -1352,6 +1352,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
+--- a/arch/arm/boot/dts/allwinner/Makefile
++++ b/arch/arm/boot/dts/allwinner/Makefile
+@@ -280,6 +280,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
  	sun8i-a83t-cubietruck-plus.dtb \
  	sun8i-a83t-tbs-a711.dtb \
  	sun8i-h2-plus-bananapi-m2-zero.dtb \
@@ -9,7 +9,7 @@
  	sun8i-h2-plus-orangepi-r1.dtb \
  	sun8i-h2-plus-orangepi-zero.dtb \
 --- /dev/null
-+++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-p2-zero.dts
++++ b/arch/arm/boot/dts/allwinner/sun8i-h2-plus-bananapi-p2-zero.dts
 @@ -0,0 +1,279 @@
 +// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
 +/*



From lede-commits at lists.infradead.org  Thu Apr 25 08:09:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 11:09:46 -0400
Subject: [openwrt/openwrt]  sunxi: update image Makefile to reflect updated
 DTS structure in 6.6
In-Reply-To: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
References: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
Message-ID: <mailman.30875.1714057793.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/82df12e98a0e972221389147c30f248eed52ddcf

commit 82df12e98a0e972221389147c30f248eed52ddcf
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed Apr 17 13:48:41 2024 +0200

    sunxi: update image Makefile to reflect updated DTS structure in 6.6
    
    For the ARM arch on 6.6, DTS files are moved into their vendor directories,
    mimicking arm64. Reflect this in the image Makefile.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/image/Makefile | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index cc1c1ba42d..d462880e90 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -34,7 +34,11 @@ define Device/Default
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
+ifneq ($(LINUX_6_1),)
   SUNXI_DTS_DIR :=
+else
+  SUNXI_DTS_DIR :=allwinner/
+endif
   SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1)))
 endef
 



From lede-commits at lists.infradead.org  Thu Apr 25 08:09:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 11:09:44 -0400
Subject: [openwrt/openwrt]  sunxi: 6.6: remove upstreamed patches
In-Reply-To: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
References: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
Message-ID: <mailman.30876.1714057793.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/438dc549361ddc992edb8dd6bd0feb096eddab89

commit 438dc549361ddc992edb8dd6bd0feb096eddab89
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Wed Apr 17 13:47:02 2024 +0200

    sunxi: 6.6: remove upstreamed patches
    
    Remove patches that have been upstreamed.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 ...t-bindings-usb-Add-H616-compatible-string.patch |  38 ---
 ...-Add-special-clock-for-Allwinner-H616-PHY.patch |  79 ------
 ....2-arm64-dts-allwinner-h616-Add-USB-nodes.patch | 188 -------------
 ...winner-h616-OrangePi-Zero-2-Add-USB-nodes.patch |  81 ------
 ...-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch | 305 ---------------------
 ...-allwinner-h616-Add-OrangePi-Zero-3-board.patch | 140 ----------
 ...-allwinner-h616-update-emac-for-Orange-Pi.patch |  57 ----
 7 files changed, 888 deletions(-)

diff --git a/target/linux/sunxi/patches-6.6/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch b/target/linux/sunxi/patches-6.6/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
deleted file mode 100644
index c24d479534..0000000000
--- a/target/linux/sunxi/patches-6.6/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 28a1a6474c5053bae01bd29946b4d5ede539176b Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 31 Oct 2022 11:13:52 +0000
-Subject: [PATCH] dt-bindings: usb: Add H616 compatible string
-
-The Allwinner H616 contains four fully OHCI/EHCI compatible USB host
-controllers, so just add their compatible strings to the list of
-generic OHCI/EHCI controllers.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Link: https://lore.kernel.org/r/20221031111358.3387297-2-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- Documentation/devicetree/bindings/usb/generic-ehci.yaml | 1 +
- Documentation/devicetree/bindings/usb/generic-ohci.yaml | 1 +
- 2 files changed, 2 insertions(+)
-
---- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
-+++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
-@@ -30,6 +30,7 @@ properties:
-               - allwinner,sun4i-a10-ehci
-               - allwinner,sun50i-a64-ehci
-               - allwinner,sun50i-h6-ehci
-+              - allwinner,sun50i-h616-ehci
-               - allwinner,sun5i-a13-ehci
-               - allwinner,sun6i-a31-ehci
-               - allwinner,sun7i-a20-ehci
---- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
-+++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
-@@ -20,6 +20,7 @@ properties:
-               - allwinner,sun4i-a10-ohci
-               - allwinner,sun50i-a64-ohci
-               - allwinner,sun50i-h6-ohci
-+              - allwinner,sun50i-h616-ohci
-               - allwinner,sun5i-a13-ohci
-               - allwinner,sun6i-a31-ohci
-               - allwinner,sun7i-a20-ohci
diff --git a/target/linux/sunxi/patches-6.6/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch b/target/linux/sunxi/patches-6.6/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
deleted file mode 100644
index 5739172ceb..0000000000
--- a/target/linux/sunxi/patches-6.6/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 6964affe65066651eca21e97247d3b7cac5153dc Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 31 Oct 2022 11:13:53 +0000
-Subject: [PATCH] dt-bindings: phy: Add special clock for Allwinner H616 PHY
-
-The USB PHY IP in the Allwinner H616 SoC requires a quirk that involves
-some resources from port 2's PHY and HCI IP. In particular the PMU clock
-for port 2 must be surely ungated before accessing the REG_HCI_PHY_CTL
-register of port 2. To allow each USB port to be controlled
-independently of port 2, we need a handle to that particular PMU clock
-in the *PHY* node, as the HCI and PHY part might be handled by separate
-drivers.
-
-Add that clock to the requirements of the H616 PHY binding, so that a
-PHY driver can apply the quirk in isolation, without requiring help from
-port 2's HCI driver.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Rob Herring <robh at kernel.org>
-Link: https://lore.kernel.org/r/20221031111358.3387297-3-andre.przywara at arm.com
-Signed-off-by: Vinod Koul <vkoul at kernel.org>
----
- .../phy/allwinner,sun8i-h3-usb-phy.yaml       | 26 +++++++++++++++++++
- 1 file changed, 26 insertions(+)
-
---- a/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
-+++ b/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
-@@ -36,18 +36,22 @@ properties:
-       - const: pmu3
- 
-   clocks:
-+    minItems: 4
-     items:
-       - description: USB OTG PHY bus clock
-       - description: USB Host 0 PHY bus clock
-       - description: USB Host 1 PHY bus clock
-       - description: USB Host 2 PHY bus clock
-+      - description: PMU clock for host port 2
- 
-   clock-names:
-+    minItems: 4
-     items:
-       - const: usb0_phy
-       - const: usb1_phy
-       - const: usb2_phy
-       - const: usb3_phy
-+      - const: pmu2_clk
- 
-   resets:
-     items:
-@@ -96,6 +100,28 @@ required:
-   - resets
-   - reset-names
- 
-+allOf:
-+  - if:
-+      properties:
-+        compatible:
-+          contains:
-+            enum:
-+              - allwinner,sun50i-h616-usb-phy
-+    then:
-+      properties:
-+        clocks:
-+          minItems: 5
-+
-+        clock-names:
-+          minItems: 5
-+    else:
-+      properties:
-+        clocks:
-+          maxItems: 4
-+
-+        clock-names:
-+          maxItems: 4
-+
- additionalProperties: false
- 
- examples:
diff --git a/target/linux/sunxi/patches-6.6/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.6/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
deleted file mode 100644
index 6dc1cf2f36..0000000000
--- a/target/linux/sunxi/patches-6.6/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
+++ /dev/null
@@ -1,188 +0,0 @@
-From f40cf244c3feb4e1a442f8029b691add2c65b3ab Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 31 Oct 2022 11:13:56 +0000
-Subject: [PATCH] arm64: dts: allwinner: h616: Add USB nodes
-
-Add the nodes for the MUSB and the four USB host controllers to the SoC
-.dtsi, along with the PHY node needed to bind all of them together.
-
-EHCI/OHCI and MUSB are compatible to previous SoCs, but the PHY requires
-some quirks (handled in the driver).
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20221031111358.3387297-6-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160 ++++++++++++++++++
- 1 file changed, 160 insertions(+)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
-@@ -504,6 +504,166 @@
- 			};
- 		};
- 
-+		usbotg: usb at 5100000 {
-+			compatible = "allwinner,sun50i-h616-musb",
-+				     "allwinner,sun8i-h3-musb";
-+			reg = <0x05100000 0x0400>;
-+			clocks = <&ccu CLK_BUS_OTG>;
-+			resets = <&ccu RST_BUS_OTG>;
-+			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
-+			interrupt-names = "mc";
-+			phys = <&usbphy 0>;
-+			phy-names = "usb";
-+			extcon = <&usbphy 0>;
-+			status = "disabled";
-+		};
-+
-+		usbphy: phy at 5100400 {
-+			compatible = "allwinner,sun50i-h616-usb-phy";
-+			reg = <0x05100400 0x24>,
-+			      <0x05101800 0x14>,
-+			      <0x05200800 0x14>,
-+			      <0x05310800 0x14>,
-+			      <0x05311800 0x14>;
-+			reg-names = "phy_ctrl",
-+				    "pmu0",
-+				    "pmu1",
-+				    "pmu2",
-+				    "pmu3";
-+			clocks = <&ccu CLK_USB_PHY0>,
-+				 <&ccu CLK_USB_PHY1>,
-+				 <&ccu CLK_USB_PHY2>,
-+				 <&ccu CLK_USB_PHY3>,
-+				 <&ccu CLK_BUS_EHCI2>;
-+			clock-names = "usb0_phy",
-+				      "usb1_phy",
-+				      "usb2_phy",
-+				      "usb3_phy",
-+				      "pmu2_clk";
-+			resets = <&ccu RST_USB_PHY0>,
-+				 <&ccu RST_USB_PHY1>,
-+				 <&ccu RST_USB_PHY2>,
-+				 <&ccu RST_USB_PHY3>;
-+			reset-names = "usb0_reset",
-+				      "usb1_reset",
-+				      "usb2_reset",
-+				      "usb3_reset";
-+			status = "disabled";
-+			#phy-cells = <1>;
-+		};
-+
-+		ehci0: usb at 5101000 {
-+			compatible = "allwinner,sun50i-h616-ehci",
-+				     "generic-ehci";
-+			reg = <0x05101000 0x100>;
-+			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI0>,
-+				 <&ccu CLK_BUS_EHCI0>,
-+				 <&ccu CLK_USB_OHCI0>;
-+			resets = <&ccu RST_BUS_OHCI0>,
-+				 <&ccu RST_BUS_EHCI0>;
-+			phys = <&usbphy 0>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ohci0: usb at 5101400 {
-+			compatible = "allwinner,sun50i-h616-ohci",
-+				     "generic-ohci";
-+			reg = <0x05101400 0x100>;
-+			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI0>,
-+				 <&ccu CLK_USB_OHCI0>;
-+			resets = <&ccu RST_BUS_OHCI0>;
-+			phys = <&usbphy 0>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ehci1: usb at 5200000 {
-+			compatible = "allwinner,sun50i-h616-ehci",
-+				     "generic-ehci";
-+			reg = <0x05200000 0x100>;
-+			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI1>,
-+				 <&ccu CLK_BUS_EHCI1>,
-+				 <&ccu CLK_USB_OHCI1>;
-+			resets = <&ccu RST_BUS_OHCI1>,
-+				 <&ccu RST_BUS_EHCI1>;
-+			phys = <&usbphy 1>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ohci1: usb at 5200400 {
-+			compatible = "allwinner,sun50i-h616-ohci",
-+				     "generic-ohci";
-+			reg = <0x05200400 0x100>;
-+			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI1>,
-+				 <&ccu CLK_USB_OHCI1>;
-+			resets = <&ccu RST_BUS_OHCI1>;
-+			phys = <&usbphy 1>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ehci2: usb at 5310000 {
-+			compatible = "allwinner,sun50i-h616-ehci",
-+				     "generic-ehci";
-+			reg = <0x05310000 0x100>;
-+			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI2>,
-+				 <&ccu CLK_BUS_EHCI2>,
-+				 <&ccu CLK_USB_OHCI2>;
-+			resets = <&ccu RST_BUS_OHCI2>,
-+				 <&ccu RST_BUS_EHCI2>;
-+			phys = <&usbphy 2>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ohci2: usb at 5310400 {
-+			compatible = "allwinner,sun50i-h616-ohci",
-+				     "generic-ohci";
-+			reg = <0x05310400 0x100>;
-+			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI2>,
-+				 <&ccu CLK_USB_OHCI2>;
-+			resets = <&ccu RST_BUS_OHCI2>;
-+			phys = <&usbphy 2>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ehci3: usb at 5311000 {
-+			compatible = "allwinner,sun50i-h616-ehci",
-+				     "generic-ehci";
-+			reg = <0x05311000 0x100>;
-+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI3>,
-+				 <&ccu CLK_BUS_EHCI3>,
-+				 <&ccu CLK_USB_OHCI3>;
-+			resets = <&ccu RST_BUS_OHCI3>,
-+				 <&ccu RST_BUS_EHCI3>;
-+			phys = <&usbphy 3>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
-+		ohci3: usb at 5311400 {
-+			compatible = "allwinner,sun50i-h616-ohci",
-+				     "generic-ohci";
-+			reg = <0x05311400 0x100>;
-+			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&ccu CLK_BUS_OHCI3>,
-+				 <&ccu CLK_USB_OHCI3>;
-+			resets = <&ccu RST_BUS_OHCI3>;
-+			phys = <&usbphy 3>;
-+			phy-names = "usb";
-+			status = "disabled";
-+		};
-+
- 		rtc: rtc at 7000000 {
- 			compatible = "allwinner,sun50i-h616-rtc";
- 			reg = <0x07000000 0x400>;
diff --git a/target/linux/sunxi/patches-6.6/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.6/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
deleted file mode 100644
index a544e482f3..0000000000
--- a/target/linux/sunxi/patches-6.6/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From db5f028309ede13767e2ba356c1975ac37a4fd6c Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Mon, 31 Oct 2022 11:13:57 +0000
-Subject: [PATCH] arm64: dts: allwinner: h616: OrangePi Zero 2: Add USB nodes
-
-The OrangePi Zero 2 has one USB-A host port, VBUS is provided by
-a GPIO controlled regulator.
-The USB-C port is meant to power the board, but is also connected to
-the USB 0 port, which we configure as an MUSB peripheral.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20221031111358.3387297-7-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- .../allwinner/sun50i-h616-orangepi-zero2.dts  | 41 +++++++++++++++++++
- 1 file changed, 41 insertions(+)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-@@ -49,8 +49,24 @@
- 		regulator-max-microvolt = <5000000>;
- 		regulator-always-on;
- 	};
-+
-+	reg_usb1_vbus: regulator-usb1-vbus {
-+		compatible = "regulator-fixed";
-+		regulator-name = "usb1-vbus";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&reg_vcc5v>;
-+		enable-active-high;
-+		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
-+	};
-+};
-+
-+&ehci1 {
-+	status = "okay";
- };
- 
-+/* USB 2 & 3 are on headers only. */
-+
- &emac0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&ext_rgmii_pins>;
-@@ -76,6 +92,10 @@
- 	status = "okay";
- };
- 
-+&ohci1 {
-+	status = "okay";
-+};
-+
- &r_rsb {
- 	status = "okay";
- 
-@@ -211,3 +231,24 @@
- 	pinctrl-0 = <&uart0_ph_pins>;
- 	status = "okay";
- };
-+
-+&usbotg {
-+	/*
-+	 * PHY0 pins are connected to a USB-C socket, but a role switch
-+	 * is not implemented: both CC pins are pulled to GND.
-+	 * The VBUS pins power the device, so a fixed peripheral mode
-+	 * is the best choice.
-+	 * The board can be powered via GPIOs, in this case port0 *can*
-+	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
-+	 * then provided by the GPIOs. Any user of this setup would
-+	 * need to adjust the DT accordingly: dr_mode set to "host",
-+	 * enabling OHCI0 and EHCI0.
-+	 */
-+	dr_mode = "peripheral";
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	status = "okay";
-+};
diff --git a/target/linux/sunxi/patches-6.6/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch b/target/linux/sunxi/patches-6.6/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
deleted file mode 100644
index 0747e6a8e0..0000000000
--- a/target/linux/sunxi/patches-6.6/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
+++ /dev/null
@@ -1,305 +0,0 @@
-From 322bf103204b8f786547acbeed85569254e7088f Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Fri, 4 Aug 2023 18:08:54 +0100
-Subject: [PATCH] arm64: dts: allwinner: h616: Split Orange Pi Zero 2 DT
-
-The Orange Pi Zero 2 got a successor (Zero 3), which shares quite some
-DT nodes with the Zero 2, but comes with a different PMIC.
-
-Move the common parts (except the PMIC) into a new shared file, and
-include that from the existing board .dts file.
-
-No functional change, the generated DTB is the same, except for some
-phandle numbering differences.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20230804170856.1237202-2-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- .../allwinner/sun50i-h616-orangepi-zero.dtsi  | 134 ++++++++++++++++++
- .../allwinner/sun50i-h616-orangepi-zero2.dts  | 119 +---------------
- 2 files changed, 135 insertions(+), 118 deletions(-)
- create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
-
---- /dev/null
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
-@@ -0,0 +1,134 @@
-+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
-+/*
-+ * Copyright (C) 2020 Arm Ltd.
-+ *
-+ * DT nodes common between Orange Pi Zero 2 and Orange Pi Zero 3.
-+ * Excludes PMIC nodes and properties, since they are different between the two.
-+ */
-+
-+#include "sun50i-h616.dtsi"
-+
-+#include <dt-bindings/gpio/gpio.h>
-+#include <dt-bindings/interrupt-controller/arm-gic.h>
-+#include <dt-bindings/leds/common.h>
-+
-+/ {
-+	aliases {
-+		ethernet0 = &emac0;
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	leds {
-+		compatible = "gpio-leds";
-+
-+		led-0 {
-+			function = LED_FUNCTION_POWER;
-+			color = <LED_COLOR_ID_RED>;
-+			gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
-+			default-state = "on";
-+		};
-+
-+		led-1 {
-+			function = LED_FUNCTION_STATUS;
-+			color = <LED_COLOR_ID_GREEN>;
-+			gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
-+		};
-+	};
-+
-+	reg_vcc5v: vcc5v {
-+		/* board wide 5V supply directly from the USB-C socket */
-+		compatible = "regulator-fixed";
-+		regulator-name = "vcc-5v";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		regulator-always-on;
-+	};
-+
-+	reg_usb1_vbus: regulator-usb1-vbus {
-+		compatible = "regulator-fixed";
-+		regulator-name = "usb1-vbus";
-+		regulator-min-microvolt = <5000000>;
-+		regulator-max-microvolt = <5000000>;
-+		vin-supply = <&reg_vcc5v>;
-+		enable-active-high;
-+		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
-+	};
-+};
-+
-+&ehci1 {
-+	status = "okay";
-+};
-+
-+/* USB 2 & 3 are on headers only. */
-+
-+&emac0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&ext_rgmii_pins>;
-+	phy-mode = "rgmii";
-+	phy-handle = <&ext_rgmii_phy>;
-+	allwinner,rx-delay-ps = <3100>;
-+	allwinner,tx-delay-ps = <700>;
-+	status = "okay";
-+};
-+
-+&mdio0 {
-+	ext_rgmii_phy: ethernet-phy at 1 {
-+		compatible = "ethernet-phy-ieee802.3-c22";
-+		reg = <1>;
-+	};
-+};
-+
-+&mmc0 {
-+	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;	/* PF6 */
-+	bus-width = <4>;
-+	status = "okay";
-+};
-+
-+&ohci1 {
-+	status = "okay";
-+};
-+
-+&spi0  {
-+	status = "okay";
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
-+
-+	flash at 0 {
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		compatible = "jedec,spi-nor";
-+		reg = <0>;
-+		spi-max-frequency = <40000000>;
-+	};
-+};
-+
-+&uart0 {
-+	pinctrl-names = "default";
-+	pinctrl-0 = <&uart0_ph_pins>;
-+	status = "okay";
-+};
-+
-+&usbotg {
-+	/*
-+	 * PHY0 pins are connected to a USB-C socket, but a role switch
-+	 * is not implemented: both CC pins are pulled to GND.
-+	 * The VBUS pins power the device, so a fixed peripheral mode
-+	 * is the best choice.
-+	 * The board can be powered via GPIOs, in this case port0 *can*
-+	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
-+	 * then provided by the GPIOs. Any user of this setup would
-+	 * need to adjust the DT accordingly: dr_mode set to "host",
-+	 * enabling OHCI0 and EHCI0.
-+	 */
-+	dr_mode = "peripheral";
-+	status = "okay";
-+};
-+
-+&usbphy {
-+	usb1_vbus-supply = <&reg_usb1_vbus>;
-+	status = "okay";
-+};
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-@@ -5,95 +5,19 @@
- 
- /dts-v1/;
- 
--#include "sun50i-h616.dtsi"
--
--#include <dt-bindings/gpio/gpio.h>
--#include <dt-bindings/interrupt-controller/arm-gic.h>
--#include <dt-bindings/leds/common.h>
-+#include "sun50i-h616-orangepi-zero.dtsi"
- 
- / {
- 	model = "OrangePi Zero2";
- 	compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616";
--
--	aliases {
--		ethernet0 = &emac0;
--		serial0 = &uart0;
--	};
--
--	chosen {
--		stdout-path = "serial0:115200n8";
--	};
--
--	leds {
--		compatible = "gpio-leds";
--
--		led-0 {
--			function = LED_FUNCTION_POWER;
--			color = <LED_COLOR_ID_RED>;
--			gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
--			default-state = "on";
--		};
--
--		led-1 {
--			function = LED_FUNCTION_STATUS;
--			color = <LED_COLOR_ID_GREEN>;
--			gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
--		};
--	};
--
--	reg_vcc5v: vcc5v {
--		/* board wide 5V supply directly from the USB-C socket */
--		compatible = "regulator-fixed";
--		regulator-name = "vcc-5v";
--		regulator-min-microvolt = <5000000>;
--		regulator-max-microvolt = <5000000>;
--		regulator-always-on;
--	};
--
--	reg_usb1_vbus: regulator-usb1-vbus {
--		compatible = "regulator-fixed";
--		regulator-name = "usb1-vbus";
--		regulator-min-microvolt = <5000000>;
--		regulator-max-microvolt = <5000000>;
--		vin-supply = <&reg_vcc5v>;
--		enable-active-high;
--		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
--	};
--};
--
--&ehci1 {
--	status = "okay";
- };
- 
--/* USB 2 & 3 are on headers only. */
--
- &emac0 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&ext_rgmii_pins>;
--	phy-mode = "rgmii";
--	phy-handle = <&ext_rgmii_phy>;
- 	phy-supply = <&reg_dcdce>;
--	allwinner,rx-delay-ps = <3100>;
--	allwinner,tx-delay-ps = <700>;
--	status = "okay";
--};
--
--&mdio0 {
--	ext_rgmii_phy: ethernet-phy at 1 {
--		compatible = "ethernet-phy-ieee802.3-c22";
--		reg = <1>;
--	};
- };
- 
- &mmc0 {
- 	vmmc-supply = <&reg_dcdce>;
--	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;	/* PF6 */
--	bus-width = <4>;
--	status = "okay";
--};
--
--&ohci1 {
--	status = "okay";
- };
- 
- &r_rsb {
-@@ -211,44 +135,3 @@
- 	vcc-ph-supply = <&reg_aldo1>;
- 	vcc-pi-supply = <&reg_aldo1>;
- };
--
--&spi0  {
--	status = "okay";
--	pinctrl-names = "default";
--	pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
--
--	flash at 0 {
--		#address-cells = <1>;
--		#size-cells = <1>;
--		compatible = "jedec,spi-nor";
--		reg = <0>;
--		spi-max-frequency = <40000000>;
--	};
--};
--
--&uart0 {
--	pinctrl-names = "default";
--	pinctrl-0 = <&uart0_ph_pins>;
--	status = "okay";
--};
--
--&usbotg {
--	/*
--	 * PHY0 pins are connected to a USB-C socket, but a role switch
--	 * is not implemented: both CC pins are pulled to GND.
--	 * The VBUS pins power the device, so a fixed peripheral mode
--	 * is the best choice.
--	 * The board can be powered via GPIOs, in this case port0 *can*
--	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
--	 * then provided by the GPIOs. Any user of this setup would
--	 * need to adjust the DT accordingly: dr_mode set to "host",
--	 * enabling OHCI0 and EHCI0.
--	 */
--	dr_mode = "peripheral";
--	status = "okay";
--};
--
--&usbphy {
--	usb1_vbus-supply = <&reg_usb1_vbus>;
--	status = "okay";
--};
diff --git a/target/linux/sunxi/patches-6.6/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch b/target/linux/sunxi/patches-6.6/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
deleted file mode 100644
index 4081a82d52..0000000000
--- a/target/linux/sunxi/patches-6.6/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
+++ /dev/null
@@ -1,140 +0,0 @@
-From f1b3ddb3ecc2eec1f912383e01156c226daacfab Mon Sep 17 00:00:00 2001
-From: Andre Przywara <andre.przywara at arm.com>
-Date: Fri, 4 Aug 2023 18:08:56 +0100
-Subject: [PATCH] arm64: dts: allwinner: h616: Add OrangePi Zero 3 board
- support
-
-The OrangePi Zero 3 is a development board based on the Allwinner H618 SoC,
-which seems to be just an H616 with more L2 cache. The board itself is a
-slightly updated version of the Orange Pi Zero 2. It features:
-- Four ARM Cortex-A53 cores, Mali-G31 MP2 GPU
-- 1/1.5/2/4 GiB LPDDR4 DRAM SKUs (only up to 1GB on the Zero2)
-- AXP313a PMIC (more capable AXP305 on the Zero2)
-- Raspberry-Pi-1 compatible GPIO header
-- extra 13 pin expansion header, exposing pins for 2x USB 2.0 ports
-- 1 USB 2.0 host port
-- 1 USB 2.0 type C port (power supply + OTG)
-- MicroSD slot
-- on-board 16MiB bootable SPI NOR flash (only 2MB on the Zero2)
-- 1Gbps Ethernet port (via Motorcomm YT8531 PHY) (RTL8211 on the Zero2)
-- micro-HDMI port
-- (yet) unsupported Allwinner WiFi/BT chip
-
-Add the devicetree file describing the currently supported features,
-namely LEDs, SD card, PMIC, SPI flash, USB. Ethernet seems unstable at
-the moment, though the basic functionality works.
-
-Signed-off-by: Andre Przywara <andre.przywara at arm.com>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20230804170856.1237202-4-andre.przywara at arm.com
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- arch/arm64/boot/dts/allwinner/Makefile        |  1 +
- .../allwinner/sun50i-h618-orangepi-zero3.dts  | 94 +++++++++++++++++++
- 2 files changed, 95 insertions(+)
- create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
-
---- a/arch/arm64/boot/dts/allwinner/Makefile
-+++ b/arch/arm64/boot/dts/allwinner/Makefile
-@@ -40,3 +40,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-ta
- dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb
- dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
- dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
-+dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
-@@ -0,0 +1,94 @@
-+// SPDX-License-Identifier: (GPL-2.0+ or MIT)
-+/*
-+ * Copyright (C) 2023 Arm Ltd.
-+ */
-+
-+/dts-v1/;
-+
-+#include "sun50i-h616-orangepi-zero.dtsi"
-+
-+/ {
-+	model = "OrangePi Zero3";
-+	compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618";
-+};
-+
-+&emac0 {
-+	phy-supply = <&reg_dldo1>;
-+};
-+
-+&ext_rgmii_phy {
-+	motorcomm,clk-out-frequency-hz = <125000000>;
-+};
-+
-+&mmc0 {
-+	/*
-+	 * The schematic shows the card detect pin wired up to PF6, via an
-+	 * inverter, but it just doesn't work.
-+	 */
-+	broken-cd;
-+	vmmc-supply = <&reg_dldo1>;
-+};
-+
-+&r_i2c {
-+	status = "okay";
-+
-+	axp313: pmic at 36 {
-+		compatible = "x-powers,axp313a";
-+		reg = <0x36>;
-+		#interrupt-cells = <1>;
-+		interrupt-controller;
-+		interrupt-parent = <&pio>;
-+		interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>;	/* PC9 */
-+
-+		vin1-supply = <&reg_vcc5v>;
-+		vin2-supply = <&reg_vcc5v>;
-+		vin3-supply = <&reg_vcc5v>;
-+
-+		regulators {
-+			/* Supplies VCC-PLL, so needs to be always on. */
-+			reg_aldo1: aldo1 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <1800000>;
-+				regulator-max-microvolt = <1800000>;
-+				regulator-name = "vcc1v8";
-+			};
-+
-+			/* Supplies VCC-IO, so needs to be always on. */
-+			reg_dldo1: dldo1 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <3300000>;
-+				regulator-max-microvolt = <3300000>;
-+				regulator-name = "vcc3v3";
-+			};
-+
-+			reg_dcdc1: dcdc1 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <810000>;
-+				regulator-max-microvolt = <990000>;
-+				regulator-name = "vdd-gpu-sys";
-+			};
-+
-+			reg_dcdc2: dcdc2 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <810000>;
-+				regulator-max-microvolt = <1100000>;
-+				regulator-name = "vdd-cpu";
-+			};
-+
-+			reg_dcdc3: dcdc3 {
-+				regulator-always-on;
-+				regulator-min-microvolt = <1100000>;
-+				regulator-max-microvolt = <1100000>;
-+				regulator-name = "vdd-dram";
-+			};
-+		};
-+	};
-+};
-+
-+&pio {
-+	vcc-pc-supply = <&reg_dldo1>;
-+	vcc-pf-supply = <&reg_dldo1>;
-+	vcc-pg-supply = <&reg_aldo1>;
-+	vcc-ph-supply = <&reg_dldo1>;
-+	vcc-pi-supply = <&reg_dldo1>;
-+};
diff --git a/target/linux/sunxi/patches-6.6/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch b/target/linux/sunxi/patches-6.6/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
deleted file mode 100644
index a492eed551..0000000000
--- a/target/linux/sunxi/patches-6.6/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
+++ /dev/null
@@ -1,57 +0,0 @@
-From b9622937d95809ef89904583191571a9fa326402 Mon Sep 17 00:00:00 2001
-From: Chukun Pan <amadeus at jmu.edu.cn>
-Date: Sun, 29 Oct 2023 15:40:09 +0800
-Subject: [PATCH] arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3
-
-The current emac setting is not suitable for Orange Pi Zero 3,
-move it back to Orange Pi Zero 2 DT. Also update phy mode and
-delay values for emac on Orange Pi Zero 3.
-With these changes, Ethernet now looks stable.
-
-Fixes: 322bf103204b ("arm64: dts: allwinner: h616: Split Orange Pi Zero 2 DT")
-Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
-Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
-Link: https://lore.kernel.org/r/20231029074009.7820-2-amadeus at jmu.edu.cn
-Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
----
- arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 3 ---
- arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 3 +++
- arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 2 ++
- 3 files changed, 5 insertions(+), 3 deletions(-)
-
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
-@@ -68,10 +68,7 @@
- &emac0 {
- 	pinctrl-names = "default";
- 	pinctrl-0 = <&ext_rgmii_pins>;
--	phy-mode = "rgmii";
- 	phy-handle = <&ext_rgmii_phy>;
--	allwinner,rx-delay-ps = <3100>;
--	allwinner,tx-delay-ps = <700>;
- 	status = "okay";
- };
- 
---- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
-@@ -13,6 +13,9 @@
- };
- 
- &emac0 {
-+	allwinner,rx-delay-ps = <3100>;
-+	allwinner,tx-delay-ps = <700>;
-+	phy-mode = "rgmii";
- 	phy-supply = <&reg_dcdce>;
- };
- 
---- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
-+++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
-@@ -13,6 +13,8 @@
- };
- 
- &emac0 {
-+	allwinner,tx-delay-ps = <700>;
-+	phy-mode = "rgmii-rxid";
- 	phy-supply = <&reg_dldo1>;
- };
- 



From lede-commits at lists.infradead.org  Thu Apr 25 08:09:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 11:09:43 -0400
Subject: [openwrt/openwrt]  kernel/sunxi: Restore kernel files for v6.1
In-Reply-To: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
References: <171405778274.2977431.5839941697192273628@git-01.infra.openwrt.org>
Message-ID: <mailman.30879.1714057793.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9e348da47734d89d0f9c07a6402ce24a099fbbf9

commit 9e348da47734d89d0f9c07a6402ce24a099fbbf9
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Tue Apr 16 23:17:13 2024 +0200

    kernel/sunxi: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/config-6.1                      | 524 +++++++++++++++++++++
 target/linux/sunxi/cortexa53/config-6.1            | 109 +++++
 target/linux/sunxi/cortexa7/config-6.1             |  26 +
 target/linux/sunxi/cortexa8/config-6.1             |  12 +
 ...t-bindings-usb-Add-H616-compatible-string.patch |  38 ++
 ...-Add-special-clock-for-Allwinner-H616-PHY.patch |  79 ++++
 ....2-arm64-dts-allwinner-h616-Add-USB-nodes.patch | 188 ++++++++
 ...winner-h616-OrangePi-Zero-2-Add-USB-nodes.patch |  81 ++++
 ...-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch | 305 ++++++++++++
 ...-allwinner-h616-Add-OrangePi-Zero-3-board.patch | 140 ++++++
 ...-allwinner-h616-update-emac-for-Orange-Pi.patch |  57 +++
 ...ts-allwinner-h616-Add-SID-controller-node.patch |  31 ++
 ...xi-sram-export-register-0-for-THS-on-H616.patch |  98 ++++
 ...sun8i-Add-D1-T113s-THS-controller-support.patch |  47 ++
 ...s-sun8i-Explain-unknown-H6-register-value.patch |  79 ++++
 ...-sun8i-Extend-H6-calibration-to-support-4.patch |  74 +++
 ...ivers-sun8i-Add-SRAM-register-access-code.patch | 126 +++++
 ...sun8i-Add-support-for-H616-THS-controller.patch |  50 ++
 ...un8i-Dont-fail-probe-due-to-zone-registra.patch |  68 +++
 ...lwinner-h616-Add-thermal-sensor-and-zones.patch | 138 ++++++
 ...-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch |  30 ++
 ...01-orangepi_pc2_usb_otg_to_host_key_power.patch |  20 +
 ...nner-a64-sopine-Add-Sopine-flash-partitio.patch |  46 ++
 .../410-sunxi-add-bananapi-p2-zero.patch           | 292 ++++++++++++
 ...llwinner-a64-olinuxino-add-status-LED-ali.patch |  32 ++
 ...ts-allwinner-nanopi-r1s-h5-add-status-LED.patch |  35 ++
 ...42-arm64-dts-orangepi-one-plus-enable-PWM.patch |  10 +
 ...50-arm64-dts-enable-wifi-on-pine64-boards.patch |  72 +++
 28 files changed, 2807 insertions(+)

diff --git a/target/linux/sunxi/config-6.1 b/target/linux/sunxi/config-6.1
new file mode 100644
index 0000000000..a76834c13a
--- /dev/null
+++ b/target/linux/sunxi/config-6.1
@@ -0,0 +1,524 @@
+# CONFIG_AHCI_SUNXI is not set
+CONFIG_ALIGNMENT_TRAP=y
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_DMA_ADDR_T_64BIT=y
+CONFIG_ARCH_FORCE_MAX_ORDER=11
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=416
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUNXI=y
+CONFIG_ARCH_SUNXI_MC_SMP=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARM=y
+CONFIG_ARM_ALLWINNER_SUN50I_CPUFREQ_NVMEM=y
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ARCH_TIMER=y
+CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+CONFIG_ARM_ATAG_DTB_COMPAT_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_ARM_CCI=y
+CONFIG_ARM_CCI400_COMMON=y
+CONFIG_ARM_CCI400_PORT_CTRL=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_CRYPTO=y
+CONFIG_ARM_ERRATA_643719=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HEAVY_MB=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_LPAE=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+CONFIG_ARM_PSCI=y
+CONFIG_ARM_PSCI_FW=y
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_ATA=y
+CONFIG_ATAGS=y
+CONFIG_AUTO_ZRELADDR=y
+CONFIG_AXP20X_POWER=y
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_PWM=y
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_PM=y
+CONFIG_BOUNCE=y
+CONFIG_CACHE_L2X0=y
+CONFIG_CAN=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLK_SUNXI=y
+CONFIG_CLK_SUNXI_CLOCKS=y
+CONFIG_CLK_SUNXI_PRCM_SUN6I=y
+CONFIG_CLK_SUNXI_PRCM_SUN8I=y
+CONFIG_CLK_SUNXI_PRCM_SUN9I=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONFIGFS_FS=y
+CONFIG_CONNECTOR=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_COREDUMP=y
+CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
+CONFIG_CPUFREQ_DT=y
+CONFIG_CPUFREQ_DT_PLATDEV=y
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FREQ=y
+CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+CONFIG_CPU_FREQ_GOV_COMMON=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THERMAL=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+CONFIG_CRC_T10DIF=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_CRCT10DIF=y
+CONFIG_CRYPTO_CRCT10DIF_ARM_CE=y
+CONFIG_CRYPTO_DES=y
+CONFIG_CRYPTO_DEV_ALLWINNER=y
+CONFIG_CRYPTO_DEV_SUN4I_SS=y
+# CONFIG_CRYPTO_DEV_SUN4I_SS_DEBUG is not set
+CONFIG_CRYPTO_DEV_SUN4I_SS_PRNG=y
+# CONFIG_CRYPTO_DEV_SUN8I_CE is not set
+# CONFIG_CRYPTO_DEV_SUN8I_SS is not set
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_LIB_DES=y
+CONFIG_CRYPTO_MD5=y
+CONFIG_CRYPTO_RNG=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_SHA1=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_BUGVERBOSE=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DEBUG_MEMORY_INIT=y
+CONFIG_DMADEVICES=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_REMAP=y
+CONFIG_DMA_SUN4I=y
+CONFIG_DMA_SUN6I=y
+CONFIG_DMA_VIRTUAL_CHANNELS=y
+CONFIG_DNOTIFY=y
+CONFIG_DTC=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_DVB_CORE=y
+CONFIG_DWMAC_GENERIC=y
+# CONFIG_DWMAC_SUN8I is not set
+CONFIG_DWMAC_SUNXI=y
+CONFIG_DYNAMIC_DEBUG=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+CONFIG_EDAC_SUPPORT=y
+CONFIG_ELF_CORE=y
+CONFIG_EXT4_FS=y
+CONFIG_EXTCON=y
+CONFIG_F2FS_FS=y
+CONFIG_FAT_FS=y
+CONFIG_FB=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CMDLINE=y
+CONFIG_FB_FOREIGN_ENDIAN=y
+CONFIG_FB_LITTLE_ENDIAN=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_SIMPLE=y
+CONFIG_FB_TILEBLITTING=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FONT_8x16=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_SUPPORT=y
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+CONFIG_FRAMEBUFFER_CONSOLE_ROTATION=y
+CONFIG_FRAME_WARN=2048
+CONFIG_FREEZER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_CACHE=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PHY=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_PINCTRL_GROUPS=y
+CONFIG_GENERIC_PINMUX_FUNCTIONS=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GLOB=y
+CONFIG_GPIO_CDEV=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HAVE_SMP=y
+CONFIG_HIGHMEM=y
+CONFIG_HIGHPTE=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HWMON=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_HW_RANDOM_TIMERIOMEM=y
+CONFIG_HZ_FIXED=0
+CONFIG_I2C=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_MV64XXX=y
+CONFIG_I2C_SUN6I_P2WI=y
+CONFIG_IIO=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_INPUT_AXP20X_PEK=y
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_TOUCHSCREEN=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FASTEOI_HIERARCHY_HANDLERS=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+CONFIG_JBD2=y
+CONFIG_KALLSYMS=y
+CONFIG_KEYBOARD_SUN4I_LRADC=y
+CONFIG_KMAP_LOCAL=y
+CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
+CONFIG_KSM=y
+CONFIG_LCD_CLASS_DEVICE=y
+CONFIG_LCD_PLATFORM=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_LOGO=y
+CONFIG_LOGO_LINUX_CLUT224=y
+CONFIG_LOGO_LINUX_MONO=y
+CONFIG_LOGO_LINUX_VGA16=y
+CONFIG_MACH_SUN4I=y
+CONFIG_MACH_SUN5I=y
+CONFIG_MACH_SUN6I=y
+CONFIG_MACH_SUN7I=y
+CONFIG_MACH_SUN8I=y
+CONFIG_MACH_SUN9I=y
+CONFIG_MAGIC_SYSRQ=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+CONFIG_MDIO_SUN4I=y
+CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
+CONFIG_MEDIA_ATTACH=y
+CONFIG_MEDIA_CAMERA_SUPPORT=y
+CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
+CONFIG_MEDIA_PLATFORM_SUPPORT=y
+CONFIG_MEDIA_RADIO_SUPPORT=y
+CONFIG_MEDIA_SDR_SUPPORT=y
+CONFIG_MEDIA_SUPPORT=y
+CONFIG_MEDIA_TEST_SUPPORT=y
+CONFIG_MEDIA_TUNER=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_AXP20X=y
+CONFIG_MFD_AXP20X_I2C=y
+CONFIG_MFD_AXP20X_RSB=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_SUN6I_PRCM=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_SUNXI=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MTD_JEDECPROBE=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPLIT_FIT_FW=y
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEON=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+CONFIG_NET_VENDOR_ALLWINNER=y
+CONFIG_NLS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=8
+CONFIG_NVMEM=y
+CONFIG_NVMEM_SUNXI_SID=y
+CONFIG_NVMEM_SYSFS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PCS_XPCS=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=3
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PHYS_ADDR_T_64BIT=y
+CONFIG_PHY_SUN4I_USB=y
+# CONFIG_PHY_SUN50I_USB3 is not set
+# CONFIG_PHY_SUN6I_MIPI_DPHY is not set
+CONFIG_PHY_SUN9I_USB=y
+CONFIG_PINCTRL=y
+CONFIG_PINCTRL_AXP209=y
+# CONFIG_PINCTRL_SUN20I_D1 is not set
+CONFIG_PINCTRL_SUN4I_A10=y
+# CONFIG_PINCTRL_SUN50I_A100 is not set
+# CONFIG_PINCTRL_SUN50I_A100_R is not set
+# CONFIG_PINCTRL_SUN50I_A64 is not set
+# CONFIG_PINCTRL_SUN50I_A64_R is not set
+# CONFIG_PINCTRL_SUN50I_H5 is not set
+# CONFIG_PINCTRL_SUN50I_H6 is not set
+# CONFIG_PINCTRL_SUN50I_H616 is not set
+# CONFIG_PINCTRL_SUN50I_H616_R is not set
+# CONFIG_PINCTRL_SUN50I_H6_R is not set
+CONFIG_PINCTRL_SUN5I=y
+CONFIG_PINCTRL_SUN6I_A31=y
+CONFIG_PINCTRL_SUN6I_A31_R=y
+CONFIG_PINCTRL_SUN8I_A23=y
+CONFIG_PINCTRL_SUN8I_A23_R=y
+CONFIG_PINCTRL_SUN8I_A33=y
+CONFIG_PINCTRL_SUN8I_A83T=y
+CONFIG_PINCTRL_SUN8I_A83T_R=y
+CONFIG_PINCTRL_SUN8I_H3=y
+CONFIG_PINCTRL_SUN8I_H3_R=y
+CONFIG_PINCTRL_SUN8I_V3S=y
+CONFIG_PINCTRL_SUN9I_A80=y
+CONFIG_PINCTRL_SUN9I_A80_R=y
+CONFIG_PINCTRL_SUNXI=y
+CONFIG_PM=y
+CONFIG_PM_CLK=y
+CONFIG_PM_OPP=y
+CONFIG_PM_SLEEP=y
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+CONFIG_PRINTK_TIME=y
+CONFIG_PROC_EVENTS=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_PWM=y
+CONFIG_PWM_SUN4I=y
+CONFIG_PWM_SYSFS=y
+CONFIG_RATIONAL=y
+CONFIG_REALTEK_PHY=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_IRQ=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGMAP_SPI=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_AXP20X=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+CONFIG_REGULATOR_GPIO=y
+CONFIG_REGULATOR_SY8106A=y
+CONFIG_RELAY=y
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RESET_SIMPLE=y
+CONFIG_RESET_SUNXI=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+CONFIG_SATA_HOST=y
+CONFIG_SATA_PMP=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SDIO_UART=y
+CONFIG_SECURITYFS=y
+CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
+CONFIG_SERIAL_8250_DW=y
+CONFIG_SERIAL_8250_DWLIB=y
+CONFIG_SERIAL_8250_FSL=y
+CONFIG_SERIAL_8250_NR_UARTS=8
+CONFIG_SERIAL_8250_RUNTIME_UARTS=8
+CONFIG_SERIAL_MCTRL_GPIO=y
+CONFIG_SERIAL_OF_PLATFORM=y
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SG_POOL=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+CONFIG_SND=y
+CONFIG_SND_COMPRESS_OFFLOAD=y
+CONFIG_SND_JACK=y
+CONFIG_SND_JACK_INPUT_DEV=y
+CONFIG_SND_PCM=y
+CONFIG_SND_SIMPLE_CARD=y
+CONFIG_SND_SIMPLE_CARD_UTILS=y
+CONFIG_SND_SOC=y
+CONFIG_SND_SOC_I2C_AND_SPI=y
+# CONFIG_SND_SUN4I_I2S is not set
+# CONFIG_SND_SUN4I_SPDIF is not set
+# CONFIG_SND_SUN50I_DMIC is not set
+# CONFIG_SND_SUN8I_CODEC is not set
+# CONFIG_SND_SUN8I_CODEC_ANALOG is not set
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOUND=y
+CONFIG_SOUND_OSS_CORE=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_SUN4I=y
+CONFIG_SPI_SUN6I=y
+CONFIG_SRCU=y
+CONFIG_STMMAC_ETH=y
+CONFIG_STMMAC_PLATFORM=y
+CONFIG_SUN4I_A10_CCU=y
+# CONFIG_SUN4I_EMAC is not set
+CONFIG_SUN4I_TIMER=y
+CONFIG_SUN5I_CCU=y
+CONFIG_SUN5I_HSTIMER=y
+CONFIG_SUN6I_A31_CCU=y
+# CONFIG_SUN6I_RTC_CCU is not set
+CONFIG_SUN8I_A23_CCU=y
+CONFIG_SUN8I_A33_CCU=y
+CONFIG_SUN8I_A83T_CCU=y
+CONFIG_SUN8I_DE2_CCU=y
+CONFIG_SUN8I_H3_CCU=y
+CONFIG_SUN8I_R40_CCU=y
+CONFIG_SUN8I_R_CCU=y
+CONFIG_SUN8I_THERMAL=y
+CONFIG_SUN8I_V3S_CCU=y
+CONFIG_SUN9I_A80_CCU=y
+CONFIG_SUNXI_CCU=y
+CONFIG_SUNXI_MBUS=y
+CONFIG_SUNXI_RSB=y
+CONFIG_SUNXI_SRAM=y
+CONFIG_SUNXI_WATCHDOG=y
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_SWIOTLB=y
+CONFIG_SWPHY=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYSFS_SYSCALL=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_OF=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TMPFS_POSIX_ACL=y
+CONFIG_TOUCHSCREEN_SUN4I=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_DWC2=y
+CONFIG_USB_DWC2_HOST=y
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_EHCI_HCD_PLATFORM=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_NET_DRIVERS=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_OHCI_HCD_PLATFORM=y
+CONFIG_USB_ROLE_SWITCH=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USERIO=y
+CONFIG_USE_OF=y
+CONFIG_VFAT_FS=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_VHOST=y
+CONFIG_VHOST_IOTLB=y
+CONFIG_VHOST_NET=y
+# CONFIG_VIDEO_SUN4I_CSI is not set
+# CONFIG_VIDEO_SUN6I_CSI is not set
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_VT_CONSOLE_SLEEP=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_WATCHDOG_CORE=y
+CONFIG_XPS=y
+CONFIG_XXHASH=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_ZBOOT_ROM_BSS=0
+CONFIG_ZBOOT_ROM_TEXT=0
diff --git a/target/linux/sunxi/cortexa53/config-6.1 b/target/linux/sunxi/cortexa53/config-6.1
new file mode 100644
index 0000000000..55bcd4e8e5
--- /dev/null
+++ b/target/linux/sunxi/cortexa53/config-6.1
@@ -0,0 +1,109 @@
+CONFIG_64BIT=y
+CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
+CONFIG_ARCH_MMAP_RND_BITS=18
+CONFIG_ARCH_MMAP_RND_BITS_MAX=24
+CONFIG_ARCH_MMAP_RND_BITS_MIN=18
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
+CONFIG_ARCH_PROC_KCORE_TEXT=y
+CONFIG_ARCH_STACKWALK=y
+CONFIG_ARCH_WANTS_NO_INSTR=y
+CONFIG_ARM64=y
+CONFIG_ARM64_4K_PAGES=y
+CONFIG_ARM64_CRYPTO=y
+CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
+CONFIG_ARM64_ERRATUM_2051678=y
+CONFIG_ARM64_ERRATUM_2077057=y
+CONFIG_ARM64_ERRATUM_2658417=y
+CONFIG_ARM64_ERRATUM_2054223=y
+CONFIG_ARM64_ERRATUM_2067961=y
+CONFIG_ARM64_PAGE_SHIFT=12
+CONFIG_ARM64_PA_BITS=48
+CONFIG_ARM64_PA_BITS_48=y
+CONFIG_ARM64_TAGGED_ADDR_ABI=y
+CONFIG_ARM64_VA_BITS=39
+CONFIG_ARM64_VA_BITS_39=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_ARCH_TIMER_OOL_WORKAROUND=y
+CONFIG_ARM_GIC_V3=y
+CONFIG_ARM_GIC_V3_ITS=y
+CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
+CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
+CONFIG_CPU_LITTLE_ENDIAN=y
+CONFIG_CRYPTO_AES_ARM64=y
+CONFIG_CRYPTO_AES_ARM64_CE=y
+CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
+CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
+CONFIG_CRYPTO_BLAKE2S=y
+CONFIG_CRYPTO_CRCT10DIF_ARM64_CE=y
+CONFIG_CRYPTO_CRYPTD=y
+CONFIG_CRYPTO_GHASH_ARM64_CE=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_SHA1_ARM64_CE=y
+CONFIG_CRYPTO_SIMD=y
+CONFIG_DMA_DIRECT_REMAP=y
+CONFIG_DWMAC_SUN8I=y
+CONFIG_EEPROM_AT24=y
+CONFIG_FRAME_POINTER=y
+CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
+CONFIG_GENERIC_CSUM=y
+CONFIG_GENERIC_FIND_FIRST_BIT=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
+CONFIG_MDIO_BUS_MUX=y
+CONFIG_MICREL_PHY=y
+# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set
+CONFIG_MODULES_USE_ELF_RELA=y
+CONFIG_MOTORCOMM_PHY=y
+CONFIG_MUSB_PIO_ONLY=y
+CONFIG_NEED_SG_DMA_LENGTH=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_NO_IOPORT_MAP=y
+CONFIG_PARTITION_PERCPU=y
+CONFIG_PHY_SUN50I_USB3=y
+CONFIG_PINCTRL_SUN50I_A100=y
+CONFIG_PINCTRL_SUN50I_A100_R=y
+CONFIG_PINCTRL_SUN50I_A64=y
+CONFIG_PINCTRL_SUN50I_A64_R=y
+CONFIG_PINCTRL_SUN50I_H5=y
+CONFIG_PINCTRL_SUN50I_H6=y
+CONFIG_PINCTRL_SUN50I_H6_R=y
+CONFIG_PINCTRL_SUN50I_H616=y
+CONFIG_PINCTRL_SUN50I_H616_R=y
+# CONFIG_PREEMPT_DYNAMIC is not set
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
+# CONFIG_SCHED_CLUSTER is not set
+# CONFIG_SHADOW_CALL_STACK is not set
+# CONFIG_SND_SUN50I_CODEC_ANALOG is not set
+CONFIG_SOUND_OSS_CORE_PRECLAIM=y
+CONFIG_SPARSEMEM=y
+CONFIG_SPARSEMEM_EXTREME=y
+CONFIG_SPARSEMEM_VMEMMAP=y
+CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
+CONFIG_SUN50I_A100_CCU=y
+CONFIG_SUN50I_A100_R_CCU=y
+CONFIG_SUN50I_A64_CCU=y
+CONFIG_SUN50I_DE2_BUS=y
+CONFIG_SUN50I_ERRATUM_UNKNOWN1=y
+CONFIG_SUN50I_H616_CCU=y
+CONFIG_SUN50I_H6_CCU=y
+CONFIG_SUN50I_H6_R_CCU=y
+# CONFIG_SUN6I_RTC_CCU is not set
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_THREAD_INFO_IN_TASK=y
+CONFIG_UNMAP_KERNEL_AT_EL0=y
+CONFIG_USB_MUSB_DUAL_ROLE=y
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_PHY=y
+CONFIG_VMAP_STACK=y
+CONFIG_ZONE_DMA32=y
+CONFIG_SURFACE_PLATFORMS=y
+# CONFIG_CRYPTO_POLYVAL_ARM64_CE is not set
+# CONFIG_CRYPTO_SM4_ARM64_CE_BLK is not set
+# CONFIG_CRYPTO_SM4_ARM64_NEON_BLK is not set
+# CONFIG_PAGE_TABLE_CHECK is not set
+CONFIG_RANDOMIZE_KSTACK_OFFSET=y
+# CONFIG_ARCH_NXP is not set
diff --git a/target/linux/sunxi/cortexa7/config-6.1 b/target/linux/sunxi/cortexa7/config-6.1
new file mode 100644
index 0000000000..eaa6b037be
--- /dev/null
+++ b/target/linux/sunxi/cortexa7/config-6.1
@@ -0,0 +1,26 @@
+CONFIG_B53=y
+CONFIG_B53_MDIO_DRIVER=y
+CONFIG_CRYPTO_BLAKE2S_ARM=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_DWMAC_SUN8I=y
+CONFIG_GRO_CELLS=y
+# CONFIG_HARDEN_BRANCH_HISTORY is not set
+# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
+# CONFIG_MACH_SUN4I is not set
+# CONFIG_MACH_SUN5I is not set
+CONFIG_MDIO_BUS_MUX=y
+CONFIG_MICREL_PHY=y
+CONFIG_MUSB_PIO_ONLY=y
+CONFIG_NET_DEVLINK=y
+CONFIG_NET_DSA=y
+CONFIG_NET_DSA_TAG_BRCM=y
+CONFIG_NET_DSA_TAG_BRCM_COMMON=y
+CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
+CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
+CONFIG_NET_SWITCHDEV=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_RTC_DRV_SUN6I=y
+CONFIG_USB_MUSB_DUAL_ROLE=y
+CONFIG_USB_MUSB_HDRC=y
+CONFIG_USB_MUSB_SUNXI=y
+CONFIG_USB_PHY=y
diff --git a/target/linux/sunxi/cortexa8/config-6.1 b/target/linux/sunxi/cortexa8/config-6.1
new file mode 100644
index 0000000000..b893b3142e
--- /dev/null
+++ b/target/linux/sunxi/cortexa8/config-6.1
@@ -0,0 +1,12 @@
+# CONFIG_ARM_LPAE is not set
+CONFIG_CRYPTO_BLAKE2S_ARM=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+# CONFIG_MACH_SUN6I is not set
+# CONFIG_MACH_SUN7I is not set
+# CONFIG_MACH_SUN8I is not set
+# CONFIG_MACH_SUN9I is not set
+CONFIG_PGTABLE_LEVELS=2
+# CONFIG_PHY_SUN9I_USB is not set
+# CONFIG_SPI_SUN6I is not set
+# CONFIG_SUN8I_A83T_CCU is not set
+# CONFIG_SUN8I_THERMAL is not set
diff --git a/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch b/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
new file mode 100644
index 0000000000..c24d479534
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/001-v6.2-dt-bindings-usb-Add-H616-compatible-string.patch
@@ -0,0 +1,38 @@
+From 28a1a6474c5053bae01bd29946b4d5ede539176b Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Mon, 31 Oct 2022 11:13:52 +0000
+Subject: [PATCH] dt-bindings: usb: Add H616 compatible string
+
+The Allwinner H616 contains four fully OHCI/EHCI compatible USB host
+controllers, so just add their compatible strings to the list of
+generic OHCI/EHCI controllers.
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Acked-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
+Link: https://lore.kernel.org/r/20221031111358.3387297-2-andre.przywara at arm.com
+Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+---
+ Documentation/devicetree/bindings/usb/generic-ehci.yaml | 1 +
+ Documentation/devicetree/bindings/usb/generic-ohci.yaml | 1 +
+ 2 files changed, 2 insertions(+)
+
+--- a/Documentation/devicetree/bindings/usb/generic-ehci.yaml
++++ b/Documentation/devicetree/bindings/usb/generic-ehci.yaml
+@@ -30,6 +30,7 @@ properties:
+               - allwinner,sun4i-a10-ehci
+               - allwinner,sun50i-a64-ehci
+               - allwinner,sun50i-h6-ehci
++              - allwinner,sun50i-h616-ehci
+               - allwinner,sun5i-a13-ehci
+               - allwinner,sun6i-a31-ehci
+               - allwinner,sun7i-a20-ehci
+--- a/Documentation/devicetree/bindings/usb/generic-ohci.yaml
++++ b/Documentation/devicetree/bindings/usb/generic-ohci.yaml
+@@ -20,6 +20,7 @@ properties:
+               - allwinner,sun4i-a10-ohci
+               - allwinner,sun50i-a64-ohci
+               - allwinner,sun50i-h6-ohci
++              - allwinner,sun50i-h616-ohci
+               - allwinner,sun5i-a13-ohci
+               - allwinner,sun6i-a31-ohci
+               - allwinner,sun7i-a20-ohci
diff --git a/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch b/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
new file mode 100644
index 0000000000..5739172ceb
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/002-v6.2-dt-bindings-phy-Add-special-clock-for-Allwinner-H616-PHY.patch
@@ -0,0 +1,79 @@
+From 6964affe65066651eca21e97247d3b7cac5153dc Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Mon, 31 Oct 2022 11:13:53 +0000
+Subject: [PATCH] dt-bindings: phy: Add special clock for Allwinner H616 PHY
+
+The USB PHY IP in the Allwinner H616 SoC requires a quirk that involves
+some resources from port 2's PHY and HCI IP. In particular the PMU clock
+for port 2 must be surely ungated before accessing the REG_HCI_PHY_CTL
+register of port 2. To allow each USB port to be controlled
+independently of port 2, we need a handle to that particular PMU clock
+in the *PHY* node, as the HCI and PHY part might be handled by separate
+drivers.
+
+Add that clock to the requirements of the H616 PHY binding, so that a
+PHY driver can apply the quirk in isolation, without requiring help from
+port 2's HCI driver.
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Reviewed-by: Rob Herring <robh at kernel.org>
+Link: https://lore.kernel.org/r/20221031111358.3387297-3-andre.przywara at arm.com
+Signed-off-by: Vinod Koul <vkoul at kernel.org>
+---
+ .../phy/allwinner,sun8i-h3-usb-phy.yaml       | 26 +++++++++++++++++++
+ 1 file changed, 26 insertions(+)
+
+--- a/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
++++ b/Documentation/devicetree/bindings/phy/allwinner,sun8i-h3-usb-phy.yaml
+@@ -36,18 +36,22 @@ properties:
+       - const: pmu3
+ 
+   clocks:
++    minItems: 4
+     items:
+       - description: USB OTG PHY bus clock
+       - description: USB Host 0 PHY bus clock
+       - description: USB Host 1 PHY bus clock
+       - description: USB Host 2 PHY bus clock
++      - description: PMU clock for host port 2
+ 
+   clock-names:
++    minItems: 4
+     items:
+       - const: usb0_phy
+       - const: usb1_phy
+       - const: usb2_phy
+       - const: usb3_phy
++      - const: pmu2_clk
+ 
+   resets:
+     items:
+@@ -96,6 +100,28 @@ required:
+   - resets
+   - reset-names
+ 
++allOf:
++  - if:
++      properties:
++        compatible:
++          contains:
++            enum:
++              - allwinner,sun50i-h616-usb-phy
++    then:
++      properties:
++        clocks:
++          minItems: 5
++
++        clock-names:
++          minItems: 5
++    else:
++      properties:
++        clocks:
++          maxItems: 4
++
++        clock-names:
++          maxItems: 4
++
+ additionalProperties: false
+ 
+ examples:
diff --git a/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
new file mode 100644
index 0000000000..6dc1cf2f36
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/003-v6.2-arm64-dts-allwinner-h616-Add-USB-nodes.patch
@@ -0,0 +1,188 @@
+From f40cf244c3feb4e1a442f8029b691add2c65b3ab Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Mon, 31 Oct 2022 11:13:56 +0000
+Subject: [PATCH] arm64: dts: allwinner: h616: Add USB nodes
+
+Add the nodes for the MUSB and the four USB host controllers to the SoC
+.dtsi, along with the PHY node needed to bind all of them together.
+
+EHCI/OHCI and MUSB are compatible to previous SoCs, but the PHY requires
+some quirks (handled in the driver).
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Link: https://lore.kernel.org/r/20221031111358.3387297-6-andre.przywara at arm.com
+Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+---
+ .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 160 ++++++++++++++++++
+ 1 file changed, 160 insertions(+)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+@@ -504,6 +504,166 @@
+ 			};
+ 		};
+ 
++		usbotg: usb at 5100000 {
++			compatible = "allwinner,sun50i-h616-musb",
++				     "allwinner,sun8i-h3-musb";
++			reg = <0x05100000 0x0400>;
++			clocks = <&ccu CLK_BUS_OTG>;
++			resets = <&ccu RST_BUS_OTG>;
++			interrupts = <GIC_SPI 25 IRQ_TYPE_LEVEL_HIGH>;
++			interrupt-names = "mc";
++			phys = <&usbphy 0>;
++			phy-names = "usb";
++			extcon = <&usbphy 0>;
++			status = "disabled";
++		};
++
++		usbphy: phy at 5100400 {
++			compatible = "allwinner,sun50i-h616-usb-phy";
++			reg = <0x05100400 0x24>,
++			      <0x05101800 0x14>,
++			      <0x05200800 0x14>,
++			      <0x05310800 0x14>,
++			      <0x05311800 0x14>;
++			reg-names = "phy_ctrl",
++				    "pmu0",
++				    "pmu1",
++				    "pmu2",
++				    "pmu3";
++			clocks = <&ccu CLK_USB_PHY0>,
++				 <&ccu CLK_USB_PHY1>,
++				 <&ccu CLK_USB_PHY2>,
++				 <&ccu CLK_USB_PHY3>,
++				 <&ccu CLK_BUS_EHCI2>;
++			clock-names = "usb0_phy",
++				      "usb1_phy",
++				      "usb2_phy",
++				      "usb3_phy",
++				      "pmu2_clk";
++			resets = <&ccu RST_USB_PHY0>,
++				 <&ccu RST_USB_PHY1>,
++				 <&ccu RST_USB_PHY2>,
++				 <&ccu RST_USB_PHY3>;
++			reset-names = "usb0_reset",
++				      "usb1_reset",
++				      "usb2_reset",
++				      "usb3_reset";
++			status = "disabled";
++			#phy-cells = <1>;
++		};
++
++		ehci0: usb at 5101000 {
++			compatible = "allwinner,sun50i-h616-ehci",
++				     "generic-ehci";
++			reg = <0x05101000 0x100>;
++			interrupts = <GIC_SPI 26 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_OHCI0>,
++				 <&ccu CLK_BUS_EHCI0>,
++				 <&ccu CLK_USB_OHCI0>;
++			resets = <&ccu RST_BUS_OHCI0>,
++				 <&ccu RST_BUS_EHCI0>;
++			phys = <&usbphy 0>;
++			phy-names = "usb";
++			status = "disabled";
++		};
++
++		ohci0: usb at 5101400 {
++			compatible = "allwinner,sun50i-h616-ohci",
++				     "generic-ohci";
++			reg = <0x05101400 0x100>;
++			interrupts = <GIC_SPI 27 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_OHCI0>,
++				 <&ccu CLK_USB_OHCI0>;
++			resets = <&ccu RST_BUS_OHCI0>;
++			phys = <&usbphy 0>;
++			phy-names = "usb";
++			status = "disabled";
++		};
++
++		ehci1: usb at 5200000 {
++			compatible = "allwinner,sun50i-h616-ehci",
++				     "generic-ehci";
++			reg = <0x05200000 0x100>;
++			interrupts = <GIC_SPI 28 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_OHCI1>,
++				 <&ccu CLK_BUS_EHCI1>,
++				 <&ccu CLK_USB_OHCI1>;
++			resets = <&ccu RST_BUS_OHCI1>,
++				 <&ccu RST_BUS_EHCI1>;
++			phys = <&usbphy 1>;
++			phy-names = "usb";
++			status = "disabled";
++		};
++
++		ohci1: usb at 5200400 {
++			compatible = "allwinner,sun50i-h616-ohci",
++				     "generic-ohci";
++			reg = <0x05200400 0x100>;
++			interrupts = <GIC_SPI 29 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_OHCI1>,
++				 <&ccu CLK_USB_OHCI1>;
++			resets = <&ccu RST_BUS_OHCI1>;
++			phys = <&usbphy 1>;
++			phy-names = "usb";
++			status = "disabled";
++		};
++
++		ehci2: usb at 5310000 {
++			compatible = "allwinner,sun50i-h616-ehci",
++				     "generic-ehci";
++			reg = <0x05310000 0x100>;
++			interrupts = <GIC_SPI 30 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_OHCI2>,
++				 <&ccu CLK_BUS_EHCI2>,
++				 <&ccu CLK_USB_OHCI2>;
++			resets = <&ccu RST_BUS_OHCI2>,
++				 <&ccu RST_BUS_EHCI2>;
++			phys = <&usbphy 2>;
++			phy-names = "usb";
++			status = "disabled";
++		};
++
++		ohci2: usb at 5310400 {
++			compatible = "allwinner,sun50i-h616-ohci",
++				     "generic-ohci";
++			reg = <0x05310400 0x100>;
++			interrupts = <GIC_SPI 31 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_OHCI2>,
++				 <&ccu CLK_USB_OHCI2>;
++			resets = <&ccu RST_BUS_OHCI2>;
++			phys = <&usbphy 2>;
++			phy-names = "usb";
++			status = "disabled";
++		};
++
++		ehci3: usb at 5311000 {
++			compatible = "allwinner,sun50i-h616-ehci",
++				     "generic-ehci";
++			reg = <0x05311000 0x100>;
++			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_OHCI3>,
++				 <&ccu CLK_BUS_EHCI3>,
++				 <&ccu CLK_USB_OHCI3>;
++			resets = <&ccu RST_BUS_OHCI3>,
++				 <&ccu RST_BUS_EHCI3>;
++			phys = <&usbphy 3>;
++			phy-names = "usb";
++			status = "disabled";
++		};
++
++		ohci3: usb at 5311400 {
++			compatible = "allwinner,sun50i-h616-ohci",
++				     "generic-ohci";
++			reg = <0x05311400 0x100>;
++			interrupts = <GIC_SPI 33 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_OHCI3>,
++				 <&ccu CLK_USB_OHCI3>;
++			resets = <&ccu RST_BUS_OHCI3>;
++			phys = <&usbphy 3>;
++			phy-names = "usb";
++			status = "disabled";
++		};
++
+ 		rtc: rtc at 7000000 {
+ 			compatible = "allwinner,sun50i-h616-rtc";
+ 			reg = <0x07000000 0x400>;
diff --git a/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch b/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
new file mode 100644
index 0000000000..a544e482f3
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/004-v6.2-arm64-dts-allwinner-h616-OrangePi-Zero-2-Add-USB-nodes.patch
@@ -0,0 +1,81 @@
+From db5f028309ede13767e2ba356c1975ac37a4fd6c Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Mon, 31 Oct 2022 11:13:57 +0000
+Subject: [PATCH] arm64: dts: allwinner: h616: OrangePi Zero 2: Add USB nodes
+
+The OrangePi Zero 2 has one USB-A host port, VBUS is provided by
+a GPIO controlled regulator.
+The USB-C port is meant to power the board, but is also connected to
+the USB 0 port, which we configure as an MUSB peripheral.
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Link: https://lore.kernel.org/r/20221031111358.3387297-7-andre.przywara at arm.com
+Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+---
+ .../allwinner/sun50i-h616-orangepi-zero2.dts  | 41 +++++++++++++++++++
+ 1 file changed, 41 insertions(+)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+@@ -49,8 +49,24 @@
+ 		regulator-max-microvolt = <5000000>;
+ 		regulator-always-on;
+ 	};
++
++	reg_usb1_vbus: regulator-usb1-vbus {
++		compatible = "regulator-fixed";
++		regulator-name = "usb1-vbus";
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		vin-supply = <&reg_vcc5v>;
++		enable-active-high;
++		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
++	};
++};
++
++&ehci1 {
++	status = "okay";
+ };
+ 
++/* USB 2 & 3 are on headers only. */
++
+ &emac0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&ext_rgmii_pins>;
+@@ -76,6 +92,10 @@
+ 	status = "okay";
+ };
+ 
++&ohci1 {
++	status = "okay";
++};
++
+ &r_rsb {
+ 	status = "okay";
+ 
+@@ -211,3 +231,24 @@
+ 	pinctrl-0 = <&uart0_ph_pins>;
+ 	status = "okay";
+ };
++
++&usbotg {
++	/*
++	 * PHY0 pins are connected to a USB-C socket, but a role switch
++	 * is not implemented: both CC pins are pulled to GND.
++	 * The VBUS pins power the device, so a fixed peripheral mode
++	 * is the best choice.
++	 * The board can be powered via GPIOs, in this case port0 *can*
++	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
++	 * then provided by the GPIOs. Any user of this setup would
++	 * need to adjust the DT accordingly: dr_mode set to "host",
++	 * enabling OHCI0 and EHCI0.
++	 */
++	dr_mode = "peripheral";
++	status = "okay";
++};
++
++&usbphy {
++	usb1_vbus-supply = <&reg_usb1_vbus>;
++	status = "okay";
++};
diff --git a/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch b/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
new file mode 100644
index 0000000000..0747e6a8e0
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/005-v6.6-arm64-dts-allwinner-h616-Split-Orange-Pi-Zero-2-DT.patch
@@ -0,0 +1,305 @@
+From 322bf103204b8f786547acbeed85569254e7088f Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Fri, 4 Aug 2023 18:08:54 +0100
+Subject: [PATCH] arm64: dts: allwinner: h616: Split Orange Pi Zero 2 DT
+
+The Orange Pi Zero 2 got a successor (Zero 3), which shares quite some
+DT nodes with the Zero 2, but comes with a different PMIC.
+
+Move the common parts (except the PMIC) into a new shared file, and
+include that from the existing board .dts file.
+
+No functional change, the generated DTB is the same, except for some
+phandle numbering differences.
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Link: https://lore.kernel.org/r/20230804170856.1237202-2-andre.przywara at arm.com
+Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+---
+ .../allwinner/sun50i-h616-orangepi-zero.dtsi  | 134 ++++++++++++++++++
+ .../allwinner/sun50i-h616-orangepi-zero2.dts  | 119 +---------------
+ 2 files changed, 135 insertions(+), 118 deletions(-)
+ create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
+
+--- /dev/null
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
+@@ -0,0 +1,134 @@
++// SPDX-License-Identifier: (GPL-2.0+ or MIT)
++/*
++ * Copyright (C) 2020 Arm Ltd.
++ *
++ * DT nodes common between Orange Pi Zero 2 and Orange Pi Zero 3.
++ * Excludes PMIC nodes and properties, since they are different between the two.
++ */
++
++#include "sun50i-h616.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/interrupt-controller/arm-gic.h>
++#include <dt-bindings/leds/common.h>
++
++/ {
++	aliases {
++		ethernet0 = &emac0;
++		serial0 = &uart0;
++	};
++
++	chosen {
++		stdout-path = "serial0:115200n8";
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		led-0 {
++			function = LED_FUNCTION_POWER;
++			color = <LED_COLOR_ID_RED>;
++			gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
++			default-state = "on";
++		};
++
++		led-1 {
++			function = LED_FUNCTION_STATUS;
++			color = <LED_COLOR_ID_GREEN>;
++			gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
++		};
++	};
++
++	reg_vcc5v: vcc5v {
++		/* board wide 5V supply directly from the USB-C socket */
++		compatible = "regulator-fixed";
++		regulator-name = "vcc-5v";
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		regulator-always-on;
++	};
++
++	reg_usb1_vbus: regulator-usb1-vbus {
++		compatible = "regulator-fixed";
++		regulator-name = "usb1-vbus";
++		regulator-min-microvolt = <5000000>;
++		regulator-max-microvolt = <5000000>;
++		vin-supply = <&reg_vcc5v>;
++		enable-active-high;
++		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
++	};
++};
++
++&ehci1 {
++	status = "okay";
++};
++
++/* USB 2 & 3 are on headers only. */
++
++&emac0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&ext_rgmii_pins>;
++	phy-mode = "rgmii";
++	phy-handle = <&ext_rgmii_phy>;
++	allwinner,rx-delay-ps = <3100>;
++	allwinner,tx-delay-ps = <700>;
++	status = "okay";
++};
++
++&mdio0 {
++	ext_rgmii_phy: ethernet-phy at 1 {
++		compatible = "ethernet-phy-ieee802.3-c22";
++		reg = <1>;
++	};
++};
++
++&mmc0 {
++	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;	/* PF6 */
++	bus-width = <4>;
++	status = "okay";
++};
++
++&ohci1 {
++	status = "okay";
++};
++
++&spi0  {
++	status = "okay";
++	pinctrl-names = "default";
++	pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
++
++	flash at 0 {
++		#address-cells = <1>;
++		#size-cells = <1>;
++		compatible = "jedec,spi-nor";
++		reg = <0>;
++		spi-max-frequency = <40000000>;
++	};
++};
++
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_ph_pins>;
++	status = "okay";
++};
++
++&usbotg {
++	/*
++	 * PHY0 pins are connected to a USB-C socket, but a role switch
++	 * is not implemented: both CC pins are pulled to GND.
++	 * The VBUS pins power the device, so a fixed peripheral mode
++	 * is the best choice.
++	 * The board can be powered via GPIOs, in this case port0 *can*
++	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
++	 * then provided by the GPIOs. Any user of this setup would
++	 * need to adjust the DT accordingly: dr_mode set to "host",
++	 * enabling OHCI0 and EHCI0.
++	 */
++	dr_mode = "peripheral";
++	status = "okay";
++};
++
++&usbphy {
++	usb1_vbus-supply = <&reg_usb1_vbus>;
++	status = "okay";
++};
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+@@ -5,95 +5,19 @@
+ 
+ /dts-v1/;
+ 
+-#include "sun50i-h616.dtsi"
+-
+-#include <dt-bindings/gpio/gpio.h>
+-#include <dt-bindings/interrupt-controller/arm-gic.h>
+-#include <dt-bindings/leds/common.h>
++#include "sun50i-h616-orangepi-zero.dtsi"
+ 
+ / {
+ 	model = "OrangePi Zero2";
+ 	compatible = "xunlong,orangepi-zero2", "allwinner,sun50i-h616";
+-
+-	aliases {
+-		ethernet0 = &emac0;
+-		serial0 = &uart0;
+-	};
+-
+-	chosen {
+-		stdout-path = "serial0:115200n8";
+-	};
+-
+-	leds {
+-		compatible = "gpio-leds";
+-
+-		led-0 {
+-			function = LED_FUNCTION_POWER;
+-			color = <LED_COLOR_ID_RED>;
+-			gpios = <&pio 2 12 GPIO_ACTIVE_HIGH>; /* PC12 */
+-			default-state = "on";
+-		};
+-
+-		led-1 {
+-			function = LED_FUNCTION_STATUS;
+-			color = <LED_COLOR_ID_GREEN>;
+-			gpios = <&pio 2 13 GPIO_ACTIVE_HIGH>; /* PC13 */
+-		};
+-	};
+-
+-	reg_vcc5v: vcc5v {
+-		/* board wide 5V supply directly from the USB-C socket */
+-		compatible = "regulator-fixed";
+-		regulator-name = "vcc-5v";
+-		regulator-min-microvolt = <5000000>;
+-		regulator-max-microvolt = <5000000>;
+-		regulator-always-on;
+-	};
+-
+-	reg_usb1_vbus: regulator-usb1-vbus {
+-		compatible = "regulator-fixed";
+-		regulator-name = "usb1-vbus";
+-		regulator-min-microvolt = <5000000>;
+-		regulator-max-microvolt = <5000000>;
+-		vin-supply = <&reg_vcc5v>;
+-		enable-active-high;
+-		gpio = <&pio 2 16 GPIO_ACTIVE_HIGH>; /* PC16 */
+-	};
+-};
+-
+-&ehci1 {
+-	status = "okay";
+ };
+ 
+-/* USB 2 & 3 are on headers only. */
+-
+ &emac0 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&ext_rgmii_pins>;
+-	phy-mode = "rgmii";
+-	phy-handle = <&ext_rgmii_phy>;
+ 	phy-supply = <&reg_dcdce>;
+-	allwinner,rx-delay-ps = <3100>;
+-	allwinner,tx-delay-ps = <700>;
+-	status = "okay";
+-};
+-
+-&mdio0 {
+-	ext_rgmii_phy: ethernet-phy at 1 {
+-		compatible = "ethernet-phy-ieee802.3-c22";
+-		reg = <1>;
+-	};
+ };
+ 
+ &mmc0 {
+ 	vmmc-supply = <&reg_dcdce>;
+-	cd-gpios = <&pio 5 6 GPIO_ACTIVE_LOW>;	/* PF6 */
+-	bus-width = <4>;
+-	status = "okay";
+-};
+-
+-&ohci1 {
+-	status = "okay";
+ };
+ 
+ &r_rsb {
+@@ -211,44 +135,3 @@
+ 	vcc-ph-supply = <&reg_aldo1>;
+ 	vcc-pi-supply = <&reg_aldo1>;
+ };
+-
+-&spi0  {
+-	status = "okay";
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&spi0_pins>, <&spi0_cs0_pin>;
+-
+-	flash at 0 {
+-		#address-cells = <1>;
+-		#size-cells = <1>;
+-		compatible = "jedec,spi-nor";
+-		reg = <0>;
+-		spi-max-frequency = <40000000>;
+-	};
+-};
+-
+-&uart0 {
+-	pinctrl-names = "default";
+-	pinctrl-0 = <&uart0_ph_pins>;
+-	status = "okay";
+-};
+-
+-&usbotg {
+-	/*
+-	 * PHY0 pins are connected to a USB-C socket, but a role switch
+-	 * is not implemented: both CC pins are pulled to GND.
+-	 * The VBUS pins power the device, so a fixed peripheral mode
+-	 * is the best choice.
+-	 * The board can be powered via GPIOs, in this case port0 *can*
+-	 * act as a host (with a cable/adapter ignoring CC), as VBUS is
+-	 * then provided by the GPIOs. Any user of this setup would
+-	 * need to adjust the DT accordingly: dr_mode set to "host",
+-	 * enabling OHCI0 and EHCI0.
+-	 */
+-	dr_mode = "peripheral";
+-	status = "okay";
+-};
+-
+-&usbphy {
+-	usb1_vbus-supply = <&reg_usb1_vbus>;
+-	status = "okay";
+-};
diff --git a/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch b/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
new file mode 100644
index 0000000000..4081a82d52
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/006-v6.6-arm64-dts-allwinner-h616-Add-OrangePi-Zero-3-board.patch
@@ -0,0 +1,140 @@
+From f1b3ddb3ecc2eec1f912383e01156c226daacfab Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Fri, 4 Aug 2023 18:08:56 +0100
+Subject: [PATCH] arm64: dts: allwinner: h616: Add OrangePi Zero 3 board
+ support
+
+The OrangePi Zero 3 is a development board based on the Allwinner H618 SoC,
+which seems to be just an H616 with more L2 cache. The board itself is a
+slightly updated version of the Orange Pi Zero 2. It features:
+- Four ARM Cortex-A53 cores, Mali-G31 MP2 GPU
+- 1/1.5/2/4 GiB LPDDR4 DRAM SKUs (only up to 1GB on the Zero2)
+- AXP313a PMIC (more capable AXP305 on the Zero2)
+- Raspberry-Pi-1 compatible GPIO header
+- extra 13 pin expansion header, exposing pins for 2x USB 2.0 ports
+- 1 USB 2.0 host port
+- 1 USB 2.0 type C port (power supply + OTG)
+- MicroSD slot
+- on-board 16MiB bootable SPI NOR flash (only 2MB on the Zero2)
+- 1Gbps Ethernet port (via Motorcomm YT8531 PHY) (RTL8211 on the Zero2)
+- micro-HDMI port
+- (yet) unsupported Allwinner WiFi/BT chip
+
+Add the devicetree file describing the currently supported features,
+namely LEDs, SD card, PMIC, SPI flash, USB. Ethernet seems unstable at
+the moment, though the basic functionality works.
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Link: https://lore.kernel.org/r/20230804170856.1237202-4-andre.przywara at arm.com
+Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+---
+ arch/arm64/boot/dts/allwinner/Makefile        |  1 +
+ .../allwinner/sun50i-h618-orangepi-zero3.dts  | 94 +++++++++++++++++++
+ 2 files changed, 95 insertions(+)
+ create mode 100644 arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
+
+--- a/arch/arm64/boot/dts/allwinner/Makefile
++++ b/arch/arm64/boot/dts/allwinner/Makefile
+@@ -40,3 +40,4 @@ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-ta
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h6-tanix-tx6-mini.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-orangepi-zero2.dtb
+ dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h616-x96-mate.dtb
++dtb-$(CONFIG_ARCH_SUNXI) += sun50i-h618-orangepi-zero3.dtb
+--- /dev/null
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
+@@ -0,0 +1,94 @@
++// SPDX-License-Identifier: (GPL-2.0+ or MIT)
++/*
++ * Copyright (C) 2023 Arm Ltd.
++ */
++
++/dts-v1/;
++
++#include "sun50i-h616-orangepi-zero.dtsi"
++
++/ {
++	model = "OrangePi Zero3";
++	compatible = "xunlong,orangepi-zero3", "allwinner,sun50i-h618";
++};
++
++&emac0 {
++	phy-supply = <&reg_dldo1>;
++};
++
++&ext_rgmii_phy {
++	motorcomm,clk-out-frequency-hz = <125000000>;
++};
++
++&mmc0 {
++	/*
++	 * The schematic shows the card detect pin wired up to PF6, via an
++	 * inverter, but it just doesn't work.
++	 */
++	broken-cd;
++	vmmc-supply = <&reg_dldo1>;
++};
++
++&r_i2c {
++	status = "okay";
++
++	axp313: pmic at 36 {
++		compatible = "x-powers,axp313a";
++		reg = <0x36>;
++		#interrupt-cells = <1>;
++		interrupt-controller;
++		interrupt-parent = <&pio>;
++		interrupts = <2 9 IRQ_TYPE_LEVEL_LOW>;	/* PC9 */
++
++		vin1-supply = <&reg_vcc5v>;
++		vin2-supply = <&reg_vcc5v>;
++		vin3-supply = <&reg_vcc5v>;
++
++		regulators {
++			/* Supplies VCC-PLL, so needs to be always on. */
++			reg_aldo1: aldo1 {
++				regulator-always-on;
++				regulator-min-microvolt = <1800000>;
++				regulator-max-microvolt = <1800000>;
++				regulator-name = "vcc1v8";
++			};
++
++			/* Supplies VCC-IO, so needs to be always on. */
++			reg_dldo1: dldo1 {
++				regulator-always-on;
++				regulator-min-microvolt = <3300000>;
++				regulator-max-microvolt = <3300000>;
++				regulator-name = "vcc3v3";
++			};
++
++			reg_dcdc1: dcdc1 {
++				regulator-always-on;
++				regulator-min-microvolt = <810000>;
++				regulator-max-microvolt = <990000>;
++				regulator-name = "vdd-gpu-sys";
++			};
++
++			reg_dcdc2: dcdc2 {
++				regulator-always-on;
++				regulator-min-microvolt = <810000>;
++				regulator-max-microvolt = <1100000>;
++				regulator-name = "vdd-cpu";
++			};
++
++			reg_dcdc3: dcdc3 {
++				regulator-always-on;
++				regulator-min-microvolt = <1100000>;
++				regulator-max-microvolt = <1100000>;
++				regulator-name = "vdd-dram";
++			};
++		};
++	};
++};
++
++&pio {
++	vcc-pc-supply = <&reg_dldo1>;
++	vcc-pf-supply = <&reg_dldo1>;
++	vcc-pg-supply = <&reg_aldo1>;
++	vcc-ph-supply = <&reg_dldo1>;
++	vcc-pi-supply = <&reg_dldo1>;
++};
diff --git a/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch b/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
new file mode 100644
index 0000000000..a492eed551
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/007-v6.7-arm64-dts-allwinner-h616-update-emac-for-Orange-Pi.patch
@@ -0,0 +1,57 @@
+From b9622937d95809ef89904583191571a9fa326402 Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus at jmu.edu.cn>
+Date: Sun, 29 Oct 2023 15:40:09 +0800
+Subject: [PATCH] arm64: dts: allwinner: h616: update emac for Orange Pi Zero 3
+
+The current emac setting is not suitable for Orange Pi Zero 3,
+move it back to Orange Pi Zero 2 DT. Also update phy mode and
+delay values for emac on Orange Pi Zero 3.
+With these changes, Ethernet now looks stable.
+
+Fixes: 322bf103204b ("arm64: dts: allwinner: h616: Split Orange Pi Zero 2 DT")
+Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
+Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Link: https://lore.kernel.org/r/20231029074009.7820-2-amadeus at jmu.edu.cn
+Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+---
+ arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi | 3 ---
+ arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts | 3 +++
+ arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts | 2 ++
+ 3 files changed, 5 insertions(+), 3 deletions(-)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero.dtsi
+@@ -68,10 +68,7 @@
+ &emac0 {
+ 	pinctrl-names = "default";
+ 	pinctrl-0 = <&ext_rgmii_pins>;
+-	phy-mode = "rgmii";
+ 	phy-handle = <&ext_rgmii_phy>;
+-	allwinner,rx-delay-ps = <3100>;
+-	allwinner,tx-delay-ps = <700>;
+ 	status = "okay";
+ };
+ 
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616-orangepi-zero2.dts
+@@ -13,6 +13,9 @@
+ };
+ 
+ &emac0 {
++	allwinner,rx-delay-ps = <3100>;
++	allwinner,tx-delay-ps = <700>;
++	phy-mode = "rgmii";
+ 	phy-supply = <&reg_dcdce>;
+ };
+ 
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h618-orangepi-zero3.dts
+@@ -13,6 +13,8 @@
+ };
+ 
+ &emac0 {
++	allwinner,tx-delay-ps = <700>;
++	phy-mode = "rgmii-rxid";
+ 	phy-supply = <&reg_dldo1>;
+ };
+ 
diff --git a/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch b/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch
new file mode 100644
index 0000000000..ce8add18ab
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/008-v6.7-arm64-dts-allwinner-h616-Add-SID-controller-node.patch
@@ -0,0 +1,31 @@
+From 951992797378a2177946400438f4d23c9fceae5b Mon Sep 17 00:00:00 2001
+From: Martin Botka <martin.botka at somainline.org>
+Date: Tue, 12 Sep 2023 14:25:13 +0200
+Subject: [PATCH] arm64: dts: allwinner: h616: Add SID controller node
+
+Add node for the H616 SID controller
+
+Signed-off-by: Martin Botka <martin.botka at somainline.org>
+Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Link: https://lore.kernel.org/r/20230912-sid-h616-v3-2-ee18e1c5bbb5 at somainline.org
+Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+---
+ arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+@@ -133,6 +133,13 @@
+ 			#reset-cells = <1>;
+ 		};
+ 
++		sid: efuse at 3006000 {
++			compatible = "allwinner,sun50i-h616-sid", "allwinner,sun50i-a64-sid";
++			reg = <0x03006000 0x1000>;
++			#address-cells = <1>;
++			#size-cells = <1>;
++		};
++
+ 		watchdog: watchdog at 30090a0 {
+ 			compatible = "allwinner,sun50i-h616-wdt",
+ 				     "allwinner,sun6i-a31-wdt";
diff --git a/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch b/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
new file mode 100644
index 0000000000..3453e2aa53
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/009-v6.9-soc-sunxi-sram-export-register-0-for-THS-on-H616.patch
@@ -0,0 +1,98 @@
+From 898d96c5464b69af44f6407c5de81ebc349d574b Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Mon, 19 Feb 2024 15:36:33 +0000
+Subject: [PATCH] soc: sunxi: sram: export register 0 for THS on H616
+
+The Allwinner H616 SoC contains a mysterious bit at register offset 0x0
+in the SRAM control block. If bit 16 is set (the reset value), the
+temperature readings of the THS are way off, leading to reports about
+200C, at normal ambient temperatures. Clearing this bits brings the
+reported values down to the expected values.
+The BSP code clears this bit in firmware (U-Boot), and has an explicit
+comment about this, but offers no real explanation.
+
+Experiments in U-Boot show that register 0x0 has no effect on the SRAM C
+visibility: all tested bit settings still allow full read and write
+access by the CPU to the whole of SRAM C. Only bit 24 of the register at
+offset 0x4 makes all of SRAM C inaccessible by the CPU. So modelling
+the THS switch functionality as an SRAM region would not reflect reality.
+
+Since we should not rely on firmware settings, allow other code (the THS
+driver) to access this register, by exporting it through the already
+existing regmap. This mimics what we already do for the LDO control and
+the EMAC register.
+
+To avoid concurrent accesses to the same register at the same time, by
+the SRAM switch code and the regmap code, use the same lock to protect
+the access. The regmap subsystem allows to use an existing lock, so we
+just need to hook in there.
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+Link: https://lore.kernel.org/r/20240219153639.179814-2-andre.przywara at arm.com
+---
+ drivers/soc/sunxi/sunxi_sram.c | 22 ++++++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/drivers/soc/sunxi/sunxi_sram.c
++++ b/drivers/soc/sunxi/sunxi_sram.c
+@@ -284,6 +284,7 @@ EXPORT_SYMBOL(sunxi_sram_release);
+ struct sunxi_sramc_variant {
+ 	int num_emac_clocks;
+ 	bool has_ldo_ctrl;
++	bool has_ths_offset;
+ };
+ 
+ static const struct sunxi_sramc_variant sun4i_a10_sramc_variant = {
+@@ -305,8 +306,10 @@ static const struct sunxi_sramc_variant
+ 
+ static const struct sunxi_sramc_variant sun50i_h616_sramc_variant = {
+ 	.num_emac_clocks = 2,
++	.has_ths_offset = true,
+ };
+ 
++#define SUNXI_SRAM_THS_OFFSET_REG	0x0
+ #define SUNXI_SRAM_EMAC_CLOCK_REG	0x30
+ #define SUNXI_SYS_LDO_CTRL_REG		0x150
+ 
+@@ -315,6 +318,8 @@ static bool sunxi_sram_regmap_accessible
+ {
+ 	const struct sunxi_sramc_variant *variant = dev_get_drvdata(dev);
+ 
++	if (reg == SUNXI_SRAM_THS_OFFSET_REG && variant->has_ths_offset)
++		return true;
+ 	if (reg >= SUNXI_SRAM_EMAC_CLOCK_REG &&
+ 	    reg <  SUNXI_SRAM_EMAC_CLOCK_REG + variant->num_emac_clocks * 4)
+ 		return true;
+@@ -324,6 +329,20 @@ static bool sunxi_sram_regmap_accessible
+ 	return false;
+ }
+ 
++static void sunxi_sram_lock(void *_lock)
++{
++	spinlock_t *lock = _lock;
++
++	spin_lock(lock);
++}
++
++static void sunxi_sram_unlock(void *_lock)
++{
++	spinlock_t *lock = _lock;
++
++	spin_unlock(lock);
++}
++
+ static struct regmap_config sunxi_sram_regmap_config = {
+ 	.reg_bits       = 32,
+ 	.val_bits       = 32,
+@@ -333,6 +352,9 @@ static struct regmap_config sunxi_sram_r
+ 	/* other devices have no business accessing other registers */
+ 	.readable_reg	= sunxi_sram_regmap_accessible_reg,
+ 	.writeable_reg	= sunxi_sram_regmap_accessible_reg,
++	.lock		= sunxi_sram_lock,
++	.unlock		= sunxi_sram_unlock,
++	.lock_arg	= &sram_lock,
+ };
+ 
+ static int __init sunxi_sram_probe(struct platform_device *pdev)
diff --git a/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch b/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
new file mode 100644
index 0000000000..8b19989118
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/010-v6.8-thermal-drivers-sun8i-Add-D1-T113s-THS-controller-support.patch
@@ -0,0 +1,47 @@
+From ebbf19e36d021f253425344b4d4b987f3b7d9be5 Mon Sep 17 00:00:00 2001
+From: Maxim Kiselev <bigunclemax at gmail.com>
+Date: Mon, 18 Dec 2023 00:06:23 +0300
+Subject: [PATCH] thermal/drivers/sun8i: Add D1/T113s THS controller support
+
+This patch adds a thermal sensor controller support for the D1/T113s,
+which is similar to the one on H6, but with only one sensor and
+different scale and offset values.
+
+Signed-off-by: Maxim Kiselev <bigunclemax at gmail.com>
+Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Reviewed-by: Andre Przywara <andre.przywara at arm.com>
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+Link: https://lore.kernel.org/r/20231217210629.131486-3-bigunclemax at gmail.com
+---
+ drivers/thermal/sun8i_thermal.c | 13 +++++++++++++
+ 1 file changed, 13 insertions(+)
+
+--- a/drivers/thermal/sun8i_thermal.c
++++ b/drivers/thermal/sun8i_thermal.c
+@@ -610,6 +610,18 @@ static const struct ths_thermal_chip sun
+ 	.calc_temp = sun8i_ths_calc_temp,
+ };
+ 
++static const struct ths_thermal_chip sun20i_d1_ths = {
++	.sensor_num = 1,
++	.has_bus_clk_reset = true,
++	.offset = 188552,
++	.scale = 673,
++	.temp_data_base = SUN50I_H6_THS_TEMP_DATA,
++	.calibrate = sun50i_h6_ths_calibrate,
++	.init = sun50i_h6_thermal_init,
++	.irq_ack = sun50i_h6_irq_ack,
++	.calc_temp = sun8i_ths_calc_temp,
++};
++
+ static const struct of_device_id of_ths_match[] = {
+ 	{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
+ 	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
+@@ -618,6 +630,7 @@ static const struct of_device_id of_ths_
+ 	{ .compatible = "allwinner,sun50i-a100-ths", .data = &sun50i_a100_ths },
+ 	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
+ 	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
++	{ .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths },
+ 	{ /* sentinel */ },
+ };
+ MODULE_DEVICE_TABLE(of, of_ths_match);
diff --git a/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch b/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch
new file mode 100644
index 0000000000..b8138a3870
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/011-v6.9-thermal-drivers-sun8i-Explain-unknown-H6-register-value.patch
@@ -0,0 +1,79 @@
+From 14f118aa50fe7c7c7330f56d007ecacca487cea8 Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Mon, 19 Feb 2024 15:36:35 +0000
+Subject: [PATCH] thermal/drivers/sun8i: Explain unknown H6 register value
+
+So far we were ORing in some "unknown" value into the THS control
+register on the Allwinner H6. This part of the register is not explained
+in the H6 manual, but the H616 manual details those bits, and on closer
+inspection the THS IP blocks in both SoCs seem very close:
+- The BSP code for both SoCs writes the same values into THS_CTRL.
+- The reset values of at least the first three registers are the same.
+
+Replace the "unknown" value with its proper meaning: "acquire time",
+most probably the sample part of the sample & hold circuit of the ADC,
+according to its explanation in the H616 manual.
+
+No functional change, just a macro rename and adjustment.
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Acked-by: Vasily Khoruzhick <anarsoul at gmail.com>
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+Link: https://lore.kernel.org/r/20240219153639.179814-4-andre.przywara at arm.com
+---
+ drivers/thermal/sun8i_thermal.c | 29 ++++++++++++++++-------------
+ 1 file changed, 16 insertions(+), 13 deletions(-)
+
+--- a/drivers/thermal/sun8i_thermal.c
++++ b/drivers/thermal/sun8i_thermal.c
+@@ -50,7 +50,8 @@
+ #define SUN8I_THS_CTRL2_T_ACQ1(x)		((GENMASK(15, 0) & (x)) << 16)
+ #define SUN8I_THS_DATA_IRQ_STS(x)		BIT(x + 8)
+ 
+-#define SUN50I_THS_CTRL0_T_ACQ(x)		((GENMASK(15, 0) & (x)) << 16)
++#define SUN50I_THS_CTRL0_T_ACQ(x)		(GENMASK(15, 0) & ((x) - 1))
++#define SUN50I_THS_CTRL0_T_SAMPLE_PER(x)	((GENMASK(15, 0) & ((x) - 1)) << 16)
+ #define SUN50I_THS_FILTER_EN			BIT(2)
+ #define SUN50I_THS_FILTER_TYPE(x)		(GENMASK(1, 0) & (x))
+ #define SUN50I_H6_THS_PC_TEMP_PERIOD(x)		((GENMASK(19, 0) & (x)) << 12)
+@@ -410,25 +411,27 @@ static int sun8i_h3_thermal_init(struct
+ 	return 0;
+ }
+ 
+-/*
+- * Without this undocumented value, the returned temperatures would
+- * be higher than real ones by about 20C.
+- */
+-#define SUN50I_H6_CTRL0_UNK 0x0000002f
+-
+ static int sun50i_h6_thermal_init(struct ths_device *tmdev)
+ {
+ 	int val;
+ 
+ 	/*
+-	 * T_acq = 20us
+-	 * clkin = 24MHz
+-	 *
+-	 * x = T_acq * clkin - 1
+-	 *   = 479
++	 * The manual recommends an overall sample frequency of 50 KHz (20us,
++	 * 480 cycles at 24 MHz), which provides plenty of time for both the
++	 * acquisition time (>24 cycles) and the actual conversion time
++	 * (>14 cycles).
++	 * The lower half of the CTRL register holds the "acquire time", in
++	 * clock cycles, which the manual recommends to be 2us:
++	 * 24MHz * 2us = 48 cycles.
++	 * The high half of THS_CTRL encodes the sample frequency, in clock
++	 * cycles: 24MHz * 20us = 480 cycles.
++	 * This is explained in the H616 manual, but apparently wrongly
++	 * described in the H6 manual, although the BSP code does the same
++	 * for both SoCs.
+ 	 */
+ 	regmap_write(tmdev->regmap, SUN50I_THS_CTRL0,
+-		     SUN50I_H6_CTRL0_UNK | SUN50I_THS_CTRL0_T_ACQ(479));
++		     SUN50I_THS_CTRL0_T_ACQ(48) |
++		     SUN50I_THS_CTRL0_T_SAMPLE_PER(480));
+ 	/* average over 4 samples */
+ 	regmap_write(tmdev->regmap, SUN50I_H6_THS_MFC,
+ 		     SUN50I_THS_FILTER_EN |
diff --git a/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch b/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
new file mode 100644
index 0000000000..3d01a507fa
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/012-v6.9-thermal-drivers-sun8i-Extend-H6-calibration-to-support-4.patch
@@ -0,0 +1,74 @@
+From 6c04a419a4c5fb18edefc44dd676fb95c7f6c55d Mon Sep 17 00:00:00 2001
+From: Maksim Kiselev <bigunclemax at gmail.com>
+Date: Mon, 19 Feb 2024 15:36:36 +0000
+Subject: [PATCH] thermal/drivers/sun8i: Extend H6 calibration to support 4
+ sensors
+
+The H616 SoC resembles the H6 thermal sensor controller, with a few
+changes like four sensors.
+
+Extend sun50i_h6_ths_calibrate() function to support calibration of
+these sensors.
+
+Co-developed-by: Martin Botka <martin.botka at somainline.org>
+Signed-off-by: Martin Botka <martin.botka at somainline.org>
+Signed-off-by: Maksim Kiselev <bigunclemax at gmail.com>
+Reviewed-by: Andre Przywara <andre.przywara at arm.com>
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Acked-by: Vasily Khoruzhick <anarsoul at gmail.com>
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+Link: https://lore.kernel.org/r/20240219153639.179814-5-andre.przywara at arm.com
+---
+ drivers/thermal/sun8i_thermal.c | 28 ++++++++++++++++++++--------
+ 1 file changed, 20 insertions(+), 8 deletions(-)
+
+--- a/drivers/thermal/sun8i_thermal.c
++++ b/drivers/thermal/sun8i_thermal.c
+@@ -224,16 +224,21 @@ static int sun50i_h6_ths_calibrate(struc
+ 	struct device *dev = tmdev->dev;
+ 	int i, ft_temp;
+ 
+-	if (!caldata[0] || callen < 2 + 2 * tmdev->chip->sensor_num)
++	if (!caldata[0])
+ 		return -EINVAL;
+ 
+ 	/*
+ 	 * efuse layout:
+ 	 *
+-	 *	0   11  16	 32
+-	 *	+-------+-------+-------+
+-	 *	|temp|  |sensor0|sensor1|
+-	 *	+-------+-------+-------+
++	 * 0      11  16     27   32     43   48    57
++	 * +----------+-----------+-----------+-----------+
++	 * |  temp |  |sensor0|   |sensor1|   |sensor2|   |
++	 * +----------+-----------+-----------+-----------+
++	 *                      ^           ^           ^
++	 *                      |           |           |
++	 *                      |           |           sensor3[11:8]
++	 *                      |           sensor3[7:4]
++	 *                      sensor3[3:0]
+ 	 *
+ 	 * The calibration data on the H6 is the ambient temperature and
+ 	 * sensor values that are filled during the factory test stage.
+@@ -246,9 +251,16 @@ static int sun50i_h6_ths_calibrate(struc
+ 	ft_temp = (caldata[0] & FT_TEMP_MASK) * 100;
+ 
+ 	for (i = 0; i < tmdev->chip->sensor_num; i++) {
+-		int sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK;
+-		int cdata, offset;
+-		int sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg);
++		int sensor_reg, sensor_temp, cdata, offset;
++
++		if (i == 3)
++			sensor_reg = (caldata[1] >> 12)
++				     | ((caldata[2] >> 12) << 4)
++				     | ((caldata[3] >> 12) << 8);
++		else
++			sensor_reg = caldata[i + 1] & TEMP_CALIB_MASK;
++
++		sensor_temp = tmdev->chip->calc_temp(tmdev, i, sensor_reg);
+ 
+ 		/*
+ 		 * Calibration data is CALIBRATE_DEFAULT - (calculated
diff --git a/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch b/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
new file mode 100644
index 0000000000..6db1e32cfb
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/013-v6.9-thermal-drivers-sun8i-Add-SRAM-register-access-code.patch
@@ -0,0 +1,126 @@
+From f8b54d1120b81ed57bed96cc8e814ba08886d1e5 Mon Sep 17 00:00:00 2001
+From: Andre Przywara <andre.przywara at arm.com>
+Date: Mon, 19 Feb 2024 15:36:37 +0000
+Subject: [PATCH] thermal/drivers/sun8i: Add SRAM register access code
+
+The Allwinner H616 SoC needs to clear a bit in one register in the SRAM
+controller, to report reasonable temperature values. On reset, bit 16 in
+register 0x3000000 is set, which leads to the driver reporting
+temperatures around 200C. Clearing this bit brings the values down to the
+expected range. The BSP code does a one-time write in U-Boot, with a
+comment just mentioning the effect on the THS, but offering no further
+explanation.
+
+To not rely on firmware to set things up for us, add code that queries
+the SRAM controller device via a DT phandle link, then clear just this
+single bit.
+
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Acked-by: Vasily Khoruzhick <anarsoul at gmail.com>
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+Link: https://lore.kernel.org/r/20240219153639.179814-6-andre.przywara at arm.com
+---
+ drivers/thermal/sun8i_thermal.c | 51 +++++++++++++++++++++++++++++++++
+ 1 file changed, 51 insertions(+)
+
+--- a/drivers/thermal/sun8i_thermal.c
++++ b/drivers/thermal/sun8i_thermal.c
+@@ -15,6 +15,7 @@
+ #include <linux/module.h>
+ #include <linux/nvmem-consumer.h>
+ #include <linux/of_device.h>
++#include <linux/of_platform.h>
+ #include <linux/platform_device.h>
+ #include <linux/regmap.h>
+ #include <linux/reset.h>
+@@ -68,6 +69,7 @@ struct tsensor {
+ struct ths_thermal_chip {
+ 	bool            has_mod_clk;
+ 	bool            has_bus_clk_reset;
++	bool		needs_sram;
+ 	int		sensor_num;
+ 	int		offset;
+ 	int		scale;
+@@ -85,12 +87,16 @@ struct ths_device {
+ 	const struct ths_thermal_chip		*chip;
+ 	struct device				*dev;
+ 	struct regmap				*regmap;
++	struct regmap_field			*sram_regmap_field;
+ 	struct reset_control			*reset;
+ 	struct clk				*bus_clk;
+ 	struct clk                              *mod_clk;
+ 	struct tsensor				sensor[MAX_SENSOR_NUM];
+ };
+ 
++/* The H616 needs to have a bit 16 in the SRAM control register cleared. */
++static const struct reg_field sun8i_ths_sram_reg_field = REG_FIELD(0x0, 16, 16);
++
+ /* Temp Unit: millidegree Celsius */
+ static int sun8i_ths_calc_temp(struct ths_device *tmdev,
+ 			       int id, int reg)
+@@ -337,6 +343,34 @@ static void sun8i_ths_reset_control_asse
+ 	reset_control_assert(data);
+ }
+ 
++static struct regmap *sun8i_ths_get_sram_regmap(struct device_node *node)
++{
++	struct device_node *sram_node;
++	struct platform_device *sram_pdev;
++	struct regmap *regmap = NULL;
++
++	sram_node = of_parse_phandle(node, "allwinner,sram", 0);
++	if (!sram_node)
++		return ERR_PTR(-ENODEV);
++
++	sram_pdev = of_find_device_by_node(sram_node);
++	if (!sram_pdev) {
++		/* platform device might not be probed yet */
++		regmap = ERR_PTR(-EPROBE_DEFER);
++		goto out_put_node;
++	}
++
++	/* If no regmap is found then the other device driver is at fault */
++	regmap = dev_get_regmap(&sram_pdev->dev, NULL);
++	if (!regmap)
++		regmap = ERR_PTR(-EINVAL);
++
++	platform_device_put(sram_pdev);
++out_put_node:
++	of_node_put(sram_node);
++	return regmap;
++}
++
+ static int sun8i_ths_resource_init(struct ths_device *tmdev)
+ {
+ 	struct device *dev = tmdev->dev;
+@@ -381,6 +415,19 @@ static int sun8i_ths_resource_init(struc
+ 	if (ret)
+ 		return ret;
+ 
++	if (tmdev->chip->needs_sram) {
++		struct regmap *regmap;
++
++		regmap = sun8i_ths_get_sram_regmap(dev->of_node);
++		if (IS_ERR(regmap))
++			return PTR_ERR(regmap);
++		tmdev->sram_regmap_field = devm_regmap_field_alloc(dev,
++						      regmap,
++						      sun8i_ths_sram_reg_field);
++		if (IS_ERR(tmdev->sram_regmap_field))
++			return PTR_ERR(tmdev->sram_regmap_field);
++	}
++
+ 	ret = sun8i_ths_calibrate(tmdev);
+ 	if (ret)
+ 		return ret;
+@@ -427,6 +474,10 @@ static int sun50i_h6_thermal_init(struct
+ {
+ 	int val;
+ 
++	/* The H616 needs to have a bit in the SRAM control register cleared. */
++	if (tmdev->sram_regmap_field)
++		regmap_field_write(tmdev->sram_regmap_field, 0);
++
+ 	/*
+ 	 * The manual recommends an overall sample frequency of 50 KHz (20us,
+ 	 * 480 cycles at 24 MHz), which provides plenty of time for both the
diff --git a/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch b/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
new file mode 100644
index 0000000000..e743d344c6
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/014-v6.9-thermal-drivers-sun8i-Add-support-for-H616-THS-controller.patch
@@ -0,0 +1,50 @@
+From e7dbfa19572a1440a2e67ef70f94ff204849a0a8 Mon Sep 17 00:00:00 2001
+From: Martin Botka <martin.botka at somainline.org>
+Date: Mon, 19 Feb 2024 15:36:38 +0000
+Subject: [PATCH] thermal/drivers/sun8i: Add support for H616 THS controller
+
+Add support for the thermal sensor found in H616 SoCs, is the same as
+the H6 thermal sensor controller, but with four sensors.
+Also the registers readings are wrong, unless a bit in the first SYS_CFG
+register cleared, so set exercise the SRAM regmap to take care of that.
+
+Signed-off-by: Martin Botka <martin.botka at somainline.org>
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Acked-by: Vasily Khoruzhick <anarsoul at gmail.com>
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+Link: https://lore.kernel.org/r/20240219153639.179814-7-andre.przywara at arm.com
+---
+ drivers/thermal/sun8i_thermal.c | 15 +++++++++++++++
+ 1 file changed, 15 insertions(+)
+
+--- a/drivers/thermal/sun8i_thermal.c
++++ b/drivers/thermal/sun8i_thermal.c
+@@ -688,6 +688,20 @@ static const struct ths_thermal_chip sun
+ 	.calc_temp = sun8i_ths_calc_temp,
+ };
+ 
++static const struct ths_thermal_chip sun50i_h616_ths = {
++	.sensor_num = 4,
++	.has_bus_clk_reset = true,
++	.needs_sram = true,
++	.ft_deviation = 8000,
++	.offset = 263655,
++	.scale = 810,
++	.temp_data_base = SUN50I_H6_THS_TEMP_DATA,
++	.calibrate = sun50i_h6_ths_calibrate,
++	.init = sun50i_h6_thermal_init,
++	.irq_ack = sun50i_h6_irq_ack,
++	.calc_temp = sun8i_ths_calc_temp,
++};
++
+ static const struct of_device_id of_ths_match[] = {
+ 	{ .compatible = "allwinner,sun8i-a83t-ths", .data = &sun8i_a83t_ths },
+ 	{ .compatible = "allwinner,sun8i-h3-ths", .data = &sun8i_h3_ths },
+@@ -697,6 +711,7 @@ static const struct of_device_id of_ths_
+ 	{ .compatible = "allwinner,sun50i-h5-ths", .data = &sun50i_h5_ths },
+ 	{ .compatible = "allwinner,sun50i-h6-ths", .data = &sun50i_h6_ths },
+ 	{ .compatible = "allwinner,sun20i-d1-ths", .data = &sun20i_d1_ths },
++	{ .compatible = "allwinner,sun50i-h616-ths", .data = &sun50i_h616_ths },
+ 	{ /* sentinel */ },
+ };
+ MODULE_DEVICE_TABLE(of, of_ths_match);
diff --git a/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch b/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
new file mode 100644
index 0000000000..384bf55084
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/015-v6.9-thermal-drivers-sun8i-Dont-fail-probe-due-to-zone-registra.patch
@@ -0,0 +1,68 @@
+From 9ac53d5532cc4bb595bbee86ccba2172ccc336c3 Mon Sep 17 00:00:00 2001
+From: Mark Brown <broonie at kernel.org>
+Date: Tue, 23 Jan 2024 23:33:07 +0000
+Subject: [PATCH] thermal/drivers/sun8i: Don't fail probe due to zone
+ registration failure
+
+Currently the sun8i thermal driver will fail to probe if any of the
+thermal zones it is registering fails to register with the thermal core.
+Since we currently do not define any trip points for the GPU thermal
+zones on at least A64 or H5 this means that we have no thermal support
+on these platforms:
+
+[    1.698703] thermal_sys: Failed to find 'trips' node
+[    1.698707] thermal_sys: Failed to find trip points for thermal-sensor id=1
+
+even though the main CPU thermal zone on both SoCs is fully configured.
+This does not seem ideal, while we may not be able to use all the zones
+it seems better to have those zones which are usable be operational.
+Instead just carry on registering zones if we get any non-deferral
+error, allowing use of those zones which are usable.
+
+This means that we also need to update the interrupt handler to not
+attempt to notify the core for events on zones which we have not
+registered, I didn't see an ability to mask individual interrupts and
+I would expect that interrupts would still be indicated in the ISR even
+if they were masked.
+
+Reviewed-by: Vasily Khoruzhick <anarsoul at gmail.com>
+Acked-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Signed-off-by: Mark Brown <broonie at kernel.org>
+Signed-off-by: Daniel Lezcano <daniel.lezcano at linaro.org>
+Link: https://lore.kernel.org/r/20240123-thermal-sun8i-registration-v3-1-3e5771b1bbdd at kernel.org
+---
+ drivers/thermal/sun8i_thermal.c | 16 ++++++++++++++--
+ 1 file changed, 14 insertions(+), 2 deletions(-)
+
+--- a/drivers/thermal/sun8i_thermal.c
++++ b/drivers/thermal/sun8i_thermal.c
+@@ -197,6 +197,9 @@ static irqreturn_t sun8i_irq_thread(int
+ 	int i;
+ 
+ 	for_each_set_bit(i, &irq_bitmap, tmdev->chip->sensor_num) {
++		/* We allow some zones to not register. */
++		if (IS_ERR(tmdev->sensor[i].tzd))
++			continue;
+ 		thermal_zone_device_update(tmdev->sensor[i].tzd,
+ 					   THERMAL_EVENT_UNSPECIFIED);
+ 	}
+@@ -531,8 +534,17 @@ static int sun8i_ths_register(struct ths
+ 						      i,
+ 						      &tmdev->sensor[i],
+ 						      &ths_ops);
+-		if (IS_ERR(tmdev->sensor[i].tzd))
+-			return PTR_ERR(tmdev->sensor[i].tzd);
++
++		/*
++		 * If an individual zone fails to register for reasons
++		 * other than probe deferral (eg, a bad DT) then carry
++		 * on, other zones might register successfully.
++		 */
++		if (IS_ERR(tmdev->sensor[i].tzd)) {
++			if (PTR_ERR(tmdev->sensor[i].tzd) == -EPROBE_DEFER)
++				return PTR_ERR(tmdev->sensor[i].tzd);
++			continue;
++		}
+ 
+ 		if (devm_thermal_add_hwmon_sysfs(tmdev->sensor[i].tzd))
+ 			dev_warn(tmdev->dev,
diff --git a/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch b/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch
new file mode 100644
index 0000000000..cd6542bf14
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/016-v6.9-arm64-dts-allwinner-h616-Add-thermal-sensor-and-zones.patch
@@ -0,0 +1,138 @@
+From f4318af40544b8e7ff5a6b667ede60e6cf808262 Mon Sep 17 00:00:00 2001
+From: Martin Botka <martin.botka at somainline.org>
+Date: Mon, 19 Feb 2024 15:36:39 +0000
+Subject: [PATCH] arm64: dts: allwinner: h616: Add thermal sensor and zones
+
+There are four thermal sensors:
+- CPU
+- GPU
+- VE
+- DRAM
+
+Add the thermal sensor configuration and the thermal zones.
+
+Signed-off-by: Martin Botka <martin.botka at somainline.org>
+Signed-off-by: Andre Przywara <andre.przywara at arm.com>
+Reviewed-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+Link: https://lore.kernel.org/r/20240219153639.179814-8-andre.przywara at arm.com
+Signed-off-by: Jernej Skrabec <jernej.skrabec at gmail.com>
+---
+ .../arm64/boot/dts/allwinner/sun50i-h616.dtsi | 88 +++++++++++++++++++
+ 1 file changed, 88 insertions(+)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h616.dtsi
+@@ -9,6 +9,7 @@
+ #include <dt-bindings/clock/sun6i-rtc.h>
+ #include <dt-bindings/reset/sun50i-h616-ccu.h>
+ #include <dt-bindings/reset/sun50i-h6-r-ccu.h>
++#include <dt-bindings/thermal/thermal.h>
+ 
+ / {
+ 	interrupt-parent = <&gic>;
+@@ -138,6 +139,10 @@
+ 			reg = <0x03006000 0x1000>;
+ 			#address-cells = <1>;
+ 			#size-cells = <1>;
++
++			ths_calibration: thermal-sensor-calibration at 14 {
++				reg = <0x14 0x8>;
++			};
+ 		};
+ 
+ 		watchdog: watchdog at 30090a0 {
+@@ -511,6 +516,19 @@
+ 			};
+ 		};
+ 
++		ths: thermal-sensor at 5070400 {
++			compatible = "allwinner,sun50i-h616-ths";
++			reg = <0x05070400 0x400>;
++			interrupts = <GIC_SPI 19 IRQ_TYPE_LEVEL_HIGH>;
++			clocks = <&ccu CLK_BUS_THS>;
++			clock-names = "bus";
++			resets = <&ccu RST_BUS_THS>;
++			nvmem-cells = <&ths_calibration>;
++			nvmem-cell-names = "calibration";
++			allwinner,sram = <&syscon>;
++			#thermal-sensor-cells = <1>;
++		};
++
+ 		usbotg: usb at 5100000 {
+ 			compatible = "allwinner,sun50i-h616-musb",
+ 				     "allwinner,sun8i-h3-musb";
+@@ -755,4 +773,74 @@
+ 			#size-cells = <0>;
+ 		};
+ 	};
++
++	thermal-zones {
++		cpu-thermal {
++			polling-delay-passive = <500>;
++			polling-delay = <1000>;
++			thermal-sensors = <&ths 2>;
++			sustainable-power = <1000>;
++
++			trips {
++				cpu_threshold: cpu-trip-0 {
++					temperature = <60000>;
++					type = "passive";
++					hysteresis = <0>;
++				};
++				cpu_target: cpu-trip-1 {
++					temperature = <70000>;
++					type = "passive";
++					hysteresis = <0>;
++				};
++				cpu_critical: cpu-trip-2 {
++					temperature = <110000>;
++					type = "critical";
++					hysteresis = <0>;
++				};
++			};
++		};
++
++		gpu-thermal {
++			polling-delay-passive = <500>;
++			polling-delay = <1000>;
++			thermal-sensors = <&ths 0>;
++			sustainable-power = <1100>;
++
++			trips {
++				gpu_temp_critical: gpu-trip-0 {
++					temperature = <110000>;
++					type = "critical";
++					hysteresis = <0>;
++				};
++			};
++		};
++
++		ve-thermal {
++			polling-delay-passive = <0>;
++			polling-delay = <0>;
++			thermal-sensors = <&ths 1>;
++
++			trips {
++				ve_temp_critical: ve-trip-0 {
++					temperature = <110000>;
++					type = "critical";
++					hysteresis = <0>;
++				};
++			};
++		};
++
++		ddr-thermal {
++			polling-delay-passive = <0>;
++			polling-delay = <0>;
++			thermal-sensors = <&ths 3>;
++
++			trips {
++				ddr_temp_critical: ddr-trip-0 {
++					temperature = <110000>;
++					type = "critical";
++					hysteresis = <0>;
++				};
++			};
++		};
++	};
+ };
diff --git a/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch b/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch
new file mode 100644
index 0000000000..30c98aa737
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/102-sunxi-add-OF-node-for-USB-eth-on-NanoPi-R1S-H5.patch
@@ -0,0 +1,30 @@
+From a896bc1d79e3c00f0aacfe225499d811775616f3 Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus at jmu.edu.cn>
+Date: Sun, 10 Oct 2021 21:50:17 +0800
+Subject: [PATCH] arm64: allwinner: add OF node for USB eth on NanoPi R1S H5
+
+This adds the OF node for the USB3 ethernet adapter on the FriendlyARM
+NanoPi R1S H5. Add the correct value for the RTL8153 LED configuration
+register to match the blink behavior of the other port on the device.
+
+Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
+---
+ arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 7 +++++++
+ 1 file changed, 7 insertions(+)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
+@@ -116,6 +116,13 @@
+ 
+ &ehci1 {
+ 	status = "okay";
++
++	usb-eth at 1 {
++		compatible = "realtek,rtl8153";
++		reg = <1>;
++
++		realtek,led-data = <0x78>;
++	};
+ };
+ 
+ &ehci2 {
diff --git a/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch b/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch
new file mode 100644
index 0000000000..2c5ccd7d96
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/301-orangepi_pc2_usb_otg_to_host_key_power.patch
@@ -0,0 +1,20 @@
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-orangepi-pc2.dts
+@@ -59,7 +59,7 @@
+ 
+ 		key-sw4 {
+ 			label = "sw4";
+-			linux,code = <BTN_0>;
++			linux,code = <KEY_POWER>;
+ 			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
+ 			wakeup-source;
+ 		};
+@@ -220,7 +220,7 @@
+ };
+ 
+ &usb_otg {
+-	dr_mode = "otg";
++	dr_mode = "host";
+ 	status = "okay";
+ };
+ 
diff --git a/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch b/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch
new file mode 100644
index 0000000000..a8dfcd9dbc
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/400-arm64-allwinner-a64-sopine-Add-Sopine-flash-partitio.patch
@@ -0,0 +1,46 @@
+From 7d87d3dafc4b1ea5659eb71ee6c5fd5308490d1f Mon Sep 17 00:00:00 2001
+From: Oskari Lemmela <oskari at lemmela.net>
+Date: Mon, 31 Dec 2018 07:44:49 +0200
+Subject: [PATCH] arm64: allwinner: a64-sopine: Add Sopine flash partitions.
+
+First 896kB to u-boot. Enough space for SPL, u-boot and ATF.
+Next 128kB to u-boot environment and rest to firmware.
+
+Firmware partition is compatible FIT image dynamic splitting.
+
+Signed-off-by: Oskari Lemmela <oskari at lemmela.net>
+---
+ .../boot/dts/allwinner/sun50i-a64-sopine.dtsi | 22 +++++++++++++++++++
+ 1 file changed, 22 insertions(+)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine.dtsi
+@@ -58,6 +58,28 @@
+ 		compatible = "jedec,spi-nor";
+ 		reg = <0>;
+ 		spi-max-frequency = <40000000>;
++
++		partitions {
++			compatible = "fixed-partitions";
++			#address-cells = <1>;
++			#size-cells = <1>;
++
++			partition at 0 {
++				label = "u-boot";
++				reg = <0x000000 0x0E0000>;
++			};
++
++			partition at e0000 {
++				label = "u-boot-env";
++				reg = <0x0E0000 0x020000>;
++			};
++
++			partition at 100000 {
++				compatible = "denx,fit";
++				label = "firmware";
++				reg = <0x100000 0xF00000>;
++			};
++		};
+ 	};
+ };
+ 
diff --git a/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch b/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch
new file mode 100644
index 0000000000..5b8dd170c5
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/410-sunxi-add-bananapi-p2-zero.patch
@@ -0,0 +1,292 @@
+--- a/arch/arm/boot/dts/Makefile
++++ b/arch/arm/boot/dts/Makefile
+@@ -1352,6 +1352,7 @@ dtb-$(CONFIG_MACH_SUN8I) += \
+ 	sun8i-a83t-cubietruck-plus.dtb \
+ 	sun8i-a83t-tbs-a711.dtb \
+ 	sun8i-h2-plus-bananapi-m2-zero.dtb \
++	sun8i-h2-plus-bananapi-p2-zero.dtb \
+ 	sun8i-h2-plus-libretech-all-h3-cc.dtb \
+ 	sun8i-h2-plus-orangepi-r1.dtb \
+ 	sun8i-h2-plus-orangepi-zero.dtb \
+--- /dev/null
++++ b/arch/arm/boot/dts/sun8i-h2-plus-bananapi-p2-zero.dts
+@@ -0,0 +1,279 @@
++// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
++/*
++ * Copyright (C) 2023 Zoltan HERPAI <wigyori at uid0.hu>
++ *
++ * Based on sun8i-h2-plus-bananapi-m2-zero.dts, which is:
++ *   Copyright (C) 2017 Icenowy Zheng <icenowy at aosc.io>
++ */
++
++/dts-v1/;
++#include "sun8i-h3.dtsi"
++#include "sunxi-common-regulators.dtsi"
++
++#include <dt-bindings/gpio/gpio.h>
++#include <dt-bindings/input/input.h>
++
++/ {
++	model = "Banana Pi BPI-P2-Zero";
++	compatible = "sinovoip,bpi-p2-zero", "allwinner,sun8i-h2-plus";
++
++	aliases {
++		serial0 = &uart0;
++		serial1 = &uart1;
++	};
++
++	chosen {
++		stdout-path = "serial0:115200n8";
++	};
++
++	connector {
++		compatible = "hdmi-connector";
++		type = "c";
++
++		port {
++			hdmi_con_in: endpoint {
++				remote-endpoint = <&hdmi_out_con>;
++			};
++		};
++	};
++
++	leds {
++		compatible = "gpio-leds";
++
++		pwr_led {
++			label = "bananapi-p2-zero:red:pwr";
++			gpios = <&r_pio 0 10 GPIO_ACTIVE_LOW>; /* PL10 */
++			default-state = "on";
++		};
++	};
++
++	gpio_keys {
++		compatible = "gpio-keys";
++
++		sw4 {
++			label = "power";
++			linux,code = <BTN_0>;
++			gpios = <&r_pio 0 3 GPIO_ACTIVE_LOW>;
++		};
++	};
++
++	reg_vdd_cpux: vdd-cpux-regulator {
++		compatible = "regulator-gpio";
++		regulator-name = "vdd-cpux";
++		regulator-type = "voltage";
++		regulator-boot-on;
++		regulator-always-on;
++		regulator-min-microvolt = <1100000>;
++		regulator-max-microvolt = <1300000>;
++		regulator-ramp-delay = <50>; /* 4ms */
++
++		gpios = <&r_pio 0 1 GPIO_ACTIVE_HIGH>; /* PL1 */
++		enable-active-high;
++		gpios-states = <0x1>;
++		states = <1100000 0>, <1300000 1>;
++	};
++
++	reg_vcc_dram: vcc-dram {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc-dram";
++		regulator-min-microvolt = <1500000>;
++		regulator-max-microvolt = <1500000>;
++		regulator-always-on;
++		regulator-boot-on;
++		enable-active-high;
++		gpio = <&r_pio 0 9 GPIO_ACTIVE_HIGH>; /* PL9 */
++		vin-supply = <&reg_vcc5v0>;
++	};
++
++	reg_vcc1v2: vcc1v2 {
++		compatible = "regulator-fixed";
++		regulator-name = "vcc1v2";
++		regulator-min-microvolt = <1200000>;
++		regulator-max-microvolt = <1200000>;
++		regulator-always-on;
++		regulator-boot-on;
++		enable-active-high;
++		gpio = <&r_pio 0 8 GPIO_ACTIVE_HIGH>; /* PL8 */
++		vin-supply = <&reg_vcc5v0>;
++	};
++
++	poweroff {
++		compatible = "regulator-poweroff";
++		cpu-supply = <&reg_vcc1v2>;
++	};
++
++	wifi_pwrseq: wifi_pwrseq {
++		compatible = "mmc-pwrseq-simple";
++		reset-gpios = <&r_pio 0 7 GPIO_ACTIVE_LOW>; /* PL7 */
++		clocks = <&rtc 1>;
++		clock-names = "ext_clock";
++	};
++};
++
++&cpu0 {
++	cpu-supply = <&reg_vdd_cpux>;
++};
++
++&de {
++	status = "okay";
++};
++
++&ehci0 {
++	status = "okay";
++};
++
++&emac {
++	phy-handle = <&int_mii_phy>;
++	phy-mode = "mii";
++	allwinner,leds-active-low;
++	status = "okay";
++};
++
++&hdmi {
++	status = "okay";
++};
++
++&hdmi_out {
++	hdmi_out_con: endpoint {
++		remote-endpoint = <&hdmi_con_in>;
++	};
++};
++
++&mmc0 {
++	vmmc-supply = <&reg_vcc3v3>;
++	bus-width = <4>;
++	/*
++	 * On the production batch of this board the card detect GPIO is
++	 * high active (card inserted), although on the early samples it's
++	 * low active.
++	 */
++	cd-gpios = <&pio 5 6 GPIO_ACTIVE_HIGH>; /* PF6 */
++	status = "okay";
++};
++
++&mmc1 {
++	vmmc-supply = <&reg_vcc3v3>;
++	vqmmc-supply = <&reg_vcc3v3>;
++	mmc-pwrseq = <&wifi_pwrseq>;
++	bus-width = <4>;
++	non-removable;
++	status = "okay";
++
++	brcmf: wifi at 1 {
++		reg = <1>;
++		compatible = "brcm,bcm4329-fmac";
++		interrupt-parent = <&pio>;
++		interrupts = <6 10 IRQ_TYPE_LEVEL_LOW>; /* PG10 / EINT10 */
++		interrupt-names = "host-wake";
++	};
++};
++
++&ohci0 {
++	status = "okay";
++};
++
++&uart0 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart0_pa_pins>;
++	status = "okay";
++};
++
++&uart1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&uart1_pins>, <&uart1_rts_cts_pins>;
++	uart-has-rtscts;
++	status = "okay";
++
++	bluetooth {
++		compatible = "brcm,bcm43438-bt";
++		max-speed = <1500000>;
++		clocks = <&rtc 1>;
++		clock-names = "lpo";
++		vbat-supply = <&reg_vcc3v3>;
++		vddio-supply = <&reg_vcc3v3>;
++		device-wakeup-gpios = <&pio 6 13 GPIO_ACTIVE_HIGH>; /* PG13 */
++		host-wakeup-gpios = <&pio 6 11 GPIO_ACTIVE_HIGH>; /* PG11 */
++		shutdown-gpios = <&pio 6 12 GPIO_ACTIVE_HIGH>; /* PG12 */
++	};
++
++};
++
++&pio {
++	gpio-line-names =
++		/* PA */
++		"CON2-P13", "CON2-P11", "CON2-P22", "CON2-P15",
++			"CON3-P03", "CON3-P02", "CON2-P07", "CON2-P29",
++		"CON2-P31", "CON2-P33", "CON2-P35", "CON2-P05",
++			"CON2-P03", "CON2-P08", "CON2-P10", "CON2-P16",
++		"CON2-P12", "CON2-P37", "CON2-P28", "CON2-P27",
++			"CON2-P40", "CON2-P38", "", "",
++		"", "", "", "", "", "", "", "",
++
++		/* PB */
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++
++		/* PC */
++		"CON2-P19", "CON2-P21", "CON2-P23", "CON2-P24",
++			"CON2-P18", "", "", "CON2-P26",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++
++		/* PD */
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "CSI-PWR-EN", "",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++
++		/* PE */
++		"CN3-P17", "CN3-P13", "CN3-P09", "CN3-P07",
++			"CN3-P19", "CN3-P21", "CN3-P22", "CN3-P20",
++		"CN3-P18", "CN3-P16", "CN3-P14", "CN3-P12",
++			"CN3-P05", "CN3-P03", "CN3-P06", "CN3-P08",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++
++		/* PF */
++		"SDC0-D1", "SDC0-D0", "SDC0-CLK", "SDC0-CMD", "SDC0-D3",
++			"SDC0-D2", "SDC0-DET", "",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++
++		/* PG */
++		"WL-SDIO-CLK", "WL-SDIO-CMD", "WL-SDIO-D0", "WL-SDIO-D1",
++			"WL-SDIO-D2", "WL-SDIO-D3", "BT-UART-TX", "BT-UART-RX",
++		"BT-UART-RTS", "BT-UART-CTS", "WL-WAKE-AP", "BT-WAKE-AP",
++			"BT-RST-N", "AP-WAKE-BT", "", "",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "";
++};
++
++&r_pio {
++	gpio-line-names =
++		/* PL */
++		"", "CPUX-SET", "CON2-P32", "POWER-KEY", "CON2-P36",
++			"VCC-IO-EN", "USB0-ID", "WL-PWR-EN",
++		"PWR-STB", "PWR-DRAM", "PWR-LED", "IR-RX", "", "", "", "",
++		"", "", "", "", "", "", "", "",
++		"", "", "", "", "", "", "", "";
++};
++
++&usb_otg {
++	dr_mode = "otg";
++	status = "okay";
++};
++
++&usbphy {
++	usb0_id_det-gpios = <&r_pio 0 6 GPIO_ACTIVE_HIGH>; /* PL6 */
++	/*
++	 * There're two micro-USB connectors, one is power-only and another is
++	 * OTG. The Vbus of these two connectors are connected together, so
++	 * the external USB device will be powered just by the power input
++	 * from the power-only USB port.
++	 */
++	status = "okay";
++};
diff --git a/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch b/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch
new file mode 100644
index 0000000000..68ec333e37
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/430-arm64-dts-allwinner-a64-olinuxino-add-status-LED-ali.patch
@@ -0,0 +1,32 @@
+From 0000000000000000000000000000000000000000 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Petr=20=C5=A0tetiar?= <ynezz at true.cz>
+Date: Thu, 26 Mar 2020 10:09:19 +0100
+Subject: [PATCH] arm64: dts: allwinner: a64: olinuxino: add status LED aliases
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Petr ?tetiar <ynezz at true.cz>
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-olinuxino.dts
+@@ -15,6 +15,10 @@
+ 	aliases {
+ 		ethernet0 = &emac;
+ 		serial0 = &uart0;
++		led-boot = &led_user;
++		led-failsafe = &led_user;
++		led-running = &led_user;
++		led-upgrade = &led_user;
+ 	};
+ 
+ 	chosen {
+@@ -35,7 +39,7 @@
+ 	leds {
+ 		compatible = "gpio-leds";
+ 
+-		led-0 {
++		led_user: led-0 {
+ 			label = "a64-olinuxino:red:user";
+ 			gpios = <&pio 4 17 GPIO_ACTIVE_HIGH>; /* PE17 */
+ 		};
diff --git a/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch b/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch
new file mode 100644
index 0000000000..8670d06109
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/431-arm64-dts-allwinner-nanopi-r1s-h5-add-status-LED.patch
@@ -0,0 +1,35 @@
+From 1845163a052efac124f00656eb72f38947630a42 Mon Sep 17 00:00:00 2001
+From: Chukun Pan <amadeus at jmu.edu.cn>
+Date: Sun, 10 Oct 2021 21:50:18 +0800
+Subject: [PATCH] arm64: dts: allwinner: NanoPi R1S H5: add status LED aliases
+
+Use the SYS LED on the casing for showing system status.
+
+Signed-off-by: Chukun Pan <amadeus at jmu.edu.cn>
+---
+ arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts | 7 ++++++-
+ 1 file changed, 6 insertions(+), 1 deletion(-)
+
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h5-nanopi-r1s-h5.dts
+@@ -23,6 +23,11 @@
+ 		ethernet0 = &emac;
+ 		ethernet1 = &rtl8189etv;
+ 		serial0 = &uart0;
++
++		led-boot = &led_sys;
++		led-failsafe = &led_sys;
++		led-running = &led_sys;
++		led-upgrade = &led_sys;
+ 	};
+ 
+ 	chosen {
+@@ -38,7 +43,7 @@
+ 			gpios = <&pio 0 9 GPIO_ACTIVE_HIGH>;
+ 		};
+ 
+-		led-1 {
++		led_sys: led-1 {
+ 			function = LED_FUNCTION_STATUS;
+ 			color = <LED_COLOR_ID_RED>;
+ 			gpios = <&pio 0 10 GPIO_ACTIVE_HIGH>;
diff --git a/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch b/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch
new file mode 100644
index 0000000000..76a73ee1f0
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/442-arm64-dts-orangepi-one-plus-enable-PWM.patch
@@ -0,0 +1,10 @@
+--- a/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-h6-orangepi-one-plus.dts
+@@ -41,3 +41,7 @@
+ 		reg = <1>;
+ 	};
+ };
++
++&pwm {
++	status = "okay";
++};
diff --git a/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch b/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch
new file mode 100644
index 0000000000..3876852c2b
--- /dev/null
+++ b/target/linux/sunxi/patches-6.1/450-arm64-dts-enable-wifi-on-pine64-boards.patch
@@ -0,0 +1,72 @@
+--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-sopine-baseboard.dts
+@@ -42,6 +42,11 @@
+ 		regulator-min-microvolt = <1800000>;
+ 		regulator-max-microvolt = <1800000>;
+ 	};
++
++	wifi_pwrseq: wifi_pwrseq {
++		compatible = "mmc-pwrseq-simple";
++		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
++	};
+ };
+ 
+ &ac_power_supply {
+@@ -102,6 +107,21 @@
+ 		reg = <1>;
+ 	};
+ };
++
++&mmc1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc1_pins>;
++	vmmc-supply = <&reg_dldo4>;
++	vqmmc-supply = <&reg_eldo1>;
++	mmc-pwrseq = <&wifi_pwrseq>;
++	bus-width = <4>;
++	non-removable;
++	status = "okay";
++
++	rtl8723cs: wifi at 1 {
++		reg = <1>;
++	};
++};
+ 
+ &mmc2 {
+ 	pinctrl-names = "default";
+--- a/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
++++ b/arch/arm64/boot/dts/allwinner/sun50i-a64-pine64.dts
+@@ -35,6 +35,11 @@
+ 			};
+ 		};
+ 	};
++
++	wifi_pwrseq: wifi_pwrseq {
++		compatible = "mmc-pwrseq-simple";
++		reset-gpios = <&r_pio 0 2 GPIO_ACTIVE_LOW>; /* PL2 */
++	};
+ };
+ 
+ &codec {
+@@ -124,6 +129,21 @@
+ 	status = "okay";
+ };
+ 
++&mmc1 {
++	pinctrl-names = "default";
++	pinctrl-0 = <&mmc1_pins>;
++	vmmc-supply = <&reg_dldo4>;
++	vqmmc-supply = <&reg_eldo1>;
++	mmc-pwrseq = <&wifi_pwrseq>;
++	bus-width = <4>;
++	non-removable;
++	status = "okay";
++
++	rtl8723cs: wifi at 1 {
++		reg = <1>;
++	};
++};
++
+ &ohci0 {
+ 	status = "okay";
+ };



From lede-commits at lists.infradead.org  Thu Apr 25 12:33:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 15:33:20 -0400
Subject: [openwrt/openwrt]  uboot-envtools: add env settings for Edgerouter-X
In-Reply-To: <171407360058.4119211.890027887899549793@git-01.infra.openwrt.org>
References: <171407360058.4119211.890027887899549793@git-01.infra.openwrt.org>
Message-ID: <mailman.30973.1714073605.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/99eb0d0e33d1541906af8c0143a8000d6ba4ba25

commit 99eb0d0e33d1541906af8c0143a8000d6ba4ba25
Author: Tim Lunn <tim at feathertop.org>
AuthorDate: Mon Apr 22 20:53:50 2024 +1000

    uboot-envtools: add env settings for Edgerouter-X
    
    uboot-envtools is currently missing config for Edgerouter-X
    and its not immediately obvious what settings to manually
    apply.
    
    Provide default configuration for envtools on Edgerouter-X.
    
    Signed-off-by: Tim Lunn <tim at feathertop.org>
---
 package/boot/uboot-envtools/files/ramips | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/package/boot/uboot-envtools/files/ramips b/package/boot/uboot-envtools/files/ramips
index 317121f2be..b0c22827eb 100644
--- a/package/boot/uboot-envtools/files/ramips
+++ b/package/boot/uboot-envtools/files/ramips
@@ -100,7 +100,9 @@ linksys,ea7300-v2|\
 linksys,ea7500-v2|\
 linksys,ea8100-v1|\
 linksys,ea8100-v2|\
-mts,wg430223)
+mts,wg430223|\
+ubnt,edgerouter-x|\
+ubnt,edgerouter-x-sfp)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x1000" "0x20000"
 	;;
 snr,snr-cpe-me1|\



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:29 -0400
Subject: [openwrt/openwrt]  gettext-full: update to 0.22.5
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.30993.1714079431.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/098bde1f3ebee9b5f302924474a99c00d6cc0242

commit 098bde1f3ebee9b5f302924474a99c00d6cc0242
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Wed Mar 6 05:35:10 2024 -0800

    gettext-full: update to 0.22.5
    
    Release Announcement:
    https://savannah.gnu.org/news/?group_id=425
    
    Refresh:
    - 200-libunistring-missing-link.patch
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 package/libs/gettext-full/Makefile                                  | 6 +++---
 .../libs/gettext-full/patches/200-libunistring-missing-link.patch   | 4 ++--
 2 files changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/libs/gettext-full/Makefile b/package/libs/gettext-full/Makefile
index 94b973d5c1..0a7782c1f1 100644
--- a/package/libs/gettext-full/Makefile
+++ b/package/libs/gettext-full/Makefile
@@ -8,12 +8,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gettext-full
-PKG_VERSION:=0.21.1
-PKG_RELEASE:=2
+PKG_VERSION:=0.22.5
+PKG_RELEASE:=1
 
 PKG_SOURCE:=gettext-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/gettext
-PKG_HASH:=50dbc8f39797950aa2c98e939947c527e5ac9ebd2c1b99dd7b06ba33a6767ae6
+PKG_HASH:=fe10c37353213d78a5b83d48af231e005c4da84db5ce88037d88355938259640
 PKG_BUILD_DIR:=$(BUILD_DIR)/gettext-$(PKG_VERSION)
 HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/gettext-$(PKG_VERSION)
 
diff --git a/package/libs/gettext-full/patches/200-libunistring-missing-link.patch b/package/libs/gettext-full/patches/200-libunistring-missing-link.patch
index 2e1dbf84e8..19a1ae177f 100644
--- a/package/libs/gettext-full/patches/200-libunistring-missing-link.patch
+++ b/package/libs/gettext-full/patches/200-libunistring-missing-link.patch
@@ -1,6 +1,6 @@
 --- a/autogen.sh
 +++ b/autogen.sh
-@@ -78,6 +78,7 @@ if ! $skip_gnulib; then
+@@ -81,6 +81,7 @@ if ! $skip_gnulib; then
      getopt-gnu
      gettext-h
      havelib
@@ -10,7 +10,7 @@
      progname
 --- a/gettext-runtime/src/Makefile.am
 +++ b/gettext-runtime/src/Makefile.am
-@@ -40,7 +40,7 @@ envsubst_SOURCES = envsubst.c
+@@ -43,7 +43,7 @@ envsubst_SOURCES = envsubst.c
  
  # Link dependencies.
  # Need @LTLIBICONV@ because striconv.c uses iconv().



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:33 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:33 -0400
Subject: [openwrt/openwrt]  tools/elfutils: update to 1.91
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.30994.1714079431.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b6f025b42429ec809afeb0956b35535c248b6c1b

commit b6f025b42429ec809afeb0956b35535c248b6c1b
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Sun Mar 3 21:04:36 2024 -0800

    tools/elfutils: update to 1.91
    
    Release Notes:
    https://sourceware.org/pipermail/elfutils-devel/2024q1/006876.html
    
    Manually refresh:
    - 100-portability.patch
    
    Change:
    - replace libgen.h with gnulib "dirname" module for compilation errors:
        In file included from ./../libdw/libdwP.h:38,
                         from eblobjnote.c:42:
        /usr/include/libgen.h:35:9: error: attempt to use poisoned "basename"
           35 | #define basename        __xpg_basename
              |         ^
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Co-Developed-by: Nick Hainke <vincent at systemli.org>
    Signed-off-by: Nick Hainke <vincent at systemli.org>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/elfutils/Makefile                      |  6 +--
 tools/elfutils/patches/100-portability.patch | 79 ++++++++++++++++++++++------
 2 files changed, 65 insertions(+), 20 deletions(-)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index a701827248..adf8770783 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -3,12 +3,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=elfutils
-PKG_VERSION:=0.189
+PKG_VERSION:=0.191
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
-PKG_HASH:=39bd8f1a338e2b7cd4abc3ff11a0eddc6e690f69578a57478d8179b4148708c8
+PKG_HASH:=df76db71366d1d708365fc7a6c60ca48398f14367eb2b8954efc8897147ad871
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_LICENSE_FILES:=COPYING COPYING-GPLV2 COPYING-LGPLV3
@@ -43,7 +43,7 @@ endif
 
 Hooks/HostConfigure/Pre := Host/Gnulib $(Hooks/HostConfigure/Pre)
 define Host/Gnulib
-	cd $(HOST_BUILD_DIR); $(STAGING_DIR_HOST)/bin/gnulib-tool --libtool --source-base=libgnu --import argp obstack fts strchrnul progname tsearch;
+	cd $(HOST_BUILD_DIR); $(STAGING_DIR_HOST)/bin/gnulib-tool --libtool --source-base=libgnu --import argp dirname fts obstack progname strchrnul tsearch;
 	ln -sf ../lib/eu-config.h $(HOST_BUILD_DIR)/libgnu/;
 endef
 
diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch
index 0d650549ee..0a3dd63a85 100644
--- a/tools/elfutils/patches/100-portability.patch
+++ b/tools/elfutils/patches/100-portability.patch
@@ -2,7 +2,7 @@
 +++ b/configure.ac
 @@ -20,6 +20,7 @@ dnl  You should have received a copy of
  dnl  along with this program.  If not, see <http://www.gnu.org/licenses/>.
- AC_INIT([elfutils],[0.189],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
+ AC_INIT([elfutils],[0.191],[https://sourceware.org/bugzilla],[elfutils],[http://elfutils.org/])
  
 +AC_CONFIG_MACRO_DIRS([m4])
  dnl Workaround for older autoconf < 2.64
@@ -15,7 +15,7 @@
 -AC_CONFIG_FILES([config/Makefile])
 +AC_CONFIG_FILES([config/Makefile libgnu/Makefile])
  
- AC_COPYRIGHT([Copyright (C) 1996-2023 The elfutils developers.])
+ AC_COPYRIGHT([Copyright (C) 1996-2024 The elfutils developers.])
 -AC_PREREQ(2.63)			dnl Minimum Autoconf version required.
 +AC_PREREQ(2.64)			dnl Minimum Autoconf version required.
  
@@ -99,7 +99,7 @@
 -	  libasm debuginfod src po doc tests
 +SUBDIRS = libgnu config lib libelf libcpu backends libebl libdwelf libdwfl libdw
  
- EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING \
+ EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING SECURITY \
 -	     COPYING COPYING-GPLV2 COPYING-LGPLV3
 +	     COPYING COPYING-GPLV2 COPYING-LGPLV3 \
 +		 m4/gnulib-cache.m4
@@ -144,8 +144,8 @@
  write_file (Elf *elf, int64_t size, int change_bo, size_t shnum)
 --- a/lib/eu-config.h
 +++ b/lib/eu-config.h
-@@ -52,14 +52,18 @@
- # define rwlock_unlock(lock) ((void) (lock))
+@@ -59,14 +59,18 @@
+ # define once(once_control, init_routine)	init_routine()
  #endif	/* USE_LOCKS */
  
 -#include <libintl.h>
@@ -164,7 +164,7 @@
  
  #ifdef __i386__
  # define internal_function __attribute__ ((regparm (3), stdcall))
-@@ -70,12 +74,7 @@
+@@ -77,12 +81,7 @@
  #define internal_strong_alias(name, aliasname) \
    extern __typeof (name) aliasname __attribute__ ((alias (#name))) internal_function;
  
@@ -177,7 +177,7 @@
  
  #ifdef HAVE_GCC_STRUCT
  #define attribute_packed \
-@@ -159,7 +158,7 @@ asm (".section predict_data, \"aw\"; .pr
+@@ -166,7 +165,7 @@ asm (".section predict_data, \"aw\"; .pr
  #endif
  
  /* Avoid PLT entries.  */
@@ -597,7 +597,7 @@
  
  modules = i386 sh x86_64 ia64 alpha arm aarch64 sparc ppc ppc64 s390 \
  	  m68k bpf riscv csky loongarch arc
-@@ -100,17 +100,13 @@ loongarch_SRCS = loongarch_init.c loonga
+@@ -102,17 +102,13 @@ loongarch_SRCS = loongarch_init.c loonga
  
  arc_SRCS = arc_init.c arc_symbol.c
  
@@ -779,7 +779,7 @@
 +++ b/src/Makefile.am
 @@ -29,9 +29,9 @@ bin_PROGRAMS = readelf nm size strip elf
  	       elfcmp objdump ranlib strings ar unstrip stack elfcompress \
- 	       elfclassify
+ 	       elfclassify srcfiles
  
 -noinst_LIBRARIES = libar.a
 +noinst_LTLIBRARIES = libar.la
@@ -789,30 +789,41 @@
  
  EXTRA_DIST = arlib.h debugpred.h
  
-@@ -39,17 +39,11 @@ bin_SCRIPTS = make-debug-archive
+@@ -39,27 +39,16 @@ bin_SCRIPTS = make-debug-archive
  EXTRA_DIST += make-debug-archive.in
  CLEANFILES += make-debug-archive
  
 -if BUILD_STATIC
 -libasm = ../libasm/libasm.a
 -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) -ldl -lpthread
--libelf = ../libelf/libelf.a -lz
+-libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
++libasm = ../libasm/libasm.la
++libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) -ldl -lpthread
++libelf = ../libelf/libelf.la -lz $(zstd_LIBS)
+ if LIBDEBUGINFOD
+-libdebuginfod = ../debuginfod/libdebuginfod.a -lpthread $(libcurl_LIBS)
++libdebuginfod = ../debuginfod/libdebuginfod.la -lpthread $(libcurl_LIBS)
+ else
+ libdebuginfod =
+ endif
 -else
 -libasm = ../libasm/libasm.so
 -libdw = ../libdw/libdw.so
 -libelf = ../libelf/libelf.so
+-if LIBDEBUGINFOD
+-libdebuginfod = ../debuginfod/libdebuginfod.so
+-else
+-libdebuginfod =
+-endif
 -endif
 -libebl = ../libebl/libebl.a ../backends/libebl_backends.a ../libcpu/libcpu.a
 -libeu = ../lib/libeu.a
-+libasm = ../libasm/libasm.la
-+libdw = ../libdw/libdw.la -lz $(zip_LIBS) $(libelf) -ldl -lpthread
-+libelf = ../libelf/libelf.la
 +libebl = ../libebl/libebl.la ../backends/libebl_backends.la ../libcpu/libcpu.la
 +libeu = ../lib/libeu.la
  
  if DEMANGLE
  demanglelib = -lstdc++
-@@ -77,9 +71,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $
+@@ -87,9 +76,9 @@ findtextrel_LDADD = $(libdw) $(libelf) $
  addr2line_LDADD = $(libdw) $(libelf) $(libeu) $(argp_LDADD) $(demanglelib)
  elfcmp_LDADD = $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
  objdump_LDADD  = $(libasm) $(libebl) $(libdw) $(libelf) $(libeu) $(argp_LDADD)
@@ -826,13 +837,13 @@
  elfcompress_LDADD = $(libebl) $(libelf) $(libdw) $(libeu) $(argp_LDADD)
 --- a/tests/Makefile.am
 +++ b/tests/Makefile.am
-@@ -662,17 +662,11 @@ installcheck-local:
+@@ -689,17 +689,11 @@ installcheck-local:
  		TESTS_ENVIRONMENT="$(installed_TESTS_ENVIRONMENT)" \
  		LOG_COMPILER="$(installed_LOG_COMPILER)" check-TESTS
  
 -if BUILD_STATIC
 -libdw = ../libdw/libdw.a -lz $(zip_LIBS) $(libelf) $(libebl) -ldl -lpthread
--libelf = ../libelf/libelf.a -lz
+-libelf = ../libelf/libelf.a -lz $(zstd_LIBS)
 -libasm = ../libasm/libasm.a
 -else
 -libdw = ../libdw/libdw.so
@@ -908,3 +919,37 @@
  Cflags: -I${includedir}
  
  Requires.private: zlib @LIBZSTD@
+--- a/lib/next_prime.c
++++ b/lib/next_prime.c
+@@ -27,6 +27,7 @@
+    the GNU Lesser General Public License along with this program.  If
+    not, see <http://www.gnu.org/licenses/>.  */
+
++#include <config.h>
+ #include <stddef.h>
+
+
+--- a/libdw/libdwP.h
++++ b/libdw/libdwP.h
+@@ -35,7 +35,7 @@
+ #include <libeu.h>
+ #include <libdw.h>
+ #include <dwarf.h>
+-#include <libgen.h>
++#include <dirname.h>
+
+
+ /* Known location expressions already decoded.  */
+
+--- a/libdwfl/libdwflP.h
++++ b/libdwfl/libdwflP.h
+@@ -32,7 +32,7 @@
+ #include <libdwfl.h>
+ #include <libebl.h>
+ #include <libeu.h>
+-#include <libgen.h>
++#include <dirname.h>
+ #include <assert.h>
+ #include <dirent.h>
+ #include <errno.h>
+



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:24 -0400
Subject: [openwrt/openwrt]  host-build: fix stampfile name substitution per
 installed binaries
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.30995.1714079436.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5a028a8d737b669d0d30d1ef93981e10f585a0e7

commit 5a028a8d737b669d0d30d1ef93981e10f585a0e7
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Thu Apr 4 02:11:28 2024 -0400

    host-build: fix stampfile name substitution per installed binaries
    
    A funny bug was discovered where if the buildroot's path
    has the name of the build target within it, it will also be substituted
    along with the stampfile's name for each program,
    causing an attempt to touch a file in a directory that doesn't exist.
    
    ...
    ...
    touch: cannot touch '/Volumes/touch/openwrt/staging_dir/host/stamp/.touch_installed': No such file or directory
    touch: cannot touch '/Volumes/ln/openwrt/staging_dir/host/stamp/.ln_installed': No such file or directory
    touch: cannot touch '/Volumes/chown/openwrt/staging_dir/host/stamp/.chown_installed': No such file or directory
    make[2]: *** [Makefile:50: /Volumes/coreutils/openwrt/staging_dir/host/stamp/.coreutils_installed] Error 1
    ...
    ...
    
    Split up the path with $(dir) and $(notdir) before substitution to fix
    the syntax.
    
    Reported-by: Georgi Valkov <gvalkov at gmail.com>
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 include/host-build.mk | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/include/host-build.mk b/include/host-build.mk
index dba6b819da..819fff5664 100644
--- a/include/host-build.mk
+++ b/include/host-build.mk
@@ -26,7 +26,7 @@ HOST_STAMP_CONFIGURED:=$(HOST_BUILD_DIR)/.configured
 HOST_STAMP_BUILT:=$(HOST_BUILD_DIR)/.built
 HOST_BUILD_PREFIX?=$(if $(IS_PACKAGE_BUILD),$(STAGING_DIR_HOSTPKG),$(STAGING_DIR_HOST))
 HOST_STAMP_INSTALLED:=$(HOST_BUILD_PREFIX)/stamp/.$(PKG_NAME)_installed
-HOST_STAMP_PROGRAMS:=$(foreach program,$(PKG_PROGRAMS),$(subst $(PKG_NAME),$(program),$(HOST_STAMP_INSTALLED)) )
+HOST_STAMP_PROGRAMS:=$(foreach program,$(PKG_PROGRAMS),$(dir $(HOST_STAMP_INSTALLED))$(subst $(PKG_NAME),$(program),$(notdir $(HOST_STAMP_INSTALLED))) )
 
 override MAKEFLAGS=
 



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:27 -0400
Subject: [openwrt/openwrt]  tools/gnulib: add macros to skip reallocarray()
 functions
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.30996.1714079436.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5ade7ee60ef726869d421673afc9aee97e851772

commit 5ade7ee60ef726869d421673afc9aee97e851772
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Sat Apr 13 15:04:54 2024 -0400

    tools/gnulib: add macros to skip reallocarray() functions
    
    For modules that depend on the reallocarray module, like ialloc, xalloc,
    and safe-alloc, it was not possible to skip importing the reallocarray
    module as they all contained at least one function that called
    reallocarray() and would cause build failure if the host system didn't
    declare it.
    
    This upstreamable patch adds macros that toggle whether to define
    functions that depend on reallocarray() based on whether the reallocarray
    module is being imported.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/gnulib/patches/160-flag-reallocarray.patch | 115 +++++++++++++++++++++++
 1 file changed, 115 insertions(+)

diff --git a/tools/gnulib/patches/160-flag-reallocarray.patch b/tools/gnulib/patches/160-flag-reallocarray.patch
new file mode 100644
index 0000000000..8ffe273e11
--- /dev/null
+++ b/tools/gnulib/patches/160-flag-reallocarray.patch
@@ -0,0 +1,115 @@
+--- a/lib/ialloc.h
++++ b/lib/ialloc.h
+@@ -106,6 +106,8 @@ icalloc (idx_t n, idx_t s)
+   return calloc (n, s);
+ }
+ 
++#if GNULIB_REALLOCARRAY
++
+ /* ireallocarray (ptr, num, size) is like reallocarray (ptr, num, size).
+    It returns a non-NULL pointer to num * size bytes of memory.
+    Upon failure, it returns NULL with errno set.  */
+@@ -131,6 +133,8 @@ ireallocarray (void *p, idx_t n, idx_t s
+     return _gl_alloc_nomem ();
+ }
+ 
++#endif /* GNULIB_REALLOCARRAY */
++
+ #ifdef __cplusplus
+ }
+ #endif
+--- a/lib/xmalloc.c
++++ b/lib/xmalloc.c
+@@ -51,12 +51,16 @@ ximalloc (idx_t s)
+   return nonnull (imalloc (s));
+ }
+ 
++#if GNULIB_REALLOCARRAY
++
+ char *
+ xcharalloc (size_t n)
+ {
+   return XNMALLOC (n, char);
+ }
+ 
++#endif /* GNULIB_REALLOCARRAY */
++
+ /* Change the size of an allocated block of memory P to S bytes,
+    with error checking.  */
+ 
+@@ -75,6 +79,8 @@ xirealloc (void *p, idx_t s)
+   return nonnull (irealloc (p, s));
+ }
+ 
++#if GNULIB_REALLOCARRAY
++
+ /* Change the size of an allocated block of memory P to an array of N
+    objects each of S bytes, with error checking.  */
+ 
+@@ -205,6 +211,8 @@ x2nrealloc (void *p, size_t *pn, size_t
+   return p;
+ }
+ 
++#endif /* GNULIB_REALLOCARRAY */
++
+ /* Grow PA, which points to an array of *PN items, and return the
+    location of the reallocated array, updating *PN to reflect its
+    new size.  The new array will contain at least N_INCR_MIN more
+--- a/lib/xalloc.h
++++ b/lib/xalloc.h
+@@ -129,6 +129,7 @@ char *xstrdup (char const *str)
+ # define XCALLOC(n, t) \
+     ((t *) (sizeof (t) == 1 ? xzalloc (n) : xcalloc (n, sizeof (t))))
+ 
++# if GNULIB_REALLOCARRAY
+ 
+ /* Allocate an array of N objects, each with S bytes of memory,
+    dynamically, with error checking.  S must be nonzero.  */
+@@ -156,6 +157,8 @@ char *xcharalloc (size_t n)
+   _GL_ATTRIBUTE_MALLOC _GL_ATTRIBUTE_DEALLOC_FREE
+   _GL_ATTRIBUTE_ALLOC_SIZE ((1)) _GL_ATTRIBUTE_RETURNS_NONNULL;
+ 
++# endif /* GNULIB_REALLOCARRAY */
++
+ #endif /* GNULIB_XALLOC */
+ 
+ 
+--- a/lib/safe-alloc.h
++++ b/lib/safe-alloc.h
+@@ -36,6 +36,8 @@ _GL_INLINE_HEADER_BEGIN
+ # define SAFE_ALLOC_INLINE _GL_INLINE
+ #endif
+ 
++#if GNULIB_REALLOCARRAY
++
+ /* Don't call these directly - use the macros below.  */
+ SAFE_ALLOC_INLINE void *
+ safe_alloc_realloc_n (void *ptr, size_t count, size_t size)
+@@ -51,6 +53,9 @@ safe_alloc_realloc_n (void *ptr, size_t
+ #endif
+   return ptr;
+ }
++
++#endif /* GNULIB_REALLOCARRAY */
++
+ _GL_ATTRIBUTE_NODISCARD SAFE_ALLOC_INLINE int
+ safe_alloc_check (void *ptr)
+ {
+@@ -84,6 +89,8 @@ safe_alloc_check (void *ptr)
+ #define ALLOC_N(ptr, count) \
+   safe_alloc_check ((ptr) = calloc (count, sizeof *(ptr)))
+ 
++#if GNULIB_REALLOCARRAY
++
+ /**
+  * ALLOC_N_UNINITIALIZED:
+  * @ptr: pointer to allocated memory
+@@ -112,6 +119,8 @@ safe_alloc_check (void *ptr)
+ #define REALLOC_N(ptr, count) \
+   safe_alloc_check ((ptr) = safe_alloc_realloc_n (ptr, count, sizeof *(ptr)))
+ 
++#endif /* GNULIB_REALLOCARRAY */
++
+ /**
+  * FREE:
+  * @ptr: pointer holding address to be freed



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:25 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:25 -0400
Subject: [openwrt/openwrt]  tools/missing-macros: add symlinks to makeinfo
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.30997.1714079436.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cdd56fc8934142a7df68118830611617ddb5e8fc

commit cdd56fc8934142a7df68118830611617ddb5e8fc
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Mon Apr 15 21:08:06 2024 -0400

    tools/missing-macros: add symlinks to makeinfo
    
    There are other wrapper scripts released with makeinfo like texi2pdf which
    are required by the build prerequisites of some tools, and have a similar
    purpose and usage.
    
    Let the makeinfo perl script handle all of these cases.
    
    It's worth mentioning that "texi2any" is the actual program and "makeinfo"
    is one of it's aliases. From upstream GNU:
    
      makeinfo: texi2any
            rm -f $@
            -$(LN_S) texi2any $@
    
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/missing-macros/Makefile | 7 ++++++-
 1 file changed, 6 insertions(+), 1 deletion(-)

diff --git a/tools/missing-macros/Makefile b/tools/missing-macros/Makefile
index 1e423621bd..edbcb84302 100644
--- a/tools/missing-macros/Makefile
+++ b/tools/missing-macros/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=missing-macros
-PKG_RELEASE:=11
+PKG_RELEASE:=12
 
 include $(INCLUDE_DIR)/host-build.mk
 
@@ -23,6 +23,11 @@ define Host/Install
 	$(INSTALL_DATA) ./src/m4/*.m4 $(STAGING_DIR_HOST)/share/aclocal/
 	$(INSTALL_DIR) $(STAGING_DIR_HOST)/bin
 	$(INSTALL_BIN) ./src/bin/* $(STAGING_DIR_HOST)/bin/
+	$(LN) makeinfo $(STAGING_DIR_HOST)/bin/texi2any
+	$(LN) makeinfo $(STAGING_DIR_HOST)/bin/texi2pdf
+	$(LN) makeinfo $(STAGING_DIR_HOST)/bin/texi2dvi
+	$(LN) makeinfo $(STAGING_DIR_HOST)/bin/pdftexi2dvi
+	$(LN) makeinfo $(STAGING_DIR_HOST)/bin/texi2html
 endef
 
 $(eval $(call HostBuild))



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:31 -0400
Subject: [openwrt/openwrt]  tools/coreutils: update to 9.4
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31000.1714079437.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0489436506f20207dc2177fc30e84f7fb0cc9d07

commit 0489436506f20207dc2177fc30e84f7fb0cc9d07
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Mon Sep 4 18:59:51 2023 -0400

    tools/coreutils: update to 9.4
    
    Update to latest stable release.
    
    Add configure option to disable support for the Year 2038 problem.
    (for now, as some versions of GCC do not yet support it)
    
    Syncing bootstrap script fails, backport an upstream patch which can be
    removed at next coreutils update.
    
    Several headers from the stable gnulib branch cause build failure because
    the changes in the imported versions are incompatible with the Makefile
    that gets generated for coreutils. This version of coreutils was released
    after being bootstrapped and autoreconf'ed with a significantly different
    version of gnulib compared to our local gnulib, so skip importing them
    (and restore the backup).
    
    While at it, organize restoring the originally shipped version of files
    into a Make foreach function.
    
    Refresh patch:
    - 000-bootstrap.patch
    
    New patch:
    - 001-bootstrap-sync.patch
    
    Link: https://lists.gnu.org/archive/html/coreutils/2023-08/msg00099.html
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/coreutils/Makefile                         | 16 +++++-
 tools/coreutils/patches/000-bootstrap.patch      | 20 +++----
 tools/coreutils/patches/001-bootstrap-sync.patch | 73 ++++++++++++++++++++++++
 3 files changed, 96 insertions(+), 13 deletions(-)

diff --git a/tools/coreutils/Makefile b/tools/coreutils/Makefile
index 69d1dcbd37..184281f0be 100644
--- a/tools/coreutils/Makefile
+++ b/tools/coreutils/Makefile
@@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=coreutils
 PKG_CPE_ID:=cpe:/a:gnu:coreutils
-PKG_VERSION:=9.3
+PKG_VERSION:=9.4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/coreutils
-PKG_HASH:=a33d2c0bc49be3c79a4794944dcd87103bf497b53a14bafcd431c8ca53975252
+PKG_HASH:=5f600d9093973b0afe25393d9bc18c44f2232657f4ca0d95ea31c702eb66b739
 
 HOST_BUILD_PARALLEL := 1
 
@@ -22,7 +22,17 @@ include $(INCLUDE_DIR)/host-build.mk
 
 export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
 
+HOST_GNULIB_SKIP := \
+	lib/math.in.h \
+	lib/stdlib.in.h \
+	lib/string.in.h \
+	lib/uchar.in.h \
+	lib/unistd.in.h \
+	lib/wchar.in.h \
+	lib/wctype.in.h
+
 HOST_CONFIGURE_ARGS += \
+	--disable-year2038 \
 	 --enable-install-program=$(subst $(space),$(comma),$(strip $(PKG_PROGRAMS)))
 
 HOST_MAKE_FLAGS += \
@@ -50,7 +60,7 @@ endef
 
 define Host/Configure
 	$(if $(QUILT),$(call Host/Bootstrap))
-	-$(CP) $(HOST_BUILD_DIR)/lib/time.in.h~ $(HOST_BUILD_DIR)/lib/time.in.h # @GNULIB_TIME@ not defined
+	$(foreach src,$(HOST_GNULIB_SKIP),mv -f $(HOST_BUILD_DIR)/$(src)~ $(HOST_BUILD_DIR)/$(src) || true; )
 	$(call Host/Configure/Default)
 endef
 
diff --git a/tools/coreutils/patches/000-bootstrap.patch b/tools/coreutils/patches/000-bootstrap.patch
index 91be9d338a..3faaa946f1 100644
--- a/tools/coreutils/patches/000-bootstrap.patch
+++ b/tools/coreutils/patches/000-bootstrap.patch
@@ -1,6 +1,6 @@
 --- a/bootstrap
 +++ b/bootstrap
-@@ -278,7 +278,7 @@ check_exists() {
+@@ -244,7 +244,7 @@ check_exists() {
        ($2 --version </dev/null)
      fi
    else
@@ -9,7 +9,7 @@
    fi
  
    test $? -lt 126
-@@ -563,7 +563,7 @@ p
+@@ -309,7 +309,7 @@ p
  q'
  
  get_version() {
@@ -18,7 +18,7 @@
  
    $app --version >/dev/null 2>&1 || { $app --version; return 1; }
  
-@@ -620,13 +620,13 @@ check_versions() {
+@@ -366,13 +366,13 @@ check_versions() {
      if [ "$req_ver" = "-" ]; then
        # Merely require app to exist; not all prereq apps are well-behaved
        # so we have to rely on $? rather than get_version.
@@ -34,12 +34,12 @@
        if [ ! "$inst_ver" ]; then
          warn_ "Error: '$app' not found"
          ret=1
-@@ -923,7 +923,7 @@ version_controlled_file() {
- # two just-pre-run programs.
+@@ -1155,7 +1155,7 @@ autogen()
+   # two just-pre-run programs.
  
- # Import from gettext.
--with_gettext=yes
-+with_gettext=no
- grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
-     with_gettext=no
+   # Import from gettext.
+-  with_gettext=yes
++  with_gettext=no
+   grep '^[	 ]*AM_GNU_GETTEXT_VERSION(' configure.ac >/dev/null || \
+       with_gettext=no
  
diff --git a/tools/coreutils/patches/001-bootstrap-sync.patch b/tools/coreutils/patches/001-bootstrap-sync.patch
new file mode 100644
index 0000000000..1b9687733f
--- /dev/null
+++ b/tools/coreutils/patches/001-bootstrap-sync.patch
@@ -0,0 +1,73 @@
+From 9becda5d9371c16a6e5e2815c8a28158696e4a23 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P at draigBrady.com>
+Date: Sun, 10 Dec 2023 19:04:59 +0000
+Subject: build: update gnulib submodule to latest
+
+* bootstrap: Copy from latest Gnulib,
+to fix --bootstrap-sync with other options.
+---
+ bootstrap | 16 ++++++++++------
+ 1 file changed, 10 insertions(+), 6 deletions(-)
+
+(limited to 'bootstrap')
+
+--- a/bootstrap
++++ b/bootstrap
+@@ -3,7 +3,7 @@
+ 
+ # Bootstrap this package from checked-out sources.
+ 
+-scriptversion=2023-07-01.18; # UTC
++scriptversion=2023-12-10.18; # UTC
+ 
+ # Copyright (C) 2003-2023 Free Software Foundation, Inc.
+ #
+@@ -37,7 +37,7 @@ medir=`dirname "$me"`
+ 
+ # A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
+ 
+-scriptlibversion=2023-07-01.17; # UTC
++scriptlibversion=2023-12-10.18; # UTC
+ 
+ # Copyright (C) 2003-2023 Free Software Foundation, Inc.
+ #
+@@ -659,7 +659,9 @@ Optional environment variables:
+                            Use this if you already have gnulib sources
+                            and history on your machine, and do not want
+                            to waste your bandwidth downloading them again.
+-  GNULIB_URL               Cloneable URL of the gnulib repository.
++  GNULIB_URL               URL of the gnulib repository.  The default is
++                           $default_gnulib_url,
++                           which is Gnulib's upstream repository.
+ 
+ Options:
+   --bootstrap-sync         if this bootstrap script is not identical to
+@@ -775,7 +777,7 @@ autopull()
+   if $use_gnulib || $bootstrap_sync; then
+     prepare_GNULIB_SRCDIR
+     if $bootstrap_sync; then
+-      upgrade_bootstrap
++      upgrade_bootstrap "$@"
+     fi
+   fi
+ 
+@@ -1347,7 +1349,9 @@ Optional environment variables:
+                            have gnulib sources on your machine, and
+                            do not want to waste your bandwidth downloading
+                            them again.
+-  GNULIB_URL               Cloneable URL of the gnulib repository.
++  GNULIB_URL               URL of the gnulib repository.  The default is
++                           $default_gnulib_url,
++                           which is Gnulib's upstream repository.
+ 
+ Options:
+ 
+@@ -1492,7 +1496,7 @@ check_build_prerequisites $use_git
+ 
+ if $bootstrap_sync; then
+   prepare_GNULIB_SRCDIR
+-  upgrade_bootstrap
++  upgrade_bootstrap "$@"
+   # Since we have now upgraded if needed, no need to try it a second time below.
+   bootstrap_sync=false
+ fi



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:26 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:26 -0400
Subject: [openwrt/openwrt]  tools/gnulib: update to branch stable-202401
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31001.1714079437.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4de8c0e1d82275108ced490e6cb02e62c0ef2da5

commit 4de8c0e1d82275108ced490e6cb02e62c0ef2da5
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Sun Mar 3 20:15:25 2024 -0800

    tools/gnulib: update to branch stable-202401
    
    Patches refreshed automatically.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/gnulib/Makefile                    | 4 ++--
 tools/gnulib/patches/000-bootstrap.patch | 2 +-
 2 files changed, 3 insertions(+), 3 deletions(-)

diff --git a/tools/gnulib/Makefile b/tools/gnulib/Makefile
index 2ce763f6ab..5119355522 100644
--- a/tools/gnulib/Makefile
+++ b/tools/gnulib/Makefile
@@ -2,11 +2,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=gnulib
 PKG_CPE_ID:=cpe:/a:gnu:$(PKG_NAME)
-PKG_VERSION:=f9a4ee73c3e7b544f640d0d04b55983d3a7b894e# # master
+PKG_VERSION:=c99c8d491850dc3a6e0b8604a2729d8bc5c0eff1# # stable-202401
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://git.savannah.gnu.org/cgit/$(PKG_NAME).git/snapshot
-PKG_HASH:=514716d58987a9c0de0d69fb22d42bcd19edf80eed099882a004ff162060f1a8
+PKG_HASH:=8e6f4a907d9677b55fd452e1340a3e030a6f530b138d420c11975da33f086b1e
 
 include $(INCLUDE_DIR)/host-build.mk
 
diff --git a/tools/gnulib/patches/000-bootstrap.patch b/tools/gnulib/patches/000-bootstrap.patch
index 40ed41125c..120586694e 100644
--- a/tools/gnulib/patches/000-bootstrap.patch
+++ b/tools/gnulib/patches/000-bootstrap.patch
@@ -43,7 +43,7 @@
        if [ ! "$inst_ver" ]; then
          warn_ "Error: '$app' not found"
          ret=1
-@@ -1135,7 +1135,7 @@ autogen()
+@@ -1157,7 +1157,7 @@ autogen()
    # two just-pre-run programs.
  
    # Import from gettext.



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:30 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:30 -0400
Subject: [openwrt/openwrt]  tools/bison: hardcode path to m4 with
 STAGING_DIR_HOST
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31002.1714079437.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/41bc16dcc4594cd85fb87942032dcbec0ade7068

commit 41bc16dcc4594cd85fb87942032dcbec0ade7068
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Mon Apr 1 15:51:16 2024 -0400

    tools/bison: hardcode path to m4 with STAGING_DIR_HOST
    
    Force bison to ignore the M4 environment variable and hardcode it to the
    locally built m4 during build operations using the relocatable path
    variable STAGING_DIR_HOST.
    
    This allows bison to continue to function while we are forcefully avoiding
    autoreconf and other autoconf and automake-like operations by giving a
    fake path to m4 with the M4 environment variable.
    
    The specific path can still be overridden independently from the
    environment within the line of invocation that runs bison by setting
    STAGING_DIR_HOST within the command, so document this in the help printout.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/bison/patches/000-relocatable.patch | 43 +++++++++++++++++++++++++++++++
 1 file changed, 43 insertions(+)

diff --git a/tools/bison/patches/000-relocatable.patch b/tools/bison/patches/000-relocatable.patch
new file mode 100644
index 0000000000..b98d7a86dc
--- /dev/null
+++ b/tools/bison/patches/000-relocatable.patch
@@ -0,0 +1,43 @@
+--- a/src/files.c
++++ b/src/files.c
+@@ -560,9 +560,9 @@ pkgdatadir (void)
+ char const *
+ m4path (void)
+ {
+-  char const *m4 = getenv ("M4");
++  char const *m4 = getenv ("STAGING_DIR_HOST");
+   if (m4)
+-    return m4;
++    return strcat(getenv ("STAGING_DIR_HOST"), "/bin/m4");
+ 
+   /* We don't use relocate2() to store the temporary buffer and re-use
+      it, because m4path() is only called once.  */
+--- a/src/getargs.c
++++ b/src/getargs.c
+@@ -373,11 +373,13 @@ usage (int status)
+          A --long option is required.
+          Otherwise, add exceptions to ../build-aux/cross-options.pl.  */
+ 
+-      printf (_("Usage: %s [OPTION]... FILE\n"), program_name);
++      printf (_("Usage: STAGING_DIR_HOST=... %s [OPTION]... FILE\n"), program_name);
+       fputs (_("\
+ Generate a deterministic LR or generalized LR (GLR) parser employing\n\
+ LALR(1), IELR(1), or canonical LR(1) parser tables.\n\
+ \n\
++Environment Variable STAGING_DIR_HOST controls path to m4\n\
++\n\
+ "), stdout);
+ 
+       fputs (_("\
+@@ -450,6 +452,11 @@ Output Files:\n\
+   -M, --file-prefix-map=OLD=NEW replace prefix OLD with NEW when writing file paths\n\
+                                 in output files\n\
+ "), stdout);
++
++      fputs (_("\
++Environment Variables:\n\
++  STAGING_DIR_HOST              Path to m4 is [STAGING_DIR_HOST]/bin/m4\n\
++"), stdout);
+       putc ('\n', stdout);
+ 
+       argmatch_report_usage (stdout);



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:28 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:28 -0400
Subject: [openwrt/openwrt]  tools/gnulib: make tdestroy() fully portable
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31003.1714079437.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/eb726c90be67b8aa3638e2b9e988cd3865ed3b49

commit eb726c90be67b8aa3638e2b9e988cd3865ed3b49
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Mon Apr 8 03:47:23 2024 -0400

    tools/gnulib: make tdestroy() fully portable
    
    The tdestroy() function, which is a GNU extension to the standard C
    library, is defined in gnulib in tsearch.c but is missing it's
    corresponding declaration in search.in.h by being completely missing...
    
    This patch is large but upstreamable, including all of the macros and
    conditionals and configure checks that upstream GNU would expect for
    portable support, like using the @@ placeholder/substitution method to
    determine whether or not to have declarations based on whether or not
    tdestroy() is already declared within the standard headers of the default
    include paths.
    
    There were also some typedefs and aliases missing, along with the warnings
    and preprocessor exceptions that need to be added for consistency with the
    usage of the rest of the functions in the files.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/gnulib/patches/150-portable-tdestroy.patch | 193 +++++++++++++++++++++++
 1 file changed, 193 insertions(+)

diff --git a/tools/gnulib/patches/150-portable-tdestroy.patch b/tools/gnulib/patches/150-portable-tdestroy.patch
new file mode 100644
index 0000000000..39c291f196
--- /dev/null
+++ b/tools/gnulib/patches/150-portable-tdestroy.patch
@@ -0,0 +1,193 @@
+--- a/lib/search.in.h
++++ b/lib/search.in.h
+@@ -112,6 +112,11 @@ _GL_CXXALIASWARN (lsearch);
+ #   define twalk rpl_twalk
+ #  endif
+ # endif
++# if @REPLACE_TDESTROY@
++#  if !(defined __cplusplus && defined GNULIB_NAMESPACE)
++#   define tdestroy rpl_tdestroy
++#  endif
++# endif
+ 
+ /* See <https://pubs.opengroup.org/onlinepubs/9699919799/basedefs/search.h.html>
+        <https://pubs.opengroup.org/onlinepubs/9699919799/functions/tsearch.html>
+@@ -137,6 +142,7 @@ extern "C" {
+ # if !GNULIB_defined_search_fn_types
+ typedef int (*_gl_search_compar_fn) (const void *, const void *);
+ typedef void (*_gl_search_action_fn) (const void *, VISIT, int);
++typedef void (*_gl_search_free_fn) (void *);
+ #  define GNULIB_defined_search_fn_types 1
+ # endif
+ # ifdef __cplusplus
+@@ -252,9 +258,36 @@ _GL_CXXALIAS_SYS (twalk, void,
+ _GL_CXXALIASWARN (twalk);
+ # endif
+ 
++/* Removes the whole tree pointed to by root,
++   freeing all resources allocated by the tsearch() function.
++   The FREE_NODE function is called:
++     - For the data in each tree node.
++     - Even when no such work is necessary, to a function doing nothing
++   The arguments passed to FREE_NODE are:
++     1. The pointer to the data. */
++# if @REPLACE_TDESTROY@
++_GL_FUNCDECL_RPL (tdestroy, void,
++                  (void *vroot, _gl_search_free_fn freefct)
++                  _GL_ARG_NONNULL ((2)));
++_GL_CXXALIAS_RPL (tdestroy, void,
++                  (void *vroot, _gl_search_free_fn freefct));
++# else
++#  if !@HAVE_TDESTROY@
++_GL_FUNCDECL_SYS (tdestroy, void,
++                  (void *vroot, _gl_search_free_fn freefct)
++                  _GL_ARG_NONNULL ((2)));
++#  endif
++_GL_CXXALIAS_SYS (tdestroy, void,
++                  (void *vroot, _gl_search_free_fn freefct));
++# endif
++# if __GLIBC__ >= 2
++_GL_CXXALIASWARN (tdestroy);
++# endif
++
+ /* Flags used by tsearch.c.  */
+ # define GNULIB_defined_tsearch  (@REPLACE_TSEARCH@ || !@HAVE_TSEARCH@)
+ # define GNULIB_defined_twalk    (@REPLACE_TWALK@ || !@HAVE_TWALK@)
++# define GNULIB_defined_tdestroy (@REPLACE_TDESTROY@ || !@HAVE_TDESTROY@)
+ 
+ #elif defined GNULIB_POSIXCHECK
+ # undef tsearch
+@@ -277,6 +310,11 @@ _GL_WARN_ON_USE (tdelete, "tdelete is un
+ _GL_WARN_ON_USE (twalk, "twalk is unportable - "
+                  "use gnulib module tsearch for portability");
+ # endif
++# undef tdestroy
++# if HAVE_RAW_DECL_TDESTROY
++_GL_WARN_ON_USE (tdestroy, "tdestroy is unportable - "
++                 "use gnulib module tsearch for portability");
++# endif
+ #endif
+ 
+ 
+--- a/lib/tsearch.c
++++ b/lib/tsearch.c
+@@ -98,12 +98,14 @@
+ 
+ typedef int (*__compar_fn_t) (const void *, const void *);
+ typedef void (*__action_fn_t) (const void *, VISIT, int);
++typedef void (*__free_fn_t) (void *);
+ 
+ #ifndef weak_alias
+ # define __tsearch tsearch
+ # define __tfind tfind
+ # define __tdelete tdelete
+ # define __twalk twalk
++# define __tdestroy tdestroy
+ #endif
+ 
+ #ifndef internal_function
+@@ -656,7 +658,7 @@ weak_alias (__twalk, twalk)
+ #endif /* GNULIB_defined_twalk */
+ 
+ 
+-#ifdef _LIBC
++#if defined(_LIBC) || GNULIB_defined_tdestroy
+ 
+ /* The standardized functions miss an important functionality: the
+    tree cannot be removed easily.  We provide a function to do this.  */
+@@ -683,6 +685,8 @@ __tdestroy (void *vroot, __free_fn_t fre
+   if (root != NULL)
+     tdestroy_recurse (root, freefct);
+ }
++#ifdef weak_alias
+ weak_alias (__tdestroy, tdestroy)
++#endif
+ 
+-#endif /* _LIBC */
++#endif /* defined(_LIBC) || GNULIB_defined_tdestroy */
+--- a/m4/search_h.m4
++++ b/m4/search_h.m4
+@@ -39,7 +39,7 @@ AC_DEFUN_ONCE([gl_SEARCH_H],
+   dnl Check for declarations of anything we want to poison if the
+   dnl corresponding gnulib module is not in use.
+   gl_WARN_ON_USE_PREPARE([[#include <search.h>
+-    ]], [tdelete tfind tsearch twalk])
++    ]], [tdelete tfind tsearch twalk tdestroy])
+ 
+   AC_REQUIRE([AC_C_RESTRICT])
+ ])
+@@ -75,8 +75,10 @@ AC_DEFUN([gl_SEARCH_H_DEFAULTS],
+   gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_LFIND], [1])
+   gl_MODULE_INDICATOR_INIT_VARIABLE([GNULIB_MDA_LSEARCH], [1])
+   dnl Assume proper GNU behavior unless another module says otherwise.
+-  HAVE_TSEARCH=1;    AC_SUBST([HAVE_TSEARCH])
+-  HAVE_TWALK=1;      AC_SUBST([HAVE_TWALK])
+-  REPLACE_TSEARCH=0; AC_SUBST([REPLACE_TSEARCH])
+-  REPLACE_TWALK=0;   AC_SUBST([REPLACE_TWALK])
++  HAVE_TSEARCH=1;     AC_SUBST([HAVE_TSEARCH])
++  HAVE_TWALK=1;       AC_SUBST([HAVE_TWALK])
++  HAVE_TDESTROY=1;    AC_SUBST([HAVE_TDESTROY])
++  REPLACE_TSEARCH=0;  AC_SUBST([REPLACE_TSEARCH])
++  REPLACE_TWALK=0;    AC_SUBST([REPLACE_TWALK])
++  REPLACE_TDESTROY=0; AC_SUBST([REPLACE_TDESTROY])
+ ])
+--- a/m4/tsearch.m4
++++ b/m4/tsearch.m4
+@@ -9,6 +9,7 @@ AC_DEFUN([gl_FUNC_TSEARCH],
+   AC_REQUIRE([gl_SEARCH_H_DEFAULTS])
+   gl_CHECK_FUNCS_ANDROID([tsearch], [[#include <search.h>]])
+   gl_CHECK_FUNCS_ANDROID([twalk], [[#include <search.h>]])
++  gl_CHECK_FUNCS_ANDROID([tdestroy], [[#include <search.h>]])
+   if test $ac_cv_func_tsearch = yes; then
+     dnl On OpenBSD 4.0, the return value of tdelete() is incorrect.
+     AC_REQUIRE([AC_PROG_CC])
+@@ -50,6 +51,7 @@ main ()
+       *no)
+         REPLACE_TSEARCH=1
+         REPLACE_TWALK=1
++        REPLACE_TDESTROY=1
+         ;;
+     esac
+   else
+@@ -64,6 +66,12 @@ main ()
+       future*) REPLACE_TWALK=1 ;;
+     esac
+   fi
++  if test $ac_cv_func_tdestroy != yes; then
++    HAVE_TDESTROY=0
++    case "$gl_cv_onwards_func_tdestroy" in
++      future*) REPLACE_TDESTROY=1 ;;
++    esac
++  fi
+ ])
+ 
+ # Prerequisites of lib/tsearch.c.
+--- a/modules/search
++++ b/modules/search
+@@ -37,8 +37,10 @@ search.h: search.in.h $(top_builddir)/co
+ 	      -e 's/@''GNULIB_MDA_LSEARCH''@/$(GNULIB_MDA_LSEARCH)/g' \
+ 	      -e 's|@''HAVE_TSEARCH''@|$(HAVE_TSEARCH)|g' \
+ 	      -e 's|@''HAVE_TWALK''@|$(HAVE_TWALK)|g' \
++	      -e 's|@''HAVE_TDESTROY''@|$(HAVE_TDESTROY)|g' \
+ 	      -e 's|@''REPLACE_TSEARCH''@|$(REPLACE_TSEARCH)|g' \
+ 	      -e 's|@''REPLACE_TWALK''@|$(REPLACE_TWALK)|g' \
++	      -e 's|@''REPLACE_TDESTROY''@|$(REPLACE_TDESTROY)|g' \
+ 	      -e '/definitions of _GL_FUNCDECL_RPL/r $(CXXDEFS_H)' \
+ 	      -e '/definition of _GL_ARG_NONNULL/r $(ARG_NONNULL_H)' \
+ 	      -e '/definition of _GL_WARN_ON_USE/r $(WARN_ON_USE_H)' \
+--- a/modules/tsearch
++++ b/modules/tsearch
+@@ -11,7 +11,12 @@ search
+ configure.ac:
+ gl_FUNC_TSEARCH
+ gl_CONDITIONAL([GL_COND_OBJ_TSEARCH],
+-               [test $HAVE_TSEARCH = 0 || test $HAVE_TWALK = 0 || test $REPLACE_TSEARCH = 1 || test $REPLACE_TWALK = 1])
++               [test $HAVE_TSEARCH = 0 ||
++                test $HAVE_TWALK = 0 ||
++                test $HAVE_TDESTROY = 0 ||
++                test $REPLACE_TSEARCH = 1 ||
++                test $REPLACE_TWALK = 1 ||
++                test $REPLACE_TDESTROY = 1])
+ AM_COND_IF([GL_COND_OBJ_TSEARCH], [
+   gl_PREREQ_TSEARCH
+ ])



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:32 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:32 -0400
Subject: [openwrt/openwrt]  tools/coreutils: update to 9.5
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31004.1714079437.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/44625e9d95882a3d868df2c83d304fc32cc5afc0

commit 44625e9d95882a3d868df2c83d304fc32cc5afc0
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Mon Apr 1 18:36:49 2024 -0400

    tools/coreutils: update to 9.5
    
    Update to latest stable release.
    
    The following commits in gnulib caused a conflict in locally bootstrapped
    coreutils with stable gnulib:
    
      8f4b4e52c991de2233b471f8e35a068866b31f01
      2749234203959df8d72cd8638d4e00a9fff450db
    
    A module (strftime) was marked deprecated and replaced by another module
    (nstrftime) in the version of gnulib that coreutils was released with
    compared to the stable branch that we use for importing. Conflicts from
    the previous version of coreutils are now gone, so other imported headers
    are now good.
    
    Refresh patch:
     - 000-bootstrap.patch
    
    Remove upstreamed patch:
     - 001-bootstrap-sync.patch
    
    Link: https://lists.gnu.org/archive/html/coreutils/2024-03/msg00132.html
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/coreutils/Makefile                         | 14 ++---
 tools/coreutils/patches/000-bootstrap.patch      |  2 +-
 tools/coreutils/patches/001-bootstrap-sync.patch | 73 ------------------------
 3 files changed, 6 insertions(+), 83 deletions(-)

diff --git a/tools/coreutils/Makefile b/tools/coreutils/Makefile
index 184281f0be..f55fdcc1b2 100644
--- a/tools/coreutils/Makefile
+++ b/tools/coreutils/Makefile
@@ -8,11 +8,11 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=coreutils
 PKG_CPE_ID:=cpe:/a:gnu:coreutils
-PKG_VERSION:=9.4
+PKG_VERSION:=9.5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=@GNU/coreutils
-PKG_HASH:=5f600d9093973b0afe25393d9bc18c44f2232657f4ca0d95ea31c702eb66b739
+PKG_HASH:=767ae6a22950ec42f3ba5f7c1de79dd27800ee8e9b8642da5dedb5974a1741e5
 
 HOST_BUILD_PARALLEL := 1
 
@@ -23,13 +23,9 @@ include $(INCLUDE_DIR)/host-build.mk
 export GNULIB_SRCDIR:=$(HOST_GNULIB_SRCDIR)
 
 HOST_GNULIB_SKIP := \
-	lib/math.in.h \
-	lib/stdlib.in.h \
-	lib/string.in.h \
-	lib/uchar.in.h \
-	lib/unistd.in.h \
-	lib/wchar.in.h \
-	lib/wctype.in.h
+	lib/nstrftime.c \
+	lib/fprintftime.c \
+	lib/locale.in.h
 
 HOST_CONFIGURE_ARGS += \
 	--disable-year2038 \
diff --git a/tools/coreutils/patches/000-bootstrap.patch b/tools/coreutils/patches/000-bootstrap.patch
index 3faaa946f1..68db19084f 100644
--- a/tools/coreutils/patches/000-bootstrap.patch
+++ b/tools/coreutils/patches/000-bootstrap.patch
@@ -34,7 +34,7 @@
        if [ ! "$inst_ver" ]; then
          warn_ "Error: '$app' not found"
          ret=1
-@@ -1155,7 +1155,7 @@ autogen()
+@@ -1157,7 +1157,7 @@ autogen()
    # two just-pre-run programs.
  
    # Import from gettext.
diff --git a/tools/coreutils/patches/001-bootstrap-sync.patch b/tools/coreutils/patches/001-bootstrap-sync.patch
deleted file mode 100644
index 1b9687733f..0000000000
--- a/tools/coreutils/patches/001-bootstrap-sync.patch
+++ /dev/null
@@ -1,73 +0,0 @@
-From 9becda5d9371c16a6e5e2815c8a28158696e4a23 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?P=C3=A1draig=20Brady?= <P at draigBrady.com>
-Date: Sun, 10 Dec 2023 19:04:59 +0000
-Subject: build: update gnulib submodule to latest
-
-* bootstrap: Copy from latest Gnulib,
-to fix --bootstrap-sync with other options.
----
- bootstrap | 16 ++++++++++------
- 1 file changed, 10 insertions(+), 6 deletions(-)
-
-(limited to 'bootstrap')
-
---- a/bootstrap
-+++ b/bootstrap
-@@ -3,7 +3,7 @@
- 
- # Bootstrap this package from checked-out sources.
- 
--scriptversion=2023-07-01.18; # UTC
-+scriptversion=2023-12-10.18; # UTC
- 
- # Copyright (C) 2003-2023 Free Software Foundation, Inc.
- #
-@@ -37,7 +37,7 @@ medir=`dirname "$me"`
- 
- # A library of shell functions for autopull.sh, autogen.sh, and bootstrap.
- 
--scriptlibversion=2023-07-01.17; # UTC
-+scriptlibversion=2023-12-10.18; # UTC
- 
- # Copyright (C) 2003-2023 Free Software Foundation, Inc.
- #
-@@ -659,7 +659,9 @@ Optional environment variables:
-                            Use this if you already have gnulib sources
-                            and history on your machine, and do not want
-                            to waste your bandwidth downloading them again.
--  GNULIB_URL               Cloneable URL of the gnulib repository.
-+  GNULIB_URL               URL of the gnulib repository.  The default is
-+                           $default_gnulib_url,
-+                           which is Gnulib's upstream repository.
- 
- Options:
-   --bootstrap-sync         if this bootstrap script is not identical to
-@@ -775,7 +777,7 @@ autopull()
-   if $use_gnulib || $bootstrap_sync; then
-     prepare_GNULIB_SRCDIR
-     if $bootstrap_sync; then
--      upgrade_bootstrap
-+      upgrade_bootstrap "$@"
-     fi
-   fi
- 
-@@ -1347,7 +1349,9 @@ Optional environment variables:
-                            have gnulib sources on your machine, and
-                            do not want to waste your bandwidth downloading
-                            them again.
--  GNULIB_URL               Cloneable URL of the gnulib repository.
-+  GNULIB_URL               URL of the gnulib repository.  The default is
-+                           $default_gnulib_url,
-+                           which is Gnulib's upstream repository.
- 
- Options:
- 
-@@ -1492,7 +1496,7 @@ check_build_prerequisites $use_git
- 
- if $bootstrap_sync; then
-   prepare_GNULIB_SRCDIR
--  upgrade_bootstrap
-+  upgrade_bootstrap "$@"
-   # Since we have now upgraded if needed, no need to try it a second time below.
-   bootstrap_sync=false
- fi



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:38 -0400
Subject: [openwrt/openwrt]  tools/elfutils: refresh portability patch for
 macOS
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31023.1714080878.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1991bfb8143d29d619a0a389db84dcb512b9a719

commit 1991bfb8143d29d619a0a389db84dcb512b9a719
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Mon Apr 8 15:15:31 2024 -0400

    tools/elfutils: refresh portability patch for macOS
    
    Quilt refresh combined two sets of changes to the same file.
    
    The switch from using libgen.h to dirname.h because of function poisoning
    from gnulib's import of basename() was added as a new patch hunk instead
    of an edit to the original one.
    
    The original patch hunk was to fix build errors on an earlier version of
    elfutils before the "dirname" module was being imported to fix further
    build errors with the 0.191 version.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/elfutils/patches/100-portability.patch | 34 ++++------------------------
 1 file changed, 5 insertions(+), 29 deletions(-)

diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch
index 9a111c76d9..1a61455f48 100644
--- a/tools/elfutils/patches/100-portability.patch
+++ b/tools/elfutils/patches/100-portability.patch
@@ -351,7 +351,7 @@
  #include <libdwfl.h>
  #include <libebl.h>
 +#include <libeu.h>
-+#include <libgen.h>
++#include <dirname.h>
  #include <assert.h>
  #include <dirent.h>
  #include <errno.h>
@@ -373,7 +373,7 @@
 +#include <libeu.h>
  #include <libdw.h>
  #include <dwarf.h>
-+#include <libgen.h>
++#include <dirname.h>
  
  
  /* Known location expressions already decoded.  */
@@ -893,32 +893,8 @@
 @@ -27,6 +27,7 @@
     the GNU Lesser General Public License along with this program.  If
     not, see <http://www.gnu.org/licenses/>.  */
-
+ 
 +#include <config.h>
  #include <stddef.h>
-
-
---- a/libdw/libdwP.h
-+++ b/libdw/libdwP.h
-@@ -35,7 +35,7 @@
- #include <libeu.h>
- #include <libdw.h>
- #include <dwarf.h>
--#include <libgen.h>
-+#include <dirname.h>
-
-
- /* Known location expressions already decoded.  */
-
---- a/libdwfl/libdwflP.h
-+++ b/libdwfl/libdwflP.h
-@@ -32,7 +32,7 @@
- #include <libdwfl.h>
- #include <libebl.h>
- #include <libeu.h>
--#include <libgen.h>
-+#include <dirname.h>
- #include <assert.h>
- #include <dirent.h>
- #include <errno.h>
-
+ 
+ 



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:37 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:37 -0400
Subject: [openwrt/openwrt]  tools/elfutils: remove no-op copy of tdestroy()
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31024.1714080882.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ddb7177c57e1515d9b170a2a35c2d2f341311a05

commit ddb7177c57e1515d9b170a2a35c2d2f341311a05
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Mon Apr 8 03:54:13 2024 -0400

    tools/elfutils: remove no-op copy of tdestroy()
    
    A false tdestroy() function was added in order to make elfutils build on
    macOS again. A previous commit added declarations for a real version of
    tdestroy() into gnulib, which is already imported, as well as the
    preprocessor flags and the triggers for the Makefile.am conditional in
    order to include the source to be built.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/elfutils/patches/100-portability.patch | 14 --------------
 1 file changed, 14 deletions(-)

diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch
index 91fff1ca78..9a111c76d9 100644
--- a/tools/elfutils/patches/100-portability.patch
+++ b/tools/elfutils/patches/100-portability.patch
@@ -344,20 +344,6 @@
 +{
 +  return ppc_check_object_attribute(ebl, vendor, tag, value, tag_name, value_name);
 +}
---- a/lib/libeu.h
-+++ b/lib/libeu.h
-@@ -45,4 +45,11 @@ extern char *xasprintf(const char *fmt,
- extern uint32_t crc32 (uint32_t crc, unsigned char *buf, size_t len);
- extern int crc32_file (int fd, uint32_t *resp);
- 
-+#ifdef __APPLE__
-+static inline void tdestroy(void *root __attribute__ ((unused)),
-+			    void (*freekey)(void *) __attribute__ ((unused)))
-+{
-+}
-+#endif
-+
- #endif
 --- a/libdwfl/libdwflP.h
 +++ b/libdwfl/libdwflP.h
 @@ -31,6 +31,8 @@



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:35 -0400
Subject: [openwrt/openwrt]  tools/elfutils: organize gnulib import build stage
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31025.1714080887.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/43be31982366a9604ca5a980dd356d4a72a6d379

commit 43be31982366a9604ca5a980dd356d4a72a6d379
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Fri Apr 5 04:42:14 2024 -0400

    tools/elfutils: organize gnulib import build stage
    
    Organize the Makefile lines involved in gnulib importing and its
    workarounds. It improves readability and keeps git history organized.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/elfutils/Makefile | 20 +++++++++++++++++++-
 1 file changed, 19 insertions(+), 1 deletion(-)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index f13bd8c944..c7d94d2a47 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -29,6 +29,24 @@ PKG_SUBDIRS := \
 	libdwfl \
 	libdw
 
+PKG_GNULIB_BASE:=libgnu
+
+PKG_GNULIB_ARGS = \
+	--dir=$(HOST_BUILD_DIR) \
+	--local-dir=$(STAGING_DIR_HOST)/share/gnulib \
+	--source-base=$(PKG_GNULIB_BASE) \
+	--libtool \
+	--import
+
+PKG_GNULIB_MODS = \
+	argp \
+	dirname \
+	fts \
+	obstack \
+	progname \
+	strchrnul \
+	tsearch
+
 include $(INCLUDE_DIR)/host-build.mk
 
 ifeq ($(HOST_OS),Darwin)
@@ -55,7 +73,7 @@ endif
 
 Hooks/HostConfigure/Pre := Host/Gnulib $(Hooks/HostConfigure/Pre)
 define Host/Gnulib
-	cd $(HOST_BUILD_DIR); $(STAGING_DIR_HOST)/bin/gnulib-tool --libtool --source-base=libgnu --import argp dirname fts obstack progname strchrnul tsearch;
+	$(STAGING_DIR_HOST)/bin/gnulib-tool $(PKG_GNULIB_ARGS) $(PKG_GNULIB_MODS);
 	ln -sf ../lib/eu-config.h $(HOST_BUILD_DIR)/libgnu/;
 endef
 



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:34 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:34 -0400
Subject: [openwrt/openwrt]  tools/elfutils: override SUBDIRS variable of
 Makefile
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31026.1714080890.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7a4df7825eae83650c42ef9839f985f6fdc87b09

commit 7a4df7825eae83650c42ef9839f985f6fdc87b09
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Sun Apr 7 15:28:03 2024 -0400

    tools/elfutils: override SUBDIRS variable of Makefile
    
    Instead of editing the SUBDIRS variable with a patch, it can be overriden
    at the end of the command line when invoking Make.
    
    This tool has a series of recursive Makefiles in each subdirectory,
    therefore SUBDIRS is set to a pattern of Make functions so that the result
    is variable depending on the current subdirectory that Make is being
    invoked in.
    
    It's not necessary to have gnulib-cache.m4 in EXTRA_DIST since we don't
    need to re-import after packaging this in the SDK, so get rid of the
    entire patch hunk for ./Makefile.am
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/elfutils/Makefile                      | 20 ++++++++++++++++++++
 tools/elfutils/patches/100-portability.patch | 17 -----------------
 2 files changed, 20 insertions(+), 17 deletions(-)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index adf8770783..f13bd8c944 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -17,6 +17,18 @@ PKG_CPE_ID:=cpe:/a:elfutils_project:elfutils
 PKG_FIXUP:=autoreconf
 PKG_INSTALL:=1
 
+PKG_SUBDIRS := \
+	libgnu \
+	config \
+	lib \
+	libelf \
+	libcpu \
+	backends \
+	libebl \
+	libdwelf \
+	libdwfl \
+	libdw
+
 include $(INCLUDE_DIR)/host-build.mk
 
 ifeq ($(HOST_OS),Darwin)
@@ -47,6 +59,14 @@ define Host/Gnulib
 	ln -sf ../lib/eu-config.h $(HOST_BUILD_DIR)/libgnu/;
 endef
 
+define Host/Compile
+	$(call Host/Compile/Default,SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))')
+endef
+
+define Host/Install
+	$(call Host/Compile/Default,install SUBDIRS='$$$$(wildcard $(PKG_SUBDIRS))')
+endef
+
 define Host/Uninstall
 	-$(call Host/Compile/Default,uninstall)
 endef
diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch
index 0a3dd63a85..91fff1ca78 100644
--- a/tools/elfutils/patches/100-portability.patch
+++ b/tools/elfutils/patches/100-portability.patch
@@ -89,23 +89,6 @@
  dnl The directories with content.
  
  dnl Documentation.
---- a/Makefile.am
-+++ b/Makefile.am
-@@ -26,11 +26,11 @@ AM_MAKEFLAGS = --no-print-directory
- 
- pkginclude_HEADERS = version.h
- 
--SUBDIRS = config lib libelf libcpu backends libebl libdwelf libdwfl libdw \
--	  libasm debuginfod src po doc tests
-+SUBDIRS = libgnu config lib libelf libcpu backends libebl libdwelf libdwfl libdw
- 
- EXTRA_DIST = elfutils.spec GPG-KEY NOTES CONTRIBUTING SECURITY \
--	     COPYING COPYING-GPLV2 COPYING-LGPLV3
-+	     COPYING COPYING-GPLV2 COPYING-LGPLV3 \
-+		 m4/gnulib-cache.m4
- 
- # Make sure the test install uses lib64 when $LIB will yield lib64.
- # Make sure the test build uses the same compiler, which on e.g. ppc64
 --- a/libelf/elf_update.c
 +++ b/libelf/elf_update.c
 @@ -37,6 +37,33 @@



From lede-commits at lists.infradead.org  Thu Apr 25 14:10:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Thu, 25 Apr 2024 17:10:36 -0400
Subject: [openwrt/openwrt]  tools/elfutils: use locally declared static
 reallocarray()
In-Reply-To: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
References: <171407942417.303283.10263907823944330818@git-01.infra.openwrt.org>
Message-ID: <mailman.31027.1714080893.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/20ed56ec8b80936132d3dd66e3a7b82dd1d2ed89

commit 20ed56ec8b80936132d3dd66e3a7b82dd1d2ed89
Author: Michael Pratt <mcpratt at pm.me>
AuthorDate: Sun Apr 7 23:28:51 2024 -0400

    tools/elfutils: use locally declared static reallocarray()
    
    On macOS, stdlib.h in the standard include paths does not provide
    reallocarray() while both elfutils and gnulib do, however they are
    declared differently, leading to an error:
    
      ./system.h:101:1: error: static declaration of 'reallocarray' follows non-static declaration
      reallocarray (void *ptr, size_t nmemb, size_t size)
    
    A normal "configure && make" build cycle results in both declarations
    being enabled as a result of both elfutils and gnulib having completely
    separate configure checks where gnulib uses an internal placeholder symbol
    HAVE_REALLOCARRAY, and elfutils uses a standard autoconf macro
    HAVE_DECL_REALLOCARRAY.
    
    Fix this by excluding the import of the reallocarray module which causes
    gnulib checks in the configure stage to not even consider whether to
    declare reallocarray later on, so the decision is only between the
    standard include stdlib.h and the elfutils header.
    
    Tested-by: Georgi Valkov <gvalkov at gmail.com> # MacOS
    Signed-off-by: Michael Pratt <mcpratt at pm.me>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 tools/elfutils/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index c7d94d2a47..140250801c 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -36,6 +36,7 @@ PKG_GNULIB_ARGS = \
 	--local-dir=$(STAGING_DIR_HOST)/share/gnulib \
 	--source-base=$(PKG_GNULIB_BASE) \
 	--libtool \
+	--avoid=reallocarray \
 	--import
 
 PKG_GNULIB_MODS = \



From lede-commits at lists.infradead.org  Thu Apr 25 21:38:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 00:38:07 -0400
Subject: [openwrt/openwrt]  netifd: add flow steering mode to the packet
 steering script
In-Reply-To: <171410628409.1919737.3817447923233366106@git-01.infra.openwrt.org>
References: <171410628409.1919737.3817447923233366106@git-01.infra.openwrt.org>
Message-ID: <mailman.31056.1714106290.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7ebcf2fb9c5db8b75666761f5e767c91abb1f437

commit 7ebcf2fb9c5db8b75666761f5e767c91abb1f437
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Apr 24 19:23:11 2024 +0200

    netifd: add flow steering mode to the packet steering script
    
    This allows directing processing of locally received packets to the CPUs
    of the tasks receiving them
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../network/config/netifd/files/etc/init.d/packet_steering |  4 +++-
 .../netifd/files/usr/libexec/network/packet-steering.uc    | 14 +++++++++++++-
 2 files changed, 16 insertions(+), 2 deletions(-)

diff --git a/package/network/config/netifd/files/etc/init.d/packet_steering b/package/network/config/netifd/files/etc/init.d/packet_steering
index d6f6afc2e1..ff4a39073b 100755
--- a/package/network/config/netifd/files/etc/init.d/packet_steering
+++ b/package/network/config/netifd/files/etc/init.d/packet_steering
@@ -15,9 +15,11 @@ service_triggers() {
 
 reload_service() {
 	packet_steering="$(uci get "network. at globals[0].packet_steering")"
+	steering_flows="$(uci get "network. at globals[0].steering_flows")"
+	[ "$steering_flows" -gt 0 ] && opts="-l $steering_flows"
 	if [ -e "/usr/libexec/platform/packet-steering.sh" ]; then
 		/usr/libexec/platform/packet-steering.sh "$packet_steering"
 	else
-		/usr/libexec/network/packet-steering.uc "$packet_steering"
+		/usr/libexec/network/packet-steering.uc $opts "$packet_steering"
 	fi
 }
diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
index 025532c1c1..a578e28879 100755
--- a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
+++ b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
@@ -10,8 +10,10 @@ let debug = 0, do_nothing = 0;
 let disable;
 let cpus;
 let all_cpus;
+let local_flows = 0;
 
-for (let arg in ARGV) {
+while (length(ARGV) > 0) {
+	let arg = shift(ARGV);
 	switch (arg) {
 	case "-d":
 		debug++;
@@ -25,6 +27,9 @@ for (let arg in ARGV) {
 	case '2':
 		all_cpus = true;
 		break;
+	case '-l':
+		local_flows = +shift(ARGV);
+		break;
 	}
 }
 
@@ -71,6 +76,13 @@ function set_netdev_cpu(dev, cpu) {
 		if (!do_nothing)
 			writefile(queue, `${val}`);
 	}
+	queues = glob(`/sys/class/net/${dev}/queues/rx-*/rps_flow_cnt`);
+	for (let queue in queues) {
+		if (debug || do_nothing)
+			warn(`echo ${local_flows} > ${queue}\n`);
+		if (!do_nothing)
+			writefile(queue, `${local_flows}`);
+	}
 }
 
 function task_device_match(name, device)



From lede-commits at lists.infradead.org  Thu Apr 25 21:38:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 00:38:06 -0400
Subject: [openwrt/openwrt]  netifd: add a packet steering mode matching the
 old script
In-Reply-To: <171410628409.1919737.3817447923233366106@git-01.infra.openwrt.org>
References: <171410628409.1919737.3817447923233366106@git-01.infra.openwrt.org>
Message-ID: <mailman.31057.1714106291.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c4d394c6cc0facba94fda5f1cc886edaf342be3a

commit c4d394c6cc0facba94fda5f1cc886edaf342be3a
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Wed Apr 24 19:16:05 2024 +0200

    netifd: add a packet steering mode matching the old script
    
    This spreads packet processing across all cores
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../files/usr/libexec/network/packet-steering.uc   | 23 ++++++++++++++++++++--
 1 file changed, 21 insertions(+), 2 deletions(-)

diff --git a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
index 72f96024d8..025532c1c1 100755
--- a/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
+++ b/package/network/config/netifd/files/usr/libexec/network/packet-steering.uc
@@ -9,6 +9,7 @@ let eth_bias = 2.0;
 let debug = 0, do_nothing = 0;
 let disable;
 let cpus;
+let all_cpus;
 
 for (let arg in ARGV) {
 	switch (arg) {
@@ -21,6 +22,9 @@ for (let arg in ARGV) {
 	case '0':
 		disable = true;
 		break;
+	case '2':
+		all_cpus = true;
+		break;
 	}
 }
 
@@ -46,9 +50,19 @@ function set_task_cpu(pid, cpu) {
 		system(`taskset -p -c ${cpu} ${pid}`);
 }
 
+function cpu_mask(cpu)
+{
+	let mask;
+	if (cpu < 0)
+		mask = (1 << length(cpus)) - 1;
+	else
+		mask = (1 << int(cpu));
+	return sprintf("%x", mask);
+}
+
 function set_netdev_cpu(dev, cpu) {
 	let queues = glob(`/sys/class/net/${dev}/queues/rx-*/rps_cpus`);
-	let val = sprintf("%x", (1 << int(cpu)));
+	let val = cpu_mask(cpu);
 	if (disable)
 		val = 0;
 	for (let queue in queues) {
@@ -173,7 +187,12 @@ function assign_dev_cpu(dev) {
 	}
 
 	if (length(dev.netdev) > 0) {
-		let cpu = dev.rx_cpu = get_next_cpu(rx_weight, dev.napi_cpu);
+		let cpu;
+		if (all_cpus)
+			cpu = -1;
+		else
+			cpu = get_next_cpu(rx_weight, dev.napi_cpu);
+		dev.rx_cpu = cpu;
 		for (let netdev in dev.netdev)
 			set_netdev_cpu(netdev, cpu);
 	}



From lede-commits at lists.infradead.org  Thu Apr 25 21:38:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 00:38:04 -0400
Subject: [openwrt/openwrt]  kernel: backport flow offload pppoe fix
In-Reply-To: <171410628409.1919737.3817447923233366106@git-01.infra.openwrt.org>
References: <171410628409.1919737.3817447923233366106@git-01.infra.openwrt.org>
Message-ID: <mailman.31060.1714106291.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/98834a4c3f81c6e4f20329ff266f9bd85731d114

commit 98834a4c3f81c6e4f20329ff266f9bd85731d114
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Apr 23 12:08:45 2024 +0200

    kernel: backport flow offload pppoe fix
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...netfilter-flowtable-validate-pppoe-header.patch | 85 +++++++++++++++++++++
 ...netfilter-flowtable-incorrect-pppoe-tuple.patch | 24 ++++++
 ...netfilter-flowtable-validate-pppoe-header.patch | 87 ++++++++++++++++++++++
 ...netfilter-flowtable-incorrect-pppoe-tuple.patch | 24 ++++++
 ...netfilter-flowtable-validate-pppoe-header.patch | 87 ++++++++++++++++++++++
 ...netfilter-flowtable-incorrect-pppoe-tuple.patch | 24 ++++++
 .../650-netfilter-add-xt_FLOWOFFLOAD-target.patch  |  5 +-
 .../650-netfilter-add-xt_FLOWOFFLOAD-target.patch  |  5 +-
 .../650-netfilter-add-xt_FLOWOFFLOAD-target.patch  |  5 +-
 9 files changed, 340 insertions(+), 6 deletions(-)

diff --git a/target/linux/generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch b/target/linux/generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
new file mode 100644
index 0000000000..02407da8a8
--- /dev/null
+++ b/target/linux/generic/backport-5.15/741-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
@@ -0,0 +1,85 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Thu, 11 Apr 2024 13:28:59 +0200
+Subject: [PATCH] netfilter: flowtable: validate pppoe header
+
+Ensure there is sufficient room to access the protocol field of the
+PPPoe header. Validate it once before the flowtable lookup, then use a
+helper function to access protocol field.
+
+Reported-by: syzbot+b6f07e1c07ef40199081 at syzkaller.appspotmail.com
+Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+---
+
+--- a/include/net/netfilter/nf_flow_table.h
++++ b/include/net/netfilter/nf_flow_table.h
+@@ -318,7 +318,7 @@ int nf_flow_rule_route_ipv6(struct net *
+ int nf_flow_table_offload_init(void);
+ void nf_flow_table_offload_exit(void);
+ 
+-static inline __be16 nf_flow_pppoe_proto(const struct sk_buff *skb)
++static inline __be16 __nf_flow_pppoe_proto(const struct sk_buff *skb)
+ {
+ 	__be16 proto;
+ 
+@@ -334,4 +334,14 @@ static inline __be16 nf_flow_pppoe_proto
+ 	return 0;
+ }
+ 
++static inline bool nf_flow_pppoe_proto(struct sk_buff *skb, __be16 *inner_proto)
++{
++	if (!pskb_may_pull(skb, PPPOE_SES_HLEN))
++		return false;
++
++	*inner_proto = __nf_flow_pppoe_proto(skb);
++
++	return true;
++}
++
+ #endif /* _NF_FLOW_TABLE_H */
+--- a/net/netfilter/nf_flow_table_inet.c
++++ b/net/netfilter/nf_flow_table_inet.c
+@@ -21,7 +21,8 @@ nf_flow_offload_inet_hook(void *priv, st
+ 		proto = veth->h_vlan_encapsulated_proto;
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		proto = nf_flow_pppoe_proto(skb);
++		if (!nf_flow_pppoe_proto(skb, &proto))
++			return NF_ACCEPT;
+ 		break;
+ 	default:
+ 		proto = skb->protocol;
+--- a/net/netfilter/nf_flow_table_ip.c
++++ b/net/netfilter/nf_flow_table_ip.c
+@@ -246,10 +246,11 @@ static unsigned int nf_flow_xmit_xfrm(st
+ 	return NF_STOLEN;
+ }
+ 
+-static bool nf_flow_skb_encap_protocol(const struct sk_buff *skb, __be16 proto,
++static bool nf_flow_skb_encap_protocol(struct sk_buff *skb, __be16 proto,
+ 				       u32 *offset)
+ {
+ 	struct vlan_ethhdr *veth;
++	__be16 inner_proto;
+ 
+ 	switch (skb->protocol) {
+ 	case htons(ETH_P_8021Q):
+@@ -260,7 +261,8 @@ static bool nf_flow_skb_encap_protocol(c
+ 		}
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		if (nf_flow_pppoe_proto(skb) == proto) {
++		if (nf_flow_pppoe_proto(skb, &inner_proto) &&
++		    inner_proto == proto) {
+ 			*offset += PPPOE_SES_HLEN;
+ 			return true;
+ 		}
+@@ -289,7 +291,7 @@ static void nf_flow_encap_pop(struct sk_
+ 			skb_reset_network_header(skb);
+ 			break;
+ 		case htons(ETH_P_PPP_SES):
+-			skb->protocol = nf_flow_pppoe_proto(skb);
++			skb->protocol = __nf_flow_pppoe_proto(skb);
+ 			skb_pull(skb, PPPOE_SES_HLEN);
+ 			skb_reset_network_header(skb);
+ 			break;
diff --git a/target/linux/generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch b/target/linux/generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
new file mode 100644
index 0000000000..3b822b169d
--- /dev/null
+++ b/target/linux/generic/backport-5.15/741-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
@@ -0,0 +1,24 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Thu, 11 Apr 2024 13:29:00 +0200
+Subject: [PATCH] netfilter: flowtable: incorrect pppoe tuple
+
+pppoe traffic reaching ingress path does not match the flowtable entry
+because the pppoe header is expected to be at the network header offset.
+This bug causes a mismatch in the flow table lookup, so pppoe packets
+enter the classical forwarding path.
+
+Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+---
+
+--- a/net/netfilter/nf_flow_table_ip.c
++++ b/net/netfilter/nf_flow_table_ip.c
+@@ -156,7 +156,7 @@ static void nf_flow_tuple_encap(struct s
+ 		tuple->encap[i].proto = skb->protocol;
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		phdr = (struct pppoe_hdr *)skb_mac_header(skb);
++		phdr = (struct pppoe_hdr *)skb_network_header(skb);
+ 		tuple->encap[i].id = ntohs(phdr->sid);
+ 		tuple->encap[i].proto = skb->protocol;
+ 		break;
diff --git a/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch b/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
new file mode 100644
index 0000000000..29f211e8a5
--- /dev/null
+++ b/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
@@ -0,0 +1,87 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Thu, 11 Apr 2024 13:28:59 +0200
+Subject: [PATCH] netfilter: flowtable: validate pppoe header
+
+Ensure there is sufficient room to access the protocol field of the
+PPPoe header. Validate it once before the flowtable lookup, then use a
+helper function to access protocol field.
+
+Reported-by: syzbot+b6f07e1c07ef40199081 at syzkaller.appspotmail.com
+Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+---
+
+--- a/include/net/netfilter/nf_flow_table.h
++++ b/include/net/netfilter/nf_flow_table.h
+@@ -335,7 +335,7 @@ int nf_flow_rule_route_ipv6(struct net *
+ int nf_flow_table_offload_init(void);
+ void nf_flow_table_offload_exit(void);
+ 
+-static inline __be16 nf_flow_pppoe_proto(const struct sk_buff *skb)
++static inline __be16 __nf_flow_pppoe_proto(const struct sk_buff *skb)
+ {
+ 	__be16 proto;
+ 
+@@ -351,6 +351,16 @@ static inline __be16 nf_flow_pppoe_proto
+ 	return 0;
+ }
+ 
++static inline bool nf_flow_pppoe_proto(struct sk_buff *skb, __be16 *inner_proto)
++{
++	if (!pskb_may_pull(skb, PPPOE_SES_HLEN))
++		return false;
++
++	*inner_proto = __nf_flow_pppoe_proto(skb);
++
++	return true;
++}
++
+ #define NF_FLOW_TABLE_STAT_INC(net, count) __this_cpu_inc((net)->ft.stat->count)
+ #define NF_FLOW_TABLE_STAT_DEC(net, count) __this_cpu_dec((net)->ft.stat->count)
+ #define NF_FLOW_TABLE_STAT_INC_ATOMIC(net, count)	\
+--- a/net/netfilter/nf_flow_table_inet.c
++++ b/net/netfilter/nf_flow_table_inet.c
+@@ -21,7 +21,8 @@ nf_flow_offload_inet_hook(void *priv, st
+ 		proto = veth->h_vlan_encapsulated_proto;
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		proto = nf_flow_pppoe_proto(skb);
++		if (!nf_flow_pppoe_proto(skb, &proto))
++			return NF_ACCEPT;
+ 		break;
+ 	default:
+ 		proto = skb->protocol;
+--- a/net/netfilter/nf_flow_table_ip.c
++++ b/net/netfilter/nf_flow_table_ip.c
+@@ -267,10 +267,11 @@ static unsigned int nf_flow_xmit_xfrm(st
+ 	return NF_STOLEN;
+ }
+ 
+-static bool nf_flow_skb_encap_protocol(const struct sk_buff *skb, __be16 proto,
++static bool nf_flow_skb_encap_protocol(struct sk_buff *skb, __be16 proto,
+ 				       u32 *offset)
+ {
+ 	struct vlan_ethhdr *veth;
++	__be16 inner_proto;
+ 
+ 	switch (skb->protocol) {
+ 	case htons(ETH_P_8021Q):
+@@ -281,7 +282,8 @@ static bool nf_flow_skb_encap_protocol(c
+ 		}
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		if (nf_flow_pppoe_proto(skb) == proto) {
++		if (nf_flow_pppoe_proto(skb, &inner_proto) &&
++		    inner_proto == proto) {
+ 			*offset += PPPOE_SES_HLEN;
+ 			return true;
+ 		}
+@@ -310,7 +312,7 @@ static void nf_flow_encap_pop(struct sk_
+ 			skb_reset_network_header(skb);
+ 			break;
+ 		case htons(ETH_P_PPP_SES):
+-			skb->protocol = nf_flow_pppoe_proto(skb);
++			skb->protocol = __nf_flow_pppoe_proto(skb);
+ 			skb_pull(skb, PPPOE_SES_HLEN);
+ 			skb_reset_network_header(skb);
+ 			break;
diff --git a/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch b/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
new file mode 100644
index 0000000000..3b822b169d
--- /dev/null
+++ b/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
@@ -0,0 +1,24 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Thu, 11 Apr 2024 13:29:00 +0200
+Subject: [PATCH] netfilter: flowtable: incorrect pppoe tuple
+
+pppoe traffic reaching ingress path does not match the flowtable entry
+because the pppoe header is expected to be at the network header offset.
+This bug causes a mismatch in the flow table lookup, so pppoe packets
+enter the classical forwarding path.
+
+Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+---
+
+--- a/net/netfilter/nf_flow_table_ip.c
++++ b/net/netfilter/nf_flow_table_ip.c
+@@ -156,7 +156,7 @@ static void nf_flow_tuple_encap(struct s
+ 		tuple->encap[i].proto = skb->protocol;
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		phdr = (struct pppoe_hdr *)skb_mac_header(skb);
++		phdr = (struct pppoe_hdr *)skb_network_header(skb);
+ 		tuple->encap[i].id = ntohs(phdr->sid);
+ 		tuple->encap[i].proto = skb->protocol;
+ 		break;
diff --git a/target/linux/generic/backport-6.6/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch b/target/linux/generic/backport-6.6/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
new file mode 100644
index 0000000000..8a8773b716
--- /dev/null
+++ b/target/linux/generic/backport-6.6/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
@@ -0,0 +1,87 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Thu, 11 Apr 2024 13:28:59 +0200
+Subject: [PATCH] netfilter: flowtable: validate pppoe header
+
+Ensure there is sufficient room to access the protocol field of the
+PPPoe header. Validate it once before the flowtable lookup, then use a
+helper function to access protocol field.
+
+Reported-by: syzbot+b6f07e1c07ef40199081 at syzkaller.appspotmail.com
+Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+---
+
+--- a/include/net/netfilter/nf_flow_table.h
++++ b/include/net/netfilter/nf_flow_table.h
+@@ -335,7 +335,7 @@ int nf_flow_rule_route_ipv6(struct net *
+ int nf_flow_table_offload_init(void);
+ void nf_flow_table_offload_exit(void);
+ 
+-static inline __be16 nf_flow_pppoe_proto(const struct sk_buff *skb)
++static inline __be16 __nf_flow_pppoe_proto(const struct sk_buff *skb)
+ {
+ 	__be16 proto;
+ 
+@@ -351,6 +351,16 @@ static inline __be16 nf_flow_pppoe_proto
+ 	return 0;
+ }
+ 
++static inline bool nf_flow_pppoe_proto(struct sk_buff *skb, __be16 *inner_proto)
++{
++	if (!pskb_may_pull(skb, PPPOE_SES_HLEN))
++		return false;
++
++	*inner_proto = __nf_flow_pppoe_proto(skb);
++
++	return true;
++}
++
+ #define NF_FLOW_TABLE_STAT_INC(net, count) __this_cpu_inc((net)->ft.stat->count)
+ #define NF_FLOW_TABLE_STAT_DEC(net, count) __this_cpu_dec((net)->ft.stat->count)
+ #define NF_FLOW_TABLE_STAT_INC_ATOMIC(net, count)	\
+--- a/net/netfilter/nf_flow_table_inet.c
++++ b/net/netfilter/nf_flow_table_inet.c
+@@ -21,7 +21,8 @@ nf_flow_offload_inet_hook(void *priv, st
+ 		proto = veth->h_vlan_encapsulated_proto;
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		proto = nf_flow_pppoe_proto(skb);
++		if (!nf_flow_pppoe_proto(skb, &proto))
++			return NF_ACCEPT;
+ 		break;
+ 	default:
+ 		proto = skb->protocol;
+--- a/net/netfilter/nf_flow_table_ip.c
++++ b/net/netfilter/nf_flow_table_ip.c
+@@ -273,10 +273,11 @@ static unsigned int nf_flow_xmit_xfrm(st
+ 	return NF_STOLEN;
+ }
+ 
+-static bool nf_flow_skb_encap_protocol(const struct sk_buff *skb, __be16 proto,
++static bool nf_flow_skb_encap_protocol(struct sk_buff *skb, __be16 proto,
+ 				       u32 *offset)
+ {
+ 	struct vlan_ethhdr *veth;
++	__be16 inner_proto;
+ 
+ 	switch (skb->protocol) {
+ 	case htons(ETH_P_8021Q):
+@@ -287,7 +288,8 @@ static bool nf_flow_skb_encap_protocol(c
+ 		}
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		if (nf_flow_pppoe_proto(skb) == proto) {
++		if (nf_flow_pppoe_proto(skb, &inner_proto) &&
++		    inner_proto == proto) {
+ 			*offset += PPPOE_SES_HLEN;
+ 			return true;
+ 		}
+@@ -316,7 +318,7 @@ static void nf_flow_encap_pop(struct sk_
+ 			skb_reset_network_header(skb);
+ 			break;
+ 		case htons(ETH_P_PPP_SES):
+-			skb->protocol = nf_flow_pppoe_proto(skb);
++			skb->protocol = __nf_flow_pppoe_proto(skb);
+ 			skb_pull(skb, PPPOE_SES_HLEN);
+ 			skb_reset_network_header(skb);
+ 			break;
diff --git a/target/linux/generic/backport-6.6/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch b/target/linux/generic/backport-6.6/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
new file mode 100644
index 0000000000..20ac222de1
--- /dev/null
+++ b/target/linux/generic/backport-6.6/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
@@ -0,0 +1,24 @@
+From: Pablo Neira Ayuso <pablo at netfilter.org>
+Date: Thu, 11 Apr 2024 13:29:00 +0200
+Subject: [PATCH] netfilter: flowtable: incorrect pppoe tuple
+
+pppoe traffic reaching ingress path does not match the flowtable entry
+because the pppoe header is expected to be at the network header offset.
+This bug causes a mismatch in the flow table lookup, so pppoe packets
+enter the classical forwarding path.
+
+Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
+Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
+---
+
+--- a/net/netfilter/nf_flow_table_ip.c
++++ b/net/netfilter/nf_flow_table_ip.c
+@@ -157,7 +157,7 @@ static void nf_flow_tuple_encap(struct s
+ 		tuple->encap[i].proto = skb->protocol;
+ 		break;
+ 	case htons(ETH_P_PPP_SES):
+-		phdr = (struct pppoe_hdr *)skb_mac_header(skb);
++		phdr = (struct pppoe_hdr *)skb_network_header(skb);
+ 		tuple->encap[i].id = ntohs(phdr->sid);
+ 		tuple->encap[i].proto = skb->protocol;
+ 		break;
diff --git a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index ec887539d5..49f339bddc 100644
--- a/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
+++ b/target/linux/generic/hack-5.15/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
 --- /dev/null
 +++ b/net/netfilter/xt_FLOWOFFLOAD.c
-@@ -0,0 +1,701 @@
+@@ -0,0 +1,702 @@
 +/*
 + * Copyright (C) 2018-2021 Felix Fietkau <nbd at nbd.name>
 + *
@@ -163,7 +163,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +		proto = veth->h_vlan_encapsulated_proto;
 +		break;
 +	case htons(ETH_P_PPP_SES):
-+		proto = nf_flow_pppoe_proto(skb);
++		if (!nf_flow_pppoe_proto(skb, &proto))
++			return NF_ACCEPT;
 +		break;
 +	default:
 +		proto = skb->protocol;
diff --git a/target/linux/generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index 6fdfc79207..0822b1a2dd 100644
--- a/target/linux/generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
+++ b/target/linux/generic/hack-6.1/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
 --- /dev/null
 +++ b/net/netfilter/xt_FLOWOFFLOAD.c
-@@ -0,0 +1,702 @@
+@@ -0,0 +1,703 @@
 +/*
 + * Copyright (C) 2018-2021 Felix Fietkau <nbd at nbd.name>
 + *
@@ -109,7 +109,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +		proto = veth->h_vlan_encapsulated_proto;
 +		break;
 +	case htons(ETH_P_PPP_SES):
-+		proto = nf_flow_pppoe_proto(skb);
++		if (!nf_flow_pppoe_proto(skb, &proto))
++			return NF_ACCEPT;
 +		break;
 +	default:
 +		proto = skb->protocol;
diff --git a/target/linux/generic/hack-6.6/650-netfilter-add-xt_FLOWOFFLOAD-target.patch b/target/linux/generic/hack-6.6/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
index 9735983212..eca611da7e 100644
--- a/target/linux/generic/hack-6.6/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
+++ b/target/linux/generic/hack-6.6/650-netfilter-add-xt_FLOWOFFLOAD-target.patch
@@ -44,7 +44,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  obj-$(CONFIG_NETFILTER_XT_TARGET_LED) += xt_LED.o
 --- /dev/null
 +++ b/net/netfilter/xt_FLOWOFFLOAD.c
-@@ -0,0 +1,702 @@
+@@ -0,0 +1,703 @@
 +/*
 + * Copyright (C) 2018-2021 Felix Fietkau <nbd at nbd.name>
 + *
@@ -109,7 +109,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +		proto = veth->h_vlan_encapsulated_proto;
 +		break;
 +	case htons(ETH_P_PPP_SES):
-+		proto = nf_flow_pppoe_proto(skb);
++		if (!nf_flow_pppoe_proto(skb, &proto))
++			return NF_ACCEPT;
 +		break;
 +	default:
 +		proto = skb->protocol;



From lede-commits at lists.infradead.org  Thu Apr 25 21:38:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 00:38:05 -0400
Subject: [openwrt/openwrt]  kernel: improve GRO performance
In-Reply-To: <171410628409.1919737.3817447923233366106@git-01.infra.openwrt.org>
References: <171410628409.1919737.3817447923233366106@git-01.infra.openwrt.org>
Message-ID: <mailman.31061.1714106295.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b5c53848c3792355a2dd4ff0e06bf4d230e1f5fb

commit b5c53848c3792355a2dd4ff0e06bf4d230e1f5fb
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Tue Apr 23 12:37:05 2024 +0200

    kernel: improve GRO performance
    
    For packets not belonging to a local socket, use fraglist GRO instead of
    regular GRO. This make segmenting packets very cheap and avoids the need for
    selectively disabling GRO
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../600-net-enable-fraglist-GRO-by-default.patch   |  24 +
 .../hack-6.1/721-net-add-packet-mangeling.patch    |   8 +-
 .../600-net-enable-fraglist-GRO-by-default.patch   |  24 +
 .../hack-6.6/721-net-add-packet-mangeling.patch    |   8 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 151 ------
 .../680-net-add-TCP-fraglist-GRO-support.patch     | 559 +++++++++++++++++++++
 ...ieee80211_ptr-even-with-no-CFG82111-suppo.patch |   2 +-
 ...d-optional-threading-for-backlog-processi.patch |   6 +-
 ...80-NET-skip-GRO-for-foreign-MAC-addresses.patch | 151 ------
 .../680-net-add-TCP-fraglist-GRO-support.patch     | 510 +++++++++++++++++++
 ...ieee80211_ptr-even-with-no-CFG82111-suppo.patch |   2 +-
 ...d-optional-threading-for-backlog-processi.patch |   6 +-
 12 files changed, 1133 insertions(+), 318 deletions(-)

diff --git a/target/linux/generic/hack-6.1/600-net-enable-fraglist-GRO-by-default.patch b/target/linux/generic/hack-6.1/600-net-enable-fraglist-GRO-by-default.patch
new file mode 100644
index 0000000000..51f990039c
--- /dev/null
+++ b/target/linux/generic/hack-6.1/600-net-enable-fraglist-GRO-by-default.patch
@@ -0,0 +1,24 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 23 Apr 2024 12:35:21 +0200
+Subject: [PATCH] net: enable fraglist GRO by default
+
+This can significantly improve performance for packet forwarding/bridging
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/include/linux/netdev_features.h
++++ b/include/linux/netdev_features.h
+@@ -242,10 +242,10 @@ static inline int find_next_netdev_featu
+ #define NETIF_F_UPPER_DISABLES	NETIF_F_LRO
+ 
+ /* changeable features with no special hardware requirements */
+-#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO)
++#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO | NETIF_F_GRO_FRAGLIST)
+ 
+ /* Changeable features with no special hardware requirements that defaults to off. */
+-#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_FRAGLIST | NETIF_F_GRO_UDP_FWD)
++#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_UDP_FWD)
+ 
+ #define NETIF_F_VLAN_FEATURES	(NETIF_F_HW_VLAN_CTAG_FILTER | \
+ 				 NETIF_F_HW_VLAN_CTAG_RX | \
diff --git a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch
index 8652e090e1..bf286523d6 100644
--- a/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.1/721-net-add-packet-mangeling.patch
@@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	const struct header_ops *header_ops;
  
  	unsigned char		operstate;
-@@ -2206,6 +2213,10 @@ struct net_device {
+@@ -2204,6 +2211,10 @@ struct net_device {
  	struct mctp_dev __rcu	*mctp_ptr;
  #endif
  
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3046,6 +3046,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3045,6 +3045,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3195,16 +3199,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3194,16 +3198,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
@@ -152,7 +152,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  {
 --- a/net/ethernet/eth.c
 +++ b/net/ethernet/eth.c
-@@ -171,6 +171,12 @@ __be16 eth_type_trans(struct sk_buff *sk
+@@ -159,6 +159,12 @@ __be16 eth_type_trans(struct sk_buff *sk
  	const struct ethhdr *eth;
  
  	skb->dev = dev;
diff --git a/target/linux/generic/hack-6.6/600-net-enable-fraglist-GRO-by-default.patch b/target/linux/generic/hack-6.6/600-net-enable-fraglist-GRO-by-default.patch
new file mode 100644
index 0000000000..51f990039c
--- /dev/null
+++ b/target/linux/generic/hack-6.6/600-net-enable-fraglist-GRO-by-default.patch
@@ -0,0 +1,24 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 23 Apr 2024 12:35:21 +0200
+Subject: [PATCH] net: enable fraglist GRO by default
+
+This can significantly improve performance for packet forwarding/bridging
+
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/include/linux/netdev_features.h
++++ b/include/linux/netdev_features.h
+@@ -242,10 +242,10 @@ static inline int find_next_netdev_featu
+ #define NETIF_F_UPPER_DISABLES	NETIF_F_LRO
+ 
+ /* changeable features with no special hardware requirements */
+-#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO)
++#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO | NETIF_F_GRO_FRAGLIST)
+ 
+ /* Changeable features with no special hardware requirements that defaults to off. */
+-#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_FRAGLIST | NETIF_F_GRO_UDP_FWD)
++#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_UDP_FWD)
+ 
+ #define NETIF_F_VLAN_FEATURES	(NETIF_F_HW_VLAN_CTAG_FILTER | \
+ 				 NETIF_F_HW_VLAN_CTAG_RX | \
diff --git a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
index 8ef5faa3b1..9b6358979c 100644
--- a/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
+++ b/target/linux/generic/hack-6.6/721-net-add-packet-mangeling.patch
@@ -47,7 +47,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	const struct header_ops *header_ops;
  
  	unsigned char		operstate;
-@@ -2259,6 +2266,10 @@ struct net_device {
+@@ -2257,6 +2264,10 @@ struct net_device {
  	struct mctp_dev __rcu	*mctp_ptr;
  #endif
  
@@ -60,7 +60,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
   */
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -3081,6 +3081,10 @@ static inline int pskb_trim(struct sk_bu
+@@ -3080,6 +3080,10 @@ static inline int pskb_trim(struct sk_bu
  	return (len < skb->len) ? __pskb_trim(skb, len) : 0;
  }
  
@@ -71,7 +71,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /**
   *	pskb_trim_unique - remove end from a paged unique (not cloned) buffer
   *	@skb: buffer to alter
-@@ -3246,16 +3250,6 @@ static inline struct sk_buff *dev_alloc_
+@@ -3245,16 +3249,6 @@ static inline struct sk_buff *dev_alloc_
  }
  
  
@@ -152,7 +152,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  {
 --- a/net/ethernet/eth.c
 +++ b/net/ethernet/eth.c
-@@ -171,6 +171,12 @@ __be16 eth_type_trans(struct sk_buff *sk
+@@ -159,6 +159,12 @@ __be16 eth_type_trans(struct sk_buff *sk
  	const struct ethhdr *eth;
  
  	skb->dev = dev;
diff --git a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
deleted file mode 100644
index a589fca7a8..0000000000
--- a/target/linux/generic/pending-6.1/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Subject: net: replace GRO optimization patch with a new one that supports VLANs/bridges with different MAC addresses
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- include/linux/netdevice.h |  2 ++
- include/linux/skbuff.h    |  3 ++-
- net/core/dev.c            | 48 +++++++++++++++++++++++++++++++++++++++++++++++
- net/ethernet/eth.c        | 18 +++++++++++++++++-
- 4 files changed, 69 insertions(+), 2 deletions(-)
-
---- a/include/linux/netdevice.h
-+++ b/include/linux/netdevice.h
-@@ -2157,6 +2157,8 @@ struct net_device {
- 	struct netdev_hw_addr_list	mc;
- 	struct netdev_hw_addr_list	dev_addrs;
- 
-+	unsigned char		local_addr_mask[MAX_ADDR_LEN];
-+
- #ifdef CONFIG_SYSFS
- 	struct kset		*queues_kset;
- #endif
---- a/include/linux/skbuff.h
-+++ b/include/linux/skbuff.h
-@@ -967,6 +967,7 @@ struct sk_buff {
- #ifdef CONFIG_IPV6_NDISC_NODETYPE
- 	__u8			ndisc_nodetype:2;
- #endif
-+	__u8			gro_skip:1;
- 
- 	__u8			ipvs_property:1;
- 	__u8			inner_protocol_type:1;
---- a/net/core/gro.c
-+++ b/net/core/gro.c
-@@ -492,6 +492,9 @@ static enum gro_result dev_gro_receive(s
- 	int same_flow;
- 	int grow;
- 
-+	if (skb->gro_skip)
-+		goto normal;
-+
- 	if (netif_elide_gro(skb->dev))
- 		goto normal;
- 
---- a/net/core/dev.c
-+++ b/net/core/dev.c
-@@ -7628,6 +7628,48 @@ static void __netdev_adjacent_dev_unlink
- 					   &upper_dev->adj_list.lower);
- }
- 
-+static void __netdev_addr_mask(unsigned char *mask, const unsigned char *addr,
-+			       struct net_device *dev)
-+{
-+	int i;
-+
-+	for (i = 0; i < dev->addr_len; i++)
-+		mask[i] |= addr[i] ^ dev->dev_addr[i];
-+}
-+
-+static void __netdev_upper_mask(unsigned char *mask, struct net_device *dev,
-+				struct net_device *lower)
-+{
-+	struct net_device *cur;
-+	struct list_head *iter;
-+
-+	netdev_for_each_upper_dev_rcu(dev, cur, iter) {
-+		__netdev_addr_mask(mask, cur->dev_addr, lower);
-+		__netdev_upper_mask(mask, cur, lower);
-+	}
-+}
-+
-+static void __netdev_update_addr_mask(struct net_device *dev)
-+{
-+	unsigned char mask[MAX_ADDR_LEN];
-+	struct net_device *cur;
-+	struct list_head *iter;
-+
-+	memset(mask, 0, sizeof(mask));
-+	__netdev_upper_mask(mask, dev, dev);
-+	memcpy(dev->local_addr_mask, mask, dev->addr_len);
-+
-+	netdev_for_each_lower_dev(dev, cur, iter)
-+		__netdev_update_addr_mask(cur);
-+}
-+
-+static void netdev_update_addr_mask(struct net_device *dev)
-+{
-+	rcu_read_lock();
-+	__netdev_update_addr_mask(dev);
-+	rcu_read_unlock();
-+}
-+
- static int __netdev_upper_dev_link(struct net_device *dev,
- 				   struct net_device *upper_dev, bool master,
- 				   void *upper_priv, void *upper_info,
-@@ -7679,6 +7721,7 @@ static int __netdev_upper_dev_link(struc
- 	if (ret)
- 		return ret;
- 
-+	netdev_update_addr_mask(dev);
- 	ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
- 					    &changeupper_info.info);
- 	ret = notifier_to_errno(ret);
-@@ -7775,6 +7818,7 @@ static void __netdev_upper_dev_unlink(st
- 
- 	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
- 
-+	netdev_update_addr_mask(dev);
- 	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
- 				      &changeupper_info.info);
- 
-@@ -8827,6 +8871,7 @@ int dev_set_mac_address(struct net_devic
- 	if (err)
- 		return err;
- 	dev->addr_assign_type = NET_ADDR_SET;
-+	netdev_update_addr_mask(dev);
- 	call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
- 	add_device_randomness(dev->dev_addr, dev->addr_len);
- 	return 0;
---- a/net/ethernet/eth.c
-+++ b/net/ethernet/eth.c
-@@ -143,6 +143,18 @@ u32 eth_get_headlen(const struct net_dev
- }
- EXPORT_SYMBOL(eth_get_headlen);
- 
-+static inline bool
-+eth_check_local_mask(const void *addr1, const void *addr2, const void *mask)
-+{
-+	const u16 *a1 = addr1;
-+	const u16 *a2 = addr2;
-+	const u16 *m = mask;
-+
-+	return (((a1[0] ^ a2[0]) & ~m[0]) |
-+		((a1[1] ^ a2[1]) & ~m[1]) |
-+		((a1[2] ^ a2[2]) & ~m[2]));
-+}
-+
- /**
-  * eth_type_trans - determine the packet's protocol ID.
-  * @skb: received socket data
-@@ -174,6 +186,10 @@ __be16 eth_type_trans(struct sk_buff *sk
- 		} else {
- 			skb->pkt_type = PACKET_OTHERHOST;
- 		}
-+
-+		if (eth_check_local_mask(eth->h_dest, dev->dev_addr,
-+					 dev->local_addr_mask))
-+			skb->gro_skip = 1;
- 	}
- 
- 	/*
diff --git a/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch b/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch
new file mode 100644
index 0000000000..13043729c3
--- /dev/null
+++ b/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch
@@ -0,0 +1,559 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 23 Apr 2024 11:23:03 +0200
+Subject: [PATCH] net: add TCP fraglist GRO support
+
+When forwarding TCP after GRO, software segmentation is very expensive,
+especially when the checksum needs to be recalculated.
+One case where that's currently unavoidable is when routing packets over
+PPPoE. Performance improves significantly when using fraglist GRO
+implemented in the same way as for UDP.
+
+Here's a measurement of running 2 TCP streams through a MediaTek MT7622
+device (2-core Cortex-A53), which runs NAT with flow offload enabled from
+one ethernet port to PPPoE on another ethernet port + cake qdisc set to
+1Gbps.
+
+rx-gro-list off: 630 Mbit/s, CPU 35% idle
+rx-gro-list on:  770 Mbit/s, CPU 40% idle
+
+Signe-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/include/net/gro.h
++++ b/include/net/gro.h
+@@ -424,6 +424,7 @@ static inline __wsum ip6_gro_compute_pse
+ }
+ 
+ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb);
++int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb);
+ 
+ /* Pass the currently batched GRO_NORMAL SKBs up to the stack. */
+ static inline void gro_normal_list(struct napi_struct *napi)
+@@ -446,5 +447,48 @@ static inline void gro_normal_one(struct
+ 		gro_normal_list(napi);
+ }
+ 
++/* This function is the alternative of 'inet_iif' and 'inet_sdif'
++ * functions in case we can not rely on fields of IPCB.
++ *
++ * The caller must verify skb_valid_dst(skb) is false and skb->dev is initialized.
++ * The caller must hold the RCU read lock.
++ */
++static inline void inet_get_iif_sdif(const struct sk_buff *skb, int *iif, int *sdif)
++{
++	*iif = inet_iif(skb) ?: skb->dev->ifindex;
++	*sdif = 0;
++
++#if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV)
++	if (netif_is_l3_slave(skb->dev)) {
++		struct net_device *master = netdev_master_upper_dev_get_rcu(skb->dev);
++
++		*sdif = *iif;
++		*iif = master ? master->ifindex : 0;
++	}
++#endif
++}
++
++/* This function is the alternative of 'inet6_iif' and 'inet6_sdif'
++ * functions in case we can not rely on fields of IP6CB.
++ *
++ * The caller must verify skb_valid_dst(skb) is false and skb->dev is initialized.
++ * The caller must hold the RCU read lock.
++ */
++static inline void inet6_get_iif_sdif(const struct sk_buff *skb, int *iif, int *sdif)
++{
++	/* using skb->dev->ifindex because skb_dst(skb) is not initialized */
++	*iif = skb->dev->ifindex;
++	*sdif = 0;
++
++#if IS_ENABLED(CONFIG_NET_L3_MASTER_DEV)
++	if (netif_is_l3_slave(skb->dev)) {
++		struct net_device *master = netdev_master_upper_dev_get_rcu(skb->dev);
++
++		*sdif = *iif;
++		*iif = master ? master->ifindex : 0;
++	}
++#endif
++}
++
+ 
+ #endif /* _NET_IPV6_GRO_H */
+--- a/include/net/tcp.h
++++ b/include/net/tcp.h
+@@ -2057,7 +2057,10 @@ void tcp_v4_destroy_sock(struct sock *sk
+ 
+ struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
+ 				netdev_features_t features);
+-struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb);
++struct tcphdr *tcp_gro_pull_header(struct sk_buff *skb);
++struct sk_buff *tcp_gro_lookup(struct list_head *head, struct tcphdr *th);
++struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb,
++				struct tcphdr *th);
+ INDIRECT_CALLABLE_DECLARE(int tcp4_gro_complete(struct sk_buff *skb, int thoff));
+ INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb));
+ INDIRECT_CALLABLE_DECLARE(int tcp6_gro_complete(struct sk_buff *skb, int thoff));
+--- a/net/core/gro.c
++++ b/net/core/gro.c
+@@ -290,6 +290,33 @@ done:
+ 	return 0;
+ }
+ 
++int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb)
++{
++	if (unlikely(p->len + skb->len >= 65536))
++		return -E2BIG;
++
++	if (NAPI_GRO_CB(p)->last == p)
++		skb_shinfo(p)->frag_list = skb;
++	else
++		NAPI_GRO_CB(p)->last->next = skb;
++
++	skb_pull(skb, skb_gro_offset(skb));
++
++	NAPI_GRO_CB(p)->last = skb;
++	NAPI_GRO_CB(p)->count++;
++	p->data_len += skb->len;
++
++	/* sk ownership - if any - completely transferred to the aggregated packet */
++	skb->destructor = NULL;
++	skb->sk = NULL;
++	p->truesize += skb->truesize;
++	p->len += skb->len;
++
++	NAPI_GRO_CB(skb)->same_flow = 1;
++
++	return 0;
++}
++
+ 
+ static void napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
+ {
+--- a/net/ipv4/tcp_offload.c
++++ b/net/ipv4/tcp_offload.c
+@@ -27,6 +27,68 @@ static void tcp_gso_tstamp(struct sk_buf
+ 	}
+ }
+ 
++static void __tcpv4_gso_segment_csum(struct sk_buff *seg,
++				     __be32 *oldip, __be32 *newip,
++				     __be16 *oldport, __be16 *newport)
++{
++	struct tcphdr *th;
++	struct iphdr *iph;
++
++	if (*oldip == *newip && *oldport == *newport)
++		return;
++
++	th = tcp_hdr(seg);
++	iph = ip_hdr(seg);
++
++	inet_proto_csum_replace4(&th->check, seg, *oldip, *newip, true);
++	inet_proto_csum_replace2(&th->check, seg, *oldport, *newport, false);
++	*oldport = *newport;
++
++	csum_replace4(&iph->check, *oldip, *newip);
++	*oldip = *newip;
++}
++
++static struct sk_buff *__tcpv4_gso_segment_list_csum(struct sk_buff *segs)
++{
++	struct sk_buff *seg;
++	struct tcphdr *th, *th2;
++	struct iphdr *iph, *iph2;
++
++	seg = segs;
++	th = tcp_hdr(seg);
++	iph = ip_hdr(seg);
++	th2 = tcp_hdr(seg->next);
++	iph2 = ip_hdr(seg->next);
++
++	if (!(*(u32 *)&th->source ^ *(u32 *)&th2->source) &&
++	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
++		return segs;
++
++	while ((seg = seg->next)) {
++		th2 = tcp_hdr(seg);
++		iph2 = ip_hdr(seg);
++
++		__tcpv4_gso_segment_csum(seg,
++					 &iph2->saddr, &iph->saddr,
++					 &th2->source, &th->source);
++		__tcpv4_gso_segment_csum(seg,
++					 &iph2->daddr, &iph->daddr,
++					 &th2->dest, &th->dest);
++	}
++
++	return segs;
++}
++
++static struct sk_buff *__tcp4_gso_segment_list(struct sk_buff *skb,
++					      netdev_features_t features)
++{
++	skb = skb_segment_list(skb, features, skb_mac_header_len(skb));
++	if (IS_ERR(skb))
++		return skb;
++
++	return __tcpv4_gso_segment_list_csum(skb);
++}
++
+ static struct sk_buff *tcp4_gso_segment(struct sk_buff *skb,
+ 					netdev_features_t features)
+ {
+@@ -36,6 +98,9 @@ static struct sk_buff *tcp4_gso_segment(
+ 	if (!pskb_may_pull(skb, sizeof(struct tcphdr)))
+ 		return ERR_PTR(-EINVAL);
+ 
++	if (skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST)
++		return __tcp4_gso_segment_list(skb, features);
++
+ 	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
+ 		const struct iphdr *iph = ip_hdr(skb);
+ 		struct tcphdr *th = tcp_hdr(skb);
+@@ -177,61 +242,76 @@ out:
+ 	return segs;
+ }
+ 
+-struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb)
++struct sk_buff *tcp_gro_lookup(struct list_head *head, struct tcphdr *th)
+ {
+-	struct sk_buff *pp = NULL;
++	struct tcphdr *th2;
+ 	struct sk_buff *p;
++
++	list_for_each_entry(p, head, list) {
++		if (!NAPI_GRO_CB(p)->same_flow)
++			continue;
++
++		th2 = tcp_hdr(p);
++		if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
++			NAPI_GRO_CB(p)->same_flow = 0;
++			continue;
++		}
++
++		return p;
++	}
++
++	return NULL;
++}
++
++struct tcphdr *tcp_gro_pull_header(struct sk_buff *skb)
++{
++	unsigned int thlen, hlen, off;
+ 	struct tcphdr *th;
+-	struct tcphdr *th2;
+-	unsigned int len;
+-	unsigned int thlen;
+-	__be32 flags;
+-	unsigned int mss = 1;
+-	unsigned int hlen;
+-	unsigned int off;
+-	int flush = 1;
+-	int i;
+ 
+ 	off = skb_gro_offset(skb);
+ 	hlen = off + sizeof(*th);
+ 	th = skb_gro_header(skb, hlen, off);
+ 	if (unlikely(!th))
+-		goto out;
++		return NULL;
+ 
+ 	thlen = th->doff * 4;
+ 	if (thlen < sizeof(*th))
+-		goto out;
++		return NULL;
+ 
+ 	hlen = off + thlen;
+ 	if (skb_gro_header_hard(skb, hlen)) {
+ 		th = skb_gro_header_slow(skb, hlen, off);
+ 		if (unlikely(!th))
+-			goto out;
++			return NULL;
+ 	}
+ 
+ 	skb_gro_pull(skb, thlen);
+ 
+-	len = skb_gro_len(skb);
+-	flags = tcp_flag_word(th);
+-
+-	list_for_each_entry(p, head, list) {
+-		if (!NAPI_GRO_CB(p)->same_flow)
+-			continue;
++	return th;
++}
+ 
+-		th2 = tcp_hdr(p);
++struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb,
++				struct tcphdr *th)
++{
++	unsigned int thlen = th->doff * 4;
++	struct sk_buff *pp = NULL;
++	struct sk_buff *p;
++	struct tcphdr *th2;
++	unsigned int len;
++	__be32 flags;
++	unsigned int mss = 1;
++	int flush = 1;
++	int i;
+ 
+-		if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
+-			NAPI_GRO_CB(p)->same_flow = 0;
+-			continue;
+-		}
++	len = skb_gro_len(skb);
++	flags = tcp_flag_word(th);
+ 
+-		goto found;
+-	}
+-	p = NULL;
+-	goto out_check_final;
++	p = tcp_gro_lookup(head, th);
++	if (!p)
++		goto out_check_final;
+ 
+-found:
+ 	/* Include the IP ID check below from the inner most IP hdr */
++	th2 = tcp_hdr(p);
+ 	flush = NAPI_GRO_CB(p)->flush;
+ 	flush |= (__force int)(flags & TCP_FLAG_CWR);
+ 	flush |= (__force int)((flags ^ tcp_flag_word(th2)) &
+@@ -268,6 +348,19 @@ found:
+ 	flush |= p->decrypted ^ skb->decrypted;
+ #endif
+ 
++	if (NAPI_GRO_CB(p)->is_flist) {
++		flush |= (__force int)(flags ^ tcp_flag_word(th2));
++		flush |= skb->ip_summed != p->ip_summed;
++		flush |= skb->csum_level != p->csum_level;
++		flush |= !pskb_may_pull(skb, skb_gro_offset(skb));
++		flush |= NAPI_GRO_CB(p)->count >= 64;
++
++		if (flush || skb_gro_receive_list(p, skb))
++			mss = 1;
++
++		goto out_check_final;
++	}
++
+ 	if (flush || skb_gro_receive(p, skb)) {
+ 		mss = 1;
+ 		goto out_check_final;
+@@ -289,7 +382,6 @@ out_check_final:
+ 	if (p && (!NAPI_GRO_CB(skb)->same_flow || flush))
+ 		pp = p;
+ 
+-out:
+ 	NAPI_GRO_CB(skb)->flush |= (flush != 0);
+ 
+ 	return pp;
+@@ -315,18 +407,56 @@ int tcp_gro_complete(struct sk_buff *skb
+ }
+ EXPORT_SYMBOL(tcp_gro_complete);
+ 
++static void tcp4_check_fraglist_gro(struct list_head *head, struct sk_buff *skb,
++				    struct tcphdr *th)
++{
++	const struct iphdr *iph = skb_gro_network_header(skb);
++	struct net *net = dev_net(skb->dev);
++	struct sk_buff *p;
++	struct sock *sk;
++	int iif, sdif;
++
++	if (!(skb->dev->features & NETIF_F_GRO_FRAGLIST))
++		return;
++
++	p = tcp_gro_lookup(head, th);
++	if (p) {
++		NAPI_GRO_CB(skb)->is_flist = NAPI_GRO_CB(p)->is_flist;
++		return;
++	}
++
++	inet_get_iif_sdif(skb, &iif, &sdif);
++	sk = __inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo,
++				       iph->saddr, th->source,
++				       iph->daddr, ntohs(th->dest),
++				       iif, sdif);
++	NAPI_GRO_CB(skb)->is_flist = !sk;
++	if (sk)
++		sock_put(sk);
++}
++
+ INDIRECT_CALLABLE_SCOPE
+ struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb)
+ {
++	struct tcphdr *th;
++
+ 	/* Don't bother verifying checksum if we're going to flush anyway. */
+ 	if (!NAPI_GRO_CB(skb)->flush &&
+ 	    skb_gro_checksum_validate(skb, IPPROTO_TCP,
+-				      inet_gro_compute_pseudo)) {
+-		NAPI_GRO_CB(skb)->flush = 1;
+-		return NULL;
+-	}
++				      inet_gro_compute_pseudo))
++		goto flush;
++
++	th = tcp_gro_pull_header(skb);
++	if (!th)
++		goto flush;
+ 
+-	return tcp_gro_receive(head, skb);
++	tcp4_check_fraglist_gro(head, skb, th);
++
++	return tcp_gro_receive(head, skb, th);
++
++flush:
++	NAPI_GRO_CB(skb)->flush = 1;
++	return NULL;
+ }
+ 
+ INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
+@@ -334,6 +464,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
+ 	const struct iphdr *iph = ip_hdr(skb);
+ 	struct tcphdr *th = tcp_hdr(skb);
+ 
++	if (NAPI_GRO_CB(skb)->is_flist) {
++		skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV4;
++		skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
++
++		__skb_incr_checksum_unnecessary(skb);
++
++		return 0;
++	}
++
+ 	th->check = ~tcp_v4_check(skb->len - thoff, iph->saddr,
+ 				  iph->daddr, 0);
+ 	skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV4;
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -425,33 +425,6 @@ out:
+ 	return segs;
+ }
+ 
+-static int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb)
+-{
+-	if (unlikely(p->len + skb->len >= 65536))
+-		return -E2BIG;
+-
+-	if (NAPI_GRO_CB(p)->last == p)
+-		skb_shinfo(p)->frag_list = skb;
+-	else
+-		NAPI_GRO_CB(p)->last->next = skb;
+-
+-	skb_pull(skb, skb_gro_offset(skb));
+-
+-	NAPI_GRO_CB(p)->last = skb;
+-	NAPI_GRO_CB(p)->count++;
+-	p->data_len += skb->len;
+-
+-	/* sk ownership - if any - completely transferred to the aggregated packet */
+-	skb->destructor = NULL;
+-	skb->sk = NULL;
+-	p->truesize += skb->truesize;
+-	p->len += skb->len;
+-
+-	NAPI_GRO_CB(skb)->same_flow = 1;
+-
+-	return 0;
+-}
+-
+ 
+ #define UDP_GRO_CNT_MAX 64
+ static struct sk_buff *udp_gro_receive_segment(struct list_head *head,
+--- a/net/ipv6/tcpv6_offload.c
++++ b/net/ipv6/tcpv6_offload.c
+@@ -7,24 +7,65 @@
+  */
+ #include <linux/indirect_call_wrapper.h>
+ #include <linux/skbuff.h>
++#include <net/inet6_hashtables.h>
+ #include <net/gro.h>
+ #include <net/protocol.h>
+ #include <net/tcp.h>
+ #include <net/ip6_checksum.h>
+ #include "ip6_offload.h"
+ 
++static void tcp6_check_fraglist_gro(struct list_head *head, struct sk_buff *skb,
++				    struct tcphdr *th)
++{
++#if IS_ENABLED(CONFIG_IPV6)
++	const struct ipv6hdr *hdr = skb_gro_network_header(skb);
++	struct net *net = dev_net(skb->dev);
++	struct sk_buff *p;
++	struct sock *sk;
++	int iif, sdif;
++
++	if (!(skb->dev->features & NETIF_F_GRO_FRAGLIST))
++		return;
++
++	p = tcp_gro_lookup(head, th);
++	if (p) {
++		NAPI_GRO_CB(skb)->is_flist = NAPI_GRO_CB(p)->is_flist;
++		return;
++	}
++
++	inet6_get_iif_sdif(skb, &iif, &sdif);
++	sk = __inet6_lookup_established(net, net->ipv4.tcp_death_row.hashinfo,
++					&hdr->saddr, th->source,
++					&hdr->daddr, ntohs(th->dest),
++					iif, sdif);
++	NAPI_GRO_CB(skb)->is_flist = !sk;
++	if (sk)
++		sock_put(sk);
++#endif /* IS_ENABLED(CONFIG_IPV6) */
++}
++
+ INDIRECT_CALLABLE_SCOPE
+ struct sk_buff *tcp6_gro_receive(struct list_head *head, struct sk_buff *skb)
+ {
++	struct tcphdr *th;
++
+ 	/* Don't bother verifying checksum if we're going to flush anyway. */
+ 	if (!NAPI_GRO_CB(skb)->flush &&
+ 	    skb_gro_checksum_validate(skb, IPPROTO_TCP,
+-				      ip6_gro_compute_pseudo)) {
+-		NAPI_GRO_CB(skb)->flush = 1;
+-		return NULL;
+-	}
++				      ip6_gro_compute_pseudo))
++		goto flush;
+ 
+-	return tcp_gro_receive(head, skb);
++	th = tcp_gro_pull_header(skb);
++	if (!th)
++		goto flush;
++
++	tcp6_check_fraglist_gro(head, skb, th);
++
++	return tcp_gro_receive(head, skb, th);
++
++flush:
++	NAPI_GRO_CB(skb)->flush = 1;
++	return NULL;
+ }
+ 
+ INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff)
+@@ -32,6 +73,15 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_com
+ 	const struct ipv6hdr *iph = ipv6_hdr(skb);
+ 	struct tcphdr *th = tcp_hdr(skb);
+ 
++	if (NAPI_GRO_CB(skb)->is_flist) {
++		skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV6;
++		skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
++
++		__skb_incr_checksum_unnecessary(skb);
++
++		return 0;
++	}
++
+ 	th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr,
+ 				  &iph->daddr, 0);
+ 	skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV6;
+@@ -50,6 +100,9 @@ static struct sk_buff *tcp6_gso_segment(
+ 	if (!pskb_may_pull(skb, sizeof(*th)))
+ 		return ERR_PTR(-EINVAL);
+ 
++	if (skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST)
++		return skb_segment_list(skb, features, skb_mac_header_len(skb));
++
+ 	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
+ 		const struct ipv6hdr *ipv6h = ipv6_hdr(skb);
+ 		struct tcphdr *th = tcp_hdr(skb);
diff --git a/target/linux/generic/pending-6.1/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch b/target/linux/generic/pending-6.1/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch
index a7a4bafbb6..f3725bf7d3 100644
--- a/target/linux/generic/pending-6.1/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch
+++ b/target/linux/generic/pending-6.1/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch
@@ -17,7 +17,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -2192,7 +2192,7 @@ struct net_device {
+@@ -2190,7 +2190,7 @@ struct net_device {
  #if IS_ENABLED(CONFIG_AX25)
  	void			*ax25_ptr;
  #endif
diff --git a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch
index 2df5e6b28c..69b2721738 100644
--- a/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch
+++ b/target/linux/generic/pending-6.1/760-net-core-add-optional-threading-for-backlog-processi.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  /**
   *	napi_disable - prevent NAPI from scheduling
-@@ -3152,6 +3153,7 @@ struct softnet_data {
+@@ -3150,6 +3151,7 @@ struct softnet_data {
  	unsigned int		processed;
  	unsigned int		time_squeeze;
  	unsigned int		received_rps;
@@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi,
  			   int (*poll)(struct napi_struct *, int), int weight)
  {
-@@ -11171,6 +11242,9 @@ static int dev_cpu_dead(unsigned int old
+@@ -11126,6 +11197,9 @@ static int dev_cpu_dead(unsigned int old
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_enable();
  
@@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #ifdef CONFIG_RPS
  	remsd = oldsd->rps_ipi_list;
  	oldsd->rps_ipi_list = NULL;
-@@ -11483,6 +11557,7 @@ static int __init net_dev_init(void)
+@@ -11438,6 +11512,7 @@ static int __init net_dev_init(void)
  		INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd);
  		spin_lock_init(&sd->defer_lock);
  
diff --git a/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch b/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
deleted file mode 100644
index 0859e217cd..0000000000
--- a/target/linux/generic/pending-6.6/680-NET-skip-GRO-for-foreign-MAC-addresses.patch
+++ /dev/null
@@ -1,151 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Subject: net: replace GRO optimization patch with a new one that supports VLANs/bridges with different MAC addresses
-
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
- include/linux/netdevice.h |  2 ++
- include/linux/skbuff.h    |  3 ++-
- net/core/dev.c            | 48 +++++++++++++++++++++++++++++++++++++++++++++++
- net/ethernet/eth.c        | 18 +++++++++++++++++-
- 4 files changed, 69 insertions(+), 2 deletions(-)
-
---- a/include/linux/netdevice.h
-+++ b/include/linux/netdevice.h
-@@ -2210,6 +2210,8 @@ struct net_device {
- 	struct netdev_hw_addr_list	mc;
- 	struct netdev_hw_addr_list	dev_addrs;
- 
-+	unsigned char		local_addr_mask[MAX_ADDR_LEN];
-+
- #ifdef CONFIG_SYSFS
- 	struct kset		*queues_kset;
- #endif
---- a/include/linux/skbuff.h
-+++ b/include/linux/skbuff.h
-@@ -959,6 +959,7 @@ struct sk_buff {
- #ifdef CONFIG_IPV6_NDISC_NODETYPE
- 	__u8			ndisc_nodetype:2;
- #endif
-+	__u8			gro_skip:1;
- 
- #if IS_ENABLED(CONFIG_IP_VS)
- 	__u8			ipvs_property:1;
---- a/net/core/gro.c
-+++ b/net/core/gro.c
-@@ -446,6 +446,9 @@ static enum gro_result dev_gro_receive(s
- 	enum gro_result ret;
- 	int same_flow;
- 
-+	if (skb->gro_skip)
-+		goto normal;
-+
- 	if (netif_elide_gro(skb->dev))
- 		goto normal;
- 
---- a/net/core/dev.c
-+++ b/net/core/dev.c
-@@ -7689,6 +7689,48 @@ static void __netdev_adjacent_dev_unlink
- 					   &upper_dev->adj_list.lower);
- }
- 
-+static void __netdev_addr_mask(unsigned char *mask, const unsigned char *addr,
-+			       struct net_device *dev)
-+{
-+	int i;
-+
-+	for (i = 0; i < dev->addr_len; i++)
-+		mask[i] |= addr[i] ^ dev->dev_addr[i];
-+}
-+
-+static void __netdev_upper_mask(unsigned char *mask, struct net_device *dev,
-+				struct net_device *lower)
-+{
-+	struct net_device *cur;
-+	struct list_head *iter;
-+
-+	netdev_for_each_upper_dev_rcu(dev, cur, iter) {
-+		__netdev_addr_mask(mask, cur->dev_addr, lower);
-+		__netdev_upper_mask(mask, cur, lower);
-+	}
-+}
-+
-+static void __netdev_update_addr_mask(struct net_device *dev)
-+{
-+	unsigned char mask[MAX_ADDR_LEN];
-+	struct net_device *cur;
-+	struct list_head *iter;
-+
-+	memset(mask, 0, sizeof(mask));
-+	__netdev_upper_mask(mask, dev, dev);
-+	memcpy(dev->local_addr_mask, mask, dev->addr_len);
-+
-+	netdev_for_each_lower_dev(dev, cur, iter)
-+		__netdev_update_addr_mask(cur);
-+}
-+
-+static void netdev_update_addr_mask(struct net_device *dev)
-+{
-+	rcu_read_lock();
-+	__netdev_update_addr_mask(dev);
-+	rcu_read_unlock();
-+}
-+
- static int __netdev_upper_dev_link(struct net_device *dev,
- 				   struct net_device *upper_dev, bool master,
- 				   void *upper_priv, void *upper_info,
-@@ -7740,6 +7782,7 @@ static int __netdev_upper_dev_link(struc
- 	if (ret)
- 		return ret;
- 
-+	netdev_update_addr_mask(dev);
- 	ret = call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
- 					    &changeupper_info.info);
- 	ret = notifier_to_errno(ret);
-@@ -7836,6 +7879,7 @@ static void __netdev_upper_dev_unlink(st
- 
- 	__netdev_adjacent_dev_unlink_neighbour(dev, upper_dev);
- 
-+	netdev_update_addr_mask(dev);
- 	call_netdevice_notifiers_info(NETDEV_CHANGEUPPER,
- 				      &changeupper_info.info);
- 
-@@ -8892,6 +8936,7 @@ int dev_set_mac_address(struct net_devic
- 			return err;
- 	}
- 	dev->addr_assign_type = NET_ADDR_SET;
-+	netdev_update_addr_mask(dev);
- 	call_netdevice_notifiers(NETDEV_CHANGEADDR, dev);
- 	add_device_randomness(dev->dev_addr, dev->addr_len);
- 	return 0;
---- a/net/ethernet/eth.c
-+++ b/net/ethernet/eth.c
-@@ -143,6 +143,18 @@ u32 eth_get_headlen(const struct net_dev
- }
- EXPORT_SYMBOL(eth_get_headlen);
- 
-+static inline bool
-+eth_check_local_mask(const void *addr1, const void *addr2, const void *mask)
-+{
-+	const u16 *a1 = addr1;
-+	const u16 *a2 = addr2;
-+	const u16 *m = mask;
-+
-+	return (((a1[0] ^ a2[0]) & ~m[0]) |
-+		((a1[1] ^ a2[1]) & ~m[1]) |
-+		((a1[2] ^ a2[2]) & ~m[2]));
-+}
-+
- /**
-  * eth_type_trans - determine the packet's protocol ID.
-  * @skb: received socket data
-@@ -174,6 +186,10 @@ __be16 eth_type_trans(struct sk_buff *sk
- 		} else {
- 			skb->pkt_type = PACKET_OTHERHOST;
- 		}
-+
-+		if (eth_check_local_mask(eth->h_dest, dev->dev_addr,
-+					 dev->local_addr_mask))
-+			skb->gro_skip = 1;
- 	}
- 
- 	/*
diff --git a/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch b/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
new file mode 100644
index 0000000000..11255afbda
--- /dev/null
+++ b/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
@@ -0,0 +1,510 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Tue, 23 Apr 2024 11:23:03 +0200
+Subject: [PATCH] net: add TCP fraglist GRO support
+
+When forwarding TCP after GRO, software segmentation is very expensive,
+especially when the checksum needs to be recalculated.
+One case where that's currently unavoidable is when routing packets over
+PPPoE. Performance improves significantly when using fraglist GRO
+implemented in the same way as for UDP.
+
+Here's a measurement of running 2 TCP streams through a MediaTek MT7622
+device (2-core Cortex-A53), which runs NAT with flow offload enabled from
+one ethernet port to PPPoE on another ethernet port + cake qdisc set to
+1Gbps.
+
+rx-gro-list off: 630 Mbit/s, CPU 35% idle
+rx-gro-list on:  770 Mbit/s, CPU 40% idle
+
+Signe-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/include/net/gro.h
++++ b/include/net/gro.h
+@@ -430,6 +430,7 @@ static inline __wsum ip6_gro_compute_pse
+ }
+ 
+ int skb_gro_receive(struct sk_buff *p, struct sk_buff *skb);
++int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb);
+ 
+ /* Pass the currently batched GRO_NORMAL SKBs up to the stack. */
+ static inline void gro_normal_list(struct napi_struct *napi)
+--- a/include/net/tcp.h
++++ b/include/net/tcp.h
+@@ -2082,7 +2082,10 @@ void tcp_v4_destroy_sock(struct sock *sk
+ 
+ struct sk_buff *tcp_gso_segment(struct sk_buff *skb,
+ 				netdev_features_t features);
+-struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb);
++struct tcphdr *tcp_gro_pull_header(struct sk_buff *skb);
++struct sk_buff *tcp_gro_lookup(struct list_head *head, struct tcphdr *th);
++struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb,
++				struct tcphdr *th);
+ INDIRECT_CALLABLE_DECLARE(int tcp4_gro_complete(struct sk_buff *skb, int thoff));
+ INDIRECT_CALLABLE_DECLARE(struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb));
+ INDIRECT_CALLABLE_DECLARE(int tcp6_gro_complete(struct sk_buff *skb, int thoff));
+--- a/net/core/gro.c
++++ b/net/core/gro.c
+@@ -233,6 +233,33 @@ done:
+ 	return 0;
+ }
+ 
++int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb)
++{
++	if (unlikely(p->len + skb->len >= 65536))
++		return -E2BIG;
++
++	if (NAPI_GRO_CB(p)->last == p)
++		skb_shinfo(p)->frag_list = skb;
++	else
++		NAPI_GRO_CB(p)->last->next = skb;
++
++	skb_pull(skb, skb_gro_offset(skb));
++
++	NAPI_GRO_CB(p)->last = skb;
++	NAPI_GRO_CB(p)->count++;
++	p->data_len += skb->len;
++
++	/* sk ownership - if any - completely transferred to the aggregated packet */
++	skb->destructor = NULL;
++	skb->sk = NULL;
++	p->truesize += skb->truesize;
++	p->len += skb->len;
++
++	NAPI_GRO_CB(skb)->same_flow = 1;
++
++	return 0;
++}
++
+ 
+ static void napi_gro_complete(struct napi_struct *napi, struct sk_buff *skb)
+ {
+--- a/net/ipv4/tcp_offload.c
++++ b/net/ipv4/tcp_offload.c
+@@ -28,6 +28,68 @@ static void tcp_gso_tstamp(struct sk_buf
+ 	}
+ }
+ 
++static void __tcpv4_gso_segment_csum(struct sk_buff *seg,
++				     __be32 *oldip, __be32 *newip,
++				     __be16 *oldport, __be16 *newport)
++{
++	struct tcphdr *th;
++	struct iphdr *iph;
++
++	if (*oldip == *newip && *oldport == *newport)
++		return;
++
++	th = tcp_hdr(seg);
++	iph = ip_hdr(seg);
++
++	inet_proto_csum_replace4(&th->check, seg, *oldip, *newip, true);
++	inet_proto_csum_replace2(&th->check, seg, *oldport, *newport, false);
++	*oldport = *newport;
++
++	csum_replace4(&iph->check, *oldip, *newip);
++	*oldip = *newip;
++}
++
++static struct sk_buff *__tcpv4_gso_segment_list_csum(struct sk_buff *segs)
++{
++	struct sk_buff *seg;
++	struct tcphdr *th, *th2;
++	struct iphdr *iph, *iph2;
++
++	seg = segs;
++	th = tcp_hdr(seg);
++	iph = ip_hdr(seg);
++	th2 = tcp_hdr(seg->next);
++	iph2 = ip_hdr(seg->next);
++
++	if (!(*(u32 *)&th->source ^ *(u32 *)&th2->source) &&
++	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
++		return segs;
++
++	while ((seg = seg->next)) {
++		th2 = tcp_hdr(seg);
++		iph2 = ip_hdr(seg);
++
++		__tcpv4_gso_segment_csum(seg,
++					 &iph2->saddr, &iph->saddr,
++					 &th2->source, &th->source);
++		__tcpv4_gso_segment_csum(seg,
++					 &iph2->daddr, &iph->daddr,
++					 &th2->dest, &th->dest);
++	}
++
++	return segs;
++}
++
++static struct sk_buff *__tcp4_gso_segment_list(struct sk_buff *skb,
++					      netdev_features_t features)
++{
++	skb = skb_segment_list(skb, features, skb_mac_header_len(skb));
++	if (IS_ERR(skb))
++		return skb;
++
++	return __tcpv4_gso_segment_list_csum(skb);
++}
++
+ static struct sk_buff *tcp4_gso_segment(struct sk_buff *skb,
+ 					netdev_features_t features)
+ {
+@@ -37,6 +99,9 @@ static struct sk_buff *tcp4_gso_segment(
+ 	if (!pskb_may_pull(skb, sizeof(struct tcphdr)))
+ 		return ERR_PTR(-EINVAL);
+ 
++	if (skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST)
++		return __tcp4_gso_segment_list(skb, features);
++
+ 	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
+ 		const struct iphdr *iph = ip_hdr(skb);
+ 		struct tcphdr *th = tcp_hdr(skb);
+@@ -178,61 +243,76 @@ out:
+ 	return segs;
+ }
+ 
+-struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb)
++struct sk_buff *tcp_gro_lookup(struct list_head *head, struct tcphdr *th)
+ {
+-	struct sk_buff *pp = NULL;
++	struct tcphdr *th2;
+ 	struct sk_buff *p;
++
++	list_for_each_entry(p, head, list) {
++		if (!NAPI_GRO_CB(p)->same_flow)
++			continue;
++
++		th2 = tcp_hdr(p);
++		if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
++			NAPI_GRO_CB(p)->same_flow = 0;
++			continue;
++		}
++
++		return p;
++	}
++
++	return NULL;
++}
++
++struct tcphdr *tcp_gro_pull_header(struct sk_buff *skb)
++{
++	unsigned int thlen, hlen, off;
+ 	struct tcphdr *th;
+-	struct tcphdr *th2;
+-	unsigned int len;
+-	unsigned int thlen;
+-	__be32 flags;
+-	unsigned int mss = 1;
+-	unsigned int hlen;
+-	unsigned int off;
+-	int flush = 1;
+-	int i;
+ 
+ 	off = skb_gro_offset(skb);
+ 	hlen = off + sizeof(*th);
+ 	th = skb_gro_header(skb, hlen, off);
+ 	if (unlikely(!th))
+-		goto out;
++		return NULL;
+ 
+ 	thlen = th->doff * 4;
+ 	if (thlen < sizeof(*th))
+-		goto out;
++		return NULL;
+ 
+ 	hlen = off + thlen;
+ 	if (skb_gro_header_hard(skb, hlen)) {
+ 		th = skb_gro_header_slow(skb, hlen, off);
+ 		if (unlikely(!th))
+-			goto out;
++			return NULL;
+ 	}
+ 
+ 	skb_gro_pull(skb, thlen);
+ 
+-	len = skb_gro_len(skb);
+-	flags = tcp_flag_word(th);
+-
+-	list_for_each_entry(p, head, list) {
+-		if (!NAPI_GRO_CB(p)->same_flow)
+-			continue;
++	return th;
++}
+ 
+-		th2 = tcp_hdr(p);
++struct sk_buff *tcp_gro_receive(struct list_head *head, struct sk_buff *skb,
++				struct tcphdr *th)
++{
++	unsigned int thlen = th->doff * 4;
++	struct sk_buff *pp = NULL;
++	struct sk_buff *p;
++	struct tcphdr *th2;
++	unsigned int len;
++	__be32 flags;
++	unsigned int mss = 1;
++	int flush = 1;
++	int i;
+ 
+-		if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
+-			NAPI_GRO_CB(p)->same_flow = 0;
+-			continue;
+-		}
++	len = skb_gro_len(skb);
++	flags = tcp_flag_word(th);
+ 
+-		goto found;
+-	}
+-	p = NULL;
+-	goto out_check_final;
++	p = tcp_gro_lookup(head, th);
++	if (!p)
++		goto out_check_final;
+ 
+-found:
+ 	/* Include the IP ID check below from the inner most IP hdr */
++	th2 = tcp_hdr(p);
+ 	flush = NAPI_GRO_CB(p)->flush;
+ 	flush |= (__force int)(flags & TCP_FLAG_CWR);
+ 	flush |= (__force int)((flags ^ tcp_flag_word(th2)) &
+@@ -269,6 +349,19 @@ found:
+ 	flush |= p->decrypted ^ skb->decrypted;
+ #endif
+ 
++	if (NAPI_GRO_CB(p)->is_flist) {
++		flush |= (__force int)(flags ^ tcp_flag_word(th2));
++		flush |= skb->ip_summed != p->ip_summed;
++		flush |= skb->csum_level != p->csum_level;
++		flush |= !pskb_may_pull(skb, skb_gro_offset(skb));
++		flush |= NAPI_GRO_CB(p)->count >= 64;
++
++		if (flush || skb_gro_receive_list(p, skb))
++			mss = 1;
++
++		goto out_check_final;
++	}
++
+ 	if (flush || skb_gro_receive(p, skb)) {
+ 		mss = 1;
+ 		goto out_check_final;
+@@ -290,7 +383,6 @@ out_check_final:
+ 	if (p && (!NAPI_GRO_CB(skb)->same_flow || flush))
+ 		pp = p;
+ 
+-out:
+ 	NAPI_GRO_CB(skb)->flush |= (flush != 0);
+ 
+ 	return pp;
+@@ -314,18 +406,56 @@ void tcp_gro_complete(struct sk_buff *sk
+ }
+ EXPORT_SYMBOL(tcp_gro_complete);
+ 
++static void tcp4_check_fraglist_gro(struct list_head *head, struct sk_buff *skb,
++				    struct tcphdr *th)
++{
++	const struct iphdr *iph = skb_gro_network_header(skb);
++	struct net *net = dev_net(skb->dev);
++	struct sk_buff *p;
++	struct sock *sk;
++	int iif, sdif;
++
++	if (!(skb->dev->features & NETIF_F_GRO_FRAGLIST))
++		return;
++
++	p = tcp_gro_lookup(head, th);
++	if (p) {
++		NAPI_GRO_CB(skb)->is_flist = NAPI_GRO_CB(p)->is_flist;
++		return;
++	}
++
++	inet_get_iif_sdif(skb, &iif, &sdif);
++	sk = __inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo,
++				       iph->saddr, th->source,
++				       iph->daddr, ntohs(th->dest),
++				       iif, sdif);
++	NAPI_GRO_CB(skb)->is_flist = !sk;
++	if (sk)
++		sock_put(sk);
++}
++
+ INDIRECT_CALLABLE_SCOPE
+ struct sk_buff *tcp4_gro_receive(struct list_head *head, struct sk_buff *skb)
+ {
++	struct tcphdr *th;
++
+ 	/* Don't bother verifying checksum if we're going to flush anyway. */
+ 	if (!NAPI_GRO_CB(skb)->flush &&
+ 	    skb_gro_checksum_validate(skb, IPPROTO_TCP,
+-				      inet_gro_compute_pseudo)) {
+-		NAPI_GRO_CB(skb)->flush = 1;
+-		return NULL;
+-	}
++				      inet_gro_compute_pseudo))
++		goto flush;
++
++	th = tcp_gro_pull_header(skb);
++	if (!th)
++		goto flush;
+ 
+-	return tcp_gro_receive(head, skb);
++	tcp4_check_fraglist_gro(head, skb, th);
++
++	return tcp_gro_receive(head, skb, th);
++
++flush:
++	NAPI_GRO_CB(skb)->flush = 1;
++	return NULL;
+ }
+ 
+ INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
+@@ -333,6 +463,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
+ 	const struct iphdr *iph = ip_hdr(skb);
+ 	struct tcphdr *th = tcp_hdr(skb);
+ 
++	if (NAPI_GRO_CB(skb)->is_flist) {
++		skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV4;
++		skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
++
++		__skb_incr_checksum_unnecessary(skb);
++
++		return 0;
++	}
++
+ 	th->check = ~tcp_v4_check(skb->len - thoff, iph->saddr,
+ 				  iph->daddr, 0);
+ 	skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV4;
+--- a/net/ipv4/udp_offload.c
++++ b/net/ipv4/udp_offload.c
+@@ -433,33 +433,6 @@ out:
+ 	return segs;
+ }
+ 
+-static int skb_gro_receive_list(struct sk_buff *p, struct sk_buff *skb)
+-{
+-	if (unlikely(p->len + skb->len >= 65536))
+-		return -E2BIG;
+-
+-	if (NAPI_GRO_CB(p)->last == p)
+-		skb_shinfo(p)->frag_list = skb;
+-	else
+-		NAPI_GRO_CB(p)->last->next = skb;
+-
+-	skb_pull(skb, skb_gro_offset(skb));
+-
+-	NAPI_GRO_CB(p)->last = skb;
+-	NAPI_GRO_CB(p)->count++;
+-	p->data_len += skb->len;
+-
+-	/* sk ownership - if any - completely transferred to the aggregated packet */
+-	skb->destructor = NULL;
+-	skb->sk = NULL;
+-	p->truesize += skb->truesize;
+-	p->len += skb->len;
+-
+-	NAPI_GRO_CB(skb)->same_flow = 1;
+-
+-	return 0;
+-}
+-
+ 
+ #define UDP_GRO_CNT_MAX 64
+ static struct sk_buff *udp_gro_receive_segment(struct list_head *head,
+--- a/net/ipv6/tcpv6_offload.c
++++ b/net/ipv6/tcpv6_offload.c
+@@ -7,24 +7,65 @@
+  */
+ #include <linux/indirect_call_wrapper.h>
+ #include <linux/skbuff.h>
++#include <net/inet6_hashtables.h>
+ #include <net/gro.h>
+ #include <net/protocol.h>
+ #include <net/tcp.h>
+ #include <net/ip6_checksum.h>
+ #include "ip6_offload.h"
+ 
++static void tcp6_check_fraglist_gro(struct list_head *head, struct sk_buff *skb,
++				    struct tcphdr *th)
++{
++#if IS_ENABLED(CONFIG_IPV6)
++	const struct ipv6hdr *hdr = skb_gro_network_header(skb);
++	struct net *net = dev_net(skb->dev);
++	struct sk_buff *p;
++	struct sock *sk;
++	int iif, sdif;
++
++	if (!(skb->dev->features & NETIF_F_GRO_FRAGLIST))
++		return;
++
++	p = tcp_gro_lookup(head, th);
++	if (p) {
++		NAPI_GRO_CB(skb)->is_flist = NAPI_GRO_CB(p)->is_flist;
++		return;
++	}
++
++	inet6_get_iif_sdif(skb, &iif, &sdif);
++	sk = __inet6_lookup_established(net, net->ipv4.tcp_death_row.hashinfo,
++					&hdr->saddr, th->source,
++					&hdr->daddr, ntohs(th->dest),
++					iif, sdif);
++	NAPI_GRO_CB(skb)->is_flist = !sk;
++	if (sk)
++		sock_put(sk);
++#endif /* IS_ENABLED(CONFIG_IPV6) */
++}
++
+ INDIRECT_CALLABLE_SCOPE
+ struct sk_buff *tcp6_gro_receive(struct list_head *head, struct sk_buff *skb)
+ {
++	struct tcphdr *th;
++
+ 	/* Don't bother verifying checksum if we're going to flush anyway. */
+ 	if (!NAPI_GRO_CB(skb)->flush &&
+ 	    skb_gro_checksum_validate(skb, IPPROTO_TCP,
+-				      ip6_gro_compute_pseudo)) {
+-		NAPI_GRO_CB(skb)->flush = 1;
+-		return NULL;
+-	}
++				      ip6_gro_compute_pseudo))
++		goto flush;
+ 
+-	return tcp_gro_receive(head, skb);
++	th = tcp_gro_pull_header(skb);
++	if (!th)
++		goto flush;
++
++	tcp6_check_fraglist_gro(head, skb, th);
++
++	return tcp_gro_receive(head, skb, th);
++
++flush:
++	NAPI_GRO_CB(skb)->flush = 1;
++	return NULL;
+ }
+ 
+ INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff)
+@@ -32,6 +73,15 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_com
+ 	const struct ipv6hdr *iph = ipv6_hdr(skb);
+ 	struct tcphdr *th = tcp_hdr(skb);
+ 
++	if (NAPI_GRO_CB(skb)->is_flist) {
++		skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV6;
++		skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
++
++		__skb_incr_checksum_unnecessary(skb);
++
++		return 0;
++	}
++
+ 	th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr,
+ 				  &iph->daddr, 0);
+ 	skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV6;
+@@ -51,6 +101,9 @@ static struct sk_buff *tcp6_gso_segment(
+ 	if (!pskb_may_pull(skb, sizeof(*th)))
+ 		return ERR_PTR(-EINVAL);
+ 
++	if (skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST)
++		return skb_segment_list(skb, features, skb_mac_header_len(skb));
++
+ 	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
+ 		const struct ipv6hdr *ipv6h = ipv6_hdr(skb);
+ 		struct tcphdr *th = tcp_hdr(skb);
diff --git a/target/linux/generic/pending-6.6/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch b/target/linux/generic/pending-6.6/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch
index f92f60f349..1f07c0f62c 100644
--- a/target/linux/generic/pending-6.6/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch
+++ b/target/linux/generic/pending-6.6/731-net-permit-ieee80211_ptr-even-with-no-CFG82111-suppo.patch
@@ -17,7 +17,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/include/linux/netdevice.h
 +++ b/include/linux/netdevice.h
-@@ -2245,7 +2245,7 @@ struct net_device {
+@@ -2243,7 +2243,7 @@ struct net_device {
  #if IS_ENABLED(CONFIG_AX25)
  	void			*ax25_ptr;
  #endif
diff --git a/target/linux/generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch b/target/linux/generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
index a918ba31d5..7b4678251d 100644
--- a/target/linux/generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
+++ b/target/linux/generic/pending-6.6/760-net-core-add-optional-threading-for-backlog-processi.patch
@@ -20,7 +20,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  
  /**
   *	napi_disable - prevent NAPI from scheduling
-@@ -3238,6 +3239,7 @@ struct softnet_data {
+@@ -3236,6 +3237,7 @@ struct softnet_data {
  	/* stats */
  	unsigned int		processed;
  	unsigned int		time_squeeze;
@@ -157,7 +157,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  void netif_napi_add_weight(struct net_device *dev, struct napi_struct *napi,
  			   int (*poll)(struct napi_struct *, int), int weight)
  {
-@@ -11351,6 +11422,9 @@ static int dev_cpu_dead(unsigned int old
+@@ -11306,6 +11377,9 @@ static int dev_cpu_dead(unsigned int old
  	raise_softirq_irqoff(NET_TX_SOFTIRQ);
  	local_irq_enable();
  
@@ -167,7 +167,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #ifdef CONFIG_RPS
  	remsd = oldsd->rps_ipi_list;
  	oldsd->rps_ipi_list = NULL;
-@@ -11666,6 +11740,7 @@ static int __init net_dev_init(void)
+@@ -11621,6 +11695,7 @@ static int __init net_dev_init(void)
  		INIT_CSD(&sd->defer_csd, trigger_rx_softirq, sd);
  		spin_lock_init(&sd->defer_lock);
  



From lede-commits at lists.infradead.org  Fri Apr 26 02:12:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 05:12:07 -0400
Subject: [openwrt/openwrt]  sunxi: update the 6.6 DTS_DIR hack
In-Reply-To: <171412272707.3411330.7824298740419728713@git-01.infra.openwrt.org>
References: <171412272707.3411330.7824298740419728713@git-01.infra.openwrt.org>
Message-ID: <mailman.31133.1714122733.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4e9f0e5be49757c95ca224e549655f5f67f3f9ec

commit 4e9f0e5be49757c95ca224e549655f5f67f3f9ec
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Fri Apr 26 11:06:17 2024 +0200

    sunxi: update the 6.6 DTS_DIR hack
    
    Update and simplify the 6.1 vs. 6.6 DTS_DIR hack until 6.1 support is gone.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sunxi/image/Makefile | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/target/linux/sunxi/image/Makefile b/target/linux/sunxi/image/Makefile
index d462880e90..fc1359d173 100644
--- a/target/linux/sunxi/image/Makefile
+++ b/target/linux/sunxi/image/Makefile
@@ -34,9 +34,7 @@ define Device/Default
   KERNEL := kernel-bin | uImage none
   IMAGES := sdcard.img.gz
   IMAGE/sdcard.img.gz := sunxi-sdcard | append-metadata | gzip
-ifneq ($(LINUX_6_1),)
-  SUNXI_DTS_DIR :=
-else
+ifdef CONFIG_LINUX_6_6
   SUNXI_DTS_DIR :=allwinner/
 endif
   SUNXI_DTS = $$(SUNXI_DTS_DIR)$$(SOC)-$(lastword $(subst _, ,$(1)))



From lede-commits at lists.infradead.org  Fri Apr 26 02:41:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 05:41:39 -0400
Subject: [openwrt/openwrt]  mac80211: backport
 ieee80211_set_sband_iftype_data()
In-Reply-To: <171412449889.3579161.1881945621246516355@git-01.infra.openwrt.org>
References: <171412449889.3579161.1881945621246516355@git-01.infra.openwrt.org>
Message-ID: <mailman.31142.1714124502.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/c69482a91276ce06841ec5b3837c9ef3c27cb30a

commit c69482a91276ce06841ec5b3837c9ef3c27cb30a
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Fri Apr 19 13:37:22 2024 +0200

    mac80211: backport ieee80211_set_sband_iftype_data()
    
    It's needed by some drivers, e.g. mt7925, see:
    mt7925/main.c:264:9: error: implicit declaration of function '_ieee80211_set_sband_iftype_data' [-Werror=implicit-function-declaration]
    
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 ...11-add-ieee80211_set_sband_iftype_data-he.patch | 49 ++++++++++++++++++++++
 1 file changed, 49 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/781-wifi-cfg80211-add-ieee80211_set_sband_iftype_data-he.patch b/package/kernel/mac80211/patches/subsys/781-wifi-cfg80211-add-ieee80211_set_sband_iftype_data-he.patch
new file mode 100644
index 0000000000..c2bfdebb97
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/781-wifi-cfg80211-add-ieee80211_set_sband_iftype_data-he.patch
@@ -0,0 +1,49 @@
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Mon, 28 Aug 2023 09:54:39 +0200
+Subject: [PATCH] wifi: cfg80211: add ieee80211_set_sband_iftype_data() helper
+ macro
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+[rmilecki: extract from the e8c1841278a7]
+Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
+---
+
+--- a/include/net/cfg80211.h
++++ b/include/net/cfg80211.h
+@@ -555,6 +555,33 @@ struct ieee80211_supported_band {
+ };
+ 
+ /**
++ * _ieee80211_set_sband_iftype_data - set sband iftype data array
++ * @sband: the sband to initialize
++ * @iftd: the iftype data array pointer
++ * @n_iftd: the length of the iftype data array
++ *
++ * Set the sband iftype data array; use this where the length cannot
++ * be derived from the ARRAY_SIZE() of the argument, but prefer
++ * ieee80211_set_sband_iftype_data() where it can be used.
++ */
++static inline void
++_ieee80211_set_sband_iftype_data(struct ieee80211_supported_band *sband,
++				 const struct ieee80211_sband_iftype_data *iftd,
++				 u16 n_iftd)
++{
++	sband->iftype_data = iftd;
++	sband->n_iftype_data = n_iftd;
++}
++
++/**
++ * ieee80211_set_sband_iftype_data - set sband iftype data array
++ * @sband: the sband to initialize
++ * @iftd: the iftype data array
++ */
++#define ieee80211_set_sband_iftype_data(sband, iftd)	\
++	_ieee80211_set_sband_iftype_data(sband, iftd, ARRAY_SIZE(iftd))
++
++/**
+  * ieee80211_get_sband_iftype_data - return sband data for a given iftype
+  * @sband: the sband to search for the STA on
+  * @iftype: enum nl80211_iftype



From lede-commits at lists.infradead.org  Fri Apr 26 02:41:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 05:41:38 -0400
Subject: [openwrt/openwrt]  mac80211: backport ieee80211_vif_is_mld()
In-Reply-To: <171412449889.3579161.1881945621246516355@git-01.infra.openwrt.org>
References: <171412449889.3579161.1881945621246516355@git-01.infra.openwrt.org>
Message-ID: <mailman.31143.1714124503.1280.lede-commits@lists.infradead.org>

rmilecki pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/17501f822f49af6c47b4a82a103ac54e615e6d2a

commit 17501f822f49af6c47b4a82a103ac54e615e6d2a
Author: Rafa? Mi?ecki <rafal at milecki.pl>
AuthorDate: Fri Apr 19 13:37:21 2024 +0200

    mac80211: backport ieee80211_vif_is_mld()
    
    It's needed by some drivers, e.g. mt7925, see:
    mt7925/mcu.c:2181:23: error: implicit declaration of function 'ieee80211_vif_is_mld' [-Werror=implicit-function-declaration]
    
    Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
---
 ...-wifi-mac80211-warn-only-once-on-AP-probe.patch |  32 ++
 ...347-v6.5-wifi-mac80211-HW-restart-for-MLO.patch | 171 +++++++
 ...c80211-implement-proper-AP-MLD-HW-restart.patch |  84 ++++
 ...11-Add-getter-functions-for-vif-MLD-state.patch | 538 +++++++++++++++++++++
 4 files changed, 825 insertions(+)

diff --git a/package/kernel/mac80211/patches/subsys/346-v6.4-wifi-mac80211-warn-only-once-on-AP-probe.patch b/package/kernel/mac80211/patches/subsys/346-v6.4-wifi-mac80211-warn-only-once-on-AP-probe.patch
new file mode 100644
index 0000000000..3844ae6f7f
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/346-v6.4-wifi-mac80211-warn-only-once-on-AP-probe.patch
@@ -0,0 +1,32 @@
+From a1e91ef92392e5da15a1a16f8545ede2c02f7049 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Wed, 1 Mar 2023 12:09:24 +0200
+Subject: [PATCH] wifi: mac80211: warn only once on AP probe
+
+We should perhaps support this API for MLO, but it's not
+clear that it makes sense, in any case then we'd have to
+update it to probe the correct BSS.
+
+For now, if it happens, warn only once so that we don't
+get flooded with messages if the driver misbehaves and
+calls this.
+
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+Signed-off-by: Gregory Greenman <gregory.greenman at intel.com>
+Link: https://lore.kernel.org/r/20230301115906.1c8499b6fbe6.I1a76a2be3b42ff93904870ac069f0319507adc23 at changeid
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ net/mac80211/mlme.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -3233,7 +3233,7 @@ static void ieee80211_mgd_probe_ap(struc
+ 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ 	bool already = false;
+ 
+-	if (WARN_ON(sdata->vif.valid_links))
++	if (WARN_ON_ONCE(sdata->vif.valid_links))
+ 		return;
+ 
+ 	if (!ieee80211_sdata_running(sdata))
diff --git a/package/kernel/mac80211/patches/subsys/347-v6.5-wifi-mac80211-HW-restart-for-MLO.patch b/package/kernel/mac80211/patches/subsys/347-v6.5-wifi-mac80211-HW-restart-for-MLO.patch
new file mode 100644
index 0000000000..d61f583bca
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/347-v6.5-wifi-mac80211-HW-restart-for-MLO.patch
@@ -0,0 +1,171 @@
+From acb8bca343f8d5b8697d027771abf8a371580d53 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Thu, 4 May 2023 16:45:05 +0300
+Subject: [PATCH] wifi: mac80211: HW restart for MLO
+
+Implement proper reconfiguration for interfaces that are
+doing MLO, in order to be able to recover from HW restart
+correctly.
+
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+Signed-off-by: Gregory Greenman <gregory.greenman at intel.com>
+Link: https://lore.kernel.org/r/20230504134511.828474-6-gregory.greenman at intel.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ net/mac80211/util.c | 107 ++++++++++++++++++++++++++++++--------------
+ 1 file changed, 73 insertions(+), 34 deletions(-)
+
+--- a/net/mac80211/util.c
++++ b/net/mac80211/util.c
+@@ -2493,21 +2493,55 @@ int ieee80211_reconfig(struct ieee80211_
+ 
+ 	/* Finally also reconfigure all the BSS information */
+ 	list_for_each_entry(sdata, &local->interfaces, list) {
++		/* common change flags for all interface types - link only */
++		u32 changed = BSS_CHANGED_ERP_CTS_PROT |
++			      BSS_CHANGED_ERP_PREAMBLE |
++			      BSS_CHANGED_ERP_SLOT |
++			      BSS_CHANGED_HT |
++			      BSS_CHANGED_BASIC_RATES |
++			      BSS_CHANGED_BEACON_INT |
++			      BSS_CHANGED_BSSID |
++			      BSS_CHANGED_CQM |
++			      BSS_CHANGED_QOS |
++			      BSS_CHANGED_TXPOWER |
++			      BSS_CHANGED_MCAST_RATE;
++		struct ieee80211_link_data *link = NULL;
+ 		unsigned int link_id;
+-		u32 changed;
++		u32 active_links = 0;
+ 
+ 		if (!ieee80211_sdata_running(sdata))
+ 			continue;
+ 
+ 		sdata_lock(sdata);
++		if (sdata->vif.valid_links) {
++			struct ieee80211_bss_conf *old[IEEE80211_MLD_MAX_NUM_LINKS] = {
++				[0] = &sdata->vif.bss_conf,
++			};
++
++			if (sdata->vif.type == NL80211_IFTYPE_STATION) {
++				/* start with a single active link */
++				active_links = sdata->vif.active_links;
++				link_id = ffs(active_links) - 1;
++				sdata->vif.active_links = BIT(link_id);
++			}
++
++			drv_change_vif_links(local, sdata, 0,
++					     sdata->vif.active_links,
++					     old);
++		}
++
+ 		for (link_id = 0;
+ 		     link_id < ARRAY_SIZE(sdata->vif.link_conf);
+ 		     link_id++) {
+-			struct ieee80211_link_data *link;
++			if (sdata->vif.valid_links &&
++			    !(sdata->vif.active_links & BIT(link_id)))
++				continue;
+ 
+ 			link = sdata_dereference(sdata->link[link_id], sdata);
+-			if (link)
+-				ieee80211_assign_chanctx(local, sdata, link);
++			if (!link)
++				continue;
++
++			ieee80211_assign_chanctx(local, sdata, link);
+ 		}
+ 
+ 		switch (sdata->vif.type) {
+@@ -2527,42 +2561,42 @@ int ieee80211_reconfig(struct ieee80211_
+ 					    &sdata->deflink.tx_conf[i]);
+ 			break;
+ 		}
+-		sdata_unlock(sdata);
+-
+-		/* common change flags for all interface types */
+-		changed = BSS_CHANGED_ERP_CTS_PROT |
+-			  BSS_CHANGED_ERP_PREAMBLE |
+-			  BSS_CHANGED_ERP_SLOT |
+-			  BSS_CHANGED_HT |
+-			  BSS_CHANGED_BASIC_RATES |
+-			  BSS_CHANGED_BEACON_INT |
+-			  BSS_CHANGED_BSSID |
+-			  BSS_CHANGED_CQM |
+-			  BSS_CHANGED_QOS |
+-			  BSS_CHANGED_IDLE |
+-			  BSS_CHANGED_TXPOWER |
+-			  BSS_CHANGED_MCAST_RATE;
+ 
+ 		if (sdata->vif.bss_conf.mu_mimo_owner)
+ 			changed |= BSS_CHANGED_MU_GROUPS;
+ 
++		if (!sdata->vif.valid_links)
++			changed |= BSS_CHANGED_IDLE;
++
+ 		switch (sdata->vif.type) {
+ 		case NL80211_IFTYPE_STATION:
+-			changed |= BSS_CHANGED_ASSOC |
+-				   BSS_CHANGED_ARP_FILTER |
+-				   BSS_CHANGED_PS;
+-
+-			/* Re-send beacon info report to the driver */
+-			if (sdata->deflink.u.mgd.have_beacon)
+-				changed |= BSS_CHANGED_BEACON_INFO;
+-
+-			if (sdata->vif.bss_conf.max_idle_period ||
+-			    sdata->vif.bss_conf.protected_keep_alive)
+-				changed |= BSS_CHANGED_KEEP_ALIVE;
+-
+-			sdata_lock(sdata);
+-			ieee80211_bss_info_change_notify(sdata, changed);
+-			sdata_unlock(sdata);
++			if (!sdata->vif.valid_links) {
++				changed |= BSS_CHANGED_ASSOC |
++					   BSS_CHANGED_ARP_FILTER |
++					   BSS_CHANGED_PS;
++
++				/* Re-send beacon info report to the driver */
++				if (sdata->deflink.u.mgd.have_beacon)
++					changed |= BSS_CHANGED_BEACON_INFO;
++
++				if (sdata->vif.bss_conf.max_idle_period ||
++				    sdata->vif.bss_conf.protected_keep_alive)
++					changed |= BSS_CHANGED_KEEP_ALIVE;
++
++				if (sdata->vif.bss_conf.eht_puncturing)
++					changed |= BSS_CHANGED_EHT_PUNCTURING;
++
++				ieee80211_bss_info_change_notify(sdata,
++								 changed);
++			} else if (!WARN_ON(!link)) {
++				ieee80211_link_info_change_notify(sdata, link,
++								  changed);
++				changed = BSS_CHANGED_ASSOC |
++					  BSS_CHANGED_IDLE |
++					  BSS_CHANGED_PS |
++					  BSS_CHANGED_ARP_FILTER;
++				ieee80211_vif_cfg_change_notify(sdata, changed);
++			}
+ 			break;
+ 		case NL80211_IFTYPE_OCB:
+ 			changed |= BSS_CHANGED_OCB;
+@@ -2597,6 +2631,7 @@ int ieee80211_reconfig(struct ieee80211_
+ 		case NL80211_IFTYPE_NAN:
+ 			res = ieee80211_reconfig_nan(sdata);
+ 			if (res < 0) {
++				sdata_unlock(sdata);
+ 				ieee80211_handle_reconfig_failure(local);
+ 				return res;
+ 			}
+@@ -2614,6 +2649,10 @@ int ieee80211_reconfig(struct ieee80211_
+ 			WARN_ON(1);
+ 			break;
+ 		}
++		sdata_unlock(sdata);
++
++		if (active_links)
++			ieee80211_set_active_links(&sdata->vif, active_links);
+ 	}
+ 
+ 	ieee80211_recalc_ps(local);
diff --git a/package/kernel/mac80211/patches/subsys/348-v6.5-wifi-mac80211-implement-proper-AP-MLD-HW-restart.patch b/package/kernel/mac80211/patches/subsys/348-v6.5-wifi-mac80211-implement-proper-AP-MLD-HW-restart.patch
new file mode 100644
index 0000000000..f811c5d617
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/348-v6.5-wifi-mac80211-implement-proper-AP-MLD-HW-restart.patch
@@ -0,0 +1,84 @@
+From 61403414e1719f929386dda8fb954bb302628ef3 Mon Sep 17 00:00:00 2001
+From: Johannes Berg <johannes.berg at intel.com>
+Date: Thu, 4 May 2023 16:45:11 +0300
+Subject: [PATCH] wifi: mac80211: implement proper AP MLD HW restart
+
+Previously, I didn't implement restarting here at all if the
+interface is an MLD, so it only worked for non-MLO. Add the
+needed code to restart an AP MLD correctly.
+
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+Signed-off-by: Gregory Greenman <gregory.greenman at intel.com>
+Link: https://lore.kernel.org/r/20230504134511.828474-12-gregory.greenman at intel.com
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ net/mac80211/util.c | 44 +++++++++++++++++++++++++++++++++++++++++++-
+ 1 file changed, 43 insertions(+), 1 deletion(-)
+
+--- a/net/mac80211/util.c
++++ b/net/mac80211/util.c
+@@ -2344,6 +2344,35 @@ static int ieee80211_reconfig_nan(struct
+ 	return 0;
+ }
+ 
++static void ieee80211_reconfig_ap_links(struct ieee80211_local *local,
++					struct ieee80211_sub_if_data *sdata,
++					u32 changed)
++{
++	int link_id;
++
++	for (link_id = 0; link_id < ARRAY_SIZE(sdata->link); link_id++) {
++		struct ieee80211_link_data *link;
++
++		if (!(sdata->vif.active_links & BIT(link_id)))
++			continue;
++
++		link = sdata_dereference(sdata->link[link_id], sdata);
++		if (!link)
++			continue;
++
++		if (rcu_access_pointer(link->u.ap.beacon))
++			drv_start_ap(local, sdata, link->conf);
++
++		if (!link->conf->enable_beacon)
++			continue;
++
++		changed |= BSS_CHANGED_BEACON |
++			   BSS_CHANGED_BEACON_ENABLED;
++
++		ieee80211_link_info_change_notify(sdata, link, changed);
++	}
++}
++
+ int ieee80211_reconfig(struct ieee80211_local *local)
+ {
+ 	struct ieee80211_hw *hw = &local->hw;
+@@ -2606,7 +2635,13 @@ int ieee80211_reconfig(struct ieee80211_
+ 			changed |= BSS_CHANGED_IBSS;
+ 			fallthrough;
+ 		case NL80211_IFTYPE_AP:
+-			changed |= BSS_CHANGED_SSID | BSS_CHANGED_P2P_PS;
++			changed |= BSS_CHANGED_P2P_PS;
++
++			if (sdata->vif.valid_links)
++				ieee80211_vif_cfg_change_notify(sdata,
++								BSS_CHANGED_SSID);
++			else
++				changed |= BSS_CHANGED_SSID;
+ 
+ 			if (sdata->vif.bss_conf.ftm_responder == 1 &&
+ 			    wiphy_ext_feature_isset(sdata->local->hw.wiphy,
+@@ -2616,6 +2651,13 @@ int ieee80211_reconfig(struct ieee80211_
+ 			if (sdata->vif.type == NL80211_IFTYPE_AP) {
+ 				changed |= BSS_CHANGED_AP_PROBE_RESP;
+ 
++				if (sdata->vif.valid_links) {
++					ieee80211_reconfig_ap_links(local,
++								    sdata,
++								    changed);
++					break;
++				}
++
+ 				if (rcu_access_pointer(sdata->deflink.u.ap.beacon))
+ 					drv_start_ap(local, sdata,
+ 						     sdata->deflink.conf);
diff --git a/package/kernel/mac80211/patches/subsys/349-v6.5-wifi-mac80211-Add-getter-functions-for-vif-MLD-state.patch b/package/kernel/mac80211/patches/subsys/349-v6.5-wifi-mac80211-Add-getter-functions-for-vif-MLD-state.patch
new file mode 100644
index 0000000000..25f8a7cb57
--- /dev/null
+++ b/package/kernel/mac80211/patches/subsys/349-v6.5-wifi-mac80211-Add-getter-functions-for-vif-MLD-state.patch
@@ -0,0 +1,538 @@
+From f1871abd27641c020298b5c7654e1d8341f22e5f Mon Sep 17 00:00:00 2001
+From: Ilan Peer <ilan.peer at intel.com>
+Date: Thu, 8 Jun 2023 16:36:08 +0300
+Subject: [PATCH] wifi: mac80211: Add getter functions for vif MLD state
+
+As a preparation to support disabled/dormant links, add the
+following function:
+
+- ieee80211_vif_usable_links(): returns the bitmap of the links
+  that can be activated. Use this function in all the places that
+  the bitmap of the usable links is needed.
+
+- ieee80211_vif_is_mld(): returns true iff the vif is an MLD.
+  Use this function in all the places where an indication that the
+  connection is a MLD is needed.
+
+Signed-off-by: Ilan Peer <ilan.peer at intel.com>
+Signed-off-by: Gregory Greenman <gregory.greenman at intel.com>
+Link: https://lore.kernel.org/r/20230608163202.86e3351da1fc.If6fe3a339fda2019f13f57ff768ecffb711b710a at changeid
+Signed-off-by: Johannes Berg <johannes.berg at intel.com>
+---
+ include/net/mac80211.h     | 21 +++++++++++++++++++
+ net/mac80211/cfg.c         |  4 ++--
+ net/mac80211/debug.h       |  8 +++----
+ net/mac80211/ieee80211_i.h |  2 +-
+ net/mac80211/iface.c       |  4 ++--
+ net/mac80211/link.c        |  4 ++--
+ net/mac80211/mlme.c        | 43 +++++++++++++++++++-------------------
+ net/mac80211/rx.c          |  2 +-
+ net/mac80211/tx.c          | 22 +++++++++----------
+ net/mac80211/util.c        | 14 ++++++-------
+ 10 files changed, 73 insertions(+), 51 deletions(-)
+
+--- a/include/net/mac80211.h
++++ b/include/net/mac80211.h
+@@ -1927,6 +1927,27 @@ struct ieee80211_vif {
+ 	u8 drv_priv[] __aligned(sizeof(void *));
+ };
+ 
++/**
++ * ieee80211_vif_usable_links - Return the usable links for the vif
++ * @vif: the vif for which the usable links are requested
++ * Return: the usable link bitmap
++ */
++static inline u16 ieee80211_vif_usable_links(const struct ieee80211_vif *vif)
++{
++	return vif->valid_links;
++}
++
++/**
++ * ieee80211_vif_is_mld - Returns true iff the vif is an MLD one
++ * @vif: the vif
++ * Return: %true if the vif is an MLD, %false otherwise.
++ */
++static inline bool ieee80211_vif_is_mld(const struct ieee80211_vif *vif)
++{
++	/* valid_links != 0 indicates this vif is an MLD */
++	return vif->valid_links != 0;
++}
++
+ #define for_each_vif_active_link(vif, link, link_id)				\
+ 	for (link_id = 0; link_id < ARRAY_SIZE((vif)->link_conf); link_id++)	\
+ 		if ((!(vif)->active_links ||					\
+--- a/net/mac80211/cfg.c
++++ b/net/mac80211/cfg.c
+@@ -35,7 +35,7 @@ ieee80211_link_or_deflink(struct ieee802
+ 		 * the return value at all (if it's not a pairwise key),
+ 		 * so in that case (require_valid==false) don't error.
+ 		 */
+-		if (require_valid && sdata->vif.valid_links)
++		if (require_valid && ieee80211_vif_is_mld(&sdata->vif))
+ 			return ERR_PTR(-EINVAL);
+ 
+ 		return &sdata->deflink;
+@@ -228,7 +228,7 @@ static int ieee80211_change_iface(struct
+ 			return 0;
+ 
+ 		/* FIXME: no support for 4-addr MLO yet */
+-		if (sdata->vif.valid_links)
++		if (ieee80211_vif_is_mld(&sdata->vif))
+ 			return -EOPNOTSUPP;
+ 
+ 		sdata->u.mgd.use_4addr = params->use_4addr;
+--- a/net/mac80211/debug.h
++++ b/net/mac80211/debug.h
+@@ -1,7 +1,7 @@
+ /* SPDX-License-Identifier: GPL-2.0 */
+ /*
+  * Portions
+- * Copyright (C) 2022 Intel Corporation
++ * Copyright (C) 2022 - 2023 Intel Corporation
+  */
+ #ifndef __MAC80211_DEBUG_H
+ #define __MAC80211_DEBUG_H
+@@ -136,7 +136,7 @@ do {									\
+ 
+ #define link_info(link, fmt, ...)					\
+ 	do {								\
+-		if ((link)->sdata->vif.valid_links)			\
++		if (ieee80211_vif_is_mld(&(link)->sdata->vif))          \
+ 			_sdata_info((link)->sdata, "[link %d] " fmt,	\
+ 				    (link)->link_id,			\
+ 				    ##__VA_ARGS__);			\
+@@ -145,7 +145,7 @@ do {									\
+ 	} while (0)
+ #define link_err(link, fmt, ...)					\
+ 	do {								\
+-		if ((link)->sdata->vif.valid_links)			\
++		if (ieee80211_vif_is_mld(&(link)->sdata->vif))          \
+ 			_sdata_err((link)->sdata, "[link %d] " fmt,	\
+ 				   (link)->link_id,			\
+ 				   ##__VA_ARGS__);			\
+@@ -154,7 +154,7 @@ do {									\
+ 	} while (0)
+ #define link_dbg(link, fmt, ...)					\
+ 	do {								\
+-		if ((link)->sdata->vif.valid_links)			\
++		if (ieee80211_vif_is_mld(&(link)->sdata->vif))          \
+ 			_sdata_dbg(1, (link)->sdata, "[link %d] " fmt,	\
+ 				   (link)->link_id,			\
+ 				   ##__VA_ARGS__);			\
+--- a/net/mac80211/ieee80211_i.h
++++ b/net/mac80211/ieee80211_i.h
+@@ -1596,7 +1596,7 @@ ieee80211_get_sband(struct ieee80211_sub
+ 	struct ieee80211_chanctx_conf *chanctx_conf;
+ 	enum nl80211_band band;
+ 
+-	WARN_ON(sdata->vif.valid_links);
++	WARN_ON(ieee80211_vif_is_mld(&sdata->vif));
+ 
+ 	rcu_read_lock();
+ 	chanctx_conf = rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
+--- a/net/mac80211/iface.c
++++ b/net/mac80211/iface.c
+@@ -521,7 +521,7 @@ static void ieee80211_do_stop(struct iee
+ 	cancel_work_sync(&sdata->recalc_smps);
+ 
+ 	sdata_lock(sdata);
+-	WARN(sdata->vif.valid_links,
++	WARN(ieee80211_vif_is_mld(&sdata->vif),
+ 	     "destroying interface with valid links 0x%04x\n",
+ 	     sdata->vif.valid_links);
+ 
+@@ -1818,7 +1818,7 @@ static int ieee80211_runtime_change_ifty
+ 		return -EBUSY;
+ 
+ 	/* for now, don't support changing while links exist */
+-	if (sdata->vif.valid_links)
++	if (ieee80211_vif_is_mld(&sdata->vif))
+ 		return -EBUSY;
+ 
+ 	switch (sdata->vif.type) {
+--- a/net/mac80211/link.c
++++ b/net/mac80211/link.c
+@@ -324,7 +324,7 @@ static int _ieee80211_set_active_links(s
+ 		return -EINVAL;
+ 
+ 	/* cannot activate links that don't exist */
+-	if (active_links & ~sdata->vif.valid_links)
++	if (active_links & ~ieee80211_vif_usable_links(&sdata->vif))
+ 		return -EINVAL;
+ 
+ 	/* nothing to do */
+@@ -463,7 +463,7 @@ void ieee80211_set_active_links_async(st
+ 		return;
+ 
+ 	/* cannot activate links that don't exist */
+-	if (active_links & ~sdata->vif.valid_links)
++	if (active_links & ~ieee80211_vif_usable_links(&sdata->vif))
+ 		return;
+ 
+ 	/* nothing to do */
+--- a/net/mac80211/mlme.c
++++ b/net/mac80211/mlme.c
+@@ -1281,7 +1281,7 @@ static void ieee80211_assoc_add_ml_elem(
+ 	u8 *ml_elem_len;
+ 	void *capab_pos;
+ 
+-	if (!sdata->vif.valid_links)
++	if (!ieee80211_vif_is_mld(&sdata->vif))
+ 		return;
+ 
+ 	ift_ext_capa = cfg80211_get_iftype_ext_capa(local->hw.wiphy,
+@@ -1455,7 +1455,7 @@ static int ieee80211_send_assoc(struct i
+ 			capab |= WLAN_CAPABILITY_PRIVACY;
+ 	}
+ 
+-	if (sdata->vif.valid_links) {
++	if (ieee80211_vif_is_mld(&sdata->vif)) {
+ 		/* consider the multi-link element with STA profile */
+ 		size += sizeof(struct ieee80211_multi_link_elem);
+ 		/* max common info field in basic multi-link element */
+@@ -1786,7 +1786,7 @@ void ieee80211_chswitch_done(struct ieee
+ 	struct ieee80211_sub_if_data *sdata = vif_to_sdata(vif);
+ 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ 
+-	if (WARN_ON(sdata->vif.valid_links))
++	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
+ 		success = false;
+ 
+ 	trace_api_chswitch_done(sdata, success);
+@@ -2849,7 +2849,7 @@ static void ieee80211_set_associated(str
+ 	if (vif_cfg->arp_addr_cnt)
+ 		vif_changed |= BSS_CHANGED_ARP_FILTER;
+ 
+-	if (sdata->vif.valid_links) {
++	if (ieee80211_vif_is_mld(&sdata->vif)) {
+ 		for (link_id = 0;
+ 		     link_id < IEEE80211_MLD_MAX_NUM_LINKS;
+ 		     link_id++) {
+@@ -2880,7 +2880,7 @@ static void ieee80211_set_associated(str
+ 	mutex_unlock(&local->iflist_mtx);
+ 
+ 	/* leave this here to not change ordering in non-MLO cases */
+-	if (!sdata->vif.valid_links)
++	if (!ieee80211_vif_is_mld(&sdata->vif))
+ 		ieee80211_recalc_smps(sdata, &sdata->deflink);
+ 	ieee80211_recalc_ps_vif(sdata);
+ 
+@@ -2976,7 +2976,7 @@ static void ieee80211_set_disassoc(struc
+ 	sta_info_flush(sdata);
+ 
+ 	/* finally reset all BSS / config parameters */
+-	if (!sdata->vif.valid_links)
++	if (!ieee80211_vif_is_mld(&sdata->vif))
+ 		changed |= ieee80211_reset_erp_info(sdata);
+ 
+ 	ieee80211_led_assoc(local, 0);
+@@ -3001,7 +3001,7 @@ static void ieee80211_set_disassoc(struc
+ 	       sizeof(sdata->vif.bss_conf.mu_group.membership));
+ 	memset(sdata->vif.bss_conf.mu_group.position, 0,
+ 	       sizeof(sdata->vif.bss_conf.mu_group.position));
+-	if (!sdata->vif.valid_links)
++	if (!ieee80211_vif_is_mld(&sdata->vif))
+ 		changed |= BSS_CHANGED_MU_GROUPS;
+ 	sdata->vif.bss_conf.mu_mimo_owner = false;
+ 
+@@ -3015,7 +3015,7 @@ static void ieee80211_set_disassoc(struc
+ 		changed |= BSS_CHANGED_ARP_FILTER;
+ 
+ 	sdata->vif.bss_conf.qos = false;
+-	if (!sdata->vif.valid_links) {
++	if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 		changed |= BSS_CHANGED_QOS;
+ 		/* The BSSID (not really interesting) and HT changed */
+ 		changed |= BSS_CHANGED_BSSID | BSS_CHANGED_HT;
+@@ -3185,7 +3185,7 @@ static void ieee80211_mgd_probe_ap_send(
+ 	u8 unicast_limit = max(1, max_probe_tries - 3);
+ 	struct sta_info *sta;
+ 
+-	if (WARN_ON(sdata->vif.valid_links))
++	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
+ 		return;
+ 
+ 	/*
+@@ -3233,7 +3233,7 @@ static void ieee80211_mgd_probe_ap(struc
+ 	struct ieee80211_if_managed *ifmgd = &sdata->u.mgd;
+ 	bool already = false;
+ 
+-	if (WARN_ON_ONCE(sdata->vif.valid_links))
++	if (WARN_ON_ONCE(ieee80211_vif_is_mld(&sdata->vif)))
+ 		return;
+ 
+ 	if (!ieee80211_sdata_running(sdata))
+@@ -3308,7 +3308,7 @@ struct sk_buff *ieee80211_ap_probereq_ge
+ 	int ssid_len;
+ 
+ 	if (WARN_ON(sdata->vif.type != NL80211_IFTYPE_STATION ||
+-		    sdata->vif.valid_links))
++		    ieee80211_vif_is_mld(&sdata->vif)))
+ 		return NULL;
+ 
+ 	sdata_assert_lock(sdata);
+@@ -3373,7 +3373,8 @@ static void __ieee80211_disconnect(struc
+ 	}
+ 
+ 	/* in MLO assume we have a link where we can TX the frame */
+-	tx = sdata->vif.valid_links || !sdata->deflink.csa_block_tx;
++	tx = ieee80211_vif_is_mld(&sdata->vif) ||
++		!sdata->deflink.csa_block_tx;
+ 
+ 	if (!ifmgd->driver_disconnect) {
+ 		unsigned int link_id;
+@@ -3572,7 +3573,7 @@ static void ieee80211_destroy_assoc_data
+ 			for (i = 0; i < ARRAY_SIZE(data.bss); i++)
+ 				data.bss[i] = assoc_data->link[i].bss;
+ 
+-			if (sdata->vif.valid_links)
++			if (ieee80211_vif_is_mld(&sdata->vif))
+ 				data.ap_mld_addr = assoc_data->ap_addr;
+ 
+ 			cfg80211_assoc_failure(sdata->dev, &data);
+@@ -4950,7 +4951,7 @@ static bool ieee80211_assoc_success(stru
+ 	if (WARN_ON(!sta))
+ 		goto out_err;
+ 
+-	if (sdata->vif.valid_links) {
++	if (ieee80211_vif_is_mld(&sdata->vif)) {
+ 		u16 valid_links = 0;
+ 
+ 		for (link_id = 0; link_id < IEEE80211_MLD_MAX_NUM_LINKS; link_id++) {
+@@ -4979,7 +4980,7 @@ static bool ieee80211_assoc_success(stru
+ 		if (WARN_ON(!link))
+ 			goto out_err;
+ 
+-		if (sdata->vif.valid_links)
++		if (ieee80211_vif_is_mld(&sdata->vif))
+ 			link_info(link,
+ 				  "local address %pM, AP link address %pM\n",
+ 				  link->conf->addr,
+@@ -5211,7 +5212,7 @@ static void ieee80211_rx_mgmt_assoc_resp
+ 			ifmgd->broken_ap = true;
+ 		}
+ 
+-		if (sdata->vif.valid_links) {
++		if (ieee80211_vif_is_mld(&sdata->vif)) {
+ 			if (!elems->multi_link) {
+ 				sdata_info(sdata,
+ 					   "MLO association with %pM but no multi-link element in response!\n",
+@@ -5275,7 +5276,7 @@ static void ieee80211_rx_mgmt_assoc_resp
+ 				resp.uapsd_queues |= ieee80211_ac_to_qos_mask[ac];
+ 	}
+ 
+-	if (sdata->vif.valid_links) {
++	if (ieee80211_vif_is_mld(&sdata->vif)) {
+ 		ether_addr_copy(ap_mld_addr, sdata->vif.cfg.ap_addr);
+ 		resp.ap_mld_addr = ap_mld_addr;
+ 	}
+@@ -5600,7 +5601,7 @@ static void ieee80211_rx_mgmt_beacon(str
+ 	rcu_read_unlock();
+ 
+ 	if (ifmgd->assoc_data && ifmgd->assoc_data->need_beacon &&
+-	    !WARN_ON(sdata->vif.valid_links) &&
++	    !WARN_ON(ieee80211_vif_is_mld(&sdata->vif)) &&
+ 	    ieee80211_rx_our_beacon(bssid, ifmgd->assoc_data->link[0].bss)) {
+ 		parse_params.bss = ifmgd->assoc_data->link[0].bss;
+ 		elems = ieee802_11_parse_elems_full(&parse_params);
+@@ -6289,7 +6290,7 @@ static void ieee80211_sta_bcn_mon_timer(
+ 	struct ieee80211_sub_if_data *sdata =
+ 		from_timer(sdata, t, u.mgd.bcn_mon_timer);
+ 
+-	if (WARN_ON(sdata->vif.valid_links))
++	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
+ 		return;
+ 
+ 	if (sdata->vif.bss_conf.csa_active &&
+@@ -6313,7 +6314,7 @@ static void ieee80211_sta_conn_mon_timer
+ 	struct sta_info *sta;
+ 	unsigned long timeout;
+ 
+-	if (WARN_ON(sdata->vif.valid_links))
++	if (WARN_ON(ieee80211_vif_is_mld(&sdata->vif)))
+ 		return;
+ 
+ 	if (sdata->vif.bss_conf.csa_active &&
+@@ -6868,7 +6869,7 @@ int ieee80211_mgd_auth(struct ieee80211_
+ 	return 0;
+ 
+  err_clear:
+-	if (!sdata->vif.valid_links) {
++	if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 		eth_zero_addr(sdata->deflink.u.mgd.bssid);
+ 		ieee80211_link_info_change_notify(sdata, &sdata->deflink,
+ 						  BSS_CHANGED_BSSID);
+--- a/net/mac80211/rx.c
++++ b/net/mac80211/rx.c
+@@ -2524,7 +2524,7 @@ bool ieee80211_is_our_addr(struct ieee80
+ 	if (ether_addr_equal(sdata->vif.addr, addr))
+ 		return true;
+ 
+-	if (!sdata->vif.valid_links)
++	if (!ieee80211_vif_is_mld(&sdata->vif))
+ 		return false;
+ 
+ 	for (link_id = 0; link_id < ARRAY_SIZE(sdata->vif.link_conf); link_id++) {
+--- a/net/mac80211/tx.c
++++ b/net/mac80211/tx.c
+@@ -860,7 +860,7 @@ ieee80211_tx_h_sequence(struct ieee80211
+ 
+ 	/* SNS11 from 802.11be 10.3.2.14 */
+ 	if (unlikely(is_multicast_ether_addr(hdr->addr1) &&
+-		     info->control.vif->valid_links &&
++		     ieee80211_vif_is_mld(info->control.vif) &&
+ 		     info->control.vif->type == NL80211_IFTYPE_AP)) {
+ 		if (info->control.flags & IEEE80211_TX_CTRL_MCAST_MLO_FIRST_TX)
+ 			tx->sdata->mld_mcast_seq += 0x10;
+@@ -2629,7 +2629,7 @@ static struct sk_buff *ieee80211_build_h
+ 	ethertype = (skb->data[12] << 8) | skb->data[13];
+ 	fc = cpu_to_le16(IEEE80211_FTYPE_DATA | IEEE80211_STYPE_DATA);
+ 
+-	if (!sdata->vif.valid_links)
++	if (!ieee80211_vif_is_mld(&sdata->vif))
+ 		chanctx_conf =
+ 			rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
+ 
+@@ -2646,7 +2646,7 @@ static struct sk_buff *ieee80211_build_h
+ 			authorized = test_sta_flag(sta, WLAN_STA_AUTHORIZED);
+ 			wme_sta = sta->sta.wme;
+ 		}
+-		if (!sdata->vif.valid_links) {
++		if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 			struct ieee80211_sub_if_data *ap_sdata;
+ 
+ 			/* override chanctx_conf from AP (we don't have one) */
+@@ -2664,7 +2664,7 @@ static struct sk_buff *ieee80211_build_h
+ 		/* DA BSSID SA */
+ 		memcpy(hdr.addr1, skb->data, ETH_ALEN);
+ 
+-		if (sdata->vif.valid_links && sta && !sta->sta.mlo) {
++		if (ieee80211_vif_is_mld(&sdata->vif) && sta && !sta->sta.mlo) {
+ 			struct ieee80211_link_data *link;
+ 
+ 			link_id = sta->deflink.link_id;
+@@ -2816,7 +2816,7 @@ static struct sk_buff *ieee80211_build_h
+ 	}
+ 
+ 	if (!chanctx_conf) {
+-		if (!sdata->vif.valid_links) {
++		if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 			ret = -ENOTCONN;
+ 			goto free;
+ 		}
+@@ -3058,7 +3058,7 @@ void ieee80211_check_fast_xmit(struct st
+ 	    !ieee80211_hw_check(&local->hw, SUPPORTS_TX_FRAG))
+ 		goto out;
+ 
+-	if (!sdata->vif.valid_links) {
++	if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 		rcu_read_lock();
+ 		chanctx_conf =
+ 			rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
+@@ -3129,7 +3129,7 @@ void ieee80211_check_fast_xmit(struct st
+ 		fc |= cpu_to_le16(IEEE80211_FCTL_FROMDS);
+ 		/* DA BSSID SA */
+ 		build.da_offs = offsetof(struct ieee80211_hdr, addr1);
+-		if (sta->sta.mlo || !sdata->vif.valid_links) {
++		if (sta->sta.mlo || !ieee80211_vif_is_mld(&sdata->vif)) {
+ 			memcpy(hdr->addr2, sdata->vif.addr, ETH_ALEN);
+ 		} else {
+ 			unsigned int link_id = sta->deflink.link_id;
+@@ -4499,7 +4499,7 @@ netdev_tx_t ieee80211_subif_start_xmit(s
+ 			__ieee80211_subif_start_xmit(skb, dev, 0,
+ 						     IEEE80211_TX_CTRL_MLO_LINK_UNSPEC,
+ 						     NULL);
+-	} else if (sdata->vif.valid_links &&
++	} else if (ieee80211_vif_is_mld(&sdata->vif) &&
+ 		   sdata->vif.type == NL80211_IFTYPE_AP &&
+ 		   !ieee80211_hw_check(&sdata->local->hw, MLO_MCAST_MULTI_LINK_TX)) {
+ 		ieee80211_mlo_multicast_tx(dev, skb);
+@@ -4777,7 +4777,7 @@ static bool ieee80211_tx_pending_skb(str
+ 
+ 	if (info->control.flags & IEEE80211_TX_INTCFL_NEED_TXPROCESSING) {
+ 		/* update band only for non-MLD */
+-		if (!sdata->vif.valid_links) {
++		if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 			chanctx_conf =
+ 				rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
+ 			if (unlikely(!chanctx_conf)) {
+@@ -6000,7 +6000,7 @@ void __ieee80211_tx_skb_tid_band(struct
+ 	BUILD_BUG_ON(!FIELD_FIT(IEEE80211_TX_CTRL_MLO_LINK,
+ 				IEEE80211_LINK_UNSPECIFIED));
+ 
+-	if (!sdata->vif.valid_links) {
++	if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 		link = 0;
+ 	} else if (link_id >= 0) {
+ 		link = link_id;
+@@ -6046,7 +6046,7 @@ void ieee80211_tx_skb_tid(struct ieee802
+ 	enum nl80211_band band;
+ 
+ 	rcu_read_lock();
+-	if (!sdata->vif.valid_links) {
++	if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 		WARN_ON(link_id >= 0);
+ 		chanctx_conf =
+ 			rcu_dereference(sdata->vif.bss_conf.chanctx_conf);
+--- a/net/mac80211/util.c
++++ b/net/mac80211/util.c
+@@ -1701,7 +1701,7 @@ void ieee80211_send_auth(struct ieee8021
+ 	struct ieee80211_local *local = sdata->local;
+ 	struct sk_buff *skb;
+ 	struct ieee80211_mgmt *mgmt;
+-	bool multi_link = sdata->vif.valid_links;
++	bool multi_link = ieee80211_vif_is_mld(&sdata->vif);
+ 	struct {
+ 		u8 id;
+ 		u8 len;
+@@ -2542,7 +2542,7 @@ int ieee80211_reconfig(struct ieee80211_
+ 			continue;
+ 
+ 		sdata_lock(sdata);
+-		if (sdata->vif.valid_links) {
++		if (ieee80211_vif_is_mld(&sdata->vif)) {
+ 			struct ieee80211_bss_conf *old[IEEE80211_MLD_MAX_NUM_LINKS] = {
+ 				[0] = &sdata->vif.bss_conf,
+ 			};
+@@ -2562,7 +2562,7 @@ int ieee80211_reconfig(struct ieee80211_
+ 		for (link_id = 0;
+ 		     link_id < ARRAY_SIZE(sdata->vif.link_conf);
+ 		     link_id++) {
+-			if (sdata->vif.valid_links &&
++			if (ieee80211_vif_is_mld(&sdata->vif) &&
+ 			    !(sdata->vif.active_links & BIT(link_id)))
+ 				continue;
+ 
+@@ -2594,12 +2594,12 @@ int ieee80211_reconfig(struct ieee80211_
+ 		if (sdata->vif.bss_conf.mu_mimo_owner)
+ 			changed |= BSS_CHANGED_MU_GROUPS;
+ 
+-		if (!sdata->vif.valid_links)
++		if (!ieee80211_vif_is_mld(&sdata->vif))
+ 			changed |= BSS_CHANGED_IDLE;
+ 
+ 		switch (sdata->vif.type) {
+ 		case NL80211_IFTYPE_STATION:
+-			if (!sdata->vif.valid_links) {
++			if (!ieee80211_vif_is_mld(&sdata->vif)) {
+ 				changed |= BSS_CHANGED_ASSOC |
+ 					   BSS_CHANGED_ARP_FILTER |
+ 					   BSS_CHANGED_PS;
+@@ -2637,7 +2637,7 @@ int ieee80211_reconfig(struct ieee80211_
+ 		case NL80211_IFTYPE_AP:
+ 			changed |= BSS_CHANGED_P2P_PS;
+ 
+-			if (sdata->vif.valid_links)
++			if (ieee80211_vif_is_mld(&sdata->vif))
+ 				ieee80211_vif_cfg_change_notify(sdata,
+ 								BSS_CHANGED_SSID);
+ 			else
+@@ -2651,7 +2651,7 @@ int ieee80211_reconfig(struct ieee80211_
+ 			if (sdata->vif.type == NL80211_IFTYPE_AP) {
+ 				changed |= BSS_CHANGED_AP_PROBE_RESP;
+ 
+-				if (sdata->vif.valid_links) {
++				if (ieee80211_vif_is_mld(&sdata->vif)) {
+ 					ieee80211_reconfig_ap_links(local,
+ 								    sdata,
+ 								    changed);



From lede-commits at lists.infradead.org  Fri Apr 26 03:25:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 06:25:04 -0400
Subject: [openwrt/openwrt]  ath79: update 900-unaligned_access_hacks.patch
 after recent GRO change
In-Reply-To: <171412710440.3803831.2737022734818686440@git-01.infra.openwrt.org>
References: <171412710440.3803831.2737022734818686440@git-01.infra.openwrt.org>
Message-ID: <mailman.31163.1714127123.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/366544083e94ce86287b2194942f924fd1a29647

commit 366544083e94ce86287b2194942f924fd1a29647
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Apr 26 12:24:21 2024 +0200

    ath79: update 900-unaligned_access_hacks.patch after recent GRO change
    
    Fixes build error
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../ath79/patches-6.1/900-unaligned_access_hacks.patch    | 15 ++++++++++++---
 1 file changed, 12 insertions(+), 3 deletions(-)

diff --git a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
index e1c6835afd..da56bc306d 100644
--- a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
@@ -858,16 +858,25 @@ SVN-Revision: 35130
  
 --- a/net/ipv4/tcp_offload.c
 +++ b/net/ipv4/tcp_offload.c
-@@ -220,7 +220,7 @@ struct sk_buff *tcp_gro_receive(struct l
+@@ -60,7 +60,7 @@ static struct sk_buff *__tcpv4_gso_segme
+ 	th2 = tcp_hdr(seg->next);
+ 	iph2 = ip_hdr(seg->next);
  
- 		th2 = tcp_hdr(p);
+-	if (!(*(u32 *)&th->source ^ *(u32 *)&th2->source) &&
++	if (!(net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) &&
+ 	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
+ 		return segs;
+ 
+@@ -252,7 +252,7 @@ struct sk_buff *tcp_gro_lookup(struct li
+ 			continue;
  
+ 		th2 = tcp_hdr(p);
 -		if (*(u32 *)&th->source ^ *(u32 *)&th2->source) {
 +		if (net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) {
  			NAPI_GRO_CB(p)->same_flow = 0;
  			continue;
  		}
-@@ -238,8 +238,8 @@ found:
+@@ -318,8 +318,8 @@ struct sk_buff *tcp_gro_receive(struct l
  		  ~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
  	flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
  	for (i = sizeof(*th); i < thlen; i += 4)



From lede-commits at lists.infradead.org  Fri Apr 26 03:31:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 06:31:04 -0400
Subject: [openwrt/openwrt]  ipq806x: switch default to 6.6
In-Reply-To: <171412746436.3835549.2179310675970977569@git-01.infra.openwrt.org>
References: <171412746436.3835549.2179310675970977569@git-01.infra.openwrt.org>
Message-ID: <mailman.31166.1714127468.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fd36d4a7ab25273ab264f044ecb5b75366cc54bd

commit fd36d4a7ab25273ab264f044ecb5b75366cc54bd
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 26 12:26:53 2024 +0200

    ipq806x: switch default to 6.6
    
    Switch default kernel version for ipq806x to 6.6.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq806x/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/ipq806x/Makefile b/target/linux/ipq806x/Makefile
index cd6f3dc2d3..6bb93d9725 100644
--- a/target/linux/ipq806x/Makefile
+++ b/target/linux/ipq806x/Makefile
@@ -10,8 +10,7 @@ CPU_TYPE:=cortex-a15
 CPU_SUBTYPE:=neon-vfpv4
 SUBTARGETS:=generic chromium
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 KERNELNAME:=zImage Image dtbs
 



From lede-commits at lists.infradead.org  Fri Apr 26 03:31:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 06:31:06 -0400
Subject: [openwrt/openwrt]  ipq40xx: switch default to 6.6
In-Reply-To: <171412746436.3835549.2179310675970977569@git-01.infra.openwrt.org>
References: <171412746436.3835549.2179310675970977569@git-01.infra.openwrt.org>
Message-ID: <mailman.31167.1714127470.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/414646ef6cae8a542f7334f252ae2f40f35148be

commit 414646ef6cae8a542f7334f252ae2f40f35148be
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 26 12:29:30 2024 +0200

    ipq40xx: switch default to 6.6
    
    Switch default kernel version for ipq40xx to 6.6.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/ipq40xx/Makefile b/target/linux/ipq40xx/Makefile
index be48e4be52..30091e5d29 100644
--- a/target/linux/ipq40xx/Makefile
+++ b/target/linux/ipq40xx/Makefile
@@ -8,8 +8,7 @@ CPU_TYPE:=cortex-a7
 CPU_SUBTYPE:=neon-vfpv4
 SUBTARGETS:=generic chromium mikrotik
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 KERNELNAME:=zImage Image dtbs
 



From lede-commits at lists.infradead.org  Fri Apr 26 03:42:59 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 06:42:59 -0400
Subject: [openwrt/openwrt]  bcm53xx: update
 600-net-disable-GRO-by-default.patch after recent GRO change
In-Reply-To: <171412817926.3900912.4168599019748775257@git-01.infra.openwrt.org>
References: <171412817926.3900912.4168599019748775257@git-01.infra.openwrt.org>
Message-ID: <mailman.31176.1714128184.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/61c846ea7c5af997cfc1159f82648a9e69eb32d6

commit 61c846ea7c5af997cfc1159f82648a9e69eb32d6
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Fri Apr 26 12:41:01 2024 +0200

    bcm53xx: update 600-net-disable-GRO-by-default.patch after recent GRO change
    
    Fixes build error
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../linux/bcm53xx/patches-6.1/600-net-disable-GRO-by-default.patch  | 6 +++---
 .../linux/bcm53xx/patches-6.6/600-net-disable-GRO-by-default.patch  | 6 +++---
 2 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/target/linux/bcm53xx/patches-6.1/600-net-disable-GRO-by-default.patch b/target/linux/bcm53xx/patches-6.1/600-net-disable-GRO-by-default.patch
index 9f6343c791..9fa41a4b7e 100644
--- a/target/linux/bcm53xx/patches-6.1/600-net-disable-GRO-by-default.patch
+++ b/target/linux/bcm53xx/patches-6.1/600-net-disable-GRO-by-default.patch
@@ -25,12 +25,12 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
  #define NETIF_F_UPPER_DISABLES	NETIF_F_LRO
  
  /* changeable features with no special hardware requirements */
--#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO)
+-#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO | NETIF_F_GRO_FRAGLIST)
 +#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO)
  
  /* Changeable features with no special hardware requirements that defaults to off. */
--#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_FRAGLIST | NETIF_F_GRO_UDP_FWD)
-+#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_FRAGLIST | NETIF_F_GRO_UDP_FWD | NETIF_F_GRO)
+-#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_UDP_FWD)
++#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_UDP_FWD | NETIF_F_GRO | NETIF_F_GRO_FRAGLIST)
  
  #define NETIF_F_VLAN_FEATURES	(NETIF_F_HW_VLAN_CTAG_FILTER | \
  				 NETIF_F_HW_VLAN_CTAG_RX | \
diff --git a/target/linux/bcm53xx/patches-6.6/600-net-disable-GRO-by-default.patch b/target/linux/bcm53xx/patches-6.6/600-net-disable-GRO-by-default.patch
index 9f6343c791..9fa41a4b7e 100644
--- a/target/linux/bcm53xx/patches-6.6/600-net-disable-GRO-by-default.patch
+++ b/target/linux/bcm53xx/patches-6.6/600-net-disable-GRO-by-default.patch
@@ -25,12 +25,12 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
  #define NETIF_F_UPPER_DISABLES	NETIF_F_LRO
  
  /* changeable features with no special hardware requirements */
--#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO)
+-#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO | NETIF_F_GRO | NETIF_F_GRO_FRAGLIST)
 +#define NETIF_F_SOFT_FEATURES	(NETIF_F_GSO)
  
  /* Changeable features with no special hardware requirements that defaults to off. */
--#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_FRAGLIST | NETIF_F_GRO_UDP_FWD)
-+#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_FRAGLIST | NETIF_F_GRO_UDP_FWD | NETIF_F_GRO)
+-#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_UDP_FWD)
++#define NETIF_F_SOFT_FEATURES_OFF	(NETIF_F_GRO_UDP_FWD | NETIF_F_GRO | NETIF_F_GRO_FRAGLIST)
  
  #define NETIF_F_VLAN_FEATURES	(NETIF_F_HW_VLAN_CTAG_FILTER | \
  				 NETIF_F_HW_VLAN_CTAG_RX | \



From lede-commits at lists.infradead.org  Fri Apr 26 03:52:42 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 06:52:42 -0400
Subject: [openwrt/openwrt]  ipq806x: set DEVICE_DTS_DIR to /qcom by default
In-Reply-To: <171412876214.3950832.14562308424399405921@git-01.infra.openwrt.org>
References: <171412876214.3950832.14562308424399405921@git-01.infra.openwrt.org>
Message-ID: <mailman.31203.1714128782.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/b0dae2098a64ba3e00924e5fdc5da1892543cebb

commit b0dae2098a64ba3e00924e5fdc5da1892543cebb
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 26 12:50:47 2024 +0200

    ipq806x: set DEVICE_DTS_DIR to /qcom by default
    
    Set DEVICE_DTS_DIR to /qcom by default instead of limiting it to
    TESTING_KERNEL since we moved 6.6 to default version.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq806x/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq806x/image/Makefile b/target/linux/ipq806x/image/Makefile
index c6be9371e3..b616fecfbb 100644
--- a/target/linux/ipq806x/image/Makefile
+++ b/target/linux/ipq806x/image/Makefile
@@ -6,7 +6,7 @@ include $(INCLUDE_DIR)/image.mk
 define Device/Default
 	PROFILES := Default
 	KERNEL_LOADADDR = 0x42208000
-	DEVICE_DTS_DIR = $(if $(CONFIG_TESTING_KERNEL),$$(DTS_DIR)/qcom,$$(DTS_DIR))
+	DEVICE_DTS_DIR = $$(DTS_DIR)/qcom
 	DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
 	DEVICE_DTS_CONFIG := config at 1
 	IMAGES := sysupgrade.bin



From lede-commits at lists.infradead.org  Fri Apr 26 03:52:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 06:52:43 -0400
Subject: [openwrt/openwrt]  ipq40xx: set DEVICE_DTS_DIR to /qcom by default
In-Reply-To: <171412876214.3950832.14562308424399405921@git-01.infra.openwrt.org>
References: <171412876214.3950832.14562308424399405921@git-01.infra.openwrt.org>
Message-ID: <mailman.31204.1714128782.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0bb8d68de59783e3b3d85759ce0419e629942048

commit 0bb8d68de59783e3b3d85759ce0419e629942048
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 26 12:52:06 2024 +0200

    ipq40xx: set DEVICE_DTS_DIR to /qcom by default
    
    Set DEVICE_DTS_DIR to /qcom by default instead of limiting it to
    TESTING_KERNEL since we moved 6.6 to default version.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 target/linux/ipq40xx/image/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/image/Makefile b/target/linux/ipq40xx/image/Makefile
index fe99d05ccb..4928e47ef6 100644
--- a/target/linux/ipq40xx/image/Makefile
+++ b/target/linux/ipq40xx/image/Makefile
@@ -5,7 +5,7 @@ define Device/Default
 	PROFILES := Default
 	KERNEL_DEPENDS = $$(wildcard $(DTS_DIR)/$$(DEVICE_DTS).dts)
 	KERNEL_LOADADDR := 0x80208000
-	DEVICE_DTS_DIR = $(if $(CONFIG_TESTING_KERNEL),$$(DTS_DIR)/qcom,$$(DTS_DIR))
+	DEVICE_DTS_DIR = $$(DTS_DIR)/qcom
 	DEVICE_DTS = $$(SOC)-$(lastword $(subst _, ,$(1)))
 	DEVICE_DTS_CONFIG := config at 1
 	IMAGES := sysupgrade.bin



From lede-commits at lists.infradead.org  Fri Apr 26 04:28:29 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 07:28:29 -0400
Subject: [openwrt/openwrt]  ipq-wifi: update to Git HEAD (2024-04-26)
In-Reply-To: <171413090899.4129094.5206109742865788675@git-01.infra.openwrt.org>
References: <171413090899.4129094.5206109742865788675@git-01.infra.openwrt.org>
Message-ID: <mailman.31223.1714130915.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f10d55df9e0a2622d4b2d08b79b9a8c9c585cfef

commit f10d55df9e0a2622d4b2d08b79b9a8c9c585cfef
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Fri Apr 26 13:28:09 2024 +0200

    ipq-wifi: update to Git HEAD (2024-04-26)
    
    fab9e29f6b92 ipq6018: update regdb in TPLink EAP610-Outdoor BDF
    6d02b65fadf3 ipq8074: update RegDB in new submitted BDF
    644ba9ea2e66 ipq6018: update RegDB in new submitted BDF
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/firmware/ipq-wifi/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index ced4ece692..25e755c2b7 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -6,9 +6,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
-PKG_SOURCE_DATE:=2024-04-16
-PKG_SOURCE_VERSION:=1d51799e6768a304da7840b8346e7487efd77f49
-PKG_MIRROR_HASH:=9cf0917532283c1a1708643022a5ed1ec4af6bb9ebaff57fc2f0f2c229f2469e
+PKG_SOURCE_DATE:=2024-04-26
+PKG_SOURCE_VERSION:=644ba9ea2e6685e420561ef098cb6fbaaf136cbf
+PKG_MIRROR_HASH:=e6b4bc1bb7a7e93477ebec0a0bbed0e46d7b82f66c9d879198e9afbbcdf1ac0b
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Fri Apr 26 19:21:48 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Fri, 26 Apr 2024 22:21:48 -0400
Subject: [openwrt/openwrt]  generic: 6.1,
 6.6: remove patch which breaks WAN on MT7621
In-Reply-To: <171418450836.379233.812559104959189427@git-01.infra.openwrt.org>
References: <171418450836.379233.812559104959189427@git-01.infra.openwrt.org>
Message-ID: <mailman.31446.1714184524.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a8dde7e5bd6d289db6485cf57d3512ea62eaa827

commit a8dde7e5bd6d289db6485cf57d3512ea62eaa827
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Apr 27 03:19:03 2024 +0100

    generic: 6.1, 6.6: remove patch which breaks WAN on MT7621
    
    Importing pending patch "net: dsa: mt7530: move MT753X_MTRAP operations
    for MT7530" broke WAN connectivity on most MT7621 which use PHY-muxing
    to hook up either port 0 or port 4 to GMAC1.
    
    Remove it for now until the author submits a fixed version.
    
    Fixes: https://github.com/openwrt/openwrt/issues/15279
    Fixes: https://github.com/openwrt/openwrt/issues/15273
    Fixes: d40691a5fb ("generic: 6.1, 6.6: mt7530: import pending patches")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...530-move-MT753X_MTRAP-operations-for-MT75.patch | 117 ---------------------
 ...530-return-mt7530_setup_mdio-mt7531_setup.patch |   4 +-
 ...530-define-MAC-speed-capabilities-per-swi.patch |   8 +-
 ...a-mt7530-get-rid-of-function-sanity-check.patch |   2 +-
 ...-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch |   4 +-
 ...530-use-priv-ds-num_ports-instead-of-MT75.patch |   8 +-
 ...530-do-not-pass-port-variable-to-mt7531_r.patch |   4 +-
 ...530-explain-exposing-MDIO-bus-of-MT7531AE.patch |   2 +-
 ...530-move-MT753X_MTRAP-operations-for-MT75.patch | 117 ---------------------
 ...530-return-mt7530_setup_mdio-mt7531_setup.patch |   4 +-
 ...530-define-MAC-speed-capabilities-per-swi.patch |   8 +-
 ...a-mt7530-get-rid-of-function-sanity-check.patch |   2 +-
 ...-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch |   4 +-
 ...530-use-priv-ds-num_ports-instead-of-MT75.patch |   8 +-
 ...530-do-not-pass-port-variable-to-mt7531_r.patch |   4 +-
 ...530-explain-exposing-MDIO-bus-of-MT7531AE.patch |   2 +-
 16 files changed, 32 insertions(+), 266 deletions(-)

diff --git a/target/linux/generic/pending-6.1/795-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch b/target/linux/generic/pending-6.1/795-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
deleted file mode 100644
index e7da939588..0000000000
--- a/target/linux/generic/pending-6.1/795-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 2982f395c9a513b168f1e685588f70013cba2f5f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Mon, 22 Apr 2024 10:15:14 +0300
-Subject: [PATCH 07/15] net: dsa: mt7530: move MT753X_MTRAP operations for
- MT7530
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-On MT7530, the media-independent interfaces of port 5 and 6 are controlled
-by the MT7530_P5_DIS and MT7530_P6_DIS bits of the hardware trap. Deal with
-these bits only when the relevant port is being enabled or disabled. This
-ensures that these ports will be disabled when they are not in use.
-
-Do not set MT7530_CHG_TRAP on mt7530_setup_port5() as that's already being
-done on mt7530_setup().
-
-Instead of globally setting MT7530_P5_MAC_SEL, clear it, then set it only
-on the appropriate case.
-
-If PHY muxing is detected, clear MT7530_P5_DIS before calling
-mt7530_setup_port5().
-
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
- drivers/net/dsa/mt7530.c | 38 +++++++++++++++++++++++++++-----------
- 1 file changed, 27 insertions(+), 11 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -873,8 +873,7 @@ static void mt7530_setup_port5(struct ds
- 
- 	val = mt7530_read(priv, MT753X_MTRAP);
- 
--	val |= MT7530_CHG_TRAP | MT7530_P5_MAC_SEL | MT7530_P5_DIS;
--	val &= ~MT7530_P5_RGMII_MODE & ~MT7530_P5_PHY0_SEL;
-+	val &= ~MT7530_P5_PHY0_SEL & ~MT7530_P5_MAC_SEL & ~MT7530_P5_RGMII_MODE;
- 
- 	switch (priv->p5_mode) {
- 	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
-@@ -884,15 +883,13 @@ static void mt7530_setup_port5(struct ds
- 
- 	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
- 	case MUX_PHY_P4:
--		val &= ~MT7530_P5_MAC_SEL & ~MT7530_P5_DIS;
--
- 		/* Setup the MAC by default for the cpu port */
- 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
- 		break;
- 
- 	/* GMAC5: P5 -> SoC MAC or external PHY */
- 	default:
--		val &= ~MT7530_P5_DIS;
-+		val |= MT7530_P5_MAC_SEL;
- 		break;
- 	}
- 
-@@ -1186,6 +1183,14 @@ mt7530_port_enable(struct dsa_switch *ds
- 
- 	mutex_unlock(&priv->reg_mutex);
- 
-+	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
-+		return 0;
-+
-+	if (port == 5)
-+		mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
-+	else if (port == 6)
-+		mt7530_clear(priv, MT753X_MTRAP, MT7530_P6_DIS);
-+
- 	return 0;
- }
- 
-@@ -1204,6 +1209,14 @@ mt7530_port_disable(struct dsa_switch *d
- 		   PCR_MATRIX_CLR);
- 
- 	mutex_unlock(&priv->reg_mutex);
-+
-+	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
-+		return;
-+
-+	if (port == 5)
-+		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
-+	else if (port == 6)
-+		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
- }
- 
- static int
-@@ -2392,11 +2405,11 @@ mt7530_setup(struct dsa_switch *ds)
- 		mt7530_rmw(priv, MT7530_TRGMII_RD(i),
- 			   RD_TAP_MASK, RD_TAP(16));
- 
--	/* Enable port 6 */
--	val = mt7530_read(priv, MT753X_MTRAP);
--	val &= ~MT7530_P6_DIS & ~MT7530_PHY_INDIRECT_ACCESS;
--	val |= MT7530_CHG_TRAP;
--	mt7530_write(priv, MT753X_MTRAP, val);
-+	/* Allow modifying the trap and directly access PHY registers via the
-+	 * MDIO bus the switch is on.
-+	 */
-+	mt7530_rmw(priv, MT753X_MTRAP, MT7530_CHG_TRAP |
-+		   MT7530_PHY_INDIRECT_ACCESS, MT7530_CHG_TRAP);
- 
- 	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
- 		mt7530_pll_setup(priv);
-@@ -2479,8 +2492,11 @@ mt7530_setup(struct dsa_switch *ds)
- 			break;
- 		}
- 
--		if (priv->p5_mode == MUX_PHY_P0 || priv->p5_mode == MUX_PHY_P4)
-+		if (priv->p5_mode == MUX_PHY_P0 ||
-+		    priv->p5_mode == MUX_PHY_P4) {
-+			mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
- 			mt7530_setup_port5(ds, interface);
-+		}
- 	}
- 
- #ifdef CONFIG_GPIOLIB
diff --git a/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch b/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
index 7cc145327c..5624a64599 100644
--- a/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
+++ b/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2658,7 +2658,9 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2642,7 +2642,9 @@ mt7531_setup(struct dsa_switch *ds)
  					 0);
  	}
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	/* Setup VLAN ID 0 for VLAN-unaware bridges */
  	ret = mt7530_setup_vlan0(priv);
-@@ -3017,6 +3019,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3001,6 +3003,8 @@ mt753x_setup(struct dsa_switch *ds)
  	ret = mt7530_setup_mdio(priv);
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
diff --git a/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch b/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
index f4d19db274..ed7923f9ee 100644
--- a/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
+++ b/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
@@ -24,7 +24,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2676,6 +2676,8 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2660,6 +2660,8 @@ mt7531_setup(struct dsa_switch *ds)
  static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
@@ -33,7 +33,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2707,6 +2709,8 @@ static void mt7531_mac_port_get_caps(str
+@@ -2691,6 +2693,8 @@ static void mt7531_mac_port_get_caps(str
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -42,7 +42,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2746,14 +2750,17 @@ static void mt7988_mac_port_get_caps(str
+@@ -2730,14 +2734,17 @@ static void mt7988_mac_port_get_caps(str
  	case 0 ... 3:
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  config->supported_interfaces);
@@ -62,7 +62,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	}
  }
  
-@@ -2923,9 +2930,7 @@ static void mt753x_phylink_get_caps(stru
+@@ -2907,9 +2914,7 @@ static void mt753x_phylink_get_caps(stru
  {
  	struct mt7530_priv *priv = ds->priv;
  
diff --git a/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch b/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
index 5bb7756c51..f674ab7c6b 100644
--- a/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
+++ b/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3220,13 +3220,6 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3204,13 +3204,6 @@ mt7530_probe_common(struct mt7530_priv *
  	if (!priv->info)
  		return -EINVAL;
  
diff --git a/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch b/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
index f8147b6412..b1d08a74e3 100644
--- a/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
+++ b/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3048,10 +3048,10 @@ static int mt753x_get_mac_eee(struct dsa
+@@ -3032,10 +3032,10 @@ static int mt753x_get_mac_eee(struct dsa
  			      struct ethtool_eee *e)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -32,7 +32,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	return 0;
  }
-@@ -3065,11 +3065,11 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3049,11 +3049,11 @@ static int mt753x_set_mac_eee(struct dsa
  	if (e->tx_lpi_timer > 0xFFF)
  		return -EINVAL;
  
diff --git a/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch b/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
index 0037f97499..ce75556791 100644
--- a/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
+++ b/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1404,7 +1404,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1391,7 +1391,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	mt7530_rmw(priv, MT7530_PPBV1_P(port), G0_PORT_VID_MASK,
  		   G0_PORT_VID_DEF);
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		if (dsa_is_user_port(ds, i) &&
  		    dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
  			all_user_ports_removed = false;
-@@ -2419,7 +2419,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2406,7 +2406,7 @@ mt7530_setup(struct dsa_switch *ds)
  	/* Enable and reset MIB counters */
  	mt7530_mib_reset(ds);
  
@@ -37,7 +37,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2530,7 +2530,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2514,7 +2514,7 @@ mt7531_setup_common(struct dsa_switch *d
  	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
  		     UNU_FFP_MASK);
  
@@ -46,7 +46,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2617,7 +2617,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2601,7 +2601,7 @@ mt7531_setup(struct dsa_switch *ds)
  	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
  
  	/* Force link down on all ports before internal reset */
diff --git a/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch b/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
index ee8e13ea70..e12d084c2f 100644
--- a/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
+++ b/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2776,7 +2776,7 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2760,7 +2760,7 @@ mt7530_mac_config(struct dsa_switch *ds,
  		mt7530_setup_port6(priv->ds, interface);
  }
  
@@ -26,7 +26,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  			       phy_interface_t interface,
  			       struct phy_device *phydev)
  {
-@@ -2827,7 +2827,7 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2811,7 +2811,7 @@ mt7531_mac_config(struct dsa_switch *ds,
  	if (phy_interface_mode_is_rgmii(interface)) {
  		dp = dsa_to_port(ds, port);
  		phydev = dp->slave->phydev;
diff --git a/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch b/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
index 666bcb75e8..0eaf4fc2e8 100644
--- a/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
+++ b/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2626,7 +2626,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2610,7 +2610,10 @@ mt7531_setup(struct dsa_switch *ds)
  	if (!priv->p5_sgmii) {
  		mt7531_pll_setup(priv);
  	} else {
diff --git a/target/linux/generic/pending-6.6/745-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch b/target/linux/generic/pending-6.6/745-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
deleted file mode 100644
index f7802c02db..0000000000
--- a/target/linux/generic/pending-6.6/745-07-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
+++ /dev/null
@@ -1,117 +0,0 @@
-From 2982f395c9a513b168f1e685588f70013cba2f5f Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Mon, 22 Apr 2024 10:15:14 +0300
-Subject: [PATCH 07/15] net: dsa: mt7530: move MT753X_MTRAP operations for
- MT7530
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-On MT7530, the media-independent interfaces of port 5 and 6 are controlled
-by the MT7530_P5_DIS and MT7530_P6_DIS bits of the hardware trap. Deal with
-these bits only when the relevant port is being enabled or disabled. This
-ensures that these ports will be disabled when they are not in use.
-
-Do not set MT7530_CHG_TRAP on mt7530_setup_port5() as that's already being
-done on mt7530_setup().
-
-Instead of globally setting MT7530_P5_MAC_SEL, clear it, then set it only
-on the appropriate case.
-
-If PHY muxing is detected, clear MT7530_P5_DIS before calling
-mt7530_setup_port5().
-
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
- drivers/net/dsa/mt7530.c | 38 +++++++++++++++++++++++++++-----------
- 1 file changed, 27 insertions(+), 11 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -880,8 +880,7 @@ static void mt7530_setup_port5(struct ds
- 
- 	val = mt7530_read(priv, MT753X_MTRAP);
- 
--	val |= MT7530_CHG_TRAP | MT7530_P5_MAC_SEL | MT7530_P5_DIS;
--	val &= ~MT7530_P5_RGMII_MODE & ~MT7530_P5_PHY0_SEL;
-+	val &= ~MT7530_P5_PHY0_SEL & ~MT7530_P5_MAC_SEL & ~MT7530_P5_RGMII_MODE;
- 
- 	switch (priv->p5_mode) {
- 	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
-@@ -891,15 +890,13 @@ static void mt7530_setup_port5(struct ds
- 
- 	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
- 	case MUX_PHY_P4:
--		val &= ~MT7530_P5_MAC_SEL & ~MT7530_P5_DIS;
--
- 		/* Setup the MAC by default for the cpu port */
- 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
- 		break;
- 
- 	/* GMAC5: P5 -> SoC MAC or external PHY */
- 	default:
--		val &= ~MT7530_P5_DIS;
-+		val |= MT7530_P5_MAC_SEL;
- 		break;
- 	}
- 
-@@ -1193,6 +1190,14 @@ mt7530_port_enable(struct dsa_switch *ds
- 
- 	mutex_unlock(&priv->reg_mutex);
- 
-+	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
-+		return 0;
-+
-+	if (port == 5)
-+		mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
-+	else if (port == 6)
-+		mt7530_clear(priv, MT753X_MTRAP, MT7530_P6_DIS);
-+
- 	return 0;
- }
- 
-@@ -1211,6 +1216,14 @@ mt7530_port_disable(struct dsa_switch *d
- 		   PCR_MATRIX_CLR);
- 
- 	mutex_unlock(&priv->reg_mutex);
-+
-+	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
-+		return;
-+
-+	if (port == 5)
-+		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
-+	else if (port == 6)
-+		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
- }
- 
- static int
-@@ -2401,11 +2414,11 @@ mt7530_setup(struct dsa_switch *ds)
- 		mt7530_rmw(priv, MT7530_TRGMII_RD(i),
- 			   RD_TAP_MASK, RD_TAP(16));
- 
--	/* Enable port 6 */
--	val = mt7530_read(priv, MT753X_MTRAP);
--	val &= ~MT7530_P6_DIS & ~MT7530_PHY_INDIRECT_ACCESS;
--	val |= MT7530_CHG_TRAP;
--	mt7530_write(priv, MT753X_MTRAP, val);
-+	/* Allow modifying the trap and directly access PHY registers via the
-+	 * MDIO bus the switch is on.
-+	 */
-+	mt7530_rmw(priv, MT753X_MTRAP, MT7530_CHG_TRAP |
-+		   MT7530_PHY_INDIRECT_ACCESS, MT7530_CHG_TRAP);
- 
- 	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
- 		mt7530_pll_setup(priv);
-@@ -2488,8 +2501,11 @@ mt7530_setup(struct dsa_switch *ds)
- 			break;
- 		}
- 
--		if (priv->p5_mode == MUX_PHY_P0 || priv->p5_mode == MUX_PHY_P4)
-+		if (priv->p5_mode == MUX_PHY_P0 ||
-+		    priv->p5_mode == MUX_PHY_P4) {
-+			mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
- 			mt7530_setup_port5(ds, interface);
-+		}
- 	}
- 
- #ifdef CONFIG_GPIOLIB
diff --git a/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch b/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
index 2eaa77c8cf..3d16bf75d2 100644
--- a/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
+++ b/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2667,7 +2667,9 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2651,7 +2651,9 @@ mt7531_setup(struct dsa_switch *ds)
  					 0);
  	}
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	/* Setup VLAN ID 0 for VLAN-unaware bridges */
  	ret = mt7530_setup_vlan0(priv);
-@@ -3020,6 +3022,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3004,6 +3006,8 @@ mt753x_setup(struct dsa_switch *ds)
  	ret = mt7530_setup_mdio(priv);
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
diff --git a/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch b/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
index 9a592c759d..4e89bb2464 100644
--- a/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
+++ b/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
@@ -24,7 +24,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2685,6 +2685,8 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2669,6 +2669,8 @@ mt7531_setup(struct dsa_switch *ds)
  static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
@@ -33,7 +33,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2716,6 +2718,8 @@ static void mt7531_mac_port_get_caps(str
+@@ -2700,6 +2702,8 @@ static void mt7531_mac_port_get_caps(str
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -42,7 +42,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2755,14 +2759,17 @@ static void mt7988_mac_port_get_caps(str
+@@ -2739,14 +2743,17 @@ static void mt7988_mac_port_get_caps(str
  	case 0 ... 3:
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  config->supported_interfaces);
@@ -62,7 +62,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	}
  }
  
-@@ -2932,9 +2939,7 @@ static void mt753x_phylink_get_caps(stru
+@@ -2916,9 +2923,7 @@ static void mt753x_phylink_get_caps(stru
  {
  	struct mt7530_priv *priv = ds->priv;
  
diff --git a/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch b/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
index bc84ecb778..df43224c47 100644
--- a/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
+++ b/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3232,13 +3232,6 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3216,13 +3216,6 @@ mt7530_probe_common(struct mt7530_priv *
  	if (!priv->info)
  		return -EINVAL;
  
diff --git a/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch b/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
index e75db9ba30..df7085f89c 100644
--- a/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
+++ b/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3051,10 +3051,10 @@ static int mt753x_get_mac_eee(struct dsa
+@@ -3035,10 +3035,10 @@ static int mt753x_get_mac_eee(struct dsa
  			      struct ethtool_eee *e)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -32,7 +32,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	return 0;
  }
-@@ -3068,11 +3068,11 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3052,11 +3052,11 @@ static int mt753x_set_mac_eee(struct dsa
  	if (e->tx_lpi_timer > 0xFFF)
  		return -EINVAL;
  
diff --git a/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch b/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
index f63d4d7705..d1f692f73a 100644
--- a/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
+++ b/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1411,7 +1411,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1398,7 +1398,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	mt7530_rmw(priv, MT7530_PPBV1_P(port), G0_PORT_VID_MASK,
  		   G0_PORT_VID_DEF);
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		if (dsa_is_user_port(ds, i) &&
  		    dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
  			all_user_ports_removed = false;
-@@ -2428,7 +2428,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2415,7 +2415,7 @@ mt7530_setup(struct dsa_switch *ds)
  	/* Enable and reset MIB counters */
  	mt7530_mib_reset(ds);
  
@@ -37,7 +37,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2539,7 +2539,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2523,7 +2523,7 @@ mt7531_setup_common(struct dsa_switch *d
  	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
  		     UNU_FFP_MASK);
  
@@ -46,7 +46,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2626,7 +2626,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2610,7 +2610,7 @@ mt7531_setup(struct dsa_switch *ds)
  	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
  
  	/* Force link down on all ports before internal reset */
diff --git a/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch b/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
index 9ba12b1269..32919df0f2 100644
--- a/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
+++ b/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2785,7 +2785,7 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2769,7 +2769,7 @@ mt7530_mac_config(struct dsa_switch *ds,
  		mt7530_setup_port6(priv->ds, interface);
  }
  
@@ -26,7 +26,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  			       phy_interface_t interface,
  			       struct phy_device *phydev)
  {
-@@ -2836,7 +2836,7 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2820,7 +2820,7 @@ mt7531_mac_config(struct dsa_switch *ds,
  	if (phy_interface_mode_is_rgmii(interface)) {
  		dp = dsa_to_port(ds, port);
  		phydev = dp->slave->phydev;
diff --git a/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch b/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
index 58c3e0bc3c..22cc625af8 100644
--- a/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
+++ b/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2635,7 +2635,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2619,7 +2619,10 @@ mt7531_setup(struct dsa_switch *ds)
  	if (!priv->p5_sgmii) {
  		mt7531_pll_setup(priv);
  	} else {



From lede-commits at lists.infradead.org  Sat Apr 27 00:16:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 03:16:18 -0400
Subject: [openwrt/openwrt]  toolchain: kernel-headers: remove debugging env
 dump
In-Reply-To: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
References: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
Message-ID: <mailman.31457.1714202184.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/7c7cc28485c760a1162029e402016eb807742b5e

commit 7c7cc28485c760a1162029e402016eb807742b5e
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Thu Jul 20 08:41:44 2023 +0200

    toolchain: kernel-headers: remove debugging env dump
    
    Remove debugging `env` dump left over as build environments might
    contain some sensitive information, which then might leak into the build
    logs.
    
    Fixes: 2105acbe2804 ("kernel-headers: fix compile error caused by wrong host include path when the toolchain is already built")
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
    (cherry picked from commit def41cf2bab825e46a31eb0a9ccf51288edfe27d)
---
 toolchain/kernel-headers/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index 6942006325..f0d844a6c3 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -93,7 +93,6 @@ define Host/Prepare
 endef
 
 define Host/Configure
-	env
 	yes '' | $(HOST_KMAKE) oldconfig
 	$(call Host/Configure/all)
 	$(call Host/Configure/post/$(ARCH))



From lede-commits at lists.infradead.org  Sat Apr 27 00:16:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 03:16:19 -0400
Subject: [openwrt/openwrt]  tools: macOS: types.h: fix missing unsigned types
In-Reply-To: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
References: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
Message-ID: <mailman.31460.1714202184.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/3d037b8c5f7fc03356cce49a2332036298c96635

commit 3d037b8c5f7fc03356cce49a2332036298c96635
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Mon Oct 30 19:31:03 2023 +0000

    tools: macOS: types.h: fix missing unsigned types
    
    For some reason unsigned types were not added in commit 0a06fcf608dd
    ("build: fix kernel 5.4 on macos"), which led to bunch of hacks, like
    commit 3cc57ba4627c ("uboot-sunxi: add missing type __u64") or
    commit 997ff740dc44 ("uboot-mediatek: fix build on Mac OS X").
    
    So lets add the missing unsigned types to workaround it in a bit more
    maintainable way.
    
    Fixes: #13833
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
    (cherry picked from commit 4a8961f1dfba33b1e9a38dd0ecb3a8b03c46edbb)
---
 tools/include/asm/types.h | 5 +++++
 1 file changed, 5 insertions(+)

diff --git a/tools/include/asm/types.h b/tools/include/asm/types.h
index 2c91232619..5a12bbe91b 100644
--- a/tools/include/asm/types.h
+++ b/tools/include/asm/types.h
@@ -10,15 +10,20 @@
 #define _ASM_GENERIC_INT_LL64_H
 
 typedef __signed__ char __s8;
+typedef unsigned char __u8;
 
 typedef __signed__ short __s16;
+typedef unsigned short __u16;
 
 typedef __signed__ int __s32;
+typedef unsigned int __u32;
 
 #ifdef __GNUC__
 __extension__ typedef __signed__ long long __s64;
+__extension__ typedef unsigned long long __u64;
 #else
 typedef __signed__ long long __s64;
+typedef unsigned long long __u64;
 #endif
 
 #endif /* _ASM_GENERIC_INT_LL64_H */



From lede-commits at lists.infradead.org  Sat Apr 27 00:16:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 03:16:21 -0400
Subject: [openwrt/openwrt]  Revert "uboot-mediatek: fix build on Mac OS X"
In-Reply-To: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
References: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
Message-ID: <mailman.31461.1714202188.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/8695bc34426525a56340e1bbe578545219f2f1a3

commit 8695bc34426525a56340e1bbe578545219f2f1a3
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Mon Oct 30 19:37:59 2023 +0000

    Revert "uboot-mediatek: fix build on Mac OS X"
    
    This reverts commit 997ff740dc44045390680eaa30b6566d40bca322.
    78cbd5apick as it should be fixed in commit 78cbd5a57e11 ("tools: macOS:
    types.h: fix missing unsigned types").
    
    References: #13833
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
    (cherry picked from commit f691830307b484ec611f173157739e56c78f336c)
---
 .../boot/uboot-mediatek/patches/260-add-missing-type-u64.patch | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/package/boot/uboot-mediatek/patches/260-add-missing-type-u64.patch b/package/boot/uboot-mediatek/patches/260-add-missing-type-u64.patch
deleted file mode 100644
index a6204c7b69..0000000000
--- a/package/boot/uboot-mediatek/patches/260-add-missing-type-u64.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/include/linux/types.h
-+++ b/include/linux/types.h
-@@ -1,6 +1,7 @@
- #ifndef _LINUX_TYPES_H
- #define _LINUX_TYPES_H
- 
-+typedef unsigned long long __u64;
- #include <linux/posix_types.h>
- #include <asm/types.h>
- #include <stdbool.h>



From lede-commits at lists.infradead.org  Sat Apr 27 00:16:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 03:16:17 -0400
Subject: [openwrt/openwrt]  toolchain: kernel-headers: fix check target for
 external Git trees
In-Reply-To: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
References: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
Message-ID: <mailman.31462.1714202188.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/c3372266ba2b809310804f414f1042a51299200d

commit c3372266ba2b809310804f414f1042a51299200d
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Thu Jul 20 15:48:39 2023 +0200

    toolchain: kernel-headers: fix check target for external Git trees
    
    Executing following command currently fails:
    
     $ make toolchain/kernel-headers/{download,check} V=sc FIXUP=1
     ...
     include/kernel-version.mk:11: *** Missing kernel version/hash file for . Please create include/kernel-.  Stop.
    
    So lets fix it by adding the necessary missing KERNEL_PATCHVER variable.
    
    That additional kernel-build.mk include is needed to add another set of
    missing variables:
    
     $ make toolchain/kernel-headers/{download,check} V=sc FIXUP=1
     ...
     Makefile:115: *** ERROR: Unknown pack format for file tmp/dl/.  Stop.
    
    Fixes: 0765466a42f4 ("kernel: split kernel version to dedicated files")
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
    (cherry picked from commit 6b7f1ffbad732c5e1818f9387c02dda109c2748b)
---
 toolchain/kernel-headers/Makefile | 3 +++
 1 file changed, 3 insertions(+)

diff --git a/toolchain/kernel-headers/Makefile b/toolchain/kernel-headers/Makefile
index cd25f8a6de..6942006325 100644
--- a/toolchain/kernel-headers/Makefile
+++ b/toolchain/kernel-headers/Makefile
@@ -24,7 +24,10 @@ ifneq ($(call qstrip,$(CONFIG_KERNEL_GIT_CLONE_URI)),)
   PKG_SOURCE_VERSION:=$(call qstrip,$(CONFIG_KERNEL_GIT_REF))
   PKG_MIRROR_HASH:=$(call qstrip,$(CONFIG_KERNEL_GIT_MIRROR_HASH))
 ifdef CHECK
+  PLATFORM_DIR:=$(firstword $(wildcard $(TOPDIR)/target/linux/feeds/$(BOARD) $(TOPDIR)/target/linux/$(BOARD)))
+  include $(PLATFORM_DIR)/Makefile
   include $(INCLUDE_DIR)/kernel-version.mk
+  include $(INCLUDE_DIR)/kernel-build.mk
   PKG_VERSION:=$(LINUX_VERSION)
 else
   PKG_SOURCE:=$(LINUX_SOURCE)



From lede-commits at lists.infradead.org  Sat Apr 27 00:16:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 03:16:20 -0400
Subject: [openwrt/openwrt]  Revert "uboot-sunxi: add missing type __u64"
In-Reply-To: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
References: <171420217709.1870935.7008830611843982782@git-01.infra.openwrt.org>
Message-ID: <mailman.31463.1714202188.1280.lede-commits@lists.infradead.org>

ynezz pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/c19f5076a53a3c55361392c60448b3026d78dda0

commit c19f5076a53a3c55361392c60448b3026d78dda0
Author: Petr ?tetiar <ynezz at true.cz>
AuthorDate: Mon Oct 30 19:38:04 2023 +0000

    Revert "uboot-sunxi: add missing type __u64"
    
    This reverts commit 3cc57ba4627c9c7555f8ad86e4f78d86d8f9ddf0 as it
    should be fixed in commit 78cbd5a57e11 ("tools: macOS: types.h: fix
    missing unsigned types").
    
    References: #13833
    Signed-off-by: Petr ?tetiar <ynezz at true.cz>
    (cherry picked from commit bc47613cf0215743cde641f962386d59b57a332a)
---
 .../boot/uboot-sunxi/patches/260-add-missing-type-u64.patch    | 10 ----------
 1 file changed, 10 deletions(-)

diff --git a/package/boot/uboot-sunxi/patches/260-add-missing-type-u64.patch b/package/boot/uboot-sunxi/patches/260-add-missing-type-u64.patch
deleted file mode 100644
index a6204c7b69..0000000000
--- a/package/boot/uboot-sunxi/patches/260-add-missing-type-u64.patch
+++ /dev/null
@@ -1,10 +0,0 @@
---- a/include/linux/types.h
-+++ b/include/linux/types.h
-@@ -1,6 +1,7 @@
- #ifndef _LINUX_TYPES_H
- #define _LINUX_TYPES_H
- 
-+typedef unsigned long long __u64;
- #include <linux/posix_types.h>
- #include <asm/types.h>
- #include <stdbool.h>



From lede-commits at lists.infradead.org  Sat Apr 27 02:23:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 05:23:45 -0400
Subject: [openwrt/openwrt]  ipq40xx: use nvmem ethernet MACs on Aruba AP-303H
In-Reply-To: <171420982542.2505208.12775823320019234344@git-01.infra.openwrt.org>
References: <171420982542.2505208.12775823320019234344@git-01.infra.openwrt.org>
Message-ID: <mailman.31472.1714209831.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4c5cb5880573b7e39a205f220f4f569db542973d

commit 4c5cb5880573b7e39a205f220f4f569db542973d
Author: Ryan Salsbury <ryanrs at gmail.com>
AuthorDate: Fri Apr 26 17:35:58 2024 -0700

    ipq40xx: use nvmem ethernet MACs on Aruba AP-303H
    
    Use NVMEM to assign "factory sticker" MAC address to WAN ethernet
    interface. Set LAN address to sticker + 1.
    
    Signed-off-by: Ryan Salsbury <ryanrs at gmail.com>
---
 .../files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts      | 7 +++++++
 1 file changed, 7 insertions(+)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
index 41b42e8f58..2e1fc6aedc 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
@@ -362,7 +362,9 @@
 					#size-cells = <1>;
 
 					macaddr_mfginfo_1d: macaddr at 1d {
+						compatible = "mac-base";
 						reg = <0x1d 0x6>;
+						#nvmem-cell-cells = <1>;
 					};
 
 					macaddr_mfginfo_45: macaddr at 45 {
@@ -434,6 +436,9 @@
 
 &gmac {
 	status = "okay";
+
+	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_mfginfo_1d 1>;
 };
 
 &switch {
@@ -462,6 +467,8 @@
 	status = "okay";
 
 	label = "wan";
+	nvmem-cell-names = "mac-address";
+	nvmem-cells = <&macaddr_mfginfo_1d 0>;
 };
 
 &wifi0 {



From lede-commits at lists.infradead.org  Sat Apr 27 02:27:36 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 05:27:36 -0400
Subject: [openwrt/openwrt]  ipq40xx: fix USB on Aruba AP-303H
In-Reply-To: <171421005624.2525607.1179816547573004844@git-01.infra.openwrt.org>
References: <171421005624.2525607.1179816547573004844@git-01.infra.openwrt.org>
Message-ID: <mailman.31473.1714210060.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/026fbd650a58c22512ca64e85ccb5b318af3aaa7

commit 026fbd650a58c22512ca64e85ccb5b318af3aaa7
Author: Ryan Salsbury <ryanrs at gmail.com>
AuthorDate: Fri Apr 26 17:27:36 2024 -0700

    ipq40xx: fix USB on Aruba AP-303H
    
    Enable USB 3.0 controller, disable USB 2.0 controller.
    
    The USB 2.0 port on the AP-303H is actually connected to the USB 3.0
    controller's HS phy. Enable the HS phy only, since the SS lanes are not
    brought out to the connector.
    
    Signed-off-by: Ryan Salsbury <ryanrs at gmail.com>
---
 .../arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts       | 15 ++++++++++-----
 1 file changed, 10 insertions(+), 5 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
index 2e1fc6aedc..0dec567bc4 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
@@ -64,10 +64,6 @@
 			qcom,wifi_noc_memtype_m0_m2 = <TCSR_WIFI_NOC_MEMTYPE_M0_M2>;
 		};
 
-		usb2 at 60f8800 {
-			status = "okay";
-		};
-
 		crypto at 8e3a000 {
 			status = "okay";
 		};
@@ -430,7 +426,16 @@
 	};
 };
 
-&usb2_hs_phy {
+&usb3 {
+	status = "okay";
+};
+
+&usb3_dwc {
+	phys = <&usb3_hs_phy>;
+	phy-names = "usb2-phy";
+};
+
+&usb3_hs_phy {
 	status = "okay";
 };
 



From lede-commits at lists.infradead.org  Sat Apr 27 02:40:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 05:40:08 -0400
Subject: [openwrt/openwrt]  ustp: update to Git HEAD (2023-05-29)
In-Reply-To: <171421080820.2582747.16046948936645720650@git-01.infra.openwrt.org>
References: <171421080820.2582747.16046948936645720650@git-01.infra.openwrt.org>
Message-ID: <mailman.31476.1714210818.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/01cdeb531b1c380c98d13a83bce78e214b6ee136

commit 01cdeb531b1c380c98d13a83bce78e214b6ee136
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Tue Apr 23 04:28:38 2024 +0200

    ustp: update to Git HEAD (2023-05-29)
    
    a85a5bc83bde netif_utils: correctly close fd on read error
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 package/network/services/ustp/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/network/services/ustp/Makefile b/package/network/services/ustp/Makefile
index baf45288dd..2d44b7a359 100644
--- a/package/network/services/ustp/Makefile
+++ b/package/network/services/ustp/Makefile
@@ -12,9 +12,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ustp.git
 PKG_SOURCE_PROTO:=git
-PKG_SOURCE_DATE:=2021-09-21
-PKG_SOURCE_VERSION:=462b3a491347e452c15220861949b1d6371fa59e
-PKG_MIRROR_HASH:=c3373b369b127c26d4a79425631cb5db83ef479ab21d164da879b35942539dfb
+PKG_SOURCE_DATE:=2023-05-29
+PKG_SOURCE_VERSION:=a85a5bc83bde5b485319ca12b6e32c4b7f0b120f
+PKG_MIRROR_HASH:=b907b91989320eb8916e719ced9bdce96b8c5db6abefcee35e25fb112ad5b27f
 
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Sat Apr 27 03:01:11 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 06:01:11 -0400
Subject: [openwrt/openwrt]  qualcommax: IPQ807x: ZyXEL NBG7815: Fix random
 Wifi MAC For this particualar device we get random MAC's for Wifi on each
 (re-)boot. This is because art partition/pre caldata do not contain valid MAC
 addresses.
In-Reply-To: <171421207182.2688125.4704573593089281865@git-01.infra.openwrt.org>
References: <171421207182.2688125.4704573593089281865@git-01.infra.openwrt.org>
Message-ID: <mailman.31477.1714212078.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7cb161ae840fdf5e702171ce9ba2f944fa81621c

commit 7cb161ae840fdf5e702171ce9ba2f944fa81621c
Author: Ulrich Stark <pwned-pixel at posteo.de>
AuthorDate: Thu Apr 25 13:17:53 2024 +0200

    qualcommax: IPQ807x: ZyXEL NBG7815: Fix random Wifi MAC
    For this particualar device we get random MAC's for Wifi on each (re-)boot.
    This is because art partition/pre caldata do not contain valid MAC addresses.
    
    As we have now a new/better approach with ath11k_patch_mac we can use it for
    this device too.
    
    I'm using this approach for like two weeks and its working flawlessly.
    
    Signed-off-by: Ulrich Stark <pwned-pixel at posteo.de>
    
    qualcommax: IPQ807x: ZyXEL NBG7815: Fix random Wifi MAC
    Changing order to 3/phy0/5G-1, 2/phy1/2G, 4/phy2/5G-2.
    
    Signed-off-by: Ulrich Stark <pwned-pixel at posteo.de>
---
 .../base-files/etc/hotplug.d/firmware/11-ath11k-caldata       | 11 +++++++++--
 1 file changed, 9 insertions(+), 2 deletions(-)

diff --git a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
index 8f207a38b0..c40d9bc5f9 100644
--- a/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
+++ b/target/linux/qualcommax/ipq807x/base-files/etc/hotplug.d/firmware/11-ath11k-caldata
@@ -26,8 +26,7 @@ case "$FIRMWARE" in
 	xiaomi,ax9000|\
 	yuncore,ax880|\
 	zbtlink,zbt-z800ax|\
-	zte,mf269|\
-	zyxel,nbg7815)
+	zte,mf269)
 		caldata_extract "0:art" 0x1000 0x20000
 		;;
 	linksys,mx4200v1)
@@ -54,6 +53,14 @@ case "$FIRMWARE" in
 	spectrum,sax1v1k)
 		caldata_extract_mmc "0:ART" 0x1000 0x20000
 		;;
+	zyxel,nbg7815)
+		caldata_extract "0:art" 0x1000 0x20000
+		label_mac=$(get_mac_label)
+		ath11k_patch_mac $(macaddr_add $label_mac 3) 0
+		ath11k_patch_mac $(macaddr_add $label_mac 2) 1
+		ath11k_patch_mac $(macaddr_add $label_mac 4) 2
+		ath11k_set_macflag
+		;;
 	esac
 	;;
 "ath11k/QCN9074/hw1.0/cal-pci-0000:01:00.0.bin"|\



From lede-commits at lists.infradead.org  Sat Apr 27 03:05:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 06:05:47 -0400
Subject: [openwrt/openwrt]  package/libs/pcre2: fix PKG_CPE_ID
In-Reply-To: <171421234713.2709771.11780242900796633459@git-01.infra.openwrt.org>
References: <171421234713.2709771.11780242900796633459@git-01.infra.openwrt.org>
Message-ID: <mailman.31480.1714212351.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/27d1ebb46adfd58db9a8034336c2d85b41f617f9

commit 27d1ebb46adfd58db9a8034336c2d85b41f617f9
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
AuthorDate: Fri Apr 26 15:09:50 2024 +0200

    package/libs/pcre2: fix PKG_CPE_ID
    
    cpe:/a:pcre:pcre2 is the correct CPE ID for pcre2:
    https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:pcre:pcre2
    
    Fixes: c39b0646f3f2d96d40f601209859175af8537b6d (pcre2: import pcre2 from packages feed)
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 package/libs/pcre2/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libs/pcre2/Makefile b/package/libs/pcre2/Makefile
index fa4282cee8..084a63c061 100644
--- a/package/libs/pcre2/Makefile
+++ b/package/libs/pcre2/Makefile
@@ -18,7 +18,7 @@ PKG_HASH:=8d36cd8cb6ea2a4c2bb358ff6411b0c788633a2a45dabbf1aeb4b701d1b5e840
 PKG_MAINTAINER:=Shane Peelar <lookatyouhacker at gmail.com>
 PKG_LICENSE:=BSD-3-Clause
 PKG_LICENSE_FILES:=LICENCE
-PKG_CPE_ID:=cpe:/a:pcre:pcre
+PKG_CPE_ID:=cpe:/a:pcre:pcre2
 
 PKG_CONFIG_DEPENDS:=\
 	CONFIG_PACKAGE_libpcre2-16 \



From lede-commits at lists.infradead.org  Sat Apr 27 03:07:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 06:07:40 -0400
Subject: [openwrt/openwrt]  tools/zlib: fix PKG_CPE_ID
In-Reply-To: <171421246083.2719391.14250125156626295121@git-01.infra.openwrt.org>
References: <171421246083.2719391.14250125156626295121@git-01.infra.openwrt.org>
Message-ID: <mailman.31481.1714212466.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e9ecaade6f1f9bd821523a3b731bfaaf5ab5ca35

commit e9ecaade6f1f9bd821523a3b731bfaaf5ab5ca35
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
AuthorDate: Fri Apr 26 10:59:58 2024 +0200

    tools/zlib: fix PKG_CPE_ID
    
    cpe:/a:zlib:zlib is the correct CPE ID for zlib:
    https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:zlib:zlib
    
    Fixes: c61a2395140d92cdd37d3d6ee43a765427e8e318 (add PKG_CPE_ID ids to package and tools)
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 tools/zlib/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/zlib/Makefile b/tools/zlib/Makefile
index f743445678..b1307ef2af 100644
--- a/tools/zlib/Makefile
+++ b/tools/zlib/Makefile
@@ -17,7 +17,7 @@ PKG_HASH:=9a93b2b7dfdac77ceba5a558a580e74667dd6fede4585b91eefb60f03b72df23
 
 PKG_LICENSE:=Zlib
 PKG_LICENSE_FILES:=README
-PKG_CPE_ID:=cpe:/a:gnu:zlib
+PKG_CPE_ID:=cpe:/a:zlib:zlib
 
 HOST_BUILD_PARALLEL:=1
 



From lede-commits at lists.infradead.org  Sat Apr 27 03:08:15 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 06:08:15 -0400
Subject: [openwrt/openwrt]  tools/flex: fix PKG_CPE_ID
In-Reply-To: <171421249511.2722462.10001912348860489085@git-01.infra.openwrt.org>
References: <171421249511.2722462.10001912348860489085@git-01.infra.openwrt.org>
Message-ID: <mailman.31482.1714212499.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/832460b452d840451adf44713e90515fc61c88ab

commit 832460b452d840451adf44713e90515fc61c88ab
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
AuthorDate: Fri Apr 26 10:51:16 2024 +0200

    tools/flex: fix PKG_CPE_ID
    
    cpe:/a:westes:flex is the correct CPE ID for flex:
    https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:westes:flex
    
    Fixes: c61a2395140d92cdd37d3d6ee43a765427e8e318 (add PKG_CPE_ID ids to package and tools)
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 tools/flex/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/flex/Makefile b/tools/flex/Makefile
index 86ba5a4415..177136b78c 100644
--- a/tools/flex/Makefile
+++ b/tools/flex/Makefile
@@ -7,7 +7,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=flex
-PKG_CPE_ID:=cpe:/a:flex_project:flex
+PKG_CPE_ID:=cpe:/a:westes:flex
 PKG_VERSION:=2.6.4
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz



From lede-commits at lists.infradead.org  Sat Apr 27 03:08:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 06:08:45 -0400
Subject: [openwrt/openwrt]  toolchain/nasm: fix PKG_CPE_ID
In-Reply-To: <171421252502.2725320.5237735122169920984@git-01.infra.openwrt.org>
References: <171421252502.2725320.5237735122169920984@git-01.infra.openwrt.org>
Message-ID: <mailman.31483.1714212529.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e1ca08518e96ccf088119fbc9930c5e4beef86cc

commit e1ca08518e96ccf088119fbc9930c5e4beef86cc
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
AuthorDate: Fri Apr 26 10:41:15 2024 +0200

    toolchain/nasm: fix PKG_CPE_ID
    
    cpe:/a:nasm:netwide_assembler is the correct CPE ID for nasm:
    https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:nasm:netwide_assembler
    
    Fixes: bcf02c5d3123a99c717ca33f1d7c6250acf0f33f (toolchain: assign PKG_CPE_ID)
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
---
 toolchain/nasm/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/toolchain/nasm/Makefile b/toolchain/nasm/Makefile
index 27cd476419..bdca35b7fc 100644
--- a/toolchain/nasm/Makefile
+++ b/toolchain/nasm/Makefile
@@ -10,7 +10,7 @@ PKG_VERSION:=2.16.01
 PKG_SOURCE_URL:=https://www.nasm.us/pub/nasm/releasebuilds/$(PKG_VERSION)/
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_HASH:=c77745f4802375efeee2ec5c0ad6b7f037ea9c87c92b149a9637ff099f162558
-PKG_CPE_ID:=cpe:/a:nasm:nasm
+PKG_CPE_ID:=cpe:/a:nasm:netwide_assembler
 
 HOST_BUILD_PARALLEL:=1
 



From lede-commits at lists.infradead.org  Sat Apr 27 03:11:31 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 06:11:31 -0400
Subject: [openwrt/openwrt]  lldpd: fix reload bug: advertisements shall
 default to on
In-Reply-To: <171421269136.2738664.4072359767485273606@git-01.infra.openwrt.org>
References: <171421269136.2738664.4072359767485273606@git-01.infra.openwrt.org>
Message-ID: <mailman.31484.1714212695.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/708101c1412c42c7fb1d838024513a34424c50ff

commit 708101c1412c42c7fb1d838024513a34424c50ff
Author: Paul Donald <newtwen+github at gmail.com>
AuthorDate: Mon Apr 22 15:17:33 2024 +0200

    lldpd: fix reload bug: advertisements shall default to on
    
    Because these capability advertisements default to on in lldpd, they
    became absent at reload, and not restart, due to how the reload logic
    works ( keep daemon running, send unconfigured and then the new config
    via socket ), and it was not evident unless you happened to be looking
    for it (e.g. via pcap or tcpdump). It was also not evident from the
    manpage ( have now sent patches upstream ).
    
    At reload time, the unconfigure logic disabled them unless they were
    explicitly enabled (compare with other settings where 'unconfigure' just
    resets them). Now they default to on/enabled at init time, and are
    explicitly 'unconfigure'd at startup if the user disables them via:
    
    lldp_mgmt_addr_advertisements=0
    lldp_capability_advertisements=0
    
    In other words: explicit is necessary to disable the advertisements.
    
    The same applies to 'configure system capabilities enabled'. Technically
    'unconfigure'd is the default but now it is explicit at reload.
    
    Tested on: 23.05.3
    
    Signed-off-by: Paul Donald <newtwen+github at gmail.com>
---
 package/network/services/lldpd/Makefile         |  2 +-
 package/network/services/lldpd/files/lldpd.init | 18 +++++++++++-------
 2 files changed, 12 insertions(+), 8 deletions(-)

diff --git a/package/network/services/lldpd/Makefile b/package/network/services/lldpd/Makefile
index 5a9a9732d2..f34cd28faa 100644
--- a/package/network/services/lldpd/Makefile
+++ b/package/network/services/lldpd/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lldpd
 PKG_VERSION:=1.0.17
-PKG_RELEASE:=4
+PKG_RELEASE:=5
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://github.com/lldpd/lldpd/releases/download/$(PKG_VERSION)/
diff --git a/package/network/services/lldpd/files/lldpd.init b/package/network/services/lldpd/files/lldpd.init
index dbe79d2f4a..3922b676b5 100644
--- a/package/network/services/lldpd/files/lldpd.init
+++ b/package/network/services/lldpd/files/lldpd.init
@@ -114,17 +114,17 @@ write_lldpd_conf()
 	local lldp_mgmt_ip
 	config_get lldp_mgmt_ip 'config' 'lldp_mgmt_ip'
 
-	# Configurable capabilities in lldpd >= v1.0.15
+	# Configurable capabilities in lldpd >= v1.0.15: defaults to 'unconfigured' i.e. kernel info
 	local lldp_syscapabilities
 	config_get lldp_syscapabilities 'config' 'lldp_syscapabilities'
 
-	# Configurable capabilities in lldpd >= v1.0.15
+	# Configurable capabilities in lldpd >= v1.0.15: defaults to on in lldpd
 	local lldp_capability_advertisements
-	config_get_bool lldp_capability_advertisements 'config' 'lldp_capability_advertisements' 0
+	config_get_bool lldp_capability_advertisements 'config' 'lldp_capability_advertisements' 1
 
-	# Broadcast management address in lldpd >= 0.7.15
+	# Broadcast management address in lldpd >= 0.7.15: defaults to on in lldpd
 	local lldp_mgmt_addr_advertisements
-	config_get_bool lldp_mgmt_addr_advertisements 'config' 'lldp_mgmt_addr_advertisements' 0
+	config_get_bool lldp_mgmt_addr_advertisements 'config' 'lldp_mgmt_addr_advertisements' 1
 
 	if [ "$CONFIG_LLDPD_WITH_LLDPMED" = "y" ]; then
 		local lldpmed_fast_start
@@ -192,8 +192,10 @@ write_lldpd_conf()
 	[ -n "$lldp_platform" ] && echo "configure system platform" "\"$lldp_platform\"" >> "$LLDPD_CONF"
 	[ -n "$lldp_tx_interval" ] && echo "configure lldp tx-interval $lldp_tx_interval" >> "$LLDPD_CONF"
 	[ "$lldp_tx_hold" -gt 0 ] && echo "configure lldp tx-hold $lldp_tx_hold" >> "$LLDPD_CONF"
-	[ "$lldp_capability_advertisements" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF"
-	[ "$lldp_mgmt_addr_advertisements" -gt 0 ] && echo "configure lldp management-addresses-advertisements" >> "$LLDPD_CONF"
+	[ "$lldp_capability_advertisements" -gt 0 ] && echo "configure lldp capabilities-advertisements" >> "$LLDPD_CONF" ||\
+		echo "unconfigure lldp capabilities-advertisements" >> "$LLDPD_CONF"
+	[ "$lldp_mgmt_addr_advertisements" -gt 0 ] && echo "configure lldp management-addresses-advertisements" >> "$LLDPD_CONF" ||\
+		echo "unconfigure lldp management-addresses-advertisements" >> "$LLDPD_CONF"
 
 	# Since lldpd's sysconfdir is /tmp, we'll symlink /etc/lldpd.d to /tmp/$LLDPD_CONFS_DIR
 	[ -e "$LLDPD_CONFS_DIR" ] || ln -s /etc/lldpd.d "$LLDPD_CONFS_DIR"
@@ -374,6 +376,8 @@ reload_service() {
 		unconfigure lldp custom-tlv
 		unconfigure lldp capabilities-advertisements
 		unconfigure lldp management-addresses-advertisements
+		# unconfigures user-configured system capabilities, and instead uses the kernel information:
+		unconfigure system capabilities enabled
 		unconfigure system interface pattern
 		unconfigure system description
 		unconfigure system hostname



From lede-commits at lists.infradead.org  Sat Apr 27 03:14:05 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 06:14:05 -0400
Subject: [openwrt/openwrt]  bcm4908: set kernel 6.6 as a testing version
In-Reply-To: <171421284470.2751645.1801737434846215407@git-01.infra.openwrt.org>
References: <171421284470.2751645.1801737434846215407@git-01.infra.openwrt.org>
Message-ID: <mailman.31485.1714212849.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f3895fd30ab0597f50fb97271d21efd174dcfbdf

commit f3895fd30ab0597f50fb97271d21efd174dcfbdf
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Apr 19 08:34:20 2024 +0200

    bcm4908: set kernel 6.6 as a testing version
    
    Add kernel 6.6 for testing.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/bcm4908/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/bcm4908/Makefile b/target/linux/bcm4908/Makefile
index d515912829..b4d238eff6 100644
--- a/target/linux/bcm4908/Makefile
+++ b/target/linux/bcm4908/Makefile
@@ -10,6 +10,7 @@ CPU_TYPE:=cortex-a53
 SUBTARGETS:=generic
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 define Target/Description
 	Build firmware images for Broadcom BCM4908 SoC family routers.



From lede-commits at lists.infradead.org  Sat Apr 27 03:14:04 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 06:14:04 -0400
Subject: [openwrt/openwrt]  bcm4908: remove 5.15 support
In-Reply-To: <171421284470.2751645.1801737434846215407@git-01.infra.openwrt.org>
References: <171421284470.2751645.1801737434846215407@git-01.infra.openwrt.org>
Message-ID: <mailman.31486.1714212852.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9d8e73656c6e6acc31754505671887daa22c8d9b

commit 9d8e73656c6e6acc31754505671887daa22c8d9b
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Fri Apr 19 08:31:00 2024 +0200

    bcm4908: remove 5.15 support
    
    Now that 6.1 is default, remove 5.15 support.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
---
 target/linux/bcm4908/config-5.15                   | 242 --------
 ...4-dts-broadcom-bcm4908-Fix-NAND-node-name.patch |  27 -
 ...-arm-bcm-document-Netgear-RAXE500-binding.patch |  27 -
 ...-dts-broadcom-bcm4908-add-pinctrl-binding.patch | 160 ------
 ...4-dts-broadcom-bcm4908-add-watchdog-block.patch |  35 --
 ...-arm64-dts-broadcom-bcm4908-add-I2C-block.patch |  34 --
 ...-Add-DTS-files-for-bcmbca-SoC-BCM63146.patchgit | 174 ------
 ...s-Add-DTS-files-for-bcmbca-SoC-BCM6856.patchgit | 167 ------
 ...s-Add-DTS-files-for-bcmbca-SoC-BCM6813.patchgit | 192 -------
 ...dcom-align-gpio-key-node-names-with-dt.patchgit |  79 ---
 ...dcom-bcm4908-Fix-timer-node-for-BCM490.patchgit |  33 --
 ...rm64-bcmbca-add-arch-bcmbca-machine-entry.patch |  31 -
 ...s-broadcom-bcm4908-add-remaining-LED-pins.patch | 115 ----
 ...roadcom-bcm4908-add-LEDs-controller-block.patch |  35 --
 ...-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch |  81 ---
 ...dts-bcmbca-update-BCM4908-board-dts-files.patch |  66 ---
 ...6-arm64-dts-Add-BCM4908-generic-board-dts.patch |  62 --
 ...roadcom-bcmbca-bcm4908-add-TWD-block-time.patch |  31 -
 ...dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch |  46 --
 ...-dts-Update-cache-properties-for-broadcom.patch | 134 -----
 ...s-broadcom-bcmbca-Add-spi-controller-node.patch | 367 ------------
 ...broadcom-bcmbca-bcm4908-fix-LED-nodenames.patch |  66 ---
 ...roadcom-bcmbca-bcm4908-add-on-SoC-USB-por.patch |  81 ---
 ...roadcom-bcmbca-bcm4908-add-Netgear-R8000P.patch |  38 --
 ...roadcom-bcmbca-bcm4908-add-TP-Link-C2300-.patch |  41 --
 ...-mtd-parsers-add-Broadcom-s-U-Boot-parser.patch | 137 -----
 ...-net-dsa-bcm_sf2-refactor-LED-regs-access.patch | 209 -------
 ...m-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch |  53 --
 ...1-net-broadcom-bcm4908_enet-use-build_skb.patch | 152 -----
 ...m-bcm4908_enet-report-queued-and-transmit.patch |  45 --
 ...s-pinctrl-Add-binding-for-BCM4908-pinctrl.patch | 111 ----
 ...pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch | 629 ---------------------
 ...01-i2c-brcmstb-allow-compiling-on-BCM4908.patch |  30 -
 ...og-allow-building-BCM7038_WDT-for-BCM4908.patch |  32 --
 ...m7038_wdt-Support-BCM6345-compatible-stri.patch |  34 --
 ...roadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch |  31 -
 ...roadcom-bcmbca-bcm4908-limit-amount-of-GP.patch |  23 -
 .../301-arm64-don-t-issue-HVC-on-boot.patch        |  30 -
 ...sa-bcm_sf2-enable-GPHY-for-switch-probing.patch |  46 --
 ...-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch |  30 -
 40 files changed, 3956 deletions(-)

diff --git a/target/linux/bcm4908/config-5.15 b/target/linux/bcm4908/config-5.15
deleted file mode 100644
index b1594ea8d8..0000000000
--- a/target/linux/bcm4908/config-5.15
+++ /dev/null
@@ -1,242 +0,0 @@
-CONFIG_64BIT=y
-CONFIG_ARCH_BCM4908=y
-CONFIG_ARCH_BCMBCA=y
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MHP_MEMMAP_ON_MEMORY_ENABLE=y
-CONFIG_ARCH_MMAP_RND_BITS=18
-CONFIG_ARCH_MMAP_RND_BITS_MAX=24
-CONFIG_ARCH_MMAP_RND_BITS_MIN=18
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MIN=11
-CONFIG_ARCH_PROC_KCORE_TEXT=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_STACKWALK=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARCH_WANTS_NO_INSTR=y
-CONFIG_ARM64=y
-CONFIG_ARM64_4K_PAGES=y
-CONFIG_ARM64_CRYPTO=y
-CONFIG_ARM64_LD_HAS_FIX_ERRATUM_843419=y
-CONFIG_ARM64_PAGE_SHIFT=12
-CONFIG_ARM64_PA_BITS=48
-CONFIG_ARM64_PA_BITS_48=y
-CONFIG_ARM64_PTR_AUTH=y
-CONFIG_ARM64_PTR_AUTH_KERNEL=y
-CONFIG_ARM64_SVE=y
-CONFIG_ARM64_TAGGED_ADDR_ABI=y
-CONFIG_ARM64_VA_BITS=39
-CONFIG_ARM64_VA_BITS_39=y
-CONFIG_ARM_AMBA=y
-CONFIG_ARM_ARCH_TIMER=y
-CONFIG_ARM_ARCH_TIMER_EVTSTREAM=y
-CONFIG_ARM_GIC=y
-CONFIG_ARM_GIC_V3=y
-CONFIG_ARM_GIC_V3_ITS=y
-CONFIG_ARM_PSCI_FW=y
-CONFIG_AUDIT_ARCH_COMPAT_GENERIC=y
-CONFIG_B53=y
-CONFIG_BCM4908_ENET=y
-CONFIG_BCM7038_WDT=y
-CONFIG_BCM7XXX_PHY=y
-CONFIG_BCM_NET_PHYLIB=y
-CONFIG_BCM_PMB=y
-# CONFIG_BLK_DEV_INITRD is not set
-CONFIG_BLK_PM=y
-CONFIG_CC_HAVE_STACKPROTECTOR_SYSREG=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMDLINE="earlycon=bcm63xx_uart,0xff800640 console=ttyS0,115200"
-CONFIG_CMDLINE_FROM_BOOTLOADER=y
-CONFIG_COMMON_CLK=y
-# CONFIG_COMPAT_32BIT_TIME is not set
-CONFIG_CPU_LITTLE_ENDIAN=y
-CONFIG_CPU_RMAP=y
-CONFIG_CRC16=y
-CONFIG_CRYPTO_AES_ARM64=y
-CONFIG_CRYPTO_AES_ARM64_CE=y
-CONFIG_CRYPTO_AES_ARM64_CE_BLK=y
-CONFIG_CRYPTO_AES_ARM64_CE_CCM=y
-CONFIG_CRYPTO_CRYPTD=y
-CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_GHASH_ARM64_CE=y
-CONFIG_CRYPTO_HASH_INFO=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_SIMD=y
-CONFIG_CRYPTO_ZSTD=y
-CONFIG_DCACHE_WORD_ACCESS=y
-CONFIG_DMA_DIRECT_REMAP=y
-CONFIG_DMA_REMAP=y
-CONFIG_DTC=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FRAME_POINTER=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ARCH_TOPOLOGY=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_CPU_VULNERABILITIES=y
-CONFIG_GENERIC_CSUM=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PHY=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_PINCTRL_GROUPS=y
-CONFIG_GENERIC_PINMUX_FUNCTIONS=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GPIO_GENERIC=y
-CONFIG_GPIO_GENERIC_PLATFORM=y
-CONFIG_GRO_CELLS=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HZ_PERIODIC=y
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_BRCMSTB=y
-CONFIG_ILLEGAL_POINTER_VALUE=0xdead000000000000
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_LEDS_BCM63138=y
-CONFIG_LEDS_GPIO=y
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOCK_SPIN_ON_OWNER=y
-CONFIG_LZO_COMPRESS=y
-CONFIG_LZO_DECOMPRESS=y
-CONFIG_MDIO_BCM_UNIMAC=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MIGRATION=y
-# CONFIG_MITIGATE_SPECTRE_BRANCH_HISTORY is not set
-CONFIG_MODULES_USE_ELF_RELA=y
-CONFIG_MTD_BRCM_U_BOOT=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_NAND_BRCMNAND=y
-CONFIG_MTD_NAND_CORE=y
-CONFIG_MTD_NAND_ECC=y
-CONFIG_MTD_NAND_ECC_SW_HAMMING=y
-CONFIG_MTD_OF_PARTS_BCM4908=y
-# CONFIG_MTD_OF_PARTS_LINKSYS_NS is not set
-CONFIG_MTD_RAW_NAND=y
-CONFIG_MTD_SPLIT_CFE_BOOTFS=y
-# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set
-CONFIG_MTD_UBI=y
-CONFIG_MTD_UBI_BEB_LIMIT=20
-CONFIG_MTD_UBI_BLOCK=y
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_SG_DMA_LENGTH=y
-CONFIG_NET_DEVLINK=y
-CONFIG_NET_DSA=y
-CONFIG_NET_DSA_BCM_SF2=y
-CONFIG_NET_DSA_TAG_BRCM=y
-CONFIG_NET_DSA_TAG_BRCM_COMMON=y
-CONFIG_NET_DSA_TAG_BRCM_LEGACY=y
-CONFIG_NET_DSA_TAG_BRCM_PREPEND=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NET_SWITCHDEV=y
-CONFIG_NO_IOPORT_MAP=y
-CONFIG_NR_CPUS=4
-CONFIG_NVMEM=y
-CONFIG_NVMEM_SYSFS=y
-CONFIG_NVMEM_U_BOOT_ENV=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_PADATA=y
-CONFIG_PARTITION_PERCPU=y
-CONFIG_PGTABLE_LEVELS=3
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_PHY_BRCM_USB=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_BCM4908=y
-# CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PM=y
-CONFIG_PM_CLK=y
-CONFIG_PM_GENERIC_DOMAINS=y
-CONFIG_PM_GENERIC_DOMAINS_OF=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_RESET_SYSCON=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_QUEUED_SPINLOCKS=y
-CONFIG_RATIONAL=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_RELOCATABLE=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RODATA_FULL_DEFAULT_ENABLED=y
-CONFIG_RPS=y
-CONFIG_RWSEM_SPIN_ON_OWNER=y
-# CONFIG_SERIAL_8250 is not set
-CONFIG_SERIAL_BCM63XX=y
-CONFIG_SERIAL_BCM63XX_CONSOLE=y
-CONFIG_SGL_ALLOC=y
-CONFIG_SMP=y
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SPARSEMEM=y
-CONFIG_SPARSEMEM_EXTREME=y
-CONFIG_SPARSEMEM_VMEMMAP=y
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SRCU=y
-CONFIG_SWIOTLB=y
-CONFIG_SWPHY=y
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_THREAD_INFO_IN_TASK=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TRACE_IRQFLAGS_NMI_SUPPORT=y
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-CONFIG_UBIFS_FS=y
-CONFIG_UNMAP_KERNEL_AT_EL0=y
-CONFIG_USB_SUPPORT=y
-CONFIG_VMAP_STACK=y
-CONFIG_WATCHDOG_CORE=y
-CONFIG_XPS=y
-CONFIG_XXHASH=y
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZONE_DMA32=y
-CONFIG_ZSTD_COMPRESS=y
-CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch b/target/linux/bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch
deleted file mode 100644
index cb0525507f..0000000000
--- a/target/linux/bcm4908/patches-5.15/030-v5.16-0001-arm64-dts-broadcom-bcm4908-Fix-NAND-node-name.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From d0ae9c944b9472c5691a482297df7a57d7fd1199 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Thu, 19 Aug 2021 14:11:08 +0200
-Subject: [PATCH] arm64: dts: broadcom: bcm4908: Fix NAND node name
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This matches nand-controller.yaml requirements.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -295,7 +295,7 @@
- 			status = "okay";
- 		};
- 
--		nand at 1800 {
-+		nand-controller at 1800 {
- 			#address-cells = <1>;
- 			#size-cells = <0>;
- 			compatible = "brcm,nand-bcm63138", "brcm,brcmnand-v7.1", "brcm,brcmnand";
diff --git a/target/linux/bcm4908/patches-5.15/031-v5.17-0001-dt-bindings-arm-bcm-document-Netgear-RAXE500-binding.patch b/target/linux/bcm4908/patches-5.15/031-v5.17-0001-dt-bindings-arm-bcm-document-Netgear-RAXE500-binding.patch
deleted file mode 100644
index 4d5ffcb9e3..0000000000
--- a/target/linux/bcm4908/patches-5.15/031-v5.17-0001-dt-bindings-arm-bcm-document-Netgear-RAXE500-binding.patch
+++ /dev/null
@@ -1,27 +0,0 @@
-From 7b0c9ca7f18e8d2e2cf3c342d91f037d436777bf Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Fri, 5 Nov 2021 11:14:12 +0100
-Subject: [PATCH] dt-bindings: arm: bcm: document Netgear RAXE500 binding
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-One more BCM4908 based device.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Acked-by: Rob Herring <robh at kernel.org>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml
-+++ b/Documentation/devicetree/bindings/arm/bcm/brcm,bcm4908.yaml
-@@ -29,6 +29,7 @@ properties:
-         items:
-           - enum:
-               - asus,gt-ac5300
-+              - netgear,raxe500
-           - const: brcm,bcm4908
- 
-       - description: BCM49408 based boards
diff --git a/target/linux/bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch b/target/linux/bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch
deleted file mode 100644
index 69ab0e9e63..0000000000
--- a/target/linux/bcm4908/patches-5.15/032-v5.18-0002-arm64-dts-broadcom-bcm4908-add-pinctrl-binding.patch
+++ /dev/null
@@ -1,160 +0,0 @@
-From 72b1c5da796ec5266f2012c36470e226cb4f09c9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Thu, 30 Dec 2021 12:05:35 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcm4908: add pinctrl binding
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Describe pinmux block with its maps.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../boot/dts/broadcom/bcmbca/bcm4908.dtsi    | 135 ++++++++++++++++++
- 1 file changed, 135 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -286,6 +286,141 @@
- 			gpio-controller;
- 		};
- 
-+		pinctrl at 560 {
-+			compatible = "brcm,bcm4908-pinctrl";
-+			reg = <0x560 0x10>;
-+
-+			pins_led_0_a: led_0-a-pins {
-+				function = "led_0";
-+				groups = "led_0_grp_a";
-+			};
-+
-+			pins_led_1_a: led_1-a-pins {
-+				function = "led_1";
-+				groups = "led_1_grp_a";
-+			};
-+
-+			pins_led_2_a: led_2-a-pins {
-+				function = "led_2";
-+				groups = "led_2_grp_a";
-+			};
-+
-+			pins_led_3_a: led_3-a-pins {
-+				function = "led_3";
-+				groups = "led_3_grp_a";
-+			};
-+
-+			pins_led_4_a: led_4-a-pins {
-+				function = "led_4";
-+				groups = "led_4_grp_a";
-+			};
-+
-+			pins_led_5_a: led_5-a-pins {
-+				function = "led_5";
-+				groups = "led_5_grp_a";
-+			};
-+
-+			pins_led_6_a: led_6-a-pins {
-+				function = "led_6";
-+				groups = "led_6_grp_a";
-+			};
-+
-+			pins_led_7_a: led_7-a-pins {
-+				function = "led_7";
-+				groups = "led_7_grp_a";
-+			};
-+
-+			pins_led_8_a: led_8-a-pins {
-+				function = "led_8";
-+				groups = "led_8_grp_a";
-+			};
-+
-+			pins_led_9_a: led_9-a-pins {
-+				function = "led_9";
-+				groups = "led_9_grp_a";
-+			};
-+
-+			pins_led_21_a: led_21-a-pins {
-+				function = "led_21";
-+				groups = "led_21_grp_a";
-+			};
-+
-+			pins_led_22_a: led_22-a-pins {
-+				function = "led_22";
-+				groups = "led_22_grp_a";
-+			};
-+
-+			pins_led_26_a: led_26-a-pins {
-+				function = "led_26";
-+				groups = "led_26_grp_a";
-+			};
-+
-+			pins_led_27_a: led_27-a-pins {
-+				function = "led_27";
-+				groups = "led_27_grp_a";
-+			};
-+
-+			pins_led_28_a: led_28-a-pins {
-+				function = "led_28";
-+				groups = "led_28_grp_a";
-+			};
-+
-+			pins_led_29_a: led_29-a-pins {
-+				function = "led_29";
-+				groups = "led_29_grp_a";
-+			};
-+
-+			pins_led_30_a: led_30-a-pins {
-+				function = "led_30";
-+				groups = "led_30_grp_a";
-+			};
-+
-+			pins_hs_uart: hs_uart-pins {
-+				function = "hs_uart";
-+				groups = "hs_uart_grp";
-+			};
-+
-+			pins_i2c_a: i2c-a-pins {
-+				function = "i2c";
-+				groups = "i2c_grp_a";
-+			};
-+
-+			pins_i2c_b: i2c-b-pins {
-+				function = "i2c";
-+				groups = "i2c_grp_b";
-+			};
-+
-+			pins_i2s: i2s-pins {
-+				function = "i2s";
-+				groups = "i2s_grp";
-+			};
-+
-+			pins_nand_ctrl: nand_ctrl-pins {
-+				function = "nand_ctrl";
-+				groups = "nand_ctrl_grp";
-+			};
-+
-+			pins_nand_data: nand_data-pins {
-+				function = "nand_data";
-+				groups = "nand_data_grp";
-+			};
-+
-+			pins_emmc_ctrl: emmc_ctrl-pins {
-+				function = "emmc_ctrl";
-+				groups = "emmc_ctrl_grp";
-+			};
-+
-+			pins_usb0_pwr: usb0_pwr-pins {
-+				function = "usb0_pwr";
-+				groups = "usb0_pwr_grp";
-+			};
-+
-+			pins_usb1_pwr: usb1_pwr-pins {
-+				function = "usb1_pwr";
-+				groups = "usb1_pwr_grp";
-+			};
-+		};
-+
- 		uart0: serial at 640 {
- 			compatible = "brcm,bcm6345-uart";
- 			reg = <0x640 0x18>;
diff --git a/target/linux/bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch b/target/linux/bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch
deleted file mode 100644
index 6b2a3890c2..0000000000
--- a/target/linux/bcm4908/patches-5.15/032-v5.18-0003-arm64-dts-broadcom-bcm4908-add-watchdog-block.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 47513f6dd93b5b7d91143219c2c1fb883664ed13 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Wed, 9 Feb 2022 21:14:17 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcm4908: add watchdog block
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM4908 has the same watchdog as BCM63xx devices. Use "brcm,bcm6345-wdt"
-binding which matches the first SoC with that block.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -275,6 +275,15 @@
- 		twd: timer-mfd at 400 {
- 			compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon";
- 			reg = <0x400 0x4c>;
-+			ranges = <0x0 0x400 0x4c>;
-+
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			watchdog at 28 {
-+				compatible = "brcm,bcm6345-wdt";
-+				reg = <0x28 0x8>;
-+			};
- 		};
- 
- 		gpio0: gpio-controller at 500 {
diff --git a/target/linux/bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch b/target/linux/bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch
deleted file mode 100644
index e59eb3f728..0000000000
--- a/target/linux/bcm4908/patches-5.15/032-v5.18-0004-arm64-dts-broadcom-bcm4908-add-I2C-block.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From ba5dfa2fd8d0aed4e4b6f650ba9e8ea7cdd6ead1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Tue, 15 Feb 2022 07:36:39 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcm4908: add I2C block
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM4908 uses the same I2C hw as BCM63xx / BCM67xx / BCM68xx SoCs.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -455,6 +455,15 @@
- 			};
- 		};
- 
-+		i2c at 2100 {
-+			compatible = "brcm,brcmper-i2c";
-+			reg = <0x2100 0x58>;
-+			clock-frequency = <97500>;
-+			pinctrl-names = "default";
-+			pinctrl-0 = <&pins_i2c_a>;
-+			status = "disabled";
-+		};
-+
- 		misc at 2600 {
- 			compatible = "brcm,misc", "simple-mfd";
- 			reg = <0x2600 0xe4>;
diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0004-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63146.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0004-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63146.patchgit
deleted file mode 100644
index 7cd13e5c22..0000000000
--- a/target/linux/bcm4908/patches-5.15/033-v6.0-0004-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM63146.patchgit
+++ /dev/null
@@ -1,174 +0,0 @@
-From 82a58061ada60058ec00113c179380f945914709 Mon Sep 17 00:00:00 2001
-From: William Zhang <william.zhang at broadcom.com>
-Date: Wed, 8 Jun 2022 11:00:59 -0700
-Subject: [PATCH] arm64: dts: Add DTS files for bcmbca SoC BCM63146
-
-Add DTS for ARMv8 based broadband SoC BCM63146. bcm63146.dtsi is the
-SoC description DTS header and bcm963146.dts is a simple DTS file for
-Broadcom BCM963146 Reference board that only enable the UART port.
-
-Signed-off-by: William Zhang <william.zhang at broadcom.com>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/Makefile  |   3 +-
- .../boot/dts/broadcom/bcmbca/bcm63146.dtsi    | 110 ++++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm963146.dts    |  30 +++++
- 3 files changed, 142 insertions(+), 1 deletion(-)
- create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
- create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile
-@@ -7,4 +7,5 @@ dtb-$(CONFIG_ARCH_BCMBCA) += \
- 				bcm4912-asus-gt-ax6000.dtb \
- 				bcm94912.dtb \
- 				bcm963158.dtb \
--				bcm96858.dtb
-+				bcm96858.dtb \
-+				bcm963146.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
-@@ -0,0 +1,110 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright 2022 Broadcom Ltd.
-+ */
-+
-+#include <dt-bindings/interrupt-controller/irq.h>
-+#include <dt-bindings/interrupt-controller/arm-gic.h>
-+
-+/ {
-+	compatible = "brcm,bcm63146", "brcm,bcmbca";
-+	#address-cells = <2>;
-+	#size-cells = <2>;
-+
-+	interrupt-parent = <&gic>;
-+
-+	cpus {
-+		#address-cells = <2>;
-+		#size-cells = <0>;
-+
-+		B53_0: cpu at 0 {
-+			compatible = "brcm,brahma-b53";
-+			device_type = "cpu";
-+			reg = <0x0 0x0>;
-+			next-level-cache = <&L2_0>;
-+			enable-method = "psci";
-+		};
-+
-+		B53_1: cpu at 1 {
-+			compatible = "brcm,brahma-b53";
-+			device_type = "cpu";
-+			reg = <0x0 0x1>;
-+			next-level-cache = <&L2_0>;
-+			enable-method = "psci";
-+		};
-+
-+		L2_0: l2-cache0 {
-+			compatible = "cache";
-+		};
-+	};
-+
-+	timer {
-+		compatible = "arm,armv8-timer";
-+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
-+	};
-+
-+	pmu: pmu {
-+		compatible = "arm,cortex-a53-pmu";
-+		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
-+			<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>;
-+		interrupt-affinity = <&B53_0>, <&B53_1>;
-+	};
-+
-+	clocks: clocks {
-+		periph_clk: periph-clk {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <200000000>;
-+		};
-+		uart_clk: uart-clk {
-+			compatible = "fixed-factor-clock";
-+			#clock-cells = <0>;
-+			clocks = <&periph_clk>;
-+			clock-div = <4>;
-+			clock-mult = <1>;
-+		};
-+	};
-+
-+	psci {
-+		compatible = "arm,psci-0.2";
-+		method = "smc";
-+	};
-+
-+	axi at 81000000 {
-+		compatible = "simple-bus";
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		ranges = <0x0 0x0 0x81000000 0x8000>;
-+
-+		gic: interrupt-controller at 1000 {
-+			compatible = "arm,gic-400";
-+			#interrupt-cells = <3>;
-+			interrupt-controller;
-+			reg = <0x1000 0x1000>,
-+				<0x2000 0x2000>,
-+				<0x4000 0x2000>,
-+				<0x6000 0x2000>;
-+			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) |
-+					IRQ_TYPE_LEVEL_HIGH)>;
-+		};
-+	};
-+
-+	bus at ff800000 {
-+		compatible = "simple-bus";
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		ranges = <0x0 0x0 0xff800000 0x800000>;
-+
-+		uart0: serial at 12000 {
-+			compatible = "arm,pl011", "arm,primecell";
-+			reg = <0x12000 0x1000>;
-+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&uart_clk>, <&uart_clk>;
-+			clock-names = "uartclk", "apb_pclk";
-+			status = "disabled";
-+		};
-+	};
-+};
---- /dev/null
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts
-@@ -0,0 +1,30 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright 2022 Broadcom Ltd.
-+ */
-+
-+/dts-v1/;
-+
-+#include "bcm63146.dtsi"
-+
-+/ {
-+	model = "Broadcom BCM963146 Reference Board";
-+	compatible = "brcm,bcm963146", "brcm,bcm63146", "brcm,bcmbca";
-+
-+	aliases {
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	memory at 0 {
-+		device_type = "memory";
-+		reg = <0x0 0x0 0x0 0x08000000>;
-+	};
-+};
-+
-+&uart0 {
-+	status = "okay";
-+};
diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0005-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6856.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0005-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6856.patchgit
deleted file mode 100644
index 2e0da2e54a..0000000000
--- a/target/linux/bcm4908/patches-5.15/033-v6.0-0005-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6856.patchgit
+++ /dev/null
@@ -1,167 +0,0 @@
-From 64eca7ad058cff861b48cdead8dee40dfc284e9e Mon Sep 17 00:00:00 2001
-From: William Zhang <william.zhang at broadcom.com>
-Date: Wed, 8 Jun 2022 11:04:36 -0700
-Subject: [PATCH] arm64: dts: Add DTS files for bcmbca SoC BCM6856
-
-Add DTS for ARMv8 based broadband SoC BCM6856. bcm6856.dtsi is the
-SoC description DTS header and bcm96856.dts is a simple DTS file for
-Broadcom BCM96956 Reference board that only enable the UART port.
-
-Signed-off-by: William Zhang <william.zhang at broadcom.com>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/Makefile  |   3 +-
- .../boot/dts/broadcom/bcmbca/bcm6856.dtsi     | 103 ++++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm96856.dts     |  30 +++++
- 3 files changed, 135 insertions(+), 1 deletion(-)
- create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
- create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile
-@@ -8,4 +8,5 @@ dtb-$(CONFIG_ARCH_BCMBCA) += \
- 				bcm94912.dtb \
- 				bcm963158.dtb \
- 				bcm96858.dtb \
--				bcm963146.dtb
-+				bcm963146.dtb \
-+				bcm96856.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
-@@ -0,0 +1,103 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright 2022 Broadcom Ltd.
-+ */
-+
-+#include <dt-bindings/interrupt-controller/irq.h>
-+#include <dt-bindings/interrupt-controller/arm-gic.h>
-+
-+/ {
-+	compatible = "brcm,bcm6856", "brcm,bcmbca";
-+	#address-cells = <2>;
-+	#size-cells = <2>;
-+
-+	interrupt-parent = <&gic>;
-+
-+	cpus {
-+		#address-cells = <2>;
-+		#size-cells = <0>;
-+
-+		B53_0: cpu at 0 {
-+			compatible = "brcm,brahma-b53";
-+			device_type = "cpu";
-+			reg = <0x0 0x0>;
-+			next-level-cache = <&L2_0>;
-+			enable-method = "psci";
-+		};
-+
-+		B53_1: cpu at 1 {
-+			compatible = "brcm,brahma-b53";
-+			device_type = "cpu";
-+			reg = <0x0 0x1>;
-+			next-level-cache = <&L2_0>;
-+			enable-method = "psci";
-+		};
-+
-+		L2_0: l2-cache0 {
-+			compatible = "cache";
-+		};
-+	};
-+
-+	timer {
-+		compatible = "arm,armv8-timer";
-+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
-+	};
-+
-+	pmu: pmu {
-+		compatible = "arm,cortex-a53-pmu";
-+		interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
-+			<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
-+		interrupt-affinity = <&B53_0>, <&B53_1>;
-+	};
-+
-+	clocks: clocks {
-+		periph_clk:periph-clk {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <200000000>;
-+		};
-+	};
-+
-+	psci {
-+		compatible = "arm,psci-0.2";
-+		method = "smc";
-+	};
-+
-+	axi at 81000000 {
-+		compatible = "simple-bus";
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		ranges = <0x0 0x0 0x81000000 0x8000>;
-+
-+		gic: interrupt-controller at 1000 {
-+			compatible = "arm,gic-400";
-+			#interrupt-cells = <3>;
-+			interrupt-controller;
-+			reg = <0x1000 0x1000>, /* GICD */
-+				<0x2000 0x2000>, /* GICC */
-+				<0x4000 0x2000>, /* GICH */
-+				<0x6000 0x2000>; /* GICV */
-+			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(2) |
-+					IRQ_TYPE_LEVEL_HIGH)>;
-+		};
-+	};
-+
-+	bus at ff800000 {
-+		compatible = "simple-bus";
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		ranges = <0x0 0x0 0xff800000 0x800000>;
-+
-+		uart0: serial at 640 {
-+			compatible = "brcm,bcm6345-uart";
-+			reg = <0x640 0x18>;
-+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&periph_clk>;
-+			clock-names = "refclk";
-+			status = "disabled";
-+		};
-+	};
-+};
---- /dev/null
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts
-@@ -0,0 +1,30 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright 2022 Broadcom Ltd.
-+ */
-+
-+/dts-v1/;
-+
-+#include "bcm6856.dtsi"
-+
-+/ {
-+	model = "Broadcom BCM96856 Reference Board";
-+	compatible = "brcm,bcm96856", "brcm,bcm6856", "brcm,bcmbca";
-+
-+	aliases {
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	memory at 0 {
-+		device_type = "memory";
-+		reg = <0x0 0x0 0x0 0x08000000>;
-+	};
-+};
-+
-+&uart0 {
-+	status = "okay";
-+};
diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0006-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6813.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0006-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6813.patchgit
deleted file mode 100644
index 6be8ab8ee4..0000000000
--- a/target/linux/bcm4908/patches-5.15/033-v6.0-0006-arm64-dts-Add-DTS-files-for-bcmbca-SoC-BCM6813.patchgit
+++ /dev/null
@@ -1,192 +0,0 @@
-From eab6bb0994b806525fc5e362e8b865f61c4a9e20 Mon Sep 17 00:00:00 2001
-From: William Zhang <william.zhang at broadcom.com>
-Date: Thu, 9 Jun 2022 17:15:33 -0700
-Subject: [PATCH] arm64: dts: Add DTS files for bcmbca SoC BCM6813
-
-Add DTS for ARMv8 based broadband SoC BCM6813. bcm6813.dtsi is the
-SoC description DTS header and bcm96813.dts is a simple DTS file for
-Broadcom BCM96813 Reference board that only enable the UART port.
-
-Signed-off-by: William Zhang <william.zhang at broadcom.com>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/Makefile  |   3 +-
- .../boot/dts/broadcom/bcmbca/bcm6813.dtsi     | 128 ++++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm96813.dts     |  30 ++++
- 3 files changed, 160 insertions(+), 1 deletion(-)
- create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
- create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile
-@@ -9,4 +9,5 @@ dtb-$(CONFIG_ARCH_BCMBCA) += \
- 				bcm963158.dtb \
- 				bcm96858.dtb \
- 				bcm963146.dtb \
--				bcm96856.dtb
-+				bcm96856.dtb \
-+				bcm96813.dtb
---- /dev/null
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
-@@ -0,0 +1,128 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright 2022 Broadcom Ltd.
-+ */
-+
-+#include <dt-bindings/interrupt-controller/irq.h>
-+#include <dt-bindings/interrupt-controller/arm-gic.h>
-+
-+/ {
-+	compatible = "brcm,bcm6813", "brcm,bcmbca";
-+	#address-cells = <2>;
-+	#size-cells = <2>;
-+
-+	interrupt-parent = <&gic>;
-+
-+	cpus {
-+		#address-cells = <2>;
-+		#size-cells = <0>;
-+
-+		B53_0: cpu at 0 {
-+			compatible = "brcm,brahma-b53";
-+			device_type = "cpu";
-+			reg = <0x0 0x0>;
-+			next-level-cache = <&L2_0>;
-+			enable-method = "psci";
-+		};
-+
-+		B53_1: cpu at 1 {
-+			compatible = "brcm,brahma-b53";
-+			device_type = "cpu";
-+			reg = <0x0 0x1>;
-+			next-level-cache = <&L2_0>;
-+			enable-method = "psci";
-+		};
-+
-+		B53_2: cpu at 2 {
-+			compatible = "brcm,brahma-b53";
-+			device_type = "cpu";
-+			reg = <0x0 0x2>;
-+			next-level-cache = <&L2_0>;
-+			enable-method = "psci";
-+		};
-+
-+		B53_3: cpu at 3 {
-+			compatible = "brcm,brahma-b53";
-+			device_type = "cpu";
-+			reg = <0x0 0x3>;
-+			next-level-cache = <&L2_0>;
-+			enable-method = "psci";
-+		};
-+
-+		L2_0: l2-cache0 {
-+			compatible = "cache";
-+		};
-+	};
-+
-+	timer {
-+		compatible = "arm,armv8-timer";
-+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>,
-+			<GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_LOW)>;
-+	};
-+
-+	pmu: pmu {
-+		compatible = "arm,cortex-a53-pmu";
-+		interrupts = <GIC_SPI 7 IRQ_TYPE_LEVEL_HIGH>,
-+			<GIC_SPI 8 IRQ_TYPE_LEVEL_HIGH>,
-+			<GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
-+			<GIC_SPI 10 IRQ_TYPE_LEVEL_HIGH>;
-+		interrupt-affinity = <&B53_0>, <&B53_1>,
-+			<&B53_2>, <&B53_3>;
-+	};
-+
-+	clocks: clocks {
-+		periph_clk: periph-clk {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <200000000>;
-+		};
-+		uart_clk: uart-clk {
-+			compatible = "fixed-factor-clock";
-+			#clock-cells = <0>;
-+			clocks = <&periph_clk>;
-+			clock-div = <4>;
-+			clock-mult = <1>;
-+		};
-+	};
-+
-+	psci {
-+		compatible = "arm,psci-0.2";
-+		method = "smc";
-+	};
-+
-+	axi at 81000000 {
-+		compatible = "simple-bus";
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		ranges = <0x0 0x0 0x81000000 0x8000>;
-+
-+		gic: interrupt-controller at 1000 {
-+			compatible = "arm,gic-400";
-+			#interrupt-cells = <3>;
-+			interrupt-controller;
-+			interrupts = <GIC_PPI 9 (GIC_CPU_MASK_SIMPLE(4) | IRQ_TYPE_LEVEL_HIGH)>;
-+			reg = <0x1000 0x1000>,
-+				<0x2000 0x2000>,
-+				<0x4000 0x2000>,
-+				<0x6000 0x2000>;
-+		};
-+	};
-+
-+	bus at ff800000 {
-+		compatible = "simple-bus";
-+		#address-cells = <1>;
-+		#size-cells = <1>;
-+		ranges = <0x0 0x0 0xff800000 0x800000>;
-+
-+		uart0: serial at 12000 {
-+			compatible = "arm,pl011", "arm,primecell";
-+			reg = <0x12000 0x1000>;
-+			interrupts = <GIC_SPI 32 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&uart_clk>, <&uart_clk>;
-+			clock-names = "uartclk", "apb_pclk";
-+			status = "disabled";
-+		};
-+	};
-+};
---- /dev/null
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts
-@@ -0,0 +1,30 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright 2022 Broadcom Ltd.
-+ */
-+
-+/dts-v1/;
-+
-+#include "bcm6813.dtsi"
-+
-+/ {
-+	model = "Broadcom BCM96813 Reference Board";
-+	compatible = "brcm,bcm96813", "brcm,bcm6813", "brcm,bcmbca";
-+
-+	aliases {
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	memory at 0 {
-+		device_type = "memory";
-+		reg = <0x0 0x0 0x0 0x08000000>;
-+	};
-+};
-+
-+&uart0 {
-+	status = "okay";
-+};
diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0007-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0007-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patchgit
deleted file mode 100644
index 987da135d7..0000000000
--- a/target/linux/bcm4908/patches-5.15/033-v6.0-0007-arm64-dts-broadcom-align-gpio-key-node-names-with-dt.patchgit
+++ /dev/null
@@ -1,79 +0,0 @@
-From ea559c81b61603d4044df6f826f10a832c42c98c Mon Sep 17 00:00:00 2001
-From: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Date: Wed, 15 Jun 2022 17:52:59 -0700
-Subject: [PATCH] arm64: dts: broadcom: align gpio-key node names with dtschema
-
-The node names should be generic and DT schema expects certain pattern
-(e.g. with key/button/switch).
-
-Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski at linaro.org>
-Link: https://lore.kernel.org/r/20220616005333.18491-6-krzysztof.kozlowski at linaro.org
----
- .../broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts   | 8 ++++----
- .../boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts  | 8 ++++----
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
-@@ -83,25 +83,25 @@
- 		compatible = "gpio-keys-polled";
- 		poll-interval = <100>;
- 
--		brightness {
-+		key-brightness {
- 			label = "LEDs";
- 			linux,code = <KEY_BRIGHTNESS_ZERO>;
- 			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
- 		};
- 
--		wps {
-+		key-wps {
- 			label = "WPS";
- 			linux,code = <KEY_WPS_BUTTON>;
- 			gpios = <&gpio0 21 GPIO_ACTIVE_LOW>;
- 		};
- 
--		wifi {
-+		key-wifi {
- 			label = "WiFi";
- 			linux,code = <KEY_RFKILL>;
- 			gpios = <&gpio0 22 GPIO_ACTIVE_LOW>;
- 		};
- 
--		restart {
-+		key-restart {
- 			label = "Reset";
- 			linux,code = <KEY_RESTART>;
- 			gpios = <&gpio0 23 GPIO_ACTIVE_LOW>;
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
-@@ -18,25 +18,25 @@
- 		compatible = "gpio-keys-polled";
- 		poll-interval = <100>;
- 
--		wifi {
-+		key-wifi {
- 			label = "WiFi";
- 			linux,code = <KEY_RFKILL>;
- 			gpios = <&gpio0 28 GPIO_ACTIVE_LOW>;
- 		};
- 
--		wps {
-+		key-wps {
- 			label = "WPS";
- 			linux,code = <KEY_WPS_BUTTON>;
- 			gpios = <&gpio0 29 GPIO_ACTIVE_LOW>;
- 		};
- 
--		restart {
-+		key-restart {
- 			label = "Reset";
- 			linux,code = <KEY_RESTART>;
- 			gpios = <&gpio0 30 GPIO_ACTIVE_LOW>;
- 		};
- 
--		brightness {
-+		key-brightness {
- 			label = "LEDs";
- 			linux,code = <KEY_BRIGHTNESS_ZERO>;
- 			gpios = <&gpio0 31 GPIO_ACTIVE_LOW>;
diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit b/target/linux/bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit
deleted file mode 100644
index 95540d3aab..0000000000
--- a/target/linux/bcm4908/patches-5.15/033-v6.0-0008-arm64-dts-broadcom-bcm4908-Fix-timer-node-for-BCM490.patchgit
+++ /dev/null
@@ -1,33 +0,0 @@
-From b4a544e415e9be33b37d9bfa9d9f9f4d13f553d6 Mon Sep 17 00:00:00 2001
-From: William Zhang <william.zhang at broadcom.com>
-Date: Fri, 8 Jul 2022 11:25:06 -0700
-Subject: [PATCH] arm64: dts: broadcom: bcm4908: Fix timer node for BCM4906 SoC
-
-The cpu mask value in interrupt property inherits from bcm4908.dtsi
-which sets to four cpus. Correct the value to two cpus for dual core
-BCM4906 SoC.
-
-Fixes: c8b404fb05dc ("arm64: dts: broadcom: bcm4908: add BCM4906 Netgear R8000P DTS files")
-Signed-off-by: William Zhang <william.zhang at broadcom.com>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906.dtsi
-@@ -17,6 +17,14 @@
- 			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
- 	};
- 
-+	timer {
-+		compatible = "arm,armv8-timer";
-+		interrupts = <GIC_PPI 13 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			     <GIC_PPI 14 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			     <GIC_PPI 11 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>,
-+			     <GIC_PPI 10 (GIC_CPU_MASK_SIMPLE(2) | IRQ_TYPE_LEVEL_LOW)>;
-+	};
-+
- 	pmu {
- 		compatible = "arm,cortex-a53-pmu";
- 		interrupts = <GIC_SPI 9 IRQ_TYPE_LEVEL_HIGH>,
diff --git a/target/linux/bcm4908/patches-5.15/033-v6.0-0011-arm64-bcmbca-add-arch-bcmbca-machine-entry.patch b/target/linux/bcm4908/patches-5.15/033-v6.0-0011-arm64-bcmbca-add-arch-bcmbca-machine-entry.patch
deleted file mode 100644
index 603e30cb8a..0000000000
--- a/target/linux/bcm4908/patches-5.15/033-v6.0-0011-arm64-bcmbca-add-arch-bcmbca-machine-entry.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From fdcd652ce2b6b819f5c4dc3cead5215c84ee6933 Mon Sep 17 00:00:00 2001
-From: William Zhang <william.zhang at broadcom.com>
-Date: Wed, 1 Jun 2022 15:56:50 -0700
-Subject: [PATCH] arm64: bcmbca: add arch bcmbca machine entry
-
-Add ARCH_BCMBCA config for Broadcom Broadband SoC chipsets
-
-Signed-off-by: William Zhang <william.zhang at broadcom.com>
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/Kconfig.platforms | 9 +++++++++
- 1 file changed, 9 insertions(+)
-
---- a/arch/arm64/Kconfig.platforms
-+++ b/arch/arm64/Kconfig.platforms
-@@ -65,6 +65,15 @@ config ARCH_BCM_IPROC
- 	help
- 	  This enables support for Broadcom iProc based SoCs
- 
-+config ARCH_BCMBCA
-+	bool "Broadcom Broadband SoC"
-+	help
-+	  Say Y if you intend to run the kernel on a Broadcom Broadband ARM-based
-+	  BCA chipset.
-+
-+	  This enables support for Broadcom BCA ARM-based broadband chipsets,
-+	  including the DSL, PON and Wireless family of chips.
-+
- config ARCH_BERLIN
- 	bool "Marvell Berlin SoC Family"
- 	select DW_APB_ICTL
diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch
deleted file mode 100644
index 54e515cc5e..0000000000
--- a/target/linux/bcm4908/patches-5.15/034-v6.1-0001-arm64-dts-broadcom-bcm4908-add-remaining-LED-pins.patch
+++ /dev/null
@@ -1,115 +0,0 @@
-From 456b6dd1baadd2da10e28ffd1717b06d1fa17a97 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 18 Jul 2022 15:20:58 +0200
-Subject: [PATCH] arm64: dts: broadcom: bcm4908: add remaining LED pins
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Include all 32 pins.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20220718132100.13277-1-zajec5 at gmail.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../boot/dts/broadcom/bcmbca/bcm4908.dtsi    | 75 +++++++++++++++++++
- 1 file changed, 75 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -349,6 +349,61 @@
- 				groups = "led_9_grp_a";
- 			};
- 
-+			pins_led_10_a: led_10-a-pins {
-+				function = "led_10";
-+				groups = "led_10_grp_a";
-+			};
-+
-+			pins_led_11_a: led_11-a-pins {
-+				function = "led_11";
-+				groups = "led_11_grp_a";
-+			};
-+
-+			pins_led_12_a: led_12-a-pins {
-+				function = "led_12";
-+				groups = "led_12_grp_a";
-+			};
-+
-+			pins_led_13_a: led_13-a-pins {
-+				function = "led_13";
-+				groups = "led_13_grp_a";
-+			};
-+
-+			pins_led_14_a: led_14-a-pins {
-+				function = "led_14";
-+				groups = "led_14_grp_a";
-+			};
-+
-+			pins_led_15_a: led_15-a-pins {
-+				function = "led_15";
-+				groups = "led_15_grp_a";
-+			};
-+
-+			pins_led_16_a: led_16-a-pins {
-+				function = "led_16";
-+				groups = "led_16_grp_a";
-+			};
-+
-+			pins_led_17_a: led_17-a-pins {
-+				function = "led_17";
-+				groups = "led_17_grp_a";
-+			};
-+
-+			pins_led_18_a: led_18-a-pins {
-+				function = "led_18";
-+				groups = "led_18_grp_a";
-+			};
-+
-+			pins_led_19_a: led_19-a-pins {
-+				function = "led_19";
-+				groups = "led_19_grp_a";
-+			};
-+
-+			pins_led_20_a: led_20-a-pins {
-+				function = "led_20";
-+				groups = "led_20_grp_a";
-+			};
-+
- 			pins_led_21_a: led_21-a-pins {
- 				function = "led_21";
- 				groups = "led_21_grp_a";
-@@ -359,6 +414,21 @@
- 				groups = "led_22_grp_a";
- 			};
- 
-+			pins_led_23_a: led_23-a-pins {
-+				function = "led_23";
-+				groups = "led_23_grp_a";
-+			};
-+
-+			pins_led_24_a: led_24-a-pins {
-+				function = "led_24";
-+				groups = "led_24_grp_a";
-+			};
-+
-+			pins_led_25_a: led_25-a-pins {
-+				function = "led_25";
-+				groups = "led_25_grp_a";
-+			};
-+
- 			pins_led_26_a: led_26-a-pins {
- 				function = "led_26";
- 				groups = "led_26_grp_a";
-@@ -384,6 +454,11 @@
- 				groups = "led_30_grp_a";
- 			};
- 
-+			pins_led_31_a: led_31-a-pins {
-+				function = "led_31";
-+				groups = "led_31_grp_a";
-+			};
-+
- 			pins_hs_uart: hs_uart-pins {
- 				function = "hs_uart";
- 				groups = "hs_uart_grp";
diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch
deleted file mode 100644
index 90be8bec0a..0000000000
--- a/target/linux/bcm4908/patches-5.15/034-v6.1-0002-arm64-dts-broadcom-bcm4908-add-LEDs-controller-block.patch
+++ /dev/null
@@ -1,35 +0,0 @@
-From 7de56b1dc1149c702d4cc1e89ccc251bfb2bc246 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 18 Jul 2022 15:20:59 +0200
-Subject: [PATCH] arm64: dts: broadcom: bcm4908: add LEDs controller block
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM4908 includes LEDs controller that supports multiple brightness
-levels & hardware blinking.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20220718132100.13277-2-zajec5 at gmail.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 8 ++++++++
- 1 file changed, 8 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -514,6 +514,14 @@
- 			status = "okay";
- 		};
- 
-+		leds: leds at 800 {
-+			compatible = "brcm,bcm4908-leds", "brcm,bcm63138-leds";
-+			reg = <0x800 0xdc>;
-+
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+		};
-+
- 		nand-controller at 1800 {
- 			#address-cells = <1>;
- 			#size-cells = <0>;
diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch
deleted file mode 100644
index f4c7d8c489..0000000000
--- a/target/linux/bcm4908/patches-5.15/034-v6.1-0003-arm64-dts-broadcom-bcm4908-add-Asus-GT-AC5300-LEDs.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 3bcae3396e986b4ab97a69e8de517e32f9691a4b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 18 Jul 2022 15:21:00 +0200
-Subject: [PATCH] arm64: dts: broadcom: bcm4908: add Asus GT-AC5300 LEDs
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-There are 5 software-controllable LEDs on PCB.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20220718132100.13277-3-zajec5 at gmail.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../bcmbca/bcm4908-asus-gt-ac5300.dts        | 48 +++++++++++++++++++
- 1 file changed, 48 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
-@@ -2,6 +2,7 @@
- 
- #include <dt-bindings/gpio/gpio.h>
- #include <dt-bindings/input/input.h>
-+#include <dt-bindings/leds/common.h>
- 
- #include "bcm4908.dtsi"
- 
-@@ -118,6 +119,53 @@
- 	};
- };
- 
-+&leds {
-+	led-power at 11 {
-+		reg = <0x11>;
-+		function = LED_FUNCTION_POWER;
-+		color = <LED_COLOR_ID_WHITE>;
-+		default-state = "on";
-+		active-low;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pins_led_17_a>;
-+	};
-+
-+	led-wan-red at 12 {
-+		reg = <0x12>;
-+		function = LED_FUNCTION_WAN;
-+		color = <LED_COLOR_ID_RED>;
-+		active-low;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pins_led_18_a>;
-+	};
-+
-+	led-wps at 14 {
-+		reg = <0x14>;
-+		function = LED_FUNCTION_WPS;
-+		color = <LED_COLOR_ID_WHITE>;
-+		active-low;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pins_led_20_a>;
-+	};
-+
-+	led-wan-white at 15 {
-+		reg = <0x15>;
-+		function = LED_FUNCTION_WAN;
-+		color = <LED_COLOR_ID_WHITE>;
-+		active-low;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pins_led_21_a>;
-+	};
-+
-+	led-lan at 19 {
-+		reg = <0x19>;
-+		function = LED_FUNCTION_LAN;
-+		color = <LED_COLOR_ID_WHITE>;
-+		pinctrl-names = "default";
-+		pinctrl-0 = <&pins_led_25_a>;
-+	};
-+};
-+
- &nandcs {
- 	nand-ecc-strength = <4>;
- 	nand-ecc-step-size = <512>;
diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch
deleted file mode 100644
index 8f9d3604cb..0000000000
--- a/target/linux/bcm4908/patches-5.15/034-v6.1-0004-arm64-dts-bcmbca-update-BCM4908-board-dts-files.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 4fdcbde682291fba2c3f45a41decd656d92a314f Mon Sep 17 00:00:00 2001
-From: William Zhang <william.zhang at broadcom.com>
-Date: Wed, 3 Aug 2022 10:54:49 -0700
-Subject: [PATCH] arm64: dts: bcmbca: update BCM4908 board dts files
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Append "brcm,bcmbca" to compatible strings based on the new bcmbca
-binding rule for BCM4908 family based boards.
-
-Signed-off-by: William Zhang <william.zhang at broadcom.com>
-Acked-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20220803175455.47638-4-william.zhang at broadcom.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts | 2 +-
- .../dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts     | 2 +-
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts | 2 +-
- .../arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts | 2 +-
- 4 files changed, 4 insertions(+), 4 deletions(-)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts
-@@ -7,7 +7,7 @@
- #include "bcm4906.dtsi"
- 
- / {
--	compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908";
-+	compatible = "netgear,r8000p", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca";
- 	model = "Netgear R8000P";
- 
- 	memory at 0 {
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
-@@ -7,7 +7,7 @@
- #include "bcm4906.dtsi"
- 
- / {
--	compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908";
-+	compatible = "tplink,archer-c2300-v1", "brcm,bcm4906", "brcm,bcm4908", "brcm,bcmbca";
- 	model = "TP-Link Archer C2300 V1";
- 
- 	memory at 0 {
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
-@@ -7,7 +7,7 @@
- #include "bcm4908.dtsi"
- 
- / {
--	compatible = "asus,gt-ac5300", "brcm,bcm4908";
-+	compatible = "asus,gt-ac5300", "brcm,bcm4908", "brcm,bcmbca";
- 	model = "Asus GT-AC5300";
- 
- 	memory at 0 {
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-netgear-raxe500.dts
-@@ -3,7 +3,7 @@
- #include "bcm4908.dtsi"
- 
- / {
--	compatible = "netgear,raxe500", "brcm,bcm4908";
-+	compatible = "netgear,raxe500", "brcm,bcm4908", "brcm,bcmbca";
- 	model = "Netgear RAXE500";
- 
- 	memory at 0 {
diff --git a/target/linux/bcm4908/patches-5.15/034-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch b/target/linux/bcm4908/patches-5.15/034-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch
deleted file mode 100644
index b19c5d33b4..0000000000
--- a/target/linux/bcm4908/patches-5.15/034-v6.1-0006-arm64-dts-Add-BCM4908-generic-board-dts.patch
+++ /dev/null
@@ -1,62 +0,0 @@
-From 72e0bdb6d7edb1785d58f2e8e7c80e1d2f93a319 Mon Sep 17 00:00:00 2001
-From: William Zhang <william.zhang at broadcom.com>
-Date: Wed, 3 Aug 2022 10:54:51 -0700
-Subject: [PATCH] arm64: dts: Add BCM4908 generic board dts
-
-Add generic bare bone bcm94908.dts file to support any 4908 based
-design. It supports cpu subsystem, memory and an uart console. This can
-be useful for board bring-up and cpu subsystem and memory related kernel
-test as well.
-
-Signed-off-by: William Zhang <william.zhang at broadcom.com>
-Link: https://lore.kernel.org/r/20220803175455.47638-6-william.zhang at broadcom.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/Makefile  |  1 +
- .../boot/dts/broadcom/bcmbca/bcm94908.dts     | 30 +++++++++++++++++++
- 2 files changed, 31 insertions(+)
- create mode 100644 arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/Makefile
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/Makefile
-@@ -4,6 +4,7 @@ dtb-$(CONFIG_ARCH_BCMBCA) += \
- 				bcm4906-tplink-archer-c2300-v1.dtb \
- 				bcm4908-asus-gt-ac5300.dtb \
- 				bcm4908-netgear-raxe500.dtb \
-+				bcm94908.dtb \
- 				bcm4912-asus-gt-ax6000.dtb \
- 				bcm94912.dtb \
- 				bcm963158.dtb \
---- /dev/null
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts
-@@ -0,0 +1,30 @@
-+// SPDX-License-Identifier: (GPL-2.0+ OR MIT)
-+/*
-+ * Copyright 2022 Broadcom Ltd.
-+ */
-+
-+/dts-v1/;
-+
-+#include "bcm4908.dtsi"
-+
-+/ {
-+	model = "Broadcom BCM94908 Reference Board";
-+	compatible = "brcm,bcm94908", "brcm,bcm4908", "brcm,bcmbca";
-+
-+	aliases {
-+		serial0 = &uart0;
-+	};
-+
-+	chosen {
-+		stdout-path = "serial0:115200n8";
-+	};
-+
-+	memory at 0 {
-+		device_type = "memory";
-+		reg = <0x0 0x0 0x0 0x08000000>;
-+	};
-+};
-+
-+&uart0 {
-+	status = "okay";
-+};
diff --git a/target/linux/bcm4908/patches-5.15/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch b/target/linux/bcm4908/patches-5.15/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch
deleted file mode 100644
index e175f27891..0000000000
--- a/target/linux/bcm4908/patches-5.15/035-v6.2-0001-arm64-dts-broadcom-bcmbca-bcm4908-add-TWD-block-time.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From 68064196cffea33f090bd2e8d81cd5e20107ecf1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Thu, 3 Nov 2022 11:53:16 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add TWD block timer
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM4908 TWD contains block with 4 timers. Add binding for it.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20221103105316.21294-1-zajec5 at gmail.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi | 5 +++++
- 1 file changed, 5 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -280,6 +280,11 @@
- 			#address-cells = <1>;
- 			#size-cells = <1>;
- 
-+			timer at 0 {
-+				compatible = "brcm,bcm63138-timer";
-+				reg = <0x0 0x28>;
-+			};
-+
- 			watchdog at 28 {
- 				compatible = "brcm,bcm6345-wdt";
- 				reg = <0x28 0x8>;
diff --git a/target/linux/bcm4908/patches-5.15/035-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch b/target/linux/bcm4908/patches-5.15/035-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch
deleted file mode 100644
index e8e81ae544..0000000000
--- a/target/linux/bcm4908/patches-5.15/035-v6.2-0002-arm64-dts-broadcom-bcmbca-bcm6858-add-TWD-block.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 4f9fb09175e87a233787a2dee1e5dabb14deb022 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Thu, 3 Nov 2022 12:00:15 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm6858: add TWD block
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM6858 contains TWD block with timers, watchdog, and reset subblocks.
-Describe it.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20221103110015.21761-1-zajec5 at gmail.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../boot/dts/broadcom/bcmbca/bcm6858.dtsi     | 19 +++++++++++++++++++
- 1 file changed, 19 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
-@@ -109,6 +109,25 @@
- 		#size-cells = <1>;
- 		ranges = <0x0 0x0 0xff800000 0x62000>;
- 
-+		twd: timer-mfd at 400 {
-+			compatible = "brcm,bcm4908-twd", "simple-mfd", "syscon";
-+			reg = <0x400 0x4c>;
-+			ranges = <0x0 0x400 0x4c>;
-+
-+			#address-cells = <1>;
-+			#size-cells = <1>;
-+
-+			timer at 0 {
-+				compatible = "brcm,bcm63138-timer";
-+				reg = <0x0 0x28>;
-+			};
-+
-+			watchdog at 28 {
-+				compatible = "brcm,bcm6345-wdt";
-+				reg = <0x28 0x8>;
-+			};
-+		};
-+
- 		uart0: serial at 640 {
- 			compatible = "brcm,bcm6345-uart";
- 			reg = <0x640 0x18>;
diff --git a/target/linux/bcm4908/patches-5.15/035-v6.2-0003-arm64-dts-Update-cache-properties-for-broadcom.patch b/target/linux/bcm4908/patches-5.15/035-v6.2-0003-arm64-dts-Update-cache-properties-for-broadcom.patch
deleted file mode 100644
index a19ab8cf8f..0000000000
--- a/target/linux/bcm4908/patches-5.15/035-v6.2-0003-arm64-dts-Update-cache-properties-for-broadcom.patch
+++ /dev/null
@@ -1,134 +0,0 @@
-From e567e58d6819adc002c57b81e16b88da24d3b4aa Mon Sep 17 00:00:00 2001
-From: Pierre Gondois <pierre.gondois at arm.com>
-Date: Tue, 22 Nov 2022 17:32:07 +0100
-Subject: [PATCH] arm64: dts: Update cache properties for broadcom
-
-The DeviceTree Specification v0.3 specifies that the cache node
-'compatible' and 'cache-level' properties are 'required'. Cf.
-s3.8 Multi-level and Shared Cache Nodes
-The 'cache-unified' property should be present if one of the
-properties for unified cache is present ('cache-size', ...).
-
-Update the Device Trees accordingly.
-
-Acked-by: William Zhang <william.zhang at broadcom.com>
-Signed-off-by: Pierre Gondois <pierre.gondois at arm.com>
-Link: https://lore.kernel.org/r/20221122163208.3810985-3-pierre.gondois at arm.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi    | 1 +
- arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi    | 1 +
- arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi   | 1 +
- arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi   | 1 +
- arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi    | 1 +
- arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi    | 1 +
- arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi    | 1 +
- arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi    | 1 +
- arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi | 4 ++++
- 9 files changed, 12 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -63,6 +63,7 @@
- 
- 		l2: l2-cache0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi
-@@ -51,6 +51,7 @@
- 
- 		L2_0: l2-cache0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
-@@ -35,6 +35,7 @@
- 
- 		L2_0: l2-cache0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi
-@@ -51,6 +51,7 @@
- 
- 		L2_0: l2-cache0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
-@@ -51,6 +51,7 @@
- 
- 		L2_0: l2-cache0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
-@@ -35,6 +35,7 @@
- 
- 		L2_0: l2-cache0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
-@@ -50,6 +50,7 @@
- 		};
- 		L2_0: l2-cache0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/northstar2/ns2.dtsi
-@@ -79,6 +79,7 @@
- 
- 		CLUSTER0_L2: l2-cache at 0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
---- a/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/stingray/stingray.dtsi
-@@ -108,18 +108,22 @@
- 
- 		CLUSTER0_L2: l2-cache at 0 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 
- 		CLUSTER1_L2: l2-cache at 100 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 
- 		CLUSTER2_L2: l2-cache at 200 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 
- 		CLUSTER3_L2: l2-cache at 300 {
- 			compatible = "cache";
-+			cache-level = <2>;
- 		};
- 	};
- 
diff --git a/target/linux/bcm4908/patches-5.15/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch b/target/linux/bcm4908/patches-5.15/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch
deleted file mode 100644
index 7476aed05b..0000000000
--- a/target/linux/bcm4908/patches-5.15/036-v6.4-0001-arm64-dts-broadcom-bcmbca-Add-spi-controller-node.patch
+++ /dev/null
@@ -1,367 +0,0 @@
-From f5d83b714e304d5f3229da434af2eeea033c4f5d Mon Sep 17 00:00:00 2001
-From: William Zhang <william.zhang at broadcom.com>
-Date: Mon, 6 Feb 2023 22:58:15 -0800
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: Add spi controller node
-
-Add support for HSSPI controller in ARMv8 chip dts files.
-
-Signed-off-by: William Zhang <william.zhang at broadcom.com>
-Link: https://lore.kernel.org/r/20230207065826.285013-5-william.zhang at broadcom.com
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../boot/dts/broadcom/bcmbca/bcm4908.dtsi     | 18 +++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm4912.dtsi     | 20 +++++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm63146.dtsi    | 19 ++++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm63158.dtsi    | 19 ++++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm6813.dtsi     | 20 +++++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm6856.dtsi     | 18 +++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm6858.dtsi     | 18 +++++++++++++++++
- .../boot/dts/broadcom/bcmbca/bcm94908.dts     |  4 ++++
- .../boot/dts/broadcom/bcmbca/bcm94912.dts     |  4 ++++
- .../boot/dts/broadcom/bcmbca/bcm963146.dts    |  4 ++++
- .../boot/dts/broadcom/bcmbca/bcm963158.dts    |  4 ++++
- .../boot/dts/broadcom/bcmbca/bcm96813.dts     |  4 ++++
- .../boot/dts/broadcom/bcmbca/bcm96856.dts     |  4 ++++
- .../boot/dts/broadcom/bcmbca/bcm96858.dts     |  4 ++++
- 14 files changed, 160 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -107,6 +107,12 @@
- 			clock-frequency = <50000000>;
- 			clock-output-names = "periph";
- 		};
-+
-+		hsspi_pll: hsspi-pll {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <400000000>;
-+		};
- 	};
- 
- 	soc {
-@@ -528,6 +534,18 @@
- 			#size-cells = <0>;
- 		};
- 
-+		hsspi: spi at 1000{
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			compatible = "brcm,bcm4908-hsspi", "brcm,bcmbca-hsspi-v1.0";
-+			reg = <0x1000 0x600>;
-+			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&hsspi_pll &hsspi_pll>;
-+			clock-names = "hsspi", "pll";
-+			num-cs = <8>;
-+			status = "disabled";
-+		};
-+
- 		nand-controller at 1800 {
- 			#address-cells = <1>;
- 			#size-cells = <0>;
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4912.dtsi
-@@ -79,6 +79,7 @@
- 			#clock-cells = <0>;
- 			clock-frequency = <200000000>;
- 		};
-+
- 		uart_clk: uart-clk {
- 			compatible = "fixed-factor-clock";
- 			#clock-cells = <0>;
-@@ -86,6 +87,12 @@
- 			clock-div = <4>;
- 			clock-mult = <1>;
- 		};
-+
-+		hsspi_pll: hsspi-pll {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <200000000>;
-+		};
- 	};
- 
- 	psci {
-@@ -117,6 +124,19 @@
- 		#size-cells = <1>;
- 		ranges = <0x0 0x0 0xff800000 0x800000>;
- 
-+		hsspi: spi at 1000 {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			compatible = "brcm,bcm4912-hsspi", "brcm,bcmbca-hsspi-v1.1";
-+			reg = <0x1000 0x600>, <0x2610 0x4>;
-+			reg-names = "hsspi", "spim-ctrl";
-+			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&hsspi_pll &hsspi_pll>;
-+			clock-names = "hsspi", "pll";
-+			num-cs = <8>;
-+			status = "disabled";
-+		};
-+
- 		uart0: serial at 12000 {
- 			compatible = "arm,pl011", "arm,primecell";
- 			reg = <0x12000 0x1000>;
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63146.dtsi
-@@ -60,6 +60,7 @@
- 			#clock-cells = <0>;
- 			clock-frequency = <200000000>;
- 		};
-+
- 		uart_clk: uart-clk {
- 			compatible = "fixed-factor-clock";
- 			#clock-cells = <0>;
-@@ -67,6 +68,12 @@
- 			clock-div = <4>;
- 			clock-mult = <1>;
- 		};
-+
-+		hsspi_pll: hsspi-pll {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <200000000>;
-+		};
- 	};
- 
- 	psci {
-@@ -99,6 +106,18 @@
- 		#size-cells = <1>;
- 		ranges = <0x0 0x0 0xff800000 0x800000>;
- 
-+		hsspi: spi at 1000 {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			compatible = "brcm,bcm63146-hsspi", "brcm,bcmbca-hsspi-v1.0";
-+			reg = <0x1000 0x600>;
-+			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&hsspi_pll &hsspi_pll>;
-+			clock-names = "hsspi", "pll";
-+			num-cs = <8>;
-+			status = "disabled";
-+		};
-+
- 		uart0: serial at 12000 {
- 			compatible = "arm,pl011", "arm,primecell";
- 			reg = <0x12000 0x1000>;
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm63158.dtsi
-@@ -79,6 +79,7 @@
- 			#clock-cells = <0>;
- 			clock-frequency = <200000000>;
- 		};
-+
- 		uart_clk: uart-clk {
- 			compatible = "fixed-factor-clock";
- 			#clock-cells = <0>;
-@@ -86,6 +87,12 @@
- 			clock-div = <4>;
- 			clock-mult = <1>;
- 		};
-+
-+		hsspi_pll: hsspi-pll {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <400000000>;
-+		};
- 	};
- 
- 	psci {
-@@ -117,6 +124,18 @@
- 		#size-cells = <1>;
- 		ranges = <0x0 0x0 0xff800000 0x800000>;
- 
-+		hsspi: spi at 1000 {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			compatible = "brcm,bcm63158-hsspi", "brcm,bcmbca-hsspi-v1.0";
-+			reg = <0x1000 0x600>;
-+			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&hsspi_pll &hsspi_pll>;
-+			clock-names = "hsspi", "pll";
-+			num-cs = <8>;
-+			status = "disabled";
-+		};
-+
- 		uart0: serial at 12000 {
- 			compatible = "arm,pl011", "arm,primecell";
- 			reg = <0x12000 0x1000>;
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6813.dtsi
-@@ -79,6 +79,7 @@
- 			#clock-cells = <0>;
- 			clock-frequency = <200000000>;
- 		};
-+
- 		uart_clk: uart-clk {
- 			compatible = "fixed-factor-clock";
- 			#clock-cells = <0>;
-@@ -86,6 +87,12 @@
- 			clock-div = <4>;
- 			clock-mult = <1>;
- 		};
-+
-+		hsspi_pll: hsspi-pll {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <200000000>;
-+		};
- 	};
- 
- 	psci {
-@@ -117,6 +124,19 @@
- 		#size-cells = <1>;
- 		ranges = <0x0 0x0 0xff800000 0x800000>;
- 
-+		hsspi: spi at 1000 {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			compatible = "brcm,bcm6813-hsspi", "brcm,bcmbca-hsspi-v1.1";
-+			reg = <0x1000 0x600>, <0x2610 0x4>;
-+			reg-names = "hsspi", "spim-ctrl";
-+			interrupts = <GIC_SPI 36 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&hsspi_pll &hsspi_pll>;
-+			clock-names = "hsspi", "pll";
-+			num-cs = <8>;
-+			status = "disabled";
-+		};
-+
- 		uart0: serial at 12000 {
- 			compatible = "arm,pl011", "arm,primecell";
- 			reg = <0x12000 0x1000>;
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6856.dtsi
-@@ -60,6 +60,12 @@
- 			#clock-cells = <0>;
- 			clock-frequency = <200000000>;
- 		};
-+
-+		hsspi_pll: hsspi-pll {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <400000000>;
-+		};
- 	};
- 
- 	psci {
-@@ -100,5 +106,17 @@
- 			clock-names = "refclk";
- 			status = "disabled";
- 		};
-+
-+		hsspi: spi at 1000 {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			compatible = "brcm,bcm6856-hsspi", "brcm,bcmbca-hsspi-v1.0";
-+			reg = <0x1000 0x600>;
-+			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&hsspi_pll &hsspi_pll>;
-+			clock-names = "hsspi", "pll";
-+			num-cs = <8>;
-+			status = "disabled";
-+		};
- 	};
- };
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm6858.dtsi
-@@ -78,6 +78,12 @@
- 			#clock-cells = <0>;
- 			clock-frequency = <200000000>;
- 		};
-+
-+		hsspi_pll: hsspi-pll {
-+			compatible = "fixed-clock";
-+			#clock-cells = <0>;
-+			clock-frequency = <400000000>;
-+		};
- 	};
- 
- 	psci {
-@@ -137,5 +143,17 @@
- 			clock-names = "refclk";
- 			status = "disabled";
- 		};
-+
-+		hsspi: spi at 1000 {
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+			compatible = "brcm,bcm6858-hsspi", "brcm,bcmbca-hsspi-v1.0";
-+			reg = <0x1000 0x600>;
-+			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
-+			clocks = <&hsspi_pll &hsspi_pll>;
-+			clock-names = "hsspi", "pll";
-+			num-cs = <8>;
-+			status = "disabled";
-+		};
- 	};
- };
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94908.dts
-@@ -28,3 +28,7 @@
- &uart0 {
- 	status = "okay";
- };
-+
-+&hsspi {
-+	status = "okay";
-+};
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm94912.dts
-@@ -28,3 +28,7 @@
- &uart0 {
- 	status = "okay";
- };
-+
-+&hsspi {
-+	status = "okay";
-+};
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963146.dts
-@@ -28,3 +28,7 @@
- &uart0 {
- 	status = "okay";
- };
-+
-+&hsspi {
-+	status = "okay";
-+};
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm963158.dts
-@@ -28,3 +28,7 @@
- &uart0 {
- 	status = "okay";
- };
-+
-+&hsspi {
-+	status = "okay";
-+};
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96813.dts
-@@ -28,3 +28,7 @@
- &uart0 {
- 	status = "okay";
- };
-+
-+&hsspi {
-+	status = "okay";
-+};
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96856.dts
-@@ -28,3 +28,7 @@
- &uart0 {
- 	status = "okay";
- };
-+
-+&hsspi {
-+	status = "okay";
-+};
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm96858.dts
-@@ -28,3 +28,7 @@
- &uart0 {
- 	status = "okay";
- };
-+
-+&hsspi {
-+	status = "okay";
-+};
diff --git a/target/linux/bcm4908/patches-5.15/036-v6.4-0003-arm64-dts-broadcom-bcmbca-bcm4908-fix-LED-nodenames.patch b/target/linux/bcm4908/patches-5.15/036-v6.4-0003-arm64-dts-broadcom-bcmbca-bcm4908-fix-LED-nodenames.patch
deleted file mode 100644
index 7ce17c1870..0000000000
--- a/target/linux/bcm4908/patches-5.15/036-v6.4-0003-arm64-dts-broadcom-bcmbca-bcm4908-fix-LED-nodenames.patch
+++ /dev/null
@@ -1,66 +0,0 @@
-From 23be9f68f933adee8163b8efc9c6bff71410cc7c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Tue, 28 Feb 2023 15:43:59 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: fix LED nodenames
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This fixes:
-arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dtb: leds at 800: 'led-lan at 19', 'led-power at 11', 'led-wan-red at 12', 'led-wan-white at 15', 'led-wps at 14' do not match any of the regexes: '^led@[a-f0-9]+$', 'pinctrl-[0-9]+'
-        From schema: Documentation/devicetree/bindings/leds/leds-bcm63138.yaml
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/all/20230228144400.21689-2-zajec5 at gmail.com/
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts     | 10 +++++-----
- 1 file changed, 5 insertions(+), 5 deletions(-)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908-asus-gt-ac5300.dts
-@@ -120,7 +120,7 @@
- };
- 
- &leds {
--	led-power at 11 {
-+	led at 11 {
- 		reg = <0x11>;
- 		function = LED_FUNCTION_POWER;
- 		color = <LED_COLOR_ID_WHITE>;
-@@ -130,7 +130,7 @@
- 		pinctrl-0 = <&pins_led_17_a>;
- 	};
- 
--	led-wan-red at 12 {
-+	led at 12 {
- 		reg = <0x12>;
- 		function = LED_FUNCTION_WAN;
- 		color = <LED_COLOR_ID_RED>;
-@@ -139,7 +139,7 @@
- 		pinctrl-0 = <&pins_led_18_a>;
- 	};
- 
--	led-wps at 14 {
-+	led at 14 {
- 		reg = <0x14>;
- 		function = LED_FUNCTION_WPS;
- 		color = <LED_COLOR_ID_WHITE>;
-@@ -148,7 +148,7 @@
- 		pinctrl-0 = <&pins_led_20_a>;
- 	};
- 
--	led-wan-white at 15 {
-+	led at 15 {
- 		reg = <0x15>;
- 		function = LED_FUNCTION_WAN;
- 		color = <LED_COLOR_ID_WHITE>;
-@@ -157,7 +157,7 @@
- 		pinctrl-0 = <&pins_led_21_a>;
- 	};
- 
--	led-lan at 19 {
-+	led at 19 {
- 		reg = <0x19>;
- 		function = LED_FUNCTION_LAN;
- 		color = <LED_COLOR_ID_WHITE>;
diff --git a/target/linux/bcm4908/patches-5.15/036-v6.4-0005-arm64-dts-broadcom-bcmbca-bcm4908-add-on-SoC-USB-por.patch b/target/linux/bcm4908/patches-5.15/036-v6.4-0005-arm64-dts-broadcom-bcmbca-bcm4908-add-on-SoC-USB-por.patch
deleted file mode 100644
index 47b2455ae6..0000000000
--- a/target/linux/bcm4908/patches-5.15/036-v6.4-0005-arm64-dts-broadcom-bcmbca-bcm4908-add-on-SoC-USB-por.patch
+++ /dev/null
@@ -1,81 +0,0 @@
-From 477cad715de1dfc256a20da3ed83b62f3cb2944d Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Tue, 28 Feb 2023 15:45:18 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add on-SoC USB ports
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM4908 has 3 USB controllers each with 2 USB ports. Home routers often
-have LEDs indicating state of selected USB ports. Describe those SoC USB
-ports to allow using them as LED trigger sources.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/all/20230228144520.21816-1-zajec5 at gmail.com/
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../boot/dts/broadcom/bcmbca/bcm4908.dtsi     | 39 +++++++++++++++++++
- 1 file changed, 39 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -148,6 +148,19 @@
- 			interrupts = <GIC_SPI 73 IRQ_TYPE_LEVEL_HIGH>;
- 			phys = <&usb_phy PHY_TYPE_USB2>;
- 			status = "disabled";
-+
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+
-+			ehci_port1: port at 1 {
-+				reg = <1>;
-+				#trigger-source-cells = <0>;
-+			};
-+
-+			ehci_port2: port at 2 {
-+				reg = <2>;
-+				#trigger-source-cells = <0>;
-+			};
- 		};
- 
- 		ohci: usb at c400 {
-@@ -156,6 +169,19 @@
- 			interrupts = <GIC_SPI 72 IRQ_TYPE_LEVEL_HIGH>;
- 			phys = <&usb_phy PHY_TYPE_USB2>;
- 			status = "disabled";
-+
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+
-+			ohci_port1: port at 1 {
-+				reg = <1>;
-+				#trigger-source-cells = <0>;
-+			};
-+
-+			ohci_port2: port at 2 {
-+				reg = <2>;
-+				#trigger-source-cells = <0>;
-+			};
- 		};
- 
- 		xhci: usb at d000 {
-@@ -164,6 +190,19 @@
- 			interrupts = <GIC_SPI 74 IRQ_TYPE_LEVEL_HIGH>;
- 			phys = <&usb_phy PHY_TYPE_USB3>;
- 			status = "disabled";
-+
-+			#address-cells = <1>;
-+			#size-cells = <0>;
-+
-+			xhci_port1: port at 1 {
-+				reg = <1>;
-+				#trigger-source-cells = <0>;
-+			};
-+
-+			xhci_port2: port at 2 {
-+				reg = <2>;
-+				#trigger-source-cells = <0>;
-+			};
- 		};
- 
- 		bus at 80000 {
diff --git a/target/linux/bcm4908/patches-5.15/036-v6.4-0006-arm64-dts-broadcom-bcmbca-bcm4908-add-Netgear-R8000P.patch b/target/linux/bcm4908/patches-5.15/036-v6.4-0006-arm64-dts-broadcom-bcmbca-bcm4908-add-Netgear-R8000P.patch
deleted file mode 100644
index 3e210d68e1..0000000000
--- a/target/linux/bcm4908/patches-5.15/036-v6.4-0006-arm64-dts-broadcom-bcmbca-bcm4908-add-Netgear-R8000P.patch
+++ /dev/null
@@ -1,38 +0,0 @@
-From 889e53ccccc29ff4bf8d4c89cca34e8768845747 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Tue, 28 Feb 2023 15:45:19 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add Netgear R8000P USB
- LED triggers
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This device has 2 USB LEDs meant to be triggered by devices in relevant
-USB ports.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/all/20230228144520.21816-2-zajec5 at gmail.com/
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-netgear-r8000p.dts
-@@ -58,12 +58,16 @@
- 			function = "usb2";
- 			color = <LED_COLOR_ID_WHITE>;
- 			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
-+			trigger-sources = <&ohci_port1>, <&ehci_port1>;
-+			linux,default-trigger = "usbport";
- 		};
- 
- 		led-usb3 {
- 			function = "usb3";
- 			color = <LED_COLOR_ID_WHITE>;
- 			gpios = <&gpio0 18 GPIO_ACTIVE_LOW>;
-+			trigger-sources = <&ohci_port2>, <&ehci_port2>, <&xhci_port2>;
-+			linux,default-trigger = "usbport";
- 		};
- 
- 		led-wifi {
diff --git a/target/linux/bcm4908/patches-5.15/036-v6.4-0007-arm64-dts-broadcom-bcmbca-bcm4908-add-TP-Link-C2300-.patch b/target/linux/bcm4908/patches-5.15/036-v6.4-0007-arm64-dts-broadcom-bcmbca-bcm4908-add-TP-Link-C2300-.patch
deleted file mode 100644
index 959ccd4fa3..0000000000
--- a/target/linux/bcm4908/patches-5.15/036-v6.4-0007-arm64-dts-broadcom-bcmbca-bcm4908-add-TP-Link-C2300-.patch
+++ /dev/null
@@ -1,41 +0,0 @@
-From e6d356b146b75f1f77621aab7950a1eb550859f9 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Tue, 28 Feb 2023 15:45:20 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: add TP-Link C2300 USB
- LED triggers
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This device has 2 USB LEDs meant to be triggered by devices in relevant
-USB ports.
-
-While at it fix typo in USB LED name.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/all/20230228144520.21816-3-zajec5 at gmail.com/
-Signed-off-by: Florian Fainelli <f.fainelli at gmail.com>
----
- .../dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts  | 6 +++++-
- 1 file changed, 5 insertions(+), 1 deletion(-)
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4906-tplink-archer-c2300-v1.dts
-@@ -64,12 +64,16 @@
- 			function = "usb2";
- 			color = <LED_COLOR_ID_BLUE>;
- 			gpios = <&gpio0 15 GPIO_ACTIVE_LOW>;
-+			trigger-sources = <&ohci_port1>, <&ehci_port1>;
-+			linux,default-trigger = "usbport";
- 		};
- 
- 		led-usb3 {
--			function = "usbd3";
-+			function = "usb3";
- 			color = <LED_COLOR_ID_BLUE>;
- 			gpios = <&gpio0 17 GPIO_ACTIVE_LOW>;
-+			trigger-sources = <&ohci_port2>, <&ehci_port2>, <&xhci_port2>;
-+			linux,default-trigger = "usbport";
- 		};
- 
- 		led-brightness {
diff --git a/target/linux/bcm4908/patches-5.15/040-v6.1-mtd-parsers-add-Broadcom-s-U-Boot-parser.patch b/target/linux/bcm4908/patches-5.15/040-v6.1-mtd-parsers-add-Broadcom-s-U-Boot-parser.patch
deleted file mode 100644
index 4d4059b17f..0000000000
--- a/target/linux/bcm4908/patches-5.15/040-v6.1-mtd-parsers-add-Broadcom-s-U-Boot-parser.patch
+++ /dev/null
@@ -1,137 +0,0 @@
-From 002181f5b150e60c77f21de7ad4dd10e4614cd91 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 11 Jul 2022 17:30:41 +0200
-Subject: [PATCH] mtd: parsers: add Broadcom's U-Boot parser
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Broadcom stores environment variables blocks inside U-Boot partition
-itself. This driver finds & registers them.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Signed-off-by: Miquel Raynal <miquel.raynal at bootlin.com>
-Link: https://lore.kernel.org/linux-mtd/20220711153041.6036-2-zajec5 at gmail.com
----
- drivers/mtd/parsers/Kconfig       | 10 ++++
- drivers/mtd/parsers/Makefile      |  1 +
- drivers/mtd/parsers/brcm_u-boot.c | 84 +++++++++++++++++++++++++++++++
- 3 files changed, 95 insertions(+)
- create mode 100644 drivers/mtd/parsers/brcm_u-boot.c
-
---- a/drivers/mtd/parsers/Kconfig
-+++ b/drivers/mtd/parsers/Kconfig
-@@ -20,6 +20,16 @@ config MTD_BCM63XX_PARTS
- 	  This provides partition parsing for BCM63xx devices with CFE
- 	  bootloaders.
- 
-+config MTD_BRCM_U_BOOT
-+	tristate "Broadcom's U-Boot partition parser"
-+	depends on ARCH_BCM4908 || COMPILE_TEST
-+	help
-+	  Broadcom uses a custom way of storing U-Boot environment variables.
-+	  They are placed inside U-Boot partition itself at unspecified offset.
-+	  It's possible to locate them by looking for a custom header with a
-+	  magic value. This driver does that and creates subpartitions for
-+	  each found environment variables block.
-+
- config MTD_CMDLINE_PARTS
- 	tristate "Command line partition table parsing"
- 	depends on MTD
---- a/drivers/mtd/parsers/Makefile
-+++ b/drivers/mtd/parsers/Makefile
-@@ -2,6 +2,7 @@
- obj-$(CONFIG_MTD_AR7_PARTS)		+= ar7part.o
- obj-$(CONFIG_MTD_BCM47XX_PARTS)		+= bcm47xxpart.o
- obj-$(CONFIG_MTD_BCM63XX_PARTS)		+= bcm63xxpart.o
-+obj-$(CONFIG_MTD_BRCM_U_BOOT)		+= brcm_u-boot.o
- obj-$(CONFIG_MTD_CMDLINE_PARTS)		+= cmdlinepart.o
- obj-$(CONFIG_MTD_MYLOADER_PARTS)		+= myloader.o
- obj-$(CONFIG_MTD_OF_PARTS)		+= ofpart.o
---- /dev/null
-+++ b/drivers/mtd/parsers/brcm_u-boot.c
-@@ -0,0 +1,84 @@
-+// SPDX-License-Identifier: GPL-2.0-only
-+/*
-+ * Copyright ? 2022 Rafa? Mi?ecki <rafal at milecki.pl>
-+ */
-+
-+#include <linux/module.h>
-+#include <linux/kernel.h>
-+#include <linux/slab.h>
-+#include <linux/mtd/mtd.h>
-+#include <linux/mtd/partitions.h>
-+
-+#define BRCM_U_BOOT_MAX_OFFSET		0x200000
-+#define BRCM_U_BOOT_STEP		0x1000
-+
-+#define BRCM_U_BOOT_MAX_PARTS		2
-+
-+#define BRCM_U_BOOT_MAGIC		0x75456e76	/* uEnv */
-+
-+struct brcm_u_boot_header {
-+	__le32 magic;
-+	__le32 length;
-+} __packed;
-+
-+static const char *names[BRCM_U_BOOT_MAX_PARTS] = {
-+	"u-boot-env",
-+	"u-boot-env-backup",
-+};
-+
-+static int brcm_u_boot_parse(struct mtd_info *mtd,
-+			     const struct mtd_partition **pparts,
-+			     struct mtd_part_parser_data *data)
-+{
-+	struct brcm_u_boot_header header;
-+	struct mtd_partition *parts;
-+	size_t bytes_read;
-+	size_t offset;
-+	int err;
-+	int i = 0;
-+
-+	parts = kcalloc(BRCM_U_BOOT_MAX_PARTS, sizeof(*parts), GFP_KERNEL);
-+	if (!parts)
-+		return -ENOMEM;
-+
-+	for (offset = 0;
-+	     offset < min_t(size_t, mtd->size, BRCM_U_BOOT_MAX_OFFSET);
-+	     offset += BRCM_U_BOOT_STEP) {
-+		err = mtd_read(mtd, offset, sizeof(header), &bytes_read, (uint8_t *)&header);
-+		if (err && !mtd_is_bitflip(err)) {
-+			pr_err("Failed to read from %s at 0x%zx: %d\n", mtd->name, offset, err);
-+			continue;
-+		}
-+
-+		if (le32_to_cpu(header.magic) != BRCM_U_BOOT_MAGIC)
-+			continue;
-+
-+		parts[i].name = names[i];
-+		parts[i].offset = offset;
-+		parts[i].size = sizeof(header) + le32_to_cpu(header.length);
-+		i++;
-+		pr_info("offset:0x%zx magic:0x%08x BINGO\n", offset, header.magic);
-+
-+		if (i == BRCM_U_BOOT_MAX_PARTS)
-+			break;
-+	}
-+
-+	*pparts = parts;
-+
-+	return i;
-+};
-+
-+static const struct of_device_id brcm_u_boot_of_match_table[] = {
-+	{ .compatible = "brcm,u-boot" },
-+	{},
-+};
-+MODULE_DEVICE_TABLE(of, brcm_u_boot_of_match_table);
-+
-+static struct mtd_part_parser brcm_u_boot_mtd_parser = {
-+	.parse_fn = brcm_u_boot_parse,
-+	.name = "brcm_u-boot",
-+	.of_match_table = brcm_u_boot_of_match_table,
-+};
-+module_mtd_part_parser(brcm_u_boot_mtd_parser);
-+
-+MODULE_LICENSE("GPL");
diff --git a/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch b/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch
deleted file mode 100644
index e01c1e4728..0000000000
--- a/target/linux/bcm4908/patches-5.15/070-v5.17-net-dsa-bcm_sf2-refactor-LED-regs-access.patch
+++ /dev/null
@@ -1,209 +0,0 @@
-From af30f8eaa8fe4ff1987280f716309711997bd979 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Wed, 29 Dec 2021 18:16:42 +0100
-Subject: [PATCH] net: dsa: bcm_sf2: refactor LED regs access
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-1. Define more regs. Some switches (e.g. BCM4908) have up to 6 regs.
-2. Add helper for handling non-lineral port <-> reg mappings.
-3. Add support for 12 B LED reg blocks on BCM4908 (different layout)
-
-Complete support for LEDs setup will be implemented once Linux receives
-a proper design & implementation for "hardware" LEDs.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Acked-by: Florian Fainelli <f.fainelli at gmail.com>
-Link: https://lore.kernel.org/r/20211229171642.22942-1-zajec5 at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/dsa/bcm_sf2.c      | 54 ++++++++++++++++++++++++----
- drivers/net/dsa/bcm_sf2.h      | 10 ++++++
- drivers/net/dsa/bcm_sf2_regs.h | 65 +++++++++++++++++++++++++++++++---
- 3 files changed, 119 insertions(+), 10 deletions(-)
-
---- a/drivers/net/dsa/bcm_sf2.c
-+++ b/drivers/net/dsa/bcm_sf2.c
-@@ -62,6 +62,38 @@ static u16 bcm_sf2_reg_rgmii_cntrl(struc
- 	return REG_SWITCH_STATUS;
- }
- 
-+static u16 bcm_sf2_reg_led_base(struct bcm_sf2_priv *priv, int port)
-+{
-+	switch (port) {
-+	case 0:
-+		return REG_LED_0_CNTRL;
-+	case 1:
-+		return REG_LED_1_CNTRL;
-+	case 2:
-+		return REG_LED_2_CNTRL;
-+	}
-+
-+	switch (priv->type) {
-+	case BCM4908_DEVICE_ID:
-+		switch (port) {
-+		case 3:
-+			return REG_LED_3_CNTRL;
-+		case 7:
-+			return REG_LED_4_CNTRL;
-+		default:
-+			break;
-+		}
-+		break;
-+	default:
-+		break;
-+	}
-+
-+	WARN_ONCE(1, "Unsupported port %d\n", port);
-+
-+	/* RO fallback reg */
-+	return REG_SWITCH_STATUS;
-+}
-+
- /* Return the number of active ports, not counting the IMP (CPU) port */
- static unsigned int bcm_sf2_num_active_ports(struct dsa_switch *ds)
- {
-@@ -187,9 +219,14 @@ static void bcm_sf2_gphy_enable_set(stru
- 
- 	/* Use PHY-driven LED signaling */
- 	if (!enable) {
--		reg = reg_readl(priv, REG_LED_CNTRL(0));
--		reg |= SPDLNK_SRC_SEL;
--		reg_writel(priv, reg, REG_LED_CNTRL(0));
-+		u16 led_ctrl = bcm_sf2_reg_led_base(priv, 0);
-+
-+		if (priv->type == BCM7278_DEVICE_ID ||
-+		    priv->type == BCM7445_DEVICE_ID) {
-+			reg = reg_led_readl(priv, led_ctrl, 0);
-+			reg |= LED_CNTRL_SPDLNK_SRC_SEL;
-+			reg_led_writel(priv, reg, led_ctrl, 0);
-+		}
- 	}
- }
- 
-@@ -1247,9 +1284,14 @@ static const u16 bcm_sf2_4908_reg_offset
- 	[REG_SPHY_CNTRL]	= 0x24,
- 	[REG_CROSSBAR]		= 0xc8,
- 	[REG_RGMII_11_CNTRL]	= 0x014c,
--	[REG_LED_0_CNTRL]	= 0x40,
--	[REG_LED_1_CNTRL]	= 0x4c,
--	[REG_LED_2_CNTRL]	= 0x58,
-+	[REG_LED_0_CNTRL]		= 0x40,
-+	[REG_LED_1_CNTRL]		= 0x4c,
-+	[REG_LED_2_CNTRL]		= 0x58,
-+	[REG_LED_3_CNTRL]		= 0x64,
-+	[REG_LED_4_CNTRL]		= 0x88,
-+	[REG_LED_5_CNTRL]		= 0xa0,
-+	[REG_LED_AGGREGATE_CTRL]	= 0xb8,
-+
- };
- 
- static const struct bcm_sf2_of_data bcm_sf2_4908_data = {
---- a/drivers/net/dsa/bcm_sf2.h
-+++ b/drivers/net/dsa/bcm_sf2.h
-@@ -210,6 +210,16 @@ SF2_IO_MACRO(acb);
- SWITCH_INTR_L2(0);
- SWITCH_INTR_L2(1);
- 
-+static inline u32 reg_led_readl(struct bcm_sf2_priv *priv, u16 off, u16 reg)
-+{
-+	return readl_relaxed(priv->reg + priv->reg_offsets[off] + reg);
-+}
-+
-+static inline void reg_led_writel(struct bcm_sf2_priv *priv, u32 val, u16 off, u16 reg)
-+{
-+	writel_relaxed(val, priv->reg + priv->reg_offsets[off] + reg);
-+}
-+
- /* RXNFC */
- int bcm_sf2_get_rxnfc(struct dsa_switch *ds, int port,
- 		      struct ethtool_rxnfc *nfc, u32 *rule_locs);
---- a/drivers/net/dsa/bcm_sf2_regs.h
-+++ b/drivers/net/dsa/bcm_sf2_regs.h
-@@ -25,6 +25,10 @@ enum bcm_sf2_reg_offs {
- 	REG_LED_0_CNTRL,
- 	REG_LED_1_CNTRL,
- 	REG_LED_2_CNTRL,
-+	REG_LED_3_CNTRL,
-+	REG_LED_4_CNTRL,
-+	REG_LED_5_CNTRL,
-+	REG_LED_AGGREGATE_CTRL,
- 	REG_SWITCH_REG_MAX,
- };
- 
-@@ -56,6 +60,63 @@ enum bcm_sf2_reg_offs {
- #define CROSSBAR_BCM4908_EXT_GPHY4	1
- #define CROSSBAR_BCM4908_EXT_RGMII	2
- 
-+/* Relative to REG_LED_*_CNTRL (BCM7278, BCM7445) */
-+#define  LED_CNTRL_NO_LINK_ENCODE_SHIFT		0
-+#define  LED_CNTRL_M10_ENCODE_SHIFT		2
-+#define  LED_CNTRL_M100_ENCODE_SHIFT		4
-+#define  LED_CNTRL_M1000_ENCODE_SHIFT		6
-+#define  LED_CNTRL_SEL_NO_LINK_ENCODE_SHIFT	8
-+#define  LED_CNTRL_SEL_10M_ENCODE_SHIFT		10
-+#define  LED_CNTRL_SEL_100M_ENCODE_SHIFT	12
-+#define  LED_CNTRL_SEL_1000M_ENCODE_SHIFT	14
-+#define  LED_CNTRL_RX_DV_EN			(1 << 16)
-+#define  LED_CNTRL_TX_EN_EN			(1 << 17)
-+#define  LED_CNTRL_SPDLNK_LED0_ACT_SEL_SHIFT	18
-+#define  LED_CNTRL_SPDLNK_LED1_ACT_SEL_SHIFT	20
-+#define  LED_CNTRL_ACT_LED_ACT_SEL_SHIFT	22
-+#define  LED_CNTRL_SPDLNK_SRC_SEL		(1 << 24)
-+#define  LED_CNTRL_SPDLNK_LED0_ACT_POL_SEL	(1 << 25)
-+#define  LED_CNTRL_SPDLNK_LED1_ACT_POL_SEL	(1 << 26)
-+#define  LED_CNTRL_ACT_LED_POL_SEL		(1 << 27)
-+#define  LED_CNTRL_MASK				0x3
-+
-+/* Register relative to REG_LED_*_CNTRL (BCM4908) */
-+#define REG_LED_CTRL				0x0
-+#define  LED_CTRL_RX_ACT_EN			0x00000001
-+#define  LED_CTRL_TX_ACT_EN			0x00000002
-+#define  LED_CTRL_SPDLNK_LED0_ACT_SEL		0x00000004
-+#define  LED_CTRL_SPDLNK_LED1_ACT_SEL		0x00000008
-+#define  LED_CTRL_SPDLNK_LED2_ACT_SEL		0x00000010
-+#define  LED_CTRL_ACT_LED_ACT_SEL		0x00000020
-+#define  LED_CTRL_SPDLNK_LED0_ACT_POL_SEL	0x00000040
-+#define  LED_CTRL_SPDLNK_LED1_ACT_POL_SEL	0x00000080
-+#define  LED_CTRL_SPDLNK_LED2_ACT_POL_SEL	0x00000100
-+#define  LED_CTRL_ACT_LED_POL_SEL		0x00000200
-+#define  LED_CTRL_LED_SPD_OVRD			0x00001c00
-+#define  LED_CTRL_LNK_STATUS_OVRD		0x00002000
-+#define  LED_CTRL_SPD_OVRD_EN			0x00004000
-+#define  LED_CTRL_LNK_OVRD_EN			0x00008000
-+
-+/* Register relative to REG_LED_*_CNTRL (BCM4908) */
-+#define REG_LED_LINK_SPEED_ENC_SEL		0x4
-+#define  LED_LINK_SPEED_ENC_SEL_NO_LINK_SHIFT	0
-+#define  LED_LINK_SPEED_ENC_SEL_10M_SHIFT	3
-+#define  LED_LINK_SPEED_ENC_SEL_100M_SHIFT	6
-+#define  LED_LINK_SPEED_ENC_SEL_1000M_SHIFT	9
-+#define  LED_LINK_SPEED_ENC_SEL_2500M_SHIFT	12
-+#define  LED_LINK_SPEED_ENC_SEL_10G_SHIFT	15
-+#define  LED_LINK_SPEED_ENC_SEL_MASK		0x7
-+
-+/* Register relative to REG_LED_*_CNTRL (BCM4908) */
-+#define REG_LED_LINK_SPEED_ENC			0x8
-+#define  LED_LINK_SPEED_ENC_NO_LINK_SHIFT	0
-+#define  LED_LINK_SPEED_ENC_M10_SHIFT		3
-+#define  LED_LINK_SPEED_ENC_M100_SHIFT		6
-+#define  LED_LINK_SPEED_ENC_M1000_SHIFT		9
-+#define  LED_LINK_SPEED_ENC_M2500_SHIFT		12
-+#define  LED_LINK_SPEED_ENC_M10G_SHIFT		15
-+#define  LED_LINK_SPEED_ENC_MASK		0x7
-+
- /* Relative to REG_RGMII_CNTRL */
- #define  RGMII_MODE_EN			(1 << 0)
- #define  ID_MODE_DIS			(1 << 1)
-@@ -73,10 +134,6 @@ enum bcm_sf2_reg_offs {
- #define  LPI_COUNT_SHIFT		9
- #define  LPI_COUNT_MASK			0x3F
- 
--#define REG_LED_CNTRL(x)		(REG_LED_0_CNTRL + (x))
--
--#define  SPDLNK_SRC_SEL			(1 << 24)
--
- /* Register set relative to 'INTRL2_0' and 'INTRL2_1' */
- #define INTRL2_CPU_STATUS		0x00
- #define INTRL2_CPU_SET			0x04
diff --git a/target/linux/bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch b/target/linux/bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch
deleted file mode 100644
index 85be40cef4..0000000000
--- a/target/linux/bcm4908/patches-5.15/071-v6.1-0001-net-broadcom-bcm4908_enet-handle-EPROBE_DEFER-when-g.patch
+++ /dev/null
@@ -1,53 +0,0 @@
-From e93a766da57fff3273bcb618edf5dfca1fb86b89 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Thu, 15 Sep 2022 15:30:13 +0200
-Subject: [PATCH] net: broadcom: bcm4908_enet: handle -EPROBE_DEFER when
- getting MAC
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Reading MAC from OF may return -EPROBE_DEFER if underlaying NVMEM device
-isn't ready yet. In such case pass that error code up and "wait" to be
-probed later.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20220915133013.2243-1-zajec5 at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/ethernet/broadcom/bcm4908_enet.c | 13 +++++++++----
- 1 file changed, 9 insertions(+), 4 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
-@@ -720,6 +720,8 @@ static int bcm4908_enet_probe(struct pla
- 
- 	SET_NETDEV_DEV(netdev, &pdev->dev);
- 	err = of_get_ethdev_address(dev->of_node, netdev);
-+	if (err == -EPROBE_DEFER)
-+		goto err_dma_free;
- 	if (err)
- 		eth_hw_addr_random(netdev);
- 	netdev->netdev_ops = &bcm4908_enet_netdev_ops;
-@@ -730,14 +732,17 @@ static int bcm4908_enet_probe(struct pla
- 	netif_napi_add(netdev, &enet->rx_ring.napi, bcm4908_enet_poll_rx, NAPI_POLL_WEIGHT);
- 
- 	err = register_netdev(netdev);
--	if (err) {
--		bcm4908_enet_dma_free(enet);
--		return err;
--	}
-+	if (err)
-+		goto err_dma_free;
- 
- 	platform_set_drvdata(pdev, enet);
- 
- 	return 0;
-+
-+err_dma_free:
-+	bcm4908_enet_dma_free(enet);
-+
-+	return err;
- }
- 
- static int bcm4908_enet_remove(struct platform_device *pdev)
diff --git a/target/linux/bcm4908/patches-5.15/072-v6.2-0001-net-broadcom-bcm4908_enet-use-build_skb.patch b/target/linux/bcm4908/patches-5.15/072-v6.2-0001-net-broadcom-bcm4908_enet-use-build_skb.patch
deleted file mode 100644
index 1b4cc9e24c..0000000000
--- a/target/linux/bcm4908/patches-5.15/072-v6.2-0001-net-broadcom-bcm4908_enet-use-build_skb.patch
+++ /dev/null
@@ -1,152 +0,0 @@
-From 3a1cc23a75abcd9cea585eb84846507363d58397 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Tue, 25 Oct 2022 15:22:45 +0200
-Subject: [PATCH] net: broadcom: bcm4908_enet: use build_skb()
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-RX code can be more efficient with the build_skb(). Allocating actual
-SKB around eth packet buffer - right before passing it up - results in
-a better cache usage.
-
-Without RPS (echo 0 > rps_cpus) BCM4908 NAT masq performance "jumps"
-between two speeds: ~900 Mbps and 940 Mbps (it's a 4 CPUs SoC). This
-change bumps the lower speed from 905 Mb/s to 918 Mb/s (tested using
-single stream iperf 2.0.5 traffic).
-
-There are more optimizations to consider. One obvious to try is GRO
-however as BCM4908 doesn't do hw csum is may actually lower performance.
-Sometimes. Some early testing:
-
-??????????????????????????????????????????????????????????????????????????????
-?                                 ? netif_receive_skb() ? napi_gro_receive() ?
-??????????????????????????????????????????????????????????????????????????????
-? netdev_alloc_skb()              ?            905 Mb/s ?           892 Mb/s ?
-? napi_alloc_frag() + build_skb() ?            918 Mb/s ?           917 Mb/s ?
-??????????????????????????????????????????????????????????????????????????????
-
-Another ideas:
-1. napi_build_skb()
-2. skb_copy_from_linear_data() for small packets
-
-Those need proper testing first though. That can be done later.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20221025132245.22871-1-zajec5 at gmail.com
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/ethernet/broadcom/bcm4908_enet.c | 53 +++++++++++++-------
- 1 file changed, 36 insertions(+), 17 deletions(-)
-
---- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
-@@ -36,13 +36,24 @@
- #define ENET_MAX_ETH_OVERHEAD			(ETH_HLEN + BRCM_MAX_TAG_LEN + VLAN_HLEN + \
- 						 ETH_FCS_LEN + 4) /* 32 */
- 
-+#define ENET_RX_SKB_BUF_SIZE			(NET_SKB_PAD + NET_IP_ALIGN + \
-+						 ETH_HLEN + BRCM_MAX_TAG_LEN + VLAN_HLEN + \
-+						 ENET_MTU_MAX + ETH_FCS_LEN + 4)
-+#define ENET_RX_SKB_BUF_ALLOC_SIZE		(SKB_DATA_ALIGN(ENET_RX_SKB_BUF_SIZE) + \
-+						 SKB_DATA_ALIGN(sizeof(struct skb_shared_info)))
-+#define ENET_RX_BUF_DMA_OFFSET			(NET_SKB_PAD + NET_IP_ALIGN)
-+#define ENET_RX_BUF_DMA_SIZE			(ENET_RX_SKB_BUF_SIZE - ENET_RX_BUF_DMA_OFFSET)
-+
- struct bcm4908_enet_dma_ring_bd {
- 	__le32 ctl;
- 	__le32 addr;
- } __packed;
- 
- struct bcm4908_enet_dma_ring_slot {
--	struct sk_buff *skb;
-+	union {
-+		void *buf;			/* RX */
-+		struct sk_buff *skb;		/* TX */
-+	};
- 	unsigned int len;
- 	dma_addr_t dma_addr;
- };
-@@ -260,22 +271,21 @@ static int bcm4908_enet_dma_alloc_rx_buf
- 	u32 tmp;
- 	int err;
- 
--	slot->len = ENET_MTU_MAX + ENET_MAX_ETH_OVERHEAD;
--
--	slot->skb = netdev_alloc_skb(enet->netdev, slot->len);
--	if (!slot->skb)
-+	slot->buf = napi_alloc_frag(ENET_RX_SKB_BUF_ALLOC_SIZE);
-+	if (!slot->buf)
- 		return -ENOMEM;
- 
--	slot->dma_addr = dma_map_single(dev, slot->skb->data, slot->len, DMA_FROM_DEVICE);
-+	slot->dma_addr = dma_map_single(dev, slot->buf + ENET_RX_BUF_DMA_OFFSET,
-+					ENET_RX_BUF_DMA_SIZE, DMA_FROM_DEVICE);
- 	err = dma_mapping_error(dev, slot->dma_addr);
- 	if (err) {
- 		dev_err(dev, "Failed to map DMA buffer: %d\n", err);
--		kfree_skb(slot->skb);
--		slot->skb = NULL;
-+		skb_free_frag(slot->buf);
-+		slot->buf = NULL;
- 		return err;
- 	}
- 
--	tmp = slot->len << DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT;
-+	tmp = ENET_RX_BUF_DMA_SIZE << DMA_CTL_LEN_DESC_BUFLENGTH_SHIFT;
- 	tmp |= DMA_CTL_STATUS_OWN;
- 	if (idx == enet->rx_ring.length - 1)
- 		tmp |= DMA_CTL_STATUS_WRAP;
-@@ -315,11 +325,11 @@ static void bcm4908_enet_dma_uninit(stru
- 
- 	for (i = rx_ring->length - 1; i >= 0; i--) {
- 		slot = &rx_ring->slots[i];
--		if (!slot->skb)
-+		if (!slot->buf)
- 			continue;
- 		dma_unmap_single(dev, slot->dma_addr, slot->len, DMA_FROM_DEVICE);
--		kfree_skb(slot->skb);
--		slot->skb = NULL;
-+		skb_free_frag(slot->buf);
-+		slot->buf = NULL;
- 	}
- }
- 
-@@ -575,6 +585,7 @@ static int bcm4908_enet_poll_rx(struct n
- 	while (handled < weight) {
- 		struct bcm4908_enet_dma_ring_bd *buf_desc;
- 		struct bcm4908_enet_dma_ring_slot slot;
-+		struct sk_buff *skb;
- 		u32 ctl;
- 		int len;
- 		int err;
-@@ -598,16 +609,24 @@ static int bcm4908_enet_poll_rx(struct n
- 
- 		if (len < ETH_ZLEN ||
- 		    (ctl & (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) != (DMA_CTL_STATUS_SOP | DMA_CTL_STATUS_EOP)) {
--			kfree_skb(slot.skb);
-+			skb_free_frag(slot.buf);
- 			enet->netdev->stats.rx_dropped++;
- 			break;
- 		}
- 
--		dma_unmap_single(dev, slot.dma_addr, slot.len, DMA_FROM_DEVICE);
-+		dma_unmap_single(dev, slot.dma_addr, ENET_RX_BUF_DMA_SIZE, DMA_FROM_DEVICE);
-+
-+		skb = build_skb(slot.buf, ENET_RX_SKB_BUF_ALLOC_SIZE);
-+		if (unlikely(!skb)) {
-+			skb_free_frag(slot.buf);
-+			enet->netdev->stats.rx_dropped++;
-+			break;
-+		}
-+		skb_reserve(skb, ENET_RX_BUF_DMA_OFFSET);
-+		skb_put(skb, len - ETH_FCS_LEN);
-+		skb->protocol = eth_type_trans(skb, enet->netdev);
- 
--		skb_put(slot.skb, len - ETH_FCS_LEN);
--		slot.skb->protocol = eth_type_trans(slot.skb, enet->netdev);
--		netif_receive_skb(slot.skb);
-+		netif_receive_skb(skb);
- 
- 		enet->netdev->stats.rx_packets++;
- 		enet->netdev->stats.rx_bytes += len;
diff --git a/target/linux/bcm4908/patches-5.15/072-v6.2-0002-net-broadcom-bcm4908_enet-report-queued-and-transmit.patch b/target/linux/bcm4908/patches-5.15/072-v6.2-0002-net-broadcom-bcm4908_enet-report-queued-and-transmit.patch
deleted file mode 100644
index fe85aefa7c..0000000000
--- a/target/linux/bcm4908/patches-5.15/072-v6.2-0002-net-broadcom-bcm4908_enet-report-queued-and-transmit.patch
+++ /dev/null
@@ -1,45 +0,0 @@
-From 471ef777ec79baadc5cd9773d08f95f49cf5e2b1 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 31 Oct 2022 11:48:56 +0100
-Subject: [PATCH] net: broadcom: bcm4908_enet: report queued and transmitted
- bytes
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This allows BQL to operate avoiding buffer bloat and reducing latency.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Link: https://lore.kernel.org/r/20221031104856.32388-1-zajec5 at gmail.com
-Signed-off-by: Jakub Kicinski <kuba at kernel.org>
----
- drivers/net/ethernet/broadcom/bcm4908_enet.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/drivers/net/ethernet/broadcom/bcm4908_enet.c
-+++ b/drivers/net/ethernet/broadcom/bcm4908_enet.c
-@@ -505,6 +505,7 @@ static int bcm4908_enet_stop(struct net_
- 	netif_carrier_off(netdev);
- 	napi_disable(&rx_ring->napi);
- 	napi_disable(&tx_ring->napi);
-+	netdev_reset_queue(netdev);
- 
- 	bcm4908_enet_dma_rx_ring_disable(enet, &enet->rx_ring);
- 	bcm4908_enet_dma_tx_ring_disable(enet, &enet->tx_ring);
-@@ -564,6 +565,8 @@ static int bcm4908_enet_start_xmit(struc
- 	if (ring->write_idx + 1 == ring->length - 1)
- 		tmp |= DMA_CTL_STATUS_WRAP;
- 
-+	netdev_sent_queue(enet->netdev, skb->len);
-+
- 	buf_desc->addr = cpu_to_le32((uint32_t)slot->dma_addr);
- 	buf_desc->ctl = cpu_to_le32(tmp);
- 
-@@ -671,6 +674,7 @@ static int bcm4908_enet_poll_tx(struct n
- 			tx_ring->read_idx = 0;
- 	}
- 
-+	netdev_completed_queue(enet->netdev, handled, bytes);
- 	enet->netdev->stats.tx_packets += handled;
- 	enet->netdev->stats.tx_bytes += bytes;
- 
diff --git a/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch b/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch
deleted file mode 100644
index adc7d6bb0c..0000000000
--- a/target/linux/bcm4908/patches-5.15/080-v5.18-0001-dt-bindings-pinctrl-Add-binding-for-BCM4908-pinctrl.patch
+++ /dev/null
@@ -1,111 +0,0 @@
-From 7b5730f0ff24b0d7d1cb660a482384a807618a46 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 24 Jan 2022 11:22:42 +0100
-Subject: [PATCH] dt-bindings: pinctrl: Add binding for BCM4908 pinctrl
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-It's hardware block that is part of every SoC from BCM4908 family.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Reviewed-by: Rob Herring <robh at kernel.org>
-Link: https://lore.kernel.org/r/20220124102243.14912-1-zajec5 at gmail.com
-Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
----
- .../pinctrl/brcm,bcm4908-pinctrl.yaml         | 72 +++++++++++++++++++
- MAINTAINERS                                   |  7 ++
- 2 files changed, 79 insertions(+)
- create mode 100644 Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml
-
---- /dev/null
-+++ b/Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml
-@@ -0,0 +1,72 @@
-+# SPDX-License-Identifier: GPL-2.0-only OR BSD-2-Clause
-+%YAML 1.2
-+---
-+$id: http://devicetree.org/schemas/pinctrl/brcm,bcm4908-pinctrl.yaml#
-+$schema: http://devicetree.org/meta-schemas/core.yaml#
-+
-+title: Broadcom BCM4908 pin controller
-+
-+maintainers:
-+  - Rafa? Mi?ecki <rafal at milecki.pl>
-+
-+description:
-+  Binding for pin controller present on BCM4908 family SoCs.
-+
-+properties:
-+  compatible:
-+    const: brcm,bcm4908-pinctrl
-+
-+  reg:
-+    maxItems: 1
-+
-+patternProperties:
-+  '-pins$':
-+    type: object
-+    $ref: pinmux-node.yaml#
-+
-+    properties:
-+      function:
-+        enum: [ led_0, led_1, led_2, led_3, led_4, led_5, led_6, led_7, led_8,
-+                led_9, led_10, led_11, led_12, led_13, led_14, led_15, led_16,
-+                led_17, led_18, led_19, led_20, led_21, led_22, led_23, led_24,
-+                led_25, led_26, led_27, led_28, led_29, led_30, led_31,
-+                hs_uart, i2c, i2s, nand_ctrl, nand_data, emmc_ctrl, usb0_pwr,
-+                usb1_pwr ]
-+
-+      groups:
-+        minItems: 1
-+        maxItems: 2
-+        items:
-+          enum: [ led_0_grp_a, led_1_grp_a, led_2_grp_a, led_3_grp_a,
-+                  led_4_grp_a, led_5_grp_a, led_6_grp_a, led_7_grp_a,
-+                  led_8_grp_a, led_9_grp_a, led_10_grp_a, led_10_grp_b,
-+                  led_11_grp_a, led_11_grp_b, led_12_grp_a, led_12_grp_b,
-+                  led_13_grp_a, led_13_grp_b, led_14_grp_a, led_15_grp_a,
-+                  led_16_grp_a, led_17_grp_a, led_18_grp_a, led_19_grp_a,
-+                  led_20_grp_a, led_21_grp_a, led_22_grp_a, led_23_grp_a,
-+                  led_24_grp_a, led_25_grp_a, led_26_grp_a, led_27_grp_a,
-+                  led_28_grp_a, led_29_grp_a, led_30_grp_a, led_31_grp_a,
-+                  led_31_grp_b, hs_uart_grp, i2c_grp_a, i2c_grp_b, i2s_grp,
-+                  nand_ctrl_grp, nand_data_grp, emmc_ctrl_grp, usb0_pwr_grp,
-+                  usb1_pwr_grp ]
-+
-+allOf:
-+  - $ref: pinctrl.yaml#
-+
-+required:
-+  - compatible
-+  - reg
-+
-+unevaluatedProperties: false
-+
-+examples:
-+  - |
-+    pinctrl at ff800560 {
-+        compatible = "brcm,bcm4908-pinctrl";
-+        reg = <0xff800560 0x10>;
-+
-+        led_0-a-pins {
-+            function = "led_0";
-+            groups = "led_0_grp_a";
-+        };
-+    };
---- a/MAINTAINERS
-+++ b/MAINTAINERS
-@@ -3573,6 +3573,13 @@ F:	Documentation/devicetree/bindings/net
- F:	drivers/net/ethernet/broadcom/bcm4908_enet.*
- F:	drivers/net/ethernet/broadcom/unimac.h
- 
-+BROADCOM BCM4908 PINMUX DRIVER
-+M:	Rafa? Mi?ecki <rafal at milecki.pl>
-+M:	bcm-kernel-feedback-list at broadcom.com
-+L:	linux-gpio at vger.kernel.org
-+S:	Maintained
-+F:	Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml
-+
- BROADCOM BCM5301X ARM ARCHITECTURE
- M:	Hauke Mehrtens <hauke at hauke-m.de>
- M:	Rafa? Mi?ecki <zajec5 at gmail.com>
diff --git a/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch b/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch
deleted file mode 100644
index 3fd847b97e..0000000000
--- a/target/linux/bcm4908/patches-5.15/080-v5.18-0002-pinctrl-bcm-add-driver-for-BCM4908-pinmux.patch
+++ /dev/null
@@ -1,629 +0,0 @@
-From f7e322d99f1180270fb4a3e1ae992b3116cfcf34 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 24 Jan 2022 11:22:43 +0100
-Subject: [PATCH] pinctrl: bcm: add driver for BCM4908 pinmux
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM4908 has its own pins layout so it needs a custom binding and a Linux
-driver.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Reviewed-by: Andy Shevchenko <andy.shevchenko at gmail.com>
-Link: https://lore.kernel.org/r/20220124102243.14912-2-zajec5 at gmail.com
-Signed-off-by: Linus Walleij <linus.walleij at linaro.org>
----
- MAINTAINERS                           |   1 +
- drivers/pinctrl/bcm/Kconfig           |  14 +
- drivers/pinctrl/bcm/Makefile          |   1 +
- drivers/pinctrl/bcm/pinctrl-bcm4908.c | 563 ++++++++++++++++++++++++++
- 4 files changed, 579 insertions(+)
- create mode 100644 drivers/pinctrl/bcm/pinctrl-bcm4908.c
-
---- a/MAINTAINERS
-+++ b/MAINTAINERS
-@@ -3579,6 +3579,7 @@ M:	bcm-kernel-feedback-list at broadcom.com
- L:	linux-gpio at vger.kernel.org
- S:	Maintained
- F:	Documentation/devicetree/bindings/pinctrl/brcm,bcm4908-pinctrl.yaml
-+F:	drivers/pinctrl/bcm/pinctrl-bcm4908.c
- 
- BROADCOM BCM5301X ARM ARCHITECTURE
- M:	Hauke Mehrtens <hauke at hauke-m.de>
---- a/drivers/pinctrl/bcm/Kconfig
-+++ b/drivers/pinctrl/bcm/Kconfig
-@@ -29,6 +29,20 @@ config PINCTRL_BCM2835
- 	help
- 	   Say Y here to enable the Broadcom BCM2835 GPIO driver.
- 
-+config PINCTRL_BCM4908
-+	tristate "Broadcom BCM4908 pinmux driver"
-+	depends on OF && (ARCH_BCM4908 || COMPILE_TEST)
-+	select PINMUX
-+	select PINCONF
-+	select GENERIC_PINCONF
-+	select GENERIC_PINCTRL_GROUPS
-+	select GENERIC_PINMUX_FUNCTIONS
-+	default ARCH_BCM4908
-+	help
-+	  Driver for BCM4908 family SoCs with integrated pin controller.
-+
-+	  If compiled as module it will be called pinctrl-bcm4908.
-+
- config PINCTRL_BCM63XX
- 	bool
- 	select PINMUX
---- a/drivers/pinctrl/bcm/Makefile
-+++ b/drivers/pinctrl/bcm/Makefile
-@@ -3,6 +3,7 @@
- 
- obj-$(CONFIG_PINCTRL_BCM281XX)		+= pinctrl-bcm281xx.o
- obj-$(CONFIG_PINCTRL_BCM2835)		+= pinctrl-bcm2835.o
-+obj-$(CONFIG_PINCTRL_BCM4908)		+= pinctrl-bcm4908.o
- obj-$(CONFIG_PINCTRL_BCM63XX)		+= pinctrl-bcm63xx.o
- obj-$(CONFIG_PINCTRL_BCM6318)		+= pinctrl-bcm6318.o
- obj-$(CONFIG_PINCTRL_BCM6328)		+= pinctrl-bcm6328.o
---- /dev/null
-+++ b/drivers/pinctrl/bcm/pinctrl-bcm4908.c
-@@ -0,0 +1,560 @@
-+// SPDX-License-Identifier: GPL-2.0
-+/* Copyright (C) 2021 Rafa? Mi?ecki <rafal at milecki.pl> */
-+
-+#include <linux/err.h>
-+#include <linux/io.h>
-+#include <linux/mod_devicetable.h>
-+#include <linux/module.h>
-+#include <linux/pinctrl/pinconf-generic.h>
-+#include <linux/pinctrl/pinctrl.h>
-+#include <linux/pinctrl/pinmux.h>
-+#include <linux/platform_device.h>
-+#include <linux/slab.h>
-+#include <linux/string_helpers.h>
-+
-+#include "../core.h"
-+#include "../pinmux.h"
-+
-+#define BCM4908_NUM_PINS			86
-+
-+#define BCM4908_TEST_PORT_BLOCK_EN_LSB			0x00
-+#define BCM4908_TEST_PORT_BLOCK_DATA_MSB		0x04
-+#define BCM4908_TEST_PORT_BLOCK_DATA_LSB		0x08
-+#define  BCM4908_TEST_PORT_LSB_PINMUX_DATA_SHIFT	12
-+#define BCM4908_TEST_PORT_COMMAND			0x0c
-+#define  BCM4908_TEST_PORT_CMD_LOAD_MUX_REG		0x00000021
-+
-+struct bcm4908_pinctrl {
-+	struct device *dev;
-+	void __iomem *base;
-+	struct mutex mutex;
-+	struct pinctrl_dev *pctldev;
-+	struct pinctrl_desc pctldesc;
-+};
-+
-+/*
-+ * Groups
-+ */
-+
-+struct bcm4908_pinctrl_pin_setup {
-+	unsigned int number;
-+	unsigned int function;
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_0_pins_a[] = {
-+	{ 0, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_1_pins_a[] = {
-+	{ 1, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_2_pins_a[] = {
-+	{ 2, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_3_pins_a[] = {
-+	{ 3, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_4_pins_a[] = {
-+	{ 4, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_5_pins_a[] = {
-+	{ 5, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_6_pins_a[] = {
-+	{ 6, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_7_pins_a[] = {
-+	{ 7, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_8_pins_a[] = {
-+	{ 8, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_9_pins_a[] = {
-+	{ 9, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_10_pins_a[] = {
-+	{ 10, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_11_pins_a[] = {
-+	{ 11, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_12_pins_a[] = {
-+	{ 12, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_13_pins_a[] = {
-+	{ 13, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_14_pins_a[] = {
-+	{ 14, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_15_pins_a[] = {
-+	{ 15, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_16_pins_a[] = {
-+	{ 16, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_17_pins_a[] = {
-+	{ 17, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_18_pins_a[] = {
-+	{ 18, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_19_pins_a[] = {
-+	{ 19, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_20_pins_a[] = {
-+	{ 20, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_21_pins_a[] = {
-+	{ 21, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_22_pins_a[] = {
-+	{ 22, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_23_pins_a[] = {
-+	{ 23, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_24_pins_a[] = {
-+	{ 24, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_25_pins_a[] = {
-+	{ 25, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_26_pins_a[] = {
-+	{ 26, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_27_pins_a[] = {
-+	{ 27, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_28_pins_a[] = {
-+	{ 28, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_29_pins_a[] = {
-+	{ 29, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_30_pins_a[] = {
-+	{ 30, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_31_pins_a[] = {
-+	{ 31, 3 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_10_pins_b[] = {
-+	{ 8, 2 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_11_pins_b[] = {
-+	{ 9, 2 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_12_pins_b[] = {
-+	{ 0, 2 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_13_pins_b[] = {
-+	{ 1, 2 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup led_31_pins_b[] = {
-+	{ 30, 2 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup hs_uart_pins[] = {
-+	{ 10, 0 },	/* CTS */
-+	{ 11, 0 },	/* RTS */
-+	{ 12, 0 },	/* RXD */
-+	{ 13, 0 },	/* TXD */
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup i2c_pins_a[] = {
-+	{ 18, 0 },	/* SDA */
-+	{ 19, 0 },	/* SCL */
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup i2c_pins_b[] = {
-+	{ 22, 0 },	/* SDA */
-+	{ 23, 0 },	/* SCL */
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup i2s_pins[] = {
-+	{ 27, 0 },	/* MCLK */
-+	{ 28, 0 },	/* LRCK */
-+	{ 29, 0 },	/* SDATA */
-+	{ 30, 0 },	/* SCLK */
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup nand_ctrl_pins[] = {
-+	{ 32, 0 },
-+	{ 33, 0 },
-+	{ 34, 0 },
-+	{ 43, 0 },
-+	{ 44, 0 },
-+	{ 45, 0 },
-+	{ 56, 1 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup nand_data_pins[] = {
-+	{ 35, 0 },
-+	{ 36, 0 },
-+	{ 37, 0 },
-+	{ 38, 0 },
-+	{ 39, 0 },
-+	{ 40, 0 },
-+	{ 41, 0 },
-+	{ 42, 0 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup emmc_ctrl_pins[] = {
-+	{ 46, 0 },
-+	{ 47, 0 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup usb0_pwr_pins[] = {
-+	{ 63, 0 },
-+	{ 64, 0 },
-+};
-+
-+static const struct bcm4908_pinctrl_pin_setup usb1_pwr_pins[] = {
-+	{ 66, 0 },
-+	{ 67, 0 },
-+};
-+
-+struct bcm4908_pinctrl_grp {
-+	const char *name;
-+	const struct bcm4908_pinctrl_pin_setup *pins;
-+	const unsigned int num_pins;
-+};
-+
-+static const struct bcm4908_pinctrl_grp bcm4908_pinctrl_grps[] = {
-+	{ "led_0_grp_a", led_0_pins_a, ARRAY_SIZE(led_0_pins_a) },
-+	{ "led_1_grp_a", led_1_pins_a, ARRAY_SIZE(led_1_pins_a) },
-+	{ "led_2_grp_a", led_2_pins_a, ARRAY_SIZE(led_2_pins_a) },
-+	{ "led_3_grp_a", led_3_pins_a, ARRAY_SIZE(led_3_pins_a) },
-+	{ "led_4_grp_a", led_4_pins_a, ARRAY_SIZE(led_4_pins_a) },
-+	{ "led_5_grp_a", led_5_pins_a, ARRAY_SIZE(led_5_pins_a) },
-+	{ "led_6_grp_a", led_6_pins_a, ARRAY_SIZE(led_6_pins_a) },
-+	{ "led_7_grp_a", led_7_pins_a, ARRAY_SIZE(led_7_pins_a) },
-+	{ "led_8_grp_a", led_8_pins_a, ARRAY_SIZE(led_8_pins_a) },
-+	{ "led_9_grp_a", led_9_pins_a, ARRAY_SIZE(led_9_pins_a) },
-+	{ "led_10_grp_a", led_10_pins_a, ARRAY_SIZE(led_10_pins_a) },
-+	{ "led_11_grp_a", led_11_pins_a, ARRAY_SIZE(led_11_pins_a) },
-+	{ "led_12_grp_a", led_12_pins_a, ARRAY_SIZE(led_12_pins_a) },
-+	{ "led_13_grp_a", led_13_pins_a, ARRAY_SIZE(led_13_pins_a) },
-+	{ "led_14_grp_a", led_14_pins_a, ARRAY_SIZE(led_14_pins_a) },
-+	{ "led_15_grp_a", led_15_pins_a, ARRAY_SIZE(led_15_pins_a) },
-+	{ "led_16_grp_a", led_16_pins_a, ARRAY_SIZE(led_16_pins_a) },
-+	{ "led_17_grp_a", led_17_pins_a, ARRAY_SIZE(led_17_pins_a) },
-+	{ "led_18_grp_a", led_18_pins_a, ARRAY_SIZE(led_18_pins_a) },
-+	{ "led_19_grp_a", led_19_pins_a, ARRAY_SIZE(led_19_pins_a) },
-+	{ "led_20_grp_a", led_20_pins_a, ARRAY_SIZE(led_20_pins_a) },
-+	{ "led_21_grp_a", led_21_pins_a, ARRAY_SIZE(led_21_pins_a) },
-+	{ "led_22_grp_a", led_22_pins_a, ARRAY_SIZE(led_22_pins_a) },
-+	{ "led_23_grp_a", led_23_pins_a, ARRAY_SIZE(led_23_pins_a) },
-+	{ "led_24_grp_a", led_24_pins_a, ARRAY_SIZE(led_24_pins_a) },
-+	{ "led_25_grp_a", led_25_pins_a, ARRAY_SIZE(led_25_pins_a) },
-+	{ "led_26_grp_a", led_26_pins_a, ARRAY_SIZE(led_26_pins_a) },
-+	{ "led_27_grp_a", led_27_pins_a, ARRAY_SIZE(led_27_pins_a) },
-+	{ "led_28_grp_a", led_28_pins_a, ARRAY_SIZE(led_28_pins_a) },
-+	{ "led_29_grp_a", led_29_pins_a, ARRAY_SIZE(led_29_pins_a) },
-+	{ "led_30_grp_a", led_30_pins_a, ARRAY_SIZE(led_30_pins_a) },
-+	{ "led_31_grp_a", led_31_pins_a, ARRAY_SIZE(led_31_pins_a) },
-+	{ "led_10_grp_b", led_10_pins_b, ARRAY_SIZE(led_10_pins_b) },
-+	{ "led_11_grp_b", led_11_pins_b, ARRAY_SIZE(led_11_pins_b) },
-+	{ "led_12_grp_b", led_12_pins_b, ARRAY_SIZE(led_12_pins_b) },
-+	{ "led_13_grp_b", led_13_pins_b, ARRAY_SIZE(led_13_pins_b) },
-+	{ "led_31_grp_b", led_31_pins_b, ARRAY_SIZE(led_31_pins_b) },
-+	{ "hs_uart_grp", hs_uart_pins, ARRAY_SIZE(hs_uart_pins) },
-+	{ "i2c_grp_a", i2c_pins_a, ARRAY_SIZE(i2c_pins_a) },
-+	{ "i2c_grp_b", i2c_pins_b, ARRAY_SIZE(i2c_pins_b) },
-+	{ "i2s_grp", i2s_pins, ARRAY_SIZE(i2s_pins) },
-+	{ "nand_ctrl_grp", nand_ctrl_pins, ARRAY_SIZE(nand_ctrl_pins) },
-+	{ "nand_data_grp", nand_data_pins, ARRAY_SIZE(nand_data_pins) },
-+	{ "emmc_ctrl_grp", emmc_ctrl_pins, ARRAY_SIZE(emmc_ctrl_pins) },
-+	{ "usb0_pwr_grp", usb0_pwr_pins, ARRAY_SIZE(usb0_pwr_pins) },
-+	{ "usb1_pwr_grp", usb1_pwr_pins, ARRAY_SIZE(usb1_pwr_pins) },
-+};
-+
-+/*
-+ * Functions
-+ */
-+
-+struct bcm4908_pinctrl_function {
-+	const char *name;
-+	const char **groups;
-+	const unsigned int num_groups;
-+};
-+
-+static const char *led_0_groups[] = { "led_0_grp_a" };
-+static const char *led_1_groups[] = { "led_1_grp_a" };
-+static const char *led_2_groups[] = { "led_2_grp_a" };
-+static const char *led_3_groups[] = { "led_3_grp_a" };
-+static const char *led_4_groups[] = { "led_4_grp_a" };
-+static const char *led_5_groups[] = { "led_5_grp_a" };
-+static const char *led_6_groups[] = { "led_6_grp_a" };
-+static const char *led_7_groups[] = { "led_7_grp_a" };
-+static const char *led_8_groups[] = { "led_8_grp_a" };
-+static const char *led_9_groups[] = { "led_9_grp_a" };
-+static const char *led_10_groups[] = { "led_10_grp_a", "led_10_grp_b" };
-+static const char *led_11_groups[] = { "led_11_grp_a", "led_11_grp_b" };
-+static const char *led_12_groups[] = { "led_12_grp_a", "led_12_grp_b" };
-+static const char *led_13_groups[] = { "led_13_grp_a", "led_13_grp_b" };
-+static const char *led_14_groups[] = { "led_14_grp_a" };
-+static const char *led_15_groups[] = { "led_15_grp_a" };
-+static const char *led_16_groups[] = { "led_16_grp_a" };
-+static const char *led_17_groups[] = { "led_17_grp_a" };
-+static const char *led_18_groups[] = { "led_18_grp_a" };
-+static const char *led_19_groups[] = { "led_19_grp_a" };
-+static const char *led_20_groups[] = { "led_20_grp_a" };
-+static const char *led_21_groups[] = { "led_21_grp_a" };
-+static const char *led_22_groups[] = { "led_22_grp_a" };
-+static const char *led_23_groups[] = { "led_23_grp_a" };
-+static const char *led_24_groups[] = { "led_24_grp_a" };
-+static const char *led_25_groups[] = { "led_25_grp_a" };
-+static const char *led_26_groups[] = { "led_26_grp_a" };
-+static const char *led_27_groups[] = { "led_27_grp_a" };
-+static const char *led_28_groups[] = { "led_28_grp_a" };
-+static const char *led_29_groups[] = { "led_29_grp_a" };
-+static const char *led_30_groups[] = { "led_30_grp_a" };
-+static const char *led_31_groups[] = { "led_31_grp_a", "led_31_grp_b" };
-+static const char *hs_uart_groups[] = { "hs_uart_grp" };
-+static const char *i2c_groups[] = { "i2c_grp_a", "i2c_grp_b" };
-+static const char *i2s_groups[] = { "i2s_grp" };
-+static const char *nand_ctrl_groups[] = { "nand_ctrl_grp" };
-+static const char *nand_data_groups[] = { "nand_data_grp" };
-+static const char *emmc_ctrl_groups[] = { "emmc_ctrl_grp" };
-+static const char *usb0_pwr_groups[] = { "usb0_pwr_grp" };
-+static const char *usb1_pwr_groups[] = { "usb1_pwr_grp" };
-+
-+static const struct bcm4908_pinctrl_function bcm4908_pinctrl_functions[] = {
-+	{ "led_0", led_0_groups, ARRAY_SIZE(led_0_groups) },
-+	{ "led_1", led_1_groups, ARRAY_SIZE(led_1_groups) },
-+	{ "led_2", led_2_groups, ARRAY_SIZE(led_2_groups) },
-+	{ "led_3", led_3_groups, ARRAY_SIZE(led_3_groups) },
-+	{ "led_4", led_4_groups, ARRAY_SIZE(led_4_groups) },
-+	{ "led_5", led_5_groups, ARRAY_SIZE(led_5_groups) },
-+	{ "led_6", led_6_groups, ARRAY_SIZE(led_6_groups) },
-+	{ "led_7", led_7_groups, ARRAY_SIZE(led_7_groups) },
-+	{ "led_8", led_8_groups, ARRAY_SIZE(led_8_groups) },
-+	{ "led_9", led_9_groups, ARRAY_SIZE(led_9_groups) },
-+	{ "led_10", led_10_groups, ARRAY_SIZE(led_10_groups) },
-+	{ "led_11", led_11_groups, ARRAY_SIZE(led_11_groups) },
-+	{ "led_12", led_12_groups, ARRAY_SIZE(led_12_groups) },
-+	{ "led_13", led_13_groups, ARRAY_SIZE(led_13_groups) },
-+	{ "led_14", led_14_groups, ARRAY_SIZE(led_14_groups) },
-+	{ "led_15", led_15_groups, ARRAY_SIZE(led_15_groups) },
-+	{ "led_16", led_16_groups, ARRAY_SIZE(led_16_groups) },
-+	{ "led_17", led_17_groups, ARRAY_SIZE(led_17_groups) },
-+	{ "led_18", led_18_groups, ARRAY_SIZE(led_18_groups) },
-+	{ "led_19", led_19_groups, ARRAY_SIZE(led_19_groups) },
-+	{ "led_20", led_20_groups, ARRAY_SIZE(led_20_groups) },
-+	{ "led_21", led_21_groups, ARRAY_SIZE(led_21_groups) },
-+	{ "led_22", led_22_groups, ARRAY_SIZE(led_22_groups) },
-+	{ "led_23", led_23_groups, ARRAY_SIZE(led_23_groups) },
-+	{ "led_24", led_24_groups, ARRAY_SIZE(led_24_groups) },
-+	{ "led_25", led_25_groups, ARRAY_SIZE(led_25_groups) },
-+	{ "led_26", led_26_groups, ARRAY_SIZE(led_26_groups) },
-+	{ "led_27", led_27_groups, ARRAY_SIZE(led_27_groups) },
-+	{ "led_28", led_28_groups, ARRAY_SIZE(led_28_groups) },
-+	{ "led_29", led_29_groups, ARRAY_SIZE(led_29_groups) },
-+	{ "led_30", led_30_groups, ARRAY_SIZE(led_30_groups) },
-+	{ "led_31", led_31_groups, ARRAY_SIZE(led_31_groups) },
-+	{ "hs_uart", hs_uart_groups, ARRAY_SIZE(hs_uart_groups) },
-+	{ "i2c", i2c_groups, ARRAY_SIZE(i2c_groups) },
-+	{ "i2s", i2s_groups, ARRAY_SIZE(i2s_groups) },
-+	{ "nand_ctrl", nand_ctrl_groups, ARRAY_SIZE(nand_ctrl_groups) },
-+	{ "nand_data", nand_data_groups, ARRAY_SIZE(nand_data_groups) },
-+	{ "emmc_ctrl", emmc_ctrl_groups, ARRAY_SIZE(emmc_ctrl_groups) },
-+	{ "usb0_pwr", usb0_pwr_groups, ARRAY_SIZE(usb0_pwr_groups) },
-+	{ "usb1_pwr", usb1_pwr_groups, ARRAY_SIZE(usb1_pwr_groups) },
-+};
-+
-+/*
-+ * Groups code
-+ */
-+
-+static const struct pinctrl_ops bcm4908_pinctrl_ops = {
-+	.get_groups_count = pinctrl_generic_get_group_count,
-+	.get_group_name = pinctrl_generic_get_group_name,
-+	.get_group_pins = pinctrl_generic_get_group_pins,
-+	.dt_node_to_map = pinconf_generic_dt_node_to_map_group,
-+	.dt_free_map = pinconf_generic_dt_free_map,
-+};
-+
-+/*
-+ * Functions code
-+ */
-+
-+static int bcm4908_pinctrl_set_mux(struct pinctrl_dev *pctrl_dev,
-+			      unsigned int func_selector,
-+			      unsigned int group_selector)
-+{
-+	struct bcm4908_pinctrl *bcm4908_pinctrl = pinctrl_dev_get_drvdata(pctrl_dev);
-+	const struct bcm4908_pinctrl_grp *group;
-+	struct group_desc *group_desc;
-+	int i;
-+
-+	group_desc = pinctrl_generic_get_group(pctrl_dev, group_selector);
-+	if (!group_desc)
-+		return -EINVAL;
-+	group = group_desc->data;
-+
-+	mutex_lock(&bcm4908_pinctrl->mutex);
-+	for (i = 0; i < group->num_pins; i++) {
-+		u32 lsb = 0;
-+
-+		lsb |= group->pins[i].number;
-+		lsb |= group->pins[i].function << BCM4908_TEST_PORT_LSB_PINMUX_DATA_SHIFT;
-+
-+		writel(0x0, bcm4908_pinctrl->base + BCM4908_TEST_PORT_BLOCK_DATA_MSB);
-+		writel(lsb, bcm4908_pinctrl->base + BCM4908_TEST_PORT_BLOCK_DATA_LSB);
-+		writel(BCM4908_TEST_PORT_CMD_LOAD_MUX_REG,
-+		       bcm4908_pinctrl->base + BCM4908_TEST_PORT_COMMAND);
-+	}
-+	mutex_unlock(&bcm4908_pinctrl->mutex);
-+
-+	return 0;
-+}
-+
-+static const struct pinmux_ops bcm4908_pinctrl_pmxops = {
-+	.get_functions_count = pinmux_generic_get_function_count,
-+	.get_function_name = pinmux_generic_get_function_name,
-+	.get_function_groups = pinmux_generic_get_function_groups,
-+	.set_mux = bcm4908_pinctrl_set_mux,
-+};
-+
-+/*
-+ * Controller code
-+ */
-+
-+static struct pinctrl_desc bcm4908_pinctrl_desc = {
-+	.name = "bcm4908-pinctrl",
-+	.pctlops = &bcm4908_pinctrl_ops,
-+	.pmxops = &bcm4908_pinctrl_pmxops,
-+};
-+
-+static const struct of_device_id bcm4908_pinctrl_of_match_table[] = {
-+	{ .compatible = "brcm,bcm4908-pinctrl", },
-+	{ }
-+};
-+
-+static int bcm4908_pinctrl_probe(struct platform_device *pdev)
-+{
-+	struct device *dev = &pdev->dev;
-+	struct bcm4908_pinctrl *bcm4908_pinctrl;
-+	struct pinctrl_desc *pctldesc;
-+	struct pinctrl_pin_desc *pins;
-+	int i;
-+
-+	bcm4908_pinctrl = devm_kzalloc(dev, sizeof(*bcm4908_pinctrl), GFP_KERNEL);
-+	if (!bcm4908_pinctrl)
-+		return -ENOMEM;
-+	pctldesc = &bcm4908_pinctrl->pctldesc;
-+	platform_set_drvdata(pdev, bcm4908_pinctrl);
-+
-+	/* Set basic properties */
-+
-+	bcm4908_pinctrl->dev = dev;
-+
-+	bcm4908_pinctrl->base = devm_platform_ioremap_resource(pdev, 0);
-+	if (IS_ERR(bcm4908_pinctrl->base))
-+		return PTR_ERR(bcm4908_pinctrl->base);
-+
-+	mutex_init(&bcm4908_pinctrl->mutex);
-+
-+	memcpy(pctldesc, &bcm4908_pinctrl_desc, sizeof(*pctldesc));
-+
-+	/* Set pinctrl properties */
-+
-+	pins = devm_kcalloc(dev, BCM4908_NUM_PINS, sizeof(*pins), GFP_KERNEL);
-+	if (!pins)
-+		return -ENOMEM;
-+	for (i = 0; i < BCM4908_NUM_PINS; i++) {
-+		pins[i].number = i;
-+		pins[i].name = devm_kasprintf(dev, GFP_KERNEL, "pin-%d", i);
-+		if (!pins[i].name)
-+			return -ENOMEM;
-+	}
-+	pctldesc->pins = pins;
-+	pctldesc->npins = BCM4908_NUM_PINS;
-+
-+	/* Register */
-+
-+	bcm4908_pinctrl->pctldev = devm_pinctrl_register(dev, pctldesc, bcm4908_pinctrl);
-+	if (IS_ERR(bcm4908_pinctrl->pctldev))
-+		return dev_err_probe(dev, PTR_ERR(bcm4908_pinctrl->pctldev),
-+				     "Failed to register pinctrl\n");
-+
-+	/* Groups */
-+
-+	for (i = 0; i < ARRAY_SIZE(bcm4908_pinctrl_grps); i++) {
-+		const struct bcm4908_pinctrl_grp *group = &bcm4908_pinctrl_grps[i];
-+		int *pins;
-+		int j;
-+
-+		pins = devm_kcalloc(dev, group->num_pins, sizeof(*pins), GFP_KERNEL);
-+		if (!pins)
-+			return -ENOMEM;
-+		for (j = 0; j < group->num_pins; j++)
-+			pins[j] = group->pins[j].number;
-+
-+		pinctrl_generic_add_group(bcm4908_pinctrl->pctldev, group->name,
-+					  pins, group->num_pins, (void *)group);
-+	}
-+
-+	/* Functions */
-+
-+	for (i = 0; i < ARRAY_SIZE(bcm4908_pinctrl_functions); i++) {
-+		const struct bcm4908_pinctrl_function *function = &bcm4908_pinctrl_functions[i];
-+
-+		pinmux_generic_add_function(bcm4908_pinctrl->pctldev,
-+					    function->name,
-+					    function->groups,
-+					    function->num_groups, NULL);
-+	}
-+
-+	return 0;
-+}
-+
-+static struct platform_driver bcm4908_pinctrl_driver = {
-+	.probe = bcm4908_pinctrl_probe,
-+	.driver = {
-+		.name = "bcm4908-pinctrl",
-+		.of_match_table = bcm4908_pinctrl_of_match_table,
-+	},
-+};
-+
-+module_platform_driver(bcm4908_pinctrl_driver);
-+
-+MODULE_AUTHOR("Rafa? Mi?ecki");
-+MODULE_LICENSE("GPL v2");
-+MODULE_DEVICE_TABLE(of, bcm4908_pinctrl_of_match_table);
diff --git a/target/linux/bcm4908/patches-5.15/081-v5.18-0001-i2c-brcmstb-allow-compiling-on-BCM4908.patch b/target/linux/bcm4908/patches-5.15/081-v5.18-0001-i2c-brcmstb-allow-compiling-on-BCM4908.patch
deleted file mode 100644
index 246f249413..0000000000
--- a/target/linux/bcm4908/patches-5.15/081-v5.18-0001-i2c-brcmstb-allow-compiling-on-BCM4908.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From d0aee048d648ec2d9aa7af43b127ebf847d497d5 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Fri, 11 Feb 2022 11:58:06 +0100
-Subject: [PATCH] i2c: brcmstb: allow compiling on BCM4908
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM4908 SoCs use the same I2C hardware block as STB and BCM63xx devices.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Acked-by: Florian Fainelli <f.fainelli at gmail.com>
-Signed-off-by: Wolfram Sang <wsa at kernel.org>
----
- drivers/i2c/busses/Kconfig | 4 ++--
- 1 file changed, 2 insertions(+), 2 deletions(-)
-
---- a/drivers/i2c/busses/Kconfig
-+++ b/drivers/i2c/busses/Kconfig
-@@ -477,8 +477,8 @@ config I2C_BCM_KONA
- 
- config I2C_BRCMSTB
- 	tristate "BRCM Settop/DSL I2C controller"
--	depends on ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC || \
--		   ARCH_BCM_63XX || COMPILE_TEST
-+	depends on ARCH_BCM2835 || ARCH_BCM4908 || ARCH_BCM_63XX || \
-+		   ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
- 	default y
- 	help
- 	  If you say yes to this option, support will be included for the
diff --git a/target/linux/bcm4908/patches-5.15/082-v5.18-watchdog-allow-building-BCM7038_WDT-for-BCM4908.patch b/target/linux/bcm4908/patches-5.15/082-v5.18-watchdog-allow-building-BCM7038_WDT-for-BCM4908.patch
deleted file mode 100644
index 0717436ffa..0000000000
--- a/target/linux/bcm4908/patches-5.15/082-v5.18-watchdog-allow-building-BCM7038_WDT-for-BCM4908.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From cd91fb2776967b2b2dea27307a3f23ba3d9bbb32 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Wed, 9 Feb 2022 21:32:02 +0100
-Subject: [PATCH] watchdog: allow building BCM7038_WDT for BCM4908
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-BCM4908 is a SoCs family that shares a lot of hardware with BCM63xx
-including the watchdog block. Allow building this driver for it.
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Acked-by: Florian Fainelli <f.fainelli at gmail.com>
-Reviewed-by: Guenter Roeck <linux at roeck-us.net>
-Link: https://lore.kernel.org/r/20220209203202.26395-1-zajec5 at gmail.com
-Signed-off-by: Guenter Roeck <linux at roeck-us.net>
-Signed-off-by: Wim Van Sebroeck <wim at linux-watchdog.org>
----
- drivers/watchdog/Kconfig | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/watchdog/Kconfig
-+++ b/drivers/watchdog/Kconfig
-@@ -1756,7 +1756,7 @@ config BCM7038_WDT
- 	tristate "BCM7038 Watchdog"
- 	select WATCHDOG_CORE
- 	depends on HAS_IOMEM
--	depends on ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
-+	depends on ARCH_BCM4908 || ARCH_BRCMSTB || BMIPS_GENERIC || COMPILE_TEST
- 	help
- 	 Watchdog driver for the built-in hardware in Broadcom 7038 and
- 	 later SoCs used in set-top boxes.  BCM7038 was made public
diff --git a/target/linux/bcm4908/patches-5.15/083-v5.20-watchdog-bcm7038_wdt-Support-BCM6345-compatible-stri.patch b/target/linux/bcm4908/patches-5.15/083-v5.20-watchdog-bcm7038_wdt-Support-BCM6345-compatible-stri.patch
deleted file mode 100644
index 14b6c61bac..0000000000
--- a/target/linux/bcm4908/patches-5.15/083-v5.20-watchdog-bcm7038_wdt-Support-BCM6345-compatible-stri.patch
+++ /dev/null
@@ -1,34 +0,0 @@
-From 2dd441f16d6ad6104d85c4e5dfeb6dde4df26869 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Wed, 16 Feb 2022 07:34:08 +0100
-Subject: [PATCH] watchdog: bcm7038_wdt: Support BCM6345 compatible string
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-A new "compatible" value has been added in the commit 17fffe91ba36
-("dt-bindings: watchdog: Add BCM6345 compatible to BCM7038 binding").
-It's meant to be used for BCM63xx SoCs family but hardware block can be
-programmed just like the 7038 one.
-
-Cc: Florian Fainelli <f.fainelli at gmail.com>
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
-Acked-by: Florian Fainelli <f.fainelli at gmail.com>
-Reviewed-by: Guenter Roeck <linux at roeck-us.net>
-Link: https://lore.kernel.org/r/20220216063408.23168-1-zajec5 at gmail.com
-Signed-off-by: Guenter Roeck <linux at roeck-us.net>
-Signed-off-by: Wim Van Sebroeck <wim at linux-watchdog.org>
----
- drivers/watchdog/bcm7038_wdt.c | 1 +
- 1 file changed, 1 insertion(+)
-
---- a/drivers/watchdog/bcm7038_wdt.c
-+++ b/drivers/watchdog/bcm7038_wdt.c
-@@ -212,6 +212,7 @@ static SIMPLE_DEV_PM_OPS(bcm7038_wdt_pm_
- 			 bcm7038_wdt_resume);
- 
- static const struct of_device_id bcm7038_wdt_match[] = {
-+	{ .compatible = "brcm,bcm6345-wdt" },
- 	{ .compatible = "brcm,bcm7038-wdt" },
- 	{},
- };
diff --git a/target/linux/bcm4908/patches-5.15/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch b/target/linux/bcm4908/patches-5.15/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch
deleted file mode 100644
index 46d632e95d..0000000000
--- a/target/linux/bcm4908/patches-5.15/130-arm64-dts-broadcom-bcmbca-bcm4908-set-brcm-wp-not-co.patch
+++ /dev/null
@@ -1,31 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Thu, 28 Mar 2024 10:24:34 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: set
- brcm,wp-not-connected
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Every described BCM4908 board has WP pin not connected. This caused
-problems for drivers since day 0 but there was no property to describe
-that properly. Projects like OpenWrt were modifying Linux driver to deal
-with it.
-
-It's not clear if that is hardware limitation or just reference design
-being copied over and over but this applies to all known / supported
-BCM4908 boards. Handle it by marking WP as not connected by default.
-
-Fixes: 2961f69f151c ("arm64: dts: broadcom: add BCM4908 and Asus GT-AC5300 early DTS files")
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
----
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -593,6 +593,7 @@
- 			reg-names = "nand", "nand-int-base";
- 			interrupts = <GIC_SPI 37 IRQ_TYPE_LEVEL_HIGH>;
- 			interrupt-names = "nand_ctlrdy";
-+			brcm,wp-not-connected;
- 			status = "okay";
- 
- 			nandcs: nand at 0 {
diff --git a/target/linux/bcm4908/patches-5.15/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch b/target/linux/bcm4908/patches-5.15/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch
deleted file mode 100644
index 4adeef8319..0000000000
--- a/target/linux/bcm4908/patches-5.15/300-arm64-dts-broadcom-bcmbca-bcm4908-limit-amount-of-GP.patch
+++ /dev/null
@@ -1,23 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 15 Feb 2021 22:01:03 +0100
-Subject: [PATCH] arm64: dts: broadcom: bcmbca: bcm4908: limit amount of GPIOs
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Linux driver can't handle more than 64 GPIOs
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
----
-
---- a/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-+++ b/arch/arm64/boot/dts/broadcom/bcmbca/bcm4908.dtsi
-@@ -340,7 +340,7 @@
- 		gpio0: gpio-controller at 500 {
- 			compatible = "brcm,bcm6345-gpio";
- 			reg-names = "dirout", "dat";
--			reg = <0x500 0x28>, <0x528 0x28>;
-+			reg = <0x500 0x8>, <0x528 0x8>;
- 
- 			#gpio-cells = <2>;
- 			gpio-controller;
diff --git a/target/linux/bcm4908/patches-5.15/301-arm64-don-t-issue-HVC-on-boot.patch b/target/linux/bcm4908/patches-5.15/301-arm64-don-t-issue-HVC-on-boot.patch
deleted file mode 100644
index d167c2ed00..0000000000
--- a/target/linux/bcm4908/patches-5.15/301-arm64-don-t-issue-HVC-on-boot.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Thu, 12 Aug 2021 11:52:42 +0200
-Subject: [PATCH] arm64: don't issue HVC on boot
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-Broadcom's CFE loader seems to miss setting SCR_EL3.HCE which results in
-generating an UNDEF and kernel panic on the first HVC.
-
-HVC gets issued by kernels 5.12+ while booting, by kexec and KVM. Until
-someone finds a workaround we have to avoid all above.
-
-Workarounds: 0c93df9622d4 ("arm64: Initialise as nVHE before switching to VHE")
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
----
- arch/arm64/kernel/hyp-stub.S | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/arch/arm64/kernel/hyp-stub.S
-+++ b/arch/arm64/kernel/hyp-stub.S
-@@ -238,7 +238,7 @@ SYM_FUNC_START(switch_to_vhe)
- 
- 	// Turn the world upside down
- 	mov	x0, #HVC_VHE_RESTART
--	hvc	#0
-+//	hvc	#0
- 1:
- 	ret
- SYM_FUNC_END(switch_to_vhe)
diff --git a/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch b/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch
deleted file mode 100644
index 165b02da0f..0000000000
--- a/target/linux/bcm4908/patches-5.15/700-net-dsa-bcm_sf2-enable-GPHY-for-switch-probing.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Mon, 15 Feb 2021 23:59:26 +0100
-Subject: [PATCH] net: dsa: bcm_sf2: enable GPHY for switch probing
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-GPHY needs to be enabled to succesfully probe & setup switch port
-connected to it. Otherwise hardcoding PHY OUI would be required.
-
-Before:
-brcm-sf2 80080000.switch lan4 (uninitialized): PHY [800c05c0.mdio--1:08] driver [Generic PHY] (irq=POLL)
-brcm-sf2 80080000.switch lan3 (uninitialized): PHY [800c05c0.mdio--1:09] driver [Generic PHY] (irq=POLL)
-brcm-sf2 80080000.switch lan2 (uninitialized): PHY [800c05c0.mdio--1:0a] driver [Generic PHY] (irq=POLL)
-brcm-sf2 80080000.switch lan1 (uninitialized): PHY [800c05c0.mdio--1:0b] driver [Generic PHY] (irq=POLL)
-brcm-sf2 80080000.switch wan (uninitialized): error -5 setting up PHY for tree 0, switch 0, port 7
-
-After:
-brcm-sf2 80080000.switch lan4 (uninitialized): PHY [800c05c0.mdio--1:08] driver [Generic PHY] (irq=POLL)
-brcm-sf2 80080000.switch lan3 (uninitialized): PHY [800c05c0.mdio--1:09] driver [Generic PHY] (irq=POLL)
-brcm-sf2 80080000.switch lan2 (uninitialized): PHY [800c05c0.mdio--1:0a] driver [Generic PHY] (irq=POLL)
-brcm-sf2 80080000.switch lan1 (uninitialized): PHY [800c05c0.mdio--1:0b] driver [Generic PHY] (irq=POLL)
-brcm-sf2 80080000.switch wan (uninitialized): PHY [800c05c0.mdio--1:0c] driver [Generic PHY] (irq=POLL)
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
----
- drivers/net/dsa/bcm_sf2.c | 4 ++++
- 1 file changed, 4 insertions(+)
-
---- a/drivers/net/dsa/bcm_sf2.c
-+++ b/drivers/net/dsa/bcm_sf2.c
-@@ -1548,10 +1548,14 @@ static int bcm_sf2_sw_probe(struct platf
- 	rev = reg_readl(priv, REG_PHY_REVISION);
- 	priv->hw_params.gphy_rev = rev & PHY_REVISION_MASK;
- 
-+	bcm_sf2_gphy_enable_set(priv->dev->ds, true);
-+
- 	ret = b53_switch_register(dev);
- 	if (ret)
- 		goto out_mdio;
- 
-+	bcm_sf2_gphy_enable_set(priv->dev->ds, false);
-+
- 	dev_info(&pdev->dev,
- 		 "Starfighter 2 top: %x.%02x, core: %x.%02x, IRQs: %d, %d\n",
- 		 priv->hw_params.top_rev >> 8, priv->hw_params.top_rev & 0xff,
diff --git a/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch b/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch
deleted file mode 100644
index ea0adca26f..0000000000
--- a/target/linux/bcm4908/patches-5.15/701-net-dsa-bcm_sf2-keep-GPHY-enabled-on-the-BCM4908.patch
+++ /dev/null
@@ -1,30 +0,0 @@
-From: =?UTF-8?q?Rafa=C5=82=20Mi=C5=82ecki?= <rafal at milecki.pl>
-Date: Tue, 16 Feb 2021 00:06:35 +0100
-Subject: [PATCH] net: dsa: bcm_sf2: keep GPHY enabled on the BCM4908
-
-Trying to access disabled PHY results in MDIO_READ_FAIL and:
-[   11.962886] brcm-sf2 80080000.switch wan: configuring for phy/internal link mode
-[   11.972500] 8021q: adding VLAN 0 to HW filter on device wan
-[   11.980205] ------------[ cut here ]------------
-[   11.984885] WARNING: CPU: 0 PID: 7 at phy_error+0x10/0x58
-
-Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
----
- drivers/net/dsa/bcm_sf2.c | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/drivers/net/dsa/bcm_sf2.c
-+++ b/drivers/net/dsa/bcm_sf2.c
-@@ -1562,6 +1562,12 @@ static int bcm_sf2_sw_probe(struct platf
- 		 priv->hw_params.core_rev >> 8, priv->hw_params.core_rev & 0xff,
- 		 priv->irq0, priv->irq1);
- 
-+	/* BCM4908 has 5 GPHYs which means bcm_sf2_port_setup() will not enable
-+	 * GPHY when needed. Leave it enabled here.
-+	 */
-+	if (priv->type == BCM4908_DEVICE_ID)
-+		bcm_sf2_gphy_enable_set(priv->dev->ds, true);
-+
- 	return 0;
- 
- out_mdio:



From lede-commits at lists.infradead.org  Sat Apr 27 04:35:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 07:35:13 -0400
Subject: [openwrt/openwrt]  ubox: update to Git HEAD (2024-04-26)
In-Reply-To: <171421771397.3148701.7632182823668131419@git-01.infra.openwrt.org>
References: <171421771397.3148701.7632182823668131419@git-01.infra.openwrt.org>
Message-ID: <mailman.31499.1714217719.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0fc87ddf444c3e3cf60efd00a3b3cc2fab75191c

commit 0fc87ddf444c3e3cf60efd00a3b3cc2fab75191c
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 27 11:56:14 2024 +0200

    ubox: update to Git HEAD (2024-04-26)
    
    85f1053019ca kmodloader: fix insmod path logic
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15288
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/system/ubox/Makefile | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/package/system/ubox/Makefile b/package/system/ubox/Makefile
index 9423eeafad..cb57e42e66 100644
--- a/package/system/ubox/Makefile
+++ b/package/system/ubox/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/ubox.git
-PKG_SOURCE_DATE:=2024-03-02
-PKG_SOURCE_VERSION:=d413903016c4dc9190926e38ff72fbf7d3d69115
-PKG_MIRROR_HASH:=51f529b8b686725954bd8ea17b6734c1b5bb3ad8eb0bc57d19c89694a78d651c
+PKG_SOURCE_DATE:=2024-04-26
+PKG_SOURCE_VERSION:=85f1053019caf4cd333795760950235ee4529ba7
+PKG_MIRROR_HASH:=9e3fb6ab94854405fb91626a673b0547a061582c552ce719691be1bc8818da6c
 CMAKE_INSTALL:=1
 
 PKG_LICENSE:=GPL-2.0



From lede-commits at lists.infradead.org  Sat Apr 27 06:13:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 09:13:27 -0400
Subject: [openwrt/openwrt]  CI: tools: macOS: sync with shared-actions for
 macOS 14
In-Reply-To: <171422360747.3625657.9121555682496144018@git-01.infra.openwrt.org>
References: <171422360747.3625657.9121555682496144018@git-01.infra.openwrt.org>
Message-ID: <mailman.31502.1714223612.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/f5e20dd430d067376347ddc37be7ae9ce559e6e1

commit f5e20dd430d067376347ddc37be7ae9ce559e6e1
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 27 13:28:29 2024 +0200

    CI: tools: macOS: sync with shared-actions for macOS 14
    
    Now that GH has changed their runner to macOS 14 current recipe will fail
    so lets sync the required changes for macOS 14.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .github/workflows/tools.yml | 33 ++++++++-------------------------
 1 file changed, 8 insertions(+), 25 deletions(-)

diff --git a/.github/workflows/tools.yml b/.github/workflows/tools.yml
index 304b5f7d62..7402b778bc 100644
--- a/.github/workflows/tools.yml
+++ b/.github/workflows/tools.yml
@@ -16,7 +16,7 @@ permissions:
 jobs:
   build-macos-latest:
     if: github.event_name != 'push'
-    runs-on: macos-latest
+    runs-on: macos-14
 
     steps:
       - name: Checkout
@@ -35,43 +35,26 @@ jobs:
         working-directory: ${{ env.WORKPATH }}/openwrt
         run: |
           brew install \
-            autoconf \
             automake \
             coreutils \
             diffutils \
             findutils \
             gawk \
-            gettext \
             git-extras \
-            gmp \
             gnu-getopt \
             gnu-sed \
-            gnu-tar \
             grep \
-            libidn2 \
-            libunistring \
-            m4 \
-            make \
-            mpfr \
-            ncurses \
-            openssl at 1.1 \
-            pcre \
-            pkg-config \
-            quilt \
-            readline \
-            wget \
-            zstd
+            gpatch \
+            make
 
             echo "/bin" >> "$GITHUB_PATH"
             echo "/sbin/Library/Apple/usr/bin" >> "$GITHUB_PATH"
             echo "/usr/bin" >> "$GITHUB_PATH"
-            echo "/usr/local/bin" >> "$GITHUB_PATH"
-            echo "/usr/local/opt/coreutils/bin" >> "$GITHUB_PATH"
-            echo "/usr/local/opt/findutils/libexec/gnubin" >> "$GITHUB_PATH"
-            echo "/usr/local/opt/gettext/bin" >> "$GITHUB_PATH"
-            echo "/usr/local/opt/gnu-getopt/bin" >> "$GITHUB_PATH"
-            echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
-            echo "/usr/local/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
+            echo "/opt/homebrew/bin" >> "$GITHUB_PATH"
+            echo "/opt/homebrew/opt/coreutils/bin" >> "$GITHUB_PATH"
+            echo "/opt/homebrew/opt/findutils/libexec/gnubin" >> "$GITHUB_PATH"
+            echo "/opt/homebrew/opt/gnu-getopt/bin" >> "$GITHUB_PATH"
+            echo "/opt/homebrew/opt/make/libexec/gnubin" >> "$GITHUB_PATH"
             echo "/usr/sbin" >> "$GITHUB_PATH"
 
       - name: Make prereq



From lede-commits at lists.infradead.org  Sat Apr 27 06:14:53 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 09:14:53 -0400
Subject: [openwrt/openwrt]  tools/coreutils: fix compilation on macOS 14
In-Reply-To: <171422369182.3632724.12618502228375142537@git-01.infra.openwrt.org>
References: <171422369182.3632724.12618502228375142537@git-01.infra.openwrt.org>
Message-ID: <mailman.31503.1714223696.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/eede9b1bc4404ae19dc86aeee13ffe5f485115c1

commit eede9b1bc4404ae19dc86aeee13ffe5f485115c1
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 27 13:55:46 2024 +0200

    tools/coreutils: fix compilation on macOS 14
    
    Current coreutils 8.32 in 22.03 will fail to compile when using macOS 14 with:
    depbase=`echo lib/obstack.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc  -I. -I./lib  -Ilib -I./lib -Isrc -I./src -I/Volumes/OpenWrt/openwrt/staging_dir/host/include    -O2 -I/Volumes/OpenWrt/openwrt/staging_dir/host/include  -MT lib/obstack.o -MD -MP -MF $depbase.Tpo -c -o lib/obstack.o lib/obstack.c &&\
    mv -f $depbase.Tpo $depbase.Po
    lib/obstack.c:351:31: error: incompatible function pointer types initializing 'void (*)(void) __attribute__((noreturn))' with an expression of type 'void (void)' [-Wincompatible-function-pointer-types]
    __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
                                  ^
    1 error generated.
    
    Backporting gnulib commit ("obstack: Fix a clang warning") fixes this.
    
    Fixes: #15270
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../patches/0001-obstack-Fix-a-clang-warning.patch  | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tools/coreutils/patches/0001-obstack-Fix-a-clang-warning.patch b/tools/coreutils/patches/0001-obstack-Fix-a-clang-warning.patch
new file mode 100644
index 0000000000..01013adcba
--- /dev/null
+++ b/tools/coreutils/patches/0001-obstack-Fix-a-clang-warning.patch
@@ -0,0 +1,21 @@
+From 0cc39712803ade7b2d4b89c36b143dad72404063 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno at clisp.org>
+Date: Sun, 18 Oct 2020 14:37:13 +0200
+Subject: [PATCH] obstack: Fix a clang warning.
+
+* lib/obstack.c (print_and_abort): Mark as __attribute_noreturn__.
+---
+ lib/obstack.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/obstack.c
++++ b/lib/obstack.c
+@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ #   include <libio/iolibio.h>
+ #  endif
+ 
+-static _Noreturn void
++static __attribute_noreturn__ void
+ print_and_abort (void)
+ {
+   /* Don't change any of these strings.  Yes, it would be possible to add



From lede-commits at lists.infradead.org  Sat Apr 27 06:14:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 09:14:52 -0400
Subject: [openwrt/openwrt]  tools/cpio: fix compilation on macOS 14
In-Reply-To: <171422369182.3632724.12618502228375142537@git-01.infra.openwrt.org>
References: <171422369182.3632724.12618502228375142537@git-01.infra.openwrt.org>
Message-ID: <mailman.31504.1714223696.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/8d65f0208798625c68b019d417f964b4e609cda1

commit 8d65f0208798625c68b019d417f964b4e609cda1
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 27 13:41:11 2024 +0200

    tools/cpio: fix compilation on macOS 14
    
    Current cpio 2.13 in 22.03 will fail to compile when using macOS 14 with:
    gcc -DHAVE_CONFIG_H -I. -I..   -I/Volumes/OpenWrt/openwrt/staging_dir/host/include   -O2 -I/Volumes/OpenWrt/openwrt/staging_dir/host/include  -MT obstack.o -MD -MP -MF .deps/obstack.Tpo -c -o obstack.o obstack.c
    obstack.c:351:31: error: incompatible function pointer types initializing 'void (*)(void) __attribute__((noreturn))' with an expression of type 'void (void)' [-Wincompatible-function-pointer-types]
    __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
                                  ^
    1 error generated.
    make[7]: *** [Makefile:1586: obstack.o] Error 1
    
    Backporting gnulib commit ("obstack: Fix a clang warning") fixes this.
    
    Fixes: #15270
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../patches/002-obstack-Fix-a-clang-warning.patch   | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tools/cpio/patches/002-obstack-Fix-a-clang-warning.patch b/tools/cpio/patches/002-obstack-Fix-a-clang-warning.patch
new file mode 100644
index 0000000000..b79124469d
--- /dev/null
+++ b/tools/cpio/patches/002-obstack-Fix-a-clang-warning.patch
@@ -0,0 +1,21 @@
+From 0cc39712803ade7b2d4b89c36b143dad72404063 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno at clisp.org>
+Date: Sun, 18 Oct 2020 14:37:13 +0200
+Subject: [PATCH] obstack: Fix a clang warning.
+
+* gnu/obstack.c (print_and_abort): Mark as __attribute_noreturn__.
+---
+ gnu/obstack.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/gnu/obstack.c
++++ b/gnu/obstack.c
+@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ #   include <libio/iolibio.h>
+ #  endif
+ 
+-static _Noreturn void
++static __attribute_noreturn__ void
+ print_and_abort (void)
+ {
+   /* Don't change any of these strings.  Yes, it would be possible to add



From lede-commits at lists.infradead.org  Sat Apr 27 06:14:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 09:14:51 -0400
Subject: [openwrt/openwrt]  tools/sed: fix compilation on macOS 14
In-Reply-To: <171422369182.3632724.12618502228375142537@git-01.infra.openwrt.org>
References: <171422369182.3632724.12618502228375142537@git-01.infra.openwrt.org>
Message-ID: <mailman.31505.1714223700.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/4a6911fe7911914eb1319d55dd0de02542a16247

commit 4a6911fe7911914eb1319d55dd0de02542a16247
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 27 13:01:18 2024 +0200

    tools/sed: fix compilation on macOS 14
    
    Current sed 4.8 in 22.03 will fail to compile when using macOS 14 with:
    depbase=`echo lib/obstack.o | sed 's|[^/]*$|.deps/&|;s|\.o$||'`;\
    gcc -DHAVE_CONFIG_H -I.  -I. -I./lib -I./lib -I./sed -I/Volumes/OpenWrt/openwrt/staging_dir/host/include   -O2 -I/Volumes/OpenWrt/openwrt/staging_dir/host/include  -MT lib/obstack.o -MD -MP -MF $depbase.Tpo -c -o lib/obstack.o lib/obstack.c &&\
    mv -f $depbase.Tpo $depbase.Po
    lib/obstack.c:351:31: error: incompatible function pointer types initializing 'void (*)(void) __attribute__((noreturn))' with an expression of type 'void (void)' [-Wincompatible-function-pointer-types]
    __attribute_noreturn__ void (*obstack_alloc_failed_handler) (void)
                                  ^
    1 error generated.
    make[5]: *** [Makefile:2781: lib/obstack.o] Error 1
    
    Backporting gnulib commit ("obstack: Fix a clang warning") fixes this.
    
    Fixes: #15270
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../patches/0001-obstack-Fix-a-clang-warning.patch  | 21 +++++++++++++++++++++
 1 file changed, 21 insertions(+)

diff --git a/tools/sed/patches/0001-obstack-Fix-a-clang-warning.patch b/tools/sed/patches/0001-obstack-Fix-a-clang-warning.patch
new file mode 100644
index 0000000000..01013adcba
--- /dev/null
+++ b/tools/sed/patches/0001-obstack-Fix-a-clang-warning.patch
@@ -0,0 +1,21 @@
+From 0cc39712803ade7b2d4b89c36b143dad72404063 Mon Sep 17 00:00:00 2001
+From: Bruno Haible <bruno at clisp.org>
+Date: Sun, 18 Oct 2020 14:37:13 +0200
+Subject: [PATCH] obstack: Fix a clang warning.
+
+* lib/obstack.c (print_and_abort): Mark as __attribute_noreturn__.
+---
+ lib/obstack.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/lib/obstack.c
++++ b/lib/obstack.c
+@@ -326,7 +326,7 @@ int obstack_exit_failure = EXIT_FAILURE;
+ #   include <libio/iolibio.h>
+ #  endif
+ 
+-static _Noreturn void
++static __attribute_noreturn__ void
+ print_and_abort (void)
+ {
+   /* Don't change any of these strings.  Yes, it would be possible to add



From lede-commits at lists.infradead.org  Sat Apr 27 08:15:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 11:15:06 -0400
Subject: [openwrt/openwrt]  kernel: generic backport 6.1: rename mistyped
 .patch file
In-Reply-To: <171423090683.49796.13151817831765579489@git-01.infra.openwrt.org>
References: <171423090683.49796.13151817831765579489@git-01.infra.openwrt.org>
Message-ID: <mailman.31510.1714230914.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/db89030cb2b090f8c5fe406ad4192541fa9836bf

commit db89030cb2b090f8c5fe406ad4192541fa9836bf
Author: Antonio Flores <antflores627 at gmail.com>
AuthorDate: Fri Apr 26 19:16:04 2024 -0400

    kernel: generic backport 6.1: rename mistyped .patch file
    
    Rename mistyped file .patc to patch
    
    Fixes: ac8bfe316b ("generic: 6.1, 6.6: mt7530: import accepted patches")
    Signed-off-by: Antonio Flores <antflores627 at gmail.com>
---
 ... 790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patc b/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
similarity index 100%
rename from target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patc
rename to target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch



From lede-commits at lists.infradead.org  Sat Apr 27 08:16:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 11:16:09 -0400
Subject: [openwrt/openwrt]  generic: v6.1,
 v6.6: add patch to fix PHY-muxing on MT7530
In-Reply-To: <171423096945.54516.4771836913633967659@git-01.infra.openwrt.org>
References: <171423096945.54516.4771836913633967659@git-01.infra.openwrt.org>
Message-ID: <mailman.31511.1714230976.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/fe9d2ccbc3d9dc0852df474f0e3cc07f93beae8b

commit fe9d2ccbc3d9dc0852df474f0e3cc07f93beae8b
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sat Apr 27 13:05:30 2024 +0100

    generic: v6.1, v6.6: add patch to fix PHY-muxing on MT7530
    
    Move accepted patches to backport folder, re-add previously removed patch
    which caused havoc on MT7621 and add the (still pending) fix.
    
    Fixes: d40691a5fb ("generic: 6.1, 6.6: mt7530: import pending patches")
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 ...30-disable-EEE-abilities-on-failure-on-M.patch} |   0
 ...10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch} |   0
 ...30-rename-p5_intf_sel-and-use-only-for-M.patch} |   0
 ...30-rename-mt753x_bpdu_port_fw-enum-to-mt.patch} |   0
 ...30-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch} |   0
 ...30-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch} |   0
 ...530-move-MT753X_MTRAP-operations-for-MT75.patch | 117 +++++++++++++++++++++
 ...30-return-mt7530_setup_mdio-mt7531_setup.patch} |   4 +-
 ...30-define-MAC-speed-capabilities-per-swi.patch} |   8 +-
 ...-mt7530-get-rid-of-function-sanity-check.patch} |   2 +-
 ...net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch} |   4 +-
 ...30-get-rid-of-mac_port_validate-member-o.patch} |   0
 ...30-use-priv-ds-num_ports-instead-of-MT75.patch} |   8 +-
 ...30-do-not-pass-port-variable-to-mt7531_r.patch} |   4 +-
 ...30-explain-exposing-MDIO-bus-of-MT7531AE.patch} |   2 +-
 ...30-disable-EEE-abilities-on-failure-on-M.patch} |   0
 ...10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch} |   0
 ...30-rename-p5_intf_sel-and-use-only-for-M.patch} |   0
 ...30-rename-mt753x_bpdu_port_fw-enum-to-mt.patch} |   0
 ...30-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch} |   0
 ...30-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch} |   0
 ...530-move-MT753X_MTRAP-operations-for-MT75.patch | 117 +++++++++++++++++++++
 ...30-return-mt7530_setup_mdio-mt7531_setup.patch} |   4 +-
 ...30-define-MAC-speed-capabilities-per-swi.patch} |   8 +-
 ...-mt7530-get-rid-of-function-sanity-check.patch} |   2 +-
 ...net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch} |   4 +-
 ...30-get-rid-of-mac_port_validate-member-o.patch} |   0
 ...30-use-priv-ds-num_ports-instead-of-MT75.patch} |   8 +-
 ...30-do-not-pass-port-variable-to-mt7531_r.patch} |   4 +-
 ...30-explain-exposing-MDIO-bus-of-MT7531AE.patch} |   2 +-
 ...mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch |  79 ++++++++++++++
 ...mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch |  79 ++++++++++++++
 32 files changed, 424 insertions(+), 32 deletions(-)

diff --git a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch b/target/linux/generic/backport-6.1/790-54-v6.10-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
rename to target/linux/generic/backport-6.1/790-54-v6.10-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
diff --git a/target/linux/generic/pending-6.1/795-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch b/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/795-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
rename to target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
diff --git a/target/linux/generic/pending-6.1/795-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch b/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/795-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
rename to target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
diff --git a/target/linux/generic/pending-6.1/795-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch b/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/795-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
rename to target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
diff --git a/target/linux/generic/pending-6.1/795-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch b/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/795-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
rename to target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
diff --git a/target/linux/generic/pending-6.1/795-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch b/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/795-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
rename to target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
diff --git a/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch b/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
new file mode 100644
index 0000000000..e7da939588
--- /dev/null
+++ b/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
@@ -0,0 +1,117 @@
+From 2982f395c9a513b168f1e685588f70013cba2f5f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:14 +0300
+Subject: [PATCH 07/15] net: dsa: mt7530: move MT753X_MTRAP operations for
+ MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On MT7530, the media-independent interfaces of port 5 and 6 are controlled
+by the MT7530_P5_DIS and MT7530_P6_DIS bits of the hardware trap. Deal with
+these bits only when the relevant port is being enabled or disabled. This
+ensures that these ports will be disabled when they are not in use.
+
+Do not set MT7530_CHG_TRAP on mt7530_setup_port5() as that's already being
+done on mt7530_setup().
+
+Instead of globally setting MT7530_P5_MAC_SEL, clear it, then set it only
+on the appropriate case.
+
+If PHY muxing is detected, clear MT7530_P5_DIS before calling
+mt7530_setup_port5().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 38 +++++++++++++++++++++++++++-----------
+ 1 file changed, 27 insertions(+), 11 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -873,8 +873,7 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	val = mt7530_read(priv, MT753X_MTRAP);
+ 
+-	val |= MT7530_CHG_TRAP | MT7530_P5_MAC_SEL | MT7530_P5_DIS;
+-	val &= ~MT7530_P5_RGMII_MODE & ~MT7530_P5_PHY0_SEL;
++	val &= ~MT7530_P5_PHY0_SEL & ~MT7530_P5_MAC_SEL & ~MT7530_P5_RGMII_MODE;
+ 
+ 	switch (priv->p5_mode) {
+ 	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
+@@ -884,15 +883,13 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
+ 	case MUX_PHY_P4:
+-		val &= ~MT7530_P5_MAC_SEL & ~MT7530_P5_DIS;
+-
+ 		/* Setup the MAC by default for the cpu port */
+ 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+ 		break;
+ 
+ 	/* GMAC5: P5 -> SoC MAC or external PHY */
+ 	default:
+-		val &= ~MT7530_P5_DIS;
++		val |= MT7530_P5_MAC_SEL;
+ 		break;
+ 	}
+ 
+@@ -1186,6 +1183,14 @@ mt7530_port_enable(struct dsa_switch *ds
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ 
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return 0;
++
++	if (port == 5)
++		mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
++	else if (port == 6)
++		mt7530_clear(priv, MT753X_MTRAP, MT7530_P6_DIS);
++
+ 	return 0;
+ }
+ 
+@@ -1204,6 +1209,14 @@ mt7530_port_disable(struct dsa_switch *d
+ 		   PCR_MATRIX_CLR);
+ 
+ 	mutex_unlock(&priv->reg_mutex);
++
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return;
++
++	if (port == 5)
++		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
++	else if (port == 6)
++		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
+ }
+ 
+ static int
+@@ -2392,11 +2405,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 		mt7530_rmw(priv, MT7530_TRGMII_RD(i),
+ 			   RD_TAP_MASK, RD_TAP(16));
+ 
+-	/* Enable port 6 */
+-	val = mt7530_read(priv, MT753X_MTRAP);
+-	val &= ~MT7530_P6_DIS & ~MT7530_PHY_INDIRECT_ACCESS;
+-	val |= MT7530_CHG_TRAP;
+-	mt7530_write(priv, MT753X_MTRAP, val);
++	/* Allow modifying the trap and directly access PHY registers via the
++	 * MDIO bus the switch is on.
++	 */
++	mt7530_rmw(priv, MT753X_MTRAP, MT7530_CHG_TRAP |
++		   MT7530_PHY_INDIRECT_ACCESS, MT7530_CHG_TRAP);
+ 
+ 	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
+ 		mt7530_pll_setup(priv);
+@@ -2479,8 +2492,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 			break;
+ 		}
+ 
+-		if (priv->p5_mode == MUX_PHY_P0 || priv->p5_mode == MUX_PHY_P4)
++		if (priv->p5_mode == MUX_PHY_P0 ||
++		    priv->p5_mode == MUX_PHY_P4) {
++			mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
+ 			mt7530_setup_port5(ds, interface);
++		}
+ 	}
+ 
+ #ifdef CONFIG_GPIOLIB
diff --git a/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch b/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
similarity index 90%
rename from target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
rename to target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
index 5624a64599..7cc145327c 100644
--- a/target/linux/generic/pending-6.1/795-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
+++ b/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2642,7 +2642,9 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2658,7 +2658,9 @@ mt7531_setup(struct dsa_switch *ds)
  					 0);
  	}
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	/* Setup VLAN ID 0 for VLAN-unaware bridges */
  	ret = mt7530_setup_vlan0(priv);
-@@ -3001,6 +3003,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3017,6 +3019,8 @@ mt753x_setup(struct dsa_switch *ds)
  	ret = mt7530_setup_mdio(priv);
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
diff --git a/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch b/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
similarity index 90%
rename from target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
rename to target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
index ed7923f9ee..f4d19db274 100644
--- a/target/linux/generic/pending-6.1/795-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
+++ b/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
@@ -24,7 +24,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2660,6 +2660,8 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2676,6 +2676,8 @@ mt7531_setup(struct dsa_switch *ds)
  static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
@@ -33,7 +33,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2691,6 +2693,8 @@ static void mt7531_mac_port_get_caps(str
+@@ -2707,6 +2709,8 @@ static void mt7531_mac_port_get_caps(str
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -42,7 +42,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2730,14 +2734,17 @@ static void mt7988_mac_port_get_caps(str
+@@ -2746,14 +2750,17 @@ static void mt7988_mac_port_get_caps(str
  	case 0 ... 3:
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  config->supported_interfaces);
@@ -62,7 +62,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	}
  }
  
-@@ -2907,9 +2914,7 @@ static void mt753x_phylink_get_caps(stru
+@@ -2923,9 +2930,7 @@ static void mt753x_phylink_get_caps(stru
  {
  	struct mt7530_priv *priv = ds->priv;
  
diff --git a/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch b/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
similarity index 94%
rename from target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
rename to target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
index f674ab7c6b..5bb7756c51 100644
--- a/target/linux/generic/pending-6.1/795-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
+++ b/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3204,13 +3204,6 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3220,13 +3220,6 @@ mt7530_probe_common(struct mt7530_priv *
  	if (!priv->info)
  		return -EINVAL;
  
diff --git a/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch b/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
similarity index 95%
rename from target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
rename to target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
index df7085f89c..f8147b6412 100644
--- a/target/linux/generic/pending-6.6/745-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
+++ b/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3035,10 +3035,10 @@ static int mt753x_get_mac_eee(struct dsa
+@@ -3048,10 +3048,10 @@ static int mt753x_get_mac_eee(struct dsa
  			      struct ethtool_eee *e)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -32,7 +32,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	return 0;
  }
-@@ -3052,11 +3052,11 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3065,11 +3065,11 @@ static int mt753x_set_mac_eee(struct dsa
  	if (e->tx_lpi_timer > 0xFFF)
  		return -EINVAL;
  
diff --git a/target/linux/generic/pending-6.1/795-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch b/target/linux/generic/backport-6.1/790-65-v6.10-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
similarity index 100%
rename from target/linux/generic/pending-6.1/795-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
rename to target/linux/generic/backport-6.1/790-65-v6.10-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
diff --git a/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch b/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
similarity index 89%
rename from target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
rename to target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
index ce75556791..0037f97499 100644
--- a/target/linux/generic/pending-6.1/795-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
+++ b/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1391,7 +1391,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1404,7 +1404,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	mt7530_rmw(priv, MT7530_PPBV1_P(port), G0_PORT_VID_MASK,
  		   G0_PORT_VID_DEF);
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		if (dsa_is_user_port(ds, i) &&
  		    dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
  			all_user_ports_removed = false;
-@@ -2406,7 +2406,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2419,7 +2419,7 @@ mt7530_setup(struct dsa_switch *ds)
  	/* Enable and reset MIB counters */
  	mt7530_mib_reset(ds);
  
@@ -37,7 +37,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2514,7 +2514,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2530,7 +2530,7 @@ mt7531_setup_common(struct dsa_switch *d
  	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
  		     UNU_FFP_MASK);
  
@@ -46,7 +46,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2601,7 +2601,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2617,7 +2617,7 @@ mt7531_setup(struct dsa_switch *ds)
  	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
  
  	/* Force link down on all ports before internal reset */
diff --git a/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch b/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
similarity index 90%
rename from target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
rename to target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
index e12d084c2f..ee8e13ea70 100644
--- a/target/linux/generic/pending-6.1/795-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
+++ b/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2760,7 +2760,7 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2776,7 +2776,7 @@ mt7530_mac_config(struct dsa_switch *ds,
  		mt7530_setup_port6(priv->ds, interface);
  }
  
@@ -26,7 +26,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  			       phy_interface_t interface,
  			       struct phy_device *phydev)
  {
-@@ -2811,7 +2811,7 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2827,7 +2827,7 @@ mt7531_mac_config(struct dsa_switch *ds,
  	if (phy_interface_mode_is_rgmii(interface)) {
  		dp = dsa_to_port(ds, port);
  		phydev = dp->slave->phydev;
diff --git a/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch b/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
similarity index 95%
rename from target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
rename to target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
index 0eaf4fc2e8..666bcb75e8 100644
--- a/target/linux/generic/pending-6.1/795-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
+++ b/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2610,7 +2610,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2626,7 +2626,10 @@ mt7531_setup(struct dsa_switch *ds)
  	if (!priv->p5_sgmii) {
  		mt7531_pll_setup(priv);
  	} else {
diff --git a/target/linux/generic/pending-6.6/745-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch b/target/linux/generic/backport-6.6/790-38-v6.10-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
similarity index 100%
rename from target/linux/generic/pending-6.6/745-01-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
rename to target/linux/generic/backport-6.6/790-38-v6.10-net-dsa-mt7530-disable-EEE-abilities-on-failure-on-M.patch
diff --git a/target/linux/generic/pending-6.6/745-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch b/target/linux/generic/backport-6.6/790-39-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
similarity index 100%
rename from target/linux/generic/pending-6.6/745-02-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
rename to target/linux/generic/backport-6.6/790-39-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
diff --git a/target/linux/generic/pending-6.6/745-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch b/target/linux/generic/backport-6.6/790-40-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
similarity index 100%
rename from target/linux/generic/pending-6.6/745-03-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
rename to target/linux/generic/backport-6.6/790-40-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
diff --git a/target/linux/generic/pending-6.6/745-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch b/target/linux/generic/backport-6.6/790-41-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
similarity index 100%
rename from target/linux/generic/pending-6.6/745-04-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
rename to target/linux/generic/backport-6.6/790-41-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
diff --git a/target/linux/generic/pending-6.6/745-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch b/target/linux/generic/backport-6.6/790-42-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
similarity index 100%
rename from target/linux/generic/pending-6.6/745-05-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
rename to target/linux/generic/backport-6.6/790-42-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
diff --git a/target/linux/generic/pending-6.6/745-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch b/target/linux/generic/backport-6.6/790-43-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
similarity index 100%
rename from target/linux/generic/pending-6.6/745-06-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
rename to target/linux/generic/backport-6.6/790-43-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
diff --git a/target/linux/generic/backport-6.6/790-44-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch b/target/linux/generic/backport-6.6/790-44-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
new file mode 100644
index 0000000000..f7802c02db
--- /dev/null
+++ b/target/linux/generic/backport-6.6/790-44-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
@@ -0,0 +1,117 @@
+From 2982f395c9a513b168f1e685588f70013cba2f5f Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
+Date: Mon, 22 Apr 2024 10:15:14 +0300
+Subject: [PATCH 07/15] net: dsa: mt7530: move MT753X_MTRAP operations for
+ MT7530
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+On MT7530, the media-independent interfaces of port 5 and 6 are controlled
+by the MT7530_P5_DIS and MT7530_P6_DIS bits of the hardware trap. Deal with
+these bits only when the relevant port is being enabled or disabled. This
+ensures that these ports will be disabled when they are not in use.
+
+Do not set MT7530_CHG_TRAP on mt7530_setup_port5() as that's already being
+done on mt7530_setup().
+
+Instead of globally setting MT7530_P5_MAC_SEL, clear it, then set it only
+on the appropriate case.
+
+If PHY muxing is detected, clear MT7530_P5_DIS before calling
+mt7530_setup_port5().
+
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+ drivers/net/dsa/mt7530.c | 38 +++++++++++++++++++++++++++-----------
+ 1 file changed, 27 insertions(+), 11 deletions(-)
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -880,8 +880,7 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	val = mt7530_read(priv, MT753X_MTRAP);
+ 
+-	val |= MT7530_CHG_TRAP | MT7530_P5_MAC_SEL | MT7530_P5_DIS;
+-	val &= ~MT7530_P5_RGMII_MODE & ~MT7530_P5_PHY0_SEL;
++	val &= ~MT7530_P5_PHY0_SEL & ~MT7530_P5_MAC_SEL & ~MT7530_P5_RGMII_MODE;
+ 
+ 	switch (priv->p5_mode) {
+ 	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
+@@ -891,15 +890,13 @@ static void mt7530_setup_port5(struct ds
+ 
+ 	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
+ 	case MUX_PHY_P4:
+-		val &= ~MT7530_P5_MAC_SEL & ~MT7530_P5_DIS;
+-
+ 		/* Setup the MAC by default for the cpu port */
+ 		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
+ 		break;
+ 
+ 	/* GMAC5: P5 -> SoC MAC or external PHY */
+ 	default:
+-		val &= ~MT7530_P5_DIS;
++		val |= MT7530_P5_MAC_SEL;
+ 		break;
+ 	}
+ 
+@@ -1193,6 +1190,14 @@ mt7530_port_enable(struct dsa_switch *ds
+ 
+ 	mutex_unlock(&priv->reg_mutex);
+ 
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return 0;
++
++	if (port == 5)
++		mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
++	else if (port == 6)
++		mt7530_clear(priv, MT753X_MTRAP, MT7530_P6_DIS);
++
+ 	return 0;
+ }
+ 
+@@ -1211,6 +1216,14 @@ mt7530_port_disable(struct dsa_switch *d
+ 		   PCR_MATRIX_CLR);
+ 
+ 	mutex_unlock(&priv->reg_mutex);
++
++	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
++		return;
++
++	if (port == 5)
++		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
++	else if (port == 6)
++		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
+ }
+ 
+ static int
+@@ -2401,11 +2414,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 		mt7530_rmw(priv, MT7530_TRGMII_RD(i),
+ 			   RD_TAP_MASK, RD_TAP(16));
+ 
+-	/* Enable port 6 */
+-	val = mt7530_read(priv, MT753X_MTRAP);
+-	val &= ~MT7530_P6_DIS & ~MT7530_PHY_INDIRECT_ACCESS;
+-	val |= MT7530_CHG_TRAP;
+-	mt7530_write(priv, MT753X_MTRAP, val);
++	/* Allow modifying the trap and directly access PHY registers via the
++	 * MDIO bus the switch is on.
++	 */
++	mt7530_rmw(priv, MT753X_MTRAP, MT7530_CHG_TRAP |
++		   MT7530_PHY_INDIRECT_ACCESS, MT7530_CHG_TRAP);
+ 
+ 	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
+ 		mt7530_pll_setup(priv);
+@@ -2488,8 +2501,11 @@ mt7530_setup(struct dsa_switch *ds)
+ 			break;
+ 		}
+ 
+-		if (priv->p5_mode == MUX_PHY_P0 || priv->p5_mode == MUX_PHY_P4)
++		if (priv->p5_mode == MUX_PHY_P0 ||
++		    priv->p5_mode == MUX_PHY_P4) {
++			mt7530_clear(priv, MT753X_MTRAP, MT7530_P5_DIS);
+ 			mt7530_setup_port5(ds, interface);
++		}
+ 	}
+ 
+ #ifdef CONFIG_GPIOLIB
diff --git a/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch b/target/linux/generic/backport-6.6/790-45-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
similarity index 90%
rename from target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
rename to target/linux/generic/backport-6.6/790-45-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
index 3d16bf75d2..2eaa77c8cf 100644
--- a/target/linux/generic/pending-6.6/745-08-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
+++ b/target/linux/generic/backport-6.6/790-45-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2651,7 +2651,9 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2667,7 +2667,9 @@ mt7531_setup(struct dsa_switch *ds)
  					 0);
  	}
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	/* Setup VLAN ID 0 for VLAN-unaware bridges */
  	ret = mt7530_setup_vlan0(priv);
-@@ -3004,6 +3006,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3020,6 +3022,8 @@ mt753x_setup(struct dsa_switch *ds)
  	ret = mt7530_setup_mdio(priv);
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
diff --git a/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch b/target/linux/generic/backport-6.6/790-46-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
similarity index 90%
rename from target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
rename to target/linux/generic/backport-6.6/790-46-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
index 4e89bb2464..9a592c759d 100644
--- a/target/linux/generic/pending-6.6/745-09-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
+++ b/target/linux/generic/backport-6.6/790-46-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
@@ -24,7 +24,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2669,6 +2669,8 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2685,6 +2685,8 @@ mt7531_setup(struct dsa_switch *ds)
  static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
@@ -33,7 +33,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2700,6 +2702,8 @@ static void mt7531_mac_port_get_caps(str
+@@ -2716,6 +2718,8 @@ static void mt7531_mac_port_get_caps(str
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -42,7 +42,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2739,14 +2743,17 @@ static void mt7988_mac_port_get_caps(str
+@@ -2755,14 +2759,17 @@ static void mt7988_mac_port_get_caps(str
  	case 0 ... 3:
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  config->supported_interfaces);
@@ -62,7 +62,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	}
  }
  
-@@ -2916,9 +2923,7 @@ static void mt753x_phylink_get_caps(stru
+@@ -2932,9 +2939,7 @@ static void mt753x_phylink_get_caps(stru
  {
  	struct mt7530_priv *priv = ds->priv;
  
diff --git a/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch b/target/linux/generic/backport-6.6/790-47-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
similarity index 94%
rename from target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
rename to target/linux/generic/backport-6.6/790-47-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
index df43224c47..bc84ecb778 100644
--- a/target/linux/generic/pending-6.6/745-10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
+++ b/target/linux/generic/backport-6.6/790-47-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3216,13 +3216,6 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3232,13 +3232,6 @@ mt7530_probe_common(struct mt7530_priv *
  	if (!priv->info)
  		return -EINVAL;
  
diff --git a/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch b/target/linux/generic/backport-6.6/790-48-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
similarity index 95%
rename from target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
rename to target/linux/generic/backport-6.6/790-48-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
index b1d08a74e3..e75db9ba30 100644
--- a/target/linux/generic/pending-6.1/795-11-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
+++ b/target/linux/generic/backport-6.6/790-48-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3032,10 +3032,10 @@ static int mt753x_get_mac_eee(struct dsa
+@@ -3051,10 +3051,10 @@ static int mt753x_get_mac_eee(struct dsa
  			      struct ethtool_eee *e)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -32,7 +32,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	return 0;
  }
-@@ -3049,11 +3049,11 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3068,11 +3068,11 @@ static int mt753x_set_mac_eee(struct dsa
  	if (e->tx_lpi_timer > 0xFFF)
  		return -EINVAL;
  
diff --git a/target/linux/generic/pending-6.6/745-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch b/target/linux/generic/backport-6.6/790-49-v6.10-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
similarity index 100%
rename from target/linux/generic/pending-6.6/745-12-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
rename to target/linux/generic/backport-6.6/790-49-v6.10-net-dsa-mt7530-get-rid-of-mac_port_validate-member-o.patch
diff --git a/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch b/target/linux/generic/backport-6.6/790-50-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
similarity index 89%
rename from target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
rename to target/linux/generic/backport-6.6/790-50-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
index d1f692f73a..f63d4d7705 100644
--- a/target/linux/generic/pending-6.6/745-13-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
+++ b/target/linux/generic/backport-6.6/790-50-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1398,7 +1398,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1411,7 +1411,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	mt7530_rmw(priv, MT7530_PPBV1_P(port), G0_PORT_VID_MASK,
  		   G0_PORT_VID_DEF);
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		if (dsa_is_user_port(ds, i) &&
  		    dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
  			all_user_ports_removed = false;
-@@ -2415,7 +2415,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2428,7 +2428,7 @@ mt7530_setup(struct dsa_switch *ds)
  	/* Enable and reset MIB counters */
  	mt7530_mib_reset(ds);
  
@@ -37,7 +37,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2523,7 +2523,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2539,7 +2539,7 @@ mt7531_setup_common(struct dsa_switch *d
  	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
  		     UNU_FFP_MASK);
  
@@ -46,7 +46,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2610,7 +2610,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2626,7 +2626,7 @@ mt7531_setup(struct dsa_switch *ds)
  	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
  
  	/* Force link down on all ports before internal reset */
diff --git a/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch b/target/linux/generic/backport-6.6/790-51-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
similarity index 90%
rename from target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
rename to target/linux/generic/backport-6.6/790-51-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
index 32919df0f2..9ba12b1269 100644
--- a/target/linux/generic/pending-6.6/745-14-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
+++ b/target/linux/generic/backport-6.6/790-51-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2769,7 +2769,7 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2785,7 +2785,7 @@ mt7530_mac_config(struct dsa_switch *ds,
  		mt7530_setup_port6(priv->ds, interface);
  }
  
@@ -26,7 +26,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  			       phy_interface_t interface,
  			       struct phy_device *phydev)
  {
-@@ -2820,7 +2820,7 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2836,7 +2836,7 @@ mt7531_mac_config(struct dsa_switch *ds,
  	if (phy_interface_mode_is_rgmii(interface)) {
  		dp = dsa_to_port(ds, port);
  		phydev = dp->slave->phydev;
diff --git a/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch b/target/linux/generic/backport-6.6/790-52-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
similarity index 95%
rename from target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
rename to target/linux/generic/backport-6.6/790-52-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
index 22cc625af8..58c3e0bc3c 100644
--- a/target/linux/generic/pending-6.6/745-15-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
+++ b/target/linux/generic/backport-6.6/790-52-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2619,7 +2619,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2635,7 +2635,10 @@ mt7531_setup(struct dsa_switch *ds)
  	if (!priv->p5_sgmii) {
  		mt7531_pll_setup(priv);
  	} else {
diff --git a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
new file mode 100644
index 0000000000..da3fd7cbe1
--- /dev/null
+++ b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
@@ -0,0 +1,79 @@
+From patchwork Sat Apr 27 11:24:42 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
+ <devnull+arinc.unal.arinc9.com at kernel.org>
+X-Patchwork-Id: 13645655
+From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
+ <devnull+arinc.unal.arinc9.com at kernel.org>
+Date: Sat, 27 Apr 2024 14:24:42 +0300
+Subject: [PATCH net-next] net: dsa: mt7530: do not set MT7530_P5_DIS when
+ PHY muxing is being used
+Precedence: bulk
+X-Mailing-List: netdev at vger.kernel.org
+List-Id: <netdev.vger.kernel.org>
+List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
+List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
+MIME-Version: 1.0
+Message-Id: 
+ <20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v1-1-793cdf9d7707 at arinc9.com>
+To: Daniel Golle <daniel at makrotopia.org>, DENG Qingfang <dqfext at gmail.com>,
+ Sean Wang <sean.wang at mediatek.com>, Andrew Lunn <andrew at lunn.ch>,
+ Florian Fainelli <f.fainelli at gmail.com>,
+ Vladimir Oltean <olteanv at gmail.com>,
+ "David S. Miller" <davem at davemloft.net>, Eric Dumazet <edumazet at google.com>,
+ Jakub Kicinski <kuba at kernel.org>, Paolo Abeni <pabeni at redhat.com>,
+ Matthias Brugger <matthias.bgg at gmail.com>,
+ AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Cc: netdev at vger.kernel.org, linux-kernel at vger.kernel.org,
+  linux-arm-kernel at lists.infradead.org, linux-mediatek at lists.infradead.org,
+	=?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
+X-Mailer: b4 0.13.0
+X-Patchwork-Delegate: kuba at kernel.org
+
+From: Ar?n? ?NAL <arinc.unal at arinc9.com>
+
+When the PHY muxing feature is in use, port 5 won't be defined in the
+device tree. Because of this, the type member of the dsa_port structure for
+this port will be assigned DSA_PORT_TYPE_UNUSED. The dsa_port_setup()
+function calls ds->ops->port_disable() when the port type is
+DSA_PORT_TYPE_UNUSED.
+
+The MT7530_P5_DIS bit is unset when PHY muxing is being used.
+mt7530_port_disable() which is assigned to ds->ops->port_disable() is
+called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
+which breaks network connectivity when PHY muxing is being used.
+
+Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
+
+Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
+Reported-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+Hello.
+
+I've sent this to net-next as the patch it fixes is on the current
+development cycle.
+---
+ drivers/net/dsa/mt7530.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+
+---
+base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
+change-id: 20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-7ff5fd0995d7
+
+Best regards,
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1213,7 +1213,7 @@ mt7530_port_disable(struct dsa_switch *d
+ 	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
+ 		return;
+ 
+-	if (port == 5)
++	if (port == 5 && priv->p5_mode == GMAC5)
+ 		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
+ 	else if (port == 6)
+ 		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);
diff --git a/target/linux/generic/pending-6.6/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch b/target/linux/generic/pending-6.6/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
new file mode 100644
index 0000000000..286c96e43b
--- /dev/null
+++ b/target/linux/generic/pending-6.6/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
@@ -0,0 +1,79 @@
+From patchwork Sat Apr 27 11:24:42 2024
+Content-Type: text/plain; charset="utf-8"
+MIME-Version: 1.0
+Content-Transfer-Encoding: 8bit
+X-Patchwork-Submitter: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
+ <devnull+arinc.unal.arinc9.com at kernel.org>
+X-Patchwork-Id: 13645655
+From: =?utf-8?b?QXLEsW7DpyDDnE5BTCB2aWEgQjQgUmVsYXk=?=
+ <devnull+arinc.unal.arinc9.com at kernel.org>
+Date: Sat, 27 Apr 2024 14:24:42 +0300
+Subject: [PATCH net-next] net: dsa: mt7530: do not set MT7530_P5_DIS when
+ PHY muxing is being used
+Precedence: bulk
+X-Mailing-List: netdev at vger.kernel.org
+List-Id: <netdev.vger.kernel.org>
+List-Subscribe: <mailto:netdev+subscribe at vger.kernel.org>
+List-Unsubscribe: <mailto:netdev+unsubscribe at vger.kernel.org>
+MIME-Version: 1.0
+Message-Id: 
+ <20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-v1-1-793cdf9d7707 at arinc9.com>
+To: Daniel Golle <daniel at makrotopia.org>, DENG Qingfang <dqfext at gmail.com>,
+ Sean Wang <sean.wang at mediatek.com>, Andrew Lunn <andrew at lunn.ch>,
+ Florian Fainelli <f.fainelli at gmail.com>,
+ Vladimir Oltean <olteanv at gmail.com>,
+ "David S. Miller" <davem at davemloft.net>, Eric Dumazet <edumazet at google.com>,
+ Jakub Kicinski <kuba at kernel.org>, Paolo Abeni <pabeni at redhat.com>,
+ Matthias Brugger <matthias.bgg at gmail.com>,
+ AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
+Cc: netdev at vger.kernel.org, linux-kernel at vger.kernel.org,
+  linux-arm-kernel at lists.infradead.org, linux-mediatek at lists.infradead.org,
+	=?utf-8?b?QXLEsW7DpyDDnE5BTA==?= <arinc.unal at arinc9.com>
+X-Mailer: b4 0.13.0
+X-Patchwork-Delegate: kuba at kernel.org
+
+From: Ar?n? ?NAL <arinc.unal at arinc9.com>
+
+When the PHY muxing feature is in use, port 5 won't be defined in the
+device tree. Because of this, the type member of the dsa_port structure for
+this port will be assigned DSA_PORT_TYPE_UNUSED. The dsa_port_setup()
+function calls ds->ops->port_disable() when the port type is
+DSA_PORT_TYPE_UNUSED.
+
+The MT7530_P5_DIS bit is unset when PHY muxing is being used.
+mt7530_port_disable() which is assigned to ds->ops->port_disable() is
+called afterwards. Currently, mt7530_port_disable() sets MT7530_P5_DIS
+which breaks network connectivity when PHY muxing is being used.
+
+Therefore, do not set MT7530_P5_DIS when PHY muxing is being used.
+
+Fixes: 377174c5760c ("net: dsa: mt7530: move MT753X_MTRAP operations for MT7530")
+Reported-by: Daniel Golle <daniel at makrotopia.org>
+Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
+---
+Hello.
+
+I've sent this to net-next as the patch it fixes is on the current
+development cycle.
+---
+ drivers/net/dsa/mt7530.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+
+---
+base-commit: 5c4c0edca68a5841a8d53ccd49596fe199c8334c
+change-id: 20240427-for-netnext-mt7530-do-not-disable-port5-when-phy-muxing-7ff5fd0995d7
+
+Best regards,
+
+--- a/drivers/net/dsa/mt7530.c
++++ b/drivers/net/dsa/mt7530.c
+@@ -1220,7 +1220,7 @@ mt7530_port_disable(struct dsa_switch *d
+ 	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
+ 		return;
+ 
+-	if (port == 5)
++	if (port == 5 && priv->p5_mode == GMAC5)
+ 		mt7530_set(priv, MT753X_MTRAP, MT7530_P5_DIS);
+ 	else if (port == 6)
+ 		mt7530_set(priv, MT753X_MTRAP, MT7530_P6_DIS);



From lede-commits at lists.infradead.org  Sat Apr 27 11:33:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 14:33:57 -0400
Subject: [openwrt/openwrt]  kernel: fix crash with multicast-to-unicast and
 fraglist GRO
In-Reply-To: <171424283783.1099567.4282352427467884811@git-01.infra.openwrt.org>
References: <171424283783.1099567.4282352427467884811@git-01.infra.openwrt.org>
Message-ID: <mailman.31528.1714242854.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/45a8e962a591dfcac252b0de6324319abd080469

commit 45a8e962a591dfcac252b0de6324319abd080469
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Apr 27 20:32:59 2024 +0200

    kernel: fix crash with multicast-to-unicast and fraglist GRO
    
    Avoid calls to skb_copy, which creates invalid packets that cause a crash
    on segmentation
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 ...fix-multicast-to-unicast-with-fraglist-GS.patch | 23 +++++++++
 ...ject-skb_copy-_expand-for-fraglist-GSO-sk.patch | 59 ++++++++++++++++++++++
 ...fix-multicast-to-unicast-with-fraglist-GS.patch | 23 +++++++++
 ...ject-skb_copy-_expand-for-fraglist-GSO-sk.patch | 59 ++++++++++++++++++++++
 4 files changed, 164 insertions(+)

diff --git a/target/linux/generic/pending-6.1/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch b/target/linux/generic/pending-6.1/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
new file mode 100644
index 0000000000..6a53a678d8
--- /dev/null
+++ b/target/linux/generic/pending-6.1/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
@@ -0,0 +1,23 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sat, 27 Apr 2024 18:54:25 +0200
+Subject: [PATCH] net: bridge: fix multicast-to-unicast with fraglist GSO
+
+Calling skb_copy on a SKB_GSO_FRAGLIST skb is not valid, since it returns
+an invalid linearized skb. This code only needs to change the ethernet
+header, so pskb_copy is the right function to call here.
+
+Fixes: 6db6f0eae605 ("bridge: multicast to unicast")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
+@@ -261,7 +261,7 @@ static void maybe_deliver_addr(struct ne
+ 	if (skb->dev == p->dev && ether_addr_equal(src, addr))
+ 		return;
+ 
+-	skb = skb_copy(skb, GFP_ATOMIC);
++	skb = pskb_copy(skb, GFP_ATOMIC);
+ 	if (!skb) {
+ 		DEV_STATS_INC(dev, tx_dropped);
+ 		return;
diff --git a/target/linux/generic/pending-6.1/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch b/target/linux/generic/pending-6.1/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
new file mode 100644
index 0000000000..719cac9bcf
--- /dev/null
+++ b/target/linux/generic/pending-6.1/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
@@ -0,0 +1,59 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sat, 27 Apr 2024 19:29:45 +0200
+Subject: [PATCH] net: core: reject skb_copy(_expand) for fraglist GSO skbs
+
+SKB_GSO_FRAGLIST skbs must not be linearized, otherwise they become
+invalid. Return NULL if such an skb is passed to skb_copy or
+skb_copy_expand, in order to prevent a crash on a potential later
+call to skb_gso_segment.
+
+Fixes: 3a1296a38d0c ("net: Support GRO/GSO fraglist chaining.")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -1720,11 +1720,17 @@ static inline int skb_alloc_rx_flag(cons
+ 
+ struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
+ {
+-	int headerlen = skb_headroom(skb);
+-	unsigned int size = skb_end_offset(skb) + skb->data_len;
+-	struct sk_buff *n = __alloc_skb(size, gfp_mask,
+-					skb_alloc_rx_flag(skb), NUMA_NO_NODE);
++	struct sk_buff *n;
++	unsigned int size;
++	int headerlen;
+ 
++	if (WARN_ON_ONCE(skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST))
++		return NULL;
++
++	headerlen = skb_headroom(skb);
++	size = skb_end_offset(skb) + skb->data_len;
++	n = __alloc_skb(size, gfp_mask,
++			skb_alloc_rx_flag(skb), NUMA_NO_NODE);
+ 	if (!n)
+ 		return NULL;
+ 
+@@ -2037,12 +2043,17 @@ struct sk_buff *skb_copy_expand(const st
+ 	/*
+ 	 *	Allocate the copy buffer
+ 	 */
+-	struct sk_buff *n = __alloc_skb(newheadroom + skb->len + newtailroom,
+-					gfp_mask, skb_alloc_rx_flag(skb),
+-					NUMA_NO_NODE);
+-	int oldheadroom = skb_headroom(skb);
+ 	int head_copy_len, head_copy_off;
++	struct sk_buff *n;
++	int oldheadroom;
++
++	if (WARN_ON_ONCE(skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST))
++		return NULL;
+ 
++	oldheadroom = skb_headroom(skb);
++	n = __alloc_skb(newheadroom + skb->len + newtailroom,
++			gfp_mask, skb_alloc_rx_flag(skb),
++			NUMA_NO_NODE);
+ 	if (!n)
+ 		return NULL;
+ 
diff --git a/target/linux/generic/pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch b/target/linux/generic/pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
new file mode 100644
index 0000000000..8361bb16a3
--- /dev/null
+++ b/target/linux/generic/pending-6.6/681-net-bridge-fix-multicast-to-unicast-with-fraglist-GS.patch
@@ -0,0 +1,23 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sat, 27 Apr 2024 18:54:25 +0200
+Subject: [PATCH] net: bridge: fix multicast-to-unicast with fraglist GSO
+
+Calling skb_copy on a SKB_GSO_FRAGLIST skb is not valid, since it returns
+an invalid linearized skb. This code only needs to change the ethernet
+header, so pskb_copy is the right function to call here.
+
+Fixes: 6db6f0eae605 ("bridge: multicast to unicast")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/bridge/br_forward.c
++++ b/net/bridge/br_forward.c
+@@ -266,7 +266,7 @@ static void maybe_deliver_addr(struct ne
+ 	if (skb->dev == p->dev && ether_addr_equal(src, addr))
+ 		return;
+ 
+-	skb = skb_copy(skb, GFP_ATOMIC);
++	skb = pskb_copy(skb, GFP_ATOMIC);
+ 	if (!skb) {
+ 		DEV_STATS_INC(dev, tx_dropped);
+ 		return;
diff --git a/target/linux/generic/pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch b/target/linux/generic/pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
new file mode 100644
index 0000000000..215b4756ac
--- /dev/null
+++ b/target/linux/generic/pending-6.6/682-net-core-reject-skb_copy-_expand-for-fraglist-GSO-sk.patch
@@ -0,0 +1,59 @@
+From: Felix Fietkau <nbd at nbd.name>
+Date: Sat, 27 Apr 2024 19:29:45 +0200
+Subject: [PATCH] net: core: reject skb_copy(_expand) for fraglist GSO skbs
+
+SKB_GSO_FRAGLIST skbs must not be linearized, otherwise they become
+invalid. Return NULL if such an skb is passed to skb_copy or
+skb_copy_expand, in order to prevent a crash on a potential later
+call to skb_gso_segment.
+
+Fixes: 3a1296a38d0c ("net: Support GRO/GSO fraglist chaining.")
+Signed-off-by: Felix Fietkau <nbd at nbd.name>
+---
+
+--- a/net/core/skbuff.c
++++ b/net/core/skbuff.c
+@@ -1971,11 +1971,17 @@ static inline int skb_alloc_rx_flag(cons
+ 
+ struct sk_buff *skb_copy(const struct sk_buff *skb, gfp_t gfp_mask)
+ {
+-	int headerlen = skb_headroom(skb);
+-	unsigned int size = skb_end_offset(skb) + skb->data_len;
+-	struct sk_buff *n = __alloc_skb(size, gfp_mask,
+-					skb_alloc_rx_flag(skb), NUMA_NO_NODE);
++	struct sk_buff *n;
++	unsigned int size;
++	int headerlen;
+ 
++	if (WARN_ON_ONCE(skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST))
++		return NULL;
++
++	headerlen = skb_headroom(skb);
++	size = skb_end_offset(skb) + skb->data_len;
++	n = __alloc_skb(size, gfp_mask,
++			skb_alloc_rx_flag(skb), NUMA_NO_NODE);
+ 	if (!n)
+ 		return NULL;
+ 
+@@ -2303,12 +2309,17 @@ struct sk_buff *skb_copy_expand(const st
+ 	/*
+ 	 *	Allocate the copy buffer
+ 	 */
+-	struct sk_buff *n = __alloc_skb(newheadroom + skb->len + newtailroom,
+-					gfp_mask, skb_alloc_rx_flag(skb),
+-					NUMA_NO_NODE);
+-	int oldheadroom = skb_headroom(skb);
+ 	int head_copy_len, head_copy_off;
++	struct sk_buff *n;
++	int oldheadroom;
++
++	if (WARN_ON_ONCE(skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST))
++		return NULL;
+ 
++	oldheadroom = skb_headroom(skb);
++	n = __alloc_skb(newheadroom + skb->len + newtailroom,
++			gfp_mask, skb_alloc_rx_flag(skb),
++			NUMA_NO_NODE);
+ 	if (!n)
+ 		return NULL;
+ 



From lede-commits at lists.infradead.org  Sat Apr 27 11:39:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 14:39:16 -0400
Subject: [openwrt/openwrt]  kernel: update fraglist GRO patch to the latest
 upstream submission
In-Reply-To: <171424315674.1126472.2331712526416967263@git-01.infra.openwrt.org>
References: <171424315674.1126472.2331712526416967263@git-01.infra.openwrt.org>
Message-ID: <mailman.31529.1714243161.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7116d2f2b093559516a59a8c5037d3580f04534c

commit 7116d2f2b093559516a59a8c5037d3580f04534c
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Apr 27 20:34:53 2024 +0200

    kernel: update fraglist GRO patch to the latest upstream submission
    
    Cosmetic fixes + IPv6 NAT support
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../patches-6.1/900-unaligned_access_hacks.patch   |   8 +-
 .../680-net-add-TCP-fraglist-GRO-support.patch     | 135 +++++++++++++++------
 .../680-net-add-TCP-fraglist-GRO-support.patch     | 135 +++++++++++++++------
 3 files changed, 206 insertions(+), 72 deletions(-)

diff --git a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
index da56bc306d..2763b16bf5 100644
--- a/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
+++ b/target/linux/ath79/patches-6.1/900-unaligned_access_hacks.patch
@@ -858,16 +858,16 @@ SVN-Revision: 35130
  
 --- a/net/ipv4/tcp_offload.c
 +++ b/net/ipv4/tcp_offload.c
-@@ -60,7 +60,7 @@ static struct sk_buff *__tcpv4_gso_segme
+@@ -62,7 +62,7 @@ static struct sk_buff *__tcpv4_gso_segme
  	th2 = tcp_hdr(seg->next);
  	iph2 = ip_hdr(seg->next);
  
--	if (!(*(u32 *)&th->source ^ *(u32 *)&th2->source) &&
+-	if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) &&
 +	if (!(net_hdr_word(&th->source) ^ net_hdr_word(&th2->source)) &&
  	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
  		return segs;
  
-@@ -252,7 +252,7 @@ struct sk_buff *tcp_gro_lookup(struct li
+@@ -254,7 +254,7 @@ struct sk_buff *tcp_gro_lookup(struct li
  			continue;
  
  		th2 = tcp_hdr(p);
@@ -876,7 +876,7 @@ SVN-Revision: 35130
  			NAPI_GRO_CB(p)->same_flow = 0;
  			continue;
  		}
-@@ -318,8 +318,8 @@ struct sk_buff *tcp_gro_receive(struct l
+@@ -320,8 +320,8 @@ struct sk_buff *tcp_gro_receive(struct l
  		  ~(TCP_FLAG_CWR | TCP_FLAG_FIN | TCP_FLAG_PSH));
  	flush |= (__force int)(th->ack_seq ^ th2->ack_seq);
  	for (i = sizeof(*th); i < thlen; i += 4)
diff --git a/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch b/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch
index 13043729c3..841c0de3e1 100644
--- a/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch
+++ b/target/linux/generic/pending-6.1/680-net-add-TCP-fraglist-GRO-support.patch
@@ -130,36 +130,38 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  {
 --- a/net/ipv4/tcp_offload.c
 +++ b/net/ipv4/tcp_offload.c
-@@ -27,6 +27,68 @@ static void tcp_gso_tstamp(struct sk_buf
+@@ -27,6 +27,70 @@ static void tcp_gso_tstamp(struct sk_buf
  	}
  }
  
 +static void __tcpv4_gso_segment_csum(struct sk_buff *seg,
-+				     __be32 *oldip, __be32 *newip,
-+				     __be16 *oldport, __be16 *newport)
++				     __be32 *oldip, __be32 newip,
++				     __be16 *oldport, __be16 newport)
 +{
 +	struct tcphdr *th;
 +	struct iphdr *iph;
 +
-+	if (*oldip == *newip && *oldport == *newport)
++	if (*oldip == newip && *oldport == newport)
 +		return;
 +
 +	th = tcp_hdr(seg);
 +	iph = ip_hdr(seg);
 +
-+	inet_proto_csum_replace4(&th->check, seg, *oldip, *newip, true);
-+	inet_proto_csum_replace2(&th->check, seg, *oldport, *newport, false);
-+	*oldport = *newport;
++	inet_proto_csum_replace4(&th->check, seg, *oldip, newip, true);
++	inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false);
++	*oldport = newport;
 +
-+	csum_replace4(&iph->check, *oldip, *newip);
-+	*oldip = *newip;
++	csum_replace4(&iph->check, *oldip, newip);
++	*oldip = newip;
 +}
 +
 +static struct sk_buff *__tcpv4_gso_segment_list_csum(struct sk_buff *segs)
 +{
++	const struct tcphdr *th;
++	const struct iphdr *iph;
 +	struct sk_buff *seg;
-+	struct tcphdr *th, *th2;
-+	struct iphdr *iph, *iph2;
++	struct tcphdr *th2;
++	struct iphdr *iph2;
 +
 +	seg = segs;
 +	th = tcp_hdr(seg);
@@ -167,7 +169,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +	th2 = tcp_hdr(seg->next);
 +	iph2 = ip_hdr(seg->next);
 +
-+	if (!(*(u32 *)&th->source ^ *(u32 *)&th2->source) &&
++	if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) &&
 +	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
 +		return segs;
 +
@@ -176,11 +178,11 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +		iph2 = ip_hdr(seg);
 +
 +		__tcpv4_gso_segment_csum(seg,
-+					 &iph2->saddr, &iph->saddr,
-+					 &th2->source, &th->source);
++					 &iph2->saddr, iph->saddr,
++					 &th2->source, th->source);
 +		__tcpv4_gso_segment_csum(seg,
-+					 &iph2->daddr, &iph->daddr,
-+					 &th2->dest, &th->dest);
++					 &iph2->daddr, iph->daddr,
++					 &th2->dest, th->dest);
 +	}
 +
 +	return segs;
@@ -199,7 +201,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  static struct sk_buff *tcp4_gso_segment(struct sk_buff *skb,
  					netdev_features_t features)
  {
-@@ -36,6 +98,9 @@ static struct sk_buff *tcp4_gso_segment(
+@@ -36,6 +100,9 @@ static struct sk_buff *tcp4_gso_segment(
  	if (!pskb_may_pull(skb, sizeof(struct tcphdr)))
  		return ERR_PTR(-EINVAL);
  
@@ -209,7 +211,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
  		const struct iphdr *iph = ip_hdr(skb);
  		struct tcphdr *th = tcp_hdr(skb);
-@@ -177,61 +242,76 @@ out:
+@@ -177,61 +244,76 @@ out:
  	return segs;
  }
  
@@ -316,15 +318,14 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	flush = NAPI_GRO_CB(p)->flush;
  	flush |= (__force int)(flags & TCP_FLAG_CWR);
  	flush |= (__force int)((flags ^ tcp_flag_word(th2)) &
-@@ -268,6 +348,19 @@ found:
+@@ -268,6 +350,18 @@ found:
  	flush |= p->decrypted ^ skb->decrypted;
  #endif
  
-+	if (NAPI_GRO_CB(p)->is_flist) {
++	if (unlikely(NAPI_GRO_CB(p)->is_flist)) {
 +		flush |= (__force int)(flags ^ tcp_flag_word(th2));
 +		flush |= skb->ip_summed != p->ip_summed;
 +		flush |= skb->csum_level != p->csum_level;
-+		flush |= !pskb_may_pull(skb, skb_gro_offset(skb));
 +		flush |= NAPI_GRO_CB(p)->count >= 64;
 +
 +		if (flush || skb_gro_receive_list(p, skb))
@@ -336,7 +337,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flush || skb_gro_receive(p, skb)) {
  		mss = 1;
  		goto out_check_final;
-@@ -289,7 +382,6 @@ out_check_final:
+@@ -289,7 +383,6 @@ out_check_final:
  	if (p && (!NAPI_GRO_CB(skb)->same_flow || flush))
  		pp = p;
  
@@ -344,17 +345,17 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	NAPI_GRO_CB(skb)->flush |= (flush != 0);
  
  	return pp;
-@@ -315,18 +407,56 @@ int tcp_gro_complete(struct sk_buff *skb
+@@ -315,18 +408,58 @@ int tcp_gro_complete(struct sk_buff *skb
  }
  EXPORT_SYMBOL(tcp_gro_complete);
  
 +static void tcp4_check_fraglist_gro(struct list_head *head, struct sk_buff *skb,
 +				    struct tcphdr *th)
 +{
-+	const struct iphdr *iph = skb_gro_network_header(skb);
-+	struct net *net = dev_net(skb->dev);
++	const struct iphdr *iph;
 +	struct sk_buff *p;
 +	struct sock *sk;
++	struct net *net;
 +	int iif, sdif;
 +
 +	if (!(skb->dev->features & NETIF_F_GRO_FRAGLIST))
@@ -367,6 +368,8 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +	}
 +
 +	inet_get_iif_sdif(skb, &iif, &sdif);
++	iph = skb_gro_network_header(skb);
++	net = dev_net(skb->dev);
 +	sk = __inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo,
 +				       iph->saddr, th->source,
 +				       iph->daddr, ntohs(th->dest),
@@ -406,11 +409,11 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
-@@ -334,6 +464,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
+@@ -334,6 +467,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
  	const struct iphdr *iph = ip_hdr(skb);
  	struct tcphdr *th = tcp_hdr(skb);
  
-+	if (NAPI_GRO_CB(skb)->is_flist) {
++	if (unlikely(NAPI_GRO_CB(skb)->is_flist)) {
 +		skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV4;
 +		skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
 +
@@ -460,7 +463,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  static struct sk_buff *udp_gro_receive_segment(struct list_head *head,
 --- a/net/ipv6/tcpv6_offload.c
 +++ b/net/ipv6/tcpv6_offload.c
-@@ -7,24 +7,65 @@
+@@ -7,24 +7,67 @@
   */
  #include <linux/indirect_call_wrapper.h>
  #include <linux/skbuff.h>
@@ -475,10 +478,10 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +				    struct tcphdr *th)
 +{
 +#if IS_ENABLED(CONFIG_IPV6)
-+	const struct ipv6hdr *hdr = skb_gro_network_header(skb);
-+	struct net *net = dev_net(skb->dev);
++	const struct ipv6hdr *hdr;
 +	struct sk_buff *p;
 +	struct sock *sk;
++	struct net *net;
 +	int iif, sdif;
 +
 +	if (!(skb->dev->features & NETIF_F_GRO_FRAGLIST))
@@ -491,6 +494,8 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +	}
 +
 +	inet6_get_iif_sdif(skb, &iif, &sdif);
++	hdr = skb_gro_network_header(skb);
++	net = dev_net(skb->dev);
 +	sk = __inet6_lookup_established(net, net->ipv4.tcp_death_row.hashinfo,
 +					&hdr->saddr, th->source,
 +					&hdr->daddr, ntohs(th->dest),
@@ -531,11 +536,11 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff)
-@@ -32,6 +73,15 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_com
+@@ -32,6 +75,15 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_com
  	const struct ipv6hdr *iph = ipv6_hdr(skb);
  	struct tcphdr *th = tcp_hdr(skb);
  
-+	if (NAPI_GRO_CB(skb)->is_flist) {
++	if (unlikely(NAPI_GRO_CB(skb)->is_flist)) {
 +		skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV6;
 +		skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
 +
@@ -547,12 +552,74 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr,
  				  &iph->daddr, 0);
  	skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV6;
-@@ -50,6 +100,9 @@ static struct sk_buff *tcp6_gso_segment(
+@@ -39,6 +91,61 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_com
+ 	return tcp_gro_complete(skb);
+ }
+ 
++static void __tcpv6_gso_segment_csum(struct sk_buff *seg,
++				     __be16 *oldport, __be16 newport)
++{
++	struct tcphdr *th;
++
++	if (*oldport == newport)
++		return;
++
++	th = tcp_hdr(seg);
++	inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false);
++	*oldport = newport;
++}
++
++static struct sk_buff *__tcpv6_gso_segment_list_csum(struct sk_buff *segs)
++{
++	const struct tcphdr *th;
++	const struct ipv6hdr *iph;
++	struct sk_buff *seg;
++	struct tcphdr *th2;
++	struct ipv6hdr *iph2;
++
++	seg = segs;
++	th = tcp_hdr(seg);
++	iph = ipv6_hdr(seg);
++	th2 = tcp_hdr(seg->next);
++	iph2 = ipv6_hdr(seg->next);
++
++	if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) &&
++	    ipv6_addr_equal(&iph->saddr, &iph2->saddr) &&
++	    ipv6_addr_equal(&iph->daddr, &iph2->daddr))
++		return segs;
++
++	while ((seg = seg->next)) {
++		th2 = tcp_hdr(seg);
++		iph2 = ipv6_hdr(seg);
++
++		iph2->saddr = iph->saddr;
++		iph2->daddr = iph->daddr;
++		__tcpv6_gso_segment_csum(seg, &th2->source, th->source);
++		__tcpv6_gso_segment_csum(seg, &th2->dest, th->dest);
++	}
++
++	return segs;
++}
++
++static struct sk_buff *__tcp6_gso_segment_list(struct sk_buff *skb,
++					      netdev_features_t features)
++{
++	skb = skb_segment_list(skb, features, skb_mac_header_len(skb));
++	if (IS_ERR(skb))
++		return skb;
++
++	return __tcpv6_gso_segment_list_csum(skb);
++}
++
+ static struct sk_buff *tcp6_gso_segment(struct sk_buff *skb,
+ 					netdev_features_t features)
+ {
+@@ -50,6 +157,9 @@ static struct sk_buff *tcp6_gso_segment(
  	if (!pskb_may_pull(skb, sizeof(*th)))
  		return ERR_PTR(-EINVAL);
  
 +	if (skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST)
-+		return skb_segment_list(skb, features, skb_mac_header_len(skb));
++		return __tcp6_gso_segment_list(skb, features);
 +
  	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
  		const struct ipv6hdr *ipv6h = ipv6_hdr(skb);
diff --git a/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch b/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
index 11255afbda..6205901707 100644
--- a/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
+++ b/target/linux/generic/pending-6.6/680-net-add-TCP-fraglist-GRO-support.patch
@@ -81,36 +81,38 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  {
 --- a/net/ipv4/tcp_offload.c
 +++ b/net/ipv4/tcp_offload.c
-@@ -28,6 +28,68 @@ static void tcp_gso_tstamp(struct sk_buf
+@@ -28,6 +28,70 @@ static void tcp_gso_tstamp(struct sk_buf
  	}
  }
  
 +static void __tcpv4_gso_segment_csum(struct sk_buff *seg,
-+				     __be32 *oldip, __be32 *newip,
-+				     __be16 *oldport, __be16 *newport)
++				     __be32 *oldip, __be32 newip,
++				     __be16 *oldport, __be16 newport)
 +{
 +	struct tcphdr *th;
 +	struct iphdr *iph;
 +
-+	if (*oldip == *newip && *oldport == *newport)
++	if (*oldip == newip && *oldport == newport)
 +		return;
 +
 +	th = tcp_hdr(seg);
 +	iph = ip_hdr(seg);
 +
-+	inet_proto_csum_replace4(&th->check, seg, *oldip, *newip, true);
-+	inet_proto_csum_replace2(&th->check, seg, *oldport, *newport, false);
-+	*oldport = *newport;
++	inet_proto_csum_replace4(&th->check, seg, *oldip, newip, true);
++	inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false);
++	*oldport = newport;
 +
-+	csum_replace4(&iph->check, *oldip, *newip);
-+	*oldip = *newip;
++	csum_replace4(&iph->check, *oldip, newip);
++	*oldip = newip;
 +}
 +
 +static struct sk_buff *__tcpv4_gso_segment_list_csum(struct sk_buff *segs)
 +{
++	const struct tcphdr *th;
++	const struct iphdr *iph;
 +	struct sk_buff *seg;
-+	struct tcphdr *th, *th2;
-+	struct iphdr *iph, *iph2;
++	struct tcphdr *th2;
++	struct iphdr *iph2;
 +
 +	seg = segs;
 +	th = tcp_hdr(seg);
@@ -118,7 +120,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +	th2 = tcp_hdr(seg->next);
 +	iph2 = ip_hdr(seg->next);
 +
-+	if (!(*(u32 *)&th->source ^ *(u32 *)&th2->source) &&
++	if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) &&
 +	    iph->daddr == iph2->daddr && iph->saddr == iph2->saddr)
 +		return segs;
 +
@@ -127,11 +129,11 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +		iph2 = ip_hdr(seg);
 +
 +		__tcpv4_gso_segment_csum(seg,
-+					 &iph2->saddr, &iph->saddr,
-+					 &th2->source, &th->source);
++					 &iph2->saddr, iph->saddr,
++					 &th2->source, th->source);
 +		__tcpv4_gso_segment_csum(seg,
-+					 &iph2->daddr, &iph->daddr,
-+					 &th2->dest, &th->dest);
++					 &iph2->daddr, iph->daddr,
++					 &th2->dest, th->dest);
 +	}
 +
 +	return segs;
@@ -150,7 +152,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  static struct sk_buff *tcp4_gso_segment(struct sk_buff *skb,
  					netdev_features_t features)
  {
-@@ -37,6 +99,9 @@ static struct sk_buff *tcp4_gso_segment(
+@@ -37,6 +101,9 @@ static struct sk_buff *tcp4_gso_segment(
  	if (!pskb_may_pull(skb, sizeof(struct tcphdr)))
  		return ERR_PTR(-EINVAL);
  
@@ -160,7 +162,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
  		const struct iphdr *iph = ip_hdr(skb);
  		struct tcphdr *th = tcp_hdr(skb);
-@@ -178,61 +243,76 @@ out:
+@@ -178,61 +245,76 @@ out:
  	return segs;
  }
  
@@ -267,15 +269,14 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	flush = NAPI_GRO_CB(p)->flush;
  	flush |= (__force int)(flags & TCP_FLAG_CWR);
  	flush |= (__force int)((flags ^ tcp_flag_word(th2)) &
-@@ -269,6 +349,19 @@ found:
+@@ -269,6 +351,18 @@ found:
  	flush |= p->decrypted ^ skb->decrypted;
  #endif
  
-+	if (NAPI_GRO_CB(p)->is_flist) {
++	if (unlikely(NAPI_GRO_CB(p)->is_flist)) {
 +		flush |= (__force int)(flags ^ tcp_flag_word(th2));
 +		flush |= skb->ip_summed != p->ip_summed;
 +		flush |= skb->csum_level != p->csum_level;
-+		flush |= !pskb_may_pull(skb, skb_gro_offset(skb));
 +		flush |= NAPI_GRO_CB(p)->count >= 64;
 +
 +		if (flush || skb_gro_receive_list(p, skb))
@@ -287,7 +288,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	if (flush || skb_gro_receive(p, skb)) {
  		mss = 1;
  		goto out_check_final;
-@@ -290,7 +383,6 @@ out_check_final:
+@@ -290,7 +384,6 @@ out_check_final:
  	if (p && (!NAPI_GRO_CB(skb)->same_flow || flush))
  		pp = p;
  
@@ -295,17 +296,17 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	NAPI_GRO_CB(skb)->flush |= (flush != 0);
  
  	return pp;
-@@ -314,18 +406,56 @@ void tcp_gro_complete(struct sk_buff *sk
+@@ -314,18 +407,58 @@ void tcp_gro_complete(struct sk_buff *sk
  }
  EXPORT_SYMBOL(tcp_gro_complete);
  
 +static void tcp4_check_fraglist_gro(struct list_head *head, struct sk_buff *skb,
 +				    struct tcphdr *th)
 +{
-+	const struct iphdr *iph = skb_gro_network_header(skb);
-+	struct net *net = dev_net(skb->dev);
++	const struct iphdr *iph;
 +	struct sk_buff *p;
 +	struct sock *sk;
++	struct net *net;
 +	int iif, sdif;
 +
 +	if (!(skb->dev->features & NETIF_F_GRO_FRAGLIST))
@@ -318,6 +319,8 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +	}
 +
 +	inet_get_iif_sdif(skb, &iif, &sdif);
++	iph = skb_gro_network_header(skb);
++	net = dev_net(skb->dev);
 +	sk = __inet_lookup_established(net, net->ipv4.tcp_death_row.hashinfo,
 +				       iph->saddr, th->source,
 +				       iph->daddr, ntohs(th->dest),
@@ -357,11 +360,11 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  INDIRECT_CALLABLE_SCOPE int tcp4_gro_complete(struct sk_buff *skb, int thoff)
-@@ -333,6 +463,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
+@@ -333,6 +466,15 @@ INDIRECT_CALLABLE_SCOPE int tcp4_gro_com
  	const struct iphdr *iph = ip_hdr(skb);
  	struct tcphdr *th = tcp_hdr(skb);
  
-+	if (NAPI_GRO_CB(skb)->is_flist) {
++	if (unlikely(NAPI_GRO_CB(skb)->is_flist)) {
 +		skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV4;
 +		skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
 +
@@ -411,7 +414,7 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  static struct sk_buff *udp_gro_receive_segment(struct list_head *head,
 --- a/net/ipv6/tcpv6_offload.c
 +++ b/net/ipv6/tcpv6_offload.c
-@@ -7,24 +7,65 @@
+@@ -7,24 +7,67 @@
   */
  #include <linux/indirect_call_wrapper.h>
  #include <linux/skbuff.h>
@@ -426,10 +429,10 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +				    struct tcphdr *th)
 +{
 +#if IS_ENABLED(CONFIG_IPV6)
-+	const struct ipv6hdr *hdr = skb_gro_network_header(skb);
-+	struct net *net = dev_net(skb->dev);
++	const struct ipv6hdr *hdr;
 +	struct sk_buff *p;
 +	struct sock *sk;
++	struct net *net;
 +	int iif, sdif;
 +
 +	if (!(skb->dev->features & NETIF_F_GRO_FRAGLIST))
@@ -442,6 +445,8 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
 +	}
 +
 +	inet6_get_iif_sdif(skb, &iif, &sdif);
++	hdr = skb_gro_network_header(skb);
++	net = dev_net(skb->dev);
 +	sk = __inet6_lookup_established(net, net->ipv4.tcp_death_row.hashinfo,
 +					&hdr->saddr, th->source,
 +					&hdr->daddr, ntohs(th->dest),
@@ -482,11 +487,11 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  }
  
  INDIRECT_CALLABLE_SCOPE int tcp6_gro_complete(struct sk_buff *skb, int thoff)
-@@ -32,6 +73,15 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_com
+@@ -32,6 +75,15 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_com
  	const struct ipv6hdr *iph = ipv6_hdr(skb);
  	struct tcphdr *th = tcp_hdr(skb);
  
-+	if (NAPI_GRO_CB(skb)->is_flist) {
++	if (unlikely(NAPI_GRO_CB(skb)->is_flist)) {
 +		skb_shinfo(skb)->gso_type |= SKB_GSO_FRAGLIST | SKB_GSO_TCPV6;
 +		skb_shinfo(skb)->gso_segs = NAPI_GRO_CB(skb)->count;
 +
@@ -498,12 +503,74 @@ Signe-off-by: Felix Fietkau <nbd at nbd.name>
  	th->check = ~tcp_v6_check(skb->len - thoff, &iph->saddr,
  				  &iph->daddr, 0);
  	skb_shinfo(skb)->gso_type |= SKB_GSO_TCPV6;
-@@ -51,6 +101,9 @@ static struct sk_buff *tcp6_gso_segment(
+@@ -40,6 +92,61 @@ INDIRECT_CALLABLE_SCOPE int tcp6_gro_com
+ 	return 0;
+ }
+ 
++static void __tcpv6_gso_segment_csum(struct sk_buff *seg,
++				     __be16 *oldport, __be16 newport)
++{
++	struct tcphdr *th;
++
++	if (*oldport == newport)
++		return;
++
++	th = tcp_hdr(seg);
++	inet_proto_csum_replace2(&th->check, seg, *oldport, newport, false);
++	*oldport = newport;
++}
++
++static struct sk_buff *__tcpv6_gso_segment_list_csum(struct sk_buff *segs)
++{
++	const struct tcphdr *th;
++	const struct ipv6hdr *iph;
++	struct sk_buff *seg;
++	struct tcphdr *th2;
++	struct ipv6hdr *iph2;
++
++	seg = segs;
++	th = tcp_hdr(seg);
++	iph = ipv6_hdr(seg);
++	th2 = tcp_hdr(seg->next);
++	iph2 = ipv6_hdr(seg->next);
++
++	if (!(*(const u32 *)&th->source ^ *(const u32 *)&th2->source) &&
++	    ipv6_addr_equal(&iph->saddr, &iph2->saddr) &&
++	    ipv6_addr_equal(&iph->daddr, &iph2->daddr))
++		return segs;
++
++	while ((seg = seg->next)) {
++		th2 = tcp_hdr(seg);
++		iph2 = ipv6_hdr(seg);
++
++		iph2->saddr = iph->saddr;
++		iph2->daddr = iph->daddr;
++		__tcpv6_gso_segment_csum(seg, &th2->source, th->source);
++		__tcpv6_gso_segment_csum(seg, &th2->dest, th->dest);
++	}
++
++	return segs;
++}
++
++static struct sk_buff *__tcp6_gso_segment_list(struct sk_buff *skb,
++					      netdev_features_t features)
++{
++	skb = skb_segment_list(skb, features, skb_mac_header_len(skb));
++	if (IS_ERR(skb))
++		return skb;
++
++	return __tcpv6_gso_segment_list_csum(skb);
++}
++
+ static struct sk_buff *tcp6_gso_segment(struct sk_buff *skb,
+ 					netdev_features_t features)
+ {
+@@ -51,6 +158,9 @@ static struct sk_buff *tcp6_gso_segment(
  	if (!pskb_may_pull(skb, sizeof(*th)))
  		return ERR_PTR(-EINVAL);
  
 +	if (skb_shinfo(skb)->gso_type & SKB_GSO_FRAGLIST)
-+		return skb_segment_list(skb, features, skb_mac_header_len(skb));
++		return __tcp6_gso_segment_list(skb, features);
 +
  	if (unlikely(skb->ip_summed != CHECKSUM_PARTIAL)) {
  		const struct ipv6hdr *ipv6h = ipv6_hdr(skb);



From lede-commits at lists.infradead.org  Sat Apr 27 11:57:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 14:57:24 -0400
Subject: [openwrt/openwrt]  netifd: fix bogus warnings in packet_steering init
 script
In-Reply-To: <171424424497.1220233.14541546972148712146@git-01.infra.openwrt.org>
References: <171424424497.1220233.14541546972148712146@git-01.infra.openwrt.org>
Message-ID: <mailman.31532.1714244249.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/994f71e0f06c6cbdfb21fc0bbc0777f40b90e7b4

commit 994f71e0f06c6cbdfb21fc0bbc0777f40b90e7b4
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Apr 27 20:57:00 2024 +0200

    netifd: fix bogus warnings in packet_steering init script
    
    Avoids warnings if options are unset
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/files/etc/init.d/packet_steering | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/network/config/netifd/files/etc/init.d/packet_steering b/package/network/config/netifd/files/etc/init.d/packet_steering
index ff4a39073b..19d423797a 100755
--- a/package/network/config/netifd/files/etc/init.d/packet_steering
+++ b/package/network/config/netifd/files/etc/init.d/packet_steering
@@ -14,8 +14,8 @@ service_triggers() {
 }
 
 reload_service() {
-	packet_steering="$(uci get "network. at globals[0].packet_steering")"
-	steering_flows="$(uci get "network. at globals[0].steering_flows")"
+	packet_steering="$(uci -q get "network. at globals[0].packet_steering")"
+	steering_flows="$(uci -q get "network. at globals[0].steering_flows")"
 	[ "$steering_flows" -gt 0 ] && opts="-l $steering_flows"
 	if [ -e "/usr/libexec/platform/packet-steering.sh" ]; then
 		/usr/libexec/platform/packet-steering.sh "$packet_steering"



From lede-commits at lists.infradead.org  Sat Apr 27 11:59:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 14:59:55 -0400
Subject: [openwrt/openwrt]  netifd: packet_steering: fix shell error on unset
 steering_flows option
In-Reply-To: <171424439591.1232132.15658152639743597013@git-01.infra.openwrt.org>
References: <171424439591.1232132.15658152639743597013@git-01.infra.openwrt.org>
Message-ID: <mailman.31533.1714244400.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2d6fd937c36bf3d8991b0fd9f6d845fab18af790

commit 2d6fd937c36bf3d8991b0fd9f6d845fab18af790
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Sat Apr 27 20:59:43 2024 +0200

    netifd: packet_steering: fix shell error on unset steering_flows option
    
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 package/network/config/netifd/files/etc/init.d/packet_steering | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/config/netifd/files/etc/init.d/packet_steering b/package/network/config/netifd/files/etc/init.d/packet_steering
index 19d423797a..5266a931ae 100755
--- a/package/network/config/netifd/files/etc/init.d/packet_steering
+++ b/package/network/config/netifd/files/etc/init.d/packet_steering
@@ -16,7 +16,7 @@ service_triggers() {
 reload_service() {
 	packet_steering="$(uci -q get "network. at globals[0].packet_steering")"
 	steering_flows="$(uci -q get "network. at globals[0].steering_flows")"
-	[ "$steering_flows" -gt 0 ] && opts="-l $steering_flows"
+	[ "${steering_flows:-0}" -gt 0 ] && opts="-l $steering_flows"
 	if [ -e "/usr/libexec/platform/packet-steering.sh" ]; then
 		/usr/libexec/platform/packet-steering.sh "$packet_steering"
 	else



From lede-commits at lists.infradead.org  Sat Apr 27 14:29:17 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 17:29:17 -0400
Subject: [openwrt/openwrt]  ipq40xx: refresh patches
In-Reply-To: <171425335785.2021405.7306389356645609147@git-01.infra.openwrt.org>
References: <171425335785.2021405.7306389356645609147@git-01.infra.openwrt.org>
Message-ID: <mailman.31541.1714253363.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4265fe9348c0e49ecbf2da3b0d153c28564418b9

commit 4265fe9348c0e49ecbf2da3b0d153c28564418b9
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 27 15:44:57 2024 +0200

    ipq40xx: refresh patches
    
    CI tells us that we need to, so lets refresh them.
    
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index 4131b6914d..28a02fe1a2 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -93,7 +93,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
 +#endif
 --- a/include/linux/skbuff.h
 +++ b/include/linux/skbuff.h
-@@ -4643,6 +4643,9 @@ enum skb_ext_id {
+@@ -4642,6 +4642,9 @@ enum skb_ext_id {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	SKB_EXT_MCTP,
  #endif



From lede-commits at lists.infradead.org  Sat Apr 27 14:29:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 17:29:51 -0400
Subject: [openwrt/openwrt]  ipq-wifi: correct PKG_MIRROR_HASH
In-Reply-To: <171425339139.2024435.6916427462404502585@git-01.infra.openwrt.org>
References: <171425339139.2024435.6916427462404502585@git-01.infra.openwrt.org>
Message-ID: <mailman.31542.1714253395.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/cf3520ba6645870457171b030703b66d2a0cb668

commit cf3520ba6645870457171b030703b66d2a0cb668
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sat Apr 27 15:46:58 2024 +0200

    ipq-wifi: correct PKG_MIRROR_HASH
    
    It seems that somehow a wrong hash has been used for ipq-wifi, so refresh
    it.
    
    Fixes: f10d55df9e0a ("ipq-wifi: update to Git HEAD (2024-04-26)")
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/firmware/ipq-wifi/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/firmware/ipq-wifi/Makefile b/package/firmware/ipq-wifi/Makefile
index 25e755c2b7..68448a6ec1 100644
--- a/package/firmware/ipq-wifi/Makefile
+++ b/package/firmware/ipq-wifi/Makefile
@@ -8,7 +8,7 @@ PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/firmware/qca-wireless.git
 PKG_SOURCE_DATE:=2024-04-26
 PKG_SOURCE_VERSION:=644ba9ea2e6685e420561ef098cb6fbaaf136cbf
-PKG_MIRROR_HASH:=e6b4bc1bb7a7e93477ebec0a0bbed0e46d7b82f66c9d879198e9afbbcdf1ac0b
+PKG_MIRROR_HASH:=3b913fd6fb0fac404b16e67c66d36c10315dba5459a8d495d870afcb1e2c33cd
 PKG_FLAGS:=nonshared
 
 include $(INCLUDE_DIR)/package.mk



From lede-commits at lists.infradead.org  Sat Apr 27 14:38:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 17:38:00 -0400
Subject: [openwrt/openwrt]  tools/expat: fix PKG_CPE_ID
In-Reply-To: <171425388078.2065738.7700109834003027146@git-01.infra.openwrt.org>
References: <171425388078.2065738.7700109834003027146@git-01.infra.openwrt.org>
Message-ID: <mailman.31546.1714253885.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ff59f3f4bdb56c779579aaa11b815f4c83abbac5

commit ff59f3f4bdb56c779579aaa11b815f4c83abbac5
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
AuthorDate: Fri Apr 26 11:24:41 2024 +0200

    tools/expat: fix PKG_CPE_ID
    
    cpe:/a:libexpat_project:libexpat is the correct CPE ID for expat:
    https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:libexpat:libexpat
    
    Fixes: c61a2395140d92cdd37d3d6ee43a765427e8e318 (add PKG_CPE_ID ids to package and tools)
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15291
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/expat/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/expat/Makefile b/tools/expat/Makefile
index 4cd9ef11b2..8c15f98a22 100644
--- a/tools/expat/Makefile
+++ b/tools/expat/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=expat
-PKG_CPE_ID:=cpe:/a:libexpat:expat
+PKG_CPE_ID:=cpe:/a:libexpat:libexpat
 PKG_VERSION:=2.6.2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz



From lede-commits at lists.infradead.org  Sat Apr 27 14:44:01 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 17:44:01 -0400
Subject: [openwrt/openwrt]  package/network/services/dropbear: fix PKG_CPE_ID
In-Reply-To: <171425424158.2098004.8023651222660001754@git-01.infra.openwrt.org>
References: <171425424158.2098004.8023651222660001754@git-01.infra.openwrt.org>
Message-ID: <mailman.31547.1714254248.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/289f811abb4ace7aa08ae7bf85c0d4f9460f0802

commit 289f811abb4ace7aa08ae7bf85c0d4f9460f0802
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
AuthorDate: Fri Apr 26 16:09:32 2024 +0200

    package/network/services/dropbear: fix PKG_CPE_ID
    
    cpe:/a:dropbear_ssh_project:dropbear_ssh is the correct CPE ID for dropbear:
    https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:dropbear_ssh_project:dropbear_ssh
    
    Fixes: c61a2395140d92cdd37d3d6ee43a765427e8e318 (add PKG_CPE_ID ids to package and tools)
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15290
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/network/services/dropbear/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/dropbear/Makefile b/package/network/services/dropbear/Makefile
index 2d7ce75b8d..b0f486f990 100644
--- a/package/network/services/dropbear/Makefile
+++ b/package/network/services/dropbear/Makefile
@@ -19,7 +19,7 @@ PKG_HASH:=bc5a121ffbc94b5171ad5ebe01be42746d50aa797c9549a4639894a16749443b
 
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=LICENSE libtomcrypt/LICENSE libtommath/LICENSE
-PKG_CPE_ID:=cpe:/a:matt_johnston:dropbear_ssh_server
+PKG_CPE_ID:=cpe:/a:dropbear_ssh_project:dropbear_ssh
 
 PKG_BUILD_PARALLEL:=1
 PKG_ASLR_PIE_REGULAR:=1



From lede-commits at lists.infradead.org  Sat Apr 27 14:44:23 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 17:44:23 -0400
Subject: [openwrt/openwrt]  package/libs/libjson-c: fix PKG_CPE_ID
In-Reply-To: <171425426377.2100778.11237352620564887261@git-01.infra.openwrt.org>
References: <171425426377.2100778.11237352620564887261@git-01.infra.openwrt.org>
Message-ID: <mailman.31548.1714254267.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a4f723e04ed245819fe320f472a4ff2b4eda00fb

commit a4f723e04ed245819fe320f472a4ff2b4eda00fb
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
AuthorDate: Fri Apr 26 17:47:24 2024 +0200

    package/libs/libjson-c: fix PKG_CPE_ID
    
    cpe:/a:json-c:json-c is the correct CPE ID for libjson-c:
    https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:json-c:json-c
    
    Fixes: c61a2395140d92cdd37d3d6ee43a765427e8e318 (add PKG_CPE_ID ids to package and tools)
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15292
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/libs/libjson-c/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/libs/libjson-c/Makefile b/package/libs/libjson-c/Makefile
index 063cf26442..88781469dc 100644
--- a/package/libs/libjson-c/Makefile
+++ b/package/libs/libjson-c/Makefile
@@ -18,7 +18,7 @@ PKG_HASH:=8df3b66597333dd365762cab2de2ff68e41e3808a04b692e696e0550648eefaa
 PKG_MAINTAINER:=Felix Fietkau <nbd at nbd.name>
 PKG_LICENSE:=MIT
 PKG_LICENSE_FILES:=COPYING
-PKG_CPE_ID:=cpe:/a:json-c_project:json-c
+PKG_CPE_ID:=cpe:/a:json-c:json-c
 
 HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
 



From lede-commits at lists.infradead.org  Sat Apr 27 14:44:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sat, 27 Apr 2024 17:44:51 -0400
Subject: [openwrt/openwrt]  package/network/utils/iptables: fix PKG_CPE_ID
In-Reply-To: <171425429147.2103194.8121162322643683365@git-01.infra.openwrt.org>
References: <171425429147.2103194.8121162322643683365@git-01.infra.openwrt.org>
Message-ID: <mailman.31549.1714254295.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6e5edec159e2dc468607a5b9179f722857a38421

commit 6e5edec159e2dc468607a5b9179f722857a38421
Author: Fabrice Fontaine <fontaine.fabrice at gmail.com>
AuthorDate: Sat Apr 27 17:25:58 2024 +0200

    package/network/utils/iptables: fix PKG_CPE_ID
    
    cpe:/a:netfilter:iptables is the correct CPE ID for iptables:
    https://nvd.nist.gov/products/cpe/search/results?keyword=cpe:2.3:a:netfilter:iptables
    
    Fixes: c61a2395140d92cdd37d3d6ee43a765427e8e318 (add PKG_CPE_ID ids to package and tools)
    
    Signed-off-by: Fabrice Fontaine <fontaine.fabrice at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15297
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 package/network/utils/iptables/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/utils/iptables/Makefile b/package/network/utils/iptables/Makefile
index 45a2b49070..d5511f33c1 100644
--- a/package/network/utils/iptables/Makefile
+++ b/package/network/utils/iptables/Makefile
@@ -23,7 +23,7 @@ PKG_INSTALL:=1
 PKG_BUILD_FLAGS:=gc-sections no-lto
 PKG_BUILD_PARALLEL:=1
 PKG_LICENSE:=GPL-2.0
-PKG_CPE_ID:=cpe:/a:netfilter_core_team:iptables
+PKG_CPE_ID:=cpe:/a:netfilter:iptables
 
 include $(INCLUDE_DIR)/package.mk
 ifeq ($(DUMP),)



From lede-commits at lists.infradead.org  Sun Apr 28 02:09:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 05:09:24 -0400
Subject: [openwrt/openwrt]  ipq40xx: refresh patches again
In-Reply-To: <171429536422.1153958.2731584291590270711@git-01.infra.openwrt.org>
References: <171429536422.1153958.2731584291590270711@git-01.infra.openwrt.org>
Message-ID: <mailman.31570.1714295378.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/2aa6c875f8818466aef89aa70677e3a30b8417c5

commit 2aa6c875f8818466aef89aa70677e3a30b8417c5
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Sun Apr 28 11:00:58 2024 +0200

    ipq40xx: refresh patches again
    
    CI tells us that we need to, so lets refresh them.
    
    Fixes: 4265fe9348c0 ("ipq40xx: refresh patches")
    
    Link: https://github.com/openwrt/openwrt/pull/15310
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch      | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
index 28a02fe1a2..97b41d29ad 100644
--- a/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
+++ b/target/linux/ipq40xx/patches-6.6/701-net-dsa-add-out-of-band-tagging-protocol.patch
@@ -136,7 +136,7 @@ Signed-off-by: Maxime Chevallier <maxime.chevallier at bootlin.com>
  #include <net/dst.h>
  #include <net/sock.h>
  #include <net/checksum.h>
-@@ -4812,6 +4816,9 @@ static const u8 skb_ext_type_len[] = {
+@@ -4823,6 +4827,9 @@ static const u8 skb_ext_type_len[] = {
  #if IS_ENABLED(CONFIG_MCTP_FLOWS)
  	[SKB_EXT_MCTP] = SKB_EXT_CHUNKSIZEOF(struct mctp_flow),
  #endif



From lede-commits at lists.infradead.org  Sun Apr 28 02:31:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 05:31:06 -0400
Subject: [openwrt/openwrt]  tools: b43-tools: fix compilation with GCC14
In-Reply-To: <171429666635.1269198.8838568997728201645@git-01.infra.openwrt.org>
References: <171429666635.1269198.8838568997728201645@git-01.infra.openwrt.org>
Message-ID: <mailman.31578.1714296673.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/5f07510cdc3e4712e7be3f9c4e99c8bb43522a9f

commit 5f07510cdc3e4712e7be3f9c4e99c8bb43522a9f
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Fri Mar 29 18:57:03 2024 +0100

    tools: b43-tools: fix compilation with GCC14
    
    GCC14 no longer treats integer types and pointer types as equivalent in
    assignments (including implied assignments of function arguments and return
    values), and instead fails the compilation with a type error.
    
    So, as a workaround lets disable the newly introduced error
    -Werror=int-conversion and just make it print a warning to enable compiling
    with GCC14 as Fedora 40 now defaults to it.
    
    (cherry picked from commit 0c96d20bf9fba6d814efa88c6fb08a5df094103a)
    Link: https://github.com/openwrt/openwrt/pull/15309
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/b43-tools/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/tools/b43-tools/Makefile b/tools/b43-tools/Makefile
index a99b0c9e53..cf1f118c15 100644
--- a/tools/b43-tools/Makefile
+++ b/tools/b43-tools/Makefile
@@ -26,7 +26,7 @@ define Host/Compile
 		$(HOST_MAKE_FLAGS) \
 		$(1) QUIET_SPARSE=:
 	+$(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/assembler \
-		CFLAGS="$(HOST_CFLAGS) -include endian.h" \
+		CFLAGS="$(HOST_CFLAGS) -include endian.h -Wno-error=int-conversion" \
 		$(HOST_MAKE_FLAGS) \
 		LDFLAGS= \
 		$(1) QUIET_SPARSE=:



From lede-commits at lists.infradead.org  Sun Apr 28 02:39:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 05:39:45 -0400
Subject: [openwrt/openwrt]  uboot-mvebu: backport patch for Turris Omnia to
 enable LTO
In-Reply-To: <171429718565.1319304.7988051518861250760@git-01.infra.openwrt.org>
References: <171429718565.1319304.7988051518861250760@git-01.infra.openwrt.org>
Message-ID: <mailman.31579.1714297190.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/1b190dfd3ae2f9317c0dbca3123ed6c92701489c

commit 1b190dfd3ae2f9317c0dbca3123ed6c92701489c
Author: Josef Schlehofer <pepe.schlehofer at gmail.com>
AuthorDate: Sun Apr 28 09:24:29 2024 +0200

    uboot-mvebu: backport patch for Turris Omnia to enable LTO
    
    Fixes issue while building package uboot-mvebu on OpenWrt 23.05:
    
    u-boot-with-spl.kwb exceeds file size limit:
      limit:  0xf0000 bytes
      actual: 0xf0100 bytes
      excess: 0x100 bytes
    make[3]: *** [Makefile:1466: u-boot-with-spl.kwb] Error 1
    make[3]: *** Deleting file 'u-boot-with-spl.kwb'
    make[3]: Leaving directory '/workspaces/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/u-boot-omnia/u-boot-2024.04'
    make[2]: *** [Makefile:83: /workspaces/openwrt/build_dir/target-arm_cortex-a9+vfpv3-d16_musl_eabi/u-boot-omnia/u-boot-2024.04/.built] Error 2
    
    Signed-off-by: Josef Schlehofer <pepe.schlehofer at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15307
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...urris_omnia-Enable-LTO-by-default-on-Turr.patch | 30 ++++++++++++++++++++++
 1 file changed, 30 insertions(+)

diff --git a/package/boot/uboot-mvebu/patches/0001-arm-mvebu-turris_omnia-Enable-LTO-by-default-on-Turr.patch b/package/boot/uboot-mvebu/patches/0001-arm-mvebu-turris_omnia-Enable-LTO-by-default-on-Turr.patch
new file mode 100644
index 0000000000..3381e055f4
--- /dev/null
+++ b/package/boot/uboot-mvebu/patches/0001-arm-mvebu-turris_omnia-Enable-LTO-by-default-on-Turr.patch
@@ -0,0 +1,30 @@
+From ca4ecdce4cdcfab7df101b5df6ddad43d2f549e1 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Marek=20Beh=C3=BAn?= <kabel at kernel.org>
+Date: Thu, 4 Apr 2024 09:50:50 +0200
+Subject: [PATCH] arm: mvebu: turris_omnia: Enable LTO by default on Turris
+ Omnia
+MIME-Version: 1.0
+Content-Type: text/plain; charset=UTF-8
+Content-Transfer-Encoding: 8bit
+
+U-Boot builds for Turris Omnia are approaching the limit of 0xf0000
+bytes, which is the size of the U-Boot partition on Omnia.
+
+Enable LTO to get more size optimized binaries.
+
+Signed-off-by: Marek Beh?n <kabel at kernel.org>
+Reviewed-by: Stefan Roese <sr at denx.de>
+---
+ configs/turris_omnia_defconfig | 1 +
+ 1 file changed, 1 insertion(+)
+
+--- a/configs/turris_omnia_defconfig
++++ b/configs/turris_omnia_defconfig
+@@ -31,6 +31,7 @@ CONFIG_AHCI=y
+ CONFIG_OF_BOARD_FIXUP=y
+ CONFIG_SYS_MEMTEST_START=0x00800000
+ CONFIG_SYS_MEMTEST_END=0x00ffffff
++CONFIG_LTO=y
+ CONFIG_HAS_BOARD_SIZE_LIMIT=y
+ CONFIG_BOARD_SIZE_LIMIT=983040
+ CONFIG_FIT=y



From lede-commits at lists.infradead.org  Sun Apr 28 08:47:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 11:47:43 -0400
Subject: [openwrt/openwrt]  kernel/zynq: Create kernel files for v6.1 (from
 v5.15)
In-Reply-To: <171431926383.3210124.7047440521374061494@git-01.infra.openwrt.org>
References: <171431926383.3210124.7047440521374061494@git-01.infra.openwrt.org>
Message-ID: <mailman.31607.1714319272.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f41bee17887e309c17f0316eaf4b987507f381c4

commit f41bee17887e309c17f0316eaf4b987507f381c4
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed Apr 17 17:23:47 2024 +0200

    kernel/zynq: Create kernel files for v6.1 (from v5.15)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/zynq/{config-5.15 => config-6.1} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/zynq/config-5.15 b/target/linux/zynq/config-6.1
similarity index 100%
rename from target/linux/zynq/config-5.15
rename to target/linux/zynq/config-6.1



From lede-commits at lists.infradead.org  Sun Apr 28 08:47:46 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 11:47:46 -0400
Subject: [openwrt/openwrt]  zynq: 6.1: set testing kernel
In-Reply-To: <171431926383.3210124.7047440521374061494@git-01.infra.openwrt.org>
References: <171431926383.3210124.7047440521374061494@git-01.infra.openwrt.org>
Message-ID: <mailman.31608.1714319272.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/436aa110c64317f51a74db03e65369fc25de058a

commit 436aa110c64317f51a74db03e65369fc25de058a
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed Apr 17 17:25:44 2024 +0200

    zynq: 6.1: set testing kernel
    
    Allow selecting 6.1 as testing kernel on zynq.
    
    Tested-by: Luis Araneda <luaraneda at gmail.com> # Zybo Z7-20
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/zynq/Makefile | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/zynq/Makefile b/target/linux/zynq/Makefile
index f48b58e598..7e4ff32881 100644
--- a/target/linux/zynq/Makefile
+++ b/target/linux/zynq/Makefile
@@ -19,6 +19,7 @@ define Target/Description
 endef
 
 KERNEL_PATCHVER:=5.15
+KERNEL_TESTING_PATCHVER:=6.1
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Sun Apr 28 08:47:45 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 11:47:45 -0400
Subject: [openwrt/openwrt]  zynq: 6.1: refresh kernel config
In-Reply-To: <171431926383.3210124.7047440521374061494@git-01.infra.openwrt.org>
References: <171431926383.3210124.7047440521374061494@git-01.infra.openwrt.org>
Message-ID: <mailman.31609.1714319274.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0227127e79a933768f690441657483eced0efa2b

commit 0227127e79a933768f690441657483eced0efa2b
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed Apr 17 17:28:49 2024 +0200

    zynq: 6.1: refresh kernel config
    
    Refresh the kernel config by runnnig make kernel_menuconfig.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/zynq/config-6.1 | 48 ++++++++++++++++++++++++++++----------------
 1 file changed, 31 insertions(+), 17 deletions(-)

diff --git a/target/linux/zynq/config-6.1 b/target/linux/zynq/config-6.1
index d1d7392440..b6318a776c 100644
--- a/target/linux/zynq/config-6.1
+++ b/target/linux/zynq/config-6.1
@@ -21,7 +21,6 @@ CONFIG_ARCH_ZYNQ=y
 CONFIG_ARM=y
 CONFIG_ARM_AMBA=y
 CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
 CONFIG_ARM_ERRATA_643719=y
 CONFIG_ARM_ERRATA_720789=y
 CONFIG_ARM_ERRATA_754322=y
@@ -31,7 +30,7 @@ CONFIG_ARM_ERRATA_775420=y
 CONFIG_ARM_GIC=y
 CONFIG_ARM_GLOBAL_TIMER=y
 CONFIG_ARM_GT_INITIAL_PRESCALER_VAL=2
-CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HAS_GROUP_RELOCS=y
 CONFIG_ARM_HEAVY_MB=y
 CONFIG_ARM_L1_CACHE_SHIFT=6
 CONFIG_ARM_L1_CACHE_SHIFT_6=y
@@ -58,9 +57,13 @@ CONFIG_BOUNCE=y
 CONFIG_CACHE_L2X0=y
 CONFIG_CADENCE_TTC_TIMER=y
 CONFIG_CADENCE_WATCHDOG=y
+CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
 CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
 CONFIG_CLKSRC_MMIO=y
 CONFIG_CLKSRC_VERSATILE=y
+CONFIG_CLK_ICST=y
 CONFIG_CLK_SP810=y
 CONFIG_CLK_VEXPRESS_OSC=y
 CONFIG_CLONE_BACKWARDS=y
@@ -77,9 +80,12 @@ CONFIG_CMA_SIZE_SEL_MBYTES=y
 # CONFIG_CMA_SYSFS is not set
 CONFIG_COMMON_CLK=y
 CONFIG_COMMON_CLK_SI570=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_CONNECTOR=y
 CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
 CONFIG_CONTIG_ALLOC=y
 CONFIG_COREDUMP=y
 # CONFIG_CPUFREQ_DT is not set
@@ -106,6 +112,7 @@ CONFIG_CPU_HAS_ASID=y
 CONFIG_CPU_IDLE=y
 CONFIG_CPU_IDLE_GOV_LADDER=y
 CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_LITTLE_ENDIAN=y
 CONFIG_CPU_PABRT_V7=y
 CONFIG_CPU_PM=y
 CONFIG_CPU_RMAP=y
@@ -122,21 +129,22 @@ CONFIG_CRYPTO_CRC32=y
 CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_HW=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CRYPTO_RNG2=y
+CONFIG_CURRENT_POINTER_IN_TPIDRURO=y
 CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_INFO=y
 CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
 CONFIG_DMADEVICES=y
 CONFIG_DMA_CMA=y
 CONFIG_DMA_ENGINE=y
 CONFIG_DMA_OF=y
 CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
 CONFIG_DMA_SHARED_BUFFER=y
 CONFIG_DRM=y
 CONFIG_DRM_BRIDGE=y
-CONFIG_DRM_FBDEV_EMULATION=y
-CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_NOMODESET=y
 CONFIG_DRM_PANEL=y
 CONFIG_DRM_PANEL_BRIDGE=y
 CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
@@ -152,19 +160,12 @@ CONFIG_EDAC_SUPPORT=y
 CONFIG_EEPROM_AT24=y
 CONFIG_EEPROM_AT25=y
 CONFIG_ELF_CORE=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_EXT4_FS=y
 CONFIG_EXTCON=y
 CONFIG_F2FS_FS=y
 CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
 CONFIG_FB_CMDLINE=y
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_SYS_COPYAREA=y
-CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_FOPS=y
-CONFIG_FB_SYS_IMAGEBLIT=y
 # CONFIG_FB_XILINX is not set
 CONFIG_FHANDLE=y
 CONFIG_FIXED_PHY=y
@@ -176,6 +177,7 @@ CONFIG_FPGA_BRIDGE=y
 # CONFIG_FPGA_MGR_ALTERA_PS_SPI is not set
 # CONFIG_FPGA_MGR_ICE40_SPI is not set
 # CONFIG_FPGA_MGR_MACHXO2_SPI is not set
+# CONFIG_FPGA_MGR_MICROCHIP_SPI is not set
 # CONFIG_FPGA_MGR_XILINX_SPI is not set
 CONFIG_FPGA_MGR_ZYNQ_FPGA=y
 CONFIG_FPGA_REGION=y
@@ -185,6 +187,9 @@ CONFIG_FS_MBCACHE=y
 CONFIG_FWNODE_MDIO=y
 CONFIG_FW_CACHE=y
 CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC10_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ALLOCATOR=y
 CONFIG_GENERIC_ARCH_TOPOLOGY=y
 CONFIG_GENERIC_BUG=y
@@ -217,7 +222,6 @@ CONFIG_GPIO_CDEV=y
 CONFIG_GPIO_GENERIC=y
 CONFIG_GPIO_GENERIC_PLATFORM=y
 CONFIG_GPIO_ZYNQ=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
 CONFIG_HARDEN_BRANCH_PREDICTOR=y
 CONFIG_HARDIRQS_SW_RESEND=y
 CONFIG_HAS_DMA=y
@@ -242,7 +246,6 @@ CONFIG_I2C_COMPAT=y
 CONFIG_I2C_HELPER_AUTO=y
 CONFIG_I2C_MUX=y
 CONFIG_I2C_MUX_PCA954x=y
-CONFIG_ICST=y
 CONFIG_IIO=y
 CONFIG_IIO_BUFFER=y
 CONFIG_IIO_KFIFO_BUF=y
@@ -259,6 +262,7 @@ CONFIG_INPUT_MOUSEDEV_PSAUX=y
 CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
 CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
 CONFIG_INPUT_SPARSEKMAP=y
+CONFIG_INPUT_VIVALDIFMAP=y
 # CONFIG_IOMMU_DEBUGFS is not set
 # CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
 # CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
@@ -268,6 +272,7 @@ CONFIG_IP_PNP_BOOTP=y
 CONFIG_IP_PNP_DHCP=y
 CONFIG_IP_PNP_RARP=y
 CONFIG_IRQCHIP=y
+CONFIG_IRQSTACKS=y
 CONFIG_IRQ_DOMAIN=y
 CONFIG_IRQ_DOMAIN_HIERARCHY=y
 CONFIG_IRQ_FORCED_THREADING=y
@@ -372,6 +377,7 @@ CONFIG_NO_HZ_IDLE=y
 CONFIG_NO_IOPORT_MAP=y
 CONFIG_NR_CPUS=4
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 CONFIG_NVMEM_SYSFS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
@@ -388,6 +394,10 @@ CONFIG_OUTER_CACHE=y
 CONFIG_OUTER_CACHE_SYNC=y
 CONFIG_PADATA=y
 CONFIG_PAGE_OFFSET=0xC0000000
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
+CONFIG_PAHOLE_HAS_LANG_EXCLUDE=y
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_PCI=y
 CONFIG_PCIE_XILINX=y
@@ -398,6 +408,7 @@ CONFIG_PCI_MSI_IRQ_DOMAIN=y
 CONFIG_PERF_USE_VMALLOC=y
 CONFIG_PGTABLE_LEVELS=2
 CONFIG_PHYLIB=y
+CONFIG_PHYLIB_LEDS=y
 CONFIG_PHYLINK=y
 CONFIG_PINCTRL=y
 # CONFIG_PINCTRL_SINGLE is not set
@@ -418,10 +429,12 @@ CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_VEXPRESS=y
 CONFIG_POWER_SUPPLY=y
 CONFIG_PPS=y
+CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PROC_EVENTS=y
 CONFIG_PTP_1588_CLOCK=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_R8169=y
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RAS=y
 CONFIG_RATIONAL=y
 CONFIG_REALTEK_PHY=y
@@ -456,6 +469,7 @@ CONFIG_SMP=y
 CONFIG_SMP_ON_UP=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
 CONFIG_SOC_BUS=y
+CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSE_IRQ=y
 CONFIG_SPI=y
 CONFIG_SPI_BITBANG=y
@@ -482,6 +496,7 @@ CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
 CONFIG_THERMAL_GOV_STEP_WISE=y
 CONFIG_THERMAL_HWMON=y
 CONFIG_THERMAL_OF=y
+CONFIG_THREAD_INFO_IN_TASK=y
 CONFIG_TICK_CPU_ACCOUNTING=y
 CONFIG_TIMER_OF=y
 CONFIG_TIMER_PROBE=y
@@ -534,7 +549,6 @@ CONFIG_VT_CONSOLE_SLEEP=y
 CONFIG_WATCHDOG_CORE=y
 # CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
 CONFIG_XILINX_EMACLITE=y
-# CONFIG_XILINX_INTC is not set
 # CONFIG_XILINX_PR_DECOUPLER is not set
 CONFIG_XILINX_WATCHDOG=y
 CONFIG_XILINX_XADC=y



From lede-commits at lists.infradead.org  Sun Apr 28 08:47:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 11:47:44 -0400
Subject: [openwrt/openwrt]  kernel/zynq: Restore kernel files for v5.15
In-Reply-To: <171431926383.3210124.7047440521374061494@git-01.infra.openwrt.org>
References: <171431926383.3210124.7047440521374061494@git-01.infra.openwrt.org>
Message-ID: <mailman.31610.1714319274.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4fdb5e8dcf6202afcd04f900c11aa6c269e4fa6a

commit 4fdb5e8dcf6202afcd04f900c11aa6c269e4fa6a
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed Apr 17 17:23:47 2024 +0200

    kernel/zynq: Restore kernel files for v5.15
    
    This is an automatically generated commit which aids following Kernel patch history,
    as git will see the move and copy as a rename thus defeating the purpose.
    
    See: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    for the original discussion.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/zynq/config-5.15 | 552 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 552 insertions(+)

diff --git a/target/linux/zynq/config-5.15 b/target/linux/zynq/config-5.15
new file mode 100644
index 0000000000..d1d7392440
--- /dev/null
+++ b/target/linux/zynq/config-5.15
@@ -0,0 +1,552 @@
+CONFIG_ALIGNMENT_TRAP=y
+# CONFIG_ALTERA_FREEZE_BRIDGE is not set
+# CONFIG_ALTERA_PR_IP_CORE is not set
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_HIBERNATION_POSSIBLE=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MULTIPLATFORM=y
+CONFIG_ARCH_MULTI_V6_V7=y
+CONFIG_ARCH_MULTI_V7=y
+CONFIG_ARCH_NR_GPIO=1024
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
+CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
+CONFIG_ARCH_SELECT_MEMORY_MODEL=y
+CONFIG_ARCH_SPARSEMEM_ENABLE=y
+CONFIG_ARCH_SUSPEND_POSSIBLE=y
+CONFIG_ARCH_VEXPRESS=y
+CONFIG_ARCH_VEXPRESS_CORTEX_A5_A9_ERRATA=y
+# CONFIG_ARCH_VEXPRESS_SPC is not set
+CONFIG_ARCH_ZYNQ=y
+CONFIG_ARM=y
+CONFIG_ARM_AMBA=y
+CONFIG_ARM_CPU_SUSPEND=y
+CONFIG_ARM_CRYPTO=y
+CONFIG_ARM_ERRATA_643719=y
+CONFIG_ARM_ERRATA_720789=y
+CONFIG_ARM_ERRATA_754322=y
+CONFIG_ARM_ERRATA_754327=y
+CONFIG_ARM_ERRATA_764369=y
+CONFIG_ARM_ERRATA_775420=y
+CONFIG_ARM_GIC=y
+CONFIG_ARM_GLOBAL_TIMER=y
+CONFIG_ARM_GT_INITIAL_PRESCALER_VAL=2
+CONFIG_ARM_HAS_SG_CHAIN=y
+CONFIG_ARM_HEAVY_MB=y
+CONFIG_ARM_L1_CACHE_SHIFT=6
+CONFIG_ARM_L1_CACHE_SHIFT_6=y
+CONFIG_ARM_PATCH_IDIV=y
+CONFIG_ARM_PATCH_PHYS_VIRT=y
+# CONFIG_ARM_PL172_MPMC is not set
+# CONFIG_ARM_SMMU is not set
+CONFIG_ARM_THUMB=y
+CONFIG_ARM_TIMER_SP804=y
+CONFIG_ARM_UNWIND=y
+CONFIG_ARM_VIRT_EXT=y
+CONFIG_ARM_ZYNQ_CPUIDLE=y
+CONFIG_ATAGS=y
+CONFIG_AUTO_ZRELADDR=y
+# CONFIG_AXI_DMAC is not set
+CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=16384
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BLK_PM=y
+CONFIG_BOUNCE=y
+CONFIG_CACHE_L2X0=y
+CONFIG_CADENCE_TTC_TIMER=y
+CONFIG_CADENCE_WATCHDOG=y
+CONFIG_CLKSRC_ARM_GLOBAL_TIMER_SCHED_CLOCK=y
+CONFIG_CLKSRC_MMIO=y
+CONFIG_CLKSRC_VERSATILE=y
+CONFIG_CLK_SP810=y
+CONFIG_CLK_VEXPRESS_OSC=y
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_CMA=y
+CONFIG_CMA_ALIGNMENT=8
+CONFIG_CMA_AREAS=7
+# CONFIG_CMA_DEBUG is not set
+# CONFIG_CMA_DEBUGFS is not set
+CONFIG_CMA_SIZE_MBYTES=16
+# CONFIG_CMA_SIZE_SEL_MAX is not set
+CONFIG_CMA_SIZE_SEL_MBYTES=y
+# CONFIG_CMA_SIZE_SEL_MIN is not set
+# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
+# CONFIG_CMA_SYSFS is not set
+CONFIG_COMMON_CLK=y
+CONFIG_COMMON_CLK_SI570=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONNECTOR=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CONTIG_ALLOC=y
+CONFIG_COREDUMP=y
+# CONFIG_CPUFREQ_DT is not set
+CONFIG_CPU_32v6K=y
+CONFIG_CPU_32v7=y
+CONFIG_CPU_ABRT_EV7=y
+CONFIG_CPU_CACHE_V7=y
+CONFIG_CPU_CACHE_VIPT=y
+CONFIG_CPU_COPY_V6=y
+CONFIG_CPU_CP15=y
+CONFIG_CPU_CP15_MMU=y
+CONFIG_CPU_FREQ=y
+# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
+CONFIG_CPU_FREQ_DEFAULT_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_GOV_ATTR_SET=y
+CONFIG_CPU_FREQ_GOV_COMMON=y
+CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
+CONFIG_CPU_FREQ_GOV_ONDEMAND=y
+CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
+CONFIG_CPU_FREQ_GOV_POWERSAVE=y
+CONFIG_CPU_FREQ_GOV_USERSPACE=y
+CONFIG_CPU_FREQ_STAT=y
+CONFIG_CPU_HAS_ASID=y
+CONFIG_CPU_IDLE=y
+CONFIG_CPU_IDLE_GOV_LADDER=y
+CONFIG_CPU_IDLE_GOV_MENU=y
+CONFIG_CPU_PABRT_V7=y
+CONFIG_CPU_PM=y
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SPECTRE=y
+CONFIG_CPU_THERMAL=y
+CONFIG_CPU_THUMB_CAPABLE=y
+CONFIG_CPU_TLB_V7=y
+CONFIG_CPU_V7=y
+CONFIG_CRC16=y
+# CONFIG_CRC32_SARWATE is not set
+CONFIG_CRC32_SLICEBY8=y
+CONFIG_CROSS_MEMORY_ATTACH=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_HW=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_RNG2=y
+CONFIG_DCACHE_WORD_ACCESS=y
+CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
+CONFIG_DMADEVICES=y
+CONFIG_DMA_CMA=y
+CONFIG_DMA_ENGINE=y
+CONFIG_DMA_OF=y
+CONFIG_DMA_OPS=y
+CONFIG_DMA_REMAP=y
+CONFIG_DMA_SHARED_BUFFER=y
+CONFIG_DRM=y
+CONFIG_DRM_BRIDGE=y
+CONFIG_DRM_FBDEV_EMULATION=y
+CONFIG_DRM_FBDEV_OVERALLOC=100
+CONFIG_DRM_KMS_HELPER=y
+CONFIG_DRM_PANEL=y
+CONFIG_DRM_PANEL_BRIDGE=y
+CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
+CONFIG_DTC=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_E1000E=y
+CONFIG_EDAC=y
+CONFIG_EDAC_ATOMIC_SCRUB=y
+# CONFIG_EDAC_DEBUG is not set
+CONFIG_EDAC_LEGACY_SYSFS=y
+CONFIG_EDAC_SUPPORT=y
+# CONFIG_EDAC_SYNOPSYS is not set
+CONFIG_EEPROM_AT24=y
+CONFIG_EEPROM_AT25=y
+CONFIG_ELF_CORE=y
+CONFIG_EXT4_FS=y
+CONFIG_EXTCON=y
+CONFIG_F2FS_FS=y
+CONFIG_FB=y
+CONFIG_FB_CFB_COPYAREA=y
+CONFIG_FB_CFB_FILLRECT=y
+CONFIG_FB_CFB_IMAGEBLIT=y
+CONFIG_FB_CMDLINE=y
+CONFIG_FB_DEFERRED_IO=y
+CONFIG_FB_SYS_COPYAREA=y
+CONFIG_FB_SYS_FILLRECT=y
+CONFIG_FB_SYS_FOPS=y
+CONFIG_FB_SYS_IMAGEBLIT=y
+# CONFIG_FB_XILINX is not set
+CONFIG_FHANDLE=y
+CONFIG_FIXED_PHY=y
+CONFIG_FIX_EARLYCON_MEM=y
+CONFIG_FPGA=y
+CONFIG_FPGA_BRIDGE=y
+# CONFIG_FPGA_DFL is not set
+# CONFIG_FPGA_MGR_ALTERA_CVP is not set
+# CONFIG_FPGA_MGR_ALTERA_PS_SPI is not set
+# CONFIG_FPGA_MGR_ICE40_SPI is not set
+# CONFIG_FPGA_MGR_MACHXO2_SPI is not set
+# CONFIG_FPGA_MGR_XILINX_SPI is not set
+CONFIG_FPGA_MGR_ZYNQ_FPGA=y
+CONFIG_FPGA_REGION=y
+CONFIG_FREEZER=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FWNODE_MDIO=y
+CONFIG_FW_CACHE=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ALLOCATOR=y
+CONFIG_GENERIC_ARCH_TOPOLOGY=y
+CONFIG_GENERIC_BUG=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_CPU_VULNERABILITIES=y
+CONFIG_GENERIC_EARLY_IOREMAP=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_MIGRATION=y
+CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
+CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
+CONFIG_GENERIC_MSI_IRQ=y
+CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_PINCONF=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_STRNCPY_FROM_USER=y
+CONFIG_GENERIC_STRNLEN_USER=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GENERIC_VDSO_32=y
+CONFIG_GLOB=y
+CONFIG_GPIOLIB_IRQCHIP=y
+CONFIG_GPIO_CDEV=y
+CONFIG_GPIO_GENERIC=y
+CONFIG_GPIO_GENERIC_PLATFORM=y
+CONFIG_GPIO_ZYNQ=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HARDEN_BRANCH_PREDICTOR=y
+CONFIG_HARDIRQS_SW_RESEND=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAVE_SMP=y
+CONFIG_HDMI=y
+CONFIG_HID=y
+CONFIG_HID_GENERIC=y
+CONFIG_HID_MICROSOFT=y
+CONFIG_HIGHMEM=y
+CONFIG_HIGHPTE=y
+CONFIG_HOTPLUG_CPU=y
+CONFIG_HWMON=y
+CONFIG_HW_CONSOLE=y
+CONFIG_HZ_FIXED=0
+CONFIG_I2C=y
+CONFIG_I2C_ALGOBIT=y
+CONFIG_I2C_BOARDINFO=y
+CONFIG_I2C_CADENCE=y
+CONFIG_I2C_CHARDEV=y
+CONFIG_I2C_COMPAT=y
+CONFIG_I2C_HELPER_AUTO=y
+CONFIG_I2C_MUX=y
+CONFIG_I2C_MUX_PCA954x=y
+CONFIG_ICST=y
+CONFIG_IIO=y
+CONFIG_IIO_BUFFER=y
+CONFIG_IIO_KFIFO_BUF=y
+CONFIG_IIO_TRIGGER=y
+CONFIG_IIO_TRIGGERED_BUFFER=y
+CONFIG_INITRAMFS_SOURCE=""
+CONFIG_INPUT=y
+CONFIG_INPUT_EVDEV=y
+CONFIG_INPUT_FF_MEMLESS=y
+CONFIG_INPUT_KEYBOARD=y
+CONFIG_INPUT_MOUSE=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_INPUT_SPARSEKMAP=y
+# CONFIG_IOMMU_DEBUGFS is not set
+# CONFIG_IOMMU_IO_PGTABLE_ARMV7S is not set
+# CONFIG_IOMMU_IO_PGTABLE_LPAE is not set
+CONFIG_IOMMU_SUPPORT=y
+CONFIG_IP_PNP=y
+CONFIG_IP_PNP_BOOTP=y
+CONFIG_IP_PNP_DHCP=y
+CONFIG_IP_PNP_RARP=y
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_WORK=y
+# CONFIG_ISDN is not set
+CONFIG_JBD2=y
+# CONFIG_JFFS2_COMPRESSION_OPTIONS is not set
+CONFIG_JFFS2_ZLIB=y
+CONFIG_KCMP=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_XZ is not set
+CONFIG_KEYBOARD_ATKBD=y
+CONFIG_KEYBOARD_GPIO=y
+CONFIG_KEYBOARD_GPIO_POLLED=y
+CONFIG_KMAP_LOCAL=y
+CONFIG_KMAP_LOCAL_NON_LINEAR_PTE_ARRAY=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGER_BACKLIGHT=y
+CONFIG_LEDS_TRIGGER_CAMERA=y
+CONFIG_LEDS_TRIGGER_CPU=y
+CONFIG_LEDS_TRIGGER_GPIO=y
+CONFIG_LEDS_TRIGGER_ONESHOT=y
+CONFIG_LEDS_TRIGGER_TRANSIENT=y
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_LOCK_SPIN_ON_OWNER=y
+CONFIG_MACB=y
+# CONFIG_MACB_PCI is not set
+CONFIG_MACB_USE_HWSTAMP=y
+CONFIG_MARVELL_PHY=y
+CONFIG_MDIO_BITBANG=y
+CONFIG_MDIO_BUS=y
+CONFIG_MDIO_DEVICE=y
+CONFIG_MDIO_DEVRES=y
+# CONFIG_MDIO_GPIO is not set
+CONFIG_MEMFD_CREATE=y
+CONFIG_MEMORY=y
+CONFIG_MEMORY_ISOLATION=y
+CONFIG_MFD_CORE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MFD_VEXPRESS_SYSREG=y
+CONFIG_MIGHT_HAVE_CACHE_L2X0=y
+CONFIG_MIGRATION=y
+CONFIG_MMC=y
+CONFIG_MMC_BLOCK=y
+CONFIG_MMC_CQHCI=y
+CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_OF_ARASAN=y
+# CONFIG_MMC_SDHCI_PCI is not set
+CONFIG_MMC_SDHCI_PLTFM=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+# CONFIG_MODULE_STRIPPED is not set
+# CONFIG_MOUSE_BCM5974 is not set
+# CONFIG_MOUSE_CYAPA is not set
+CONFIG_MOUSE_PS2=y
+CONFIG_MOUSE_PS2_ALPS=y
+CONFIG_MOUSE_PS2_BYD=y
+CONFIG_MOUSE_PS2_CYPRESS=y
+# CONFIG_MOUSE_PS2_ELANTECH is not set
+CONFIG_MOUSE_PS2_FOCALTECH=y
+CONFIG_MOUSE_PS2_LOGIPS2PP=y
+CONFIG_MOUSE_PS2_SMBUS=y
+CONFIG_MOUSE_PS2_SYNAPTICS=y
+CONFIG_MOUSE_PS2_SYNAPTICS_SMBUS=y
+# CONFIG_MOUSE_PS2_TOUCHKIT is not set
+CONFIG_MOUSE_PS2_TRACKPOINT=y
+# CONFIG_MOUSE_SERIAL is not set
+# CONFIG_MOUSE_VSXXXAA is not set
+# CONFIG_MTD_CFI_INTELEXT is not set
+CONFIG_MTD_CMDLINE_PARTS=y
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_MTD_PHYSMAP=y
+CONFIG_MTD_SPI_NOR=y
+CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
+CONFIG_MTD_SPLIT_FIRMWARE=y
+# CONFIG_MTD_SPLIT_SQUASHFS_ROOT is not set
+CONFIG_MUTEX_SPIN_ON_OWNER=y
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEON=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_PTP_CLASSIFY=y
+CONFIG_NET_SELFTESTS=y
+# CONFIG_NET_VENDOR_CIRRUS is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_MICROCHIP is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+# CONFIG_NET_VENDOR_VIA is not set
+CONFIG_NLS=y
+CONFIG_NLS_ASCII=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_NOP_USB_XCEIV=y
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NO_IOPORT_MAP=y
+CONFIG_NR_CPUS=4
+CONFIG_NVMEM=y
+CONFIG_NVMEM_SYSFS=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+# CONFIG_OF_FPGA_REGION is not set
+CONFIG_OF_GPIO=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_OF_MDIO=y
+CONFIG_OLD_SIGACTION=y
+CONFIG_OLD_SIGSUSPEND3=y
+CONFIG_OUTER_CACHE=y
+CONFIG_OUTER_CACHE_SYNC=y
+CONFIG_PADATA=y
+CONFIG_PAGE_OFFSET=0xC0000000
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_PCI=y
+CONFIG_PCIE_XILINX=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DOMAINS_GENERIC=y
+CONFIG_PCI_MSI=y
+CONFIG_PCI_MSI_IRQ_DOMAIN=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_PHYLIB=y
+CONFIG_PHYLINK=y
+CONFIG_PINCTRL=y
+# CONFIG_PINCTRL_SINGLE is not set
+CONFIG_PINCTRL_ZYNQ=y
+CONFIG_PL310_ERRATA_588369=y
+CONFIG_PL310_ERRATA_727915=y
+CONFIG_PL310_ERRATA_753970=y
+CONFIG_PL310_ERRATA_769419=y
+CONFIG_PL330_DMA=y
+# CONFIG_PL353_SMC is not set
+CONFIG_PLAT_VERSATILE=y
+CONFIG_PM=y
+CONFIG_PMBUS=y
+CONFIG_PM_CLK=y
+CONFIG_PM_SLEEP=y
+CONFIG_PM_SLEEP_SMP=y
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_VEXPRESS=y
+CONFIG_POWER_SUPPLY=y
+CONFIG_PPS=y
+CONFIG_PROC_EVENTS=y
+CONFIG_PTP_1588_CLOCK=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_R8169=y
+CONFIG_RAS=y
+CONFIG_RATIONAL=y
+CONFIG_REALTEK_PHY=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_I2C=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_REGULATOR=y
+CONFIG_REGULATOR_FIXED_VOLTAGE=y
+# CONFIG_REGULATOR_VEXPRESS is not set
+CONFIG_RESET_CONTROLLER=y
+CONFIG_RESET_ZYNQ=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_PCF8563=y
+CONFIG_RTC_I2C_AND_SPI=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_RWSEM_SPIN_ON_OWNER=y
+# CONFIG_SCHED_CORE is not set
+CONFIG_SCHED_MC=y
+CONFIG_SCHED_SMT=y
+CONFIG_SENSORS_PMBUS=y
+CONFIG_SENSORS_UCD9000=y
+CONFIG_SENSORS_UCD9200=y
+# CONFIG_SERIAL_8250 is not set
+CONFIG_SERIAL_XILINX_PS_UART=y
+CONFIG_SERIAL_XILINX_PS_UART_CONSOLE=y
+CONFIG_SERIO=y
+CONFIG_SERIO_LIBPS2=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SMP=y
+CONFIG_SMP_ON_UP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SOC_BUS=y
+CONFIG_SPARSE_IRQ=y
+CONFIG_SPI=y
+CONFIG_SPI_BITBANG=y
+CONFIG_SPI_CADENCE=y
+CONFIG_SPI_MASTER=y
+CONFIG_SPI_MEM=y
+CONFIG_SPI_XILINX=y
+CONFIG_SPI_ZYNQ_QSPI=y
+CONFIG_SRAM=y
+CONFIG_SRAM_EXEC=y
+CONFIG_SRCU=y
+# CONFIG_STRIP_ASM_SYMS is not set
+CONFIG_SUSPEND=y
+CONFIG_SUSPEND_FREEZER=y
+CONFIG_SWPHY=y
+CONFIG_SWP_EMULATE=y
+CONFIG_SYNC_FILE=y
+CONFIG_SYSFS_SYSCALL=y
+CONFIG_SYS_SUPPORTS_APM_EMULATION=y
+# CONFIG_TEXTSEARCH is not set
+CONFIG_THERMAL=y
+CONFIG_THERMAL_DEFAULT_GOV_STEP_WISE=y
+CONFIG_THERMAL_EMERGENCY_POWEROFF_DELAY_MS=0
+CONFIG_THERMAL_GOV_STEP_WISE=y
+CONFIG_THERMAL_HWMON=y
+CONFIG_THERMAL_OF=y
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_UIO=y
+# CONFIG_UIO_AEC is not set
+# CONFIG_UIO_CIF is not set
+# CONFIG_UIO_DMEM_GENIRQ is not set
+# CONFIG_UIO_MF624 is not set
+# CONFIG_UIO_NETX is not set
+# CONFIG_UIO_PCI_GENERIC is not set
+CONFIG_UIO_PDRV_GENIRQ=y
+# CONFIG_UIO_PRUSS is not set
+# CONFIG_UIO_SERCOS3 is not set
+CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
+CONFIG_UNWINDER_ARM=y
+CONFIG_USB=y
+CONFIG_USB_CHIPIDEA=y
+CONFIG_USB_CHIPIDEA_HOST=y
+CONFIG_USB_CHIPIDEA_UDC=y
+CONFIG_USB_COMMON=y
+CONFIG_USB_EHCI_HCD=y
+# CONFIG_USB_EHCI_HCD_PLATFORM is not set
+# CONFIG_USB_EHCI_TT_NEWSCHED is not set
+CONFIG_USB_GADGET=y
+CONFIG_USB_GADGET_XILINX=y
+CONFIG_USB_HID=y
+CONFIG_USB_NET_DRIVERS=y
+CONFIG_USB_OTG=y
+CONFIG_USB_OTG_FSM=y
+CONFIG_USB_PHY=y
+CONFIG_USB_ROLE_SWITCH=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USB_ULPI=y
+CONFIG_USB_ULPI_BUS=y
+CONFIG_USB_ULPI_VIEWPORT=y
+CONFIG_USE_OF=y
+CONFIG_VEXPRESS_CONFIG=y
+CONFIG_VFP=y
+CONFIG_VFPv3=y
+CONFIG_VGA_ARB=y
+CONFIG_VGA_ARB_MAX_GPUS=16
+CONFIG_VITESSE_PHY=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_VT_CONSOLE_SLEEP=y
+# CONFIG_VT_HW_CONSOLE_BINDING is not set
+CONFIG_WATCHDOG_CORE=y
+# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
+CONFIG_XILINX_EMACLITE=y
+# CONFIG_XILINX_INTC is not set
+# CONFIG_XILINX_PR_DECOUPLER is not set
+CONFIG_XILINX_WATCHDOG=y
+CONFIG_XILINX_XADC=y
+CONFIG_XPS=y
+CONFIG_XZ_DEC_ARM=y
+CONFIG_XZ_DEC_ARMTHUMB=y
+CONFIG_XZ_DEC_BCJ=y
+CONFIG_XZ_DEC_IA64=y
+CONFIG_XZ_DEC_POWERPC=y
+CONFIG_XZ_DEC_SPARC=y
+CONFIG_XZ_DEC_X86=y
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZLIB_DEFLATE=y
+CONFIG_ZLIB_INFLATE=y



From lede-commits at lists.infradead.org  Sun Apr 28 08:51:07 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 11:51:07 -0400
Subject: [openwrt/openwrt]  at91: set 6.1 as default kernel version
In-Reply-To: <171431946790.3225928.16979937470218322278@git-01.infra.openwrt.org>
References: <171431946790.3225928.16979937470218322278@git-01.infra.openwrt.org>
Message-ID: <mailman.31613.1714319471.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4088ea0475e3b6a21f72650ad05b77c05662243c

commit 4088ea0475e3b6a21f72650ad05b77c05662243c
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Mon Apr 22 10:18:02 2024 +0200

    at91: set 6.1 as default kernel version
    
    Adjust the kernel version to default 6.1 in order to facilitate testing
    for a broader audience.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 target/linux/at91/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/at91/Makefile b/target/linux/at91/Makefile
index 10608bff77..d02a32071b 100644
--- a/target/linux/at91/Makefile
+++ b/target/linux/at91/Makefile
@@ -10,8 +10,7 @@ BOARDNAME:=Microchip (Atmel AT91)
 FEATURES:=ext4 squashfs targz usbgadget ubifs
 SUBTARGETS:=sama7 sama5 sam9x
 
-KERNEL_PATCHVER:=5.15
-KERNEL_TESTING_PATCHVER:=6.1
+KERNEL_PATCHVER:=6.1
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Sun Apr 28 08:51:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 11:51:08 -0400
Subject: [openwrt/openwrt]  at91: 5.15: remove old config and patch files
In-Reply-To: <171431946790.3225928.16979937470218322278@git-01.infra.openwrt.org>
References: <171431946790.3225928.16979937470218322278@git-01.infra.openwrt.org>
Message-ID: <mailman.31614.1714319474.1280.lede-commits@lists.infradead.org>

nick pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/de976f8fe0b0067db68cab08d9e5f8fcc8bed6de

commit de976f8fe0b0067db68cab08d9e5f8fcc8bed6de
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Mon Apr 22 10:16:11 2024 +0200

    at91: 5.15: remove old config and patch files
    
    6.1 is now default so remove old config and patch files.
    
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 ...-clk-at91-re-factor-clocks-suspend-resume.patch | 1342 --------------------
 ...c-execute-suspend-resume-only-for-backup-.patch |   89 --
 ...k-master-add-register-definition-for-sama.patch |  124 --
 ...k-master-improve-readability-by-using-loc.patch |   40 -
 ...c-add-sama7g5-to-the-list-of-available-pm.patch |   39 -
 ...-clk-master-mask-mckr-against-layout-mask.patch |   46 -
 ...k-sam9x60-pll-add-notifier-for-div-part-o.patch |  312 -----
 ...-at91-clk-master-add-notifier-for-divider.patch |  519 --------
 ...1-sama7g5-set-low-limit-for-mck0-at-32KHz.patch |   26 -
 ...-clk_core_get_rate_recalc-in-clk_rate_get.patch |   32 -
 target/linux/at91/sam9x/config-5.15                |  317 -----
 target/linux/at91/sama5/config-5.15                |  493 -------
 target/linux/at91/sama7/config-5.15                |  406 ------
 13 files changed, 3785 deletions(-)

diff --git a/target/linux/at91/patches-5.15/100-clk-at91-re-factor-clocks-suspend-resume.patch b/target/linux/at91/patches-5.15/100-clk-at91-re-factor-clocks-suspend-resume.patch
deleted file mode 100644
index 5d399f6535..0000000000
--- a/target/linux/at91/patches-5.15/100-clk-at91-re-factor-clocks-suspend-resume.patch
+++ /dev/null
@@ -1,1342 +0,0 @@
-From 65bb4687b2a5c6f02f44345540c3389d6e7523e7 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:05 +0300
-Subject: [PATCH 234/247] clk: at91: re-factor clocks suspend/resume
-
-SAMA5D2 and SAMA7G5 have a special power saving mode (backup mode) where
-most of the SoC's components are powered off (including PMC). Resuming
-from this mode is done with the help of bootloader. Peripherals are not
-aware of the power saving mode thus most of them are disabling clocks in
-proper suspend API and re-enable them in resume API without taking into
-account the previously setup rate. Moreover some of the peripherals are
-acting as wakeup sources and are not disabling the clocks in this
-scenario, when suspending. Since backup mode cuts the power for
-peripherals, in resume part these clocks needs to be re-configured.
-
-The initial PMC suspend/resume code was designed only for SAMA5D2's PMC
-(as it was the only one supporting backup mode). SAMA7G supports also
-backup mode and its PMC is different (few new functionalities, different
-registers offsets, different offsets in registers for each
-functionalities). To address both SAMA5D2 and SAMA7G5 PMC add
-.save_context()/.resume_context() support to each clocks driver and call
-this from PMC driver.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-2-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-generated.c    |  46 +++++--
- drivers/clk/at91/clk-main.c         |  66 ++++++++++
- drivers/clk/at91/clk-master.c       | 194 ++++++++++++++++++++++++++--
- drivers/clk/at91/clk-peripheral.c   |  40 +++++-
- drivers/clk/at91/clk-pll.c          |  39 ++++++
- drivers/clk/at91/clk-programmable.c |  29 ++++-
- drivers/clk/at91/clk-sam9x60-pll.c  |  68 +++++++++-
- drivers/clk/at91/clk-system.c       |  20 +++
- drivers/clk/at91/clk-usb.c          |  27 ++++
- drivers/clk/at91/clk-utmi.c         |  39 ++++++
- drivers/clk/at91/pmc.c              | 147 +--------------------
- drivers/clk/at91/pmc.h              |  24 ++--
- 12 files changed, 558 insertions(+), 181 deletions(-)
-
---- a/drivers/clk/at91/clk-generated.c
-+++ b/drivers/clk/at91/clk-generated.c
-@@ -27,6 +27,7 @@ struct clk_generated {
- 	u32 id;
- 	u32 gckdiv;
- 	const struct clk_pcr_layout *layout;
-+	struct at91_clk_pms pms;
- 	u8 parent_id;
- 	int chg_pid;
- };
-@@ -34,25 +35,35 @@ struct clk_generated {
- #define to_clk_generated(hw) \
- 	container_of(hw, struct clk_generated, hw)
- 
--static int clk_generated_enable(struct clk_hw *hw)
-+static int clk_generated_set(struct clk_generated *gck, int status)
- {
--	struct clk_generated *gck = to_clk_generated(hw);
- 	unsigned long flags;
--
--	pr_debug("GCLK: %s, gckdiv = %d, parent id = %d\n",
--		 __func__, gck->gckdiv, gck->parent_id);
-+	unsigned int enable = status ? AT91_PMC_PCR_GCKEN : 0;
- 
- 	spin_lock_irqsave(gck->lock, flags);
- 	regmap_write(gck->regmap, gck->layout->offset,
- 		     (gck->id & gck->layout->pid_mask));
- 	regmap_update_bits(gck->regmap, gck->layout->offset,
- 			   AT91_PMC_PCR_GCKDIV_MASK | gck->layout->gckcss_mask |
--			   gck->layout->cmd | AT91_PMC_PCR_GCKEN,
-+			   gck->layout->cmd | enable,
- 			   field_prep(gck->layout->gckcss_mask, gck->parent_id) |
- 			   gck->layout->cmd |
- 			   FIELD_PREP(AT91_PMC_PCR_GCKDIV_MASK, gck->gckdiv) |
--			   AT91_PMC_PCR_GCKEN);
-+			   enable);
- 	spin_unlock_irqrestore(gck->lock, flags);
-+
-+	return 0;
-+}
-+
-+static int clk_generated_enable(struct clk_hw *hw)
-+{
-+	struct clk_generated *gck = to_clk_generated(hw);
-+
-+	pr_debug("GCLK: %s, gckdiv = %d, parent id = %d\n",
-+		 __func__, gck->gckdiv, gck->parent_id);
-+
-+	clk_generated_set(gck, 1);
-+
- 	return 0;
- }
- 
-@@ -249,6 +260,23 @@ static int clk_generated_set_rate(struct
- 	return 0;
- }
- 
-+static int clk_generated_save_context(struct clk_hw *hw)
-+{
-+	struct clk_generated *gck = to_clk_generated(hw);
-+
-+	gck->pms.status = clk_generated_is_enabled(&gck->hw);
-+
-+	return 0;
-+}
-+
-+static void clk_generated_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_generated *gck = to_clk_generated(hw);
-+
-+	if (gck->pms.status)
-+		clk_generated_set(gck, gck->pms.status);
-+}
-+
- static const struct clk_ops generated_ops = {
- 	.enable = clk_generated_enable,
- 	.disable = clk_generated_disable,
-@@ -258,6 +286,8 @@ static const struct clk_ops generated_op
- 	.get_parent = clk_generated_get_parent,
- 	.set_parent = clk_generated_set_parent,
- 	.set_rate = clk_generated_set_rate,
-+	.save_context = clk_generated_save_context,
-+	.restore_context = clk_generated_restore_context,
- };
- 
- /**
-@@ -324,8 +354,6 @@ at91_clk_register_generated(struct regma
- 	if (ret) {
- 		kfree(gck);
- 		hw = ERR_PTR(ret);
--	} else {
--		pmc_register_id(id);
- 	}
- 
- 	return hw;
---- a/drivers/clk/at91/clk-main.c
-+++ b/drivers/clk/at91/clk-main.c
-@@ -28,6 +28,7 @@
- struct clk_main_osc {
- 	struct clk_hw hw;
- 	struct regmap *regmap;
-+	struct at91_clk_pms pms;
- };
- 
- #define to_clk_main_osc(hw) container_of(hw, struct clk_main_osc, hw)
-@@ -37,6 +38,7 @@ struct clk_main_rc_osc {
- 	struct regmap *regmap;
- 	unsigned long frequency;
- 	unsigned long accuracy;
-+	struct at91_clk_pms pms;
- };
- 
- #define to_clk_main_rc_osc(hw) container_of(hw, struct clk_main_rc_osc, hw)
-@@ -51,6 +53,7 @@ struct clk_rm9200_main {
- struct clk_sam9x5_main {
- 	struct clk_hw hw;
- 	struct regmap *regmap;
-+	struct at91_clk_pms pms;
- 	u8 parent;
- };
- 
-@@ -120,10 +123,29 @@ static int clk_main_osc_is_prepared(stru
- 	return (status & AT91_PMC_MOSCS) && clk_main_parent_select(tmp);
- }
- 
-+static int clk_main_osc_save_context(struct clk_hw *hw)
-+{
-+	struct clk_main_osc *osc = to_clk_main_osc(hw);
-+
-+	osc->pms.status = clk_main_osc_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_main_osc_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_main_osc *osc = to_clk_main_osc(hw);
-+
-+	if (osc->pms.status)
-+		clk_main_osc_prepare(hw);
-+}
-+
- static const struct clk_ops main_osc_ops = {
- 	.prepare = clk_main_osc_prepare,
- 	.unprepare = clk_main_osc_unprepare,
- 	.is_prepared = clk_main_osc_is_prepared,
-+	.save_context = clk_main_osc_save_context,
-+	.restore_context = clk_main_osc_restore_context,
- };
- 
- struct clk_hw * __init
-@@ -240,12 +262,31 @@ static unsigned long clk_main_rc_osc_rec
- 	return osc->accuracy;
- }
- 
-+static int clk_main_rc_osc_save_context(struct clk_hw *hw)
-+{
-+	struct clk_main_rc_osc *osc = to_clk_main_rc_osc(hw);
-+
-+	osc->pms.status = clk_main_rc_osc_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_main_rc_osc_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_main_rc_osc *osc = to_clk_main_rc_osc(hw);
-+
-+	if (osc->pms.status)
-+		clk_main_rc_osc_prepare(hw);
-+}
-+
- static const struct clk_ops main_rc_osc_ops = {
- 	.prepare = clk_main_rc_osc_prepare,
- 	.unprepare = clk_main_rc_osc_unprepare,
- 	.is_prepared = clk_main_rc_osc_is_prepared,
- 	.recalc_rate = clk_main_rc_osc_recalc_rate,
- 	.recalc_accuracy = clk_main_rc_osc_recalc_accuracy,
-+	.save_context = clk_main_rc_osc_save_context,
-+	.restore_context = clk_main_rc_osc_restore_context,
- };
- 
- struct clk_hw * __init
-@@ -465,12 +506,37 @@ static u8 clk_sam9x5_main_get_parent(str
- 	return clk_main_parent_select(status);
- }
- 
-+static int clk_sam9x5_main_save_context(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_main *clkmain = to_clk_sam9x5_main(hw);
-+
-+	clkmain->pms.status = clk_main_rc_osc_is_prepared(&clkmain->hw);
-+	clkmain->pms.parent = clk_sam9x5_main_get_parent(&clkmain->hw);
-+
-+	return 0;
-+}
-+
-+static void clk_sam9x5_main_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_main *clkmain = to_clk_sam9x5_main(hw);
-+	int ret;
-+
-+	ret = clk_sam9x5_main_set_parent(hw, clkmain->pms.parent);
-+	if (ret)
-+		return;
-+
-+	if (clkmain->pms.status)
-+		clk_sam9x5_main_prepare(hw);
-+}
-+
- static const struct clk_ops sam9x5_main_ops = {
- 	.prepare = clk_sam9x5_main_prepare,
- 	.is_prepared = clk_sam9x5_main_is_prepared,
- 	.recalc_rate = clk_sam9x5_main_recalc_rate,
- 	.set_parent = clk_sam9x5_main_set_parent,
- 	.get_parent = clk_sam9x5_main_get_parent,
-+	.save_context = clk_sam9x5_main_save_context,
-+	.restore_context = clk_sam9x5_main_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -37,6 +37,7 @@ struct clk_master {
- 	spinlock_t *lock;
- 	const struct clk_master_layout *layout;
- 	const struct clk_master_characteristics *characteristics;
-+	struct at91_clk_pms pms;
- 	u32 *mux_table;
- 	u32 mckr;
- 	int chg_pid;
-@@ -112,10 +113,52 @@ static unsigned long clk_master_div_reca
- 	return rate;
- }
- 
-+static int clk_master_div_save_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+	unsigned long flags;
-+	unsigned int mckr, div;
-+
-+	spin_lock_irqsave(master->lock, flags);
-+	regmap_read(master->regmap, master->layout->offset, &mckr);
-+	spin_unlock_irqrestore(master->lock, flags);
-+
-+	mckr &= master->layout->mask;
-+	div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+	div = master->characteristics->divisors[div];
-+
-+	master->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	master->pms.rate = DIV_ROUND_CLOSEST(master->pms.parent_rate, div);
-+
-+	return 0;
-+}
-+
-+static void clk_master_div_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	unsigned long flags;
-+	unsigned int mckr;
-+	u8 div;
-+
-+	spin_lock_irqsave(master->lock, flags);
-+	regmap_read(master->regmap, master->layout->offset, &mckr);
-+	spin_unlock_irqrestore(master->lock, flags);
-+
-+	mckr &= master->layout->mask;
-+	div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+	div = master->characteristics->divisors[div];
-+
-+	if (div != DIV_ROUND_CLOSEST(master->pms.parent_rate, master->pms.rate))
-+		pr_warn("MCKR DIV not configured properly by firmware!\n");
-+}
-+
- static const struct clk_ops master_div_ops = {
- 	.prepare = clk_master_prepare,
- 	.is_prepared = clk_master_is_prepared,
- 	.recalc_rate = clk_master_div_recalc_rate,
-+	.save_context = clk_master_div_save_context,
-+	.restore_context = clk_master_div_restore_context,
- };
- 
- static int clk_master_div_set_rate(struct clk_hw *hw, unsigned long rate,
-@@ -125,7 +168,9 @@ static int clk_master_div_set_rate(struc
- 	const struct clk_master_characteristics *characteristics =
- 						master->characteristics;
- 	unsigned long flags;
-+	unsigned int mckr, tmp;
- 	int div, i;
-+	int ret;
- 
- 	div = DIV_ROUND_CLOSEST(parent_rate, rate);
- 	if (div > ARRAY_SIZE(characteristics->divisors))
-@@ -145,11 +190,24 @@ static int clk_master_div_set_rate(struc
- 		return -EINVAL;
- 
- 	spin_lock_irqsave(master->lock, flags);
--	regmap_update_bits(master->regmap, master->layout->offset,
--			   (MASTER_DIV_MASK << MASTER_DIV_SHIFT),
--			   (div << MASTER_DIV_SHIFT));
-+	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
-+	if (ret)
-+		goto unlock;
-+
-+	tmp = mckr & master->layout->mask;
-+	tmp = (tmp >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+	if (tmp == div)
-+		goto unlock;
-+
-+	mckr &= ~(MASTER_DIV_MASK << MASTER_DIV_SHIFT);
-+	mckr |= (div << MASTER_DIV_SHIFT);
-+	ret = regmap_write(master->regmap, master->layout->offset, mckr);
-+	if (ret)
-+		goto unlock;
-+
- 	while (!clk_master_ready(master))
- 		cpu_relax();
-+unlock:
- 	spin_unlock_irqrestore(master->lock, flags);
- 
- 	return 0;
-@@ -197,12 +255,25 @@ static int clk_master_div_determine_rate
- 	return 0;
- }
- 
-+static void clk_master_div_restore_context_chg(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	int ret;
-+
-+	ret = clk_master_div_set_rate(hw, master->pms.rate,
-+				      master->pms.parent_rate);
-+	if (ret)
-+		pr_warn("Failed to restore MCK DIV clock\n");
-+}
-+
- static const struct clk_ops master_div_ops_chg = {
- 	.prepare = clk_master_prepare,
- 	.is_prepared = clk_master_is_prepared,
- 	.recalc_rate = clk_master_div_recalc_rate,
- 	.determine_rate = clk_master_div_determine_rate,
- 	.set_rate = clk_master_div_set_rate,
-+	.save_context = clk_master_div_save_context,
-+	.restore_context = clk_master_div_restore_context_chg,
- };
- 
- static void clk_sama7g5_master_best_diff(struct clk_rate_request *req,
-@@ -272,7 +343,8 @@ static int clk_master_pres_set_rate(stru
- {
- 	struct clk_master *master = to_clk_master(hw);
- 	unsigned long flags;
--	unsigned int pres;
-+	unsigned int pres, mckr, tmp;
-+	int ret;
- 
- 	pres = DIV_ROUND_CLOSEST(parent_rate, rate);
- 	if (pres > MASTER_PRES_MAX)
-@@ -284,15 +356,27 @@ static int clk_master_pres_set_rate(stru
- 		pres = ffs(pres) - 1;
- 
- 	spin_lock_irqsave(master->lock, flags);
--	regmap_update_bits(master->regmap, master->layout->offset,
--			   (MASTER_PRES_MASK << master->layout->pres_shift),
--			   (pres << master->layout->pres_shift));
-+	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
-+	if (ret)
-+		goto unlock;
-+
-+	mckr &= master->layout->mask;
-+	tmp = (mckr >> master->layout->pres_shift) & MASTER_PRES_MASK;
-+	if (pres == tmp)
-+		goto unlock;
-+
-+	mckr &= ~(MASTER_PRES_MASK << master->layout->pres_shift);
-+	mckr |= (pres << master->layout->pres_shift);
-+	ret = regmap_write(master->regmap, master->layout->offset, mckr);
-+	if (ret)
-+		goto unlock;
- 
- 	while (!clk_master_ready(master))
- 		cpu_relax();
-+unlock:
- 	spin_unlock_irqrestore(master->lock, flags);
- 
--	return 0;
-+	return ret;
- }
- 
- static unsigned long clk_master_pres_recalc_rate(struct clk_hw *hw,
-@@ -330,11 +414,68 @@ static u8 clk_master_pres_get_parent(str
- 	return mckr & AT91_PMC_CSS;
- }
- 
-+static int clk_master_pres_save_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+	unsigned long flags;
-+	unsigned int val, pres;
-+
-+	spin_lock_irqsave(master->lock, flags);
-+	regmap_read(master->regmap, master->layout->offset, &val);
-+	spin_unlock_irqrestore(master->lock, flags);
-+
-+	val &= master->layout->mask;
-+	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
-+	if (pres == MASTER_PRES_MAX && master->characteristics->have_div3_pres)
-+		pres = 3;
-+	else
-+		pres = (1 << pres);
-+
-+	master->pms.parent = val & AT91_PMC_CSS;
-+	master->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	master->pms.rate = DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres);
-+
-+	return 0;
-+}
-+
-+static void clk_master_pres_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+	unsigned long flags;
-+	unsigned int val, pres;
-+
-+	spin_lock_irqsave(master->lock, flags);
-+	regmap_read(master->regmap, master->layout->offset, &val);
-+	spin_unlock_irqrestore(master->lock, flags);
-+
-+	val &= master->layout->mask;
-+	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
-+	if (pres == MASTER_PRES_MAX && master->characteristics->have_div3_pres)
-+		pres = 3;
-+	else
-+		pres = (1 << pres);
-+
-+	if (master->pms.rate !=
-+	    DIV_ROUND_CLOSEST_ULL(master->pms.parent_rate, pres) ||
-+	    (master->pms.parent != (val & AT91_PMC_CSS)))
-+		pr_warn("MCKR PRES was not configured properly by firmware!\n");
-+}
-+
-+static void clk_master_pres_restore_context_chg(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+
-+	clk_master_pres_set_rate(hw, master->pms.rate, master->pms.parent_rate);
-+}
-+
- static const struct clk_ops master_pres_ops = {
- 	.prepare = clk_master_prepare,
- 	.is_prepared = clk_master_is_prepared,
- 	.recalc_rate = clk_master_pres_recalc_rate,
- 	.get_parent = clk_master_pres_get_parent,
-+	.save_context = clk_master_pres_save_context,
-+	.restore_context = clk_master_pres_restore_context,
- };
- 
- static const struct clk_ops master_pres_ops_chg = {
-@@ -344,6 +485,8 @@ static const struct clk_ops master_pres_
- 	.recalc_rate = clk_master_pres_recalc_rate,
- 	.get_parent = clk_master_pres_get_parent,
- 	.set_rate = clk_master_pres_set_rate,
-+	.save_context = clk_master_pres_save_context,
-+	.restore_context = clk_master_pres_restore_context_chg,
- };
- 
- static struct clk_hw * __init
-@@ -539,20 +682,21 @@ static int clk_sama7g5_master_set_parent
- 	return 0;
- }
- 
--static int clk_sama7g5_master_enable(struct clk_hw *hw)
-+static void clk_sama7g5_master_set(struct clk_master *master,
-+				   unsigned int status)
- {
--	struct clk_master *master = to_clk_master(hw);
- 	unsigned long flags;
- 	unsigned int val, cparent;
-+	unsigned int enable = status ? PMC_MCR_EN : 0;
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
- 	regmap_write(master->regmap, PMC_MCR, PMC_MCR_ID(master->id));
- 	regmap_read(master->regmap, PMC_MCR, &val);
- 	regmap_update_bits(master->regmap, PMC_MCR,
--			   PMC_MCR_EN | PMC_MCR_CSS | PMC_MCR_DIV |
-+			   enable | PMC_MCR_CSS | PMC_MCR_DIV |
- 			   PMC_MCR_CMD | PMC_MCR_ID_MSK,
--			   PMC_MCR_EN | (master->parent << PMC_MCR_CSS_SHIFT) |
-+			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
- 			   (master->div << MASTER_DIV_SHIFT) |
- 			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
- 
-@@ -563,6 +707,13 @@ static int clk_sama7g5_master_enable(str
- 		cpu_relax();
- 
- 	spin_unlock_irqrestore(master->lock, flags);
-+}
-+
-+static int clk_sama7g5_master_enable(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+
-+	clk_sama7g5_master_set(master, 1);
- 
- 	return 0;
- }
-@@ -620,6 +771,23 @@ static int clk_sama7g5_master_set_rate(s
- 	return 0;
- }
- 
-+static int clk_sama7g5_master_save_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+
-+	master->pms.status = clk_sama7g5_master_is_enabled(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_sama7g5_master_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_master *master = to_clk_master(hw);
-+
-+	if (master->pms.status)
-+		clk_sama7g5_master_set(master, master->pms.status);
-+}
-+
- static const struct clk_ops sama7g5_master_ops = {
- 	.enable = clk_sama7g5_master_enable,
- 	.disable = clk_sama7g5_master_disable,
-@@ -629,6 +797,8 @@ static const struct clk_ops sama7g5_mast
- 	.set_rate = clk_sama7g5_master_set_rate,
- 	.get_parent = clk_sama7g5_master_get_parent,
- 	.set_parent = clk_sama7g5_master_set_parent,
-+	.save_context = clk_sama7g5_master_save_context,
-+	.restore_context = clk_sama7g5_master_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-peripheral.c
-+++ b/drivers/clk/at91/clk-peripheral.c
-@@ -37,6 +37,7 @@ struct clk_sam9x5_peripheral {
- 	u32 id;
- 	u32 div;
- 	const struct clk_pcr_layout *layout;
-+	struct at91_clk_pms pms;
- 	bool auto_div;
- 	int chg_pid;
- };
-@@ -155,10 +156,11 @@ static void clk_sam9x5_peripheral_autodi
- 	periph->div = shift;
- }
- 
--static int clk_sam9x5_peripheral_enable(struct clk_hw *hw)
-+static int clk_sam9x5_peripheral_set(struct clk_sam9x5_peripheral *periph,
-+				     unsigned int status)
- {
--	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
- 	unsigned long flags;
-+	unsigned int enable = status ? AT91_PMC_PCR_EN : 0;
- 
- 	if (periph->id < PERIPHERAL_ID_MIN)
- 		return 0;
-@@ -168,15 +170,21 @@ static int clk_sam9x5_peripheral_enable(
- 		     (periph->id & periph->layout->pid_mask));
- 	regmap_update_bits(periph->regmap, periph->layout->offset,
- 			   periph->layout->div_mask | periph->layout->cmd |
--			   AT91_PMC_PCR_EN,
-+			   enable,
- 			   field_prep(periph->layout->div_mask, periph->div) |
--			   periph->layout->cmd |
--			   AT91_PMC_PCR_EN);
-+			   periph->layout->cmd | enable);
- 	spin_unlock_irqrestore(periph->lock, flags);
- 
- 	return 0;
- }
- 
-+static int clk_sam9x5_peripheral_enable(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
-+
-+	return clk_sam9x5_peripheral_set(periph, 1);
-+}
-+
- static void clk_sam9x5_peripheral_disable(struct clk_hw *hw)
- {
- 	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
-@@ -393,6 +401,23 @@ static int clk_sam9x5_peripheral_set_rat
- 	return -EINVAL;
- }
- 
-+static int clk_sam9x5_peripheral_save_context(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
-+
-+	periph->pms.status = clk_sam9x5_peripheral_is_enabled(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_sam9x5_peripheral_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_sam9x5_peripheral *periph = to_clk_sam9x5_peripheral(hw);
-+
-+	if (periph->pms.status)
-+		clk_sam9x5_peripheral_set(periph, periph->pms.status);
-+}
-+
- static const struct clk_ops sam9x5_peripheral_ops = {
- 	.enable = clk_sam9x5_peripheral_enable,
- 	.disable = clk_sam9x5_peripheral_disable,
-@@ -400,6 +425,8 @@ static const struct clk_ops sam9x5_perip
- 	.recalc_rate = clk_sam9x5_peripheral_recalc_rate,
- 	.round_rate = clk_sam9x5_peripheral_round_rate,
- 	.set_rate = clk_sam9x5_peripheral_set_rate,
-+	.save_context = clk_sam9x5_peripheral_save_context,
-+	.restore_context = clk_sam9x5_peripheral_restore_context,
- };
- 
- static const struct clk_ops sam9x5_peripheral_chg_ops = {
-@@ -409,6 +436,8 @@ static const struct clk_ops sam9x5_perip
- 	.recalc_rate = clk_sam9x5_peripheral_recalc_rate,
- 	.determine_rate = clk_sam9x5_peripheral_determine_rate,
- 	.set_rate = clk_sam9x5_peripheral_set_rate,
-+	.save_context = clk_sam9x5_peripheral_save_context,
-+	.restore_context = clk_sam9x5_peripheral_restore_context,
- };
- 
- struct clk_hw * __init
-@@ -460,7 +489,6 @@ at91_clk_register_sam9x5_peripheral(stru
- 		hw = ERR_PTR(ret);
- 	} else {
- 		clk_sam9x5_peripheral_autodiv(periph);
--		pmc_register_id(id);
- 	}
- 
- 	return hw;
---- a/drivers/clk/at91/clk-pll.c
-+++ b/drivers/clk/at91/clk-pll.c
-@@ -40,6 +40,7 @@ struct clk_pll {
- 	u16 mul;
- 	const struct clk_pll_layout *layout;
- 	const struct clk_pll_characteristics *characteristics;
-+	struct at91_clk_pms pms;
- };
- 
- static inline bool clk_pll_ready(struct regmap *regmap, int id)
-@@ -260,6 +261,42 @@ static int clk_pll_set_rate(struct clk_h
- 	return 0;
- }
- 
-+static int clk_pll_save_context(struct clk_hw *hw)
-+{
-+	struct clk_pll *pll = to_clk_pll(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+
-+	pll->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	pll->pms.rate = clk_pll_recalc_rate(&pll->hw, pll->pms.parent_rate);
-+	pll->pms.status = clk_pll_ready(pll->regmap, PLL_REG(pll->id));
-+
-+	return 0;
-+}
-+
-+static void clk_pll_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_pll *pll = to_clk_pll(hw);
-+	unsigned long calc_rate;
-+	unsigned int pllr, pllr_out, pllr_count;
-+	u8 out = 0;
-+
-+	if (pll->characteristics->out)
-+		out = pll->characteristics->out[pll->range];
-+
-+	regmap_read(pll->regmap, PLL_REG(pll->id), &pllr);
-+
-+	calc_rate = (pll->pms.parent_rate / PLL_DIV(pllr)) *
-+		     (PLL_MUL(pllr, pll->layout) + 1);
-+	pllr_count = (pllr >> PLL_COUNT_SHIFT) & PLL_MAX_COUNT;
-+	pllr_out = (pllr >> PLL_OUT_SHIFT) & out;
-+
-+	if (pll->pms.rate != calc_rate ||
-+	    pll->pms.status != clk_pll_ready(pll->regmap, PLL_REG(pll->id)) ||
-+	    pllr_count != PLL_MAX_COUNT ||
-+	    (out && pllr_out != out))
-+		pr_warn("PLLAR was not configured properly by firmware\n");
-+}
-+
- static const struct clk_ops pll_ops = {
- 	.prepare = clk_pll_prepare,
- 	.unprepare = clk_pll_unprepare,
-@@ -267,6 +304,8 @@ static const struct clk_ops pll_ops = {
- 	.recalc_rate = clk_pll_recalc_rate,
- 	.round_rate = clk_pll_round_rate,
- 	.set_rate = clk_pll_set_rate,
-+	.save_context = clk_pll_save_context,
-+	.restore_context = clk_pll_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-programmable.c
-+++ b/drivers/clk/at91/clk-programmable.c
-@@ -24,6 +24,7 @@ struct clk_programmable {
- 	u32 *mux_table;
- 	u8 id;
- 	const struct clk_programmable_layout *layout;
-+	struct at91_clk_pms pms;
- };
- 
- #define to_clk_programmable(hw) container_of(hw, struct clk_programmable, hw)
-@@ -177,12 +178,38 @@ static int clk_programmable_set_rate(str
- 	return 0;
- }
- 
-+static int clk_programmable_save_context(struct clk_hw *hw)
-+{
-+	struct clk_programmable *prog = to_clk_programmable(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+
-+	prog->pms.parent = clk_programmable_get_parent(hw);
-+	prog->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	prog->pms.rate = clk_programmable_recalc_rate(hw, prog->pms.parent_rate);
-+
-+	return 0;
-+}
-+
-+static void clk_programmable_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_programmable *prog = to_clk_programmable(hw);
-+	int ret;
-+
-+	ret = clk_programmable_set_parent(hw, prog->pms.parent);
-+	if (ret)
-+		return;
-+
-+	clk_programmable_set_rate(hw, prog->pms.rate, prog->pms.parent_rate);
-+}
-+
- static const struct clk_ops programmable_ops = {
- 	.recalc_rate = clk_programmable_recalc_rate,
- 	.determine_rate = clk_programmable_determine_rate,
- 	.get_parent = clk_programmable_get_parent,
- 	.set_parent = clk_programmable_set_parent,
- 	.set_rate = clk_programmable_set_rate,
-+	.save_context = clk_programmable_save_context,
-+	.restore_context = clk_programmable_restore_context,
- };
- 
- struct clk_hw * __init
-@@ -221,8 +248,6 @@ at91_clk_register_programmable(struct re
- 	if (ret) {
- 		kfree(prog);
- 		hw = ERR_PTR(ret);
--	} else {
--		pmc_register_pck(id);
- 	}
- 
- 	return hw;
---- a/drivers/clk/at91/clk-sam9x60-pll.c
-+++ b/drivers/clk/at91/clk-sam9x60-pll.c
-@@ -38,12 +38,14 @@ struct sam9x60_pll_core {
- 
- struct sam9x60_frac {
- 	struct sam9x60_pll_core core;
-+	struct at91_clk_pms pms;
- 	u32 frac;
- 	u16 mul;
- };
- 
- struct sam9x60_div {
- 	struct sam9x60_pll_core core;
-+	struct at91_clk_pms pms;
- 	u8 div;
- };
- 
-@@ -75,9 +77,8 @@ static unsigned long sam9x60_frac_pll_re
- 		DIV_ROUND_CLOSEST_ULL((u64)parent_rate * frac->frac, (1 << 22));
- }
- 
--static int sam9x60_frac_pll_prepare(struct clk_hw *hw)
-+static int sam9x60_frac_pll_set(struct sam9x60_pll_core *core)
- {
--	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
- 	struct sam9x60_frac *frac = to_sam9x60_frac(core);
- 	struct regmap *regmap = core->regmap;
- 	unsigned int val, cfrac, cmul;
-@@ -141,6 +142,13 @@ unlock:
- 	return 0;
- }
- 
-+static int sam9x60_frac_pll_prepare(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+
-+	return sam9x60_frac_pll_set(core);
-+}
-+
- static void sam9x60_frac_pll_unprepare(struct clk_hw *hw)
- {
- 	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-@@ -280,6 +288,25 @@ unlock:
- 	return ret;
- }
- 
-+static int sam9x60_frac_pll_save_context(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+	struct sam9x60_frac *frac = to_sam9x60_frac(core);
-+
-+	frac->pms.status = sam9x60_pll_ready(core->regmap, core->id);
-+
-+	return 0;
-+}
-+
-+static void sam9x60_frac_pll_restore_context(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+	struct sam9x60_frac *frac = to_sam9x60_frac(core);
-+
-+	if (frac->pms.status)
-+		sam9x60_frac_pll_set(core);
-+}
-+
- static const struct clk_ops sam9x60_frac_pll_ops = {
- 	.prepare = sam9x60_frac_pll_prepare,
- 	.unprepare = sam9x60_frac_pll_unprepare,
-@@ -287,6 +314,8 @@ static const struct clk_ops sam9x60_frac
- 	.recalc_rate = sam9x60_frac_pll_recalc_rate,
- 	.round_rate = sam9x60_frac_pll_round_rate,
- 	.set_rate = sam9x60_frac_pll_set_rate,
-+	.save_context = sam9x60_frac_pll_save_context,
-+	.restore_context = sam9x60_frac_pll_restore_context,
- };
- 
- static const struct clk_ops sam9x60_frac_pll_ops_chg = {
-@@ -296,11 +325,12 @@ static const struct clk_ops sam9x60_frac
- 	.recalc_rate = sam9x60_frac_pll_recalc_rate,
- 	.round_rate = sam9x60_frac_pll_round_rate,
- 	.set_rate = sam9x60_frac_pll_set_rate_chg,
-+	.save_context = sam9x60_frac_pll_save_context,
-+	.restore_context = sam9x60_frac_pll_restore_context,
- };
- 
--static int sam9x60_div_pll_prepare(struct clk_hw *hw)
-+static int sam9x60_div_pll_set(struct sam9x60_pll_core *core)
- {
--	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
- 	struct sam9x60_div *div = to_sam9x60_div(core);
- 	struct regmap *regmap = core->regmap;
- 	unsigned long flags;
-@@ -334,6 +364,13 @@ unlock:
- 	return 0;
- }
- 
-+static int sam9x60_div_pll_prepare(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+
-+	return sam9x60_div_pll_set(core);
-+}
-+
- static void sam9x60_div_pll_unprepare(struct clk_hw *hw)
- {
- 	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-@@ -482,6 +519,25 @@ unlock:
- 	return 0;
- }
- 
-+static int sam9x60_div_pll_save_context(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+	struct sam9x60_div *div = to_sam9x60_div(core);
-+
-+	div->pms.status = sam9x60_div_pll_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void sam9x60_div_pll_restore_context(struct clk_hw *hw)
-+{
-+	struct sam9x60_pll_core *core = to_sam9x60_pll_core(hw);
-+	struct sam9x60_div *div = to_sam9x60_div(core);
-+
-+	if (div->pms.status)
-+		sam9x60_div_pll_set(core);
-+}
-+
- static const struct clk_ops sam9x60_div_pll_ops = {
- 	.prepare = sam9x60_div_pll_prepare,
- 	.unprepare = sam9x60_div_pll_unprepare,
-@@ -489,6 +545,8 @@ static const struct clk_ops sam9x60_div_
- 	.recalc_rate = sam9x60_div_pll_recalc_rate,
- 	.round_rate = sam9x60_div_pll_round_rate,
- 	.set_rate = sam9x60_div_pll_set_rate,
-+	.save_context = sam9x60_div_pll_save_context,
-+	.restore_context = sam9x60_div_pll_restore_context,
- };
- 
- static const struct clk_ops sam9x60_div_pll_ops_chg = {
-@@ -498,6 +556,8 @@ static const struct clk_ops sam9x60_div_
- 	.recalc_rate = sam9x60_div_pll_recalc_rate,
- 	.round_rate = sam9x60_div_pll_round_rate,
- 	.set_rate = sam9x60_div_pll_set_rate_chg,
-+	.save_context = sam9x60_div_pll_save_context,
-+	.restore_context = sam9x60_div_pll_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-system.c
-+++ b/drivers/clk/at91/clk-system.c
-@@ -20,6 +20,7 @@
- struct clk_system {
- 	struct clk_hw hw;
- 	struct regmap *regmap;
-+	struct at91_clk_pms pms;
- 	u8 id;
- };
- 
-@@ -77,10 +78,29 @@ static int clk_system_is_prepared(struct
- 	return !!(status & (1 << sys->id));
- }
- 
-+static int clk_system_save_context(struct clk_hw *hw)
-+{
-+	struct clk_system *sys = to_clk_system(hw);
-+
-+	sys->pms.status = clk_system_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_system_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_system *sys = to_clk_system(hw);
-+
-+	if (sys->pms.status)
-+		clk_system_prepare(&sys->hw);
-+}
-+
- static const struct clk_ops system_ops = {
- 	.prepare = clk_system_prepare,
- 	.unprepare = clk_system_unprepare,
- 	.is_prepared = clk_system_is_prepared,
-+	.save_context = clk_system_save_context,
-+	.restore_context = clk_system_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/clk-usb.c
-+++ b/drivers/clk/at91/clk-usb.c
-@@ -24,6 +24,7 @@
- struct at91sam9x5_clk_usb {
- 	struct clk_hw hw;
- 	struct regmap *regmap;
-+	struct at91_clk_pms pms;
- 	u32 usbs_mask;
- 	u8 num_parents;
- };
-@@ -148,12 +149,38 @@ static int at91sam9x5_clk_usb_set_rate(s
- 	return 0;
- }
- 
-+static int at91sam9x5_usb_save_context(struct clk_hw *hw)
-+{
-+	struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw);
-+	struct clk_hw *parent_hw = clk_hw_get_parent(hw);
-+
-+	usb->pms.parent = at91sam9x5_clk_usb_get_parent(hw);
-+	usb->pms.parent_rate = clk_hw_get_rate(parent_hw);
-+	usb->pms.rate = at91sam9x5_clk_usb_recalc_rate(hw, usb->pms.parent_rate);
-+
-+	return 0;
-+}
-+
-+static void at91sam9x5_usb_restore_context(struct clk_hw *hw)
-+{
-+	struct at91sam9x5_clk_usb *usb = to_at91sam9x5_clk_usb(hw);
-+	int ret;
-+
-+	ret = at91sam9x5_clk_usb_set_parent(hw, usb->pms.parent);
-+	if (ret)
-+		return;
-+
-+	at91sam9x5_clk_usb_set_rate(hw, usb->pms.rate, usb->pms.parent_rate);
-+}
-+
- static const struct clk_ops at91sam9x5_usb_ops = {
- 	.recalc_rate = at91sam9x5_clk_usb_recalc_rate,
- 	.determine_rate = at91sam9x5_clk_usb_determine_rate,
- 	.get_parent = at91sam9x5_clk_usb_get_parent,
- 	.set_parent = at91sam9x5_clk_usb_set_parent,
- 	.set_rate = at91sam9x5_clk_usb_set_rate,
-+	.save_context = at91sam9x5_usb_save_context,
-+	.restore_context = at91sam9x5_usb_restore_context,
- };
- 
- static int at91sam9n12_clk_usb_enable(struct clk_hw *hw)
---- a/drivers/clk/at91/clk-utmi.c
-+++ b/drivers/clk/at91/clk-utmi.c
-@@ -23,6 +23,7 @@ struct clk_utmi {
- 	struct clk_hw hw;
- 	struct regmap *regmap_pmc;
- 	struct regmap *regmap_sfr;
-+	struct at91_clk_pms pms;
- };
- 
- #define to_clk_utmi(hw) container_of(hw, struct clk_utmi, hw)
-@@ -113,11 +114,30 @@ static unsigned long clk_utmi_recalc_rat
- 	return UTMI_RATE;
- }
- 
-+static int clk_utmi_save_context(struct clk_hw *hw)
-+{
-+	struct clk_utmi *utmi = to_clk_utmi(hw);
-+
-+	utmi->pms.status = clk_utmi_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_utmi_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_utmi *utmi = to_clk_utmi(hw);
-+
-+	if (utmi->pms.status)
-+		clk_utmi_prepare(hw);
-+}
-+
- static const struct clk_ops utmi_ops = {
- 	.prepare = clk_utmi_prepare,
- 	.unprepare = clk_utmi_unprepare,
- 	.is_prepared = clk_utmi_is_prepared,
- 	.recalc_rate = clk_utmi_recalc_rate,
-+	.save_context = clk_utmi_save_context,
-+	.restore_context = clk_utmi_restore_context,
- };
- 
- static struct clk_hw * __init
-@@ -232,10 +252,29 @@ static int clk_utmi_sama7g5_is_prepared(
- 	return 0;
- }
- 
-+static int clk_utmi_sama7g5_save_context(struct clk_hw *hw)
-+{
-+	struct clk_utmi *utmi = to_clk_utmi(hw);
-+
-+	utmi->pms.status = clk_utmi_sama7g5_is_prepared(hw);
-+
-+	return 0;
-+}
-+
-+static void clk_utmi_sama7g5_restore_context(struct clk_hw *hw)
-+{
-+	struct clk_utmi *utmi = to_clk_utmi(hw);
-+
-+	if (utmi->pms.status)
-+		clk_utmi_sama7g5_prepare(hw);
-+}
-+
- static const struct clk_ops sama7g5_utmi_ops = {
- 	.prepare = clk_utmi_sama7g5_prepare,
- 	.is_prepared = clk_utmi_sama7g5_is_prepared,
- 	.recalc_rate = clk_utmi_recalc_rate,
-+	.save_context = clk_utmi_sama7g5_save_context,
-+	.restore_context = clk_utmi_sama7g5_restore_context,
- };
- 
- struct clk_hw * __init
---- a/drivers/clk/at91/pmc.c
-+++ b/drivers/clk/at91/pmc.c
-@@ -3,6 +3,7 @@
-  *  Copyright (C) 2013 Boris BREZILLON <b.brezillon at overkiz.com>
-  */
- 
-+#include <linux/clk.h>
- #include <linux/clk-provider.h>
- #include <linux/clkdev.h>
- #include <linux/clk/at91_pmc.h>
-@@ -14,8 +15,6 @@
- 
- #include <asm/proc-fns.h>
- 
--#include <dt-bindings/clock/at91.h>
--
- #include "pmc.h"
- 
- #define PMC_MAX_IDS 128
-@@ -111,147 +110,19 @@ struct pmc_data *pmc_data_allocate(unsig
- }
- 
- #ifdef CONFIG_PM
--static struct regmap *pmcreg;
--
--static u8 registered_ids[PMC_MAX_IDS];
--static u8 registered_pcks[PMC_MAX_PCKS];
--
--static struct
--{
--	u32 scsr;
--	u32 pcsr0;
--	u32 uckr;
--	u32 mor;
--	u32 mcfr;
--	u32 pllar;
--	u32 mckr;
--	u32 usb;
--	u32 imr;
--	u32 pcsr1;
--	u32 pcr[PMC_MAX_IDS];
--	u32 audio_pll0;
--	u32 audio_pll1;
--	u32 pckr[PMC_MAX_PCKS];
--} pmc_cache;
--
--/*
-- * As Peripheral ID 0 is invalid on AT91 chips, the identifier is stored
-- * without alteration in the table, and 0 is for unused clocks.
-- */
--void pmc_register_id(u8 id)
-+static int at91_pmc_suspend(void)
- {
--	int i;
--
--	for (i = 0; i < PMC_MAX_IDS; i++) {
--		if (registered_ids[i] == 0) {
--			registered_ids[i] = id;
--			break;
--		}
--		if (registered_ids[i] == id)
--			break;
--	}
-+	return clk_save_context();
- }
- 
--/*
-- * As Programmable Clock 0 is valid on AT91 chips, there is an offset
-- * of 1 between the stored value and the real clock ID.
-- */
--void pmc_register_pck(u8 pck)
-+static void at91_pmc_resume(void)
- {
--	int i;
--
--	for (i = 0; i < PMC_MAX_PCKS; i++) {
--		if (registered_pcks[i] == 0) {
--			registered_pcks[i] = pck + 1;
--			break;
--		}
--		if (registered_pcks[i] == (pck + 1))
--			break;
--	}
--}
--
--static int pmc_suspend(void)
--{
--	int i;
--	u8 num;
--
--	regmap_read(pmcreg, AT91_PMC_SCSR, &pmc_cache.scsr);
--	regmap_read(pmcreg, AT91_PMC_PCSR, &pmc_cache.pcsr0);
--	regmap_read(pmcreg, AT91_CKGR_UCKR, &pmc_cache.uckr);
--	regmap_read(pmcreg, AT91_CKGR_MOR, &pmc_cache.mor);
--	regmap_read(pmcreg, AT91_CKGR_MCFR, &pmc_cache.mcfr);
--	regmap_read(pmcreg, AT91_CKGR_PLLAR, &pmc_cache.pllar);
--	regmap_read(pmcreg, AT91_PMC_MCKR, &pmc_cache.mckr);
--	regmap_read(pmcreg, AT91_PMC_USB, &pmc_cache.usb);
--	regmap_read(pmcreg, AT91_PMC_IMR, &pmc_cache.imr);
--	regmap_read(pmcreg, AT91_PMC_PCSR1, &pmc_cache.pcsr1);
--
--	for (i = 0; registered_ids[i]; i++) {
--		regmap_write(pmcreg, AT91_PMC_PCR,
--			     (registered_ids[i] & AT91_PMC_PCR_PID_MASK));
--		regmap_read(pmcreg, AT91_PMC_PCR,
--			    &pmc_cache.pcr[registered_ids[i]]);
--	}
--	for (i = 0; registered_pcks[i]; i++) {
--		num = registered_pcks[i] - 1;
--		regmap_read(pmcreg, AT91_PMC_PCKR(num), &pmc_cache.pckr[num]);
--	}
--
--	return 0;
--}
--
--static bool pmc_ready(unsigned int mask)
--{
--	unsigned int status;
--
--	regmap_read(pmcreg, AT91_PMC_SR, &status);
--
--	return ((status & mask) == mask) ? 1 : 0;
--}
--
--static void pmc_resume(void)
--{
--	int i;
--	u8 num;
--	u32 tmp;
--	u32 mask = AT91_PMC_MCKRDY | AT91_PMC_LOCKA;
--
--	regmap_read(pmcreg, AT91_PMC_MCKR, &tmp);
--	if (pmc_cache.mckr != tmp)
--		pr_warn("MCKR was not configured properly by the firmware\n");
--	regmap_read(pmcreg, AT91_CKGR_PLLAR, &tmp);
--	if (pmc_cache.pllar != tmp)
--		pr_warn("PLLAR was not configured properly by the firmware\n");
--
--	regmap_write(pmcreg, AT91_PMC_SCER, pmc_cache.scsr);
--	regmap_write(pmcreg, AT91_PMC_PCER, pmc_cache.pcsr0);
--	regmap_write(pmcreg, AT91_CKGR_UCKR, pmc_cache.uckr);
--	regmap_write(pmcreg, AT91_CKGR_MOR, pmc_cache.mor);
--	regmap_write(pmcreg, AT91_CKGR_MCFR, pmc_cache.mcfr);
--	regmap_write(pmcreg, AT91_PMC_USB, pmc_cache.usb);
--	regmap_write(pmcreg, AT91_PMC_IMR, pmc_cache.imr);
--	regmap_write(pmcreg, AT91_PMC_PCER1, pmc_cache.pcsr1);
--
--	for (i = 0; registered_ids[i]; i++) {
--		regmap_write(pmcreg, AT91_PMC_PCR,
--			     pmc_cache.pcr[registered_ids[i]] |
--			     AT91_PMC_PCR_CMD);
--	}
--	for (i = 0; registered_pcks[i]; i++) {
--		num = registered_pcks[i] - 1;
--		regmap_write(pmcreg, AT91_PMC_PCKR(num), pmc_cache.pckr[num]);
--	}
--
--	if (pmc_cache.uckr & AT91_PMC_UPLLEN)
--		mask |= AT91_PMC_LOCKU;
--
--	while (!pmc_ready(mask))
--		cpu_relax();
-+	clk_restore_context();
- }
- 
- static struct syscore_ops pmc_syscore_ops = {
--	.suspend = pmc_suspend,
--	.resume = pmc_resume,
-+	.suspend = at91_pmc_suspend,
-+	.resume = at91_pmc_resume,
- };
- 
- static const struct of_device_id sama5d2_pmc_dt_ids[] = {
-@@ -271,11 +142,7 @@ static int __init pmc_register_ops(void)
- 		of_node_put(np);
- 		return -ENODEV;
- 	}
--
--	pmcreg = device_node_to_regmap(np);
- 	of_node_put(np);
--	if (IS_ERR(pmcreg))
--		return PTR_ERR(pmcreg);
- 
- 	register_syscore_ops(&pmc_syscore_ops);
- 
---- a/drivers/clk/at91/pmc.h
-+++ b/drivers/clk/at91/pmc.h
-@@ -13,6 +13,8 @@
- #include <linux/regmap.h>
- #include <linux/spinlock.h>
- 
-+#include <dt-bindings/clock/at91.h>
-+
- extern spinlock_t pmc_pcr_lock;
- 
- struct pmc_data {
-@@ -98,6 +100,20 @@ struct clk_pcr_layout {
- 	u32 pid_mask;
- };
- 
-+/**
-+ * struct at91_clk_pms - Power management state for AT91 clock
-+ * @rate: clock rate
-+ * @parent_rate: clock parent rate
-+ * @status: clock status (enabled or disabled)
-+ * @parent: clock parent index
-+ */
-+struct at91_clk_pms {
-+	unsigned long rate;
-+	unsigned long parent_rate;
-+	unsigned int status;
-+	unsigned int parent;
-+};
-+
- #define field_get(_mask, _reg) (((_reg) & (_mask)) >> (ffs(_mask) - 1))
- #define field_prep(_mask, _val) (((_val) << (ffs(_mask) - 1)) & (_mask))
- 
-@@ -248,12 +264,4 @@ struct clk_hw * __init
- at91_clk_sama7g5_register_utmi(struct regmap *regmap, const char *name,
- 			       const char *parent_name);
- 
--#ifdef CONFIG_PM
--void pmc_register_id(u8 id);
--void pmc_register_pck(u8 pck);
--#else
--static inline void pmc_register_id(u8 id) {}
--static inline void pmc_register_pck(u8 pck) {}
--#endif
--
- #endif /* __PMC_H_ */
diff --git a/target/linux/at91/patches-5.15/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch b/target/linux/at91/patches-5.15/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
deleted file mode 100644
index 19f1f6fdf2..0000000000
--- a/target/linux/at91/patches-5.15/101-clk-at91-pmc-execute-suspend-resume-only-for-backup-.patch
+++ /dev/null
@@ -1,89 +0,0 @@
-From 63a0c32028148e91ea91cfbf95841c4ecd69d21b Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:06 +0300
-Subject: [PATCH 235/247] clk: at91: pmc: execute suspend/resume only for
- backup mode
-
-Before going to backup mode architecture specific PM code sets the first
-word in securam (file arch/arm/mach-at91/pm.c, function at91_pm_begin()).
-Thus take this into account when suspending/resuming clocks. This will
-avoid executing unnecessary instructions when suspending to non backup
-modes.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-3-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/pmc.c | 39 +++++++++++++++++++++++++++++++++++++++
- 1 file changed, 39 insertions(+)
-
---- a/drivers/clk/at91/pmc.c
-+++ b/drivers/clk/at91/pmc.c
-@@ -8,6 +8,7 @@
- #include <linux/clkdev.h>
- #include <linux/clk/at91_pmc.h>
- #include <linux/of.h>
-+#include <linux/of_address.h>
- #include <linux/mfd/syscon.h>
- #include <linux/platform_device.h>
- #include <linux/regmap.h>
-@@ -110,13 +111,35 @@ struct pmc_data *pmc_data_allocate(unsig
- }
- 
- #ifdef CONFIG_PM
-+
-+/* Address in SECURAM that say if we suspend to backup mode. */
-+static void __iomem *at91_pmc_backup_suspend;
-+
- static int at91_pmc_suspend(void)
- {
-+	unsigned int backup;
-+
-+	if (!at91_pmc_backup_suspend)
-+		return 0;
-+
-+	backup = readl_relaxed(at91_pmc_backup_suspend);
-+	if (!backup)
-+		return 0;
-+
- 	return clk_save_context();
- }
- 
- static void at91_pmc_resume(void)
- {
-+	unsigned int backup;
-+
-+	if (!at91_pmc_backup_suspend)
-+		return;
-+
-+	backup = readl_relaxed(at91_pmc_backup_suspend);
-+	if (!backup)
-+		return;
-+
- 	clk_restore_context();
- }
- 
-@@ -144,6 +167,22 @@ static int __init pmc_register_ops(void)
- 	}
- 	of_node_put(np);
- 
-+	np = of_find_compatible_node(NULL, NULL, "atmel,sama5d2-securam");
-+	if (!np)
-+		return -ENODEV;
-+
-+	if (!of_device_is_available(np)) {
-+		of_node_put(np);
-+		return -ENODEV;
-+	}
-+	of_node_put(np);
-+
-+	at91_pmc_backup_suspend = of_iomap(np, 0);
-+	if (!at91_pmc_backup_suspend) {
-+		pr_warn("%s(): unable to map securam\n", __func__);
-+		return -ENOMEM;
-+	}
-+
- 	register_syscore_ops(&pmc_syscore_ops);
- 
- 	return 0;
diff --git a/target/linux/at91/patches-5.15/102-clk-at91-clk-master-add-register-definition-for-sama.patch b/target/linux/at91/patches-5.15/102-clk-at91-clk-master-add-register-definition-for-sama.patch
deleted file mode 100644
index 726d9b33e4..0000000000
--- a/target/linux/at91/patches-5.15/102-clk-at91-clk-master-add-register-definition-for-sama.patch
+++ /dev/null
@@ -1,124 +0,0 @@
-From c716562753d1e51a1c53647aa77a332f97187d15 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:08 +0300
-Subject: [PATCH 237/247] clk: at91: clk-master: add register definition for
- sama7g5's master clock
-
-SAMA7G5 has 4 master clocks (MCK1..4) which are controlled though the
-register at offset 0x30 (relative to PMC). In the last/first phase of
-suspend/resume procedure (which is architecture specific) the parent
-of master clocks are changed (via assembly code) for more power saving
-(see file arch/arm/mach-at91/pm_suspend.S, macros at91_mckx_ps_enable
-and at91_mckx_ps_restore). Thus the macros corresponding to register
-at offset 0x30 need to be shared b/w clk-master.c and pm_suspend.S.
-commit ec03f18cc222 ("clk: at91: add register definition for sama7g5's
-master clock") introduced the proper macros but didn't adapted the
-clk-master.c as well. Thus, this commit adapt the clk-master.c to use
-the macros introduced in commit ec03f18cc222 ("clk: at91: add register
-definition for sama7g5's master clock").
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-5-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-master.c | 50 ++++++++++++++++-------------------
- 1 file changed, 23 insertions(+), 27 deletions(-)
-
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -17,15 +17,7 @@
- #define MASTER_DIV_SHIFT	8
- #define MASTER_DIV_MASK		0x7
- 
--#define PMC_MCR			0x30
--#define PMC_MCR_ID_MSK		GENMASK(3, 0)
--#define PMC_MCR_CMD		BIT(7)
--#define PMC_MCR_DIV		GENMASK(10, 8)
--#define PMC_MCR_CSS		GENMASK(20, 16)
- #define PMC_MCR_CSS_SHIFT	(16)
--#define PMC_MCR_EN		BIT(28)
--
--#define PMC_MCR_ID(x)		((x) & PMC_MCR_ID_MSK)
- 
- #define MASTER_MAX_ID		4
- 
-@@ -687,20 +679,22 @@ static void clk_sama7g5_master_set(struc
- {
- 	unsigned long flags;
- 	unsigned int val, cparent;
--	unsigned int enable = status ? PMC_MCR_EN : 0;
-+	unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
--	regmap_write(master->regmap, PMC_MCR, PMC_MCR_ID(master->id));
--	regmap_read(master->regmap, PMC_MCR, &val);
--	regmap_update_bits(master->regmap, PMC_MCR,
--			   enable | PMC_MCR_CSS | PMC_MCR_DIV |
--			   PMC_MCR_CMD | PMC_MCR_ID_MSK,
-+	regmap_write(master->regmap, AT91_PMC_MCR_V2,
-+		     AT91_PMC_MCR_V2_ID(master->id));
-+	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
-+	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
-+			   enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
-+			   AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
- 			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
- 			   (master->div << MASTER_DIV_SHIFT) |
--			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
-+			   AT91_PMC_MCR_V2_CMD |
-+			   AT91_PMC_MCR_V2_ID(master->id));
- 
--	cparent = (val & PMC_MCR_CSS) >> PMC_MCR_CSS_SHIFT;
-+	cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
- 
- 	/* Wait here only if parent is being changed. */
- 	while ((cparent != master->parent) && !clk_master_ready(master))
-@@ -725,10 +719,12 @@ static void clk_sama7g5_master_disable(s
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
--	regmap_write(master->regmap, PMC_MCR, master->id);
--	regmap_update_bits(master->regmap, PMC_MCR,
--			   PMC_MCR_EN | PMC_MCR_CMD | PMC_MCR_ID_MSK,
--			   PMC_MCR_CMD | PMC_MCR_ID(master->id));
-+	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
-+	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
-+			   AT91_PMC_MCR_V2_EN | AT91_PMC_MCR_V2_CMD |
-+			   AT91_PMC_MCR_V2_ID_MSK,
-+			   AT91_PMC_MCR_V2_CMD |
-+			   AT91_PMC_MCR_V2_ID(master->id));
- 
- 	spin_unlock_irqrestore(master->lock, flags);
- }
-@@ -741,12 +737,12 @@ static int clk_sama7g5_master_is_enabled
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
--	regmap_write(master->regmap, PMC_MCR, master->id);
--	regmap_read(master->regmap, PMC_MCR, &val);
-+	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
-+	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
- 
- 	spin_unlock_irqrestore(master->lock, flags);
- 
--	return !!(val & PMC_MCR_EN);
-+	return !!(val & AT91_PMC_MCR_V2_EN);
- }
- 
- static int clk_sama7g5_master_set_rate(struct clk_hw *hw, unsigned long rate,
-@@ -842,10 +838,10 @@ at91_clk_sama7g5_register_master(struct
- 	master->mux_table = mux_table;
- 
- 	spin_lock_irqsave(master->lock, flags);
--	regmap_write(master->regmap, PMC_MCR, master->id);
--	regmap_read(master->regmap, PMC_MCR, &val);
--	master->parent = (val & PMC_MCR_CSS) >> PMC_MCR_CSS_SHIFT;
--	master->div = (val & PMC_MCR_DIV) >> MASTER_DIV_SHIFT;
-+	regmap_write(master->regmap, AT91_PMC_MCR_V2, master->id);
-+	regmap_read(master->regmap, AT91_PMC_MCR_V2, &val);
-+	master->parent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
-+	master->div = (val & AT91_PMC_MCR_V2_DIV) >> MASTER_DIV_SHIFT;
- 	spin_unlock_irqrestore(master->lock, flags);
- 
- 	hw = &master->hw;
diff --git a/target/linux/at91/patches-5.15/103-clk-at91-clk-master-improve-readability-by-using-loc.patch b/target/linux/at91/patches-5.15/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
deleted file mode 100644
index a5b57a67ad..0000000000
--- a/target/linux/at91/patches-5.15/103-clk-at91-clk-master-improve-readability-by-using-loc.patch
+++ /dev/null
@@ -1,40 +0,0 @@
-From 17b53ad1574cb5f41789993289d3d94f7a50f0ce Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:09 +0300
-Subject: [PATCH 238/247] clk: at91: clk-master: improve readability by using
- local variables
-
-Improve readability in clk_sama7g5_master_set() by using local
-variables.
-
-Suggested-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-6-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-master.c | 6 +++---
- 1 file changed, 3 insertions(+), 3 deletions(-)
-
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -680,6 +680,8 @@ static void clk_sama7g5_master_set(struc
- 	unsigned long flags;
- 	unsigned int val, cparent;
- 	unsigned int enable = status ? AT91_PMC_MCR_V2_EN : 0;
-+	unsigned int parent = master->parent << PMC_MCR_CSS_SHIFT;
-+	unsigned int div = master->div << MASTER_DIV_SHIFT;
- 
- 	spin_lock_irqsave(master->lock, flags);
- 
-@@ -689,9 +691,7 @@ static void clk_sama7g5_master_set(struc
- 	regmap_update_bits(master->regmap, AT91_PMC_MCR_V2,
- 			   enable | AT91_PMC_MCR_V2_CSS | AT91_PMC_MCR_V2_DIV |
- 			   AT91_PMC_MCR_V2_CMD | AT91_PMC_MCR_V2_ID_MSK,
--			   enable | (master->parent << PMC_MCR_CSS_SHIFT) |
--			   (master->div << MASTER_DIV_SHIFT) |
--			   AT91_PMC_MCR_V2_CMD |
-+			   enable | parent | div | AT91_PMC_MCR_V2_CMD |
- 			   AT91_PMC_MCR_V2_ID(master->id));
- 
- 	cparent = (val & AT91_PMC_MCR_V2_CSS) >> PMC_MCR_CSS_SHIFT;
diff --git a/target/linux/at91/patches-5.15/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch b/target/linux/at91/patches-5.15/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
deleted file mode 100644
index 2918de1700..0000000000
--- a/target/linux/at91/patches-5.15/104-clk-at91-pmc-add-sama7g5-to-the-list-of-available-pm.patch
+++ /dev/null
@@ -1,39 +0,0 @@
-From 8a38e0dda46c9d941a61d8b2e6c14704531b7871 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:10 +0300
-Subject: [PATCH 239/247] clk: at91: pmc: add sama7g5 to the list of available
- pmcs
-
-Add SAMA7G5 to the list of available PMCs such that the suspend/resume
-code for clocks to be used on backup mode.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-7-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/pmc.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/clk/at91/pmc.c
-+++ b/drivers/clk/at91/pmc.c
-@@ -148,8 +148,9 @@ static struct syscore_ops pmc_syscore_op
- 	.resume = at91_pmc_resume,
- };
- 
--static const struct of_device_id sama5d2_pmc_dt_ids[] = {
-+static const struct of_device_id pmc_dt_ids[] = {
- 	{ .compatible = "atmel,sama5d2-pmc" },
-+	{ .compatible = "microchip,sama7g5-pmc", },
- 	{ /* sentinel */ }
- };
- 
-@@ -157,7 +158,7 @@ static int __init pmc_register_ops(void)
- {
- 	struct device_node *np;
- 
--	np = of_find_matching_node(NULL, sama5d2_pmc_dt_ids);
-+	np = of_find_matching_node(NULL, pmc_dt_ids);
- 	if (!np)
- 		return -ENODEV;
- 
diff --git a/target/linux/at91/patches-5.15/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch b/target/linux/at91/patches-5.15/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
deleted file mode 100644
index ea869c9485..0000000000
--- a/target/linux/at91/patches-5.15/105-clk-at91-clk-master-mask-mckr-against-layout-mask.patch
+++ /dev/null
@@ -1,46 +0,0 @@
-From 27c11c09346b7b9f67eeb39db1b943f4a9742ff3 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:13 +0300
-Subject: [PATCH 241/247] clk: at91: clk-master: mask mckr against layout->mask
-
-Mask values read/written from/to MCKR against layout->mask as this
-mask may be different b/w PMC versions.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-10-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-master.c | 7 +++++--
- 1 file changed, 5 insertions(+), 2 deletions(-)
-
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -186,8 +186,8 @@ static int clk_master_div_set_rate(struc
- 	if (ret)
- 		goto unlock;
- 
--	tmp = mckr & master->layout->mask;
--	tmp = (tmp >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+	mckr &= master->layout->mask;
-+	tmp = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
- 	if (tmp == div)
- 		goto unlock;
- 
-@@ -384,6 +384,7 @@ static unsigned long clk_master_pres_rec
- 	regmap_read(master->regmap, master->layout->offset, &val);
- 	spin_unlock_irqrestore(master->lock, flags);
- 
-+	val &= master->layout->mask;
- 	pres = (val >> master->layout->pres_shift) & MASTER_PRES_MASK;
- 	if (pres == MASTER_PRES_MAX && characteristics->have_div3_pres)
- 		pres = 3;
-@@ -403,6 +404,8 @@ static u8 clk_master_pres_get_parent(str
- 	regmap_read(master->regmap, master->layout->offset, &mckr);
- 	spin_unlock_irqrestore(master->lock, flags);
- 
-+	mckr &= master->layout->mask;
-+
- 	return mckr & AT91_PMC_CSS;
- }
- 
diff --git a/target/linux/at91/patches-5.15/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch b/target/linux/at91/patches-5.15/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
deleted file mode 100644
index e5ebdc4ea4..0000000000
--- a/target/linux/at91/patches-5.15/106-clk-at91-clk-sam9x60-pll-add-notifier-for-div-part-o.patch
+++ /dev/null
@@ -1,312 +0,0 @@
-From e76d2af5009f52aa02d3db7ae32d150ad66398f9 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:15 +0300
-Subject: [PATCH 243/247] clk: at91: clk-sam9x60-pll: add notifier for div part
- of PLL
-
-SAM9X60's PLL which is also part of SAMA7G5 is composed of 2 parts:
-one fractional part and one divider. On SAMA7G5 the CPU PLL could be
-changed at run-time to implement DVFS. The hardware clock tree on
-SAMA7G5 for CPU PLL is as follows:
-
-                       +---- div1 ----------------> cpuck
-                       |
-FRAC PLL ---> DIV PLL -+-> prescaler ---> div0 ---> mck0
-
-The div1 block is not implemented in Linux; on prescaler block it has
-been discovered a bug on some scenarios and will be removed from Linux
-in next commits. Thus, the final clock tree that will be used in Linux
-will be as follows:
-
-                       +-----------> cpuck
-                       |
-FRAC PLL ---> DIV PLL -+-> div0 ---> mck0
-
-It has been proposed in [1] to not introduce a new CPUFreq driver but
-to overload the proper clock drivers with proper operation such that
-cpufreq-dt to be used. To accomplish this DIV PLL and div0 implement
-clock notifiers which applies safe dividers before FRAC PLL is changed.
-The current commit treats only the DIV PLL by adding a notifier that
-sets a safe divider on PRE_RATE_CHANGE events. The safe divider is
-provided by initialization clock code (sama7g5.c). The div0 is treated
-in next commits (to keep the changes as clean as possible).
-
-[1] https://lore.kernel.org/lkml/20210105104426.4tmgc2l3vyicwedd at vireshk-i7/
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-12-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/clk-sam9x60-pll.c | 102 ++++++++++++++++++++++-------
- drivers/clk/at91/pmc.h             |   3 +-
- drivers/clk/at91/sam9x60.c         |   6 +-
- drivers/clk/at91/sama7g5.c         |  13 +++-
- 4 files changed, 95 insertions(+), 29 deletions(-)
-
---- a/drivers/clk/at91/clk-sam9x60-pll.c
-+++ b/drivers/clk/at91/clk-sam9x60-pll.c
-@@ -5,6 +5,7 @@
-  */
- 
- #include <linux/bitfield.h>
-+#include <linux/clk.h>
- #include <linux/clk-provider.h>
- #include <linux/clkdev.h>
- #include <linux/clk/at91_pmc.h>
-@@ -47,12 +48,15 @@ struct sam9x60_div {
- 	struct sam9x60_pll_core core;
- 	struct at91_clk_pms pms;
- 	u8 div;
-+	u8 safe_div;
- };
- 
- #define to_sam9x60_pll_core(hw)	container_of(hw, struct sam9x60_pll_core, hw)
- #define to_sam9x60_frac(core)	container_of(core, struct sam9x60_frac, core)
- #define to_sam9x60_div(core)	container_of(core, struct sam9x60_div, core)
- 
-+static struct sam9x60_div *notifier_div;
-+
- static inline bool sam9x60_pll_ready(struct regmap *regmap, int id)
- {
- 	unsigned int status;
-@@ -329,6 +333,26 @@ static const struct clk_ops sam9x60_frac
- 	.restore_context = sam9x60_frac_pll_restore_context,
- };
- 
-+/* This function should be called with spinlock acquired. */
-+static void sam9x60_div_pll_set_div(struct sam9x60_pll_core *core, u32 div,
-+				    bool enable)
-+{
-+	struct regmap *regmap = core->regmap;
-+	u32 ena_msk = enable ? core->layout->endiv_mask : 0;
-+	u32 ena_val = enable ? (1 << core->layout->endiv_shift) : 0;
-+
-+	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
-+			   core->layout->div_mask | ena_msk,
-+			   (div << core->layout->div_shift) | ena_val);
-+
-+	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
-+			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
-+			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
-+
-+	while (!sam9x60_pll_ready(regmap, core->id))
-+		cpu_relax();
-+}
-+
- static int sam9x60_div_pll_set(struct sam9x60_pll_core *core)
- {
- 	struct sam9x60_div *div = to_sam9x60_div(core);
-@@ -346,17 +370,7 @@ static int sam9x60_div_pll_set(struct sa
- 	if (!!(val & core->layout->endiv_mask) && cdiv == div->div)
- 		goto unlock;
- 
--	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
--			   core->layout->div_mask | core->layout->endiv_mask,
--			   (div->div << core->layout->div_shift) |
--			   (1 << core->layout->endiv_shift));
--
--	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
--			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
--			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
--
--	while (!sam9x60_pll_ready(regmap, core->id))
--		cpu_relax();
-+	sam9x60_div_pll_set_div(core, div->div, 1);
- 
- unlock:
- 	spin_unlock_irqrestore(core->lock, flags);
-@@ -502,16 +516,7 @@ static int sam9x60_div_pll_set_rate_chg(
- 	if (cdiv == div->div)
- 		goto unlock;
- 
--	regmap_update_bits(regmap, AT91_PMC_PLL_CTRL0,
--			   core->layout->div_mask,
--			   (div->div << core->layout->div_shift));
--
--	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT,
--			   AT91_PMC_PLL_UPDT_UPDATE | AT91_PMC_PLL_UPDT_ID_MSK,
--			   AT91_PMC_PLL_UPDT_UPDATE | core->id);
--
--	while (!sam9x60_pll_ready(regmap, core->id))
--		cpu_relax();
-+	sam9x60_div_pll_set_div(core, div->div, 0);
- 
- unlock:
- 	spin_unlock_irqrestore(core->lock, irqflags);
-@@ -538,6 +543,48 @@ static void sam9x60_div_pll_restore_cont
- 		sam9x60_div_pll_set(core);
- }
- 
-+static int sam9x60_div_pll_notifier_fn(struct notifier_block *notifier,
-+				       unsigned long code, void *data)
-+{
-+	struct sam9x60_div *div = notifier_div;
-+	struct sam9x60_pll_core core = div->core;
-+	struct regmap *regmap = core.regmap;
-+	unsigned long irqflags;
-+	u32 val, cdiv;
-+	int ret = NOTIFY_DONE;
-+
-+	if (code != PRE_RATE_CHANGE)
-+		return ret;
-+
-+	/*
-+	 * We switch to safe divider to avoid overclocking of other domains
-+	 * feed by us while the frac PLL (our parent) is changed.
-+	 */
-+	div->div = div->safe_div;
-+
-+	spin_lock_irqsave(core.lock, irqflags);
-+	regmap_update_bits(regmap, AT91_PMC_PLL_UPDT, AT91_PMC_PLL_UPDT_ID_MSK,
-+			   core.id);
-+	regmap_read(regmap, AT91_PMC_PLL_CTRL0, &val);
-+	cdiv = (val & core.layout->div_mask) >> core.layout->div_shift;
-+
-+	/* Stop if nothing changed. */
-+	if (cdiv == div->safe_div)
-+		goto unlock;
-+
-+	sam9x60_div_pll_set_div(&core, div->div, 0);
-+	ret = NOTIFY_OK;
-+
-+unlock:
-+	spin_unlock_irqrestore(core.lock, irqflags);
-+
-+	return ret;
-+}
-+
-+static struct notifier_block sam9x60_div_pll_notifier = {
-+	.notifier_call = sam9x60_div_pll_notifier_fn,
-+};
-+
- static const struct clk_ops sam9x60_div_pll_ops = {
- 	.prepare = sam9x60_div_pll_prepare,
- 	.unprepare = sam9x60_div_pll_unprepare,
-@@ -647,7 +694,8 @@ struct clk_hw * __init
- sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
- 			     const char *name, const char *parent_name, u8 id,
- 			     const struct clk_pll_characteristics *characteristics,
--			     const struct clk_pll_layout *layout, u32 flags)
-+			     const struct clk_pll_layout *layout, u32 flags,
-+			     u32 safe_div)
- {
- 	struct sam9x60_div *div;
- 	struct clk_hw *hw;
-@@ -656,9 +704,13 @@ sam9x60_clk_register_div_pll(struct regm
- 	unsigned int val;
- 	int ret;
- 
--	if (id > PLL_MAX_ID || !lock)
-+	/* We only support one changeable PLL. */
-+	if (id > PLL_MAX_ID || !lock || (safe_div && notifier_div))
- 		return ERR_PTR(-EINVAL);
- 
-+	if (safe_div >= PLL_DIV_MAX)
-+		safe_div = PLL_DIV_MAX - 1;
-+
- 	div = kzalloc(sizeof(*div), GFP_KERNEL);
- 	if (!div)
- 		return ERR_PTR(-ENOMEM);
-@@ -678,6 +730,7 @@ sam9x60_clk_register_div_pll(struct regm
- 	div->core.layout = layout;
- 	div->core.regmap = regmap;
- 	div->core.lock = lock;
-+	div->safe_div = safe_div;
- 
- 	spin_lock_irqsave(div->core.lock, irqflags);
- 
-@@ -693,6 +746,9 @@ sam9x60_clk_register_div_pll(struct regm
- 	if (ret) {
- 		kfree(div);
- 		hw = ERR_PTR(ret);
-+	} else if (div->safe_div) {
-+		notifier_div = div;
-+		clk_notifier_register(hw->clk, &sam9x60_div_pll_notifier);
- 	}
- 
- 	return hw;
---- a/drivers/clk/at91/pmc.h
-+++ b/drivers/clk/at91/pmc.h
-@@ -214,7 +214,8 @@ struct clk_hw * __init
- sam9x60_clk_register_div_pll(struct regmap *regmap, spinlock_t *lock,
- 			     const char *name, const char *parent_name, u8 id,
- 			     const struct clk_pll_characteristics *characteristics,
--			     const struct clk_pll_layout *layout, u32 flags);
-+			     const struct clk_pll_layout *layout, u32 flags,
-+			     u32 safe_div);
- 
- struct clk_hw * __init
- sam9x60_clk_register_frac_pll(struct regmap *regmap, spinlock_t *lock,
---- a/drivers/clk/at91/sam9x60.c
-+++ b/drivers/clk/at91/sam9x60.c
-@@ -242,7 +242,7 @@ static void __init sam9x60_pmc_setup(str
- 					    * This feeds CPU. It should not
- 					    * be disabled.
- 					    */
--					  CLK_IS_CRITICAL | CLK_SET_RATE_GATE);
-+					  CLK_IS_CRITICAL | CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
-@@ -260,7 +260,7 @@ static void __init sam9x60_pmc_setup(str
- 					  &pll_div_layout,
- 					  CLK_SET_RATE_GATE |
- 					  CLK_SET_PARENT_GATE |
--					  CLK_SET_RATE_PARENT);
-+					  CLK_SET_RATE_PARENT, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
-@@ -279,7 +279,7 @@ static void __init sam9x60_pmc_setup(str
- 	hw = at91_clk_register_master_div(regmap, "masterck_div",
- 					  "masterck_pres", &sam9x60_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/sama7g5.c
-+++ b/drivers/clk/at91/sama7g5.c
-@@ -127,6 +127,8 @@ static const struct clk_pll_characterist
-  * @t:		clock type
-  * @f:		clock flags
-  * @eid:	export index in sama7g5->chws[] array
-+ * @safe_div:	intermediate divider need to be set on PRE_RATE_CHANGE
-+ *		notification
-  */
- static const struct {
- 	const char *n;
-@@ -136,6 +138,7 @@ static const struct {
- 	unsigned long f;
- 	u8 t;
- 	u8 eid;
-+	u8 safe_div;
- } sama7g5_plls[][PLL_ID_MAX] = {
- 	[PLL_ID_CPU] = {
- 		{ .n = "cpupll_fracck",
-@@ -156,7 +159,12 @@ static const struct {
- 		  .t = PLL_TYPE_DIV,
- 		   /* This feeds CPU. It should not be disabled. */
- 		  .f = CLK_IS_CRITICAL | CLK_SET_RATE_PARENT,
--		  .eid = PMC_CPUPLL, },
-+		  .eid = PMC_CPUPLL,
-+		  /*
-+		   * Safe div=15 should be safe even for switching b/w 1GHz and
-+		   * 90MHz (frac pll might go up to 1.2GHz).
-+		   */
-+		  .safe_div = 15, },
- 	},
- 
- 	[PLL_ID_SYS] = {
-@@ -966,7 +974,8 @@ static void __init sama7g5_pmc_setup(str
- 					sama7g5_plls[i][j].p, i,
- 					sama7g5_plls[i][j].c,
- 					sama7g5_plls[i][j].l,
--					sama7g5_plls[i][j].f);
-+					sama7g5_plls[i][j].f,
-+					sama7g5_plls[i][j].safe_div);
- 				break;
- 
- 			default:
diff --git a/target/linux/at91/patches-5.15/107-clk-at91-clk-master-add-notifier-for-divider.patch b/target/linux/at91/patches-5.15/107-clk-at91-clk-master-add-notifier-for-divider.patch
deleted file mode 100644
index 83839e6a74..0000000000
--- a/target/linux/at91/patches-5.15/107-clk-at91-clk-master-add-notifier-for-divider.patch
+++ /dev/null
@@ -1,519 +0,0 @@
-From 75d5d1d584ae73ba0c36d1d7255db6153ca4d3f3 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:16 +0300
-Subject: [PATCH 244/247] clk: at91: clk-master: add notifier for divider
-
-SAMA7G5 supports DVFS by changing cpuck. On SAMA7G5 mck0 shares the same
-parent with cpuck as seen in the following clock tree:
-
-                       +----------> cpuck
-                       |
-FRAC PLL ---> DIV PLL -+-> DIV ---> mck0
-
-mck0 could go b/w 32KHz and 200MHz on SAMA7G5. To avoid mck0 overclocking
-while changing FRAC PLL or DIV PLL the commit implements a notifier for
-mck0 which applies a safe divider to register (maximum value of the divider
-which is 5) on PRE_RATE_CHANGE events (such that changes on PLL to not
-overclock mck0) and sets the maximum allowed rate on POST_RATE_CHANGE
-events.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-13-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/at91rm9200.c  |   2 +-
- drivers/clk/at91/at91sam9260.c |   2 +-
- drivers/clk/at91/at91sam9g45.c |   2 +-
- drivers/clk/at91/at91sam9n12.c |   2 +-
- drivers/clk/at91/at91sam9rl.c  |   2 +-
- drivers/clk/at91/at91sam9x5.c  |   2 +-
- drivers/clk/at91/clk-master.c  | 244 +++++++++++++++++++++++----------
- drivers/clk/at91/dt-compat.c   |   2 +-
- drivers/clk/at91/pmc.h         |   2 +-
- drivers/clk/at91/sama5d2.c     |   2 +-
- drivers/clk/at91/sama5d3.c     |   2 +-
- drivers/clk/at91/sama5d4.c     |   2 +-
- drivers/clk/at91/sama7g5.c     |   2 +-
- 13 files changed, 186 insertions(+), 82 deletions(-)
-
---- a/drivers/clk/at91/at91rm9200.c
-+++ b/drivers/clk/at91/at91rm9200.c
-@@ -152,7 +152,7 @@ static void __init at91rm9200_pmc_setup(
- 					  "masterck_pres",
- 					  &at91rm9200_master_layout,
- 					  &rm9200_mck_characteristics,
--					  &rm9200_mck_lock, CLK_SET_RATE_GATE);
-+					  &rm9200_mck_lock, CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9260.c
-+++ b/drivers/clk/at91/at91sam9260.c
-@@ -429,7 +429,7 @@ static void __init at91sam926x_pmc_setup
- 					  &at91rm9200_master_layout,
- 					  data->mck_characteristics,
- 					  &at91sam9260_mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9g45.c
-+++ b/drivers/clk/at91/at91sam9g45.c
-@@ -164,7 +164,7 @@ static void __init at91sam9g45_pmc_setup
- 					  &at91rm9200_master_layout,
- 					  &mck_characteristics,
- 					  &at91sam9g45_mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9n12.c
-+++ b/drivers/clk/at91/at91sam9n12.c
-@@ -191,7 +191,7 @@ static void __init at91sam9n12_pmc_setup
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics,
- 					  &at91sam9n12_mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9rl.c
-+++ b/drivers/clk/at91/at91sam9rl.c
-@@ -132,7 +132,7 @@ static void __init at91sam9rl_pmc_setup(
- 					  "masterck_pres",
- 					  &at91rm9200_master_layout,
- 					  &sam9rl_mck_characteristics,
--					  &sam9rl_mck_lock, CLK_SET_RATE_GATE);
-+					  &sam9rl_mck_lock, CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/at91sam9x5.c
-+++ b/drivers/clk/at91/at91sam9x5.c
-@@ -210,7 +210,7 @@ static void __init at91sam9x5_pmc_setup(
- 					  "masterck_pres",
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/clk-master.c
-+++ b/drivers/clk/at91/clk-master.c
-@@ -5,6 +5,7 @@
- 
- #include <linux/clk-provider.h>
- #include <linux/clkdev.h>
-+#include <linux/clk.h>
- #include <linux/clk/at91_pmc.h>
- #include <linux/of.h>
- #include <linux/mfd/syscon.h>
-@@ -36,8 +37,12 @@ struct clk_master {
- 	u8 id;
- 	u8 parent;
- 	u8 div;
-+	u32 safe_div;
- };
- 
-+/* MCK div reference to be used by notifier. */
-+static struct clk_master *master_div;
-+
- static inline bool clk_master_ready(struct clk_master *master)
- {
- 	unsigned int bit = master->id ? AT91_PMC_MCKXRDY : AT91_PMC_MCKRDY;
-@@ -153,107 +158,81 @@ static const struct clk_ops master_div_o
- 	.restore_context = clk_master_div_restore_context,
- };
- 
--static int clk_master_div_set_rate(struct clk_hw *hw, unsigned long rate,
--				   unsigned long parent_rate)
-+/* This function must be called with lock acquired. */
-+static int clk_master_div_set(struct clk_master *master,
-+			      unsigned long parent_rate, int div)
- {
--	struct clk_master *master = to_clk_master(hw);
- 	const struct clk_master_characteristics *characteristics =
- 						master->characteristics;
--	unsigned long flags;
--	unsigned int mckr, tmp;
--	int div, i;
-+	unsigned long rate = parent_rate;
-+	unsigned int max_div = 0, div_index = 0, max_div_index = 0;
-+	unsigned int i, mckr, tmp;
- 	int ret;
- 
--	div = DIV_ROUND_CLOSEST(parent_rate, rate);
--	if (div > ARRAY_SIZE(characteristics->divisors))
--		return -EINVAL;
--
- 	for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
- 		if (!characteristics->divisors[i])
- 			break;
- 
--		if (div == characteristics->divisors[i]) {
--			div = i;
--			break;
-+		if (div == characteristics->divisors[i])
-+			div_index = i;
-+
-+		if (max_div < characteristics->divisors[i]) {
-+			max_div = characteristics->divisors[i];
-+			max_div_index = i;
- 		}
- 	}
- 
--	if (i == ARRAY_SIZE(characteristics->divisors))
--		return -EINVAL;
-+	if (div > max_div)
-+		div_index = max_div_index;
- 
--	spin_lock_irqsave(master->lock, flags);
- 	ret = regmap_read(master->regmap, master->layout->offset, &mckr);
- 	if (ret)
--		goto unlock;
-+		return ret;
- 
- 	mckr &= master->layout->mask;
- 	tmp = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
--	if (tmp == div)
--		goto unlock;
-+	if (tmp == div_index)
-+		return 0;
-+
-+	rate /= characteristics->divisors[div_index];
-+	if (rate < characteristics->output.min)
-+		pr_warn("master clk div is underclocked");
-+	else if (rate > characteristics->output.max)
-+		pr_warn("master clk div is overclocked");
- 
- 	mckr &= ~(MASTER_DIV_MASK << MASTER_DIV_SHIFT);
--	mckr |= (div << MASTER_DIV_SHIFT);
-+	mckr |= (div_index << MASTER_DIV_SHIFT);
- 	ret = regmap_write(master->regmap, master->layout->offset, mckr);
- 	if (ret)
--		goto unlock;
-+		return ret;
- 
- 	while (!clk_master_ready(master))
- 		cpu_relax();
--unlock:
--	spin_unlock_irqrestore(master->lock, flags);
-+
-+	master->div = characteristics->divisors[div_index];
- 
- 	return 0;
- }
- 
--static int clk_master_div_determine_rate(struct clk_hw *hw,
--					 struct clk_rate_request *req)
-+static unsigned long clk_master_div_recalc_rate_chg(struct clk_hw *hw,
-+						    unsigned long parent_rate)
- {
- 	struct clk_master *master = to_clk_master(hw);
--	const struct clk_master_characteristics *characteristics =
--						master->characteristics;
--	struct clk_hw *parent;
--	unsigned long parent_rate, tmp_rate, best_rate = 0;
--	int i, best_diff = INT_MIN, tmp_diff;
--
--	parent = clk_hw_get_parent(hw);
--	if (!parent)
--		return -EINVAL;
--
--	parent_rate = clk_hw_get_rate(parent);
--	if (!parent_rate)
--		return -EINVAL;
- 
--	for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
--		if (!characteristics->divisors[i])
--			break;
--
--		tmp_rate = DIV_ROUND_CLOSEST_ULL(parent_rate,
--						 characteristics->divisors[i]);
--		tmp_diff = abs(tmp_rate - req->rate);
--
--		if (!best_rate || best_diff > tmp_diff) {
--			best_diff = tmp_diff;
--			best_rate = tmp_rate;
--		}
--
--		if (!best_diff)
--			break;
--	}
--
--	req->best_parent_rate = best_rate;
--	req->best_parent_hw = parent;
--	req->rate = best_rate;
--
--	return 0;
-+	return DIV_ROUND_CLOSEST_ULL(parent_rate, master->div);
- }
- 
- static void clk_master_div_restore_context_chg(struct clk_hw *hw)
- {
- 	struct clk_master *master = to_clk_master(hw);
-+	unsigned long flags;
- 	int ret;
- 
--	ret = clk_master_div_set_rate(hw, master->pms.rate,
--				      master->pms.parent_rate);
-+	spin_lock_irqsave(master->lock, flags);
-+	ret = clk_master_div_set(master, master->pms.parent_rate,
-+				 DIV_ROUND_CLOSEST(master->pms.parent_rate,
-+						   master->pms.rate));
-+	spin_unlock_irqrestore(master->lock, flags);
- 	if (ret)
- 		pr_warn("Failed to restore MCK DIV clock\n");
- }
-@@ -261,13 +240,116 @@ static void clk_master_div_restore_conte
- static const struct clk_ops master_div_ops_chg = {
- 	.prepare = clk_master_prepare,
- 	.is_prepared = clk_master_is_prepared,
--	.recalc_rate = clk_master_div_recalc_rate,
--	.determine_rate = clk_master_div_determine_rate,
--	.set_rate = clk_master_div_set_rate,
-+	.recalc_rate = clk_master_div_recalc_rate_chg,
- 	.save_context = clk_master_div_save_context,
- 	.restore_context = clk_master_div_restore_context_chg,
- };
- 
-+static int clk_master_div_notifier_fn(struct notifier_block *notifier,
-+				      unsigned long code, void *data)
-+{
-+	const struct clk_master_characteristics *characteristics =
-+						master_div->characteristics;
-+	struct clk_notifier_data *cnd = data;
-+	unsigned long flags, new_parent_rate, new_rate;
-+	unsigned int mckr, div, new_div = 0;
-+	int ret, i;
-+	long tmp_diff;
-+	long best_diff = -1;
-+
-+	spin_lock_irqsave(master_div->lock, flags);
-+	switch (code) {
-+	case PRE_RATE_CHANGE:
-+		/*
-+		 * We want to avoid any overclocking of MCK DIV domain. To do
-+		 * this we set a safe divider (the underclocking is not of
-+		 * interest as we can go as low as 32KHz). The relation
-+		 * b/w this clock and its parents are as follows:
-+		 *
-+		 * FRAC PLL -> DIV PLL -> MCK DIV
-+		 *
-+		 * With the proper safe divider we should be good even with FRAC
-+		 * PLL at its maximum value.
-+		 */
-+		ret = regmap_read(master_div->regmap, master_div->layout->offset,
-+				  &mckr);
-+		if (ret) {
-+			ret = NOTIFY_STOP_MASK;
-+			goto unlock;
-+		}
-+
-+		mckr &= master_div->layout->mask;
-+		div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+
-+		/* Switch to safe divider. */
-+		clk_master_div_set(master_div,
-+				   cnd->old_rate * characteristics->divisors[div],
-+				   master_div->safe_div);
-+		break;
-+
-+	case POST_RATE_CHANGE:
-+		/*
-+		 * At this point we want to restore MCK DIV domain to its maximum
-+		 * allowed rate.
-+		 */
-+		ret = regmap_read(master_div->regmap, master_div->layout->offset,
-+				  &mckr);
-+		if (ret) {
-+			ret = NOTIFY_STOP_MASK;
-+			goto unlock;
-+		}
-+
-+		mckr &= master_div->layout->mask;
-+		div = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+		new_parent_rate = cnd->new_rate * characteristics->divisors[div];
-+
-+		for (i = 0; i < ARRAY_SIZE(characteristics->divisors); i++) {
-+			if (!characteristics->divisors[i])
-+				break;
-+
-+			new_rate = DIV_ROUND_CLOSEST_ULL(new_parent_rate,
-+							 characteristics->divisors[i]);
-+
-+			tmp_diff = characteristics->output.max - new_rate;
-+			if (tmp_diff < 0)
-+				continue;
-+
-+			if (best_diff < 0 || best_diff > tmp_diff) {
-+				new_div = characteristics->divisors[i];
-+				best_diff = tmp_diff;
-+			}
-+
-+			if (!tmp_diff)
-+				break;
-+		}
-+
-+		if (!new_div) {
-+			ret = NOTIFY_STOP_MASK;
-+			goto unlock;
-+		}
-+
-+		/* Update the div to preserve MCK DIV clock rate. */
-+		clk_master_div_set(master_div, new_parent_rate,
-+				   new_div);
-+
-+		ret = NOTIFY_OK;
-+		break;
-+
-+	default:
-+		ret = NOTIFY_DONE;
-+		break;
-+	}
-+
-+unlock:
-+	spin_unlock_irqrestore(master_div->lock, flags);
-+
-+	return ret;
-+}
-+
-+static struct notifier_block clk_master_div_notifier = {
-+	.notifier_call = clk_master_div_notifier_fn,
-+};
-+
- static void clk_sama7g5_master_best_diff(struct clk_rate_request *req,
- 					 struct clk_hw *parent,
- 					 unsigned long parent_rate,
-@@ -496,6 +578,8 @@ at91_clk_register_master_internal(struct
- 	struct clk_master *master;
- 	struct clk_init_data init;
- 	struct clk_hw *hw;
-+	unsigned int mckr;
-+	unsigned long irqflags;
- 	int ret;
- 
- 	if (!name || !num_parents || !parent_names || !lock)
-@@ -518,6 +602,16 @@ at91_clk_register_master_internal(struct
- 	master->chg_pid = chg_pid;
- 	master->lock = lock;
- 
-+	if (ops == &master_div_ops_chg) {
-+		spin_lock_irqsave(master->lock, irqflags);
-+		regmap_read(master->regmap, master->layout->offset, &mckr);
-+		spin_unlock_irqrestore(master->lock, irqflags);
-+
-+		mckr &= layout->mask;
-+		mckr = (mckr >> MASTER_DIV_SHIFT) & MASTER_DIV_MASK;
-+		master->div = characteristics->divisors[mckr];
-+	}
-+
- 	hw = &master->hw;
- 	ret = clk_hw_register(NULL, &master->hw);
- 	if (ret) {
-@@ -554,19 +648,29 @@ at91_clk_register_master_div(struct regm
- 		const char *name, const char *parent_name,
- 		const struct clk_master_layout *layout,
- 		const struct clk_master_characteristics *characteristics,
--		spinlock_t *lock, u32 flags)
-+		spinlock_t *lock, u32 flags, u32 safe_div)
- {
- 	const struct clk_ops *ops;
-+	struct clk_hw *hw;
- 
- 	if (flags & CLK_SET_RATE_GATE)
- 		ops = &master_div_ops;
- 	else
- 		ops = &master_div_ops_chg;
- 
--	return at91_clk_register_master_internal(regmap, name, 1,
--						 &parent_name, layout,
--						 characteristics, ops,
--						 lock, flags, -EINVAL);
-+	hw = at91_clk_register_master_internal(regmap, name, 1,
-+					       &parent_name, layout,
-+					       characteristics, ops,
-+					       lock, flags, -EINVAL);
-+
-+	if (!IS_ERR(hw) && safe_div) {
-+		master_div = to_clk_master(hw);
-+		master_div->safe_div = safe_div;
-+		clk_notifier_register(hw->clk,
-+				      &clk_master_div_notifier);
-+	}
-+
-+	return hw;
- }
- 
- static unsigned long
---- a/drivers/clk/at91/dt-compat.c
-+++ b/drivers/clk/at91/dt-compat.c
-@@ -399,7 +399,7 @@ of_at91_clk_master_setup(struct device_n
- 
- 	hw = at91_clk_register_master_div(regmap, name, "masterck_pres",
- 					  layout, characteristics,
--					  &mck_lock, CLK_SET_RATE_GATE);
-+					  &mck_lock, CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto out_free_characteristics;
- 
---- a/drivers/clk/at91/pmc.h
-+++ b/drivers/clk/at91/pmc.h
-@@ -182,7 +182,7 @@ at91_clk_register_master_div(struct regm
- 			     const char *parent_names,
- 			     const struct clk_master_layout *layout,
- 			     const struct clk_master_characteristics *characteristics,
--			     spinlock_t *lock, u32 flags);
-+			     spinlock_t *lock, u32 flags, u32 safe_div);
- 
- struct clk_hw * __init
- at91_clk_sama7g5_register_master(struct regmap *regmap,
---- a/drivers/clk/at91/sama5d2.c
-+++ b/drivers/clk/at91/sama5d2.c
-@@ -249,7 +249,7 @@ static void __init sama5d2_pmc_setup(str
- 					  "masterck_pres",
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/sama5d3.c
-+++ b/drivers/clk/at91/sama5d3.c
-@@ -184,7 +184,7 @@ static void __init sama5d3_pmc_setup(str
- 					  "masterck_pres",
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/sama5d4.c
-+++ b/drivers/clk/at91/sama5d4.c
-@@ -199,7 +199,7 @@ static void __init sama5d4_pmc_setup(str
- 					  "masterck_pres",
- 					  &at91sam9x5_master_layout,
- 					  &mck_characteristics, &mck_lock,
--					  CLK_SET_RATE_GATE);
-+					  CLK_SET_RATE_GATE, 0);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
---- a/drivers/clk/at91/sama7g5.c
-+++ b/drivers/clk/at91/sama7g5.c
-@@ -993,7 +993,7 @@ static void __init sama7g5_pmc_setup(str
- 	parent_names[0] = "cpupll_divpmcck";
- 	hw = at91_clk_register_master_div(regmap, "mck0", "cpupll_divpmcck",
- 					  &mck0_layout, &mck0_characteristics,
--					  &pmc_mck0_lock, 0);
-+					  &pmc_mck0_lock, CLK_GET_RATE_NOCACHE, 5);
- 	if (IS_ERR(hw))
- 		goto err_free;
- 
diff --git a/target/linux/at91/patches-5.15/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch b/target/linux/at91/patches-5.15/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
deleted file mode 100644
index 6cdec0add7..0000000000
--- a/target/linux/at91/patches-5.15/108-clk-at91-sama7g5-set-low-limit-for-mck0-at-32KHz.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 9fd5a49f6da9de5da83f4a53eccefad647ab15ed Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:18 +0300
-Subject: [PATCH 246/247] clk: at91: sama7g5: set low limit for mck0 at 32KHz
-
-MCK0 could go as low as 32KHz. Set this limit.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-15-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/at91/sama7g5.c | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
---- a/drivers/clk/at91/sama7g5.c
-+++ b/drivers/clk/at91/sama7g5.c
-@@ -849,7 +849,7 @@ static const struct {
- 
- /* MCK0 characteristics. */
- static const struct clk_master_characteristics mck0_characteristics = {
--	.output = { .min = 50000000, .max = 200000000 },
-+	.output = { .min = 32768, .max = 200000000 },
- 	.divisors = { 1, 2, 4, 3, 5 },
- 	.have_div3_pres = 1,
- };
diff --git a/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch b/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
deleted file mode 100644
index 5b69d0cbc1..0000000000
--- a/target/linux/at91/patches-5.15/109-clk-use-clk_core_get_rate_recalc-in-clk_rate_get.patch
+++ /dev/null
@@ -1,32 +0,0 @@
-From fe07791494a78d5a4be1363385e6ba7940740644 Mon Sep 17 00:00:00 2001
-From: Claudiu Beznea <claudiu.beznea at microchip.com>
-Date: Mon, 11 Oct 2021 14:27:19 +0300
-Subject: [PATCH 247/247] clk: use clk_core_get_rate_recalc() in clk_rate_get()
-
-In case clock flags contains CLK_GET_RATE_NOCACHE the clk_rate_get()
-will return the cached rate. Thus, use clk_core_get_rate_recalc() which
-takes proper action when clock flags contains CLK_GET_RATE_NOCACHE.
-
-Signed-off-by: Claudiu Beznea <claudiu.beznea at microchip.com>
-Link: https://lore.kernel.org/r/20211011112719.3951784-16-claudiu.beznea at microchip.com
-Acked-by: Nicolas Ferre <nicolas.ferre at microchip.com>
-[sboyd at kernel.org: Grab prepare lock around operation]
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/clk.c | 5 ++++-
- 1 file changed, 4 insertions(+), 1 deletion(-)
-
---- a/drivers/clk/clk.c
-+++ b/drivers/clk/clk.c
-@@ -3145,7 +3145,10 @@ static int clk_rate_get(void *data, u64
- {
- 	struct clk_core *core = data;
- 
--	*val = core->rate;
-+	clk_prepare_lock();
-+	*val = clk_core_get_rate_recalc(core);
-+	clk_prepare_unlock();
-+
- 	return 0;
- }
- 
diff --git a/target/linux/at91/sam9x/config-5.15 b/target/linux/at91/sam9x/config-5.15
deleted file mode 100644
index 34c6d96b1c..0000000000
--- a/target/linux/at91/sam9x/config-5.15
+++ /dev/null
@@ -1,317 +0,0 @@
-CONFIG_ALIGNMENT_TRAP=y
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_AT91=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MULTIPLATFORM=y
-# CONFIG_ARCH_MULTI_V4 is not set
-CONFIG_ARCH_MULTI_V4T=y
-CONFIG_ARCH_MULTI_V4_V5=y
-CONFIG_ARCH_MULTI_V5=y
-CONFIG_ARCH_NR_GPIO=0
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARM=y
-CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
-CONFIG_ARM_HAS_SG_CHAIN=y
-CONFIG_ARM_L1_CACHE_SHIFT=5
-CONFIG_ARM_PATCH_PHYS_VIRT=y
-CONFIG_ARM_THUMB=y
-CONFIG_ARM_UNWIND=y
-# CONFIG_AT91RM9200_WATCHDOG is not set
-CONFIG_AT91SAM9X_WATCHDOG=y
-# CONFIG_AT91_ADC is not set
-CONFIG_AT91_SAMA5D2_ADC=y
-CONFIG_AT91_SOC_ID=y
-# CONFIG_AT91_SOC_SFR is not set
-CONFIG_ATMEL_AIC5_IRQ=y
-CONFIG_ATMEL_AIC_IRQ=y
-CONFIG_ATMEL_CLOCKSOURCE_PIT=y
-CONFIG_ATMEL_CLOCKSOURCE_TCB=y
-CONFIG_ATMEL_EBI=y
-CONFIG_ATMEL_PIT=y
-CONFIG_ATMEL_PM=y
-CONFIG_ATMEL_SDRAMC=y
-CONFIG_ATMEL_SSC=y
-CONFIG_ATMEL_ST=y
-CONFIG_ATMEL_TCB_CLKSRC=y
-CONFIG_AT_HDMAC=y
-CONFIG_AT_XDMAC=y
-CONFIG_AUTO_ZRELADDR=y
-CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
-CONFIG_BLK_PM=y
-CONFIG_CLKSRC_MMIO=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_COMMON_CLK=y
-CONFIG_COMMON_CLK_AT91=y
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CONFIGFS_FS=y
-CONFIG_CPU_32v4T=y
-CONFIG_CPU_32v5=y
-CONFIG_CPU_ABRT_EV4T=y
-CONFIG_CPU_ABRT_EV5TJ=y
-CONFIG_CPU_ARM920T=y
-CONFIG_CPU_ARM926T=y
-# CONFIG_CPU_CACHE_ROUND_ROBIN is not set
-CONFIG_CPU_CACHE_V4WT=y
-CONFIG_CPU_CACHE_VIVT=y
-CONFIG_CPU_COPY_V4WB=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
-# CONFIG_CPU_DCACHE_WRITETHROUGH is not set
-CONFIG_CPU_NO_EFFICIENT_FFS=y
-CONFIG_CPU_PABRT_LEGACY=y
-CONFIG_CPU_PM=y
-CONFIG_CPU_THUMB_CAPABLE=y
-CONFIG_CPU_TLB_V4WBI=y
-CONFIG_CPU_USE_DOMAINS=y
-CONFIG_CRC16=y
-CONFIG_CRC7=y
-CONFIG_CRC_CCITT=y
-CONFIG_CRC_ITU_T=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_HASH_INFO=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_ZSTD=y
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-CONFIG_DMADEVICES=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
-CONFIG_DTC=y
-CONFIG_EDAC_ATOMIC_SCRUB=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_EEPROM_AT24=y
-CONFIG_EXT4_FS=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FREEZER=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_CACHE=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ATOMIC64=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_PINCTRL_GROUPS=y
-CONFIG_GENERIC_PINMUX_FUNCTIONS=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GLOB=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_CDEV=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_ATMEL=y
-CONFIG_HZ=128
-CONFIG_HZ_FIXED=128
-CONFIG_HZ_PERIODIC=y
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_AT91=y
-# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_GPIO=y
-CONFIG_IIO=y
-CONFIG_IIO_BUFFER=y
-CONFIG_IIO_KFIFO_BUF=y
-CONFIG_IIO_TRIGGER=y
-CONFIG_IIO_TRIGGERED_BUFFER=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-CONFIG_LEDS_GPIO=y
-CONFIG_LEDS_PWM=y
-CONFIG_LEDS_TRIGGER_CPU=y
-CONFIG_LEDS_TRIGGER_GPIO=y
-CONFIG_LIBFDT=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LZO_COMPRESS=y
-CONFIG_LZO_DECOMPRESS=y
-CONFIG_MACB=y
-CONFIG_MACB_USE_HWSTAMP=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MEMORY=y
-CONFIG_MFD_AT91_USART=y
-CONFIG_MFD_ATMEL_FLEXCOM=y
-CONFIG_MFD_ATMEL_HLCDC=y
-CONFIG_MFD_ATMEL_SMC=y
-CONFIG_MFD_CORE=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MICREL_PHY=y
-CONFIG_MICROCHIP_PIT64B=y
-CONFIG_MIGRATION=y
-CONFIG_MMC=y
-CONFIG_MMC_ATMELMCI=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_OF_AT91=y
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_MTD_DATAFLASH=y
-# CONFIG_MTD_DATAFLASH_OTP is not set
-# CONFIG_MTD_DATAFLASH_WRITE_VERIFY is not set
-CONFIG_MTD_SPI_NOR=y
-CONFIG_MTD_UBI=y
-CONFIG_MTD_UBI_BEB_LIMIT=20
-# CONFIG_MTD_UBI_BLOCK is not set
-CONFIG_MTD_UBI_FASTMAP=y
-CONFIG_MTD_UBI_GLUEBI=y
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_KUSER_HELPERS=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NLS=y
-CONFIG_NVMEM=y
-# CONFIG_NVMEM_MICROCHIP_OTPC is not set
-CONFIG_NVMEM_SYSFS=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_AT91=y
-# CONFIG_PINCTRL_AT91PIO4 is not set
-CONFIG_PM=y
-CONFIG_PM_CLK=y
-CONFIG_PM_SLEEP=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_RESET_AT91_POWEROFF=y
-CONFIG_POWER_RESET_AT91_RESET=y
-CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PPS=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_PWM=y
-CONFIG_PWM_ATMEL=y
-CONFIG_PWM_ATMEL_HLCDC_PWM=y
-CONFIG_PWM_ATMEL_TCB=y
-CONFIG_PWM_SYSFS=y
-CONFIG_RATIONAL=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_AT91RM9200=y
-CONFIG_RTC_DRV_AT91SAM9=y
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_RTC_MC146818_LIB=y
-CONFIG_SAMA5D4_WATCHDOG=y
-# CONFIG_SERIAL_8250 is not set
-CONFIG_SERIAL_ATMEL=y
-CONFIG_SERIAL_ATMEL_CONSOLE=y
-CONFIG_SERIAL_ATMEL_PDC=y
-# CONFIG_SERIAL_ATMEL_TTYAT is not set
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SGL_ALLOC=y
-CONFIG_SOC_AT91RM9200=y
-CONFIG_SOC_AT91SAM9=y
-CONFIG_SOC_BUS=y
-CONFIG_SOC_SAM9X60=y
-CONFIG_SOC_SAM_V4_V5=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPI=y
-# CONFIG_SPI_AT91_USART is not set
-CONFIG_SPI_ATMEL=y
-CONFIG_SPI_ATMEL_QUADSPI=y
-CONFIG_SPI_BITBANG=y
-CONFIG_SPI_GPIO=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-CONFIG_SPI_SPIDEV=y
-CONFIG_SPLIT_PTLOCK_CPUS=999999
-CONFIG_SRAM=y
-CONFIG_SRAM_EXEC=y
-CONFIG_SRCU=y
-CONFIG_SUSPEND=y
-CONFIG_SUSPEND_FREEZER=y
-CONFIG_SWPHY=y
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TINY_SRCU=y
-CONFIG_UBIFS_FS=y
-CONFIG_UBIFS_FS_ADVANCED_COMPR=y
-CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
-CONFIG_UNWINDER_ARM=y
-CONFIG_USB=y
-CONFIG_USB_ACM=y
-CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-# CONFIG_USB_AT91 is not set
-# CONFIG_USB_ATMEL_USBA is not set
-CONFIG_USB_COMMON=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_HCD_AT91=y
-# CONFIG_USB_EHCI_HCD_PLATFORM is not set
-CONFIG_USB_GADGET=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_OHCI_HCD_AT91=y
-CONFIG_USB_OHCI_HCD_PLATFORM=y
-CONFIG_USB_SERIAL=y
-# CONFIG_USB_SERIAL_CONSOLE is not set
-CONFIG_USB_SERIAL_FTDI_SIO=y
-CONFIG_USB_SERIAL_PL2303=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USE_OF=y
-# CONFIG_VFP is not set
-CONFIG_WATCHDOG_CORE=y
-CONFIG_XXHASH=y
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZSTD_COMPRESS=y
-CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/at91/sama5/config-5.15 b/target/linux/at91/sama5/config-5.15
deleted file mode 100644
index 47596039c8..0000000000
--- a/target/linux/at91/sama5/config-5.15
+++ /dev/null
@@ -1,493 +0,0 @@
-CONFIG_ALIGNMENT_TRAP=y
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_AT91=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MULTIPLATFORM=y
-CONFIG_ARCH_MULTI_V6_V7=y
-CONFIG_ARCH_MULTI_V7=y
-CONFIG_ARCH_NR_GPIO=0
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARM=y
-CONFIG_ARM_AT91_CPUIDLE=y
-CONFIG_ARM_CPU_SUSPEND=y
-CONFIG_ARM_CRYPTO=y
-CONFIG_ARM_HAS_SG_CHAIN=y
-CONFIG_ARM_HEAVY_MB=y
-CONFIG_ARM_L1_CACHE_SHIFT=6
-CONFIG_ARM_L1_CACHE_SHIFT_6=y
-CONFIG_ARM_PATCH_IDIV=y
-CONFIG_ARM_PATCH_PHYS_VIRT=y
-CONFIG_ARM_THUMB=y
-CONFIG_ARM_UNWIND=y
-CONFIG_ARM_VIRT_EXT=y
-CONFIG_AT91SAM9X_WATCHDOG=y
-CONFIG_AT91_ADC=y
-CONFIG_AT91_SAMA5D2_ADC=y
-CONFIG_AT91_SOC_ID=y
-# CONFIG_AT91_SOC_SFR is not set
-CONFIG_ATMEL_AIC5_IRQ=y
-# CONFIG_ATMEL_CLOCKSOURCE_PIT is not set
-CONFIG_ATMEL_CLOCKSOURCE_TCB=y
-CONFIG_ATMEL_EBI=y
-CONFIG_ATMEL_PM=y
-CONFIG_ATMEL_SDRAMC=y
-CONFIG_ATMEL_SSC=y
-CONFIG_ATMEL_TCB_CLKSRC=y
-CONFIG_AT_HDMAC=y
-CONFIG_AT_XDMAC=y
-CONFIG_AUTO_ZRELADDR=y
-CONFIG_BACKLIGHT_CLASS_DEVICE=y
-CONFIG_BACKLIGHT_PWM=y
-CONFIG_BATTERY_ACT8945A=y
-CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=4
-CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_PM=y
-CONFIG_CACHE_L2X0=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMA=y
-CONFIG_CMA_ALIGNMENT=8
-CONFIG_CMA_AREAS=7
-# CONFIG_CMA_DEBUG is not set
-# CONFIG_CMA_DEBUGFS is not set
-CONFIG_CMA_SIZE_MBYTES=16
-# CONFIG_CMA_SIZE_SEL_MAX is not set
-CONFIG_CMA_SIZE_SEL_MBYTES=y
-# CONFIG_CMA_SIZE_SEL_MIN is not set
-# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
-# CONFIG_CMA_SYSFS is not set
-CONFIG_CMDLINE="console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
-CONFIG_CMDLINE_FROM_BOOTLOADER=y
-CONFIG_COMMON_CLK=y
-CONFIG_COMMON_CLK_AT91=y
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CONFIGFS_FS=y
-CONFIG_CONTIG_ALLOC=y
-CONFIG_COREDUMP=y
-CONFIG_CPU_32v6K=y
-CONFIG_CPU_32v7=y
-CONFIG_CPU_ABRT_EV7=y
-CONFIG_CPU_CACHE_V7=y
-CONFIG_CPU_CACHE_VIPT=y
-CONFIG_CPU_COPY_V6=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
-CONFIG_CPU_HAS_ASID=y
-CONFIG_CPU_IDLE=y
-CONFIG_CPU_IDLE_GOV_LADDER=y
-CONFIG_CPU_IDLE_GOV_MENU=y
-CONFIG_CPU_PABRT_V7=y
-CONFIG_CPU_PM=y
-CONFIG_CPU_SPECTRE=y
-CONFIG_CPU_THUMB_CAPABLE=y
-CONFIG_CPU_TLB_V7=y
-CONFIG_CPU_V7=y
-CONFIG_CRASH_CORE=y
-CONFIG_CRASH_DUMP=y
-CONFIG_CRC16=y
-# CONFIG_CRC32_SARWATE is not set
-CONFIG_CRC32_SLICEBY8=y
-CONFIG_CROSS_MEMORY_ATTACH=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_DRBG=y
-CONFIG_CRYPTO_DRBG_HMAC=y
-CONFIG_CRYPTO_DRBG_MENU=y
-CONFIG_CRYPTO_HASH_INFO=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_JITTERENTROPY=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_SHA256=y
-CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_RNG=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_RNG_DEFAULT=y
-CONFIG_CRYPTO_SEQIV=y
-CONFIG_CRYPTO_SHA256=y
-CONFIG_CRYPTO_SHA512=y
-CONFIG_CRYPTO_ZSTD=y
-CONFIG_DCACHE_WORD_ACCESS=y
-CONFIG_DEBUG_LL_INCLUDE="mach/debug-macro.S"
-CONFIG_DEBUG_MEMORY_INIT=y
-CONFIG_DEBUG_USER=y
-CONFIG_DMADEVICES=y
-CONFIG_DMA_CMA=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
-CONFIG_DMA_SHARED_BUFFER=y
-CONFIG_DNOTIFY=y
-CONFIG_DRM=y
-CONFIG_DRM_ATMEL_HLCDC=y
-CONFIG_DRM_BRIDGE=y
-CONFIG_DRM_DP_AUX_BUS=y
-CONFIG_DRM_FBDEV_EMULATION=y
-CONFIG_DRM_FBDEV_OVERALLOC=100
-CONFIG_DRM_GEM_CMA_HELPER=y
-CONFIG_DRM_KMS_CMA_HELPER=y
-CONFIG_DRM_KMS_HELPER=y
-CONFIG_DRM_PANEL=y
-CONFIG_DRM_PANEL_BRIDGE=y
-CONFIG_DRM_PANEL_ORIENTATION_QUIRKS=y
-CONFIG_DRM_PANEL_SIMPLE=y
-CONFIG_DTC=y
-CONFIG_DVB_CORE=y
-CONFIG_EDAC_ATOMIC_SCRUB=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_EEPROM_AT24=y
-CONFIG_ELF_CORE=y
-CONFIG_EXT4_FS=y
-CONFIG_FAT_FS=y
-CONFIG_FB=y
-CONFIG_FB_CFB_COPYAREA=y
-CONFIG_FB_CFB_FILLRECT=y
-CONFIG_FB_CFB_IMAGEBLIT=y
-CONFIG_FB_CMDLINE=y
-CONFIG_FB_DEFERRED_IO=y
-CONFIG_FB_SYS_COPYAREA=y
-CONFIG_FB_SYS_FILLRECT=y
-CONFIG_FB_SYS_FOPS=y
-CONFIG_FB_SYS_IMAGEBLIT=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FORCE_MAX_ZONEORDER=15
-CONFIG_FREEZER=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_CACHE=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_CPU_VULNERABILITIES=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_CHIP=y
-CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GENERIC_VDSO_32=y
-CONFIG_GLOB=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_CDEV=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-# CONFIG_HARDEN_BRANCH_HISTORY is not set
-# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HAVE_SMP=y
-CONFIG_HDMI=y
-CONFIG_HID=y
-CONFIG_HID_GENERIC=y
-CONFIG_HW_RANDOM=y
-CONFIG_HW_RANDOM_ATMEL=y
-CONFIG_HZ_FIXED=0
-CONFIG_I2C=y
-CONFIG_I2C_ALGOBIT=y
-CONFIG_I2C_AT91=y
-# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_GPIO=y
-CONFIG_I2C_HELPER_AUTO=y
-CONFIG_IIO=y
-CONFIG_IIO_BUFFER=y
-CONFIG_IIO_KFIFO_BUF=y
-CONFIG_IIO_TRIGGER=y
-CONFIG_IIO_TRIGGERED_BUFFER=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-CONFIG_INPUT_EVDEV=y
-CONFIG_INPUT_KEYBOARD=y
-CONFIG_INPUT_LEDS=y
-CONFIG_INPUT_TOUCHSCREEN=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-# CONFIG_JFFS2_FS is not set
-CONFIG_KCMP=y
-CONFIG_KERNEL_GZIP=y
-# CONFIG_KERNEL_XZ is not set
-CONFIG_KEXEC=y
-CONFIG_KEXEC_CORE=y
-CONFIG_KEYBOARD_GPIO=y
-CONFIG_KEYBOARD_QT1070=y
-CONFIG_LEDS_GPIO=y
-CONFIG_LEDS_PWM=y
-CONFIG_LEDS_TRIGGER_CPU=y
-CONFIG_LEDS_TRIGGER_GPIO=y
-CONFIG_LIBFDT=y
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOG_BUF_SHIFT=16
-CONFIG_LZO_COMPRESS=y
-CONFIG_LZO_DECOMPRESS=y
-CONFIG_MACB=y
-CONFIG_MACB_USE_HWSTAMP=y
-CONFIG_MAGIC_SYSRQ=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MEDIA_ANALOG_TV_SUPPORT=y
-CONFIG_MEDIA_ATTACH=y
-CONFIG_MEDIA_CAMERA_SUPPORT=y
-CONFIG_MEDIA_DIGITAL_TV_SUPPORT=y
-CONFIG_MEDIA_PLATFORM_SUPPORT=y
-CONFIG_MEDIA_RADIO_SUPPORT=y
-CONFIG_MEDIA_SDR_SUPPORT=y
-CONFIG_MEDIA_SUPPORT=y
-CONFIG_MEDIA_TEST_SUPPORT=y
-CONFIG_MEDIA_TUNER=y
-CONFIG_MEDIA_USB_SUPPORT=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MEMORY=y
-CONFIG_MEMORY_ISOLATION=y
-CONFIG_MFD_ACT8945A=y
-CONFIG_MFD_AT91_USART=y
-CONFIG_MFD_ATMEL_FLEXCOM=y
-CONFIG_MFD_ATMEL_HLCDC=y
-CONFIG_MFD_ATMEL_SMC=y
-CONFIG_MFD_CORE=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MICREL_PHY=y
-CONFIG_MIGHT_HAVE_CACHE_L2X0=y
-CONFIG_MIGRATION=y
-CONFIG_MMC=y
-CONFIG_MMC_ATMELMCI=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_OF_AT91=y
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_MODULES_USE_ELF_REL=y
-# CONFIG_MTD_CFI_AMDSTD is not set
-# CONFIG_MTD_CFI_INTELEXT is not set
-CONFIG_MTD_CMDLINE_PARTS=y
-# CONFIG_MTD_COMPLEX_MAPPINGS is not set
-CONFIG_MTD_SPI_NOR=y
-CONFIG_MTD_UBI=y
-CONFIG_MTD_UBI_BEB_LIMIT=20
-# CONFIG_MTD_UBI_BLOCK is not set
-CONFIG_MTD_UBI_FASTMAP=y
-CONFIG_MTD_UBI_WL_THRESHOLD=4096
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
-# CONFIG_NEON is not set
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NLS=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_850=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NLS_UTF8=y
-CONFIG_NO_HZ_COMMON=y
-CONFIG_NO_HZ_IDLE=y
-CONFIG_NVMEM=y
-# CONFIG_NVMEM_MICROCHIP_OTPC is not set
-CONFIG_NVMEM_SYSFS=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-CONFIG_OUTER_CACHE=y
-CONFIG_OUTER_CACHE_SYNC=y
-CONFIG_PAGE_OFFSET=0xC0000000
-# CONFIG_PARTITION_ADVANCED is not set
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_AT91=y
-CONFIG_PINCTRL_AT91PIO4=y
-# CONFIG_PINCTRL_SINGLE is not set
-CONFIG_PM=y
-CONFIG_PM_CLK=y
-CONFIG_PM_SLEEP=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_RESET_AT91_POWEROFF=y
-CONFIG_POWER_RESET_AT91_RESET=y
-CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
-CONFIG_POWER_SUPPLY=y
-CONFIG_PPS=y
-# CONFIG_PREVENT_FIRMWARE_BUILD is not set
-CONFIG_PRINTK_TIME=y
-CONFIG_PROC_VMCORE=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_PWM=y
-CONFIG_PWM_ATMEL=y
-CONFIG_PWM_ATMEL_HLCDC_PWM=y
-CONFIG_PWM_ATMEL_TCB=y
-CONFIG_PWM_SYSFS=y
-CONFIG_RATIONAL=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGMAP_SPI=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_ACT8865=y
-CONFIG_REGULATOR_ACT8945A=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_AT91RM9200=y
-# CONFIG_RTC_DRV_AT91SAM9 is not set
-# CONFIG_RTC_DRV_CMOS is not set
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_SAMA5D4_WATCHDOG=y
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-# CONFIG_SCSI_LOWLEVEL is not set
-# CONFIG_SERIAL_8250 is not set
-CONFIG_SERIAL_ATMEL=y
-CONFIG_SERIAL_ATMEL_CONSOLE=y
-CONFIG_SERIAL_ATMEL_PDC=y
-# CONFIG_SERIAL_ATMEL_TTYAT is not set
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SGL_ALLOC=y
-CONFIG_SG_POOL=y
-CONFIG_SND=y
-CONFIG_SND_ARM=y
-# CONFIG_SND_AT73C213 is not set
-# CONFIG_SND_AT91_SOC_SAM9G20_WM8731 is not set
-# CONFIG_SND_AT91_SOC_SAM9X5_WM8731 is not set
-CONFIG_SND_ATMEL_SOC=y
-CONFIG_SND_ATMEL_SOC_CLASSD=y
-CONFIG_SND_ATMEL_SOC_DMA=y
-CONFIG_SND_ATMEL_SOC_I2S=y
-CONFIG_SND_ATMEL_SOC_PDC=y
-# CONFIG_SND_ATMEL_SOC_PDMIC is not set
-CONFIG_SND_ATMEL_SOC_SSC=y
-CONFIG_SND_ATMEL_SOC_SSC_DMA=y
-# CONFIG_SND_ATMEL_SOC_SSC_PDC is not set
-# CONFIG_SND_ATMEL_SOC_TSE850_PCM5142 is not set
-CONFIG_SND_ATMEL_SOC_WM8904=y
-# CONFIG_SND_COMPRESS_OFFLOAD is not set
-CONFIG_SND_DMAENGINE_PCM=y
-CONFIG_SND_JACK=y
-CONFIG_SND_JACK_INPUT_DEV=y
-# CONFIG_SND_MCHP_SOC_I2S_MCC is not set
-# CONFIG_SND_MCHP_SOC_SPDIFRX is not set
-# CONFIG_SND_MCHP_SOC_SPDIFTX is not set
-CONFIG_SND_PCM=y
-CONFIG_SND_PCM_TIMER=y
-CONFIG_SND_SOC=y
-CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
-CONFIG_SND_SOC_I2C_AND_SPI=y
-CONFIG_SND_SOC_MIKROE_PROTO=y
-CONFIG_SND_SOC_WM8731=y
-CONFIG_SND_SOC_WM8904=y
-CONFIG_SND_SPI=y
-CONFIG_SND_SUPPORT_OLD_API=y
-CONFIG_SND_TIMER=y
-CONFIG_SOC_BUS=y
-CONFIG_SOC_SAMA5=y
-CONFIG_SOC_SAMA5D2=y
-CONFIG_SOC_SAMA5D3=y
-CONFIG_SOC_SAMA5D4=y
-# CONFIG_SOC_SAMA7G5 is not set
-CONFIG_SOC_SAM_V7=y
-CONFIG_SOUND=y
-CONFIG_SOUND_OSS_CORE=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPI=y
-# CONFIG_SPI_AT91_USART is not set
-CONFIG_SPI_ATMEL=y
-CONFIG_SPI_ATMEL_QUADSPI=y
-CONFIG_SPI_BITBANG=y
-CONFIG_SPI_GPIO=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-# CONFIG_SQUASHFS is not set
-CONFIG_SRAM=y
-CONFIG_SRAM_EXEC=y
-CONFIG_SRCU=y
-# CONFIG_STANDALONE is not set
-CONFIG_SUSPEND=y
-CONFIG_SUSPEND_FREEZER=y
-CONFIG_SWPHY=y
-# CONFIG_SWP_EMULATE is not set
-CONFIG_SYNC_FILE=y
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TINY_SRCU=y
-CONFIG_TOUCHSCREEN_ATMEL_MXT=y
-CONFIG_UACCESS_WITH_MEMCPY=y
-CONFIG_UBIFS_FS=y
-CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
-CONFIG_UNWINDER_ARM=y
-CONFIG_USB=y
-CONFIG_USB_ACM=y
-CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
-# CONFIG_USB_AT91 is not set
-# CONFIG_USB_ATMEL_USBA is not set
-CONFIG_USB_COMMON=y
-CONFIG_USB_EHCI_HCD=y
-CONFIG_USB_EHCI_HCD_AT91=y
-# CONFIG_USB_EHCI_HCD_PLATFORM is not set
-# CONFIG_USB_EHCI_ROOT_HUB_TT is not set
-CONFIG_USB_GADGET=y
-CONFIG_USB_HID=y
-CONFIG_USB_OHCI_HCD=y
-CONFIG_USB_OHCI_HCD_AT91=y
-CONFIG_USB_OHCI_HCD_PLATFORM=y
-# CONFIG_USB_PWC is not set
-CONFIG_USB_SERIAL=y
-# CONFIG_USB_SERIAL_CONSOLE is not set
-CONFIG_USB_SERIAL_FTDI_SIO=y
-CONFIG_USB_SERIAL_PL2303=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_SUPPORT=y
-CONFIG_USE_OF=y
-CONFIG_V4L_PLATFORM_DRIVERS=y
-CONFIG_VFAT_FS=y
-CONFIG_VFP=y
-CONFIG_VFPv3=y
-CONFIG_VIDEOMODE_HELPERS=y
-# CONFIG_VIDEO_CPIA2 is not set
-CONFIG_VIDEO_DEV=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_V4L2_I2C=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_WATCHDOG_CORE=y
-# CONFIG_WQ_POWER_EFFICIENT_DEFAULT is not set
-CONFIG_XXHASH=y
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZSTD_COMPRESS=y
-CONFIG_ZSTD_DECOMPRESS=y
diff --git a/target/linux/at91/sama7/config-5.15 b/target/linux/at91/sama7/config-5.15
deleted file mode 100644
index 228007b8c3..0000000000
--- a/target/linux/at91/sama7/config-5.15
+++ /dev/null
@@ -1,406 +0,0 @@
-CONFIG_ALIGNMENT_TRAP=y
-# CONFIG_ALLOW_DEV_COREDUMP is not set
-CONFIG_ARCH_32BIT_OFF_T=y
-CONFIG_ARCH_AT91=y
-CONFIG_ARCH_HIBERNATION_POSSIBLE=y
-CONFIG_ARCH_KEEP_MEMBLOCK=y
-CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
-CONFIG_ARCH_MULTIPLATFORM=y
-CONFIG_ARCH_MULTI_V6_V7=y
-CONFIG_ARCH_MULTI_V7=y
-CONFIG_ARCH_NR_GPIO=0
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_SUSPEND_POSSIBLE=y
-CONFIG_ARM=y
-CONFIG_ARM_CRYPTO=y
-CONFIG_ARM_GIC=y
-CONFIG_ARM_HAS_SG_CHAIN=y
-CONFIG_ARM_L1_CACHE_SHIFT=6
-CONFIG_ARM_L1_CACHE_SHIFT_6=y
-# CONFIG_ARM_PATCH_IDIV is not set
-CONFIG_ARM_PATCH_PHYS_VIRT=y
-CONFIG_ARM_THUMB=y
-CONFIG_ARM_UNWIND=y
-CONFIG_ARM_VIRT_EXT=y
-# CONFIG_AT91SAM9X_WATCHDOG is not set
-# CONFIG_AT91_ADC is not set
-CONFIG_AT91_SAMA5D2_ADC=y
-CONFIG_AT91_SOC_ID=y
-# CONFIG_AT91_SOC_SFR is not set
-CONFIG_ATMEL_CLOCKSOURCE_TCB=y
-# CONFIG_ATMEL_EBI is not set
-CONFIG_ATMEL_SDRAMC=y
-CONFIG_ATMEL_TCB_CLKSRC=y
-# CONFIG_AT_HDMAC is not set
-CONFIG_AT_XDMAC=y
-CONFIG_AUTO_ZRELADDR=y
-CONFIG_BINFMT_FLAT_ARGVP_ENVP_ON_STACK=y
-CONFIG_BLK_DEV_LOOP=y
-CONFIG_BLK_DEV_RAM=y
-CONFIG_BLK_DEV_RAM_COUNT=1
-CONFIG_BLK_DEV_RAM_SIZE=8192
-CONFIG_BLK_DEV_SD=y
-# CONFIG_CACHE_L2X0 is not set
-CONFIG_CAN=y
-CONFIG_CLKSRC_MMIO=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CMA=y
-CONFIG_CMA_ALIGNMENT=9
-CONFIG_CMA_AREAS=7
-# CONFIG_CMA_DEBUG is not set
-# CONFIG_CMA_DEBUGFS is not set
-CONFIG_CMA_SIZE_MBYTES=256
-# CONFIG_CMA_SIZE_SEL_MAX is not set
-CONFIG_CMA_SIZE_SEL_MBYTES=y
-# CONFIG_CMA_SIZE_SEL_MIN is not set
-# CONFIG_CMA_SIZE_SEL_PERCENTAGE is not set
-# CONFIG_CMA_SYSFS is not set
-CONFIG_CMDLINE="console=ttyS0,115200 earlyprintk nocache ignore_loglevel"
-CONFIG_CMDLINE_FROM_BOOTLOADER=y
-CONFIG_COMMON_CLK=y
-CONFIG_COMMON_CLK_AT91=y
-# CONFIG_COMPACTION is not set
-CONFIG_COMPAT_32BIT_TIME=y
-CONFIG_CONFIGFS_FS=y
-CONFIG_CONSOLE_TRANSLATIONS=y
-CONFIG_CONTIG_ALLOC=y
-CONFIG_CPUFREQ_DT=y
-CONFIG_CPUFREQ_DT_PLATDEV=y
-CONFIG_CPU_32v6K=y
-CONFIG_CPU_32v7=y
-CONFIG_CPU_ABRT_EV7=y
-CONFIG_CPU_CACHE_V7=y
-CONFIG_CPU_CACHE_VIPT=y
-CONFIG_CPU_COPY_V6=y
-CONFIG_CPU_CP15=y
-CONFIG_CPU_CP15_MMU=y
-CONFIG_CPU_FREQ=y
-CONFIG_CPU_FREQ_DEFAULT_GOV_CONSERVATIVE=y
-# CONFIG_CPU_FREQ_DEFAULT_GOV_PERFORMANCE is not set
-CONFIG_CPU_FREQ_GOV_ATTR_SET=y
-CONFIG_CPU_FREQ_GOV_COMMON=y
-CONFIG_CPU_FREQ_GOV_CONSERVATIVE=y
-CONFIG_CPU_FREQ_GOV_ONDEMAND=y
-CONFIG_CPU_FREQ_GOV_PERFORMANCE=y
-CONFIG_CPU_FREQ_GOV_POWERSAVE=y
-CONFIG_CPU_FREQ_GOV_USERSPACE=y
-CONFIG_CPU_FREQ_STAT=y
-CONFIG_CPU_HAS_ASID=y
-CONFIG_CPU_PABRT_V7=y
-CONFIG_CPU_SPECTRE=y
-# CONFIG_CPU_SW_DOMAIN_PAN is not set
-CONFIG_CPU_THUMB_CAPABLE=y
-CONFIG_CPU_TLB_V7=y
-CONFIG_CPU_V7=y
-CONFIG_CRC16=y
-CONFIG_CRC_CCITT=y
-CONFIG_CRC_ITU_T=y
-CONFIG_CRYPTO_CMAC=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_DEFLATE=y
-CONFIG_CRYPTO_DRBG=y
-CONFIG_CRYPTO_DRBG_HMAC=y
-CONFIG_CRYPTO_DRBG_MENU=y
-CONFIG_CRYPTO_ECB=y
-CONFIG_CRYPTO_ECC=y
-CONFIG_CRYPTO_ECDH=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_JITTERENTROPY=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_SHA256=y
-CONFIG_CRYPTO_LZO=y
-CONFIG_CRYPTO_RNG=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_RNG_DEFAULT=y
-CONFIG_CRYPTO_SHA256=y
-CONFIG_CRYPTO_SHA512=y
-CONFIG_DCACHE_WORD_ACCESS=y
-CONFIG_DEBUG_AT91_SAMA7G5_FLEXCOM3=y
-CONFIG_DEBUG_AT91_UART=y
-CONFIG_DEBUG_LL=y
-CONFIG_DEBUG_LL_INCLUDE="debug/at91.S"
-CONFIG_DEBUG_UART_PHYS=0xe1824200
-CONFIG_DEBUG_UART_VIRT=0xe0824200
-# CONFIG_DEBUG_UNCOMPRESS is not set
-CONFIG_DEBUG_USER=y
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
-CONFIG_DMADEVICES=y
-CONFIG_DMATEST=y
-CONFIG_DMA_CMA=y
-CONFIG_DMA_ENGINE=y
-CONFIG_DMA_ENGINE_RAID=y
-CONFIG_DMA_OF=y
-CONFIG_DMA_OPS=y
-CONFIG_DMA_REMAP=y
-CONFIG_DTC=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_EARLY_PRINTK=y
-CONFIG_EDAC_ATOMIC_SCRUB=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_EEPROM_AT24=y
-# CONFIG_EFI_PARTITION is not set
-CONFIG_EXT4_FS=y
-CONFIG_FANOTIFY=y
-CONFIG_FAT_FS=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FORCE_MAX_ZONEORDER=15
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_CPU_VULNERABILITIES=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_PINCONF=y
-CONFIG_GENERIC_PINCTRL_GROUPS=y
-CONFIG_GENERIC_PINMUX_FUNCTIONS=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GENERIC_VDSO_32=y
-CONFIG_GLOB=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GRACE_PERIOD=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
-# CONFIG_HARDEN_BRANCH_HISTORY is not set
-# CONFIG_HARDEN_BRANCH_PREDICTOR is not set
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HAVE_SMP=y
-CONFIG_HW_CONSOLE=y
-CONFIG_HW_RANDOM=y
-CONFIG_HZ_FIXED=0
-CONFIG_I2C=y
-CONFIG_I2C_AT91=y
-# CONFIG_I2C_AT91_SLAVE_EXPERIMENTAL is not set
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_CHARDEV=y
-CONFIG_IIO=y
-CONFIG_IIO_BUFFER=y
-CONFIG_IIO_CONFIGFS=y
-# CONFIG_IIO_HRTIMER_TRIGGER is not set
-CONFIG_IIO_KFIFO_BUF=y
-CONFIG_IIO_SW_TRIGGER=y
-# CONFIG_IIO_TIGHTLOOP_TRIGGER is not set
-CONFIG_IIO_TRIGGER=y
-CONFIG_IIO_TRIGGERED_BUFFER=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-CONFIG_IP_PNP=y
-# CONFIG_IP_PNP_BOOTP is not set
-CONFIG_IP_PNP_DHCP=y
-# CONFIG_IP_PNP_RARP is not set
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-CONFIG_LEDS_GPIO=y
-CONFIG_LIBFDT=y
-CONFIG_LOCKD=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOG_BUF_SHIFT=16
-CONFIG_LSM="N"
-CONFIG_LZO_COMPRESS=y
-CONFIG_LZO_DECOMPRESS=y
-CONFIG_MACB=y
-CONFIG_MACB_USE_HWSTAMP=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MEDIA_CAMERA_SUPPORT=y
-CONFIG_MEDIA_CONTROLLER=y
-CONFIG_MEDIA_PLATFORM_SUPPORT=y
-CONFIG_MEDIA_SUPPORT=y
-CONFIG_MEDIA_SUPPORT_FILTER=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MEMORY=y
-CONFIG_MEMORY_ISOLATION=y
-CONFIG_MESSAGE_LOGLEVEL_DEFAULT=7
-CONFIG_MFD_AT91_USART=y
-CONFIG_MFD_ATMEL_FLEXCOM=y
-CONFIG_MFD_CORE=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MICREL_PHY=y
-CONFIG_MICROCHIP_PIT64B=y
-CONFIG_MIGHT_HAVE_CACHE_L2X0=y
-CONFIG_MIGRATION=y
-CONFIG_MMC=y
-# CONFIG_MMC_ATMELMCI is not set
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_OF_AT91=y
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_MODULES_USE_ELF_REL=y
-CONFIG_MODULE_FORCE_LOAD=y
-CONFIG_MODULE_FORCE_UNLOAD=y
-CONFIG_MTD_CMDLINE_PARTS=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NEED_PER_CPU_KM=y
-CONFIG_NEON=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NET_SWITCHDEV=y
-CONFIG_NFS_FS=y
-CONFIG_NLS=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_CODEPAGE_850=y
-CONFIG_NLS_ISO8859_1=y
-CONFIG_NLS_UTF8=y
-CONFIG_NO_HZ_COMMON=y
-CONFIG_NO_HZ_IDLE=y
-CONFIG_NVMEM=y
-# CONFIG_NVMEM_MICROCHIP_OTPC is not set
-CONFIG_NVMEM_SYSFS=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_OLD_SIGACTION=y
-CONFIG_OLD_SIGSUSPEND3=y
-CONFIG_PAGE_OFFSET=0xC0000000
-CONFIG_PCCARD=y
-CONFIG_PERF_USE_VMALLOC=y
-CONFIG_PGTABLE_LEVELS=2
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PINCTRL=y
-CONFIG_PINCTRL_AT91=y
-CONFIG_PINCTRL_AT91PIO4=y
-CONFIG_PM_OPP=y
-CONFIG_POWER_RESET=y
-# CONFIG_POWER_RESET_AT91_POWEROFF is not set
-CONFIG_POWER_RESET_AT91_RESET=y
-CONFIG_POWER_RESET_AT91_SAMA5D2_SHDWC=y
-CONFIG_PPS=y
-# CONFIG_PREVENT_FIRMWARE_BUILD is not set
-CONFIG_PRINTK_TIME=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_PWM=y
-CONFIG_PWM_ATMEL=y
-CONFIG_PWM_SYSFS=y
-CONFIG_RATIONAL=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_I2C=y
-CONFIG_REGMAP_MMIO=y
-CONFIG_REGMAP_SPI=y
-CONFIG_REGULATOR=y
-CONFIG_REGULATOR_FIXED_VOLTAGE=y
-CONFIG_REGULATOR_MCP16502=y
-CONFIG_ROOT_NFS=y
-CONFIG_RTC_CLASS=y
-CONFIG_RTC_DRV_AT91RM9200=y
-CONFIG_RTC_DRV_AT91SAM9=y
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_RTC_MC146818_LIB=y
-# CONFIG_RUNTIME_TESTING_MENU is not set
-CONFIG_SAMA5D4_WATCHDOG=y
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-# CONFIG_SERIAL_8250 is not set
-CONFIG_SERIAL_ATMEL=y
-CONFIG_SERIAL_ATMEL_CONSOLE=y
-CONFIG_SERIAL_ATMEL_PDC=y
-# CONFIG_SERIAL_ATMEL_TTYAT is not set
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SGL_ALLOC=y
-CONFIG_SG_POOL=y
-CONFIG_SND=y
-CONFIG_SND_ATMEL_SOC=y
-# CONFIG_SND_ATMEL_SOC_CLASSD is not set
-# CONFIG_SND_ATMEL_SOC_I2S is not set
-# CONFIG_SND_ATMEL_SOC_PDMIC is not set
-# CONFIG_SND_COMPRESS_OFFLOAD is not set
-CONFIG_SND_DMAENGINE_PCM=y
-CONFIG_SND_JACK=y
-CONFIG_SND_JACK_INPUT_DEV=y
-CONFIG_SND_MCHP_SOC_I2S_MCC=y
-CONFIG_SND_MCHP_SOC_SPDIFRX=y
-CONFIG_SND_MCHP_SOC_SPDIFTX=y
-CONFIG_SND_PCM=y
-CONFIG_SND_SIMPLE_CARD=y
-CONFIG_SND_SIMPLE_CARD_UTILS=y
-CONFIG_SND_SOC=y
-CONFIG_SND_SOC_GENERIC_DMAENGINE_PCM=y
-CONFIG_SND_SOC_I2C_AND_SPI=y
-# CONFIG_SND_SOC_MIKROE_PROTO is not set
-CONFIG_SND_SOC_PCM5102A=y
-CONFIG_SND_SOC_SPDIF=y
-CONFIG_SOC_BUS=y
-# CONFIG_SOC_SAMA5D2 is not set
-# CONFIG_SOC_SAMA5D3 is not set
-# CONFIG_SOC_SAMA5D4 is not set
-CONFIG_SOC_SAMA7=y
-CONFIG_SOC_SAMA7G5=y
-CONFIG_SOC_SAM_V7=y
-CONFIG_SOUND=y
-CONFIG_SOUND_OSS_CORE=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPI=y
-# CONFIG_SPI_AT91_USART is not set
-CONFIG_SPI_ATMEL=y
-# CONFIG_SPI_ATMEL_QUADSPI is not set
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-CONFIG_SRCU=y
-CONFIG_STACKTRACE=y
-# CONFIG_STANDALONE is not set
-CONFIG_SUNRPC=y
-# CONFIG_SWAP is not set
-CONFIG_SWPHY=y
-# CONFIG_SWP_EMULATE is not set
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_SYSFS_DEPRECATED_V2=y
-CONFIG_SYS_SUPPORTS_APM_EMULATION=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TINY_SRCU=y
-CONFIG_UACCESS_WITH_MEMCPY=y
-CONFIG_UNCOMPRESS_INCLUDE="debug/uncompress.h"
-CONFIG_UNWINDER_ARM=y
-CONFIG_USE_OF=y
-CONFIG_V4L_PLATFORM_DRIVERS=y
-CONFIG_VFAT_FS=y
-CONFIG_VFP=y
-CONFIG_VFPv3=y
-# CONFIG_VIDEO_ATMEL_XISC is not set
-CONFIG_VIDEO_DEV=y
-CONFIG_VIDEO_V4L2=y
-CONFIG_VIDEO_V4L2_I2C=y
-CONFIG_VIDEO_V4L2_SUBDEV_API=y
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-# CONFIG_VT_HW_CONSOLE_BINDING is not set
-CONFIG_WATCHDOG_CORE=y
-CONFIG_ZBOOT_ROM_BSS=0x0
-CONFIG_ZBOOT_ROM_TEXT=0x0
-CONFIG_ZLIB_DEFLATE=y
-CONFIG_ZLIB_INFLATE=y



From lede-commits at lists.infradead.org  Sun Apr 28 12:43:41 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 15:43:41 -0400
Subject: [openwrt/openwrt]  mbedtls: Update to version 3.6.0
In-Reply-To: <171433341888.494680.5720868939225571734@git-01.infra.openwrt.org>
References: <171433341888.494680.5720868939225571734@git-01.infra.openwrt.org>
Message-ID: <mailman.31628.1714333425.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0e06642643862d7b6d1edfd6e0e26dad3eae0cbc

commit 0e06642643862d7b6d1edfd6e0e26dad3eae0cbc
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Thu Nov 9 00:00:09 2023 +0100

    mbedtls: Update to version 3.6.0
    
    This adds support for mbedtls 3.6.0.
    The 3.6 version is the next LTS version of mbedtls.
    This version supports TLS 1.3.
    
    This switches to download using git. The codeload tar file misses some
    git submodules.
    
    Add some extra options added in mbedtls 3.6.0.
    
    The size of the compressed ipkg increases:
    230933 bin/packages/mips_24kc/base/libmbedtls13_2.28.7-r2_mips_24kc.ipk
    300154 bin/packages/mips_24kc/base/libmbedtls14_3.6.0-r1_mips_24kc.ipk
    
    The removed patch was integrated upstream.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/libs/mbedtls/Config.in                     |  38 ++++
 package/libs/mbedtls/Makefile                      |  31 +++-
 .../100-x509-crt-verify-SAN-iPAddress.patch        | 197 ---------------------
 package/libs/mbedtls/patches/101-remove-test.patch |   3 +-
 4 files changed, 63 insertions(+), 206 deletions(-)

diff --git a/package/libs/mbedtls/Config.in b/package/libs/mbedtls/Config.in
index ad0ecb6e61..e80c342636 100644
--- a/package/libs/mbedtls/Config.in
+++ b/package/libs/mbedtls/Config.in
@@ -187,6 +187,43 @@ config MBEDTLS_VERSION_FEATURES
 	bool "MBEDTLS_VERSION_FEATURES"
 	default n
 
+config MBEDTLS_PSA_CRYPTO_CLIENT
+	bool "MBEDTLS_PSA_CRYPTO_CLIENT"
+
+config MBEDTLS_DEPRECATED_WARNING
+	bool "MBEDTLS_DEPRECATED_WARNING"
+	default n
+
+config MBEDTLS_SSL_PROTO_TLS1_2
+	bool "MBEDTLS_SSL_PROTO_TLS1_2"
+	default y
+
+config MBEDTLS_SSL_PROTO_TLS1_3
+	bool "MBEDTLS_SSL_PROTO_TLS1_3"
+	select MBEDTLS_PSA_CRYPTO_CLIENT
+	select MBEDTLS_HKDF_C
+	default y
+
+config MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
+	bool "MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE"
+	depends on MBEDTLS_SSL_PROTO_TLS1_3
+	default y
+
+config MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED
+	bool "MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED"
+	depends on MBEDTLS_SSL_PROTO_TLS1_3
+	default y
+
+config MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED
+	bool "MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED"
+	depends on MBEDTLS_SSL_PROTO_TLS1_3
+	default y
+
+config MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
+	bool "MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED"
+	depends on MBEDTLS_SSL_PROTO_TLS1_3
+	default y
+
 comment "Build Options"
 
 config MBEDTLS_ENTROPY_FORCE_SHA256
@@ -195,6 +232,7 @@ config MBEDTLS_ENTROPY_FORCE_SHA256
 
 config MBEDTLS_SSL_RENEGOTIATION
 	bool "MBEDTLS_SSL_RENEGOTIATION"
+	depends on MBEDTLS_SSL_PROTO_TLS1_2
 	default n
 
 endif
diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index 459c9924bd..f6713f42f5 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -8,13 +8,14 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=mbedtls
-PKG_VERSION:=2.28.8
+PKG_VERSION:=3.6.0
 PKG_RELEASE:=1
 PKG_BUILD_FLAGS:=no-mips16 gc-sections no-lto
 
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://codeload.github.com/ARMmbed/mbedtls/tar.gz/v$(PKG_VERSION)?
-PKG_HASH:=4fef7de0d8d542510d726d643350acb3cdb9dc76ad45611b59c9aa08372b4213
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_URL=https://github.com/Mbed-TLS/mbedtls.git
+PKG_SOURCE_VERSION:=2ca6c285a0dd3f33982dd57299012dacab1ff206
+PKG_MIRROR_HASH:=a684012126590b4e0b6ab41e244cc2af0d2bcfc4b6c94bf42fc37d2d08f0553e
 
 PKG_LICENSE:=GPL-2.0-or-later
 PKG_LICENSE_FILES:=gpl-2.0.txt
@@ -55,7 +56,10 @@ MBEDTLS_BUILD_OPTS_CIPHERS= \
   CONFIG_MBEDTLS_NIST_KW_C \
   CONFIG_MBEDTLS_RIPEMD160_C \
   CONFIG_MBEDTLS_RSA_NO_CRT \
-  CONFIG_MBEDTLS_XTEA_C
+  CONFIG_MBEDTLS_XTEA_C \
+  CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
+  CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
+  CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
 
 MBEDTLS_BUILD_OPTS= \
   $(MBEDTLS_BUILD_OPTS_CURVES) \
@@ -73,7 +77,12 @@ MBEDTLS_BUILD_OPTS= \
   CONFIG_MBEDTLS_THREADING_C \
   CONFIG_MBEDTLS_THREADING_PTHREAD \
   CONFIG_MBEDTLS_VERSION_C \
-  CONFIG_MBEDTLS_VERSION_FEATURES
+  CONFIG_MBEDTLS_VERSION_FEATURES \
+  CONFIG_MBEDTLS_PSA_CRYPTO_CLIENT \
+  CONFIG_MBEDTLS_DEPRECATED_WARNING \
+  CONFIG_MBEDTLS_SSL_PROTO_TLS1_2 \
+  CONFIG_MBEDTLS_SSL_PROTO_TLS1_3 \
+  CONFIG_MBEDTLS_SSL_TLS1_3_COMPATIBILITY_MODE
 
 PKG_CONFIG_DEPENDS := $(MBEDTLS_BUILD_OPTS)
 
@@ -96,7 +105,7 @@ $(call Package/mbedtls/Default)
   CATEGORY:=Libraries
   SUBMENU:=SSL
   TITLE+= (library)
-  ABI_VERSION:=13
+  ABI_VERSION:=21
   MENU:=1
 endef
 
@@ -137,7 +146,7 @@ define Build/Prepare
        $(if $(strip $(foreach opt,$(MBEDTLS_BUILD_OPTS),$($(opt)))),
 	 $(foreach opt,$(MBEDTLS_BUILD_OPTS),
 	 $(PKG_BUILD_DIR)/scripts/config.py \
-	 -f $(PKG_BUILD_DIR)/include/mbedtls/config.h \
+	 -f $(PKG_BUILD_DIR)/include/mbedtls/mbedtls_config.h \
 	 $(if $($(opt)),set,unset) $(patsubst CONFIG_%,%,$(opt))),)
 endef
 
@@ -150,6 +159,12 @@ define Build/InstallDev
 	$(INSTALL_DIR) $(1)/usr/lib
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.so* $(1)/usr/lib/
 	$(CP) $(PKG_INSTALL_DIR)/usr/lib/lib*.a $(1)/usr/lib/
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+	$(CP) \
+		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbedcrypto.pc \
+		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbedtls.pc \
+		$(PKG_INSTALL_DIR)/usr/lib/pkgconfig/mbedx509.pc \
+		$(1)/usr/lib/pkgconfig/
 endef
 
 define Package/libmbedtls/install
diff --git a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch b/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch
deleted file mode 100644
index 808450c0dd..0000000000
--- a/package/libs/mbedtls/patches/100-x509-crt-verify-SAN-iPAddress.patch
+++ /dev/null
@@ -1,197 +0,0 @@
-From eb9d4fdf1846e688d51d86a9a50f0312aca2af25 Mon Sep 17 00:00:00 2001
-From: Glenn Strauss <gstrauss at gluelogic.com>
-Date: Sun, 23 Oct 2022 19:48:18 -0400
-Subject: [PATCH] x509 crt verify SAN iPAddress
-
-Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
----
- include/mbedtls/x509_crt.h |   2 +-
- library/x509_crt.c         | 126 ++++++++++++++++++++++++++++++-------
- 2 files changed, 103 insertions(+), 25 deletions(-)
-
---- a/include/mbedtls/x509_crt.h
-+++ b/include/mbedtls/x509_crt.h
-@@ -596,7 +596,7 @@ int mbedtls_x509_crt_verify_info(char *b
-  * \param cn       The expected Common Name. This will be checked to be
-  *                 present in the certificate's subjectAltNames extension or,
-  *                 if this extension is absent, as a CN component in its
-- *                 Subject name. Currently only DNS names are supported. This
-+ *                 Subject name. DNS names and IP addresses are supported. This
-  *                 may be \c NULL if the CN need not be verified.
-  * \param flags    The address at which to store the result of the verification.
-  *                 If the verification couldn't be completed, the flag value is
---- a/library/x509_crt.c
-+++ b/library/x509_crt.c
-@@ -45,6 +45,10 @@
- 
- #if defined(MBEDTLS_HAVE_TIME)
- #if defined(_WIN32) && !defined(EFIX64) && !defined(EFI32)
-+#define WIN32_LEAN_AND_MEAN
-+#ifndef _WIN32_WINNT
-+#define _WIN32_WINNT 0x0600
-+#endif
- #include <windows.h>
- #else
- #include <time.h>
-@@ -2990,6 +2994,61 @@ find_parent:
-     }
- }
- 
-+#ifdef _WIN32
-+#ifdef _MSC_VER
-+#pragma comment(lib, "ws2_32.lib")
-+#include <winsock2.h>
-+#include <ws2tcpip.h>
-+#elif (defined(__MINGW32__) || defined(__MINGW64__)) && _WIN32_WINNT >= 0x0600
-+#include <winsock2.h>
-+#include <ws2tcpip.h>
-+#endif
-+#elif defined(__sun)
-+/* Solaris requires -lsocket -lnsl for inet_pton() */
-+#elif defined(__has_include)
-+#if __has_include(<sys/socket.h>)
-+#include <sys/socket.h>
-+#endif
-+#if __has_include(<arpa/inet.h>)
-+#include <arpa/inet.h>
-+#endif
-+#endif
-+
-+/* Use whether or not AF_INET6 is defined to indicate whether or not to use
-+ * the platform inet_pton() or a local implementation (below).  The local
-+ * implementation may be used even in cases where the platform provides
-+ * inet_pton(), e.g. when there are different includes required and/or the
-+ * platform implementation requires dependencies on additional libraries.
-+ * Specifically, Windows requires custom includes and additional link
-+ * dependencies, and Solaris requires additional link dependencies.
-+ * Also, as a coarse heuristic, use the local implementation if the compiler
-+ * does not support __has_include(), or if the definition of AF_INET6 is not
-+ * provided by headers included (or not) via __has_include() above. */
-+#ifndef AF_INET6
-+
-+#define x509_cn_inet_pton(cn, dst) (0)
-+
-+#else
-+
-+static int x509_inet_pton_ipv6(const char *src, void *dst)
-+{
-+    return inet_pton(AF_INET6, src, dst) == 1 ? 0 : -1;
-+}
-+
-+static int x509_inet_pton_ipv4(const char *src, void *dst)
-+{
-+    return inet_pton(AF_INET, src, dst) == 1 ? 0 : -1;
-+}
-+
-+#endif /* AF_INET6 */
-+
-+static size_t x509_cn_inet_pton(const char *cn, void *dst)
-+{
-+    return strchr(cn, ':') == NULL
-+            ? x509_inet_pton_ipv4(cn, dst) == 0 ? 4 : 0
-+            : x509_inet_pton_ipv6(cn, dst) == 0 ? 16 : 0;
-+}
-+
- /*
-  * Check for CN match
-  */
-@@ -3010,24 +3069,51 @@ static int x509_crt_check_cn(const mbedt
-     return -1;
- }
- 
-+static int x509_crt_check_san_ip(const mbedtls_x509_sequence *san,
-+                                 const char *cn, size_t cn_len)
-+{
-+    uint32_t ip[4];
-+    cn_len = x509_cn_inet_pton(cn, ip);
-+    if (cn_len == 0) {
-+        return -1;
-+    }
-+
-+    for (const mbedtls_x509_sequence *cur = san; cur != NULL; cur = cur->next) {
-+        const unsigned char san_type = (unsigned char) cur->buf.tag &
-+                                       MBEDTLS_ASN1_TAG_VALUE_MASK;
-+        if (san_type == MBEDTLS_X509_SAN_IP_ADDRESS &&
-+            cur->buf.len == cn_len && memcmp(cur->buf.p, ip, cn_len) == 0) {
-+            return 0;
-+        }
-+    }
-+
-+    return -1;
-+}
-+
- /*
-  * Check for SAN match, see RFC 5280 Section 4.2.1.6
-  */
--static int x509_crt_check_san(const mbedtls_x509_buf *name,
-+static int x509_crt_check_san(const mbedtls_x509_sequence *san,
-                               const char *cn, size_t cn_len)
- {
--    const unsigned char san_type = (unsigned char) name->tag &
--                                   MBEDTLS_ASN1_TAG_VALUE_MASK;
--
--    /* dNSName */
--    if (san_type == MBEDTLS_X509_SAN_DNS_NAME) {
--        return x509_crt_check_cn(name, cn, cn_len);
-+    int san_ip = 0;
-+    for (const mbedtls_x509_sequence *cur = san; cur != NULL; cur = cur->next) {
-+        switch ((unsigned char) cur->buf.tag & MBEDTLS_ASN1_TAG_VALUE_MASK) {
-+            case MBEDTLS_X509_SAN_DNS_NAME:                /* dNSName */
-+                if (x509_crt_check_cn(&cur->buf, cn, cn_len) == 0) {
-+                    return 0;
-+                }
-+                break;
-+            case MBEDTLS_X509_SAN_IP_ADDRESS:              /* iPAddress */
-+                san_ip = 1;
-+                break;
-+            /* (We may handle other types here later.) */
-+            default: /* Unrecognized type */
-+                break;
-+        }
-     }
- 
--    /* (We may handle other types here later.) */
--
--    /* Unrecognized type */
--    return -1;
-+    return san_ip ? x509_crt_check_san_ip(san, cn, cn_len) : -1;
- }
- 
- /*
-@@ -3038,31 +3124,23 @@ static void x509_crt_verify_name(const m
-                                  uint32_t *flags)
- {
-     const mbedtls_x509_name *name;
--    const mbedtls_x509_sequence *cur;
-     size_t cn_len = strlen(cn);
- 
-     if (crt->ext_types & MBEDTLS_X509_EXT_SUBJECT_ALT_NAME) {
--        for (cur = &crt->subject_alt_names; cur != NULL; cur = cur->next) {
--            if (x509_crt_check_san(&cur->buf, cn, cn_len) == 0) {
--                break;
--            }
--        }
--
--        if (cur == NULL) {
--            *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
-+        if (x509_crt_check_san(&crt->subject_alt_names, cn, cn_len) == 0) {
-+            return;
-         }
-     } else {
-         for (name = &crt->subject; name != NULL; name = name->next) {
-             if (MBEDTLS_OID_CMP(MBEDTLS_OID_AT_CN, &name->oid) == 0 &&
-                 x509_crt_check_cn(&name->val, cn, cn_len) == 0) {
--                break;
-+                return;
-             }
-         }
- 
--        if (name == NULL) {
--            *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
--        }
-     }
-+
-+    *flags |= MBEDTLS_X509_BADCERT_CN_MISMATCH;
- }
- 
- /*
diff --git a/package/libs/mbedtls/patches/101-remove-test.patch b/package/libs/mbedtls/patches/101-remove-test.patch
index e43f8757d7..5ac5e7c1e8 100644
--- a/package/libs/mbedtls/patches/101-remove-test.patch
+++ b/package/libs/mbedtls/patches/101-remove-test.patch
@@ -1,7 +1,8 @@
 --- a/programs/CMakeLists.txt
 +++ b/programs/CMakeLists.txt
-@@ -1,12 +1,8 @@
+@@ -1,13 +1,9 @@
  add_subdirectory(aes)
+ add_subdirectory(cipher)
 -if (NOT WIN32)
 -    add_subdirectory(fuzz)
 -endif()



From lede-commits at lists.infradead.org  Sun Apr 28 12:43:38 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 15:43:38 -0400
Subject: [openwrt/openwrt]  uencrypt: Fix compile warnings
In-Reply-To: <171433341888.494680.5720868939225571734@git-01.infra.openwrt.org>
References: <171433341888.494680.5720868939225571734@git-01.infra.openwrt.org>
Message-ID: <mailman.31629.1714333425.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0fd9acb47165e9ef07b3fa0e4f381ebe5365464c

commit 0fd9acb47165e9ef07b3fa0e4f381ebe5365464c
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 7 22:46:13 2024 +0200

    uencrypt: Fix compile warnings
    
    keylen and ivlen are of type long and not size_t.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/utils/uencrypt/src/uencrypt.c | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)

diff --git a/package/utils/uencrypt/src/uencrypt.c b/package/utils/uencrypt/src/uencrypt.c
index 36e17e220b..a49db6e2d9 100644
--- a/package/utils/uencrypt/src/uencrypt.c
+++ b/package/utils/uencrypt/src/uencrypt.c
@@ -85,12 +85,12 @@ int main(int argc, char *argv[])
 	}
     }
     if (ivlen != get_cipher_ivsize(cipher)) {
-	fprintf(stderr, "Error: IV must be %d bytes; given IV is %zd bytes.\n",
+	fprintf(stderr, "Error: IV must be %d bytes; given IV is %ld bytes.\n",
 		get_cipher_ivsize(cipher), ivlen);
 	exit(EXIT_FAILURE);
     }
     if (keylen != get_cipher_keysize(cipher)) {
-	fprintf(stderr, "Error: key must be %d bytes; given key is %zd bytes.\n",
+	fprintf(stderr, "Error: key must be %d bytes; given key is %ld bytes.\n",
 		get_cipher_keysize(cipher), keylen);
 	exit(EXIT_FAILURE);
     }



From lede-commits at lists.infradead.org  Sun Apr 28 12:43:40 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 15:43:40 -0400
Subject: [openwrt/openwrt]  hostapd: Fix compile against mbedtsl 3.6
In-Reply-To: <171433341888.494680.5720868939225571734@git-01.infra.openwrt.org>
References: <171433341888.494680.5720868939225571734@git-01.infra.openwrt.org>
Message-ID: <mailman.31630.1714333427.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/00a1671248399db056afdfd682f9bf4aeca7ce4f

commit 00a1671248399db056afdfd682f9bf4aeca7ce4f
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Mon Apr 8 22:06:08 2024 +0200

    hostapd: Fix compile against mbedtsl 3.6
    
    Fix compile of the mbedtls extension for hostapd.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 .../hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch    | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch b/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
index b786d3bccb..b55c0b1f84 100644
--- a/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
+++ b/package/network/services/hostapd/patches/110-mbedtls-TLS-crypto-option-initial-port.patch
@@ -6460,7 +6460,7 @@ Signed-off-by: Glenn Strauss <gstrauss at gluelogic.com>
 +{
 +  #if !defined(MBEDTLS_USE_PSA_CRYPTO) /* XXX: (not extracted for PSA crypto) */
 +  #if defined(MBEDTLS_SSL_PROTO_TLS1_3)
-+    if (tls_version == MBEDTLS_SSL_VERSION_TLS1_3)
++    if (mbedtls_ssl_get_version_number(ssl) == MBEDTLS_SSL_VERSION_TLS1_3)
 +        return 0; /* (calculation not extracted) */
 +  #endif /* MBEDTLS_SSL_PROTO_TLS1_3 */
 +



From lede-commits at lists.infradead.org  Sun Apr 28 12:43:39 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 15:43:39 -0400
Subject: [openwrt/openwrt]  uencrypt: Fix mbedtls 3.6 compatibility
In-Reply-To: <171433341888.494680.5720868939225571734@git-01.infra.openwrt.org>
References: <171433341888.494680.5720868939225571734@git-01.infra.openwrt.org>
Message-ID: <mailman.31631.1714333427.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/6c80f34c07a629926f4a5948f97f823396622749

commit 6c80f34c07a629926f4a5948f97f823396622749
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sun Apr 7 22:47:26 2024 +0200

    uencrypt: Fix mbedtls 3.6 compatibility
    
    This makes it compile with mbedtls 3.6.0.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/utils/uencrypt/src/uencrypt-mbedtls.c | 62 ++++++++++++++++++++++++---
 1 file changed, 57 insertions(+), 5 deletions(-)

diff --git a/package/utils/uencrypt/src/uencrypt-mbedtls.c b/package/utils/uencrypt/src/uencrypt-mbedtls.c
index 34851261b7..119d07b422 100644
--- a/package/utils/uencrypt/src/uencrypt-mbedtls.c
+++ b/package/utils/uencrypt/src/uencrypt-mbedtls.c
@@ -9,6 +9,58 @@
 #include <unistd.h>
 #include "uencrypt.h"
 
+#if MBEDTLS_VERSION_NUMBER < 0x03010000 /* mbedtls 3.1.0 */
+static inline mbedtls_cipher_mode_t mbedtls_cipher_info_get_mode(
+    const mbedtls_cipher_info_t *info)
+{
+    if (info == NULL) {
+        return MBEDTLS_MODE_NONE;
+    } else {
+        return info->mode;
+    }
+}
+
+static inline size_t mbedtls_cipher_info_get_key_bitlen(
+    const mbedtls_cipher_info_t *info)
+{
+    if (info == NULL) {
+        return 0;
+    } else {
+        return info->key_bitlen;
+    }
+}
+
+static inline const char *mbedtls_cipher_info_get_name(
+    const mbedtls_cipher_info_t *info)
+{
+    if (info == NULL) {
+        return NULL;
+    } else {
+        return info->name;
+    }
+}
+
+static inline size_t mbedtls_cipher_info_get_iv_size(
+    const mbedtls_cipher_info_t *info)
+{
+    if (info == NULL) {
+        return 0;
+    }
+
+    return info->iv_size;
+}
+
+static inline size_t mbedtls_cipher_info_get_block_size(
+    const mbedtls_cipher_info_t *info)
+{
+    if (info == NULL) {
+        return 0;
+    }
+
+    return info->block_size;
+}
+#endif
+
 unsigned char *hexstr2buf(const char *str, long *len)
 {
     unsigned char *buf;
@@ -50,7 +102,7 @@ const cipher_t *get_cipher_or_print_error(char *name)
 	cipher = mbedtls_cipher_info_from_type(*list);
 	if (!cipher)
 	    continue;
-	fprintf(stderr, "\t%s\n", cipher->name);
+	fprintf(stderr, "\t%s\n", mbedtls_cipher_info_get_name(cipher));
     }
     return NULL;
 }
@@ -59,14 +111,14 @@ int get_cipher_ivsize(const cipher_t *cipher)
 {
     const mbedtls_cipher_info_t *c = cipher;
 
-    return c->iv_size;
+    return mbedtls_cipher_info_get_iv_size(c);
 }
 
 int get_cipher_keysize(const cipher_t *cipher)
 {
     const mbedtls_cipher_info_t *c = cipher;
 
-    return c->key_bitlen >> 3;
+    return mbedtls_cipher_info_get_key_bitlen(c) >> 3;
 }
 
 ctx_t *create_ctx(const cipher_t *cipher, const unsigned char *key,
@@ -103,7 +155,7 @@ ctx_t *create_ctx(const cipher_t *cipher, const unsigned char *key,
 	}
     }
 
-    if (cipher_info->mode == MBEDTLS_MODE_CBC) {
+    if (mbedtls_cipher_info_get_mode(cipher_info) == MBEDTLS_MODE_CBC) {
 	ret = mbedtls_cipher_set_padding_mode(ctx, padding ?
 						   MBEDTLS_PADDING_PKCS7 :
 						   MBEDTLS_PADDING_NONE);
@@ -113,7 +165,7 @@ ctx_t *create_ctx(const cipher_t *cipher, const unsigned char *key,
 	    goto abort;
 	}
     } else {
-	if (cipher_info->block_size > 1 && padding) {
+	if (mbedtls_cipher_info_get_block_size(cipher_info) > 1 && padding) {
 	    fprintf(stderr,
 		    "Error: mbedTLS only allows padding with CBC ciphers.\n");
 	    goto abort;



From lede-commits at lists.infradead.org  Sun Apr 28 12:57:23 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 15:57:23 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.6 to 6.6.29
In-Reply-To: <171433424322.594785.16436674241222008993@git-01.infra.openwrt.org>
References: <171433424322.594785.16436674241222008993@git-01.infra.openwrt.org>
Message-ID: <mailman.31632.1714334250.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dceb5938f8a1177b79b8a7a4d6197a1822974e9e

commit dceb5938f8a1177b79b8a7a4d6197a1822974e9e
Author: John Audia <therealgraysky at proton.me>
AuthorDate: Sun Apr 28 02:25:30 2024 -0400

    kernel: bump 6.6 to 6.6.29
    
    Changelog: https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.6.29
    
    Removed upstreamed:
            generic/backport-6.6/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch[1]
            generic/backport-6.6/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch[2]
            generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch[3]
            generic/backport-6.6/790-31-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch[4]
            generic/backport-6.6/790-34-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch[5]
            generic/backport-6.6/790-35-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch[6]
            mediatek/patches-6.6/963-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch[7]
    
    Manually rebased:
            generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
    
    All other patches automatically rebased.
    
    1. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.29&id=a2471d271042ea18e8a6babc132a8716bb2f08b9
    2. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.29&id=4ed82dd368ad883dc4284292937b882f044e625d
    3. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.29&id=21b9d89d93422221cdda1b82fd075fa3c94a11d9
    4. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.29&id=bd41ee1efd478852a0882ce5f136bc2b5e83eff2
    5. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.29&id=d1be3960539249a8690ed09a29d0e3bf34189dd2
    6. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.29&id=f8de1b6208bf71bd3102548d33dd8475573ad2ea
    7. https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.6.29&id=6855f724f19620c3ddff57c349e0abba797475b1
    
    Build system: x86/64
    Build-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    Run-tested: x86/64/AMD Cezanne, flogic/xiaomi_redmi-router-ax6000-ubootmod, ramips/tplink_archer-a6-v3
    
    Signed-off-by: John Audia <therealgraysky at proton.me>
---
 include/kernel-6.6                                 |  4 +-
 ...-add-support-for-performing-fake-doorbell.patch |  2 +-
 ...netfilter-flowtable-validate-pppoe-header.patch | 87 --------------------
 ...netfilter-flowtable-incorrect-pppoe-tuple.patch | 24 ------
 ...t-mtk_wed-do-not-assume-offload-callbacks.patch |  4 +-
 ...t-mtk_wed-introduce-versioning-utility-ro.patch | 30 +++----
 ...t-mtk_wed-do-not-configure-rx-offload-if-.patch | 20 ++---
 ...et-mtk_wed-add-mtk_wed_soc_data-structure.patch | 22 +++---
 ...t-mtk_wed-introduce-WED-support-for-MT798.patch | 34 ++++----
 ...t-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch |  4 +-
 ...t-mtk_wed-introduce-partial-AMSDU-offload.patch |  8 +-
 ...t-mtk_wed-introduce-hw_rro-support-for-MT.patch |  8 +-
 ...thernet-mtk_wed-add-wed-3.0-reset-support.patch | 20 ++---
 ...-01-net-stmmac-improve-TX-timer-arm-logic.patch |  2 +-
 ...stmmac-move-TX-timer-arm-after-DMA-enable.patch | 16 ++--
 ...-mt753x-remove-mt753x_phylink_pcs_link_up.patch |  4 +-
 ...530-support-OF-based-registration-of-swit.patch |  4 +-
 ...530-always-trap-frames-to-active-CPU-port.patch | 10 +--
 ...530-use-p5_interface_select-as-data-type-.patch |  4 +-
 ...530-store-port-5-SGMII-capability-of-MT75.patch | 22 +++---
 ...530-improve-comments-regarding-switch-por.patch | 12 +--
 ...530-improve-code-path-for-setting-up-port.patch |  6 +-
 ...530-do-not-run-mt7530_setup_port5-if-port.patch |  4 +-
 ...sa-mt7530-move-XTAL-check-to-mt7530_setup.patch |  2 +-
 ...530-call-port-6-setup-from-mt7530_mac_con.patch |  2 +-
 ...-mt7530-remove-pad_setup-function-pointer.patch | 20 ++---
 ...t7530-correct-port-capabilities-of-MT7988.patch |  2 +-
 ...530-do-not-clear-config-supported_interfa.patch |  2 +-
 ...530-remove-.mac_port_config-for-MT7988-an.patch |  8 +-
 ...530-set-interrupt-register-only-for-MT753.patch |  2 +-
 ...530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch |  2 +-
 ...530-get-rid-of-useless-error-returns-on-p.patch | 18 ++---
 ...7530-get-rid-of-priv-info-cpu_port_config.patch | 36 ++++-----
 ...t-dsa-mt7530-get-rid-of-mt753x_mac_config.patch |  4 +-
 ...530-put-initialising-PCS-devices-code-bac.patch |  4 +-
 ...530-sort-link-settings-ops-and-force-link.patch |  4 +-
 ...9-net-dsa-mt7530-simplify-link-operations.patch |  4 +-
 ...-net-dsa-mt7530-disable-LEDs-before-reset.patch |  2 +-
 ...530-fix-improper-frames-on-all-25MHz-and-.patch | 74 -----------------
 ...530-prevent-possible-incorrect-XTAL-frequ.patch |  2 +-
 ...530-fix-enabling-EEE-on-MT7531-switch-on-.patch | 92 ----------------------
 ...mt7530-provide-own-phylink-MAC-operations.patch | 10 +--
 ...530-fix-mirroring-frames-received-on-loca.patch | 70 ----------------
 ...530-fix-port-mirroring-for-MT7988-SoC-swi.patch | 49 ------------
 .../780-usb-net-MeigLink_modem_support.patch       |  4 +-
 ...-bridge_allow_receiption_on_disabled_port.patch |  4 +-
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |  2 +-
 ...ge-add-knob-for-filtering-rx-tx-BPDU-pack.patch |  2 +-
 .../811-pci_disable_usb_common_quirks.patch        |  2 +-
 .../generic/pending-6.6/920-mangle_bootargs.patch  |  2 +-
 ...essor-support-for-ATAGs-rootblock-parsing.patch |  2 +-
 ...net-mtk_wed-move-dlm-a-dedicated-dts-node.patch |  4 +-
 ...t-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch | 49 ------------
 ...vebu-Mangle-bootloader-s-kernel-arguments.patch |  2 +-
 ...840-serial-add-ugly-custom-baud-rate-hack.patch |  2 +-
 55 files changed, 195 insertions(+), 640 deletions(-)

diff --git a/include/kernel-6.6 b/include/kernel-6.6
index 7b0c2dd5de..c3e9ee3309 100644
--- a/include/kernel-6.6
+++ b/include/kernel-6.6
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.6 = .28
-LINUX_KERNEL_HASH-6.6.28 = 818716ed13e7dba6aaeae24e3073993e260812ed128d10272e94b922ee6d3394
+LINUX_VERSION-6.6 = .29
+LINUX_KERNEL_HASH-6.6.29 = 7f26f74c08082c86b1daf866e4d49c5d8276cc1906a89d0e367e457ec167cbd0
diff --git a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index 3b2a7a476a..8b2f86de01 100644
--- a/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-6.6/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -103,7 +103,7 @@ it on BCM4708 family.
  	if (xhci->quirks & XHCI_NEC_HOST)
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1907,6 +1907,7 @@ struct xhci_hcd {
+@@ -1912,6 +1912,7 @@ struct xhci_hcd {
  #define XHCI_RESET_TO_DEFAULT	BIT_ULL(44)
  #define XHCI_ZHAOXIN_TRB_FETCH	BIT_ULL(45)
  #define XHCI_ZHAOXIN_HOST	BIT_ULL(46)
diff --git a/target/linux/generic/backport-6.6/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch b/target/linux/generic/backport-6.6/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
deleted file mode 100644
index 8a8773b716..0000000000
--- a/target/linux/generic/backport-6.6/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From: Pablo Neira Ayuso <pablo at netfilter.org>
-Date: Thu, 11 Apr 2024 13:28:59 +0200
-Subject: [PATCH] netfilter: flowtable: validate pppoe header
-
-Ensure there is sufficient room to access the protocol field of the
-PPPoe header. Validate it once before the flowtable lookup, then use a
-helper function to access protocol field.
-
-Reported-by: syzbot+b6f07e1c07ef40199081 at syzkaller.appspotmail.com
-Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
-Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
----
-
---- a/include/net/netfilter/nf_flow_table.h
-+++ b/include/net/netfilter/nf_flow_table.h
-@@ -335,7 +335,7 @@ int nf_flow_rule_route_ipv6(struct net *
- int nf_flow_table_offload_init(void);
- void nf_flow_table_offload_exit(void);
- 
--static inline __be16 nf_flow_pppoe_proto(const struct sk_buff *skb)
-+static inline __be16 __nf_flow_pppoe_proto(const struct sk_buff *skb)
- {
- 	__be16 proto;
- 
-@@ -351,6 +351,16 @@ static inline __be16 nf_flow_pppoe_proto
- 	return 0;
- }
- 
-+static inline bool nf_flow_pppoe_proto(struct sk_buff *skb, __be16 *inner_proto)
-+{
-+	if (!pskb_may_pull(skb, PPPOE_SES_HLEN))
-+		return false;
-+
-+	*inner_proto = __nf_flow_pppoe_proto(skb);
-+
-+	return true;
-+}
-+
- #define NF_FLOW_TABLE_STAT_INC(net, count) __this_cpu_inc((net)->ft.stat->count)
- #define NF_FLOW_TABLE_STAT_DEC(net, count) __this_cpu_dec((net)->ft.stat->count)
- #define NF_FLOW_TABLE_STAT_INC_ATOMIC(net, count)	\
---- a/net/netfilter/nf_flow_table_inet.c
-+++ b/net/netfilter/nf_flow_table_inet.c
-@@ -21,7 +21,8 @@ nf_flow_offload_inet_hook(void *priv, st
- 		proto = veth->h_vlan_encapsulated_proto;
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		proto = nf_flow_pppoe_proto(skb);
-+		if (!nf_flow_pppoe_proto(skb, &proto))
-+			return NF_ACCEPT;
- 		break;
- 	default:
- 		proto = skb->protocol;
---- a/net/netfilter/nf_flow_table_ip.c
-+++ b/net/netfilter/nf_flow_table_ip.c
-@@ -273,10 +273,11 @@ static unsigned int nf_flow_xmit_xfrm(st
- 	return NF_STOLEN;
- }
- 
--static bool nf_flow_skb_encap_protocol(const struct sk_buff *skb, __be16 proto,
-+static bool nf_flow_skb_encap_protocol(struct sk_buff *skb, __be16 proto,
- 				       u32 *offset)
- {
- 	struct vlan_ethhdr *veth;
-+	__be16 inner_proto;
- 
- 	switch (skb->protocol) {
- 	case htons(ETH_P_8021Q):
-@@ -287,7 +288,8 @@ static bool nf_flow_skb_encap_protocol(c
- 		}
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		if (nf_flow_pppoe_proto(skb) == proto) {
-+		if (nf_flow_pppoe_proto(skb, &inner_proto) &&
-+		    inner_proto == proto) {
- 			*offset += PPPOE_SES_HLEN;
- 			return true;
- 		}
-@@ -316,7 +318,7 @@ static void nf_flow_encap_pop(struct sk_
- 			skb_reset_network_header(skb);
- 			break;
- 		case htons(ETH_P_PPP_SES):
--			skb->protocol = nf_flow_pppoe_proto(skb);
-+			skb->protocol = __nf_flow_pppoe_proto(skb);
- 			skb_pull(skb, PPPOE_SES_HLEN);
- 			skb_reset_network_header(skb);
- 			break;
diff --git a/target/linux/generic/backport-6.6/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch b/target/linux/generic/backport-6.6/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
deleted file mode 100644
index 20ac222de1..0000000000
--- a/target/linux/generic/backport-6.6/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Pablo Neira Ayuso <pablo at netfilter.org>
-Date: Thu, 11 Apr 2024 13:29:00 +0200
-Subject: [PATCH] netfilter: flowtable: incorrect pppoe tuple
-
-pppoe traffic reaching ingress path does not match the flowtable entry
-because the pppoe header is expected to be at the network header offset.
-This bug causes a mismatch in the flow table lookup, so pppoe packets
-enter the classical forwarding path.
-
-Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
-Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
----
-
---- a/net/netfilter/nf_flow_table_ip.c
-+++ b/net/netfilter/nf_flow_table_ip.c
-@@ -157,7 +157,7 @@ static void nf_flow_tuple_encap(struct s
- 		tuple->encap[i].proto = skb->protocol;
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		phdr = (struct pppoe_hdr *)skb_mac_header(skb);
-+		phdr = (struct pppoe_hdr *)skb_network_header(skb);
- 		tuple->encap[i].id = ntohs(phdr->sid);
- 		tuple->encap[i].proto = skb->protocol;
- 		break;
diff --git a/target/linux/generic/backport-6.6/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch b/target/linux/generic/backport-6.6/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch
index d6ef40cd5b..b9d3582a73 100644
--- a/target/linux/generic/backport-6.6/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch
+++ b/target/linux/generic/backport-6.6/752-05-v6.7-net-ethernet-mtk_wed-do-not-assume-offload-callbacks.patch
@@ -14,7 +14,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1713,19 +1713,20 @@ mtk_wed_irq_set_mask(struct mtk_wed_devi
+@@ -1709,19 +1709,20 @@ mtk_wed_irq_set_mask(struct mtk_wed_devi
  int mtk_wed_flow_add(int index)
  {
  	struct mtk_wed_hw *hw = hw_list[index];
@@ -44,7 +44,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		goto out;
  	}
  
-@@ -1744,14 +1745,15 @@ void mtk_wed_flow_remove(int index)
+@@ -1740,14 +1741,15 @@ void mtk_wed_flow_remove(int index)
  {
  	struct mtk_wed_hw *hw = hw_list[index];
  
diff --git a/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch b/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch
index af4600a986..6d1d9a4069 100644
--- a/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch
+++ b/target/linux/generic/backport-6.6/752-06-v6.7-net-ethernet-mtk_wed-introduce-versioning-utility-ro.patch
@@ -52,15 +52,15 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wdma_clr(dev, MTK_WDMA_GLO_CFG,
  			 MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
 @@ -606,7 +606,7 @@ mtk_wed_stop(struct mtk_wed_device *dev)
+ 	wdma_w32(dev, MTK_WDMA_INT_MASK, 0);
  	wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
- 	wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
  
 -	if (dev->hw->version == 1)
 +	if (mtk_wed_is_v1(dev->hw))
  		return;
  
  	wed_w32(dev, MTK_WED_EXT_INT_MASK1, 0);
-@@ -625,7 +625,7 @@ mtk_wed_deinit(struct mtk_wed_device *de
+@@ -624,7 +624,7 @@ mtk_wed_deinit(struct mtk_wed_device *de
  		MTK_WED_CTRL_WED_TX_BM_EN |
  		MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
  
@@ -69,7 +69,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return;
  
  	wed_clr(dev, MTK_WED_CTRL,
-@@ -731,7 +731,7 @@ mtk_wed_bus_init(struct mtk_wed_device *
+@@ -730,7 +730,7 @@ mtk_wed_bus_init(struct mtk_wed_device *
  static void
  mtk_wed_set_wpdma(struct mtk_wed_device *dev)
  {
@@ -78,7 +78,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_WPDMA_CFG_BASE,  dev->wlan.wpdma_phys);
  	} else {
  		mtk_wed_bus_init(dev);
-@@ -762,7 +762,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
+@@ -761,7 +761,7 @@ mtk_wed_hw_init_early(struct mtk_wed_dev
  	      MTK_WED_WDMA_GLO_CFG_IDLE_DMAD_SUPPLY;
  	wed_m32(dev, MTK_WED_WDMA_GLO_CFG, mask, set);
  
@@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		u32 offset = dev->hw->index ? 0x04000400 : 0;
  
  		wdma_set(dev, MTK_WDMA_GLO_CFG,
-@@ -935,7 +935,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -934,7 +934,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  
  	wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE);
  
@@ -96,7 +96,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_TX_BM_TKID,
  			FIELD_PREP(MTK_WED_TX_BM_TKID_START,
  				   dev->wlan.token_start) |
-@@ -968,7 +968,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -967,7 +967,7 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  
  	mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
  
@@ -105,7 +105,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_set(dev, MTK_WED_CTRL,
  			MTK_WED_CTRL_WED_TX_BM_EN |
  			MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
-@@ -1218,7 +1218,7 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1217,7 +1217,7 @@ mtk_wed_reset_dma(struct mtk_wed_device
  	}
  
  	dev->init_done = false;
@@ -114,7 +114,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return;
  
  	if (!busy) {
-@@ -1344,7 +1344,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1343,7 +1343,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
  		MTK_WED_CTRL_WED_TX_BM_EN |
  		MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
  
@@ -123,7 +123,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_PCIE_INT_TRIGGER,
  			MTK_WED_PCIE_INT_TRIGGER_STATUS);
  
-@@ -1417,7 +1417,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1416,7 +1416,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
  		 MTK_WDMA_GLO_CFG_RX_INFO1_PRERES |
  		 MTK_WDMA_GLO_CFG_RX_INFO2_PRERES);
  
@@ -132,7 +132,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wdma_set(dev, MTK_WDMA_GLO_CFG,
  			 MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
  	} else {
-@@ -1466,7 +1466,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1465,7 +1465,7 @@ mtk_wed_start(struct mtk_wed_device *dev
  
  	mtk_wed_set_ext_int(dev, true);
  
@@ -141,7 +141,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		u32 val = dev->wlan.wpdma_phys | MTK_PCIE_MIRROR_MAP_EN |
  			  FIELD_PREP(MTK_PCIE_MIRROR_MAP_WED_ID,
  				     dev->hw->index);
-@@ -1551,7 +1551,7 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1550,7 +1550,7 @@ mtk_wed_attach(struct mtk_wed_device *de
  	}
  
  	mtk_wed_hw_init_early(dev);
@@ -150,7 +150,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		regmap_update_bits(hw->hifsys, HIFSYS_DMA_AG_MAP,
  				   BIT(hw->index), 0);
  	} else {
-@@ -1619,7 +1619,7 @@ static int
+@@ -1618,7 +1618,7 @@ static int
  mtk_wed_txfree_ring_setup(struct mtk_wed_device *dev, void __iomem *regs)
  {
  	struct mtk_wed_ring *ring = &dev->txfree_ring;
@@ -159,7 +159,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	/*
  	 * For txfree event handling, the same DMA ring is shared between WED
-@@ -1677,7 +1677,7 @@ mtk_wed_irq_get(struct mtk_wed_device *d
+@@ -1676,7 +1676,7 @@ mtk_wed_irq_get(struct mtk_wed_device *d
  {
  	u32 val, ext_mask = MTK_WED_EXT_INT_STATUS_ERROR_MASK;
  
@@ -168,7 +168,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		ext_mask |= MTK_WED_EXT_INT_STATUS_TX_DRV_R_RESP_ERR;
  	else
  		ext_mask |= MTK_WED_EXT_INT_STATUS_RX_FBUF_LO_TH |
-@@ -1844,7 +1844,7 @@ mtk_wed_setup_tc(struct mtk_wed_device *
+@@ -1840,7 +1840,7 @@ mtk_wed_setup_tc(struct mtk_wed_device *
  {
  	struct mtk_wed_hw *hw = wed->hw;
  
@@ -177,7 +177,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -EOPNOTSUPP;
  
  	switch (type) {
-@@ -1918,9 +1918,9 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1914,9 +1914,9 @@ void mtk_wed_add_hw(struct device_node *
  	hw->wdma = wdma;
  	hw->index = index;
  	hw->irq = irq;
diff --git a/target/linux/generic/backport-6.6/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch b/target/linux/generic/backport-6.6/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch
index d5bacde325..02ef4e6401 100644
--- a/target/linux/generic/backport-6.6/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch
+++ b/target/linux/generic/backport-6.6/752-07-v6.7-net-ethernet-mtk_wed-do-not-configure-rx-offload-if-.patch
@@ -16,15 +16,15 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
 @@ -606,7 +606,7 @@ mtk_wed_stop(struct mtk_wed_device *dev)
+ 	wdma_w32(dev, MTK_WDMA_INT_MASK, 0);
  	wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
- 	wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
  
 -	if (mtk_wed_is_v1(dev->hw))
 +	if (!mtk_wed_get_rx_capa(dev))
  		return;
  
  	wed_w32(dev, MTK_WED_EXT_INT_MASK1, 0);
-@@ -733,16 +733,21 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -732,16 +732,21 @@ mtk_wed_set_wpdma(struct mtk_wed_device
  {
  	if (mtk_wed_is_v1(dev->hw)) {
  		wed_w32(dev, MTK_WED_WPDMA_CFG_BASE,  dev->wlan.wpdma_phys);
@@ -55,7 +55,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -974,15 +979,17 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -973,15 +978,17 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  			MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
  	} else {
  		wed_clr(dev, MTK_WED_TX_TKID_CTRL, MTK_WED_TX_TKID_CTRL_PAUSE);
@@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	wed_clr(dev, MTK_WED_TX_BM_CTRL, MTK_WED_TX_BM_CTRL_PAUSE);
-@@ -1354,8 +1361,6 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1353,8 +1360,6 @@ mtk_wed_configure_irq(struct mtk_wed_dev
  
  		wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask);
  	} else {
@@ -91,7 +91,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		/* initail tx interrupt trigger */
  		wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX,
  			MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN |
-@@ -1374,15 +1379,20 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1373,15 +1378,20 @@ mtk_wed_configure_irq(struct mtk_wed_dev
  			FIELD_PREP(MTK_WED_WPDMA_INT_CTRL_TX_FREE_DONE_TRIG,
  				   dev->wlan.txfree_tbit));
  
@@ -121,7 +121,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  		wed_w32(dev, MTK_WED_WDMA_INT_CLR, wdma_mask);
  		wed_set(dev, MTK_WED_WDMA_INT_CTRL,
-@@ -1401,6 +1411,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1400,6 +1410,8 @@ mtk_wed_configure_irq(struct mtk_wed_dev
  static void
  mtk_wed_dma_enable(struct mtk_wed_device *dev)
  {
@@ -130,7 +130,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	wed_set(dev, MTK_WED_WPDMA_INT_CTRL, MTK_WED_WPDMA_INT_CTRL_SUBRT_ADV);
  
  	wed_set(dev, MTK_WED_GLO_CFG,
-@@ -1420,33 +1432,33 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1419,33 +1431,33 @@ mtk_wed_dma_enable(struct mtk_wed_device
  	if (mtk_wed_is_v1(dev->hw)) {
  		wdma_set(dev, MTK_WDMA_GLO_CFG,
  			 MTK_WDMA_GLO_CFG_RX_INFO3_PRERES);
@@ -186,7 +186,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -1473,7 +1485,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1472,7 +1484,7 @@ mtk_wed_start(struct mtk_wed_device *dev
  
  		val |= BIT(0) | (BIT(1) * !!dev->hw->index);
  		regmap_write(dev->hw->mirror, dev->hw->index * 4, val);
@@ -195,7 +195,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		/* driver set mid ready and only once */
  		wed_w32(dev, MTK_WED_EXT_INT_MASK1,
  			MTK_WED_EXT_INT_STATUS_WPDMA_MID_RDY);
-@@ -1485,7 +1497,6 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1484,7 +1496,6 @@ mtk_wed_start(struct mtk_wed_device *dev
  
  		if (mtk_wed_rro_cfg(dev))
  			return;
@@ -203,7 +203,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	mtk_wed_set_512_support(dev, dev->wlan.wcid_512);
-@@ -1551,13 +1562,14 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1550,13 +1561,14 @@ mtk_wed_attach(struct mtk_wed_device *de
  	}
  
  	mtk_wed_hw_init_early(dev);
diff --git a/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch b/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch
index 71b32c545b..3e750ec1d4 100644
--- a/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch
+++ b/target/linux/generic/backport-6.6/752-13-v6.7-net-ethernet-mtk_wed-add-mtk_wed_soc_data-structure.patch
@@ -38,7 +38,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  wed_m32(struct mtk_wed_device *dev, u32 reg, u32 mask, u32 val)
  {
-@@ -747,7 +767,7 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -746,7 +766,7 @@ mtk_wed_set_wpdma(struct mtk_wed_device
  		return;
  
  	wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
@@ -47,7 +47,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -941,22 +961,10 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -940,22 +960,10 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  	wed_w32(dev, MTK_WED_TX_BM_BUF_LEN, MTK_WED_PKT_SIZE);
  
  	if (mtk_wed_is_v1(dev->hw)) {
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_TX_BM_DYN_THR,
  			FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO_V2, 0) |
  			MTK_WED_TX_BM_DYN_THR_HI_V2);
-@@ -971,6 +979,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -970,6 +978,11 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  			MTK_WED_TX_TKID_DYN_THR_HI);
  	}
  
@@ -82,7 +82,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
  
  	if (mtk_wed_is_v1(dev->hw)) {
-@@ -1105,13 +1118,8 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1104,13 +1117,8 @@ mtk_wed_rx_reset(struct mtk_wed_device *
  	if (ret) {
  		mtk_wed_reset(dev, MTK_WED_RESET_WED_RX_DMA);
  	} else {
@@ -98,7 +98,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_RESET_IDX, 0);
  	}
  
-@@ -1164,7 +1172,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1163,7 +1171,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
  	if (busy) {
  		mtk_wed_reset(dev, MTK_WED_RESET_WED_TX_DMA);
  	} else {
@@ -108,7 +108,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_RESET_IDX, 0);
  	}
  
-@@ -1256,7 +1265,6 @@ static int
+@@ -1255,7 +1264,6 @@ static int
  mtk_wed_wdma_rx_ring_setup(struct mtk_wed_device *dev, int idx, int size,
  			   bool reset)
  {
@@ -116,7 +116,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	struct mtk_wed_ring *wdma;
  
  	if (idx >= ARRAY_SIZE(dev->rx_wdma))
-@@ -1264,7 +1272,7 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
+@@ -1263,7 +1271,7 @@ mtk_wed_wdma_rx_ring_setup(struct mtk_we
  
  	wdma = &dev->rx_wdma[idx];
  	if (!reset && mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE,
@@ -125,7 +125,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -ENOMEM;
  
  	wdma_w32(dev, MTK_WDMA_RING_RX(idx) + MTK_WED_RING_OFS_BASE,
-@@ -1285,7 +1293,6 @@ static int
+@@ -1284,7 +1292,6 @@ static int
  mtk_wed_wdma_tx_ring_setup(struct mtk_wed_device *dev, int idx, int size,
  			   bool reset)
  {
@@ -133,7 +133,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	struct mtk_wed_ring *wdma;
  
  	if (idx >= ARRAY_SIZE(dev->tx_wdma))
-@@ -1293,7 +1300,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
+@@ -1292,7 +1299,7 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
  
  	wdma = &dev->tx_wdma[idx];
  	if (!reset && mtk_wed_ring_alloc(dev, wdma, MTK_WED_WDMA_RING_SIZE,
@@ -142,7 +142,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		return -ENOMEM;
  
  	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE,
-@@ -1932,7 +1939,12 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1928,7 +1935,12 @@ void mtk_wed_add_hw(struct device_node *
  	hw->irq = irq;
  	hw->version = eth->soc->version;
  
@@ -156,7 +156,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		hw->mirror = syscon_regmap_lookup_by_phandle(eth_np,
  				"mediatek,pcie-mirror");
  		hw->hifsys = syscon_regmap_lookup_by_phandle(eth_np,
-@@ -1946,6 +1958,8 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1942,6 +1954,8 @@ void mtk_wed_add_hw(struct device_node *
  			regmap_write(hw->mirror, 0, 0);
  			regmap_write(hw->mirror, 4, 0);
  		}
diff --git a/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch b/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch
index 12733b142f..5a271a5628 100644
--- a/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch
+++ b/target/linux/generic/backport-6.6/752-14-v6.7-net-ethernet-mtk_wed-introduce-WED-support-for-MT798.patch
@@ -302,7 +302,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	mtk_wed_set_512_support(dev, false);
-@@ -652,6 +699,14 @@ mtk_wed_deinit(struct mtk_wed_device *de
+@@ -651,6 +698,14 @@ mtk_wed_deinit(struct mtk_wed_device *de
  		MTK_WED_CTRL_RX_ROUTE_QM_EN |
  		MTK_WED_CTRL_WED_RX_BM_EN |
  		MTK_WED_CTRL_RX_RRO_QM_EN);
@@ -317,7 +317,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -701,21 +756,37 @@ mtk_wed_detach(struct mtk_wed_device *de
+@@ -700,21 +755,37 @@ mtk_wed_detach(struct mtk_wed_device *de
  	mutex_unlock(&hw_lock);
  }
  
@@ -362,7 +362,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  		wed_w32(dev, MTK_WED_PCIE_INT_CTRL,
  			FIELD_PREP(MTK_WED_PCIE_INT_CTRL_POLL_EN, 2));
-@@ -723,19 +794,9 @@ mtk_wed_bus_init(struct mtk_wed_device *
+@@ -722,19 +793,9 @@ mtk_wed_bus_init(struct mtk_wed_device *
  		/* pcie interrupt control: pola/source selection */
  		wed_set(dev, MTK_WED_PCIE_INT_CTRL,
  			MTK_WED_PCIE_INT_CTRL_MSK_EN_POLA |
@@ -385,7 +385,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		break;
  	}
  	case MTK_WED_BUS_AXI:
-@@ -773,18 +834,19 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -772,18 +833,19 @@ mtk_wed_set_wpdma(struct mtk_wed_device
  static void
  mtk_wed_hw_init_early(struct mtk_wed_device *dev)
  {
@@ -412,7 +412,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	wed_m32(dev, MTK_WED_WDMA_GLO_CFG, mask, set);
  
  	if (mtk_wed_is_v1(dev->hw)) {
-@@ -932,11 +994,18 @@ mtk_wed_route_qm_hw_init(struct mtk_wed_
+@@ -931,11 +993,18 @@ mtk_wed_route_qm_hw_init(struct mtk_wed_
  	}
  
  	/* configure RX_ROUTE_QM */
@@ -436,7 +436,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	/* enable RX_ROUTE_QM */
  	wed_set(dev, MTK_WED_CTRL, MTK_WED_CTRL_RX_ROUTE_QM_EN);
  }
-@@ -949,22 +1018,30 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -948,22 +1017,30 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  
  	dev->init_done = true;
  	mtk_wed_set_ext_int(dev, false);
@@ -475,7 +475,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_TX_BM_DYN_THR,
  			FIELD_PREP(MTK_WED_TX_BM_DYN_THR_LO_V2, 0) |
  			MTK_WED_TX_BM_DYN_THR_HI_V2);
-@@ -974,9 +1051,6 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -973,9 +1050,6 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  				   dev->tx_buf_ring.size / 128) |
  			FIELD_PREP(MTK_WED_TX_TKID_CTRL_RSV_GRP_NUM,
  				   dev->tx_buf_ring.size / 128));
@@ -485,7 +485,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	wed_w32(dev, dev->hw->soc->regmap.tx_bm_tkid,
-@@ -986,26 +1060,62 @@ mtk_wed_hw_init(struct mtk_wed_device *d
+@@ -985,26 +1059,62 @@ mtk_wed_hw_init(struct mtk_wed_device *d
  
  	mtk_wed_reset(dev, MTK_WED_RESET_TX_BM);
  
@@ -561,7 +561,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -1303,6 +1413,24 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
+@@ -1302,6 +1412,24 @@ mtk_wed_wdma_tx_ring_setup(struct mtk_we
  					 dev->hw->soc->wdma_desc_size, true))
  		return -ENOMEM;
  
@@ -586,7 +586,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_BASE,
  		 wdma->desc_phys);
  	wdma_w32(dev, MTK_WDMA_RING_TX(idx) + MTK_WED_RING_OFS_COUNT,
-@@ -1368,6 +1496,9 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1367,6 +1495,9 @@ mtk_wed_configure_irq(struct mtk_wed_dev
  
  		wed_clr(dev, MTK_WED_WDMA_INT_CTRL, wdma_mask);
  	} else {
@@ -596,7 +596,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		/* initail tx interrupt trigger */
  		wed_w32(dev, MTK_WED_WPDMA_INT_CTRL_TX,
  			MTK_WED_WPDMA_INT_CTRL_TX0_DONE_EN |
-@@ -1420,33 +1551,60 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1419,33 +1550,60 @@ mtk_wed_dma_enable(struct mtk_wed_device
  {
  	int i;
  
@@ -668,7 +668,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
  		MTK_WED_WPDMA_GLO_CFG_TX_TKID_KEEP |
  		MTK_WED_WPDMA_GLO_CFG_TX_DMAD_DW3_PREV);
-@@ -1458,11 +1616,22 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1457,11 +1615,22 @@ mtk_wed_dma_enable(struct mtk_wed_device
  		MTK_WED_WDMA_GLO_CFG_TX_DRV_EN |
  		MTK_WED_WDMA_GLO_CFG_TX_DDONE_CHK);
  
@@ -693,7 +693,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	for (i = 0; i < MTK_WED_RX_QUEUES; i++)
  		mtk_wed_check_wfdma_rx_fill(dev, i);
-@@ -1502,6 +1671,12 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1501,6 +1670,12 @@ mtk_wed_start(struct mtk_wed_device *dev
  		wed_r32(dev, MTK_WED_EXT_INT_MASK1);
  		wed_r32(dev, MTK_WED_EXT_INT_MASK2);
  
@@ -706,7 +706,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		if (mtk_wed_rro_cfg(dev))
  			return;
  	}
-@@ -1553,6 +1728,7 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1552,6 +1727,7 @@ mtk_wed_attach(struct mtk_wed_device *de
  	dev->irq = hw->irq;
  	dev->wdma_idx = hw->index;
  	dev->version = hw->version;
@@ -714,7 +714,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if (hw->eth->dma_dev == hw->eth->dev &&
  	    of_dma_is_coherent(hw->eth->dev->of_node))
-@@ -1620,6 +1796,23 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
+@@ -1619,6 +1795,23 @@ mtk_wed_tx_ring_setup(struct mtk_wed_dev
  	ring->reg_base = MTK_WED_RING_TX(idx);
  	ring->wpdma = regs;
  
@@ -738,7 +738,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	/* WED -> WPDMA */
  	wpdma_tx_w32(dev, idx, MTK_WED_RING_OFS_BASE, ring->desc_phys);
  	wpdma_tx_w32(dev, idx, MTK_WED_RING_OFS_COUNT, MTK_WED_TX_RING_SIZE);
-@@ -1694,15 +1887,13 @@ mtk_wed_rx_ring_setup(struct mtk_wed_dev
+@@ -1693,15 +1886,13 @@ mtk_wed_rx_ring_setup(struct mtk_wed_dev
  static u32
  mtk_wed_irq_get(struct mtk_wed_device *dev, u32 mask)
  {
@@ -759,7 +759,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	val = wed_r32(dev, MTK_WED_EXT_INT_STATUS);
  	wed_w32(dev, MTK_WED_EXT_INT_STATUS, val);
-@@ -1943,6 +2134,9 @@ void mtk_wed_add_hw(struct device_node *
+@@ -1939,6 +2130,9 @@ void mtk_wed_add_hw(struct device_node *
  	case 2:
  		hw->soc = &mt7986_data;
  		break;
diff --git a/target/linux/generic/backport-6.6/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch b/target/linux/generic/backport-6.6/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch
index 5e12343de2..aa2f952b8a 100644
--- a/target/linux/generic/backport-6.6/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch
+++ b/target/linux/generic/backport-6.6/752-15-v6.7-net-ethernet-mtk_wed-refactor-mtk_wed_check_wfdma_rx.patch
@@ -56,7 +56,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -1546,6 +1537,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
+@@ -1545,6 +1536,7 @@ mtk_wed_configure_irq(struct mtk_wed_dev
  	wed_w32(dev, MTK_WED_INT_MASK, irq_mask);
  }
  
@@ -64,7 +64,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void
  mtk_wed_dma_enable(struct mtk_wed_device *dev)
  {
-@@ -1633,8 +1625,26 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1632,8 +1624,26 @@ mtk_wed_dma_enable(struct mtk_wed_device
  		wdma_set(dev, MTK_WDMA_WRBK_TX_CFG, MTK_WDMA_WRBK_TX_CFG_WRBK_EN);
  	}
  
diff --git a/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch b/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch
index f70886aa0d..4e72ea128a 100644
--- a/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch
+++ b/target/linux/generic/backport-6.6/752-16-v6.7-net-ethernet-mtk_wed-introduce-partial-AMSDU-offload.patch
@@ -248,7 +248,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mtk_wed_tx_buffer_alloc(struct mtk_wed_device *dev)
  {
  	u32 desc_size = dev->hw->soc->tx_ring_desc_size;
-@@ -709,6 +840,7 @@ __mtk_wed_detach(struct mtk_wed_device *
+@@ -708,6 +839,7 @@ __mtk_wed_detach(struct mtk_wed_device *
  
  	mtk_wdma_rx_reset(dev);
  	mtk_wed_reset(dev, MTK_WED_RESET_WED);
@@ -256,7 +256,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mtk_wed_free_tx_buffer(dev);
  	mtk_wed_free_tx_rings(dev);
  
-@@ -1129,23 +1261,6 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
+@@ -1128,23 +1260,6 @@ mtk_wed_ring_reset(struct mtk_wed_ring *
  	}
  }
  
@@ -280,7 +280,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static int
  mtk_wed_rx_reset(struct mtk_wed_device *dev)
  {
-@@ -1692,6 +1807,7 @@ mtk_wed_start(struct mtk_wed_device *dev
+@@ -1691,6 +1806,7 @@ mtk_wed_start(struct mtk_wed_device *dev
  	}
  
  	mtk_wed_set_512_support(dev, dev->wlan.wcid_512);
@@ -288,7 +288,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	mtk_wed_dma_enable(dev);
  	dev->running = true;
-@@ -1748,6 +1864,10 @@ mtk_wed_attach(struct mtk_wed_device *de
+@@ -1747,6 +1863,10 @@ mtk_wed_attach(struct mtk_wed_device *de
  	if (ret)
  		goto out;
  
diff --git a/target/linux/generic/backport-6.6/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch b/target/linux/generic/backport-6.6/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch
index 5c3015c338..f035f8fc06 100644
--- a/target/linux/generic/backport-6.6/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch
+++ b/target/linux/generic/backport-6.6/752-17-v6.7-net-ethernet-mtk_wed-introduce-hw_rro-support-for-MT.patch
@@ -173,7 +173,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -935,6 +1056,8 @@ mtk_wed_bus_init(struct mtk_wed_device *
+@@ -934,6 +1055,8 @@ mtk_wed_bus_init(struct mtk_wed_device *
  static void
  mtk_wed_set_wpdma(struct mtk_wed_device *dev)
  {
@@ -182,7 +182,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	if (mtk_wed_is_v1(dev->hw)) {
  		wed_w32(dev, MTK_WED_WPDMA_CFG_BASE,  dev->wlan.wpdma_phys);
  		return;
-@@ -952,6 +1075,15 @@ mtk_wed_set_wpdma(struct mtk_wed_device
+@@ -951,6 +1074,15 @@ mtk_wed_set_wpdma(struct mtk_wed_device
  
  	wed_w32(dev, MTK_WED_WPDMA_RX_GLO_CFG, dev->wlan.wpdma_rx_glo);
  	wed_w32(dev, dev->hw->soc->regmap.wpdma_rx_ring0, dev->wlan.wpdma_rx);
@@ -198,7 +198,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void
-@@ -1763,6 +1895,165 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1762,6 +1894,165 @@ mtk_wed_dma_enable(struct mtk_wed_device
  }
  
  static void
@@ -364,7 +364,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mtk_wed_start(struct mtk_wed_device *dev, u32 irq_mask)
  {
  	int i;
-@@ -2216,6 +2507,10 @@ void mtk_wed_add_hw(struct device_node *
+@@ -2212,6 +2503,10 @@ void mtk_wed_add_hw(struct device_node *
  		.detach = mtk_wed_detach,
  		.ppe_check = mtk_wed_ppe_check,
  		.setup_tc = mtk_wed_setup_tc,
diff --git a/target/linux/generic/backport-6.6/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch b/target/linux/generic/backport-6.6/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch
index 18aa4107db..7dad2102ae 100644
--- a/target/linux/generic/backport-6.6/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch
+++ b/target/linux/generic/backport-6.6/752-20-v6.7-net-ethernet-mtk_wed-add-wed-3.0-reset-support.patch
@@ -205,7 +205,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	wdma_w32(dev, MTK_WDMA_RESET_IDX, MTK_WDMA_RESET_IDX_TX);
  	wdma_w32(dev, MTK_WDMA_RESET_IDX, 0);
  
-@@ -1406,13 +1570,33 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1405,13 +1569,33 @@ mtk_wed_rx_reset(struct mtk_wed_device *
  	if (ret)
  		return ret;
  
@@ -239,7 +239,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_WPDMA_RX_D_RST_IDX,
  			MTK_WED_WPDMA_RX_D_RST_CRX_IDX |
  			MTK_WED_WPDMA_RX_D_RST_DRV_IDX);
-@@ -1440,23 +1624,52 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1439,23 +1623,52 @@ mtk_wed_rx_reset(struct mtk_wed_device *
  		wed_w32(dev, MTK_WED_RROQM_RST_IDX, 0);
  	}
  
@@ -298,7 +298,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mtk_wed_reset(dev, MTK_WED_RESET_WDMA_TX_DRV);
  
  	/* reset wed rx dma */
-@@ -1477,6 +1690,14 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1476,6 +1689,14 @@ mtk_wed_rx_reset(struct mtk_wed_device *
  			  MTK_WED_CTRL_WED_RX_BM_BUSY);
  	mtk_wed_reset(dev, MTK_WED_RESET_RX_BM);
  
@@ -313,7 +313,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	/* wo change to enable state */
  	val = MTK_WED_WO_STATE_ENABLE;
  	ret = mtk_wed_mcu_send_msg(wo, MTK_WED_MODULE_ID_WO,
-@@ -1494,6 +1715,7 @@ mtk_wed_rx_reset(struct mtk_wed_device *
+@@ -1493,6 +1714,7 @@ mtk_wed_rx_reset(struct mtk_wed_device *
  				   false);
  	}
  	mtk_wed_free_rx_buffer(dev);
@@ -321,7 +321,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	return 0;
  }
-@@ -1527,15 +1749,41 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1526,15 +1748,41 @@ mtk_wed_reset_dma(struct mtk_wed_device
  
  	/* 2. reset WDMA rx DMA */
  	busy = !!mtk_wdma_rx_reset(dev);
@@ -364,7 +364,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		wed_w32(dev, MTK_WED_WDMA_RESET_IDX,
  			MTK_WED_WDMA_RESET_IDX_RX | MTK_WED_WDMA_RESET_IDX_DRV);
  		wed_w32(dev, MTK_WED_WDMA_RESET_IDX, 0);
-@@ -1551,8 +1799,13 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1550,8 +1798,13 @@ mtk_wed_reset_dma(struct mtk_wed_device
  	wed_clr(dev, MTK_WED_CTRL, MTK_WED_CTRL_WED_TX_FREE_AGENT_EN);
  
  	for (i = 0; i < 100; i++) {
@@ -380,7 +380,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  			break;
  	}
  
-@@ -1574,6 +1827,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1573,6 +1826,8 @@ mtk_wed_reset_dma(struct mtk_wed_device
  		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_INT_AGENT);
  		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_TX_DRV);
  		mtk_wed_reset(dev, MTK_WED_RESET_WPDMA_RX_DRV);
@@ -389,7 +389,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	} else {
  		wed_w32(dev, MTK_WED_WPDMA_RESET_IDX,
  			MTK_WED_WPDMA_RESET_IDX_TX |
-@@ -1590,7 +1845,14 @@ mtk_wed_reset_dma(struct mtk_wed_device
+@@ -1589,7 +1844,14 @@ mtk_wed_reset_dma(struct mtk_wed_device
  		wed_w32(dev, MTK_WED_RESET_IDX, 0);
  	}
  
@@ -405,7 +405,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static int
-@@ -1842,6 +2104,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
+@@ -1841,6 +2103,7 @@ mtk_wed_dma_enable(struct mtk_wed_device
  			MTK_WED_WPDMA_GLO_CFG_RX_DRV_UNS_VER_FORCE_4);
  
  		wdma_set(dev, MTK_WDMA_PREF_RX_CFG, MTK_WDMA_PREF_RX_CFG_PREF_EN);
@@ -413,7 +413,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	wed_clr(dev, MTK_WED_WPDMA_GLO_CFG,
-@@ -1905,6 +2168,12 @@ mtk_wed_start_hw_rro(struct mtk_wed_devi
+@@ -1904,6 +2167,12 @@ mtk_wed_start_hw_rro(struct mtk_wed_devi
  	if (!mtk_wed_get_rx_capa(dev) || !dev->wlan.hw_rro)
  		return;
  
diff --git a/target/linux/generic/backport-6.6/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch b/target/linux/generic/backport-6.6/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch
index 3951715fc6..a7da409aeb 100644
--- a/target/linux/generic/backport-6.6/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch
+++ b/target/linux/generic/backport-6.6/771-v6.7-01-net-stmmac-improve-TX-timer-arm-logic.patch
@@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -3003,13 +3003,25 @@ static void stmmac_tx_timer_arm(struct s
+@@ -2988,13 +2988,25 @@ static void stmmac_tx_timer_arm(struct s
  {
  	struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue];
  	u32 tx_coal_timer = priv->tx_coal_timer[queue];
diff --git a/target/linux/generic/backport-6.6/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch b/target/linux/generic/backport-6.6/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch
index ce39895b45..60dfe4c035 100644
--- a/target/linux/generic/backport-6.6/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch
+++ b/target/linux/generic/backport-6.6/771-v6.7-02-net-stmmac-move-TX-timer-arm-after-DMA-enable.patch
@@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
 +++ b/drivers/net/ethernet/stmicro/stmmac/stmmac_main.c
-@@ -2551,9 +2551,13 @@ static void stmmac_bump_dma_threshold(st
+@@ -2536,9 +2536,13 @@ static void stmmac_bump_dma_threshold(st
   * @priv: driver private structure
   * @budget: napi budget limiting this functions packet handling
   * @queue: TX queue index
@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  {
  	struct stmmac_tx_queue *tx_q = &priv->dma_conf.tx_queue[queue];
  	struct stmmac_txq_stats *txq_stats = &priv->xstats.txq_stats[queue];
-@@ -2713,7 +2717,7 @@ static int stmmac_tx_clean(struct stmmac
+@@ -2698,7 +2702,7 @@ static int stmmac_tx_clean(struct stmmac
  
  	/* We still have pending packets, let's call for a new scheduling */
  	if (tx_q->dirty_tx != tx_q->cur_tx)
@@ -42,7 +42,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	u64_stats_update_begin(&txq_stats->napi_syncp);
  	u64_stats_add(&txq_stats->napi.tx_packets, tx_packets);
-@@ -5605,6 +5609,7 @@ static int stmmac_napi_poll_tx(struct na
+@@ -5590,6 +5594,7 @@ static int stmmac_napi_poll_tx(struct na
  		container_of(napi, struct stmmac_channel, tx_napi);
  	struct stmmac_priv *priv = ch->priv_data;
  	struct stmmac_txq_stats *txq_stats;
@@ -50,7 +50,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	u32 chan = ch->index;
  	int work_done;
  
-@@ -5613,7 +5618,7 @@ static int stmmac_napi_poll_tx(struct na
+@@ -5598,7 +5603,7 @@ static int stmmac_napi_poll_tx(struct na
  	u64_stats_inc(&txq_stats->napi.poll);
  	u64_stats_update_end(&txq_stats->napi_syncp);
  
@@ -59,7 +59,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	work_done = min(work_done, budget);
  
  	if (work_done < budget && napi_complete_done(napi, work_done)) {
-@@ -5624,6 +5629,10 @@ static int stmmac_napi_poll_tx(struct na
+@@ -5609,6 +5614,10 @@ static int stmmac_napi_poll_tx(struct na
  		spin_unlock_irqrestore(&ch->lock, flags);
  	}
  
@@ -70,7 +70,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return work_done;
  }
  
-@@ -5632,6 +5641,7 @@ static int stmmac_napi_poll_rxtx(struct
+@@ -5617,6 +5626,7 @@ static int stmmac_napi_poll_rxtx(struct
  	struct stmmac_channel *ch =
  		container_of(napi, struct stmmac_channel, rxtx_napi);
  	struct stmmac_priv *priv = ch->priv_data;
@@ -78,7 +78,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	int rx_done, tx_done, rxtx_done;
  	struct stmmac_rxq_stats *rxq_stats;
  	struct stmmac_txq_stats *txq_stats;
-@@ -5647,7 +5657,7 @@ static int stmmac_napi_poll_rxtx(struct
+@@ -5632,7 +5642,7 @@ static int stmmac_napi_poll_rxtx(struct
  	u64_stats_inc(&txq_stats->napi.poll);
  	u64_stats_update_end(&txq_stats->napi_syncp);
  
@@ -87,7 +87,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	tx_done = min(tx_done, budget);
  
  	rx_done = stmmac_rx_zc(priv, budget, chan);
-@@ -5672,6 +5682,10 @@ static int stmmac_napi_poll_rxtx(struct
+@@ -5657,6 +5667,10 @@ static int stmmac_napi_poll_rxtx(struct
  		spin_unlock_irqrestore(&ch->lock, flags);
  	}
  
diff --git a/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch b/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
index ff6c592e12..506024379e 100644
--- a/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
+++ b/target/linux/generic/backport-6.6/790-02-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
@@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3021,15 +3021,6 @@ static void mt753x_phylink_mac_link_down
+@@ -3037,15 +3037,6 @@ static void mt753x_phylink_mac_link_down
  	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  }
  
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
  				       unsigned int mode,
  				       phy_interface_t interface,
-@@ -3117,8 +3108,6 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3133,8 +3124,6 @@ mt7531_cpu_port_config(struct dsa_switch
  		return ret;
  	mt7530_write(priv, MT7530_PMCR_P(port),
  		     PMCR_CPU_PORT_SETTING(priv->id));
diff --git a/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch b/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
index 46651e32df..74f6c1129c 100644
--- a/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
+++ b/target/linux/generic/backport-6.6/790-04-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
@@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2343,24 +2343,40 @@ mt7530_free_irq_common(struct mt7530_pri
+@@ -2345,24 +2345,40 @@ mt7530_free_irq_common(struct mt7530_pri
  static void
  mt7530_free_irq(struct mt7530_priv *priv)
  {
@@ -92,7 +92,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	bus->priv = priv;
  	bus->name = KBUILD_MODNAME "-mii";
  	snprintf(bus->id, MII_BUS_ID_SIZE, KBUILD_MODNAME "-%d", idx++);
-@@ -2371,16 +2387,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2373,16 +2389,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  	bus->parent = dev;
  	bus->phy_mask = ~ds->phys_mii_mask;
  
diff --git a/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch b/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
index 108bbaba86..8c73ea94a1 100644
--- a/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
+++ b/target/linux/generic/backport-6.6/790-05-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
@@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
  	 * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that
  	 * is affine to the inbound user port.
-@@ -3289,6 +3285,36 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3305,6 +3301,36 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
  {
  	return 0;
-@@ -3344,6 +3370,7 @@ const struct dsa_switch_ops mt7530_switc
+@@ -3360,6 +3386,7 @@ const struct dsa_switch_ops mt7530_switc
  	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
@@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -41,8 +41,8 @@ enum mt753x_id {
+@@ -45,8 +45,8 @@ enum mt753x_id {
  #define  UNU_FFP(x)			(((x) & 0xff) << 8)
  #define  UNU_FFP_MASK			UNU_FFP(~0)
  #define  CPU_EN				BIT(7)
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  #define  MIRROR_EN			BIT(3)
  #define  MIRROR_PORT(x)			((x) & 0x7)
  #define  MIRROR_MASK			0x7
-@@ -785,6 +785,7 @@ struct mt753x_info {
+@@ -790,6 +790,7 @@ struct mt753x_info {
   * @irq_domain:		IRQ domain of the switch irq_chip
   * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
   * @create_sgmii:	Pointer to function creating SGMII PCS instance(s)
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -811,6 +812,7 @@ struct mt7530_priv {
+@@ -816,6 +817,7 @@ struct mt7530_priv {
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
  	int (*create_sgmii)(struct mt7530_priv *priv, bool dual_sgmii);
diff --git a/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch b/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
index ea79de61f9..3956ae453e 100644
--- a/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
+++ b/target/linux/generic/backport-6.6/790-06-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
@@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -708,7 +708,7 @@ struct mt7530_port {
+@@ -713,7 +713,7 @@ struct mt7530_port {
  
  /* Port 5 interface select definitions */
  enum p5_interface_select {
@@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	P5_INTF_SEL_PHY_P0,
  	P5_INTF_SEL_PHY_P4,
  	P5_INTF_SEL_GMAC5,
-@@ -801,7 +801,7 @@ struct mt7530_priv {
+@@ -806,7 +806,7 @@ struct mt7530_priv {
  	bool			mcm;
  	phy_interface_t		p6_interface;
  	phy_interface_t		p5_interface;
diff --git a/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch b/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
index 2d1a487c98..426a7bcc2f 100644
--- a/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
+++ b/target/linux/generic/backport-6.6/790-07-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	default:
  		return "unknown";
  	}
-@@ -2685,6 +2671,12 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2694,6 +2680,12 @@ mt7531_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
@@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	/* all MACs must be forced link-down before sw reset */
  	for (i = 0; i < MT7530_NUM_PORTS; i++)
  		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
-@@ -2694,21 +2686,18 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2703,21 +2695,18 @@ mt7531_setup(struct dsa_switch *ds)
  		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
  		     SYS_CTRL_REG_RST);
  
@@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
  		   MT7531_GPIO0_INTERRUPT);
-@@ -2768,11 +2757,6 @@ static void mt7530_mac_port_get_caps(str
+@@ -2784,11 +2773,6 @@ static void mt7530_mac_port_get_caps(str
  	}
  }
  
@@ -153,7 +153,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
-@@ -2785,7 +2769,7 @@ static void mt7531_mac_port_get_caps(str
+@@ -2801,7 +2785,7 @@ static void mt7531_mac_port_get_caps(str
  		break;
  
  	case 5: /* 2nd cpu port supports either rgmii or sgmii/8023z */
@@ -162,7 +162,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			phy_interface_set_rgmii(config->supported_interfaces);
  			break;
  		}
-@@ -2852,7 +2836,7 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2868,7 +2852,7 @@ static int mt7531_rgmii_setup(struct mt7
  {
  	u32 val;
  
@@ -171,7 +171,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dev_err(priv->dev, "RGMII mode is not available for port %d\n",
  			port);
  		return -EINVAL;
-@@ -3095,7 +3079,7 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3111,7 +3095,7 @@ mt7531_cpu_port_config(struct dsa_switch
  
  	switch (port) {
  	case 5:
@@ -180,7 +180,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			interface = PHY_INTERFACE_MODE_RGMII;
  		else
  			interface = PHY_INTERFACE_MODE_2500BASEX;
-@@ -3247,7 +3231,7 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3263,7 +3247,7 @@ mt753x_setup(struct dsa_switch *ds)
  		mt7530_free_irq_common(priv);
  
  	if (priv->create_sgmii) {
@@ -191,7 +191,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -712,7 +712,6 @@ enum p5_interface_select {
+@@ -717,7 +717,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_PHY_P0,
  	P5_INTF_SEL_PHY_P4,
  	P5_INTF_SEL_GMAC5,
@@ -199,7 +199,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  };
  
  struct mt7530_priv;
-@@ -781,6 +780,8 @@ struct mt753x_info {
+@@ -786,6 +785,8 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -208,7 +208,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   * @irq:		IRQ number of the switch
   * @irq_domain:		IRQ domain of the switch irq_chip
   * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
-@@ -802,6 +803,7 @@ struct mt7530_priv {
+@@ -807,6 +808,7 @@ struct mt7530_priv {
  	phy_interface_t		p6_interface;
  	phy_interface_t		p5_interface;
  	enum p5_interface_select p5_intf_sel;
@@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	u8			mirror_rx;
  	u8			mirror_tx;
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
-@@ -811,7 +813,7 @@ struct mt7530_priv {
+@@ -816,7 +818,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch b/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
index 5ad4e5bb70..3309e248c9 100644
--- a/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
+++ b/target/linux/generic/backport-6.6/790-08-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2735,12 +2735,14 @@ static void mt7530_mac_port_get_caps(str
+@@ -2751,12 +2751,14 @@ static void mt7530_mac_port_get_caps(str
  				     struct phylink_config *config)
  {
  	switch (port) {
@@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		phy_interface_set_rgmii(config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_MII,
  			  config->supported_interfaces);
-@@ -2748,7 +2750,8 @@ static void mt7530_mac_port_get_caps(str
+@@ -2764,7 +2766,8 @@ static void mt7530_mac_port_get_caps(str
  			  config->supported_interfaces);
  		break;
  
@@ -64,7 +64,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		__set_bit(PHY_INTERFACE_MODE_RGMII,
  			  config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_TRGMII,
-@@ -2763,19 +2766,24 @@ static void mt7531_mac_port_get_caps(str
+@@ -2779,19 +2782,24 @@ static void mt7531_mac_port_get_caps(str
  	struct mt7530_priv *priv = ds->priv;
  
  	switch (port) {
@@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		__set_bit(PHY_INTERFACE_MODE_SGMII,
  			  config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_1000BASEX,
-@@ -2794,11 +2802,13 @@ static void mt7988_mac_port_get_caps(str
+@@ -2810,11 +2818,13 @@ static void mt7988_mac_port_get_caps(str
  	phy_interface_zero(config->supported_interfaces);
  
  	switch (port) {
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	case 6:
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  config->supported_interfaces);
-@@ -2962,12 +2972,12 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2978,12 +2988,12 @@ mt753x_phylink_mac_config(struct dsa_swi
  	u32 mcr_cur, mcr_new;
  
  	switch (port) {
@@ -122,7 +122,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (priv->p5_interface == state->interface)
  			break;
  
-@@ -2977,7 +2987,7 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2993,7 +3003,7 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p5_intf_sel != P5_DISABLED)
  			priv->p5_interface = state->interface;
  		break;
diff --git a/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch b/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
index ec51e3f679..9d1b155d4a 100644
--- a/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
+++ b/target/linux/generic/backport-6.6/790-09-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2523,16 +2523,15 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2529,16 +2529,15 @@ mt7530_setup(struct dsa_switch *ds)
  		return ret;
  
  	/* Setup port 5 */
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		for_each_child_of_node(dn, mac_np) {
  			if (!of_device_is_compatible(mac_np,
  						     "mediatek,eth-mac"))
-@@ -2563,6 +2562,8 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2569,6 +2568,8 @@ mt7530_setup(struct dsa_switch *ds)
  			of_node_put(phy_node);
  			break;
  		}
@@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  #ifdef CONFIG_GPIOLIB
-@@ -2573,8 +2574,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2579,8 +2580,6 @@ mt7530_setup(struct dsa_switch *ds)
  	}
  #endif /* CONFIG_GPIOLIB */
  
diff --git a/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch b/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
index 888261373b..4f93d37e96 100644
--- a/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
+++ b/target/linux/generic/backport-6.6/790-11-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	default:
  		dev_err(ds->dev, "Unsupported p5_intf_sel %d\n",
  			priv->p5_intf_sel);
-@@ -2528,8 +2525,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2534,8 +2531,6 @@ mt7530_setup(struct dsa_switch *ds)
  		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
  		 * is detected.
  		 */
@@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		for_each_child_of_node(dn, mac_np) {
  			if (!of_device_is_compatible(mac_np,
  						     "mediatek,eth-mac"))
-@@ -2561,7 +2556,9 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2567,7 +2562,9 @@ mt7530_setup(struct dsa_switch *ds)
  			break;
  		}
  
diff --git a/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch b/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
index 1a3e28d836..8058257c53 100644
--- a/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
+++ b/target/linux/generic/backport-6.6/790-13-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	switch (interface) {
  	case PHY_INTERFACE_MODE_RGMII:
  		trgint = 0;
-@@ -2456,6 +2449,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2458,6 +2451,12 @@ mt7530_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
diff --git a/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch b/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
index 5d79a7f3c4..330a92e7d4 100644
--- a/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
+++ b/target/linux/generic/backport-6.6/790-15-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
@@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	return 0;
  }
  
-@@ -2810,11 +2814,10 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2826,11 +2830,10 @@ mt7530_mac_config(struct dsa_switch *ds,
  {
  	struct mt7530_priv *priv = ds->priv;
  
diff --git a/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch b/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
index 0c7d6132a2..dcf1afa16e 100644
--- a/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
+++ b/target/linux/generic/backport-6.6/790-16-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
@@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void
  mt7531_pll_setup(struct mt7530_priv *priv)
  {
-@@ -2801,14 +2789,6 @@ static void mt7988_mac_port_get_caps(str
+@@ -2817,14 +2805,6 @@ static void mt7988_mac_port_get_caps(str
  }
  
  static int
@@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2973,8 +2953,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2989,8 +2969,6 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p6_interface == state->interface)
  			break;
  
@@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (mt753x_mac_config(ds, port, mode, state) < 0)
  			goto unsupported;
  
-@@ -3291,11 +3269,6 @@ mt753x_conduit_state_change(struct dsa_s
+@@ -3307,11 +3285,6 @@ mt753x_conduit_state_change(struct dsa_s
  	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
  }
  
@@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int mt7988_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
-@@ -3359,7 +3332,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3375,7 +3348,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7530_phy_write_c22,
  		.phy_read_c45 = mt7530_phy_read_c45,
  		.phy_write_c45 = mt7530_phy_write_c45,
@@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3371,7 +3343,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3387,7 +3359,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7530_phy_write_c22,
  		.phy_read_c45 = mt7530_phy_read_c45,
  		.phy_write_c45 = mt7530_phy_write_c45,
@@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3383,7 +3354,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3399,7 +3370,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7531_ind_c22_phy_write,
  		.phy_read_c45 = mt7531_ind_c45_phy_read,
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
-@@ -3396,7 +3366,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3412,7 +3382,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7531_ind_c22_phy_write,
  		.phy_read_c45 = mt7531_ind_c45_phy_read,
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.cpu_port_config = mt7988_cpu_port_config,
  		.mac_port_get_caps = mt7988_mac_port_get_caps,
  		.mac_port_config = mt7988_mac_config,
-@@ -3426,9 +3395,8 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3442,9 +3411,8 @@ mt7530_probe_common(struct mt7530_priv *
  	/* Sanity check if these required device operations are filled
  	 * properly.
  	 */
@@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -729,8 +729,6 @@ struct mt753x_pcs {
+@@ -734,8 +734,6 @@ struct mt753x_pcs {
   * @phy_write_c22:	Holding the way writing PHY port using C22
   * @phy_read_c45:	Holding the way reading PHY port using C45
   * @phy_write_c45:	Holding the way writing PHY port using C45
@@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   * @phy_mode_supported:	Check if the PHY type is being supported on a certain
   *			port
   * @mac_port_validate:	Holding the way to set addition validate type for a
-@@ -751,7 +749,6 @@ struct mt753x_info {
+@@ -756,7 +754,6 @@ struct mt753x_info {
  			    int regnum);
  	int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad,
  			     int regnum, u16 val);
diff --git a/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch b/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
index 19577a375b..f6c2919eaf 100644
--- a/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
+++ b/target/linux/generic/backport-6.6/790-17-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
@@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2774,7 +2774,7 @@ static void mt7988_mac_port_get_caps(str
+@@ -2790,7 +2790,7 @@ static void mt7988_mac_port_get_caps(str
  
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
diff --git a/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch b/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
index 1b45cc50ce..66a9158507 100644
--- a/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
+++ b/target/linux/generic/backport-6.6/790-18-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2770,8 +2770,6 @@ static void mt7531_mac_port_get_caps(str
+@@ -2786,8 +2786,6 @@ static void mt7531_mac_port_get_caps(str
  static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
diff --git a/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch b/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
index 90cdf29d8f..abc1108116 100644
--- a/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
+++ b/target/linux/generic/backport-6.6/790-19-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2853,17 +2853,6 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2869,17 +2869,6 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -51,7 +51,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2903,6 +2892,9 @@ mt753x_mac_config(struct dsa_switch *ds,
+@@ -2919,6 +2908,9 @@ mt753x_mac_config(struct dsa_switch *ds,
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -61,7 +61,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return priv->info->mac_port_config(ds, port, mode, state->interface);
  }
  
-@@ -3366,7 +3358,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3382,7 +3374,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
  		.cpu_port_config = mt7988_cpu_port_config,
  		.mac_port_get_caps = mt7988_mac_port_get_caps,
@@ -69,7 +69,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	},
  };
  EXPORT_SYMBOL_GPL(mt753x_table);
-@@ -3394,8 +3385,7 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3410,8 +3401,7 @@ mt7530_probe_common(struct mt7530_priv *
  	 * properly.
  	 */
  	if (!priv->info->sw_setup || !priv->info->phy_read_c22 ||
diff --git a/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch b/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
index 2d483ab403..d6eaaaf1d5 100644
--- a/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
+++ b/target/linux/generic/backport-6.6/790-20-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2252,7 +2252,7 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2254,7 +2254,7 @@ mt7530_setup_irq(struct mt7530_priv *pri
  	}
  
  	/* This register must be set for MT7530 to properly fire interrupts */
diff --git a/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch b/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
index 73519c3e2a..735775d97a 100644
--- a/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
+++ b/target/linux/generic/backport-6.6/790-21-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
@@ -22,7 +22,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2648,14 +2648,12 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2657,14 +2657,12 @@ mt7531_setup(struct dsa_switch *ds)
  	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
  	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
  
diff --git a/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch b/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
index 0b2b3b5b33..c9159a1c68 100644
--- a/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
+++ b/target/linux/generic/backport-6.6/790-22-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
@@ -36,7 +36,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2784,7 +2784,7 @@ static void mt7988_mac_port_get_caps(str
+@@ -2800,7 +2800,7 @@ static void mt7988_mac_port_get_caps(str
  	}
  }
  
@@ -45,7 +45,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2794,22 +2794,14 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2810,22 +2810,14 @@ mt7530_mac_config(struct dsa_switch *ds,
  		mt7530_setup_port5(priv->ds, interface);
  	else if (port == 6)
  		mt7530_setup_port6(priv->ds, interface);
@@ -71,7 +71,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	val = mt7530_read(priv, MT7531_CLKGEN_CTRL);
  	val |= GP_CLK_EN;
  	val &= ~GP_MODE_MASK;
-@@ -2837,20 +2829,14 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2853,20 +2845,14 @@ static int mt7531_rgmii_setup(struct mt7
  		case PHY_INTERFACE_MODE_RGMII_ID:
  			break;
  		default:
@@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2858,42 +2844,21 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2874,42 +2860,21 @@ mt7531_mac_config(struct dsa_switch *ds,
  	struct phy_device *phydev;
  	struct dsa_port *dp;
  
@@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static struct phylink_pcs *
-@@ -2922,17 +2887,11 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2938,17 +2903,11 @@ mt753x_phylink_mac_config(struct dsa_swi
  	u32 mcr_cur, mcr_new;
  
  	switch (port) {
@@ -162,7 +162,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  		if (priv->p5_intf_sel != P5_DISABLED)
  			priv->p5_interface = state->interface;
-@@ -2941,16 +2900,10 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2957,16 +2916,10 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p6_interface == state->interface)
  			break;
  
@@ -180,7 +180,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
-@@ -3033,7 +2986,6 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3049,7 +3002,6 @@ mt7531_cpu_port_config(struct dsa_switch
  	struct mt7530_priv *priv = ds->priv;
  	phy_interface_t interface;
  	int speed;
@@ -188,7 +188,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	switch (port) {
  	case 5:
-@@ -3058,9 +3010,8 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3074,9 +3026,8 @@ mt7531_cpu_port_config(struct dsa_switch
  	else
  		speed = SPEED_1000;
  
@@ -202,7 +202,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -755,9 +755,9 @@ struct mt753x_info {
+@@ -760,9 +760,9 @@ struct mt753x_info {
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
  				  phy_interface_t interface,
  				  unsigned long *supported);
diff --git a/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch b/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
index 27f29beee1..c52cb0d5ea 100644
--- a/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
+++ b/target/linux/generic/backport-6.6/790-23-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
@@ -92,10 +92,10 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
 -	priv->p6_interface = PHY_INTERFACE_MODE_NA;
 -
- 	mt753x_trap_frames(priv);
+ 	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ)
+ 		mt7530_pll_setup(priv);
  
- 	/* Enable and reset MIB counters */
-@@ -2474,9 +2462,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2477,9 +2465,7 @@ mt7530_setup(struct dsa_switch *ds)
  		mt7530_set(priv, MT7530_PSC_P(i), SA_DIS);
  
  		if (dsa_is_cpu_port(ds, i)) {
@@ -106,7 +106,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		} else {
  			mt7530_port_disable(ds, i);
  
-@@ -2580,9 +2566,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2586,9 +2572,7 @@ mt7531_setup_common(struct dsa_switch *d
  		mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR);
  
  		if (dsa_is_cpu_port(ds, i)) {
@@ -117,7 +117,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		} else {
  			mt7530_port_disable(ds, i);
  
-@@ -2671,10 +2655,6 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2680,10 +2664,6 @@ mt7531_setup(struct dsa_switch *ds)
  	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
  		   MT7531_GPIO0_INTERRUPT);
  
@@ -125,10 +125,10 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 -	priv->p5_interface = PHY_INTERFACE_MODE_NA;
 -	priv->p6_interface = PHY_INTERFACE_MODE_NA;
 -
- 	/* Enable PHY core PLL, since phy_device has not yet been created
- 	 * provided for phy_[read,write]_mmd_indirect is called, we provide
- 	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
-@@ -2886,26 +2866,9 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	/* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since
+ 	 * phy_device has not yet been created provided for
+ 	 * phy_[read,write]_mmd_indirect is called, we provide our own
+@@ -2902,26 +2882,9 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
@@ -156,7 +156,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
  	mcr_new = mcr_cur;
  	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
-@@ -2941,17 +2904,10 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2957,17 +2920,10 @@ static void mt753x_phylink_mac_link_up(s
  
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
  
@@ -176,7 +176,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		mcr |= PMCR_FORCE_SPEED_1000;
  		break;
  	case SPEED_100:
-@@ -2969,6 +2925,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2985,6 +2941,7 @@ static void mt753x_phylink_mac_link_up(s
  	if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
  		switch (speed) {
  		case SPEED_1000:
@@ -184,7 +184,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  			mcr |= PMCR_FORCE_EEE1G;
  			break;
  		case SPEED_100:
-@@ -2980,61 +2937,6 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2996,61 +2953,6 @@ static void mt753x_phylink_mac_link_up(s
  	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
  }
  
@@ -246,7 +246,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -3293,7 +3195,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3309,7 +3211,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7531_ind_c22_phy_write,
  		.phy_read_c45 = mt7531_ind_c45_phy_read,
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
@@ -254,7 +254,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
-@@ -3305,7 +3206,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3321,7 +3222,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write_c22 = mt7531_ind_c22_phy_write,
  		.phy_read_c45 = mt7531_ind_c45_phy_read,
  		.phy_write_c45 = mt7531_ind_c45_phy_write,
@@ -264,7 +264,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -336,13 +336,6 @@ enum mt7530_vlan_port_acc_frm {
+@@ -340,13 +340,6 @@ enum mt7530_vlan_port_acc_frm {
  					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
  					 PMCR_FORCE_FDX | PMCR_FORCE_LNK | \
  					 PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100)
@@ -278,7 +278,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  #define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
  #define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
-@@ -749,7 +742,6 @@ struct mt753x_info {
+@@ -754,7 +747,6 @@ struct mt753x_info {
  			    int regnum);
  	int (*phy_write_c45)(struct mt7530_priv *priv, int port, int devad,
  			     int regnum, u16 val);
@@ -286,7 +286,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
-@@ -775,7 +767,6 @@ struct mt753x_info {
+@@ -780,7 +772,6 @@ struct mt753x_info {
   * @ports:		Holding the state among ports
   * @reg_mutex:		The lock for protecting among process accessing
   *			registers
@@ -294,7 +294,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
   * @p5_intf_sel:	Holding the current port 5 interface select
   * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
   *			has got SGMII
-@@ -797,8 +788,6 @@ struct mt7530_priv {
+@@ -802,8 +793,6 @@ struct mt7530_priv {
  	const struct mt753x_info *info;
  	unsigned int		id;
  	bool			mcm;
diff --git a/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch b/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
index 97b63b6df5..7fe77c506e 100644
--- a/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
+++ b/target/linux/generic/backport-6.6/790-24-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
@@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2831,16 +2831,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2847,16 +2847,6 @@ mt7531_mac_config(struct dsa_switch *ds,
  	}
  }
  
@@ -35,7 +35,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static struct phylink_pcs *
  mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
  			      phy_interface_t interface)
-@@ -2866,8 +2856,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2882,8 +2872,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
diff --git a/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch b/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
index c130f2aaca..bd5c9b9772 100644
--- a/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
+++ b/target/linux/generic/backport-6.6/790-25-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3009,17 +3009,9 @@ static int
+@@ -3025,17 +3025,9 @@ static int
  mt753x_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	if (ret)
  		return ret;
  
-@@ -3031,6 +3023,14 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3047,6 +3039,14 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch b/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
index f07c6bd575..348c35e1ac 100644
--- a/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
+++ b/target/linux/generic/backport-6.6/790-26-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	mutex_unlock(&priv->reg_mutex);
  }
-@@ -2454,6 +2452,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2457,6 +2455,12 @@ mt7530_setup(struct dsa_switch *ds)
  	mt7530_mib_reset(ds);
  
  	for (i = 0; i < MT7530_NUM_PORTS; i++) {
@@ -53,7 +53,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		/* Disable forwarding by default on all ports */
  		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
  			   PCR_MATRIX_CLR);
-@@ -2556,6 +2560,12 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2562,6 +2566,12 @@ mt7531_setup_common(struct dsa_switch *d
  		     UNU_FFP_MASK);
  
  	for (i = 0; i < MT7530_NUM_PORTS; i++) {
diff --git a/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch b/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch
index 29536df9b8..54f5a59a64 100644
--- a/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch
+++ b/target/linux/generic/backport-6.6/790-27-v6.9-net-dsa-mt7530-simplify-link-operations.patch
@@ -45,7 +45,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2864,23 +2864,13 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2880,23 +2880,13 @@ mt753x_phylink_mac_config(struct dsa_swi
  			  const struct phylink_link_state *state)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -329,8 +329,6 @@ enum mt7530_vlan_port_acc_frm {
+@@ -333,8 +333,6 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch b/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch
index 9356a54c71..af39929dba 100644
--- a/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch
+++ b/target/linux/generic/backport-6.6/790-28-v6.9-net-dsa-mt7530-disable-LEDs-before-reset.patch
@@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2389,6 +2389,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2391,6 +2391,12 @@ mt7530_setup(struct dsa_switch *ds)
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch b/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
deleted file mode 100644
index b8124cad23..0000000000
--- a/target/linux/generic/backport-6.6/790-29-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From fa14c96eab3ec5b7cb44b06c0a54a851849a9810 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Wed, 20 Mar 2024 23:45:30 +0300
-Subject: [PATCH 29/30] net: dsa: mt7530: fix improper frames on all 25MHz and
- 40MHz XTAL MT7530
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The MT7530 switch after reset initialises with a core clock frequency that
-works with a 25MHz XTAL connected to it. For 40MHz XTAL, the core clock
-frequency must be set to 500MHz.
-
-The mt7530_pll_setup() function is responsible of setting the core clock
-frequency. Currently, it runs on MT7530 with 25MHz and 40MHz XTAL. This
-causes MT7530 switch with 25MHz XTAL to egress and ingress frames
-improperly.
-
-Introduce a check to run it only on MT7530 with 40MHz XTAL.
-
-The core clock frequency is set by writing to a switch PHY's register.
-Access to the PHY's register is done via the MDIO bus the switch is also
-on. Therefore, it works only when the switch makes switch PHYs listen on
-the MDIO bus the switch is on. This is controlled either by the state of
-the ESW_P1_LED_1 pin after reset deassertion or modifying bit 5 of the
-modifiable trap register.
-
-When ESW_P1_LED_1 is pulled high, PHY indirect access is used. That means
-accessing PHY registers via the PHY indirect access control register of the
-switch.
-
-When ESW_P1_LED_1 is pulled low, PHY direct access is used. That means
-accessing PHY registers via the MDIO bus the switch is on.
-
-For MT7530 switch with 40MHz XTAL on a board with ESW_P1_LED_1 pulled high,
-the core clock frequency won't be set to 500MHz, causing the switch to
-egress and ingress frames improperly.
-
-Run mt7530_pll_setup() after PHY direct access is set on the modifiable
-trap register.
-
-With these two changes, all MT7530 switches with 25MHz and 40MHz, and
-P1_LED_1 pulled high or low, will egress and ingress frames properly.
-
-Link: https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/4a5dd143f2172ec97a2872fa29c7c4cd520f45b5/linux-mt/drivers/net/ethernet/mediatek/gsw_mt7623.c#L1039
-Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Link: https://lore.kernel.org/r/20240320-for-net-mt7530-fix-25mhz-xtal-with-direct-phy-access-v1-1-d92f605f1160 at arinc9.com
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/dsa/mt7530.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2435,8 +2435,6 @@ mt7530_setup(struct dsa_switch *ds)
- 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
- 		     SYS_CTRL_REG_RST);
- 
--	mt7530_pll_setup(priv);
--
- 	/* Lower Tx driving for TRGMII path */
- 	for (i = 0; i < NUM_TRGMII_CTRL; i++)
- 		mt7530_write(priv, MT7530_TRGMII_TD_ODT(i),
-@@ -2452,6 +2450,9 @@ mt7530_setup(struct dsa_switch *ds)
- 	val |= MHWTRAP_MANUAL;
- 	mt7530_write(priv, MT7530_MHWTRAP, val);
- 
-+	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ)
-+		mt7530_pll_setup(priv);
-+
- 	mt753x_trap_frames(priv);
- 
- 	/* Enable and reset MIB counters */
diff --git a/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch b/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
index 6c813ed3ff..c2eb3a2801 100644
--- a/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
+++ b/target/linux/generic/backport-6.6/790-30-v6.9-net-dsa-mt7530-prevent-possible-incorrect-XTAL-frequ.patch
@@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2389,12 +2389,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2391,12 +2391,6 @@ mt7530_setup(struct dsa_switch *ds)
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.6/790-31-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch b/target/linux/generic/backport-6.6/790-31-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
deleted file mode 100644
index 9a4d4a918a..0000000000
--- a/target/linux/generic/backport-6.6/790-31-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From ef972fc9f5743da589ce9546dd565d6c56e679b8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Mon, 8 Apr 2024 10:08:53 +0300
-Subject: [PATCH 1/2] net: dsa: mt7530: fix enabling EEE on MT7531 switch on
- all boards
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The commit 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
-brought EEE support but did not enable EEE on MT7531 switch MACs. EEE is
-enabled on MT7531 switch MACs by pulling the LAN2LED0 pin low on the board
-(bootstrapping), unsetting the EEE_DIS bit on the trap register, or setting
-the internal EEE switch bit on the CORE_PLL_GROUP4 register. Thanks to
-SkyLake Huang (???) from MediaTek for providing information on the
-internal EEE switch bit.
-
-There are existing boards that were not designed to pull the pin low.
-Because of that, the EEE status currently depends on the board design.
-
-The EEE_DIS bit on the trap pertains to the LAN2LED0 pin which is usually
-used to control an LED. Once the bit is unset, the pin will be low. That
-will make the active low LED turn on. The pin is controlled by the switch
-PHY. It seems that the PHY controls the pin in the way that it inverts the
-pin state. That means depending on the wiring of the LED connected to
-LAN2LED0 on the board, the LED may be on without an active link.
-
-To not cause this unwanted behaviour whilst enabling EEE on all boards, set
-the internal EEE switch bit on the CORE_PLL_GROUP4 register.
-
-My testing on MT7531 shows a certain amount of traffic loss when EEE is
-enabled. That said, I haven't come across a board that enables EEE. So
-enable EEE on the switch MACs but disable EEE advertisement on the switch
-PHYs. This way, we don't change the behaviour of the majority of the boards
-that have this switch. The mediatek-ge PHY driver already disables EEE
-advertisement on the switch PHYs but my testing shows that it is somehow
-enabled afterwards. Disabling EEE advertisement before the PHY driver
-initialises keeps it off.
-
-With this change, EEE can now be enabled using ethtool.
-
-Fixes: 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
- drivers/net/dsa/mt7530.c | 17 ++++++++++++-----
- drivers/net/dsa/mt7530.h |  1 +
- 2 files changed, 13 insertions(+), 5 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2666,18 +2666,25 @@ mt7531_setup(struct dsa_switch *ds)
- 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
- 		   MT7531_GPIO0_INTERRUPT);
- 
--	/* Enable PHY core PLL, since phy_device has not yet been created
--	 * provided for phy_[read,write]_mmd_indirect is called, we provide
--	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
--	 * function.
-+	/* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since
-+	 * phy_device has not yet been created provided for
-+	 * phy_[read,write]_mmd_indirect is called, we provide our own
-+	 * mt7531_ind_mmd_phy_[read,write] to complete this function.
- 	 */
- 	val = mt7531_ind_c45_phy_read(priv, MT753X_CTRL_PHY_ADDR,
- 				      MDIO_MMD_VEND2, CORE_PLL_GROUP4);
--	val |= MT7531_PHY_PLL_BYPASS_MODE;
-+	val |= MT7531_RG_SYSPLL_DMY2 | MT7531_PHY_PLL_BYPASS_MODE;
- 	val &= ~MT7531_PHY_PLL_OFF;
- 	mt7531_ind_c45_phy_write(priv, MT753X_CTRL_PHY_ADDR, MDIO_MMD_VEND2,
- 				 CORE_PLL_GROUP4, val);
- 
-+	/* Disable EEE advertisement on the switch PHYs. */
-+	for (i = MT753X_CTRL_PHY_ADDR;
-+	     i < MT753X_CTRL_PHY_ADDR + MT7530_NUM_PHYS; i++) {
-+		mt7531_ind_c45_phy_write(priv, i, MDIO_MMD_AN, MDIO_AN_EEE_ADV,
-+					 0);
-+	}
-+
- 	mt7531_setup_common(ds);
- 
- 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -621,6 +621,7 @@ enum mt7531_clk_skew {
- #define  RG_SYSPLL_DDSFBK_EN		BIT(12)
- #define  RG_SYSPLL_BIAS_EN		BIT(11)
- #define  RG_SYSPLL_BIAS_LPF_EN		BIT(10)
-+#define  MT7531_RG_SYSPLL_DMY2		BIT(6)
- #define  MT7531_PHY_PLL_OFF		BIT(5)
- #define  MT7531_PHY_PLL_BYPASS_MODE	BIT(4)
- 
diff --git a/target/linux/generic/backport-6.6/790-33-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch b/target/linux/generic/backport-6.6/790-33-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
index 7cbdc9e50d..5eade735ec 100644
--- a/target/linux/generic/backport-6.6/790-33-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
+++ b/target/linux/generic/backport-6.6/790-33-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2850,28 +2850,34 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2858,28 +2858,34 @@ mt7531_mac_config(struct dsa_switch *ds,
  }
  
  static struct phylink_pcs *
@@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if ((port == 5 || port == 6) && priv->info->mac_port_config)
  		priv->info->mac_port_config(ds, port, mode, state->interface);
-@@ -2881,23 +2887,25 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2889,23 +2895,25 @@ mt753x_phylink_mac_config(struct dsa_swi
  		mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY);
  }
  
@@ -92,7 +92,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	u32 mcr;
  
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
-@@ -2932,7 +2940,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2940,7 +2948,7 @@ static void mt753x_phylink_mac_link_up(s
  		}
  	}
  
@@ -101,7 +101,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
-@@ -3152,16 +3160,19 @@ const struct dsa_switch_ops mt7530_switc
+@@ -3160,16 +3168,19 @@ const struct dsa_switch_ops mt7530_switc
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
@@ -125,7 +125,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  const struct mt753x_info mt753x_table[] = {
  	[ID_MT7621] = {
  		.id = ID_MT7621,
-@@ -3239,6 +3250,7 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3247,6 +3258,7 @@ mt7530_probe_common(struct mt7530_priv *
  	priv->dev = dev;
  	priv->ds->priv = priv;
  	priv->ds->ops = &mt7530_switch_ops;
diff --git a/target/linux/generic/backport-6.6/790-34-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch b/target/linux/generic/backport-6.6/790-34-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
deleted file mode 100644
index 11f9a68cee..0000000000
--- a/target/linux/generic/backport-6.6/790-34-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From d4097ddef078a113643a6dcde01e99741f852adb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Sat, 13 Apr 2024 16:01:39 +0300
-Subject: [PATCH 2/5] net: dsa: mt7530: fix mirroring frames received on local
- port
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This switch intellectual property provides a bit on the ARL global control
-register which controls allowing mirroring frames which are received on the
-local port (monitor port). This bit is unset after reset.
-
-This ability must be enabled to fully support the port mirroring feature on
-this switch intellectual property.
-
-Therefore, this patch fixes the traffic not being reflected on a port,
-which would be configured like below:
-
-  tc qdisc add dev swp0 clsact
-
-  tc filter add dev swp0 ingress matchall skip_sw \
-  action mirred egress mirror dev swp0
-
-As a side note, this configuration provides the hairpinning feature for a
-single port.
-
-Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring")
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/dsa/mt7530.c | 6 ++++++
- drivers/net/dsa/mt7530.h | 4 ++++
- 2 files changed, 10 insertions(+)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2480,6 +2480,9 @@ mt7530_setup(struct dsa_switch *ds)
- 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
- 	}
- 
-+	/* Allow mirroring frames received on the local port (monitor port). */
-+	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
-+
- 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
- 	ret = mt7530_setup_vlan0(priv);
- 	if (ret)
-@@ -2591,6 +2594,9 @@ mt7531_setup_common(struct dsa_switch *d
- 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
- 	}
- 
-+	/* Allow mirroring frames received on the local port (monitor port). */
-+	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
-+
- 	/* Flush the FDB table */
- 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
- 	if (ret < 0)
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -32,6 +32,10 @@ enum mt753x_id {
- #define SYSC_REG_RSTCTRL		0x34
- #define  RESET_MCM			BIT(2)
- 
-+/* Register for ARL global control */
-+#define MT753X_AGC			0xc
-+#define  LOCAL_EN			BIT(7)
-+
- /* Registers to mac forward control for unknown frames */
- #define MT7530_MFC			0x10
- #define  BC_FFP(x)			(((x) & 0xff) << 24)
diff --git a/target/linux/generic/backport-6.6/790-35-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch b/target/linux/generic/backport-6.6/790-35-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
deleted file mode 100644
index d5ba8ef1c4..0000000000
--- a/target/linux/generic/backport-6.6/790-35-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From 019a17a5e76940ea86114838d1d638d4dc8d3750 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Sat, 13 Apr 2024 16:01:40 +0300
-Subject: [PATCH 3/5] net: dsa: mt7530: fix port mirroring for MT7988 SoC
- switch
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The "MT7988A Wi-Fi 7 Generation Router Platform: Datasheet (Open Version)
-v0.1" document shows bits 16 to 18 as the MIRROR_PORT field of the CPU
-forward control register. Currently, the MT7530 DSA subdriver configures
-bits 0 to 2 of the CPU forward control register which breaks the port
-mirroring feature for the MT7988 SoC switch.
-
-Fix this by using the MT7531_MIRROR_PORT_GET() and MT7531_MIRROR_PORT_SET()
-macros which utilise the correct bits.
-
-Fixes: 110c18bfed41 ("net: dsa: mt7530: introduce driver for MT7988 built-in switch")
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Acked-by: Daniel Golle <daniel at makrotopia.org>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/dsa/mt7530.c | 10 ++++++----
- 1 file changed, 6 insertions(+), 4 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -1883,14 +1883,16 @@ mt7530_port_vlan_del(struct dsa_switch *
- 
- static int mt753x_mirror_port_get(unsigned int id, u32 val)
- {
--	return (id == ID_MT7531) ? MT7531_MIRROR_PORT_GET(val) :
--				   MIRROR_PORT(val);
-+	return (id == ID_MT7531 || id == ID_MT7988) ?
-+		       MT7531_MIRROR_PORT_GET(val) :
-+		       MIRROR_PORT(val);
- }
- 
- static int mt753x_mirror_port_set(unsigned int id, u32 val)
- {
--	return (id == ID_MT7531) ? MT7531_MIRROR_PORT_SET(val) :
--				   MIRROR_PORT(val);
-+	return (id == ID_MT7531 || id == ID_MT7988) ?
-+		       MT7531_MIRROR_PORT_SET(val) :
-+		       MIRROR_PORT(val);
- }
- 
- static int mt753x_port_mirror_add(struct dsa_switch *ds, int port,
diff --git a/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch
index 9b2ecba1c3..d010231e49 100644
--- a/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-6.6/780-usb-net-MeigLink_modem_support.patch
@@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1152,6 +1157,11 @@ static const struct usb_device_id option
+@@ -1156,6 +1161,11 @@ static const struct usb_device_id option
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  	  .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  	/* Quectel products using Qualcomm vendor ID */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1193,6 +1203,11 @@ static const struct usb_device_id option
+@@ -1197,6 +1207,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/pending-6.6/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-6.6/150-bridge_allow_receiption_on_disabled_port.patch
index b23cae1f5e..d8fd9cdf42 100644
--- a/target/linux/generic/pending-6.6/150-bridge_allow_receiption_on_disabled_port.patch
+++ b/target/linux/generic/pending-6.6/150-bridge_allow_receiption_on_disabled_port.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -239,6 +239,9 @@ static void __br_handle_local_finish(str
+@@ -244,6 +244,9 @@ static void __br_handle_local_finish(str
  /* note: already called with rcu_read_lock */
  static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
  {
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	__br_handle_local_finish(skb);
  
  	/* return 1 to signal the okfn() was called so it's ok to use the skb */
-@@ -408,6 +411,17 @@ forward:
+@@ -415,6 +418,17 @@ forward:
  		goto defer_stp_filtering;
  
  	switch (p->state) {
diff --git a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index e54dcdadbb..07e923b69e 100644
--- a/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.6/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -8260,7 +8260,7 @@ static int nft_register_flowtable_net_ho
+@@ -8268,7 +8268,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-6.6/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-6.6/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
index 05711780f5..dd5608b243 100644
--- a/target/linux/generic/pending-6.6/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
+++ b/target/linux/generic/pending-6.6/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -362,6 +362,8 @@ static rx_handler_result_t br_handle_fra
+@@ -367,6 +367,8 @@ static rx_handler_result_t br_handle_fra
  		fwd_mask |= p->group_fwd_mask;
  		switch (dest[5]) {
  		case 0x00:	/* Bridge Group Address */
diff --git a/target/linux/generic/pending-6.6/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-6.6/811-pci_disable_usb_common_quirks.patch
index 4c271a7bd8..e91d1ef6b2 100644
--- a/target/linux/generic/pending-6.6/811-pci_disable_usb_common_quirks.patch
+++ b/target/linux/generic/pending-6.6/811-pci_disable_usb_common_quirks.patch
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif  /*  __LINUX_USB_PCI_QUIRKS_H  */
 --- a/include/linux/usb/hcd.h
 +++ b/include/linux/usb/hcd.h
-@@ -484,7 +484,14 @@ extern int usb_hcd_pci_probe(struct pci_
+@@ -485,7 +485,14 @@ extern int usb_hcd_pci_probe(struct pci_
  extern void usb_hcd_pci_remove(struct pci_dev *dev);
  extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
  
diff --git a/target/linux/generic/pending-6.6/920-mangle_bootargs.patch b/target/linux/generic/pending-6.6/920-mangle_bootargs.patch
index 519d0b76da..75f626579e 100644
--- a/target/linux/generic/pending-6.6/920-mangle_bootargs.patch
+++ b/target/linux/generic/pending-6.6/920-mangle_bootargs.patch
@@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
  /*
   * We need to store the untouched command line for future reference.
   * We also need to store the touched command line since the parameter
-@@ -896,6 +919,7 @@ void start_kernel(void)
+@@ -898,6 +921,7 @@ void start_kernel(void)
  	pr_notice("%s", linux_banner);
  	early_security_init();
  	setup_arch(&command_line);
diff --git a/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch b/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
index 969f8b9ef3..db4ad0ce68 100644
--- a/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
+++ b/target/linux/ipq806x/patches-6.6/902-ARM-decompressor-support-for-ATAGs-rootblock-parsing.patch
@@ -177,7 +177,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  #include <linux/bootconfig.h>
  #include <linux/console.h>
  #include <linux/nmi.h>
-@@ -930,6 +931,17 @@ void start_kernel(void)
+@@ -932,6 +933,17 @@ void start_kernel(void)
  	pr_notice("Kernel command line: %s\n", saved_command_line);
  	/* parameters may set static keys */
  	jump_label_init();
diff --git a/target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch b/target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
index 0701743ffb..c92fcd43ce 100644
--- a/target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
+++ b/target/linux/mediatek/patches-6.6/944-net-ethernet-mtk_wed-move-dlm-a-dedicated-dts-node.patch
@@ -22,7 +22,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
 
 --- a/drivers/net/ethernet/mediatek/mtk_wed.c
 +++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1321,6 +1321,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device
+@@ -1320,6 +1320,24 @@ mtk_wed_rro_alloc(struct mtk_wed_device
  	struct device_node *np;
  	int index;
  
@@ -47,7 +47,7 @@ Signed-off-by: Lorenzo Bianconi <lorenzo at kernel.org>
  	index = of_property_match_string(dev->hw->node, "memory-region-names",
  					 "wo-dlm");
  	if (index < 0)
-@@ -1337,6 +1355,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device
+@@ -1336,6 +1354,7 @@ mtk_wed_rro_alloc(struct mtk_wed_device
  		return -ENODEV;
  
  	dev->rro.miod_phys = rmem->base;
diff --git a/target/linux/mediatek/patches-6.6/963-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch b/target/linux/mediatek/patches-6.6/963-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch
deleted file mode 100644
index 9974073d25..0000000000
--- a/target/linux/mediatek/patches-6.6/963-net-ethernet-mtk_eth_soc-fix-WED-wifi-reset.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From: Felix Fietkau <nbd at nbd.name>
-Date: Thu, 18 Jan 2024 12:51:32 +0100
-Subject: [PATCH] net: ethernet: mtk_eth_soc: fix WED + wifi reset
-
-The WLAN + WED reset sequence relies on being able to receive interrupts from
-the card, in order to synchronize individual steps with the firmware.
-When WED is stopped, leave interrupts running and rely on the driver turning
-off unwanted ones.
-WED DMA also needs to be disabled before resetting.
-
-Fixes: f78cd9c783e0 ("net: ethernet: mtk_wed: update mtk_wed_stop")
-Signed-off-by: Felix Fietkau <nbd at nbd.name>
----
-
---- a/drivers/net/ethernet/mediatek/mtk_wed.c
-+++ b/drivers/net/ethernet/mediatek/mtk_wed.c
-@@ -1072,13 +1072,13 @@ mtk_wed_dma_disable(struct mtk_wed_devic
- static void
- mtk_wed_stop(struct mtk_wed_device *dev)
- {
-+	mtk_wed_dma_disable(dev);
- 	mtk_wed_set_ext_int(dev, false);
- 
- 	wed_w32(dev, MTK_WED_WPDMA_INT_TRIGGER, 0);
- 	wed_w32(dev, MTK_WED_WDMA_INT_TRIGGER, 0);
- 	wdma_w32(dev, MTK_WDMA_INT_MASK, 0);
- 	wdma_w32(dev, MTK_WDMA_INT_GRP2, 0);
--	wed_w32(dev, MTK_WED_WPDMA_INT_MASK, 0);
- 
- 	if (!mtk_wed_get_rx_capa(dev))
- 		return;
-@@ -1091,7 +1091,6 @@ static void
- mtk_wed_deinit(struct mtk_wed_device *dev)
- {
- 	mtk_wed_stop(dev);
--	mtk_wed_dma_disable(dev);
- 
- 	wed_clr(dev, MTK_WED_CTRL,
- 		MTK_WED_CTRL_WDMA_INT_AGENT_EN |
-@@ -2622,9 +2621,6 @@ mtk_wed_irq_get(struct mtk_wed_device *d
- static void
- mtk_wed_irq_set_mask(struct mtk_wed_device *dev, u32 mask)
- {
--	if (!dev->running)
--		return;
--
- 	mtk_wed_set_ext_int(dev, !!mask);
- 	wed_w32(dev, MTK_WED_INT_MASK, mask);
- }
diff --git a/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
index 0cb1e75591..7463c8844e 100644
--- a/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/mvebu/patches-6.6/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
@@ -258,7 +258,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static int kernel_init(void *);
  
  /*
-@@ -928,6 +932,18 @@ void start_kernel(void)
+@@ -930,6 +934,18 @@ void start_kernel(void)
  	boot_cpu_hotplug_init();
  
  	pr_notice("Kernel command line: %s\n", saved_command_line);
diff --git a/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch b/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch
index 3d90286470..c21c286edf 100644
--- a/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch
+++ b/target/linux/ramips/patches-6.6/840-serial-add-ugly-custom-baud-rate-hack.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/drivers/tty/serial/serial_core.c
 +++ b/drivers/tty/serial/serial_core.c
-@@ -467,6 +467,9 @@ uart_get_baud_rate(struct uart_port *por
+@@ -480,6 +480,9 @@ uart_get_baud_rate(struct uart_port *por
  		break;
  	}
  



From lede-commits at lists.infradead.org  Sun Apr 28 13:47:51 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 16:47:51 -0400
Subject: [openwrt/openwrt]  mediatek: bpi-r3-mini: persist WiFi and WAN MAC
 addresses
In-Reply-To: <171433727118.739643.3274074502974128218@git-01.infra.openwrt.org>
References: <171433727118.739643.3274074502974128218@git-01.infra.openwrt.org>
Message-ID: <mailman.31635.1714337276.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/abbcbb92283d8cdb22828122ca476f5d8dd9f782

commit abbcbb92283d8cdb22828122ca476f5d8dd9f782
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Apr 28 03:00:50 2024 +0100

    mediatek: bpi-r3-mini: persist WiFi and WAN MAC addresses
    
    Derive WAN and WiFi MAC addresses from the (random) MAC address stored
    in the U-Boot environment.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 target/linux/mediatek/filogic/base-files/etc/board.d/02_network        | 3 ++-
 .../filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac         | 3 ++-
 2 files changed, 4 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index 51e02efb39..597754da7b 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -119,7 +119,8 @@ mediatek_setup_macs()
 	local label_mac=""
 
 	case $board in
-	bananapi,bpi-r3)
+	bananapi,bpi-r3|\
+	bananapi,bpi-r3-mini)
 		wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
 		;;
 	cmcc,rax3000m)
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index bd6e775963..53c9b7f259 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -36,7 +36,8 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && macaddr_setbit_la $(macaddr_add $addr 1) > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && echo "$addr" > /sys${DEVPATH}/macaddress
 		;;
-	bananapi,bpi-r3)
+	bananapi,bpi-r3|\
+	bananapi,bpi-r3-mini)
 		addr=$(cat /sys/class/net/eth0/address)
 		[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress



From lede-commits at lists.infradead.org  Sun Apr 28 13:47:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 16:47:52 -0400
Subject: [openwrt/openwrt]  mediatek: bpi-r4: store random MAC addresses for
 the BPi-R4
In-Reply-To: <171433727118.739643.3274074502974128218@git-01.infra.openwrt.org>
References: <171433727118.739643.3274074502974128218@git-01.infra.openwrt.org>
Message-ID: <mailman.31636.1714337276.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5709254690cb4181c2c9aed7c0569b7bafea6118

commit 5709254690cb4181c2c9aed7c0569b7bafea6118
Author: Daniel Golle <daniel at makrotopia.org>
AuthorDate: Sun Apr 28 03:03:43 2024 +0100

    mediatek: bpi-r4: store random MAC addresses for the BPi-R4
    
    Despite coming with multiple I2C EEPROMs supposedly dedicated for that
    purpose, the BPi-R4 does not seem to have factory assigned MAC addresses.
    Hence, just like for all other BPi boards, store a randomly generated
    MAC address on first boot and derive WAN and Wi-Fi MAC addresses from
    that as well. Not perfect, but better than random on every boot.
    
    Signed-off-by: Daniel Golle <daniel at makrotopia.org>
---
 .../mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh  | 3 ++-
 .../arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts        | 2 ++
 target/linux/mediatek/filogic/base-files/etc/board.d/02_network     | 3 ++-
 .../filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac      | 6 ++++++
 4 files changed, 12 insertions(+), 2 deletions(-)

diff --git a/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh b/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh
index f58f709e1c..0afb434c97 100644
--- a/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh
+++ b/target/linux/mediatek/base-files/etc/uci-defaults/99_fwenv-store-ethaddr.sh
@@ -10,7 +10,8 @@ unielec,u7623-02)
 		fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
 	;;
 bananapi,bpi-r3|\
-bananapi,bpi-r3-mini)
+bananapi,bpi-r3-mini|\
+bananapi,bpi-4)
 	[ -z "$(fw_printenv -n ethaddr 2>/dev/null)" ] &&
 		fw_setenv ethaddr "$(cat /sys/class/net/eth0/address)"
 	[ -z "$(fw_printenv -n eth1addr 2>/dev/null)" ] &&
diff --git a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
index deae4378de..74f480e0a1 100644
--- a/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
+++ b/target/linux/mediatek/files-6.1/arch/arm64/boot/dts/mediatek/mt7988a-bananapi-bpi-r4.dts
@@ -17,6 +17,8 @@
 		     "mediatek,mt7988a";
 
 	aliases {
+		ethernet0 = &gmac0;
+		ethernet1 = &gmac1;
 		serial0 = &uart0;
 		led-boot = &led_green;
 		led-failsafe = &led_green;
diff --git a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
index 597754da7b..c9fd8d96e6 100644
--- a/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
+++ b/target/linux/mediatek/filogic/base-files/etc/board.d/02_network
@@ -120,7 +120,8 @@ mediatek_setup_macs()
 
 	case $board in
 	bananapi,bpi-r3|\
-	bananapi,bpi-r3-mini)
+	bananapi,bpi-r3-mini|\
+	bananapi,bpi-r4)
 		wan_mac=$(macaddr_add $(cat /sys/class/net/eth0/address) 1)
 		;;
 	cmcc,rax3000m)
diff --git a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
index 53c9b7f259..62860390eb 100644
--- a/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
+++ b/target/linux/mediatek/filogic/base-files/etc/hotplug.d/ieee80211/11_fix_wifi_mac
@@ -42,6 +42,12 @@ case "$board" in
 		[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
 		[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
 		;;
+	bananapi,bpi-r4)
+		addr=$(cat /sys/class/net/eth0/address)
+		[ "$PHYNBR" = "0" ] && macaddr_add $addr 2 > /sys${DEVPATH}/macaddress
+		[ "$PHYNBR" = "1" ] && macaddr_add $addr 3 > /sys${DEVPATH}/macaddress
+		[ "$PHYNBR" = "2" ] && macaddr_add $addr 4 > /sys${DEVPATH}/macaddress
+		;;
 	cetron,ct3003)
 		addr=$(mtd_get_mac_binary "art" 0)
 		[ "$PHYNBR" = "0" ] && macaddr_add $addr 1 > /sys${DEVPATH}/macaddress



From lede-commits at lists.infradead.org  Sun Apr 28 14:27:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 17:27:27 -0400
Subject: [openwrt/openwrt]  grub2: update to 2.12
In-Reply-To: <171433964740.857637.12151590649122619478@git-01.infra.openwrt.org>
References: <171433964740.857637.12151590649122619478@git-01.infra.openwrt.org>
Message-ID: <mailman.31637.1714339652.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/8968675247d24477912b998914af391f64a9ff69

commit 8968675247d24477912b998914af391f64a9ff69
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Sun Jan 7 03:35:39 2024 +0800

    grub2: update to 2.12
    
    compile tested: x86_64,i386,loongarch64
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
    {Refresh patches}
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/boot/grub2/Makefile                        |  6 ++---
 .../patches/001-add-missing-extra_deps-list.patch  | 31 ++++++++++++++++++++++
 .../boot/grub2/patches/100-grub_setup_root.patch   |  6 ++---
 3 files changed, 37 insertions(+), 6 deletions(-)

diff --git a/package/boot/grub2/Makefile b/package/boot/grub2/Makefile
index f274ce2289..279f2bd3c6 100644
--- a/package/boot/grub2/Makefile
+++ b/package/boot/grub2/Makefile
@@ -6,12 +6,12 @@ include $(TOPDIR)/rules.mk
 include $(INCLUDE_DIR)/kernel.mk
 
 PKG_NAME:=grub
-PKG_VERSION:=2.06
-PKG_RELEASE:=6
+PKG_VERSION:=2.12
+PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.xz
 PKG_SOURCE_URL:=@GNU/grub
-PKG_HASH:=b79ea44af91b93d17cd3fe80bdae6ed43770678a9a5ae192ccea803ebb657ee1
+PKG_HASH:=f3c97391f7c4eaa677a78e090c7e97e6dc47b16f655f04683ebd37bef7fe0faa
 
 PKG_LICENSE:=GPL-3.0-or-later
 PKG_CPE_ID:=cpe:/a:gnu:grub2
diff --git a/package/boot/grub2/patches/001-add-missing-extra_deps-list.patch b/package/boot/grub2/patches/001-add-missing-extra_deps-list.patch
new file mode 100644
index 0000000000..820432c4c8
--- /dev/null
+++ b/package/boot/grub2/patches/001-add-missing-extra_deps-list.patch
@@ -0,0 +1,31 @@
+From 4d4dae6a52b1749642261a15f5dcc1e3d4150b36 Mon Sep 17 00:00:00 2001
+From: Julien Olivain <ju.o at free.fr>
+Date: Fri, 22 Dec 2023 19:02:53 +0100
+Subject: [PATCH] Add missing grub-core/extra_deps.lst file in release tarball
+
+A file is missing in the grub-2.12 release tarballs (both .gz and .xz).
+See [1]. The issue was reported in [2] and fixed upstream in [3].
+
+This patch adds the missing file, on top of the release tarball. This
+patch won't apply on upstream git, since the file is present in the
+source repository. Since the issue is fixed upstream in [3], it is
+expected upcoming releases tarballs will include the file.
+
+The file content was fetched from the upstream git repo:
+https://git.savannah.gnu.org/gitweb/?p=grub.git;a=blob_plain;f=grub-core/extra_deps.lst;hb=refs/tags/grub-2.12
+
+[1] https://ftp.gnu.org/gnu/grub/grub-2.12.tar.xz
+[2] https://lists.gnu.org/archive/html/grub-devel/2023-12/msg00054.html
+[3] https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=b835601c7639ed1890f2d3db91900a8506011a8e
+
+Signed-off-by: Julien Olivain <ju.o at free.fr>
+Upstream: Fixed by: https://git.savannah.gnu.org/gitweb/?p=grub.git;a=commit;h=b835601c7639ed1890f2d3db91900a8506011a8e
+---
+ grub-core/extra_deps.lst | 1 +
+ 1 file changed, 1 insertion(+)
+ create mode 100644 grub-core/extra_deps.lst
+
+--- /dev/null
++++ b/grub-core/extra_deps.lst
+@@ -0,0 +1 @@
++depends bli part_gpt
diff --git a/package/boot/grub2/patches/100-grub_setup_root.patch b/package/boot/grub2/patches/100-grub_setup_root.patch
index f20b310e12..bcaa85afdf 100644
--- a/package/boot/grub2/patches/100-grub_setup_root.patch
+++ b/package/boot/grub2/patches/100-grub_setup_root.patch
@@ -1,6 +1,6 @@
 --- a/include/grub/util/install.h
 +++ b/include/grub/util/install.h
-@@ -198,13 +198,13 @@ grub_install_get_image_target (const cha
+@@ -199,13 +199,13 @@ grub_install_get_image_target (const cha
  void
  grub_util_bios_setup (const char *dir,
  		      const char *boot_file, const char *core_file,
@@ -18,7 +18,7 @@
  
 --- a/util/grub-install.c
 +++ b/util/grub-install.c
-@@ -1721,7 +1721,7 @@ main (int argc, char *argv[])
+@@ -1770,7 +1770,7 @@ main (int argc, char *argv[])
  	if (install_bootsector)
  	  {
  	    grub_util_bios_setup (platdir, "boot.img", "core.img",
@@ -27,7 +27,7 @@
  				  fs_probe, allow_floppy, add_rs_codes,
  				  !grub_install_is_short_mbrgap_supported ());
  
-@@ -1752,7 +1752,7 @@ main (int argc, char *argv[])
+@@ -1801,7 +1801,7 @@ main (int argc, char *argv[])
  	if (install_bootsector)
  	  {
  	    grub_util_sparc_setup (platdir, "boot.img", "core.img",



From lede-commits at lists.infradead.org  Sun Apr 28 14:45:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 17:45:58 -0400
Subject: [openwrt/openwrt]  libunwind: update to 1.8.1
In-Reply-To: <171434075848.903619.5578233551860186999@git-01.infra.openwrt.org>
References: <171434075848.903619.5578233551860186999@git-01.infra.openwrt.org>
Message-ID: <mailman.31638.1714340762.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/f9e3fb59c7e1835c4003457636a5ea269f6ec06d

commit f9e3fb59c7e1835c4003457636a5ea269f6ec06d
Author: Weijie Gao <hackpascal at gmail.com>
AuthorDate: Thu Mar 14 21:56:38 2024 +0800

    libunwind: update to 1.8.1
    
    Rebased patches:
    - 003-fix-missing-ef_reg-defs-with-musl.patch
    - 004-ppc-musl.patch
    
    Signed-off-by: Weijie Gao <hackpascal at gmail.com>
---
 package/libs/libunwind/Makefile                    |   6 +-
 .../003-fix-missing-ef_reg-defs-with-musl.patch    |   2 +-
 package/libs/libunwind/patches/004-ppc-musl.patch  | 200 +++------------------
 3 files changed, 30 insertions(+), 178 deletions(-)

diff --git a/package/libs/libunwind/Makefile b/package/libs/libunwind/Makefile
index c676d501bd..7a82d76663 100644
--- a/package/libs/libunwind/Makefile
+++ b/package/libs/libunwind/Makefile
@@ -9,12 +9,12 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=libunwind
-PKG_VERSION:=1.6.2
+PKG_VERSION:=1.8.1
 PKG_RELEASE:=1
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=@SAVANNAH/$(PKG_NAME)
-PKG_HASH:=4a6aec666991fb45d0889c44aede8ad6eb108071c3554fcdff671f9c94794976
+PKG_SOURCE_URL:=https://github.com/$(PKG_NAME)/$(PKG_NAME)/releases/download/v$(PKG_VERSION)/
+PKG_HASH:=ddf0e32dd5fafe5283198d37e4bf9decf7ba1770b6e7e006c33e6df79e6a6157
 
 PKG_MAINTAINER:=Yousong Zhou <yszhou4tech at gmail.com>
 PKG_LICENSE:=X11
diff --git a/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch b/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch
index 1a26dcd895..c68e4b92cf 100644
--- a/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch
+++ b/package/libs/libunwind/patches/003-fix-missing-ef_reg-defs-with-musl.patch
@@ -1,6 +1,6 @@
 --- a/include/libunwind-mips.h
 +++ b/include/libunwind-mips.h
-@@ -114,6 +114,42 @@ typedef enum
+@@ -121,6 +121,42 @@ typedef enum
    }
  mips_regnum_t;
  
diff --git a/package/libs/libunwind/patches/004-ppc-musl.patch b/package/libs/libunwind/patches/004-ppc-musl.patch
index f0f46258ac..5ea79e1462 100644
--- a/package/libs/libunwind/patches/004-ppc-musl.patch
+++ b/package/libs/libunwind/patches/004-ppc-musl.patch
@@ -1,6 +1,6 @@
 --- a/include/libunwind-ppc32.h
 +++ b/include/libunwind-ppc32.h
-@@ -74,6 +74,88 @@ typedef int64_t unw_sword_t;
+@@ -81,6 +81,88 @@ typedef int64_t unw_sword_t;
  
  typedef long double unw_tdep_fpreg_t;
  
@@ -91,7 +91,7 @@
      UNW_PPC32_R0,
 --- a/include/libunwind-ppc64.h
 +++ b/include/libunwind-ppc64.h
-@@ -81,6 +81,88 @@ typedef struct {
+@@ -88,6 +88,88 @@ typedef struct {
      uint64_t halves[2];
  } unw_tdep_vreg_t;
  
@@ -182,7 +182,7 @@
      UNW_PPC64_R0,
 --- a/src/ppc32/Ginit.c
 +++ b/src/ppc32/Ginit.c
-@@ -46,14 +46,19 @@ static void *
+@@ -46,10 +46,15 @@ static void *
  uc_addr (ucontext_t *uc, int reg)
  {
    void *addr;
@@ -193,191 +193,43 @@
 +#endif
  
    if ((unsigned) (reg - UNW_PPC32_R0) < 32)
+ #if defined(__linux__)
 -    addr = &uc->uc_mcontext.uc_regs->gregs[reg - UNW_PPC32_R0];
 +    addr = &mc->gregs[reg - UNW_PPC32_R0];
- 
-   else
+ #elif defined(__FreeBSD__)
+     addr = &uc->uc_mcontext.mc_gpr[reg - UNW_PPC32_R0];
+ #endif
+@@ -58,7 +63,7 @@ uc_addr (ucontext_t *uc, int reg)
    if ( ((unsigned) (reg - UNW_PPC32_F0) < 32) &&
         ((unsigned) (reg - UNW_PPC32_F0) >= 0) )
+ #if defined(__linux__)
 -    addr = &uc->uc_mcontext.uc_regs->fpregs.fpregs[reg - UNW_PPC32_F0];
 +    addr = &mc->fpregs.fpregs[reg - UNW_PPC32_F0];
- 
-   else
-     {
-@@ -76,7 +81,7 @@ uc_addr (ucontext_t *uc, int reg)
-         default:
+  #elif defined(__FreeBSD__)
+     addr = &uc->uc_mcontext.mc_fpreg[reg - UNW_PPC32_F0];
+ #endif
+@@ -85,7 +90,7 @@ uc_addr (ucontext_t *uc, int reg)
            return NULL;
          }
+ #if defined(__linux__)
 -      addr = &uc->uc_mcontext.uc_regs->gregs[gregs_idx];
 +      addr = &mc->gregs[gregs_idx];
-     }
-   return addr;
- }
+ #elif defined(__FreeBSD__)
+       addr = &uc->uc_mcontext.mc_gpr[gregs_idx];
+ #endif
 --- a/src/ppc32/ucontext_i.h
 +++ b/src/ppc32/ucontext_i.h
-@@ -46,83 +46,89 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
-    various structure members. */
- static ucontext_t dmy_ctxt UNUSED;
+@@ -44,8 +44,13 @@ WITH THE SOFTWARE OR THE USE OR OTHER DE
+ //#define MQ_IDX                36
+ #define LINK_IDX        36
  
--#define UC_MCONTEXT_GREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[0] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[1] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[2] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[3] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[4] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[5] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[6] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[7] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[8] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[9] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[10] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[11] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[12] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[13] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[14] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[15] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[16] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[17] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[18] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[19] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[20] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[21] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[22] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[23] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[24] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[25] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[26] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[27] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[28] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[29] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[30] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[31] - (void *)&dmy_ctxt)
 +#ifdef __GLIBC__
-+#define UC_MCONTEXT_OFFSET(field) ((void *)&dmy_ctxt.uc_mcontext.uc_regs->field - (void *)&dmy_ctxt)
+ #define _UC_MCONTEXT_GPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[x] - (void *)&dmy_ctxt) )
+ #define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[x] - (void *)&dmy_ctxt) )
 +#else
-+#define UC_MCONTEXT_OFFSET(field) ((void *)&dmy_ctxt.uc_mcontext.field - (void *)&dmy_ctxt)
++#define _UC_MCONTEXT_GPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.gregs[x] - (void *)&dmy_ctxt) )
++#define _UC_MCONTEXT_FPR(x) ( ((void *)&dmy_ctxt.uc_mcontext.fpregs.fpregs[x] - (void *)&dmy_ctxt) )
 +#endif
-+
-+#define UC_MCONTEXT_GREGS_R0 UC_MCONTEXT_OFFSET(gregs[0])
-+#define UC_MCONTEXT_GREGS_R1 UC_MCONTEXT_OFFSET(gregs[1])
-+#define UC_MCONTEXT_GREGS_R2 UC_MCONTEXT_OFFSET(gregs[2])
-+#define UC_MCONTEXT_GREGS_R3 UC_MCONTEXT_OFFSET(gregs[3])
-+#define UC_MCONTEXT_GREGS_R4 UC_MCONTEXT_OFFSET(gregs[4])
-+#define UC_MCONTEXT_GREGS_R5 UC_MCONTEXT_OFFSET(gregs[5])
-+#define UC_MCONTEXT_GREGS_R6 UC_MCONTEXT_OFFSET(gregs[6])
-+#define UC_MCONTEXT_GREGS_R7 UC_MCONTEXT_OFFSET(gregs[7])
-+#define UC_MCONTEXT_GREGS_R8 UC_MCONTEXT_OFFSET(gregs[8])
-+#define UC_MCONTEXT_GREGS_R9 UC_MCONTEXT_OFFSET(gregs[9])
-+#define UC_MCONTEXT_GREGS_R10 UC_MCONTEXT_OFFSET(gregs[10])
-+#define UC_MCONTEXT_GREGS_R11 UC_MCONTEXT_OFFSET(gregs[11])
-+#define UC_MCONTEXT_GREGS_R12 UC_MCONTEXT_OFFSET(gregs[12])
-+#define UC_MCONTEXT_GREGS_R13 UC_MCONTEXT_OFFSET(gregs[13])
-+#define UC_MCONTEXT_GREGS_R14 UC_MCONTEXT_OFFSET(gregs[14])
-+#define UC_MCONTEXT_GREGS_R15 UC_MCONTEXT_OFFSET(gregs[15])
-+#define UC_MCONTEXT_GREGS_R16 UC_MCONTEXT_OFFSET(gregs[16])
-+#define UC_MCONTEXT_GREGS_R17 UC_MCONTEXT_OFFSET(gregs[17])
-+#define UC_MCONTEXT_GREGS_R18 UC_MCONTEXT_OFFSET(gregs[18])
-+#define UC_MCONTEXT_GREGS_R19 UC_MCONTEXT_OFFSET(gregs[19])
-+#define UC_MCONTEXT_GREGS_R20 UC_MCONTEXT_OFFSET(gregs[20])
-+#define UC_MCONTEXT_GREGS_R21 UC_MCONTEXT_OFFSET(gregs[21])
-+#define UC_MCONTEXT_GREGS_R22 UC_MCONTEXT_OFFSET(gregs[22])
-+#define UC_MCONTEXT_GREGS_R23 UC_MCONTEXT_OFFSET(gregs[23])
-+#define UC_MCONTEXT_GREGS_R24 UC_MCONTEXT_OFFSET(gregs[24])
-+#define UC_MCONTEXT_GREGS_R25 UC_MCONTEXT_OFFSET(gregs[25])
-+#define UC_MCONTEXT_GREGS_R26 UC_MCONTEXT_OFFSET(gregs[26])
-+#define UC_MCONTEXT_GREGS_R27 UC_MCONTEXT_OFFSET(gregs[27])
-+#define UC_MCONTEXT_GREGS_R28 UC_MCONTEXT_OFFSET(gregs[28])
-+#define UC_MCONTEXT_GREGS_R29 UC_MCONTEXT_OFFSET(gregs[29])
-+#define UC_MCONTEXT_GREGS_R30 UC_MCONTEXT_OFFSET(gregs[30])
-+#define UC_MCONTEXT_GREGS_R31 UC_MCONTEXT_OFFSET(gregs[31])
- 
--#define UC_MCONTEXT_GREGS_MSR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[MSR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_ORIG_GPR3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[ORIG_GPR3_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_CTR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CTR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_LINK ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[LINK_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_XER ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[XER_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_CCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[CCR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_SOFTE ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[SOFTE_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_TRAP ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[TRAP_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_DAR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DAR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_DSISR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[DSISR_IDX] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_GREGS_RESULT ((void *)&dmy_ctxt.uc_mcontext.uc_regs->gregs[RESULT_IDX] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_GREGS_MSR UC_MCONTEXT_OFFSET(gregs[MSR_IDX])
-+#define UC_MCONTEXT_GREGS_ORIG_GPR3 UC_MCONTEXT_OFFSET(gregs[ORIG_GPR3_IDX])
-+#define UC_MCONTEXT_GREGS_CTR UC_MCONTEXT_OFFSET(gregs[CTR_IDX])
-+#define UC_MCONTEXT_GREGS_LINK UC_MCONTEXT_OFFSET(gregs[LINK_IDX])
-+#define UC_MCONTEXT_GREGS_XER UC_MCONTEXT_OFFSET(gregs[XER_IDX])
-+#define UC_MCONTEXT_GREGS_CCR UC_MCONTEXT_OFFSET(gregs[CCR_IDX])
-+#define UC_MCONTEXT_GREGS_SOFTE UC_MCONTEXT_OFFSET(gregs[SOFTE_IDX])
-+#define UC_MCONTEXT_GREGS_TRAP UC_MCONTEXT_OFFSET(gregs[TRAP_IDX])
-+#define UC_MCONTEXT_GREGS_DAR UC_MCONTEXT_OFFSET(gregs[DAR_IDX])
-+#define UC_MCONTEXT_GREGS_DSISR UC_MCONTEXT_OFFSET(gregs[DSISR_IDX])
-+#define UC_MCONTEXT_GREGS_RESULT UC_MCONTEXT_OFFSET(gregs[RESULT_IDX])
- 
--#define UC_MCONTEXT_FREGS_R0 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[0] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R1 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[1] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R2 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[2] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R3 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[3] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R4 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[4] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R5 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[5] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R6 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[6] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R7 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[7] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R8 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[8] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R9 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[9] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R10 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[10] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R11 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[11] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R12 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[12] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R13 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[13] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R14 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[14] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R15 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[15] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R16 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[16] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R17 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[17] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R18 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[18] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R19 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[19] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R20 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[20] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R21 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[21] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R22 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[22] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R23 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[23] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R24 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[24] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R25 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[25] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R26 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[26] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R27 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[27] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R28 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[28] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R29 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[29] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R30 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[30] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_R31 ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[31] - (void *)&dmy_ctxt)
--#define UC_MCONTEXT_FREGS_FPSCR ((void *)&dmy_ctxt.uc_mcontext.uc_regs->fpregs.fpregs[32] - (void *)&dmy_ctxt)
-+#define UC_MCONTEXT_FREGS_R0 UC_MCONTEXT_OFFSET(fpregs.fpregs[0])
-+#define UC_MCONTEXT_FREGS_R1 UC_MCONTEXT_OFFSET(fpregs.fpregs[1])
-+#define UC_MCONTEXT_FREGS_R2 UC_MCONTEXT_OFFSET(fpregs.fpregs[2])
-+#define UC_MCONTEXT_FREGS_R3 UC_MCONTEXT_OFFSET(fpregs.fpregs[3])
-+#define UC_MCONTEXT_FREGS_R4 UC_MCONTEXT_OFFSET(fpregs.fpregs[4])
-+#define UC_MCONTEXT_FREGS_R5 UC_MCONTEXT_OFFSET(fpregs.fpregs[5])
-+#define UC_MCONTEXT_FREGS_R6 UC_MCONTEXT_OFFSET(fpregs.fpregs[6])
-+#define UC_MCONTEXT_FREGS_R7 UC_MCONTEXT_OFFSET(fpregs.fpregs[7])
-+#define UC_MCONTEXT_FREGS_R8 UC_MCONTEXT_OFFSET(fpregs.fpregs[8])
-+#define UC_MCONTEXT_FREGS_R9 UC_MCONTEXT_OFFSET(fpregs.fpregs[9])
-+#define UC_MCONTEXT_FREGS_R10 UC_MCONTEXT_OFFSET(fpregs.fpregs[10])
-+#define UC_MCONTEXT_FREGS_R11 UC_MCONTEXT_OFFSET(fpregs.fpregs[11])
-+#define UC_MCONTEXT_FREGS_R12 UC_MCONTEXT_OFFSET(fpregs.fpregs[12])
-+#define UC_MCONTEXT_FREGS_R13 UC_MCONTEXT_OFFSET(fpregs.fpregs[13])
-+#define UC_MCONTEXT_FREGS_R14 UC_MCONTEXT_OFFSET(fpregs.fpregs[14])
-+#define UC_MCONTEXT_FREGS_R15 UC_MCONTEXT_OFFSET(fpregs.fpregs[15])
-+#define UC_MCONTEXT_FREGS_R16 UC_MCONTEXT_OFFSET(fpregs.fpregs[16])
-+#define UC_MCONTEXT_FREGS_R17 UC_MCONTEXT_OFFSET(fpregs.fpregs[17])
-+#define UC_MCONTEXT_FREGS_R18 UC_MCONTEXT_OFFSET(fpregs.fpregs[18])
-+#define UC_MCONTEXT_FREGS_R19 UC_MCONTEXT_OFFSET(fpregs.fpregs[19])
-+#define UC_MCONTEXT_FREGS_R20 UC_MCONTEXT_OFFSET(fpregs.fpregs[20])
-+#define UC_MCONTEXT_FREGS_R21 UC_MCONTEXT_OFFSET(fpregs.fpregs[21])
-+#define UC_MCONTEXT_FREGS_R22 UC_MCONTEXT_OFFSET(fpregs.fpregs[22])
-+#define UC_MCONTEXT_FREGS_R23 UC_MCONTEXT_OFFSET(fpregs.fpregs[23])
-+#define UC_MCONTEXT_FREGS_R24 UC_MCONTEXT_OFFSET(fpregs.fpregs[24])
-+#define UC_MCONTEXT_FREGS_R25 UC_MCONTEXT_OFFSET(fpregs.fpregs[25])
-+#define UC_MCONTEXT_FREGS_R26 UC_MCONTEXT_OFFSET(fpregs.fpregs[26])
-+#define UC_MCONTEXT_FREGS_R27 UC_MCONTEXT_OFFSET(fpregs.fpregs[27])
-+#define UC_MCONTEXT_FREGS_R28 UC_MCONTEXT_OFFSET(fpregs.fpregs[28])
-+#define UC_MCONTEXT_FREGS_R29 UC_MCONTEXT_OFFSET(fpregs.fpregs[29])
-+#define UC_MCONTEXT_FREGS_R30 UC_MCONTEXT_OFFSET(fpregs.fpregs[30])
-+#define UC_MCONTEXT_FREGS_R31 UC_MCONTEXT_OFFSET(fpregs.fpregs[31])
-+#define UC_MCONTEXT_FREGS_FPSCR UC_MCONTEXT_OFFSET(fpregs.fpregs[32])
  
- #endif
+ /* These are dummy structures used only for obtaining the offsets of the
+    various structure members. */



From lede-commits at lists.infradead.org  Sun Apr 28 14:52:09 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 17:52:09 -0400
Subject: [openwrt/openwrt]  uqmi: set dangling-pointer as error
In-Reply-To: <171434112855.922984.13675354952606263983@git-01.infra.openwrt.org>
References: <171434112855.922984.13675354952606263983@git-01.infra.openwrt.org>
Message-ID: <mailman.31641.1714341135.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/30245a869e384f94bb297563c1f43c8c7c9a4b20

commit 30245a869e384f94bb297563c1f43c8c7c9a4b20
Author: Jean Thomas <jean.thomas at wifirst.fr>
AuthorDate: Wed Apr 24 13:12:11 2024 +0200

    uqmi: set dangling-pointer as error
    
    With "ebfe8b4 CMakeLists: set no-dangling-pointer" the compilation
    option is set in uqmi, and can therefore be removed from no-error.
    
    Signed-off-by: Jean Thomas <jean.thomas at wifirst.fr>
---
 package/network/utils/uqmi/Makefile | 1 -
 1 file changed, 1 deletion(-)

diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile
index 78a74841ad..d4ed1e4494 100644
--- a/package/network/utils/uqmi/Makefile
+++ b/package/network/utils/uqmi/Makefile
@@ -34,7 +34,6 @@ endef
 
 TARGET_CFLAGS += \
 	-I$(STAGING_DIR)/usr/include \
-	-Wno-error=dangling-pointer \
 	-Wno-error=maybe-uninitialized
 
 CMAKE_OPTIONS += \



From lede-commits at lists.infradead.org  Sun Apr 28 14:52:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 17:52:08 -0400
Subject: [openwrt/openwrt]  uqmi: update to git HEAD
In-Reply-To: <171434112855.922984.13675354952606263983@git-01.infra.openwrt.org>
References: <171434112855.922984.13675354952606263983@git-01.infra.openwrt.org>
Message-ID: <mailman.31642.1714341135.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4d058d5e4d544ef489a86b75ade7ea5603730b16

commit 4d058d5e4d544ef489a86b75ade7ea5603730b16
Author: Jean Thomas <jean.thomas at wifirst.fr>
AuthorDate: Wed Apr 24 11:36:26 2024 +0200

    uqmi: update to git HEAD
    
    e7207be uqmi: print radio interfaces in serving system command
    6ef41d6 uqmi: create function to print radio interface string
    e25d042 uqmi: Add basic 5G NR support
    3e782be uqmi: sync data from libqmi project
    368d46c uqmi: support C reserved keywords in upstream JSON files
    02e42c0 reorganize source code in common and uqmi specific parts
    4591f0a .gitignore build/ directories
    2b57ee1 uqmi: commands-uim: fix uninitialized use of card_application_state
    7c77e77 data/code-gen: add support for indications
    ddbf864 qmi-struct.h: add missing includes
    5320c1d move qmi_get_error_str to into utils.c
    1503bc7 dev.c: add missing import strings.h
    bae945f commands-nas: add missing includes
    9ffd0e2 commands: make `struct blob_buf status` public
    a4fbdcc commands-nas: fix gcc warning
    8ff632a dev.c: add comment to qmi_request_wait()
    a043a74 CMakeLists: refactor SOURCES variable to allow later adding uqmid
    ebfe8b4 CMakeLists: set no-dangling-pointer
    c47125d CMakeLists: improve generated files
    0f64b69 CMakeLists: update cmake minimum version to 3.5
    
    As the built uqmi binary is now moved to a dedicated directory,
    update the Makefile accordingly.
    
    Signed-off-by: Jean Thomas <jean.thomas at wifirst.fr>
---
 package/network/utils/uqmi/Makefile | 8 ++++----
 1 file changed, 4 insertions(+), 4 deletions(-)

diff --git a/package/network/utils/uqmi/Makefile b/package/network/utils/uqmi/Makefile
index 90ba080a6f..78a74841ad 100644
--- a/package/network/utils/uqmi/Makefile
+++ b/package/network/utils/uqmi/Makefile
@@ -5,9 +5,9 @@ PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_URL=$(PROJECT_GIT)/project/uqmi.git
-PKG_SOURCE_DATE:=2024-01-16
-PKG_SOURCE_VERSION:=c3488b831ce6285c8107704156b9b8ed7d59deb3
-PKG_MIRROR_HASH:=1aa576e46dfb6528ef12f5fd1b626585d565bbcf9119cde302cc34d732c75076
+PKG_SOURCE_DATE:=2024-04-24
+PKG_SOURCE_VERSION:=e7207bec95f02f2f7a98254d642186a082af838d
+PKG_MIRROR_HASH:=53e83720472f07cb9bb3e2b68ea6c379fc8c43ed8f93227bcb3d06c94a32a669
 PKG_MAINTAINER:=Matti Laakso <malaakso at elisanet.fi>
 
 PKG_LICENSE:=GPL-2.0
@@ -42,7 +42,7 @@ CMAKE_OPTIONS += \
 
 define Package/uqmi/install
 	$(INSTALL_DIR) $(1)/sbin
-	$(INSTALL_BIN) $(PKG_BUILD_DIR)/uqmi $(1)/sbin/
+	$(INSTALL_BIN) $(PKG_BUILD_DIR)/uqmi/uqmi $(1)/sbin/
 	$(CP) ./files/* $(1)/
 endef
 



From lede-commits at lists.infradead.org  Sun Apr 28 15:25:55 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 18:25:55 -0400
Subject: [openwrt/openwrt]  scripts/kernel_bump: Fix commit text formatting
In-Reply-To: <171434315570.1013829.11652838099889325802@git-01.infra.openwrt.org>
References: <171434315570.1013829.11652838099889325802@git-01.infra.openwrt.org>
Message-ID: <mailman.31643.1714343160.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/66252aa89255acf4082bf789f90eebeffb42abcc

commit 66252aa89255acf4082bf789f90eebeffb42abcc
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Fri Apr 19 21:42:53 2024 -0700

    scripts/kernel_bump: Fix commit text formatting
    
    Text of a commit message body should wrap at 75 characters. Manual commits
    are expected to do so, but automated commits *must* do so to avoid adding
    repeated ugly commits.
    
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 scripts/kernel_bump.sh | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/scripts/kernel_bump.sh b/scripts/kernel_bump.sh
index 0a123ea95a..b1c17d6c39 100755
--- a/scripts/kernel_bump.sh
+++ b/scripts/kernel_bump.sh
@@ -167,7 +167,7 @@ bump_kernel()
 	git commit \
 		--signoff \
 		--message "kernel/${platform_name}: Restore kernel files for v${source_version}" \
-		--message "$(printf "This is an automatically generated commit which aids following Kernel patch history,\nas git will see the move and copy as a rename thus defeating the purpose.\n\nSee: https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html\nfor the original discussion.")"
+		--message "$(printf "This is an automatically generated commit which aids following Kernel patch\nhistory, as git will see the move and copy as a rename thus defeating the\npurpose.\n\nFor the original discussion see:\nhttps://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html")"
 	git switch "${initial_branch:?Unable to switch back to original branch. Quitting.}"
 	GIT_EDITOR=true git merge --no-ff '__openwrt_kernel_files_mover'
 	git branch --delete '__openwrt_kernel_files_mover'



From lede-commits at lists.infradead.org  Sun Apr 28 15:25:56 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 18:25:56 -0400
Subject: [openwrt/openwrt]  kernel/malta: Create kernel files for v6.6 (from
 v6.1)
In-Reply-To: <171434315570.1013829.11652838099889325802@git-01.infra.openwrt.org>
References: <171434315570.1013829.11652838099889325802@git-01.infra.openwrt.org>
Message-ID: <mailman.31644.1714343160.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/3d0bf9091f9c336cc44baa85382e7880e02f2f1c

commit 3d0bf9091f9c336cc44baa85382e7880e02f2f1c
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Fri Apr 19 19:31:42 2024 -0700

    kernel/malta: Create kernel files for v6.6 (from v6.1)
    
    This is an automatically generated commit.
    
    When doing `git bisect`, consider `git bisect --skip`.
    
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 target/linux/malta/{config-6.1 => config-6.6} | 0
 1 file changed, 0 insertions(+), 0 deletions(-)

diff --git a/target/linux/malta/config-6.1 b/target/linux/malta/config-6.6
similarity index 100%
rename from target/linux/malta/config-6.1
rename to target/linux/malta/config-6.6



From lede-commits at lists.infradead.org  Sun Apr 28 15:25:57 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 18:25:57 -0400
Subject: [openwrt/openwrt]  kernel/malta: Restore kernel files for v6.1
In-Reply-To: <171434315570.1013829.11652838099889325802@git-01.infra.openwrt.org>
References: <171434315570.1013829.11652838099889325802@git-01.infra.openwrt.org>
Message-ID: <mailman.31645.1714343162.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a18920edcc7fe6aef1dbf8513efd613051800af1

commit a18920edcc7fe6aef1dbf8513efd613051800af1
Author: Tony Ambardar <itugrok at yahoo.com>
AuthorDate: Fri Apr 19 19:31:42 2024 -0700

    kernel/malta: Restore kernel files for v6.1
    
    This is an automatically generated commit which aids following Kernel patch
    history, as git will see the move and copy as a rename thus defeating the
    purpose.
    
    For the original discussion see:
    https://lists.openwrt.org/pipermail/openwrt-devel/2023-October/041673.html
    
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 target/linux/malta/config-6.1 | 265 ++++++++++++++++++++++++++++++++++++++++++
 1 file changed, 265 insertions(+)

diff --git a/target/linux/malta/config-6.1 b/target/linux/malta/config-6.1
new file mode 100644
index 0000000000..9ce439ee38
--- /dev/null
+++ b/target/linux/malta/config-6.1
@@ -0,0 +1,265 @@
+CONFIG_ARCH_32BIT_OFF_T=y
+CONFIG_ARCH_KEEP_MEMBLOCK=y
+CONFIG_ARCH_MAY_HAVE_PC_FDC=y
+CONFIG_ARCH_MIGHT_HAVE_PC_PARPORT=y
+CONFIG_ARCH_MIGHT_HAVE_PC_SERIO=y
+CONFIG_ARCH_MMAP_RND_BITS_MAX=15
+CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=15
+CONFIG_ATA=y
+CONFIG_ATA_PIIX=y
+CONFIG_BLK_DEV_BSG=y
+CONFIG_BLK_DEV_BSGLIB=y
+CONFIG_BLK_DEV_BSG_COMMON=y
+# CONFIG_BLK_DEV_INITRD is not set
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=16
+CONFIG_BLK_DEV_RAM_SIZE=4096
+CONFIG_BLK_DEV_SD=y
+CONFIG_BLK_MQ_PCI=y
+CONFIG_BOARD_SCACHE=y
+CONFIG_BOOT_ELF32=y
+CONFIG_BUILTIN_DTB=y
+CONFIG_CEVT_R4K=y
+CONFIG_CLKBLD_I8253=y
+CONFIG_CLKEVT_I8253=y
+CONFIG_CLKSRC_I8253=y
+CONFIG_CLKSRC_MIPS_GIC=y
+CONFIG_CLOCKSOURCE_WATCHDOG=y
+CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
+CONFIG_CLONE_BACKWARDS=y
+CONFIG_COMMON_CLK=y
+CONFIG_COMPAT_32BIT_TIME=y
+CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CPU_GENERIC_DUMP_TLB=y
+CONFIG_CPU_HAS_PREFETCH=y
+# CONFIG_CPU_HAS_SMARTMIPS is not set
+CONFIG_CPU_HAS_SYNC=y
+# CONFIG_CPU_MICROMIPS is not set
+# CONFIG_CPU_MIPS32 is not set
+# CONFIG_CPU_MIPS32_3_5_FEATURES is not set
+# CONFIG_CPU_MIPS32_R1 is not set
+# CONFIG_CPU_MIPS32_R2 is not set
+# CONFIG_CPU_MIPS32_R5 is not set
+# CONFIG_CPU_MIPS32_R5_FEATURES is not set
+# CONFIG_CPU_MIPS32_R6 is not set
+# CONFIG_CPU_MIPS64_R1 is not set
+# CONFIG_CPU_MIPS64_R2 is not set
+# CONFIG_CPU_MIPS64_R6 is not set
+# CONFIG_CPU_MIPSR1 is not set
+# CONFIG_CPU_MIPSR2 is not set
+# CONFIG_CPU_MIPSR2_IRQ_EI is not set
+# CONFIG_CPU_MIPSR2_IRQ_VI is not set
+CONFIG_CPU_NEEDS_NO_SMARTMIPS_OR_MICROMIPS=y
+# CONFIG_CPU_NEVADA is not set
+CONFIG_CPU_R4K_CACHE_TLB=y
+# CONFIG_CPU_RM7000 is not set
+CONFIG_CPU_RMAP=y
+CONFIG_CPU_SUPPORTS_32BIT_KERNEL=y
+CONFIG_CPU_SUPPORTS_HIGHMEM=y
+CONFIG_CRC16=y
+CONFIG_CRYPTO_CRC32=y
+CONFIG_CRYPTO_CRC32C=y
+CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
+CONFIG_CRYPTO_RNG2=y
+CONFIG_CSRC_R4K=y
+CONFIG_DMA_NONCOHERENT=y
+CONFIG_DNOTIFY=y
+CONFIG_DTC=y
+CONFIG_DUMMY_CONSOLE=y
+CONFIG_EXT4_FS=y
+CONFIG_F2FS_FS=y
+CONFIG_FS_IOMAP=y
+CONFIG_FS_MBCACHE=y
+CONFIG_FS_POSIX_ACL=y
+CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_GENERIC_ATOMIC64=y
+CONFIG_GENERIC_CLOCKEVENTS=y
+CONFIG_GENERIC_CMOS_UPDATE=y
+CONFIG_GENERIC_CPU_AUTOPROBE=y
+CONFIG_GENERIC_FIND_FIRST_BIT=y
+CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IOMAP=y
+CONFIG_GENERIC_IRQ_CHIP=y
+CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
+CONFIG_GENERIC_IRQ_SHOW=y
+CONFIG_GENERIC_ISA_DMA=y
+CONFIG_GENERIC_LIB_ASHLDI3=y
+CONFIG_GENERIC_LIB_ASHRDI3=y
+CONFIG_GENERIC_LIB_CMPDI2=y
+CONFIG_GENERIC_LIB_LSHRDI3=y
+CONFIG_GENERIC_LIB_UCMPDI2=y
+CONFIG_GENERIC_PCI_IOMAP=y
+CONFIG_GENERIC_SCHED_CLOCK=y
+CONFIG_GENERIC_SMP_IDLE_THREAD=y
+CONFIG_GENERIC_TIME_VSYSCALL=y
+CONFIG_GLOB=y
+CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_HARDWARE_WATCHPOINTS=y
+CONFIG_HAS_DMA=y
+CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT_MAP=y
+CONFIG_HW_CONSOLE=y
+CONFIG_I8253=y
+CONFIG_I8253_LOCK=y
+CONFIG_I8259=y
+CONFIG_INPUT=y
+CONFIG_INPUT_MOUSEDEV=y
+CONFIG_INPUT_MOUSEDEV_PSAUX=y
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=1024
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=768
+CONFIG_IRQCHIP=y
+CONFIG_IRQ_DOMAIN=y
+CONFIG_IRQ_DOMAIN_HIERARCHY=y
+CONFIG_IRQ_FORCED_THREADING=y
+CONFIG_IRQ_MIPS_CPU=y
+CONFIG_IRQ_WORK=y
+CONFIG_ISA_DMA_API=y
+CONFIG_JBD2=y
+CONFIG_JFFS2_FS_POSIX_ACL=y
+CONFIG_JFFS2_FS_SECURITY=y
+CONFIG_KALLSYMS=y
+CONFIG_KERNEL_GZIP=y
+# CONFIG_KERNEL_XZ is not set
+CONFIG_LIBFDT=y
+CONFIG_LOCK_DEBUGGING_SUPPORT=y
+CONFIG_MD=y
+CONFIG_MEMFD_CREATE=y
+CONFIG_MFD_SYSCON=y
+CONFIG_MIGRATION=y
+CONFIG_MIPS=y
+CONFIG_MIPS_ASID_BITS=8
+CONFIG_MIPS_ASID_SHIFT=0
+CONFIG_MIPS_BONITO64=y
+CONFIG_MIPS_CLOCK_VSYSCALL=y
+CONFIG_MIPS_CM=y
+CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
+CONFIG_MIPS_CPC=y
+CONFIG_MIPS_CPU_SCACHE=y
+CONFIG_MIPS_EBPF_JIT=y
+CONFIG_MIPS_EXTERNAL_TIMER=y
+CONFIG_MIPS_GIC=y
+CONFIG_MIPS_L1_CACHE_SHIFT=6
+CONFIG_MIPS_L1_CACHE_SHIFT_6=y
+CONFIG_MIPS_LD_CAN_LINK_VDSO=y
+CONFIG_MIPS_MALTA=y
+CONFIG_MIPS_MSC=y
+CONFIG_MIPS_MT=y
+CONFIG_MIPS_MT_FPAFF=y
+CONFIG_MIPS_MT_SMP=y
+CONFIG_MIPS_NO_APPENDED_DTB=y
+CONFIG_MIPS_NR_CPU_NR_MAP=2
+CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
+CONFIG_MODULES_USE_ELF_REL=y
+CONFIG_MODULE_FORCE_UNLOAD=y
+CONFIG_MTD_CFI_STAA=y
+# CONFIG_MTD_COMPLEX_MAPPINGS is not set
+CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NLS=y
+CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
+CONFIG_NO_HZ=y
+CONFIG_NO_HZ_COMMON=y
+CONFIG_NO_HZ_IDLE=y
+CONFIG_NR_CPUS=2
+CONFIG_NVMEM=y
+CONFIG_OF=y
+CONFIG_OF_ADDRESS=y
+CONFIG_OF_EARLY_FLATTREE=y
+CONFIG_OF_FLATTREE=y
+CONFIG_OF_IRQ=y
+CONFIG_OF_KOBJ=y
+CONFIG_PADATA=y
+# CONFIG_PARTITION_ADVANCED is not set
+CONFIG_PATA_LEGACY=y
+CONFIG_PATA_TIMINGS=y
+CONFIG_PCI=y
+CONFIG_PCI_DOMAINS=y
+CONFIG_PCI_DRIVERS_LEGACY=y
+CONFIG_PCI_GT64XXX_PCI0=y
+CONFIG_PCSPKR_PLATFORM=y
+CONFIG_PERF_USE_VMALLOC=y
+CONFIG_PGTABLE_LEVELS=2
+CONFIG_POWER_RESET=y
+CONFIG_POWER_RESET_PIIX4_POWEROFF=y
+CONFIG_POWER_RESET_SYSCON=y
+CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_PROC_PAGE_MONITOR=y
+CONFIG_PTP_1588_CLOCK_OPTIONAL=y
+CONFIG_QFMT_V2=y
+CONFIG_QUEUED_RWLOCKS=y
+CONFIG_QUEUED_SPINLOCKS=y
+CONFIG_QUOTA=y
+CONFIG_QUOTACTL=y
+CONFIG_QUOTA_TREE=y
+CONFIG_RATIONAL=y
+CONFIG_REGMAP=y
+CONFIG_REGMAP_MMIO=y
+CONFIG_RELAY=y
+CONFIG_RFS_ACCEL=y
+CONFIG_RPS=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_MC146818_LIB=y
+CONFIG_SATA_HOST=y
+CONFIG_SCSI=y
+CONFIG_SCSI_COMMON=y
+CONFIG_SECCOMP=y
+CONFIG_SECCOMP_FILTER=y
+CONFIG_SERIAL_8250_NR_UARTS=4
+CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIO=y
+CONFIG_SERIO_SERPORT=y
+CONFIG_SG_POOL=y
+CONFIG_SMP=y
+CONFIG_SMP_UP=y
+CONFIG_SOCK_RX_QUEUE_MAPPING=y
+CONFIG_SRCU=y
+CONFIG_SWAP_IO_SPACE=y
+CONFIG_SYNC_R4K=y
+CONFIG_SYSCTL_EXCEPTION_TRACE=y
+CONFIG_SYSFS_DEPRECATED=y
+CONFIG_SYSFS_DEPRECATED_V2=y
+CONFIG_SYS_HAS_CPU_MIPS32_R1=y
+CONFIG_SYS_HAS_CPU_MIPS32_R2=y
+CONFIG_SYS_HAS_CPU_MIPS32_R3_5=y
+CONFIG_SYS_HAS_CPU_MIPS32_R5=y
+CONFIG_SYS_HAS_CPU_MIPS32_R6=y
+CONFIG_SYS_HAS_CPU_MIPS64_R1=y
+CONFIG_SYS_HAS_CPU_MIPS64_R2=y
+CONFIG_SYS_HAS_CPU_MIPS64_R6=y
+CONFIG_SYS_HAS_CPU_NEVADA=y
+CONFIG_SYS_HAS_CPU_RM7000=y
+CONFIG_SYS_SUPPORTS_32BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_64BIT_KERNEL=y
+CONFIG_SYS_SUPPORTS_ARBIT_HZ=y
+CONFIG_SYS_SUPPORTS_BIG_ENDIAN=y
+CONFIG_SYS_SUPPORTS_HIGHMEM=y
+CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
+CONFIG_SYS_SUPPORTS_MICROMIPS=y
+CONFIG_SYS_SUPPORTS_MIPS16=y
+CONFIG_SYS_SUPPORTS_MIPS_CMP=y
+CONFIG_SYS_SUPPORTS_MIPS_CPS=y
+CONFIG_SYS_SUPPORTS_MULTITHREADING=y
+CONFIG_SYS_SUPPORTS_RELOCATABLE=y
+CONFIG_SYS_SUPPORTS_SCHED_SMT=y
+CONFIG_SYS_SUPPORTS_SMARTMIPS=y
+CONFIG_SYS_SUPPORTS_SMP=y
+CONFIG_SYS_SUPPORTS_VPE_LOADER=y
+CONFIG_SYS_SUPPORTS_ZBOOT=y
+CONFIG_TARGET_ISA_REV=1
+CONFIG_TICK_CPU_ACCOUNTING=y
+CONFIG_TIMER_OF=y
+CONFIG_TIMER_PROBE=y
+CONFIG_TREE_RCU=y
+CONFIG_TREE_SRCU=y
+CONFIG_USB_SUPPORT=y
+CONFIG_USE_OF=y
+CONFIG_VM_EVENT_COUNTERS=y
+CONFIG_VT=y
+CONFIG_VT_CONSOLE=y
+CONFIG_VT_HW_CONSOLE_BINDING=y
+CONFIG_VXFS_FS=y
+CONFIG_WAR_ICACHE_REFILLS=y
+CONFIG_XPS=y
+CONFIG_ZBOOT_LOAD_ADDRESS=0x0



From lede-commits at lists.infradead.org  Sun Apr 28 15:25:58 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 18:25:58 -0400
Subject: [openwrt/openwrt]  malta: refresh kernel 6.6 configuration
In-Reply-To: <171434315570.1013829.11652838099889325802@git-01.infra.openwrt.org>
References: <171434315570.1013829.11652838099889325802@git-01.infra.openwrt.org>
Message-ID: <mailman.31646.1714343165.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/a638d013b10a614a2f5875728f4ab447fea76fd1

commit a638d013b10a614a2f5875728f4ab447fea76fd1
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Wed Mar 13 17:58:21 2024 +0100

    malta: refresh kernel 6.6 configuration
    
    This refreshes the configuration on top of kernel 6.6 and activates it
    as test kernel configuration.
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    Signed-off-by: Tony Ambardar <itugrok at yahoo.com>
---
 target/linux/malta/Makefile   |  1 +
 target/linux/malta/config-6.6 | 42 +++++++++++++++++++++++++++++++-----------
 2 files changed, 32 insertions(+), 11 deletions(-)

diff --git a/target/linux/malta/Makefile b/target/linux/malta/Makefile
index f98aedf577..b159b19144 100644
--- a/target/linux/malta/Makefile
+++ b/target/linux/malta/Makefile
@@ -11,6 +11,7 @@ INITRAMFS_EXTRA_FILES:=
 FEATURES:=cpiogz ext4 ramdisk squashfs targz
 
 KERNEL_PATCHVER:=6.1
+KERNEL_TESTING_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 
diff --git a/target/linux/malta/config-6.6 b/target/linux/malta/config-6.6
index 9ce439ee38..7c72f49265 100644
--- a/target/linux/malta/config-6.6
+++ b/target/linux/malta/config-6.6
@@ -19,7 +19,10 @@ CONFIG_BLK_DEV_SD=y
 CONFIG_BLK_MQ_PCI=y
 CONFIG_BOARD_SCACHE=y
 CONFIG_BOOT_ELF32=y
+CONFIG_BUFFER_HEAD=y
 CONFIG_BUILTIN_DTB=y
+CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
+CONFIG_CC_NO_ARRAY_BOUNDS=y
 CONFIG_CEVT_R4K=y
 CONFIG_CLKBLD_I8253=y
 CONFIG_CLKEVT_I8253=y
@@ -29,8 +32,11 @@ CONFIG_CLOCKSOURCE_WATCHDOG=y
 CONFIG_CLOCKSOURCE_WATCHDOG_MAX_SKEW_US=100
 CONFIG_CLONE_BACKWARDS=y
 CONFIG_COMMON_CLK=y
+CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
 CONFIG_COMPAT_32BIT_TIME=y
 CONFIG_CONSOLE_TRANSLATIONS=y
+CONFIG_CONTEXT_TRACKING=y
+CONFIG_CONTEXT_TRACKING_IDLE=y
 CONFIG_CPU_GENERIC_DUMP_TLB=y
 CONFIG_CPU_HAS_PREFETCH=y
 # CONFIG_CPU_HAS_SMARTMIPS is not set
@@ -61,25 +67,32 @@ CONFIG_CRC16=y
 CONFIG_CRYPTO_CRC32=y
 CONFIG_CRYPTO_CRC32C=y
 CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
+CONFIG_CRYPTO_LIB_GF128MUL=y
 CONFIG_CRYPTO_LIB_POLY1305_RSIZE=2
-CONFIG_CRYPTO_RNG2=y
+CONFIG_CRYPTO_LIB_SHA1=y
+CONFIG_CRYPTO_LIB_UTILS=y
 CONFIG_CSRC_R4K=y
 CONFIG_DMA_NONCOHERENT=y
 CONFIG_DNOTIFY=y
 CONFIG_DTC=y
 CONFIG_DUMMY_CONSOLE=y
+CONFIG_EXCLUSIVE_SYSTEM_RAM=y
 CONFIG_EXT4_FS=y
 CONFIG_F2FS_FS=y
 CONFIG_FS_IOMAP=y
 CONFIG_FS_MBCACHE=y
 CONFIG_FS_POSIX_ACL=y
+CONFIG_FUNCTION_ALIGNMENT=0
 CONFIG_FW_LOADER_PAGED_BUF=y
+CONFIG_FW_LOADER_SYSFS=y
+CONFIG_GCC11_NO_ARRAY_BOUNDS=y
+CONFIG_GCC_ASM_GOTO_OUTPUT_WORKAROUND=y
 CONFIG_GENERIC_ATOMIC64=y
 CONFIG_GENERIC_CLOCKEVENTS=y
 CONFIG_GENERIC_CMOS_UPDATE=y
 CONFIG_GENERIC_CPU_AUTOPROBE=y
-CONFIG_GENERIC_FIND_FIRST_BIT=y
 CONFIG_GENERIC_GETTIMEOFDAY=y
+CONFIG_GENERIC_IDLE_POLL_SETUP=y
 CONFIG_GENERIC_IOMAP=y
 CONFIG_GENERIC_IRQ_CHIP=y
 CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
@@ -95,10 +108,11 @@ CONFIG_GENERIC_SCHED_CLOCK=y
 CONFIG_GENERIC_SMP_IDLE_THREAD=y
 CONFIG_GENERIC_TIME_VSYSCALL=y
 CONFIG_GLOB=y
-CONFIG_HANDLE_DOMAIN_IRQ=y
+CONFIG_GPIO_CDEV=y
 CONFIG_HARDWARE_WATCHPOINTS=y
 CONFIG_HAS_DMA=y
 CONFIG_HAS_IOMEM=y
+CONFIG_HAS_IOPORT=y
 CONFIG_HAS_IOPORT_MAP=y
 CONFIG_HW_CONSOLE=y
 CONFIG_I8253=y
@@ -125,7 +139,6 @@ CONFIG_KERNEL_GZIP=y
 CONFIG_LIBFDT=y
 CONFIG_LOCK_DEBUGGING_SUPPORT=y
 CONFIG_MD=y
-CONFIG_MEMFD_CREATE=y
 CONFIG_MFD_SYSCON=y
 CONFIG_MIGRATION=y
 CONFIG_MIPS=y
@@ -137,12 +150,10 @@ CONFIG_MIPS_CM=y
 CONFIG_MIPS_CMDLINE_FROM_BOOTLOADER=y
 CONFIG_MIPS_CPC=y
 CONFIG_MIPS_CPU_SCACHE=y
-CONFIG_MIPS_EBPF_JIT=y
 CONFIG_MIPS_EXTERNAL_TIMER=y
 CONFIG_MIPS_GIC=y
 CONFIG_MIPS_L1_CACHE_SHIFT=6
 CONFIG_MIPS_L1_CACHE_SHIFT_6=y
-CONFIG_MIPS_LD_CAN_LINK_VDSO=y
 CONFIG_MIPS_MALTA=y
 CONFIG_MIPS_MSC=y
 CONFIG_MIPS_MT=y
@@ -151,12 +162,17 @@ CONFIG_MIPS_MT_SMP=y
 CONFIG_MIPS_NO_APPENDED_DTB=y
 CONFIG_MIPS_NR_CPU_NR_MAP=2
 CONFIG_MIPS_PERF_SHARED_TC_COUNTERS=y
+CONFIG_MMU_LAZY_TLB_REFCOUNT=y
 CONFIG_MODULES_USE_ELF_REL=y
 CONFIG_MODULE_FORCE_UNLOAD=y
 CONFIG_MTD_CFI_STAA=y
 # CONFIG_MTD_COMPLEX_MAPPINGS is not set
 CONFIG_NEED_DMA_MAP_STATE=y
+CONFIG_NEED_SRCU_NMI_SAFE=y
+CONFIG_NET_EGRESS=y
 CONFIG_NET_FLOW_LIMIT=y
+CONFIG_NET_INGRESS=y
+CONFIG_NET_XGRESS=y
 CONFIG_NLS=y
 CONFIG_NO_GENERIC_PCI_IOPORT_MAP=y
 CONFIG_NO_HZ=y
@@ -164,13 +180,18 @@ CONFIG_NO_HZ_COMMON=y
 CONFIG_NO_HZ_IDLE=y
 CONFIG_NR_CPUS=2
 CONFIG_NVMEM=y
+CONFIG_NVMEM_LAYOUTS=y
 CONFIG_OF=y
 CONFIG_OF_ADDRESS=y
 CONFIG_OF_EARLY_FLATTREE=y
 CONFIG_OF_FLATTREE=y
+CONFIG_OF_GPIO=y
 CONFIG_OF_IRQ=y
 CONFIG_OF_KOBJ=y
 CONFIG_PADATA=y
+CONFIG_PAGE_POOL=y
+CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
+CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
 # CONFIG_PARTITION_ADVANCED is not set
 CONFIG_PATA_LEGACY=y
 CONFIG_PATA_TIMINGS=y
@@ -184,7 +205,7 @@ CONFIG_PGTABLE_LEVELS=2
 CONFIG_POWER_RESET=y
 CONFIG_POWER_RESET_PIIX4_POWEROFF=y
 CONFIG_POWER_RESET_SYSCON=y
-CONFIG_PRINT_QUOTA_WARNING=y
+CONFIG_PREEMPT_NONE_BUILD=y
 CONFIG_PROC_PAGE_MONITOR=y
 CONFIG_PTP_1588_CLOCK_OPTIONAL=y
 CONFIG_QFMT_V2=y
@@ -193,6 +214,7 @@ CONFIG_QUEUED_SPINLOCKS=y
 CONFIG_QUOTA=y
 CONFIG_QUOTACTL=y
 CONFIG_QUOTA_TREE=y
+CONFIG_RANDSTRUCT_NONE=y
 CONFIG_RATIONAL=y
 CONFIG_REGMAP=y
 CONFIG_REGMAP_MMIO=y
@@ -208,18 +230,17 @@ CONFIG_SECCOMP=y
 CONFIG_SECCOMP_FILTER=y
 CONFIG_SERIAL_8250_NR_UARTS=4
 CONFIG_SERIAL_8250_RUNTIME_UARTS=4
+CONFIG_SERIAL_MCTRL_GPIO=y
 CONFIG_SERIO=y
 CONFIG_SERIO_SERPORT=y
 CONFIG_SG_POOL=y
 CONFIG_SMP=y
 CONFIG_SMP_UP=y
 CONFIG_SOCK_RX_QUEUE_MAPPING=y
-CONFIG_SRCU=y
+CONFIG_SQUASHFS_DECOMP_MULTI_PERCPU=y
 CONFIG_SWAP_IO_SPACE=y
 CONFIG_SYNC_R4K=y
 CONFIG_SYSCTL_EXCEPTION_TRACE=y
-CONFIG_SYSFS_DEPRECATED=y
-CONFIG_SYSFS_DEPRECATED_V2=y
 CONFIG_SYS_HAS_CPU_MIPS32_R1=y
 CONFIG_SYS_HAS_CPU_MIPS32_R2=y
 CONFIG_SYS_HAS_CPU_MIPS32_R3_5=y
@@ -238,7 +259,6 @@ CONFIG_SYS_SUPPORTS_HIGHMEM=y
 CONFIG_SYS_SUPPORTS_LITTLE_ENDIAN=y
 CONFIG_SYS_SUPPORTS_MICROMIPS=y
 CONFIG_SYS_SUPPORTS_MIPS16=y
-CONFIG_SYS_SUPPORTS_MIPS_CMP=y
 CONFIG_SYS_SUPPORTS_MIPS_CPS=y
 CONFIG_SYS_SUPPORTS_MULTITHREADING=y
 CONFIG_SYS_SUPPORTS_RELOCATABLE=y



From lede-commits at lists.infradead.org  Sun Apr 28 15:44:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 18:44:13 -0400
Subject: [openwrt/openwrt]  toolchain: binutils: switch to version 2.42 by
 default
In-Reply-To: <171434425310.1065373.3237972976772093124@git-01.infra.openwrt.org>
References: <171434425310.1065373.3237972976772093124@git-01.infra.openwrt.org>
Message-ID: <mailman.31653.1714344257.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/c390c6c7090c7d66471dac6079343a697afc59ba

commit c390c6c7090c7d66471dac6079343a697afc59ba
Author: Nick Hainke <vincent at systemli.org>
AuthorDate: Wed Feb 7 12:27:55 2024 +0100

    toolchain: binutils: switch to version 2.42 by default
    
    Change the default binutils version to 2.42.
    
    Tested-by: Jonathan Lancett <j.lancett at ntlworld.com>
    Tested-by: Andre Heider <a.heider at gmail.com>
    Signed-off-by: Nick Hainke <vincent at systemli.org>
---
 toolchain/binutils/Config.in      | 2 +-
 toolchain/binutils/Config.version | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/toolchain/binutils/Config.in b/toolchain/binutils/Config.in
index 6ba3c52487..caa9bcde8b 100644
--- a/toolchain/binutils/Config.in
+++ b/toolchain/binutils/Config.in
@@ -2,7 +2,7 @@
 
 choice
 	prompt "Binutils Version" if TOOLCHAINOPTS
-	default BINUTILS_USE_VERSION_2_40
+	default BINUTILS_USE_VERSION_2_42
 	help
 	  Select the version of binutils you wish to use.
 
diff --git a/toolchain/binutils/Config.version b/toolchain/binutils/Config.version
index e7a5abcd7e..81815ebed2 100644
--- a/toolchain/binutils/Config.version
+++ b/toolchain/binutils/Config.version
@@ -9,13 +9,13 @@ config BINUTILS_VERSION_2_39
 	bool
 
 config BINUTILS_VERSION_2_40
-	default y if !TOOLCHAINOPTS
 	bool
 
 config BINUTILS_VERSION_2_41
 	bool
 
 config BINUTILS_VERSION_2_42
+	default y if !TOOLCHAINOPTS
 	bool
 
 config BINUTILS_VERSION



From lede-commits at lists.infradead.org  Sun Apr 28 16:03:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 19:03:18 -0400
Subject: [openwrt/openwrt]  libaudit: update to 3.1.4,
 join with daemon and utils, rename
In-Reply-To: <171434539841.1114332.9364840047018199511@git-01.infra.openwrt.org>
References: <171434539841.1114332.9364840047018199511@git-01.infra.openwrt.org>
Message-ID: <mailman.31654.1714345405.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ff0bb196ebba5dac4d3e77738c7d79934600b32c

commit ff0bb196ebba5dac4d3e77738c7d79934600b32c
Author: Marius Dinu <m95d+git at psihoexpert.ro>
AuthorDate: Sun Mar 31 14:22:18 2024 +0300

    libaudit: update to 3.1.4, join with daemon and utils, rename
    
    Changes:
    - new URL for sources (old address is dead)
    - daemon and utils from packages feed are merged in here
      - only build once
      - no need to update at the same time in both places
    - update to v3.1.4
      - removed unneeded patches
      - added audisp-syslog
      - removed audispd (no longer exists)
    - rename and move to package/utils/audit
      - update new path in one dependent package
    
    Signed-off-by: Marius Dinu <m95d+git at psihoexpert.ro>
---
 package/libs/libaudit/Makefile                     | 109 ------------
 ...ubstitue-functions-for-strndupa-rawmemchr.patch | 133 ---------------
 .../libs/libaudit/patches/0002-fix-gcc-10.patch    |  26 ---
 package/libs/libsemanage/Makefile                  |   2 +-
 package/utils/audit/Makefile                       | 184 +++++++++++++++++++++
 package/utils/audit/files/audit.init               |  16 ++
 6 files changed, 201 insertions(+), 269 deletions(-)

diff --git a/package/libs/libaudit/Makefile b/package/libs/libaudit/Makefile
deleted file mode 100644
index 0d79c25365..0000000000
--- a/package/libs/libaudit/Makefile
+++ /dev/null
@@ -1,109 +0,0 @@
-#
-# This is free software, licensed under the GNU General Public License v2.
-# See /LICENSE for more information.
-#
-
-include $(TOPDIR)/rules.mk
-
-PKG_NAME:=libaudit
-PKG_VERSION:=2.8.5
-PKG_RELEASE:=1
-
-PKG_SOURCE_NAME:=audit
-PKG_SOURCE:=$(PKG_SOURCE_NAME)-$(PKG_VERSION).tar.gz
-PKG_SOURCE_URL:=https://people.redhat.com/sgrubb/audit
-PKG_HASH:=0e5d4103646e00f8d1981e1cd2faea7a2ae28e854c31a803e907a383c5e2ecb7
-PKG_BUILD_DIR:=$(BUILD_DIR)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
-HOST_BUILD_DIR:=$(BUILD_DIR_HOST)/$(PKG_SOURCE_NAME)-$(PKG_VERSION)
-PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni at bootlin.com>
-PKG_LICENSE:=GPL-2.0
-PKG_LICENSE_FILES:=COPYING
-PKG_CPE_ID:=cpe:/a:linux_audit_project:linux_audit
-
-PKG_FIXUP:=autoreconf
-
-PKG_BUILD_FLAGS:=no-mips16
-PKG_INSTALL:=1
-
-include $(INCLUDE_DIR)/package.mk
-include $(INCLUDE_DIR)/host-build.mk
-
-define Package/libaudit
-  CATEGORY:=Libraries
-  TITLE:=Linux Auditing Framework (shared library)
-  URL:=http://people.redhat.com/sgrubb/audit/
-endef
-
-define Package/libaudit/description
-	This package contains the audit shared library.
-endef
-
-CONFIGURE_VARS += \
-	LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
-	CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
-	CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
-	CC_FOR_BUILD="$(HOSTCC)"
-
-CONFIGURE_ARGS += \
-	--without-libcap-ng \
-	--disable-systemd \
-	--without-python \
-	--without-python3 \
-	--disable-zos-remote
-
-ifeq ($(ARCH),aarch64)
-CONFIGURE_ARGS += --with-aarch64
-else ifeq ($(ARCH),arm)
-CONFIGURE_ARGS += --with-arm
-endif
-
-HOST_CONFIGURE_ARGS += \
-	--without-libcap-ng \
-	--disable-systemd \
-	--without-python \
-	--without-python3 \
-	--disable-zos-remote
-
-MAKE_PATH:=lib
-
-# Host/Compile/default doesn't include $(MAKE_PATH), override to use,
-# so we avoid building and installing unnecessary parts on the host.
-define Host/Compile
-	+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/$(MAKE_PATH) $(HOST_MAKE_FLAGS) all
-endef
-
-define Host/Install
-	+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib $(HOST_MAKE_FLAGS) install
-	+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/init.d $(HOST_MAKE_FLAGS) install
-endef
-
-# We can't use the default, as the default passes $(MAKE_ARGS), which
-# overrides CC, CFLAGS, etc. and defeats the *_FOR_BUILD definitions
-# passed in CONFIGURE_VARS
-define Build/Compile
-	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
-endef
-
-define Build/Install
-	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib $(MAKE_INSTALL_FLAGS) install
-	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/init.d $(MAKE_INSTALL_FLAGS) install
-endef
-
-define Build/InstallDev
-	$(INSTALL_DIR) $(1)/usr/include
-	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
-	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
-	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
-endef
-
-define Package/libaudit/install
-	$(INSTALL_DIR) $(1)/usr/lib
-	$(CP) $(PKG_INSTALL_DIR)/usr/lib/*.so.* $(1)/usr/lib/
-	$(INSTALL_DIR) $(1)/etc
-	$(CP) $(PKG_INSTALL_DIR)/etc/libaudit.conf $(1)/etc/
-endef
-
-$(eval $(call HostBuild))
-$(eval $(call BuildPackage,libaudit))
diff --git a/package/libs/libaudit/patches/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch b/package/libs/libaudit/patches/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch
deleted file mode 100644
index ac292c57d1..0000000000
--- a/package/libs/libaudit/patches/0001-Add-substitue-functions-for-strndupa-rawmemchr.patch
+++ /dev/null
@@ -1,133 +0,0 @@
-From c39a071e7c021f6ff3554aca2758e97b47a9777c Mon Sep 17 00:00:00 2001
-From: Steve Grubb <sgrubb at redhat.com>
-Date: Tue, 26 Feb 2019 18:33:33 -0500
-Subject: [PATCH] Add substitue functions for strndupa & rawmemchr
-
-(cherry picked from commit d579a08bb1cde71f939c13ac6b2261052ae9f77e)
-Signed-off-by: Thomas Petazzoni <thomas.petazzoni at bootlin.com>
----
- auparse/auparse.c   | 12 +++++++++++-
- auparse/interpret.c |  9 ++++++++-
- configure.ac        | 14 +++++++++++++-
- src/ausearch-lol.c  | 12 +++++++++++-
- 4 files changed, 43 insertions(+), 4 deletions(-)
-
-diff --git a/auparse/auparse.c b/auparse/auparse.c
-index 650db02..2e1c737 100644
---- a/auparse/auparse.c
-+++ b/auparse/auparse.c
-@@ -1,5 +1,5 @@
- /* auparse.c --
-- * Copyright 2006-08,2012-17 Red Hat Inc., Durham, North Carolina.
-+ * Copyright 2006-08,2012-19 Red Hat Inc., Durham, North Carolina.
-  * All Rights Reserved.
-  *
-  * This library is free software; you can redistribute it and/or
-@@ -1118,6 +1118,16 @@ static int str2event(char *s, au_event_t *e)
- 	return 0;
- }
- 
-+#ifndef HAVE_STRNDUPA
-+static inline char *strndupa(const char *old, size_t n)
-+{
-+	size_t len = strnlen(old, n);
-+	char *tmp = alloca(len + 1);
-+	tmp[len] = 0;
-+	return memcpy(tmp, old, len);
-+}
-+#endif
-+
- /* Returns 0 on success and 1 on error */
- static int extract_timestamp(const char *b, au_event_t *e)
- {
-diff --git a/auparse/interpret.c b/auparse/interpret.c
-index 51c4a5e..67b7b77 100644
---- a/auparse/interpret.c
-+++ b/auparse/interpret.c
-@@ -853,6 +853,13 @@ err_out:
- 		return print_escaped(id->val);
- }
- 
-+// rawmemchr is faster. Let's use it if we have it.
-+#ifdef HAVE_RAWMEMCHR
-+#define STRCHR rawmemchr
-+#else
-+#define STRCHR strchr
-+#endif
-+
- static const char *print_proctitle(const char *val)
- {
- 	char *out = (char *)print_escaped(val);
-@@ -863,7 +870,7 @@ static const char *print_proctitle(const char *val)
- 		// Proctitle has arguments separated by NUL bytes
- 		// We need to write over the NUL bytes with a space
- 		// so that we can see the arguments
--		while ((ptr  = rawmemchr(ptr, '\0'))) {
-+		while ((ptr  = STRCHR(ptr, '\0'))) {
- 			if (ptr >= end)
- 				break;
- 			*ptr = ' ';
-diff --git a/configure.ac b/configure.ac
-index 6e345f1..6f3007e 100644
---- a/configure.ac
-+++ b/configure.ac
-@@ -1,7 +1,7 @@
- dnl
- define([AC_INIT_NOTICE],
- [### Generated automatically using autoconf version] AC_ACVERSION [
--### Copyright 2005-18 Steve Grubb <sgrubb at redhat.com>
-+### Copyright 2005-19 Steve Grubb <sgrubb at redhat.com>
- ###
- ### Permission is hereby granted, free of charge, to any person obtaining a
- ### copy of this software and associated documentation files (the "Software"),
-@@ -72,6 +72,18 @@ dnl; posix_fallocate is used in audisp-remote
- AC_CHECK_FUNCS([posix_fallocate])
- dnl; signalfd is needed for libev
- AC_CHECK_FUNC([signalfd], [], [ AC_MSG_ERROR([The signalfd system call is necessary for auditd]) ])
-+dnl; check if rawmemchr is available
-+AC_CHECK_FUNCS([rawmemchr])
-+dnl; check if strndupa is available
-+AC_LINK_IFELSE(
-+  [AC_LANG_SOURCE(
-+    [[
-+      #define _GNU_SOURCE
-+      #include <string.h>
-+      int main() { (void) strndupa("test", 10); return 0; }]])],
-+ [AC_DEFINE(HAVE_STRNDUPA, 1, [Let us know if we have it or not])],
-+ []
-+)
- 
- ALLWARNS=""
- ALLDEBUG="-g"
-diff --git a/src/ausearch-lol.c b/src/ausearch-lol.c
-index 5d17a72..758c33e 100644
---- a/src/ausearch-lol.c
-+++ b/src/ausearch-lol.c
-@@ -1,6 +1,6 @@
- /*
- * ausearch-lol.c - linked list of linked lists library
--* Copyright (c) 2008,2010,2014,2016 Red Hat Inc., Durham, North Carolina.
-+* Copyright (c) 2008,2010,2014,2016,2019 Red Hat Inc., Durham, North Carolina.
- * All Rights Reserved. 
- *
- * This software may be freely redistributed and/or modified under the
-@@ -152,6 +152,16 @@ static int compare_event_time(event *e1, event *e2)
- 	return 0;
- }
- 
-+#ifndef HAVE_STRNDUPA
-+static inline char *strndupa(const char *old, size_t n)
-+{
-+	size_t len = strnlen(old, n);
-+	char *tmp = alloca(len + 1);
-+	tmp[len] = 0;
-+	return memcpy(tmp, old, len);
-+}
-+#endif
-+
- /*
-  * This function will look at the line and pick out pieces of it.
-  */
--- 
-2.21.0
-
diff --git a/package/libs/libaudit/patches/0002-fix-gcc-10.patch b/package/libs/libaudit/patches/0002-fix-gcc-10.patch
deleted file mode 100644
index 5986cf0e42..0000000000
--- a/package/libs/libaudit/patches/0002-fix-gcc-10.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 017e6c6ab95df55f34e339d2139def83e5dada1f Mon Sep 17 00:00:00 2001
-From: Steve Grubb <sgrubb at redhat.com>
-Date: Fri, 10 Jan 2020 21:13:50 -0500
-Subject: [PATCH 01/30] Header definitions need to be external when building
- with -fno-common (which is default in GCC 10) - Tony Jones
-
----
- src/ausearch-common.h | 2 +-
- 1 file changed, 1 insertion(+), 1 deletion(-)
-
-diff --git a/src/ausearch-common.h b/src/ausearch-common.h
-index 6669203..3040547 100644
---- a/src/ausearch-common.h
-+++ b/src/ausearch-common.h
-@@ -50,7 +50,7 @@ extern pid_t event_pid;
- extern int event_exact_match;
- extern uid_t event_uid, event_euid, event_loginuid;
- extern const char *event_tuid, *event_teuid, *event_tauid;
--slist *event_node_list;
-+extern slist *event_node_list;
- extern const char *event_comm;
- extern const char *event_filename;
- extern const char *event_hostname;
--- 
-2.26.2
-
diff --git a/package/libs/libsemanage/Makefile b/package/libs/libsemanage/Makefile
index 37e433b34c..9ebf9a6f21 100644
--- a/package/libs/libsemanage/Makefile
+++ b/package/libs/libsemanage/Makefile
@@ -18,7 +18,7 @@ PKG_LICENSE_FILES:=COPYING
 PKG_CPE_ID:=cpe:/a:selinuxproject:libsemanage
 
 
-HOST_BUILD_DEPENDS:=libaudit/host libselinux/host bzip2/host
+HOST_BUILD_DEPENDS:=audit/host libselinux/host bzip2/host
 
 
 include $(INCLUDE_DIR)/package.mk
diff --git a/package/utils/audit/Makefile b/package/utils/audit/Makefile
new file mode 100644
index 0000000000..e36e3ebd53
--- /dev/null
+++ b/package/utils/audit/Makefile
@@ -0,0 +1,184 @@
+#
+# This is free software, licensed under the GNU General Public License v2.
+# See /LICENSE for more information.
+#
+
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=audit-userspace
+PKG_VERSION:=3.1.4
+PKG_RELEASE:=1
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
+PKG_SOURCE_URL:=https://github.com/linux-audit/audit-userspace/archive/refs/tags/v$(PKG_VERSION).tar.gz?
+PKG_HASH:=aec501760acd13ebbe00e78b9b59f795d16a430b1d673628e346cd18905c594b
+PKG_MAINTAINER:=Thomas Petazzoni <thomas.petazzoni at bootlin.com>
+PKG_LICENSE:=GPL-2.0-or-later
+PKG_LICENSE_FILES:=COPYING
+PKG_CPE_ID:=cpe:/a:linux_audit_project:linux_audit
+
+PKG_CONFIG_DEPENDS:=CONFIG_KERNEL_IO_URING
+PKG_FIXUP:=autoreconf
+
+PKG_BUILD_FLAGS:=no-mips16
+PKG_INSTALL:=1
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+
+define Package/audit/Default
+  TITLE:=Audit
+  URL:=https://github.com/linux-audit/
+endef
+
+define Package/audit/Default/description
+  The audit package contains the user space utilities for
+  storing and searching the audit records generated by
+  the audit subsystem in the kernel.
+endef
+
+define Package/libaudit
+$(call Package/audit/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+= (libaudit)
+endef
+
+define Package/libaudit/description
+$(call Package/audit/Default/description)
+  This package contains the audit shared library.
+endef
+
+define Package/libauparse
+$(call Package/audit/Default)
+  SECTION:=libs
+  CATEGORY:=Libraries
+  TITLE+= (libauparse)
+  DEPENDS:= +libaudit
+endef
+
+define Package/libauparse/description
+$(call Package/audit/Default/description)
+  This package contains the audit parsing shared library.
+endef
+
+define Package/audit-utils
+$(call Package/audit/Default)
+  SECTION:=admin
+  CATEGORY:=Administration
+  TITLE+= (utilities)
+  DEPENDS:= +libaudit +libauparse
+endef
+
+define Package/audit-utils/description
+$(call Package/audit/Default/description)
+  This package contains the audit utilities.
+endef
+
+define Package/auditd
+$(call Package/audit/Default)
+  SECTION:=admin
+  CATEGORY:=Administration
+  TITLE+= (daemon)
+  DEPENDS:= +libaudit +libauparse +audit-utils +libev
+endef
+
+define Package/auditd/description
+$(call Package/audit/Default/description)
+  This package contains the audit daemon.
+endef
+
+CONFIGURE_VARS += \
+	LDFLAGS_FOR_BUILD="$(HOST_LDFLAGS)" \
+	CPPFLAGS_FOR_BUILD="$(HOST_CPPFLAGS)" \
+	CFLAGS_FOR_BUILD="$(HOST_CFLAGS)" \
+	CC_FOR_BUILD="$(HOSTCC)"
+
+CONFIGURE_ARGS += \
+	--with-debug \
+	--disable-systemd \
+	--disable-zos-remote \
+	--disable-gssapi-krb5 \
+	--without-libcap-ng \
+	--without-python \
+	--without-python3 \
+	--without-golang
+
+ifeq ($(ARCH),aarch64)
+CONFIGURE_ARGS += --with-aarch64
+else ifeq ($(ARCH),arm)
+CONFIGURE_ARGS += --with-arm
+endif
+
+HOST_CONFIGURE_ARGS += \
+	--disable-systemd \
+	--disable-zos-remote \
+	--disable-gssapi-krb5 \
+	--without-libcap-ng \
+	--without-python \
+	--without-python3 \
+	--without-golang
+
+define Host/Install
+	+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/lib $(HOST_MAKE_FLAGS) install
+	+$(HOST_MAKE_VARS) $(MAKE) $(HOST_JOBS) -C $(HOST_BUILD_DIR)/init.d $(HOST_MAKE_FLAGS) install
+endef
+
+# We can't use the default, as the default passes $(MAKE_ARGS), which
+# overrides CC, CFLAGS, etc. and defeats the *_FOR_BUILD definitions
+# passed in CONFIGURE_VARS
+define Build/Compile
+	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/$(MAKE_PATH)
+endef
+
+define Build/Install
+	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/lib $(MAKE_INSTALL_FLAGS) install
+	$(MAKE) $(PKG_JOBS) -C $(PKG_BUILD_DIR)/init.d $(MAKE_INSTALL_FLAGS) install
+	$(call Build/Install/Default,install)
+endef
+
+define Build/InstallDev
+	$(INSTALL_DIR) $(1)/usr/include
+	$(CP) $(PKG_INSTALL_DIR)/usr/include/* $(1)/usr/include/
+	$(INSTALL_DIR) $(1)/usr/lib/pkgconfig
+	$(INSTALL_DATA) $(PKG_INSTALL_DIR)/usr/lib/pkgconfig/*.pc $(1)/usr/lib/pkgconfig/
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/* $(1)/usr/lib/
+endef
+
+define Package/libaudit/install
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libaudit.so* $(1)/usr/lib/
+	$(INSTALL_DIR) $(1)/etc
+	$(CP) $(PKG_INSTALL_DIR)/etc/libaudit.conf $(1)/etc/
+endef
+
+define Package/libauparse/install
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libauparse.so* $(1)/usr/lib/
+endef
+
+define Package/audit-utils/install
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(CP) $(PKG_INSTALL_DIR)/usr/bin/* $(1)/usr/bin/
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(CP) \
+		$(PKG_INSTALL_DIR)/usr/sbin/{audisp-remote,audisp-syslog,auditctl,augenrules,aureport,ausearch,autrace} \
+		$(1)/usr/sbin/
+endef
+
+define Package/auditd/install
+	$(INSTALL_DIR) $(1)/etc/audit
+	$(CP) $(PKG_INSTALL_DIR)/etc/audit/* $(1)/etc/audit/
+	# af_unix plugin is not installed. Remove it's .conf.
+	if [[ -f $(1)/etc/audit/plugins.d/af_unix.conf ]] ; then rm $(1)/etc/audit/plugins.d/af_unix.conf ; fi
+	$(INSTALL_DIR) $(1)/etc/init.d
+	$(INSTALL_BIN) ./files/audit.init $(1)/etc/init.d/audit
+	$(INSTALL_DIR) $(1)/usr/sbin
+	$(CP) $(PKG_INSTALL_DIR)/usr/sbin/auditd $(1)/usr/sbin/
+endef
+
+$(eval $(call HostBuild))
+$(eval $(call BuildPackage,libaudit))
+$(eval $(call BuildPackage,libauparse))
+$(eval $(call BuildPackage,audit-utils))
+$(eval $(call BuildPackage,auditd))
diff --git a/package/utils/audit/files/audit.init b/package/utils/audit/files/audit.init
new file mode 100644
index 0000000000..4a9f53884b
--- /dev/null
+++ b/package/utils/audit/files/audit.init
@@ -0,0 +1,16 @@
+#!/bin/sh /etc/rc.common
+# Copyright (c) 2014 OpenWrt.org
+
+START=11
+
+USE_PROCD=1
+PROG=/usr/sbin/auditd
+
+start_service() {
+	mkdir -p /var/log/audit
+	procd_open_instance
+	procd_set_param command "$PROG" -n
+	procd_set_param respawn
+	procd_close_instance
+	test -f /etc/audit/rules.d/audit.rules && /usr/sbin/auditctl -R /etc/audit/rules.d/audit.rules
+}



From lede-commits at lists.infradead.org  Sun Apr 28 16:36:00 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 19:36:00 -0400
Subject: [openwrt/openwrt]  mbedtls: Remove Kconfig options removed from
 mbedtls 3.6.0
In-Reply-To: <171434736052.1224434.3330734607513693323@git-01.infra.openwrt.org>
References: <171434736052.1224434.3330734607513693323@git-01.infra.openwrt.org>
Message-ID: <mailman.31655.1714347364.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/adc29202c2044ad039f2904b822c6a6fe84ac984

commit adc29202c2044ad039f2904b822c6a6fe84ac984
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Mon Apr 29 01:29:52 2024 +0200

    mbedtls: Remove Kconfig options removed from mbedtls 3.6.0
    
    These options are not available in mbedtls 3.6.0 and selecting them
    causes an error.
    
    MBEDTLS_CERTS_C was removed in:
    https://github.com/Mbed-TLS/mbedtls/commit/1aec64642cd0b9490c96fdd1fa9816741d93fce4
    
    MBEDTLS_XTEA_C was removed in:
    https://github.com/Mbed-TLS/mbedtls/commit/10e8cf5fef7e062927bfbec69ad85fbf491b4299
    
    MBEDTLS_SSL_TRUNCATED_HMAC was removed in:
    https://github.com/Mbed-TLS/mbedtls/commit/4a7010d1aaae937dfa328ef253d70d04b3b260ff
    
    Fixes: 0e0664264386 ("mbedtls: Update to version 3.6.0")
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
---
 package/libs/mbedtls/Config.in | 12 ------------
 package/libs/mbedtls/Makefile  |  3 ---
 2 files changed, 15 deletions(-)

diff --git a/package/libs/mbedtls/Config.in b/package/libs/mbedtls/Config.in
index e80c342636..51f8bcbbdd 100644
--- a/package/libs/mbedtls/Config.in
+++ b/package/libs/mbedtls/Config.in
@@ -36,10 +36,6 @@ config MBEDTLS_RIPEMD160_C
 	bool "MBEDTLS_RIPEMD160_C"
 	default n
 
-config MBEDTLS_XTEA_C
-	bool "MBEDTLS_XTEA_C"
-	default n
-
 config MBEDTLS_RSA_NO_CRT
 	bool "MBEDTLS_RSA_NO_CRT"
 	default y
@@ -140,10 +136,6 @@ config MBEDTLS_ECP_DP_CURVE448_ENABLED
 
 comment "Build Options - unselect features to reduce binary size"
 
-config MBEDTLS_CERTS_C
-	bool "MBEDTLS_CERTS_C"
-	default n
-
 config MBEDTLS_CIPHER_MODE_OFB
 	bool "MBEDTLS_CIPHER_MODE_OFB"
 	default n
@@ -168,10 +160,6 @@ config MBEDTLS_SELF_TEST
 	bool "MBEDTLS_SELF_TEST"
 	default n
 
-config MBEDTLS_SSL_TRUNCATED_HMAC
-	bool "MBEDTLS_SSL_TRUNCATED_HMAC"
-	default n
-
 config MBEDTLS_THREADING_C
 	bool "MBEDTLS_THREADING_C"
 	default y
diff --git a/package/libs/mbedtls/Makefile b/package/libs/mbedtls/Makefile
index f6713f42f5..568ca28308 100644
--- a/package/libs/mbedtls/Makefile
+++ b/package/libs/mbedtls/Makefile
@@ -56,7 +56,6 @@ MBEDTLS_BUILD_OPTS_CIPHERS= \
   CONFIG_MBEDTLS_NIST_KW_C \
   CONFIG_MBEDTLS_RIPEMD160_C \
   CONFIG_MBEDTLS_RSA_NO_CRT \
-  CONFIG_MBEDTLS_XTEA_C \
   CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_ENABLED \
   CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_EPHEMERAL_ENABLED \
   CONFIG_MBEDTLS_SSL_TLS1_3_KEY_EXCHANGE_MODE_PSK_EPHEMERAL_ENABLED
@@ -64,7 +63,6 @@ MBEDTLS_BUILD_OPTS_CIPHERS= \
 MBEDTLS_BUILD_OPTS= \
   $(MBEDTLS_BUILD_OPTS_CURVES) \
   $(MBEDTLS_BUILD_OPTS_CIPHERS) \
-  CONFIG_MBEDTLS_CERTS_C \
   CONFIG_MBEDTLS_CIPHER_MODE_OFB \
   CONFIG_MBEDTLS_CIPHER_MODE_XTS \
   CONFIG_MBEDTLS_DEBUG_C \
@@ -73,7 +71,6 @@ MBEDTLS_BUILD_OPTS= \
   CONFIG_MBEDTLS_PLATFORM_C \
   CONFIG_MBEDTLS_SELF_TEST \
   CONFIG_MBEDTLS_SSL_RENEGOTIATION \
-  CONFIG_MBEDTLS_SSL_TRUNCATED_HMAC \
   CONFIG_MBEDTLS_THREADING_C \
   CONFIG_MBEDTLS_THREADING_PTHREAD \
   CONFIG_MBEDTLS_VERSION_C \



From lede-commits at lists.infradead.org  Sun Apr 28 18:19:14 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Sun, 28 Apr 2024 21:19:14 -0400
Subject: [openwrt/openwrt]  mpc85xx: convert WS-AP3710i to simpleImage wrapper
In-Reply-To: <171435355479.1520430.13379699594935964315@git-01.infra.openwrt.org>
References: <171435355479.1520430.13379699594935964315@git-01.infra.openwrt.org>
Message-ID: <mailman.31658.1714353565.1280.lede-commits@lists.infradead.org>

blocktrron pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/eec18118d02fa5d095cb4035c42187e487d0e68c

commit eec18118d02fa5d095cb4035c42187e487d0e68c
Author: David Bauer <mail at david-bauer.net>
AuthorDate: Thu Apr 25 16:53:55 2024 +0200

    mpc85xx: convert WS-AP3710i to simpleImage wrapper
    
    Convert the Enterasys WS-AP3710i access point to use the simpleImage
    wrapper.
    
    This is necessary, as the bootlaoder does not align the DTB correctly
    (and does not support altering the FDT loadaddress). Booting images with
    kernels 5.15 and later can break depending on the alignment on the DTB
    within the FIT image.
    
    Signed-off-by: David Bauer <mail at david-bauer.net>
---
 .../files/arch/powerpc/boot/dts/ws-ap3710i.dts     | 104 ++++++++++++++++++++-
 target/linux/mpc85xx/image/p1020.mk                |   6 +-
 target/linux/mpc85xx/p1020/target.mk               |   2 +-
 .../106-powerpc-85xx-ws-ap3710i-support.patch      |  30 ++++++
 .../107-powerpc-85xx-add-ws-ap3825i-support.patch  |  18 ++--
 .../109-powerpc-85xx-add-ws-ap3715i-support.patch  |  22 ++---
 .../110-powerpc-85xx-br200-wp-support.patch        |  10 +-
 ...rpc-bootwrapper-disable-uImage-generation.patch |   4 +-
 .../106-powerpc-85xx-ws-ap3710i-support.patch      |  30 ++++++
 .../107-powerpc-85xx-add-ws-ap3825i-support.patch  |  18 ++--
 .../109-powerpc-85xx-add-ws-ap3715i-support.patch  |  22 ++---
 .../110-powerpc-85xx-br200-wp-support.patch        |  10 +-
 ...rpc-bootwrapper-disable-uImage-generation.patch |   4 +-
 13 files changed, 223 insertions(+), 57 deletions(-)

diff --git a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts
index 72b8f7a9d6..4068bdb51e 100644
--- a/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts
+++ b/target/linux/mpc85xx/files/arch/powerpc/boot/dts/ws-ap3710i.dts
@@ -9,6 +9,8 @@
 	compatible = "enterasys,ws-ap3710i";
 
 	aliases {
+		ethernet0 = &enet0;
+		ethernet1 = &enet2;
 		led-boot = &led_power_green;
 		led-failsafe = &led_power_red;
 		led-running = &led_power_green;
@@ -16,6 +18,11 @@
 		label-mac-device = &enet0;
 	};
 
+	chosen {
+		bootargs-override = "console=ttyS0,115200";
+		stdout-path = &serial0;
+	};
+
 	memory {
 		device_type = "memory";
 	};
@@ -74,7 +81,7 @@
 				#size-cells = <1>;
 
 				partition at 0 {
-					compatible = "denx,fit";
+					compatible = "denx,uimage";
 					reg = <0x0 0x1d80000>;
 					label = "firmware";
 				};
@@ -145,6 +152,13 @@
 		ranges = <0x2000000 0x0 0xa0000000 0 0xa0000000 0x0 0x20000000
 			  0x1000000 0x0 0x00000000 0 0xffc10000 0x0 0x10000>;
 		reg = <0 0xffe09000 0 0x1000>;
+
+		/* Filled by U-Boot */
+		bus-range = <0x00 0x01>;
+		dma-ranges = <0x2000000 0x00 0xfff00000 0x00 0xffe00000
+			      0x00 0x100000 0x42000000 0x00 0x00 0x00
+			      0x00 0x00 0x10000000>;
+
 		pcie at 0 {
 			ranges = <0x2000000 0x0 0xa0000000
 				  0x2000000 0x0 0xa0000000
@@ -160,6 +174,13 @@
 		reg = <0 0xffe0a000 0 0x1000>;
 		ranges = <0x2000000 0x0 0x80000000 0 0x80000000 0x0 0x20000000
 			  0x1000000 0x0 0x00000000 0 0xffc00000 0x0 0x10000>;
+
+		/* Filled by U-Boot */
+		bus-range = <0x00 0x01>;
+		dma-ranges = <0x2000000 0x00 0xfff00000 0x00
+			      0xffe00000 0x00 0x100000 0x42000000
+			      0x00 0x00 0x00 0x00 0x00 0x10000000>;
+
 		pcie at 0 {
 			ranges = <0x2000000 0x0 0x80000000
 				  0x2000000 0x0 0x80000000
@@ -174,6 +195,87 @@
 };
 /include/ "fsl/p1020si-post.dtsi"
 
+/ {
+	cpus {
+		PowerPC,P1020 at 0 {
+			bus-frequency = <399999996>;
+			timebase-frequency = <50000000>;
+			clock-frequency = <799999992>;
+			d-cache-block-size = <0x20>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <0x80>;
+			i-cache-block-size = <0x20>;
+			i-cache-size = <0x8000>;
+			i-cache-sets = <0x80>;
+			cpu-release-addr = <0x0 0x0ffff280>;
+			status = "okay";
+			enable-method = "spin-table";
+		};
+
+		PowerPC,P1020 at 1 {
+			bus-frequency = <399999996>;
+			timebase-frequency = <50000000>;
+			clock-frequency = <799999992>;
+			d-cache-block-size = <0x20>;
+			d-cache-size = <0x8000>;
+			d-cache-sets = <0x80>;
+			i-cache-block-size = <0x20>;
+			i-cache-size = <0x8000>;
+			i-cache-sets = <0x80>;
+			cpu-release-addr = <0x0 0x0ffff2a0>;
+			status = "disabled";
+			enable-method = "spin-table";
+		};
+	};
+
+	memory {
+		reg = <0x0 0x0 0x0 0x10000000>;
+	};
+
+	reserved-memory {
+		#address-cells = <2>;
+		#size-cells = <2>;
+		ranges;
+
+		cpu1-bootpage at ff00000 {
+			/* Reserve upper 1 MB for second-core-bootpage */
+			reg = <0x0 0xff00000 0x0 0x100000>;
+		};
+	};
+
+	soc at ffe00000 {
+		bus-frequency = <399999996>;
+
+		serial at 4600 {
+			clock-frequency = <399999996>;
+		};
+
+		serial at 4500 {
+			clock-frequency = <399999996>;
+		};
+
+		pic at 40000 {
+			clock-frequency = <399999996>;
+		};
+	};
+
+	localbus at ffe05000 {
+		bus-frequency = <24999999>;
+	};
+};
+
+&enet0 {
+	rx-stash-idx = <0x00>;
+	rx-stash-len = <0x60>;
+	bd-stash;
+};
+
+&enet2 {
+	rx-stash-idx = <0x00>;
+	rx-stash-len = <0x60>;
+	bd-stash;
+};
+
 /*
  * For the OpenWrt 22.03 release, since Linux 5.10.138 now uses
  * aliases to determine PCI domain numbers, drop aliases so as not to
diff --git a/target/linux/mpc85xx/image/p1020.mk b/target/linux/mpc85xx/image/p1020.mk
index 26b8167553..56b5c23d4f 100644
--- a/target/linux/mpc85xx/image/p1020.mk
+++ b/target/linux/mpc85xx/image/p1020.mk
@@ -67,7 +67,11 @@ define Device/enterasys_ws-ap3710i
   DEVICE_VENDOR := Enterasys
   DEVICE_MODEL := WS-AP3710i
   BLOCKSIZE := 128k
-  KERNEL = kernel-bin | lzma | fit lzma $(KDIR)/image-$$(DEVICE_DTS).dtb
+  KERNEL_NAME := simpleImage.ws-ap3710i
+  KERNEL_ENTRY := 0x1500000
+  KERNEL_LOADADDR := 0x1500000
+  KERNEL = kernel-bin | uImage none
+  KERNEL_INITRAMFS := kernel-bin | uImage none
   IMAGES := sysupgrade.bin
   IMAGE/sysupgrade.bin := append-kernel | append-rootfs | pad-rootfs | append-metadata
 endef
diff --git a/target/linux/mpc85xx/p1020/target.mk b/target/linux/mpc85xx/p1020/target.mk
index 5a5d0bf07d..27873b01c9 100644
--- a/target/linux/mpc85xx/p1020/target.mk
+++ b/target/linux/mpc85xx/p1020/target.mk
@@ -1,5 +1,5 @@
 BOARDNAME:=P1020
-KERNEL_IMAGES:=simpleImage.ws-ap3825i simpleImage.hiveap-330
+KERNEL_IMAGES:=simpleImage.ws-ap3710i simpleImage.ws-ap3825i simpleImage.hiveap-330
 
 define Target/Description
 	Build firmware images for Freescale P1020 based boards.
diff --git a/target/linux/mpc85xx/patches-6.1/106-powerpc-85xx-ws-ap3710i-support.patch b/target/linux/mpc85xx/patches-6.1/106-powerpc-85xx-ws-ap3710i-support.patch
index 5ac3f2f2d9..9985d1f417 100644
--- a/target/linux/mpc85xx/patches-6.1/106-powerpc-85xx-ws-ap3710i-support.patch
+++ b/target/linux/mpc85xx/patches-6.1/106-powerpc-85xx-ws-ap3710i-support.patch
@@ -28,3 +28,33 @@
  obj-$(CONFIG_CORENET_GENERIC)   += corenet_generic.o
  obj-$(CONFIG_FB_FSL_DIU)	+= t1042rdb_diu.o
  obj-$(CONFIG_RED_15W_REV1)	+= red15w_rev1.o
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -181,6 +181,7 @@ src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) +=
+ src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c
+ src-plat-$(CONFIG_HIVEAP_330) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
++src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
+ 
+ src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c
+ 
+@@ -363,6 +364,7 @@ image-$(CONFIG_TQM8560)			+= cuImage.tqm
+ image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
+ image-$(CONFIG_HIVEAP_330)		+= simpleImage.hiveap-330
+ image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
++image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
+ # Board ports in arch/powerpc/platform/86xx/Kconfig
+ image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
+ 
+--- a/arch/powerpc/boot/wrapper
++++ b/arch/powerpc/boot/wrapper
+@@ -342,7 +342,8 @@ adder875-redboot)
+     binary=y
+     ;;
+ simpleboot-hiveap-330|\
+-simpleboot-tl-wdr4900-v1)
++simpleboot-tl-wdr4900-v1|\
++simpleboot-ws-ap3710i)
+     platformo="$object/fixed-head.o $object/simpleboot.o"
+     link_address='0x1500000'
+     binary=y
diff --git a/target/linux/mpc85xx/patches-6.1/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-6.1/107-powerpc-85xx-add-ws-ap3825i-support.patch
index 63e7e46bbc..dccd12ac91 100644
--- a/target/linux/mpc85xx/patches-6.1/107-powerpc-85xx-add-ws-ap3825i-support.patch
+++ b/target/linux/mpc85xx/patches-6.1/107-powerpc-85xx-add-ws-ap3825i-support.patch
@@ -37,29 +37,31 @@ WS-AP3825i AP.
  obj-$(CONFIG_RED_15W_REV1)	+= red15w_rev1.o
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -181,6 +181,7 @@ src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) +=
- src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c
+@@ -182,6 +182,7 @@ src-plat-$(CONFIG_MVME7100) += motload-h
  src-plat-$(CONFIG_HIVEAP_330) += simpleboot.c fixed-head.S
  src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
 +src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S
  
  src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c
  
-@@ -363,6 +364,7 @@ image-$(CONFIG_TQM8560)			+= cuImage.tqm
- image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
+@@ -365,6 +366,7 @@ image-$(CONFIG_KSI8560)			+= cuImage.ksi
  image-$(CONFIG_HIVEAP_330)		+= simpleImage.hiveap-330
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
 +image-$(CONFIG_WS_AP3825I)		+= simpleImage.ws-ap3825i
  # Board ports in arch/powerpc/platform/86xx/Kconfig
  image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
  
 --- a/arch/powerpc/boot/wrapper
 +++ b/arch/powerpc/boot/wrapper
-@@ -342,6 +342,7 @@ adder875-redboot)
-     binary=y
+@@ -343,7 +343,8 @@ adder875-redboot)
      ;;
  simpleboot-hiveap-330|\
-+simpleboot-ws-ap3825i|\
- simpleboot-tl-wdr4900-v1)
+ simpleboot-tl-wdr4900-v1|\
+-simpleboot-ws-ap3710i)
++simpleboot-ws-ap3710i|\
++simpleboot-ws-ap3825i)
      platformo="$object/fixed-head.o $object/simpleboot.o"
      link_address='0x1500000'
+     binary=y
diff --git a/target/linux/mpc85xx/patches-6.1/109-powerpc-85xx-add-ws-ap3715i-support.patch b/target/linux/mpc85xx/patches-6.1/109-powerpc-85xx-add-ws-ap3715i-support.patch
index f8e33ae637..7e4844e5f3 100644
--- a/target/linux/mpc85xx/patches-6.1/109-powerpc-85xx-add-ws-ap3715i-support.patch
+++ b/target/linux/mpc85xx/patches-6.1/109-powerpc-85xx-add-ws-ap3715i-support.patch
@@ -30,21 +30,19 @@
  obj-$(CONFIG_CORENET_GENERIC)   += corenet_generic.o
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -364,6 +364,7 @@ image-$(CONFIG_TQM8560)			+= cuImage.tqm
- image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
+@@ -182,6 +182,7 @@ src-plat-$(CONFIG_MVME7100) += motload-h
+ src-plat-$(CONFIG_HIVEAP_330) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
++src-plat-$(CONFIG_WS_AP3715I) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S
+ 
+ src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c
+@@ -366,6 +367,7 @@ image-$(CONFIG_KSI8560)			+= cuImage.ksi
  image-$(CONFIG_HIVEAP_330)		+= simpleImage.hiveap-330
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
 +image-$(CONFIG_WS_AP3715I)		+= simpleImage.ws-ap3715i
  image-$(CONFIG_WS_AP3825I)		+= simpleImage.ws-ap3825i
  # Board ports in arch/powerpc/platform/86xx/Kconfig
  image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
---- a/arch/powerpc/boot/wrapper
-+++ b/arch/powerpc/boot/wrapper
-@@ -342,6 +342,7 @@ adder875-redboot)
-     binary=y
-     ;;
- simpleboot-hiveap-330|\
-+simpleboot-ws-ap3715i|\
- simpleboot-ws-ap3825i|\
- simpleboot-tl-wdr4900-v1)
-     platformo="$object/fixed-head.o $object/simpleboot.o"
diff --git a/target/linux/mpc85xx/patches-6.1/110-powerpc-85xx-br200-wp-support.patch b/target/linux/mpc85xx/patches-6.1/110-powerpc-85xx-br200-wp-support.patch
index b063b3dab7..7c109f853d 100644
--- a/target/linux/mpc85xx/patches-6.1/110-powerpc-85xx-br200-wp-support.patch
+++ b/target/linux/mpc85xx/patches-6.1/110-powerpc-85xx-br200-wp-support.patch
@@ -36,15 +36,15 @@
 +src-plat-$(CONFIG_BR200_WP) += simpleboot.c fixed-head.S
  src-plat-$(CONFIG_HIVEAP_330) += simpleboot.c fixed-head.S
  src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
- src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S
-@@ -362,6 +363,7 @@ image-$(CONFIG_TQM8548)			+= cuImage.tqm
+ src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
+@@ -364,6 +365,7 @@ image-$(CONFIG_TQM8548)			+= cuImage.tqm
  image-$(CONFIG_TQM8555)			+= cuImage.tqm8555
  image-$(CONFIG_TQM8560)			+= cuImage.tqm8560
  image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
 +image-$(CONFIG_BR200_WP)		+= simpleImage.br200-wp
  image-$(CONFIG_HIVEAP_330)		+= simpleImage.hiveap-330
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
- image-$(CONFIG_WS_AP3715I)		+= simpleImage.ws-ap3715i
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
 --- a/arch/powerpc/boot/wrapper
 +++ b/arch/powerpc/boot/wrapper
 @@ -341,6 +341,7 @@ adder875-redboot)
@@ -53,5 +53,5 @@
      ;;
 +simpleboot-br200-wp|\
  simpleboot-hiveap-330|\
- simpleboot-ws-ap3715i|\
- simpleboot-ws-ap3825i|\
+ simpleboot-tl-wdr4900-v1|\
+ simpleboot-ws-ap3710i|\
diff --git a/target/linux/mpc85xx/patches-6.1/900-powerpc-bootwrapper-disable-uImage-generation.patch b/target/linux/mpc85xx/patches-6.1/900-powerpc-bootwrapper-disable-uImage-generation.patch
index 648aa0421d..dbfbb25a41 100644
--- a/target/linux/mpc85xx/patches-6.1/900-powerpc-bootwrapper-disable-uImage-generation.patch
+++ b/target/linux/mpc85xx/patches-6.1/900-powerpc-bootwrapper-disable-uImage-generation.patch
@@ -16,7 +16,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -291,7 +291,6 @@ image-$(CONFIG_PPC_CHRP)		+= zImage.chrp
+@@ -293,7 +293,6 @@ image-$(CONFIG_PPC_CHRP)		+= zImage.chrp
  image-$(CONFIG_PPC_EFIKA)		+= zImage.chrp
  image-$(CONFIG_PPC_PMAC)		+= zImage.pmac
  image-$(CONFIG_PPC_HOLLY)		+= dtbImage.holly
@@ -24,7 +24,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  image-$(CONFIG_EPAPR_BOOT)		+= zImage.epapr
  
  #
-@@ -427,15 +426,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits
+@@ -430,15 +429,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits
  $(obj)/vmlinux.strip: vmlinux
  	$(STRIP) -s -R .comment $< -o $@
  
diff --git a/target/linux/mpc85xx/patches-6.6/106-powerpc-85xx-ws-ap3710i-support.patch b/target/linux/mpc85xx/patches-6.6/106-powerpc-85xx-ws-ap3710i-support.patch
index 469b696833..af900d133a 100644
--- a/target/linux/mpc85xx/patches-6.6/106-powerpc-85xx-ws-ap3710i-support.patch
+++ b/target/linux/mpc85xx/patches-6.6/106-powerpc-85xx-ws-ap3710i-support.patch
@@ -28,3 +28,33 @@
  obj-$(CONFIG_CORENET_GENERIC)   += corenet_generic.o
  obj-$(CONFIG_FB_FSL_DIU)	+= t1042rdb_diu.o
  obj-$(CONFIG_RED_15W_REV1)	+= red15w_rev1.o
+--- a/arch/powerpc/boot/Makefile
++++ b/arch/powerpc/boot/Makefile
+@@ -183,6 +183,7 @@ src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) +=
+ src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c
+ src-plat-$(CONFIG_HIVEAP_330) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
++src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
+ 
+ src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c
+ 
+@@ -355,6 +356,7 @@ image-$(CONFIG_TQM8560)			+= cuImage.tqm
+ image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
+ image-$(CONFIG_HIVEAP_330)		+= simpleImage.hiveap-330
+ image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
++image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
+ # Board ports in arch/powerpc/platform/86xx/Kconfig
+ image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
+ 
+--- a/arch/powerpc/boot/wrapper
++++ b/arch/powerpc/boot/wrapper
+@@ -346,7 +346,8 @@ adder875-redboot)
+     binary=y
+     ;;
+ simpleboot-hiveap-330|\
+-simpleboot-tl-wdr4900-v1)
++simpleboot-tl-wdr4900-v1|\
++simpleboot-ws-ap3710i)
+     platformo="$object/fixed-head.o $object/simpleboot.o"
+     link_address='0x1500000'
+     binary=y
diff --git a/target/linux/mpc85xx/patches-6.6/107-powerpc-85xx-add-ws-ap3825i-support.patch b/target/linux/mpc85xx/patches-6.6/107-powerpc-85xx-add-ws-ap3825i-support.patch
index 8a42064570..c8017457c9 100644
--- a/target/linux/mpc85xx/patches-6.6/107-powerpc-85xx-add-ws-ap3825i-support.patch
+++ b/target/linux/mpc85xx/patches-6.6/107-powerpc-85xx-add-ws-ap3825i-support.patch
@@ -37,29 +37,31 @@ WS-AP3825i AP.
  obj-$(CONFIG_RED_15W_REV1)	+= red15w_rev1.o
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -183,6 +183,7 @@ src-plat-$(CONFIG_PPC_IBM_CELL_BLADE) +=
- src-plat-$(CONFIG_MVME7100) += motload-head.S mvme7100.c
+@@ -184,6 +184,7 @@ src-plat-$(CONFIG_MVME7100) += motload-h
  src-plat-$(CONFIG_HIVEAP_330) += simpleboot.c fixed-head.S
  src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
 +src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S
  
  src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c
  
-@@ -355,6 +356,7 @@ image-$(CONFIG_TQM8560)			+= cuImage.tqm
- image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
+@@ -357,6 +358,7 @@ image-$(CONFIG_KSI8560)			+= cuImage.ksi
  image-$(CONFIG_HIVEAP_330)		+= simpleImage.hiveap-330
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
 +image-$(CONFIG_WS_AP3825I)		+= simpleImage.ws-ap3825i
  # Board ports in arch/powerpc/platform/86xx/Kconfig
  image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
  
 --- a/arch/powerpc/boot/wrapper
 +++ b/arch/powerpc/boot/wrapper
-@@ -346,6 +346,7 @@ adder875-redboot)
-     binary=y
+@@ -347,7 +347,8 @@ adder875-redboot)
      ;;
  simpleboot-hiveap-330|\
-+simpleboot-ws-ap3825i|\
- simpleboot-tl-wdr4900-v1)
+ simpleboot-tl-wdr4900-v1|\
+-simpleboot-ws-ap3710i)
++simpleboot-ws-ap3710i|\
++simpleboot-ws-ap3825i)
      platformo="$object/fixed-head.o $object/simpleboot.o"
      link_address='0x1500000'
+     binary=y
diff --git a/target/linux/mpc85xx/patches-6.6/109-powerpc-85xx-add-ws-ap3715i-support.patch b/target/linux/mpc85xx/patches-6.6/109-powerpc-85xx-add-ws-ap3715i-support.patch
index d6c59e8f72..2de51cf028 100644
--- a/target/linux/mpc85xx/patches-6.6/109-powerpc-85xx-add-ws-ap3715i-support.patch
+++ b/target/linux/mpc85xx/patches-6.6/109-powerpc-85xx-add-ws-ap3715i-support.patch
@@ -30,21 +30,19 @@
  obj-$(CONFIG_CORENET_GENERIC)   += corenet_generic.o
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -356,6 +356,7 @@ image-$(CONFIG_TQM8560)			+= cuImage.tqm
- image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
+@@ -184,6 +184,7 @@ src-plat-$(CONFIG_MVME7100) += motload-h
+ src-plat-$(CONFIG_HIVEAP_330) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
++src-plat-$(CONFIG_WS_AP3715I) += simpleboot.c fixed-head.S
+ src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S
+ 
+ src-plat-$(CONFIG_PPC_MICROWATT) += fixed-head.S microwatt.c
+@@ -358,6 +359,7 @@ image-$(CONFIG_KSI8560)			+= cuImage.ksi
  image-$(CONFIG_HIVEAP_330)		+= simpleImage.hiveap-330
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
 +image-$(CONFIG_WS_AP3715I)		+= simpleImage.ws-ap3715i
  image-$(CONFIG_WS_AP3825I)		+= simpleImage.ws-ap3825i
  # Board ports in arch/powerpc/platform/86xx/Kconfig
  image-$(CONFIG_MVME7100)                += dtbImage.mvme7100
---- a/arch/powerpc/boot/wrapper
-+++ b/arch/powerpc/boot/wrapper
-@@ -346,6 +346,7 @@ adder875-redboot)
-     binary=y
-     ;;
- simpleboot-hiveap-330|\
-+simpleboot-ws-ap3715i|\
- simpleboot-ws-ap3825i|\
- simpleboot-tl-wdr4900-v1)
-     platformo="$object/fixed-head.o $object/simpleboot.o"
diff --git a/target/linux/mpc85xx/patches-6.6/110-powerpc-85xx-br200-wp-support.patch b/target/linux/mpc85xx/patches-6.6/110-powerpc-85xx-br200-wp-support.patch
index f3ec26ec99..2d2f838bad 100644
--- a/target/linux/mpc85xx/patches-6.6/110-powerpc-85xx-br200-wp-support.patch
+++ b/target/linux/mpc85xx/patches-6.6/110-powerpc-85xx-br200-wp-support.patch
@@ -36,15 +36,15 @@
 +src-plat-$(CONFIG_BR200_WP) += simpleboot.c fixed-head.S
  src-plat-$(CONFIG_HIVEAP_330) += simpleboot.c fixed-head.S
  src-plat-$(CONFIG_TL_WDR4900_V1) += simpleboot.c fixed-head.S
- src-plat-$(CONFIG_WS_AP3825I) += simpleboot.c fixed-head.S
-@@ -354,6 +355,7 @@ image-$(CONFIG_TQM8548)			+= cuImage.tqm
+ src-plat-$(CONFIG_WS_AP3710I) += simpleboot.c fixed-head.S
+@@ -356,6 +357,7 @@ image-$(CONFIG_TQM8548)			+= cuImage.tqm
  image-$(CONFIG_TQM8555)			+= cuImage.tqm8555
  image-$(CONFIG_TQM8560)			+= cuImage.tqm8560
  image-$(CONFIG_KSI8560)			+= cuImage.ksi8560
 +image-$(CONFIG_BR200_WP)		+= simpleImage.br200-wp
  image-$(CONFIG_HIVEAP_330)		+= simpleImage.hiveap-330
  image-$(CONFIG_TL_WDR4900_V1)		+= simpleImage.tl-wdr4900-v1
- image-$(CONFIG_WS_AP3715I)		+= simpleImage.ws-ap3715i
+ image-$(CONFIG_WS_AP3710I)		+= simpleImage.ws-ap3710i
 --- a/arch/powerpc/boot/wrapper
 +++ b/arch/powerpc/boot/wrapper
 @@ -345,6 +345,7 @@ adder875-redboot)
@@ -53,5 +53,5 @@
      ;;
 +simpleboot-br200-wp|\
  simpleboot-hiveap-330|\
- simpleboot-ws-ap3715i|\
- simpleboot-ws-ap3825i|\
+ simpleboot-tl-wdr4900-v1|\
+ simpleboot-ws-ap3710i|\
diff --git a/target/linux/mpc85xx/patches-6.6/900-powerpc-bootwrapper-disable-uImage-generation.patch b/target/linux/mpc85xx/patches-6.6/900-powerpc-bootwrapper-disable-uImage-generation.patch
index d5bef03387..61ce4874b5 100644
--- a/target/linux/mpc85xx/patches-6.6/900-powerpc-bootwrapper-disable-uImage-generation.patch
+++ b/target/linux/mpc85xx/patches-6.6/900-powerpc-bootwrapper-disable-uImage-generation.patch
@@ -16,7 +16,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/arch/powerpc/boot/Makefile
 +++ b/arch/powerpc/boot/Makefile
-@@ -293,7 +293,6 @@ image-$(CONFIG_PPC_CHRP)		+= zImage.chrp
+@@ -295,7 +295,6 @@ image-$(CONFIG_PPC_CHRP)		+= zImage.chrp
  image-$(CONFIG_PPC_EFIKA)		+= zImage.chrp
  image-$(CONFIG_PPC_PMAC)		+= zImage.pmac
  image-$(CONFIG_PPC_HOLLY)		+= dtbImage.holly
@@ -24,7 +24,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  image-$(CONFIG_EPAPR_BOOT)		+= zImage.epapr
  
  #
-@@ -418,15 +417,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits
+@@ -421,15 +420,6 @@ $(obj)/dtbImage.%: vmlinux $(wrapperbits
  $(obj)/vmlinux.strip: vmlinux
  	$(STRIP) -s -R .comment $< -o $@
  



From lede-commits at lists.infradead.org  Sun Apr 28 23:39:47 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 02:39:47 -0400
Subject: [openwrt/openwrt]  download: don't overwrite VERSION variable
In-Reply-To: <171437278721.2671110.4690082580358620999@git-01.infra.openwrt.org>
References: <171437278721.2671110.4690082580358620999@git-01.infra.openwrt.org>
Message-ID: <mailman.31687.1714372794.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9fc79e2e262270470397f907704689915ec368b6

commit 9fc79e2e262270470397f907704689915ec368b6
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Wed Apr 17 07:07:41 2024 +0200

    download: don't overwrite VERSION variable
    
    In package-defaults.mk the VERSION variable contains the final package
    version, which is a combination of `PKG_VERSION`, `PKG_RELEASE` and if
    used, parameters of `PKG_SOURCE_VERSION`. While this works fine for
    building, within the package Makefile the content VERSION varies:
    
    When building a package from a release tarball, the content of VERSION
    contains the actual package version, however when building from source
    (i.e. Git), the VERSION is overwritten by `PKG_SOURCE_VERSION`.
    
    To fix the overwrite, this commit switches from `VERSION` in download.mk
    to `SOURCE_VERSION` which isn't used anywhere else yet.
    
    As a result, Makefiles may pass the package version to be included
    inside the binary.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 include/download.mk | 34 +++++++++++++++++-----------------
 1 file changed, 17 insertions(+), 17 deletions(-)

diff --git a/include/download.mk b/include/download.mk
index 960dd816c0..7f34302773 100644
--- a/include/download.mk
+++ b/include/download.mk
@@ -168,7 +168,7 @@ define DownloadMethod/cvs
 		cd $(TMP_DIR)/dl && \
 		rm -rf $(SUBDIR) && \
 		[ \! -d $(SUBDIR) ] && \
-		cvs -d $(URL) export $(VERSION) $(SUBDIR) && \
+		cvs -d $(URL) export $(SOURCE_VERSION) $(SUBDIR) && \
 		echo "Packing checkout..." && \
 		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 		mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
@@ -184,10 +184,10 @@ define DownloadMethod/svn
 		rm -rf $(SUBDIR) && \
 		[ \! -d $(SUBDIR) ] && \
 		( svn help export | grep -q trust-server-cert && \
-		svn export --non-interactive --trust-server-cert -r$(VERSION) $(URL) $(SUBDIR) || \
-		svn export --non-interactive -r$(VERSION) $(URL) $(SUBDIR) ) && \
+		svn export --non-interactive --trust-server-cert -r$(SOURCE_VERSION) $(URL) $(SUBDIR) || \
+		svn export --non-interactive -r$(SOURCE_VERSION) $(URL) $(SUBDIR) ) && \
 		echo "Packing checkout..." && \
-		export TAR_TIMESTAMP="`svn info -r$(VERSION) --show-item last-changed-date $(URL)`" && \
+		export TAR_TIMESTAMP="`svn info -r$(SOURCE_VERSION) --show-item last-changed-date $(URL)`" && \
 		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
 		mv $(TMP_DIR)/dl/$(FILE) $(DL_DIR)/ && \
 		rm -rf $(SUBDIR); \
@@ -205,7 +205,7 @@ define DownloadMethod/github_archive
 		$(SCRIPT_DIR)/dl_github_archive.py \
 			--dl-dir="$(DL_DIR)" \
 			--url="$(URL)" \
-			--version="$(VERSION)" \
+			--version="$(SOURCE_VERSION)" \
 			--subdir="$(SUBDIR)" \
 			--source="$(FILE)" \
 			--hash="$(MIRROR_HASH)" \
@@ -227,7 +227,7 @@ define DownloadMethod/rawgit
 	rm -rf $(SUBDIR) && \
 	[ \! -d $(SUBDIR) ] && \
 	git clone $(OPTS) $(URL) $(SUBDIR) && \
-	(cd $(SUBDIR) && git checkout $(VERSION)) && \
+	(cd $(SUBDIR) && git checkout $(SOURCE_VERSION)) && \
 	export TAR_TIMESTAMP=`cd $(SUBDIR) && git log -1 --format='@%ct'` && \
 	echo "Generating formal git archive (apply .gitattributes rules)" && \
 	(cd $(SUBDIR) && git config core.abbrev 8 && \
@@ -250,7 +250,7 @@ define DownloadMethod/bzr
 		cd $(TMP_DIR)/dl && \
 		rm -rf $(SUBDIR) && \
 		[ \! -d $(SUBDIR) ] && \
-		bzr export --per-file-timestamps -r$(VERSION) $(SUBDIR) $(URL) && \
+		bzr export --per-file-timestamps -r$(SOURCE_VERSION) $(SUBDIR) $(URL) && \
 		echo "Packing checkout..." && \
 		export TAR_TIMESTAMP="" && \
 		$(call dl_tar_pack,$(TMP_DIR)/dl/$(FILE),$(SUBDIR)) && \
@@ -266,7 +266,7 @@ define DownloadMethod/hg
 		cd $(TMP_DIR)/dl && \
 		rm -rf $(SUBDIR) && \
 		[ \! -d $(SUBDIR) ] && \
-		hg clone -r $(VERSION) $(URL) $(SUBDIR) && \
+		hg clone -r $(SOURCE_VERSION) $(URL) $(SUBDIR) && \
 		export TAR_TIMESTAMP=`cd $(SUBDIR) && hg log --template '@{date}' -l 1` && \
 		find $(SUBDIR) -name .hg | xargs rm -rf && \
 		echo "Packing checkout..." && \
@@ -283,7 +283,7 @@ define DownloadMethod/darcs
 		cd $(TMP_DIR)/dl && \
 		rm -rf $(SUBDIR) && \
 		[ \! -d $(SUBDIR) ] && \
-		darcs get -t $(VERSION) $(URL) $(SUBDIR) && \
+		darcs get -t $(SOURCE_VERSION) $(URL) $(SUBDIR) && \
 		export TAR_TIMESTAMP=`cd $(SUBDIR) && LC_ALL=C darcs log --last 1 | sed -ne 's!^Date: \+!!p'` && \
 		find $(SUBDIR) -name _darcs | xargs rm -rf && \
 		echo "Packing checkout..." && \
@@ -293,12 +293,12 @@ define DownloadMethod/darcs
 	)
 endef
 
-Validate/cvs=VERSION SUBDIR
-Validate/svn=VERSION SUBDIR
-Validate/git=VERSION SUBDIR
-Validate/bzr=VERSION SUBDIR
-Validate/hg=VERSION SUBDIR
-Validate/darcs=VERSION SUBDIR
+Validate/cvs=SOURCE_VERSION SUBDIR
+Validate/svn=SOURCE_VERSION SUBDIR
+Validate/git=SOURCE_VERSION SUBDIR
+Validate/bzr=SOURCE_VERSION SUBDIR
+Validate/hg=SOURCE_VERSION SUBDIR
+Validate/darcs=SOURCE_VERSION SUBDIR
 
 define Download/Defaults
   URL:=
@@ -311,7 +311,7 @@ define Download/Defaults
   MIRROR:=1
   MIRROR_HASH=$$(MIRROR_MD5SUM)
   MIRROR_MD5SUM:=x
-  VERSION:=
+  SOURCE_VERSION:=
   OPTS:=
   SUBMODULES:=
 endef
@@ -326,7 +326,7 @@ define Download/default
   $(if $(PKG_SOURCE_MIRROR),MIRROR:=$(filter 1,$(PKG_MIRROR)))
   $(if $(PKG_MIRROR_MD5SUM),MIRROR_MD5SUM:=$(PKG_MIRROR_MD5SUM))
   $(if $(PKG_MIRROR_HASH),MIRROR_HASH:=$(PKG_MIRROR_HASH))
-  VERSION:=$(PKG_SOURCE_VERSION)
+  SOURCE_VERSION:=$(PKG_SOURCE_VERSION)
   $(if $(PKG_MD5SUM),MD5SUM:=$(PKG_MD5SUM))
   $(if $(PKG_HASH),HASH:=$(PKG_HASH))
 endef



From lede-commits at lists.infradead.org  Mon Apr 29 01:21:06 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 04:21:06 -0400
Subject: [openwrt/openwrt]  generic: 6.6: add kernel missing symbol
 CONFIG_SPI_BCMBCA_HSSPI
In-Reply-To: <171437886676.3011836.5589073648263458329@git-01.infra.openwrt.org>
References: <171437886676.3011836.5589073648263458329@git-01.infra.openwrt.org>
Message-ID: <mailman.31713.1714378873.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/7d5f7b8b6ca408f8a8282d14c89f1f3fa14f4ef7

commit 7d5f7b8b6ca408f8a8282d14c89f1f3fa14f4ef7
Author: Mieczyslaw Nalewaj <namiltd at yahoo.com>
AuthorDate: Mon Apr 29 07:19:46 2024 +0200

    generic: 6.6: add kernel missing symbol CONFIG_SPI_BCMBCA_HSSPI
    
    Add missing symbol CONFIG_SPI_BCMBCA_HSSPI causing bcm4908 compilation errors.
    
    Signed-off-by: Mieczyslaw Nalewaj <namiltd at yahoo.com>
    Link: https://github.com/openwrt/openwrt/pull/15320
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/generic/config-6.6 | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/generic/config-6.6 b/target/linux/generic/config-6.6
index c52b4f682f..dd274e63d8 100644
--- a/target/linux/generic/config-6.6
+++ b/target/linux/generic/config-6.6
@@ -6677,6 +6677,7 @@ CONFIG_SND_X86=y
 # CONFIG_SPI_BCM2835 is not set
 # CONFIG_SPI_BCM63XX_HSSPI is not set
 # CONFIG_SPI_BCM_QSPI is not set
+# CONFIG_SPI_BCMBCA_HSSPI is not set
 # CONFIG_SPI_BITBANG is not set
 # CONFIG_SPI_BUTTERFLY is not set
 # CONFIG_SPI_CADENCE is not set



From lede-commits at lists.infradead.org  Mon Apr 29 02:36:16 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 05:36:16 -0400
Subject: [openwrt/openwrt]  apk: add package
In-Reply-To: <171438337619.3252440.9103675455370495016@git-01.infra.openwrt.org>
References: <171438337619.3252440.9103675455370495016@git-01.infra.openwrt.org>
Message-ID: <mailman.31734.1714383391.1280.lede-commits@lists.infradead.org>

aparcar pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/00b86168bd3c575a740696eaf25f31f01d178b4b

commit 00b86168bd3c575a740696eaf25f31f01d178b4b
Author: Paul Spooren <mail at aparcar.org>
AuthorDate: Sun Mar 17 18:11:48 2024 +0100

    apk: add package
    
    APK (Alpine Package Keeper) is the package manager of Alpine Linux and
    has multiple advantages over OPKG. While Alpine uses APK version 2, this
    commit adds version 3 with a heavily optimised database structure and
    additional feature making it suitable for OpenWrt.
    
    This commit will be followed by many more to add APK build capabilities
    to the OpenWrt build system, firstly enabling side by side builds of APK
    and OPKG packages, later replacing OPKG entirely.
    
    Signed-off-by: Paul Spooren <mail at aparcar.org>
---
 package/system/apk/Makefile                        |  87 ++
 ...0001-openwrt-move-layer-db-to-temp-folder.patch |  21 +
 .../system/apk/patches/0002-mbedtls-support.patch  | 917 +++++++++++++++++++++
 3 files changed, 1025 insertions(+)

diff --git a/package/system/apk/Makefile b/package/system/apk/Makefile
new file mode 100644
index 0000000000..912ddc253e
--- /dev/null
+++ b/package/system/apk/Makefile
@@ -0,0 +1,87 @@
+include $(TOPDIR)/rules.mk
+
+PKG_NAME:=apk
+PKG_RELEASE:=1
+
+PKG_SOURCE_URL=https://gitlab.alpinelinux.org/alpine/apk-tools.git
+PKG_SOURCE_PROTO:=git
+PKG_SOURCE_DATE:=2024-04-16
+PKG_SOURCE_VERSION:=ba6c31a5469ef74fb85119508e55de9631ffef41
+PKG_MIRROR_HASH:=3455d5799481add9ece3db685576d58be6303f3a13140133979b965cbd3c9966
+
+PKG_VERSION=3.0.0_pre$(subst -,,$(PKG_SOURCE_DATE))
+
+PKG_MAINTAINER:=Paul Spooren <mail at aparcar.org>
+PKG_LICENSE:=GPL-2.0-only
+PKG_LICENSE_FILES:=LICENSE
+PKG_INSTALL:=1
+
+HOST_BUILD_PREFIX:=$(STAGING_DIR_HOST)
+HOST_BUILD_DEPENDS:=lua/host
+PKG_BUILD_DEPENDS:=$(HOST_BUILD_DEPENDS)
+
+include $(INCLUDE_DIR)/package.mk
+include $(INCLUDE_DIR)/host-build.mk
+include $(INCLUDE_DIR)/meson.mk
+
+define Package/apk/default
+  SECTION:=base
+  CATEGORY:=Base system
+  TITLE:=apk package manager
+  DEPENDS:=+zlib
+  URL:=$(PKG_SOURCE_URL)
+endef
+
+define Package/apk-mbedtls
+  $(Package/apk/default)
+  TITLE += (mbedtls)
+  DEPENDS +=+libmbedtls
+  VARIANT:=mbedtls
+  DEFAULT_VARIANT:=1
+  CONFLICTS:=apk-openssl
+endef
+
+define Package/apk-openssl
+  $(Package/apk/default)
+  TITLE += (openssl)
+  DEPENDS +=+libopenssl
+  VARIANT:=openssl
+endef
+
+MESON_HOST_VARS+=VERSION=$(PKG_VERSION)
+MESON_VARS+=VERSION=$(PKG_VERSION)
+
+MESON_HOST_ARGS += \
+	-Dlua_version=5.1 \
+	-Dcompressed-help=false \
+	-Ddocs=disabled \
+	-Dcrypto_backend=openssl \
+	-Dzstd=false
+
+MESON_ARGS += \
+	-Dlua_version=5.1 \
+	-Dcompressed-help=false \
+	-Ddocs=disabled \
+	-Durl_backend=wget \
+	-Dcrypto_backend=$(BUILD_VARIANT) \
+	-Dzstd=false
+
+HOST_LDFLAGS += \
+	-Wl,-rpath $(STAGING_DIR_HOST)/lib
+
+define Package/apk/default/install
+	$(INSTALL_DIR) $(1)/lib/apk/db
+
+	$(INSTALL_DIR) $(1)/usr/bin
+	$(INSTALL_BIN) $(PKG_INSTALL_DIR)/usr/bin/apk $(1)/usr/bin/apk
+
+	$(INSTALL_DIR) $(1)/usr/lib
+	$(CP) $(PKG_INSTALL_DIR)/usr/lib/libapk.so.* $(1)/usr/lib/
+endef
+
+Package/apk-mbedtls/install = $(Package/apk/default/install)
+Package/apk-openssl/install = $(Package/apk/default/install)
+
+$(eval $(call BuildPackage,apk-mbedtls))
+$(eval $(call BuildPackage,apk-openssl))
+$(eval $(call HostBuild))
diff --git a/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch b/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch
new file mode 100644
index 0000000000..eac8a965e5
--- /dev/null
+++ b/package/system/apk/patches/0001-openwrt-move-layer-db-to-temp-folder.patch
@@ -0,0 +1,21 @@
+From 9918c683fcc2f148328332d58d030ec5750a1473 Mon Sep 17 00:00:00 2001
+From: Paul Spooren <mail at aparcar.org>
+Date: Sat, 19 Feb 2022 17:20:37 +0100
+Subject: [PATCH 1/4] openwrt: move layer db to temp folder
+
+Signed-off-by: Paul Spooren <mail at aparcar.org>
+---
+ src/database.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/database.c
++++ b/src/database.c
+@@ -1604,7 +1604,7 @@ const char *apk_db_layer_name(int layer)
+ {
+ 	switch (layer) {
+ 	case APK_DB_LAYER_ROOT: return "lib/apk/db";
+-	case APK_DB_LAYER_UVOL: return "lib/apk/db-uvol";
++	case APK_DB_LAYER_UVOL: return "tmp/run/uvol/.meta/apk";
+ 	default:
+ 		assert("invalid layer");
+ 		return 0;
diff --git a/package/system/apk/patches/0002-mbedtls-support.patch b/package/system/apk/patches/0002-mbedtls-support.patch
new file mode 100644
index 0000000000..62b3ab81d3
--- /dev/null
+++ b/package/system/apk/patches/0002-mbedtls-support.patch
@@ -0,0 +1,917 @@
+From 74ea482102e1a7c1845b3eec19cbdb21264836d4 Mon Sep 17 00:00:00 2001
+From: =?UTF-8?q?Timo=20Ter=C3=A4s?= <timo.teras at iki.fi>
+Date: Fri, 5 Apr 2024 12:06:56 +0300
+Subject: [PATCH 1/4] add alternate url wget implementation
+
+---
+ .gitlab-ci.yml    |  16 ++++-
+ meson.build       |   6 +-
+ meson_options.txt |   1 +
+ src/io_url_wget.c | 150 ++++++++++++++++++++++++++++++++++++++++++++++
+ src/meson.build   |   4 +-
+ 5 files changed, 173 insertions(+), 4 deletions(-)
+ create mode 100644 src/io_url_wget.c
+
+diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml
+index 7fc86563..b7e00008 100644
+--- a/.gitlab-ci.yml
++++ b/.gitlab-ci.yml
+@@ -24,7 +24,19 @@ test:alpine:
+     script:
+         - apk update
+         - apk add make gcc git musl-dev openssl-dev linux-headers zlib-dev zstd-dev lua5.3-dev lua5.3-lzlib meson zlib-static zstd-static openssl-libs-static
+-        - meson build
++        - meson setup build -Dstatic_apk=true
++        - ninja -C build
++    tags:
++        - docker-alpine
++        - x86_64
++
++test:alpine-alt-config:
++    image: alpine
++    stage: test
++    script:
++        - apk update
++        - apk add make gcc git musl-dev openssl-dev linux-headers zlib-dev lua5.3-dev lua5.3-lzlib meson
++        - meson setup build -Durl_backend=wget -Dzstd=false
+         - ninja -C build
+     tags:
+         - docker-alpine
+@@ -38,7 +50,7 @@ test:debian:
+         - apt-get install -y make gcc git libssl-dev zlib1g-dev libzstd-dev lua5.3-dev lua5.2 lua-zlib-dev sudo meson
+         - unlink /bin/sh
+         - ln -s /bin/bash /bin/sh
+-        - meson build
++        - meson setup build
+         - ninja -C build
+     tags:
+         - docker-alpine
+diff --git a/meson.build b/meson.build
+index 1a44c11f..9a14cac0 100644
+--- a/meson.build
++++ b/meson.build
+@@ -33,6 +33,10 @@ subproject = meson.is_subproject()
+ 
+ subdir('doc')
+ subdir('portability')
+-subdir('libfetch')
++if get_option('url_backend') == 'libfetch'
++	subdir('libfetch')
++else
++	libfetch_dep = dependency('', required: false)
++endif
+ subdir('src')
+ subdir('tests')
+diff --git a/meson_options.txt b/meson_options.txt
+index 693f46ec..940fe9a4 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -5,5 +5,6 @@ option('help', description: 'Build help into apk binaries, needs lua', type: 'fe
+ option('lua', description: 'Build luaapk (lua bindings)', type: 'feature', value: 'auto')
+ option('lua_version', description: 'Lua version to build against', type: 'string', value: '5.3')
+ option('static_apk', description: 'Also build apk.static', type: 'boolean', value: false)
++option('url_backend', description: 'URL backend', type: 'combo', choices: ['libfetch', 'wget'], value: 'libfetch')
+ option('uvol_db_target', description: 'Default target for uvol database layer', type: 'string')
+ option('zstd', description: 'Build with zstd support', type: 'boolean', value: true)
+diff --git a/src/io_url_wget.c b/src/io_url_wget.c
+new file mode 100644
+index 00000000..9a929222
+--- /dev/null
++++ b/src/io_url_wget.c
+@@ -0,0 +1,150 @@
++/* io_url_wget.c - Alpine Package Keeper (APK)
++ *
++ * Copyright (C) 2005-2008 Natanael Copa <n at tanael.org>
++ * Copyright (C) 2008-2011 Timo Ter??s <timo.teras at iki.fi>
++ * All rights reserved.
++ *
++ * SPDX-License-Identifier: GPL-2.0-only
++ */
++
++#include <spawn.h>
++#include <unistd.h>
++#include <sys/wait.h>
++#include "apk_io.h"
++
++static char wget_timeout[16];
++static char wget_no_check_certificate;
++
++static int wget_translate_status(int status)
++{
++	if (!WIFEXITED(status)) return -EFAULT;
++	switch (WEXITSTATUS(status)) {
++	case 0: return 0;
++	case 3: return -EIO;
++	case 4: return -ENETUNREACH;
++	case 5: return -EACCES;
++	case 6: return -EACCES;
++	case 7: return -EPROTO;
++	default: return -APKE_REMOTE_IO;
++	}
++}
++
++struct apk_wget_istream {
++	struct apk_istream is;
++	int fd;
++	pid_t pid;
++};
++
++static int wget_spawn(const char *url, pid_t *pid, int *fd)
++{
++	int i = 0, r, pipefds[2];
++	posix_spawn_file_actions_t act;
++	char *argv[16];
++
++	argv[i++] = "wget";
++	argv[i++] = "-q";
++	argv[i++] = "-T";
++	argv[i++] = wget_timeout;
++	if (wget_no_check_certificate) argv[i++] = "--no-check-certificate";
++	argv[i++] = (char *) url;
++	argv[i++] = "-O";
++	argv[i++] = "-";
++	argv[i++] = 0;
++
++	if (pipe2(pipefds, O_CLOEXEC) != 0) return -errno;
++
++	posix_spawn_file_actions_init(&act);
++	posix_spawn_file_actions_adddup2(&act, pipefds[1], STDOUT_FILENO);
++	r = posix_spawnp(pid, "wget", &act, 0, argv, environ);
++	posix_spawn_file_actions_destroy(&act);
++	if (r != 0) return -r;
++	close(pipefds[1]);
++	*fd = pipefds[0];
++	return 0;
++}
++
++static int wget_check_exit(struct apk_wget_istream *wis)
++{
++	int status;
++
++	if (wis->pid == 0) return apk_istream_error(&wis->is, 0);
++	if (waitpid(wis->pid, &status, 0) == wis->pid) {
++		wis->pid = 0;
++		return apk_istream_error(&wis->is, wget_translate_status(status));
++	}
++	return 0;
++}
++
++static void wget_get_meta(struct apk_istream *is, struct apk_file_meta *meta)
++{
++}
++
++static ssize_t wget_read(struct apk_istream *is, void *ptr, size_t size)
++{
++	struct apk_wget_istream *wis = container_of(is, struct apk_wget_istream, is);
++	ssize_t r;
++
++	r = read(wis->fd, ptr, size);
++	if (r < 0) return -errno;
++	if (r == 0) return wget_check_exit(wis);
++	return r;
++}
++
++static int wget_close(struct apk_istream *is)
++{
++	int r = is->err;
++	struct apk_wget_istream *wis = container_of(is, struct apk_wget_istream, is);
++
++	while (wis->pid != 0)
++		wget_check_exit(wis);
++
++	close(wis->fd);
++	free(wis);
++	return r < 0 ? r : 0;
++}
++
++static const struct apk_istream_ops wget_istream_ops = {
++	.get_meta = wget_get_meta,
++	.read = wget_read,
++	.close = wget_close,
++};
++
++struct apk_istream *apk_io_url_istream(const char *url, time_t since)
++{
++	struct apk_wget_istream *wis;
++	int r;
++
++	wis = malloc(sizeof(*wis) + apk_io_bufsize);
++	if (wis == NULL) return ERR_PTR(-ENOMEM);
++
++	*wis = (struct apk_wget_istream) {
++		.is.ops = &wget_istream_ops,
++		.is.buf = (uint8_t *)(wis + 1),
++		.is.buf_size = apk_io_bufsize,
++	};
++	r = wget_spawn(url, &wis->pid, &wis->fd);
++	if (r != 0) {
++		free(wis);
++		return ERR_PTR(r);
++	}
++
++	return &wis->is;
++}
++
++void apk_io_url_no_check_certificate(void)
++{
++	wget_no_check_certificate = 1;
++}
++
++void apk_io_url_set_timeout(int timeout)
++{
++	snprintf(wget_timeout, sizeof wget_timeout, "%d", timeout);
++}
++
++void apk_io_url_set_redirect_callback(void (*cb)(int, const char *))
++{
++}
++
++void apk_io_url_init(void)
++{
++}
+diff --git a/src/meson.build b/src/meson.build
+index c1aae550..38e9d3b0 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -1,3 +1,5 @@
++url_backend = get_option('url_backend')
++
+ libapk_so_version = '2.99.0'
+ libapk_src = [
+ 	'adb.c',
+@@ -22,8 +24,8 @@ libapk_src = [
+ 	'fs_uvol.c',
+ 	'hash.c',
+ 	'io.c',
+-	'io_url_libfetch.c',
+ 	'io_gunzip.c',
++	'io_url_ at 0@.c'.format(url_backend),
+ 	'package.c',
+ 	'pathbuilder.c',
+ 	'print.c',
+-- 
+GitLab
+
+
+From b9fe78fbf19bb10e1d0b8eb1cb1de123bee2ed7e Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 16 Apr 2024 17:55:15 +0200
+Subject: [PATCH 2/4] add option to configure url backend in legacy make build
+ system
+
+Can be configured by setting URL_BACKEND. If not set libfetch is
+selected by default.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ src/Makefile | 20 ++++++++++++++------
+ 1 file changed, 14 insertions(+), 6 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index f7873cb1..efdc68df 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -9,8 +9,8 @@ else
+ $(error Lua interpreter not found. Please specify LUA interpreter, or use LUA=no to build without help.)
+ endif
+ 
+-OPENSSL_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags openssl)
+-OPENSSL_LIBS		:= $(shell $(PKG_CONFIG) --libs openssl)
++OPENSSL_CFLAGS         := $(shell $(PKG_CONFIG) --cflags openssl)
++OPENSSL_LIBS           := $(shell $(PKG_CONFIG) --libs openssl)
+ 
+ ZLIB_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags zlib)
+ ZLIB_LIBS		:= $(shell $(PKG_CONFIG) --libs zlib)
+@@ -21,10 +21,18 @@ libapk_so		:= $(obj)/libapk.so.$(libapk_soname)
+ libapk.so.$(libapk_soname)-objs := \
+ 	adb.o adb_comp.o adb_walk_adb.o adb_walk_genadb.o adb_walk_gentext.o adb_walk_text.o apk_adb.o \
+ 	atom.o blob.o commit.o common.o context.o crypto.o crypto_openssl.o ctype.o database.o hash.o \
+-	extract_v2.o extract_v3.o fs_fsys.o fs_uvol.o io.o io_gunzip.o io_url_libfetch.o \
+-	tar.o package.o pathbuilder.o print.o solver.o trust.o version.o
++	extract_v2.o extract_v3.o fs_fsys.o fs_uvol.o io.o io_gunzip.o tar.o package.o pathbuilder.o \
++	print.o solver.o trust.o version.o
+ 
+-libapk.so.$(libapk_soname)-libs := libfetch/libfetch.a
++libapk.so.$(libapk_soname)-libs :=
++
++ifeq ($(URL_BACKEND),wget)
++libapk.so.$(libapk_soname)-objs += io_url_wget.o
++else
++CFLAGS_ALL += -Ilibfetch
++libapk.so.$(libapk_soname)-objs += io_url_libfetch.o
++libapk.so.$(libapk_soname)-libs += libfetch/libfetch.a
++endif
+ 
+ # ZSTD support can be disabled
+ ifneq ($(ZSTD),no)
+@@ -79,7 +87,7 @@ LIBS_apk		:= -lapk
+ LIBS_apk-test		:= -lapk
+ LIBS_apk.so		:= -L$(obj) -lapk
+ 
+-CFLAGS_ALL		+= -D_ATFILE_SOURCE -Ilibfetch -Iportability
++CFLAGS_ALL		+= -D_ATFILE_SOURCE -Iportability
+ CFLAGS_apk.o		:= -DAPK_VERSION=\"$(VERSION)\"
+ CFLAGS_apk-static.o	:= -DAPK_VERSION=\"$(VERSION)\" -DOPENSSL_NO_ENGINE
+ CFLAGS_apk-test.o	:= -DAPK_VERSION=\"$(VERSION)\" -DOPENSSL_NO_ENGINE -DTEST_MODE
+-- 
+GitLab
+
+
+From 0418b684898403c49905c1f0e4b7c5ca522b2d50 Mon Sep 17 00:00:00 2001
+From: Jonas Jelonek <jelonek.jonas at gmail.com>
+Date: Sun, 14 Apr 2024 00:20:14 +0200
+Subject: [PATCH 3/4] crypto: add support for mbedtls as backend
+
+backend is selected at compile-time with crypto_backend option
+
+Co-developed-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+Signed-off-by: Jonas Jelonek <jelonek.jonas at gmail.com>
+---
+ libfetch/meson.build     |   2 +-
+ meson.build              |  14 +-
+ meson_options.txt        |   1 +
+ portability/getrandom.c  |  19 +++
+ portability/meson.build  |   3 +-
+ portability/sys/random.h |   6 +
+ src/apk_crypto.h         |   5 +
+ src/apk_crypto_mbedtls.h |  30 +++++
+ src/crypto_mbedtls.c     | 285 +++++++++++++++++++++++++++++++++++++++
+ src/meson.build          |  21 ++-
+ 10 files changed, 373 insertions(+), 13 deletions(-)
+ create mode 100644 portability/getrandom.c
+ create mode 100644 portability/sys/random.h
+ create mode 100644 src/apk_crypto_mbedtls.h
+ create mode 100644 src/crypto_mbedtls.c
+
+diff --git a/libfetch/meson.build b/libfetch/meson.build
+index 431ba197..e24f95eb 100644
+--- a/libfetch/meson.build
++++ b/libfetch/meson.build
+@@ -40,7 +40,7 @@ libfetch = static_library(
+ 	c_args: libfetch_cargs,
+ 	dependencies: [
+ 		libportability_dep.partial_dependency(compile_args: true, includes: true),
+-		openssl_dep.partial_dependency(compile_args: true, includes: true)
++		crypto_dep.partial_dependency(compile_args: true, includes: true)
+ 	],
+ )
+ 
+diff --git a/meson.build b/meson.build
+index 9a14cac0..3a83f4e1 100644
+--- a/meson.build
++++ b/meson.build
+@@ -13,15 +13,21 @@ apk_libdir = get_option('libdir')
+ lua_bin = find_program('lua' + get_option('lua_version'), required: get_option('help'))
+ lua_dep = dependency('lua' + get_option('lua_version'), required: get_option('lua'))
+ scdoc_dep = dependency('scdoc', version: '>=1.10', required: get_option('docs'))
+-openssl_dep = dependency('openssl')
+-openssl_static_dep = dependency('openssl', static: true)
+ zlib_dep = dependency('zlib')
+ zlib_static_dep = dependency('zlib', static: true)
+ libzstd_dep = dependency('libzstd', required: get_option('zstd'))
+ libzstd_static_dep = dependency('libzstd', required: get_option('zstd'), static: true)
+ 
+-shared_deps = [ openssl_dep, zlib_dep, libzstd_dep ]
+-static_deps = [ openssl_static_dep, zlib_static_dep, libzstd_static_dep ]
++if get_option('crypto_backend') == 'openssl'
++	crypto_dep = dependency('openssl')
++	crypto_static_dep = dependency('openssl', static: true)
++elif get_option('crypto_backend') == 'mbedtls'
++	crypto_dep = [ dependency('mbedtls'), dependency('mbedcrypto') ]
++	crypto_static_dep = [ dependency('mbedtls', static: true), dependency('mbedcrypto', static: true) ]
++endif
++
++shared_deps = [ crypto_dep, zlib_dep, libzstd_dep ]
++static_deps = [ crypto_static_dep, zlib_static_dep, libzstd_static_dep ]
+ 
+ add_project_arguments('-D_GNU_SOURCE', language: 'c')
+ 
+diff --git a/meson_options.txt b/meson_options.txt
+index 940fe9a4..df0b07dc 100644
+--- a/meson_options.txt
++++ b/meson_options.txt
+@@ -1,4 +1,5 @@
+ option('arch_prefix', description: 'Define a custom arch prefix for default arch', type: 'string')
++option('crypto_backend', description: 'Crypto backend', type: 'combo', choices: ['openssl', 'mbedtls'], value: 'openssl')
+ option('compressed-help', description: 'Compress help database, needs lua-zlib', type: 'boolean', value: true)
+ option('docs', description: 'Build manpages with scdoc', type: 'feature', value: 'auto')
+ option('help', description: 'Build help into apk binaries, needs lua', type: 'feature', value: 'auto')
+diff --git a/portability/getrandom.c b/portability/getrandom.c
+new file mode 100644
+index 00000000..b2f4a07c
+--- /dev/null
++++ b/portability/getrandom.c
+@@ -0,0 +1,19 @@
++#include <sys/random.h>
++#include <sys/types.h>
++#include <unistd.h>
++#include <fcntl.h>
++
++ssize_t getrandom(void *buf, size_t buflen, unsigned int flags)
++{
++	int fd;
++	ssize_t ret;
++
++	fd = open("/dev/urandom", O_RDONLY|O_CLOEXEC);
++	if (fd < 0)
++		return -1;
++
++	ret = read(fd, buf, buflen);
++	close(fd);
++	return ret;
++}
++
+diff --git a/portability/meson.build b/portability/meson.build
+index 89957c3c..3172044e 100644
+--- a/portability/meson.build
++++ b/portability/meson.build
+@@ -3,7 +3,8 @@ cc = meson.get_compiler('c')
+ libportability_src = []
+ 
+ check_symbols = [
+-	['memrchr', 'memrchr.c', 'NEED_MEMRCHR', 'string.h'],
++	['getrandom', 'getrandom.c', 'NEED_GETRANDOM', 'sys/random.h'],
++        ['memrchr', 'memrchr.c', 'NEED_MEMRCHR', 'string.h'],
+ 	['mknodat', 'mknodat.c', 'NEED_MKNODAT', 'sys/stat.h'],
+ 	['pipe2', 'pipe2.c', 'NEED_PIPE2', 'unistd.h'],
+ 	['qsort_r', 'qsort_r.c', 'NEED_QSORT_R', 'stdlib.h'],
+diff --git a/portability/sys/random.h b/portability/sys/random.h
+new file mode 100644
+index 00000000..02d5b1ca
+--- /dev/null
++++ b/portability/sys/random.h
+@@ -0,0 +1,6 @@
++#include_next <sys/random.h>
++#include <sys/types.h>
++
++#ifdef NEED_GETRANDOM
++ssize_t getrandom(void *buf, size_t buflen, unsigned int flags);
++#endif
+diff --git a/src/apk_crypto.h b/src/apk_crypto.h
+index 7de88dfc..5cae3bfe 100644
+--- a/src/apk_crypto.h
++++ b/src/apk_crypto.h
+@@ -12,7 +12,12 @@
+ #include <string.h>
+ #include "apk_defines.h"
+ #include "apk_blob.h"
++
++#if defined(CRYPTO_USE_OPENSSL)
+ #include "apk_crypto_openssl.h"
++#elif defined(CRYPTO_USE_MBEDTLS)
++#include "apk_crypto_mbedtls.h"
++#endif
+ 
+ // Digest
+ 
+diff --git a/src/apk_crypto_mbedtls.h b/src/apk_crypto_mbedtls.h
+new file mode 100644
+index 00000000..5481d149
+--- /dev/null
++++ b/src/apk_crypto_mbedtls.h
+@@ -0,0 +1,30 @@
++/* apk_crypto_mbedtls.h - Alpine Package Keeper (APK)
++ *
++ * Copyright (C) 2024
++ * All rights reserved.
++ *
++ * SPDX-License-Identifier: GPL-2.0-only
++ */
++
++#ifndef APK_CRYPTO_MBEDTLS_H
++#define APK_CRYPTO_MBEDTLS_H
++
++#include <mbedtls/md.h>
++#include <mbedtls/pk.h>
++#include <mbedtls/bignum.h>
++
++struct apk_pkey {
++	uint8_t id[16];
++	mbedtls_pk_context key;
++};
++
++struct apk_digest_ctx {
++	mbedtls_md_context_t mdctx;
++	struct apk_pkey *sigver_key;
++	uint8_t alg;
++};
++
++/* based on mbedtls' internal pkwrite.h calculations */
++#define APK_ENC_KEY_MAX_LENGTH          (38 + 2 * MBEDTLS_MPI_MAX_SIZE)
++
++#endif
+diff --git a/src/crypto_mbedtls.c b/src/crypto_mbedtls.c
+new file mode 100644
+index 00000000..73d60e9d
+--- /dev/null
++++ b/src/crypto_mbedtls.c
+@@ -0,0 +1,285 @@
++#include <errno.h>
++#include <stdio.h>
++#include <stdlib.h>
++#include <fcntl.h>
++#include <sys/random.h>
++#include <sys/stat.h>
++#include <unistd.h>
++
++#include <mbedtls/platform.h>
++#include <mbedtls/md.h>
++#include <mbedtls/pk.h>
++#include <mbedtls/entropy.h>
++
++#ifdef MBEDTLS_PSA_CRYPTO_C
++#include <psa/crypto.h>
++#endif
++
++#include "apk_crypto.h"
++
++static inline const mbedtls_md_type_t apk_digest_alg_to_mbedtls_type(uint8_t alg) {
++	switch (alg) {
++	case APK_DIGEST_NONE:	return MBEDTLS_MD_NONE;
++	case APK_DIGEST_MD5:	return MBEDTLS_MD_MD5;
++	case APK_DIGEST_SHA1:	return MBEDTLS_MD_SHA1;
++	case APK_DIGEST_SHA256_160:
++	case APK_DIGEST_SHA256:	return MBEDTLS_MD_SHA256;
++	case APK_DIGEST_SHA512:	return MBEDTLS_MD_SHA512;
++	default:
++		assert(alg);
++		return MBEDTLS_MD_NONE;
++	}
++}
++
++static inline const mbedtls_md_info_t *apk_digest_alg_to_mdinfo(uint8_t alg)
++{
++	return mbedtls_md_info_from_type(
++		apk_digest_alg_to_mbedtls_type(alg)
++	);
++}
++
++int apk_digest_calc(struct apk_digest *d, uint8_t alg, const void *ptr, size_t sz)
++{
++	if (mbedtls_md(apk_digest_alg_to_mdinfo(alg), ptr, sz, d->data))
++		return -APKE_CRYPTO_ERROR;
++
++	apk_digest_set(d, alg);
++	return 0;
++}
++
++int apk_digest_ctx_init(struct apk_digest_ctx *dctx, uint8_t alg)
++{
++	dctx->alg = alg;
++
++	mbedtls_md_init(&dctx->mdctx);
++	if (alg == APK_DIGEST_NONE) return 0;
++	if (mbedtls_md_setup(&dctx->mdctx, apk_digest_alg_to_mdinfo(alg), 0) ||
++		mbedtls_md_starts(&dctx->mdctx))
++		return -APKE_CRYPTO_ERROR;
++
++	return 0;
++}
++
++int apk_digest_ctx_reset(struct apk_digest_ctx *dctx)
++{
++	if (dctx->alg == APK_DIGEST_NONE) return 0;
++	if (mbedtls_md_starts(&dctx->mdctx)) return -APKE_CRYPTO_ERROR;
++	return 0;
++}
++
++int apk_digest_ctx_reset_alg(struct apk_digest_ctx *dctx, uint8_t alg)
++{
++	mbedtls_md_free(&dctx->mdctx);
++
++	dctx->alg = alg;
++	if (alg == APK_DIGEST_NONE) return 0;
++	if (mbedtls_md_setup(&dctx->mdctx, apk_digest_alg_to_mdinfo(alg), 0) ||
++		mbedtls_md_starts(&dctx->mdctx))
++		return -APKE_CRYPTO_ERROR;
++
++	return 0;
++}
++
++void apk_digest_ctx_free(struct apk_digest_ctx *dctx)
++{
++	mbedtls_md_free(&dctx->mdctx);
++}
++
++int apk_digest_ctx_update(struct apk_digest_ctx *dctx, const void *ptr, size_t sz)
++{
++	if (dctx->alg == APK_DIGEST_NONE) return 0;
++	return mbedtls_md_update(&dctx->mdctx, ptr, sz) == 0 ? 0 : -APKE_CRYPTO_ERROR;
++}
++
++int apk_digest_ctx_final(struct apk_digest_ctx *dctx, struct apk_digest *d)
++{
++	if (mbedtls_md_finish(&dctx->mdctx, d->data)) {
++		apk_digest_reset(d);
++		return -APKE_CRYPTO_ERROR;
++	}
++
++	d->alg = dctx->alg;
++	d->len = apk_digest_alg_len(d->alg);
++	return 0;
++}
++
++static int apk_load_file_at(int dirfd, const char *fn, unsigned char **buf, size_t *n)
++{
++	struct stat stats;
++	size_t size;
++	int fd;
++
++	if ((fd = openat(dirfd, fn, O_RDONLY|O_CLOEXEC)) < 0)
++		return -errno;
++
++	if (fstat(fd, &stats)) {
++		close(fd);
++		return -errno;
++	}
++
++	size = (size_t)stats.st_size;
++	*n = size;
++
++	if (size == 0 || (*buf = mbedtls_calloc(1, size + 1)) == NULL)
++		return MBEDTLS_ERR_PK_ALLOC_FAILED;
++
++	if (read(fd, *buf, size) != size) {
++		close(fd);
++
++		mbedtls_platform_zeroize(*buf, size);
++		mbedtls_free(*buf);
++
++		return MBEDTLS_ERR_PK_FILE_IO_ERROR;
++	}
++	close(fd);
++
++	(*buf)[size] = '\0';
++
++	if (strstr((const char *) *buf, "-----BEGIN ") != NULL) {
++		++*n;
++	}
++
++	return 0;
++}
++
++static int apk_pkey_init(struct apk_pkey *pkey)
++{
++	unsigned char dig[APK_DIGEST_MAX_LENGTH];
++	unsigned char pub[APK_ENC_KEY_MAX_LENGTH] = {};
++	unsigned char *c;
++	int len, r = -APKE_CRYPTO_ERROR;
++
++	c = pub + APK_ENC_KEY_MAX_LENGTH;
++
++	// key is written backwards into pub starting at c!
++	if ((len = mbedtls_pk_write_pubkey(&c, pub, &pkey->key)) < 0) return -APKE_CRYPTO_ERROR;
++	if (!mbedtls_md(apk_digest_alg_to_mdinfo(APK_DIGEST_SHA512), c, len, dig)) {
++		memcpy(pkey->id, dig, sizeof pkey->id);
++		r = 0;
++	}
++
++	return r;
++}
++
++void apk_pkey_free(struct apk_pkey *pkey)
++{
++	mbedtls_pk_free(&pkey->key);
++}
++
++static int apk_random(void *ctx, unsigned char *out, size_t len)
++{
++	return (int)getrandom(out, len, 0);
++}
++
++#if MBEDTLS_VERSION_NUMBER >= 0x03000000
++static inline int apk_mbedtls_parse_privkey(struct apk_pkey *pkey, const unsigned char *buf, size_t blen)
++{
++	return mbedtls_pk_parse_key(&pkey->key, buf, blen, NULL, 0, apk_random, NULL);
++}
++static inline int apk_mbedtls_sign(struct apk_digest_ctx *dctx, struct apk_digest *dig,
++				   unsigned char *sig, size_t *sig_len)
++{
++	return mbedtls_pk_sign(&dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
++			       (const unsigned char *)&dig->data, dig->len, sig, sizeof *sig, sig_len,
++			       apk_random, NULL);
++}
++#else
++static inline int apk_mbedtls_parse_privkey(struct apk_pkey *pkey, const unsigned char *buf, size_t blen)
++{
++	return mbedtls_pk_parse_key(&pkey->key, buf, blen, NULL, 0);
++}
++static inline int apk_mbedtls_sign(struct apk_digest_ctx *dctx, struct apk_digest *dig,
++				   unsigned char *sig, size_t *sig_len)
++{
++	return mbedtls_pk_sign(&dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
++			       (const unsigned char *)&dig->data, dig->len, sig, sig_len, apk_random, NULL);
++}
++#endif
++
++int apk_pkey_load(struct apk_pkey *pkey, int dirfd, const char *fn)
++{
++	unsigned char *buf = NULL;
++	size_t blen = 0;
++	int ret;
++
++	if (apk_load_file_at(dirfd, fn, &buf, &blen))
++		return -APKE_CRYPTO_ERROR;
++
++	mbedtls_pk_init(&pkey->key);
++	if ((ret = mbedtls_pk_parse_public_key(&pkey->key, buf, blen)) != 0)
++		ret = apk_mbedtls_parse_privkey(pkey, buf, blen);
++
++	mbedtls_platform_zeroize(buf, blen);
++	mbedtls_free(buf);
++	if (ret != 0)
++		return -APKE_CRYPTO_KEY_FORMAT;
++
++	return apk_pkey_init(pkey);
++}
++
++int apk_sign_start(struct apk_digest_ctx *dctx, uint8_t alg, struct apk_pkey *pkey)
++{
++	if (apk_digest_ctx_reset_alg(dctx, alg))
++		return -APKE_CRYPTO_ERROR;
++
++	dctx->sigver_key = pkey;
++
++	return 0;
++}
++
++int apk_sign(struct apk_digest_ctx *dctx, void *sig, size_t *len)
++{
++	struct apk_digest dig;
++	int r = 0;
++
++	if (apk_digest_ctx_final(dctx, &dig))
++		return -APKE_SIGNATURE_GEN_FAILURE;
++
++	if (apk_mbedtls_sign(dctx, &dig, sig, len))
++		r = -APKE_SIGNATURE_GEN_FAILURE;
++
++	dctx->sigver_key = NULL;
++	return r;
++}
++
++int apk_verify_start(struct apk_digest_ctx *dctx, uint8_t alg, struct apk_pkey *pkey)
++{
++	if (apk_digest_ctx_reset_alg(dctx, alg))
++		return -APKE_CRYPTO_ERROR;
++
++	dctx->sigver_key = pkey;
++
++	return 0;
++}
++
++int apk_verify(struct apk_digest_ctx *dctx, void *sig, size_t len)
++{
++	struct apk_digest dig;
++	int r = 0;
++
++	if (apk_digest_ctx_final(dctx, &dig))
++		return -APKE_SIGNATURE_GEN_FAILURE;
++
++	if (mbedtls_pk_verify(&dctx->sigver_key->key, apk_digest_alg_to_mbedtls_type(dctx->alg),
++			      (const unsigned char *)&dig.data, dig.len, sig, len))
++		r = -APKE_SIGNATURE_INVALID;
++
++	dctx->sigver_key = NULL;
++	return r;
++}
++
++static void apk_crypto_cleanup(void)
++{
++#ifdef MBEDTLS_PSA_CRYPTO_C
++	mbedtls_psa_crypto_free();
++#endif
++}
++
++void apk_crypto_init(void)
++{
++	atexit(apk_crypto_cleanup);
++	
++#ifdef MBEDTLS_PSA_CRYPTO_C
++	psa_crypto_init();
++#endif
++}
+diff --git a/src/meson.build b/src/meson.build
+index 38e9d3b0..e1204fc0 100644
+--- a/src/meson.build
++++ b/src/meson.build
+@@ -1,3 +1,4 @@
++crypto_backend = get_option('crypto_backend')
+ url_backend = get_option('url_backend')
+ 
+ libapk_so_version = '2.99.0'
+@@ -15,7 +16,7 @@ libapk_src = [
+ 	'common.c',
+ 	'context.c',
+ 	'crypto.c',
+-	'crypto_openssl.c',
++        'crypto_ at 0@.c'.format(crypto_backend),
+ 	'ctype.c',
+ 	'database.c',
+ 	'extract_v2.c',
+@@ -40,7 +41,7 @@ libapk_headers = [
+ 	'apk_atom.h',
+ 	'apk_blob.h',
+ 	'apk_crypto.h',
+-	'apk_crypto_openssl.h',
++        'apk_crypto_ at 0@.h'.format(crypto_backend),
+ 	'apk_ctype.h',
+ 	'apk_database.h',
+ 	'apk_defines.h',
+@@ -89,6 +90,17 @@ apk_src = [
+ 	'applet.c',
+ ]
+ 
++apk_cargs = [
++	'-DAPK_VERSION="' + meson.project_version() + '"',
++	'-D_ATFILE_SOURCE',
++]
++
++if crypto_backend == 'openssl'
++	apk_cargs += [ '-DCRYPTO_USE_OPENSSL' ]
++elif crypto_backend == 'mbedtls'
++	apk_cargs += [ '-DCRYPTO_USE_MBEDTLS' ]
++endif
++
+ if lua_bin.found()
+ 	genhelp_script = files('genhelp.lua')
+ 	genhelp_args = [lua_bin, genhelp_script, '@INPUT@']
+@@ -115,11 +127,6 @@ endif
+ 
+ apk_src += [ generated_help ]
+ 
+-apk_cargs = [
+-	'-DAPK_VERSION="' + meson.project_version() + '"',
+-	'-D_ATFILE_SOURCE',
+-]
+-
+ apk_arch_prefix = get_option('arch_prefix')
+ if apk_arch_prefix != ''
+ 	apk_cargs += ['-DAPK_ARCH_PREFIX="@0@"'.format(apk_arch_prefix)]
+-- 
+GitLab
+
+
+From 34bb1021284dccbf97f02b0a0bb9e751b8887cad Mon Sep 17 00:00:00 2001
+From: Christian Marangi <ansuelsmth at gmail.com>
+Date: Tue, 16 Apr 2024 17:56:45 +0200
+Subject: [PATCH 4/4] add option to configure crypto backend in legacy make
+ build system
+
+Define CRYPTO to select mbedtls as alternative crypto backend. By
+default openssl is used.
+
+Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
+---
+ src/Makefile | 20 +++++++++++++++-----
+ 1 file changed, 15 insertions(+), 5 deletions(-)
+
+diff --git a/src/Makefile b/src/Makefile
+index efdc68df..97db0e72 100644
+--- a/src/Makefile
++++ b/src/Makefile
+@@ -20,9 +20,9 @@ libapk_soname		:= 2.99.0
+ libapk_so		:= $(obj)/libapk.so.$(libapk_soname)
+ libapk.so.$(libapk_soname)-objs := \
+ 	adb.o adb_comp.o adb_walk_adb.o adb_walk_genadb.o adb_walk_gentext.o adb_walk_text.o apk_adb.o \
+-	atom.o blob.o commit.o common.o context.o crypto.o crypto_openssl.o ctype.o database.o hash.o \
+-	extract_v2.o extract_v3.o fs_fsys.o fs_uvol.o io.o io_gunzip.o tar.o package.o pathbuilder.o \
+-	print.o solver.o trust.o version.o
++	atom.o blob.o commit.o common.o context.o crypto.o ctype.o database.o hash.o extract_v2.o \
++	extract_v3.o fs_fsys.o fs_uvol.o io.o io_gunzip.o tar.o package.o pathbuilder.o print.o \
++	solver.o trust.o version.o
+ 
+ libapk.so.$(libapk_soname)-libs :=
+ 
+@@ -34,6 +34,16 @@ libapk.so.$(libapk_soname)-objs += io_url_libfetch.o
+ libapk.so.$(libapk_soname)-libs += libfetch/libfetch.a
+ endif
+ 
++ifeq ($(CRYPTO),mbedtls)
++CRYPTO_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags mbedtls mbedcrypto) -DCRYPTO_USE_MBEDTLS
++CRYPTO_LIBS		:= $(shell $(PKG_CONFIG) --libs mbedtls mbedcrypto)
++libapk.so.$(libapk_soname)-objs += crypto_mbedtls.o
++else
++CRYPTO_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags openssl) -DCRYPTO_USE_OPENSSL
++CRYPTO_LIBS		:= $(shell $(PKG_CONFIG) --libs openssl)
++libapk.so.$(libapk_soname)-objs += crypto_openssl.o
++endif
++
+ # ZSTD support can be disabled
+ ifneq ($(ZSTD),no)
+ ZSTD_CFLAGS		:= $(shell $(PKG_CONFIG) --cflags libzstd)
+@@ -100,9 +110,9 @@ LIBS_apk.static		:= -Wl,--as-needed -ldl -Wl,--no-as-needed
+ LDFLAGS_apk		+= -L$(obj)
+ LDFLAGS_apk-test	+= -L$(obj)
+ 
+-CFLAGS_ALL		+= $(OPENSSL_CFLAGS) $(ZLIB_CFLAGS) $(ZSTD_CFLAGS)
++CFLAGS_ALL		+= $(CRYPTO_CFLAGS) $(ZLIB_CFLAGS) $(ZSTD_CFLAGS)
+ LIBS			:= -Wl,--as-needed \
+-				$(OPENSSL_LIBS) $(ZLIB_LIBS) $(ZSTD_LIBS) \
++				$(CRYPTO_LIBS) $(ZLIB_LIBS) $(ZSTD_LIBS) \
+ 			   -Wl,--no-as-needed
+ 
+ # Help generation
+-- 
+GitLab



From lede-commits at lists.infradead.org  Mon Apr 29 03:00:27 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 06:00:27 -0400
Subject: [openwrt/openwrt]  mediatek: fix remaining invalid MT7531 switch reg
 IDs
In-Reply-To: <171438482714.3336375.1507631739978404290@git-01.infra.openwrt.org>
References: <171438482714.3336375.1507631739978404290@git-01.infra.openwrt.org>
Message-ID: <mailman.31739.1714384831.1280.lede-commits@lists.infradead.org>

nbd pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/ed29c3197257a89645e43ef74c90e562c5103b4d

commit ed29c3197257a89645e43ef74c90e562c5103b4d
Author: Felix Fietkau <nbd at nbd.name>
AuthorDate: Mon Apr 29 11:56:26 2024 +0200

    mediatek: fix remaining invalid MT7531 switch reg IDs
    
    See commit 8b66f1a06d05afbc1450978f6e20516c8308da25:
    "mediatek: correct address of MT753x switch IC"
    
    Fixes: ac8bfe316b81 ("generic: 6.1, 6.6: mt7530: import accepted patches")
    Signed-off-by: Felix Fietkau <nbd at nbd.name>
---
 .../107-mt7622_fix_dts_mt7531_reg.patch            | 28 ++++++++++++++++++++++
 1 file changed, 28 insertions(+)

diff --git a/target/linux/mediatek/patches-6.6/107-mt7622_fix_dts_mt7531_reg.patch b/target/linux/mediatek/patches-6.6/107-mt7622_fix_dts_mt7531_reg.patch
new file mode 100644
index 0000000000..75a9c55f92
--- /dev/null
+++ b/target/linux/mediatek/patches-6.6/107-mt7622_fix_dts_mt7531_reg.patch
@@ -0,0 +1,28 @@
+--- a/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
++++ b/arch/arm64/boot/dts/mediatek/mt7622-bananapi-bpi-r64.dts
+@@ -145,9 +145,9 @@
+ 		#address-cells = <1>;
+ 		#size-cells = <0>;
+ 
+-		switch at 0 {
++		switch at 1f {
+ 			compatible = "mediatek,mt7531";
+-			reg = <0>;
++			reg = <31>;
+ 			interrupt-controller;
+ 			#interrupt-cells = <1>;
+ 			interrupt-parent = <&pio>;
+--- a/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
++++ b/arch/arm64/boot/dts/mediatek/mt7622-rfb1.dts
+@@ -117,9 +117,9 @@
+ 		#address-cells = <1>;
+ 		#size-cells = <0>;
+ 
+-		switch at 0 {
++		switch at 1f {
+ 			compatible = "mediatek,mt7531";
+-			reg = <0>;
++			reg = <31>;
+ 			reset-gpios = <&pio 54 0>;
+ 
+ 			ports {



From lede-commits at lists.infradead.org  Mon Apr 29 04:08:44 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 07:08:44 -0400
Subject: [openwrt/openwrt]  arm-trusted-firmware-mvebu: refresh cryptopp hash
In-Reply-To: <171438892310.3548716.1615213107275679736@git-01.infra.openwrt.org>
References: <171438892310.3548716.1615213107275679736@git-01.infra.openwrt.org>
Message-ID: <mailman.31762.1714388929.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5c833329cee88cfe60c8da0220e89484cb675802

commit 5c833329cee88cfe60c8da0220e89484cb675802
Author: Robert Marko <robert.marko at sartura.hr>
AuthorDate: Mon Apr 29 12:04:18 2024 +0200

    arm-trusted-firmware-mvebu: refresh cryptopp hash
    
    Well, it seems that cryptopp hash was never refreshed since calling
    make package/boot/arm-trusted-firmware-mvebu/check FIXUP=1 V=s does not
    actually refresh the download calls hashes so refresh it manually.
    
    Signed-off-by: Robert Marko <robert.marko at sartura.hr>
---
 package/boot/arm-trusted-firmware-mvebu/Makefile | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index 941502ab22..047c8db55e 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -159,7 +159,7 @@ define Download/cryptopp
   PROTO:=git
   URL:=https://github.com/weidai11/cryptopp.git
   SOURCE_VERSION:=4d0cad5401d1a2c998b314bc89288c9620d3021d
-  MIRROR_HASH:=74ec9e48ee04b9f2d9a1d8c4f2392ed0ab52780d7af0f70405d7bbb23d1504fa
+  MIRROR_HASH:=6c53c8b4dfa07df0c5915a90c20f70c64d150b652cf5ac52e2eae08c5a9cc7cd
   SUBDIR:=$(CRYPTOPP_NAME)
 endef
 



From lede-commits at lists.infradead.org  Mon Apr 29 04:08:43 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 07:08:43 -0400
Subject: [openwrt/openwrt]  arm-trusted-firmware-mvebu: use SOURCE_VERSION
 instead of VERSION
In-Reply-To: <171438892310.3548716.1615213107275679736@git-01.infra.openwrt.org>
References: <171438892310.3548716.1615213107275679736@git-01.infra.openwrt.org>
Message-ID: <mailman.31763.1714388930.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/e9097466658d0fe58a9f5bb34f77b1c4f11a2ba7

commit e9097466658d0fe58a9f5bb34f77b1c4f11a2ba7
Author: Robert Marko <robert.marko at sartura.hr>
AuthorDate: Mon Apr 29 11:58:17 2024 +0200

    arm-trusted-firmware-mvebu: use SOURCE_VERSION instead of VERSION
    
    Since ("download: don't overwrite VERSION variable") trying to download the
    required sources for mvebu ATF will fail with:
    Makefile:247: *** Download/mox-boot-builder is missing the SOURCE_VERSION field..  Stop.
    
    This also broke the buildbot mvebu/cortex-a53 builds.
    
    So, fix it by switching to SOURCE_VERSION instead.
    
    Signed-off-by: Robert Marko <robert.marko at sartura.hr>
---
 package/boot/arm-trusted-firmware-mvebu/Makefile | 10 +++++-----
 1 file changed, 5 insertions(+), 5 deletions(-)

diff --git a/package/boot/arm-trusted-firmware-mvebu/Makefile b/package/boot/arm-trusted-firmware-mvebu/Makefile
index 05e276aaaf..941502ab22 100644
--- a/package/boot/arm-trusted-firmware-mvebu/Makefile
+++ b/package/boot/arm-trusted-firmware-mvebu/Makefile
@@ -8,7 +8,7 @@
 include $(TOPDIR)/rules.mk
 
 PKG_VERSION:=2.9
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 PKG_HASH:=76a66a1de0c01aeb83dfc7b72b51173fe62c6e51d6fca17cc562393117bed08b
 
 PKG_MAINTAINER:=Vladimir Vid <vladimir.vid at sartura.hr>
@@ -145,7 +145,7 @@ define Download/a3700-utils
   FILE:=$(A3700_UTILS_SOURCE)
   PROTO:=git
   URL:=https://github.com/MarvellEmbeddedProcessors/A3700-utils-marvell.git
-  VERSION:=a3e1c67bb378e1d8a938e1b826cb602af83628d2
+  SOURCE_VERSION:=a3e1c67bb378e1d8a938e1b826cb602af83628d2
   MIRROR_HASH:=0e6b8ef6423dcb52a5e282669a8aeebc6eea2d45a7c3a2c9a2fc7a749b3275a7
   SUBDIR:=$(A3700_UTILS_NAME)
 endef
@@ -158,7 +158,7 @@ define Download/cryptopp
   FILE:=$(CRYPTOPP_SOURCE)
   PROTO:=git
   URL:=https://github.com/weidai11/cryptopp.git
-  VERSION:=4d0cad5401d1a2c998b314bc89288c9620d3021d
+  SOURCE_VERSION:=4d0cad5401d1a2c998b314bc89288c9620d3021d
   MIRROR_HASH:=74ec9e48ee04b9f2d9a1d8c4f2392ed0ab52780d7af0f70405d7bbb23d1504fa
   SUBDIR:=$(CRYPTOPP_NAME)
 endef
@@ -171,7 +171,7 @@ define Download/mv-ddr-marvell
   FILE:=$(MV_DDR_SOURCE)
   PROTO:=git
   URL:=https://github.com/MarvellEmbeddedProcessors/mv-ddr-marvell.git
-  VERSION:=541616bc5d25a0167c9901546255c55973e2c0f0
+  SOURCE_VERSION:=541616bc5d25a0167c9901546255c55973e2c0f0
   MIRROR_HASH:=9e86a986c7400ed1a72165a88150b6c494ebd87303b16314b43e5785e3f13068
   SUBDIR:=$(MV_DDR_NAME)
 endef
@@ -185,7 +185,7 @@ define Download/mox-boot-builder
   PROTO:=git
   SUBMODULES:=skip
   URL:=https://gitlab.nic.cz/turris/mox-boot-builder.git
-  VERSION:=604f8f51d97b4e59fa6d1e579101daa194d6ed2d
+  SOURCE_VERSION:=604f8f51d97b4e59fa6d1e579101daa194d6ed2d
   MIRROR_HASH:=b09337a7dde140f57e40133b6e7b7e1eb338e7cea9b15a3af6874824462f15f7
   SUBDIR:=$(MOX_BB_NAME)
 endef



From lede-commits at lists.infradead.org  Mon Apr 29 12:57:52 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 15:57:52 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq60xx: mute warning on bootcount
 enable compile
In-Reply-To: <171442067291.995757.1633623669254010006@git-01.infra.openwrt.org>
References: <171442067291.995757.1633623669254010006@git-01.infra.openwrt.org>
Message-ID: <mailman.31960.1714420680.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/284735246c12d7ef2d972847fc177b4861b94408

commit 284735246c12d7ef2d972847fc177b4861b94408
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Apr 29 21:54:39 2024 +0200

    qualcommax: ipq60xx: mute warning on bootcount enable compile
    
    ipq60xx bootcount script include /lib/functions that produce warning
    when the script is enabled on image compilation. This script is already
    included by /etc/rc.common hence it's not needed.
    
    While at it also fix the format of the switch case.
    
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 .../linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount   | 10 ++++------
 1 file changed, 4 insertions(+), 6 deletions(-)

diff --git a/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount b/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount
index 6347976372..b34fbd82d7 100755
--- a/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount
+++ b/target/linux/qualcommax/ipq60xx/base-files/etc/init.d/bootcount
@@ -2,13 +2,11 @@
 
 START=99
 
-. /lib/functions.sh
-
 boot() {
 	case $(board_name) in
-		yuncore,fap650)
-			fw_setenv owrt_bootcount 0
-		;;
-		esac
+	yuncore,fap650)
+		fw_setenv owrt_bootcount 0
+	;;
+	esac
 }
 



From lede-commits at lists.infradead.org  Mon Apr 29 13:57:13 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 16:57:13 -0400
Subject: [openwrt/openwrt]  toolchain: glibc: update to glibc 2.38
In-Reply-To: <171442423320.1200815.5244424980595357548@git-01.infra.openwrt.org>
References: <171442423320.1200815.5244424980595357548@git-01.infra.openwrt.org>
Message-ID: <mailman.31969.1714424237.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/5ee2b6fe57857ca479f86a778811ecb3230e3e83

commit 5ee2b6fe57857ca479f86a778811ecb3230e3e83
Author: Kazuki H <kazukih0205 at gmail.com>
AuthorDate: Fri Dec 22 23:58:16 2023 +0900

    toolchain: glibc: update to glibc 2.38
    
    This updates glibc to version 2.38.
    
    Add --enable-crypt since the crypt function got disabled in 2.38, but we
    still need it.
    Also add the newly introduced --enable-fortify-source flag and hook it up
    to the build system.
    
    Switch to .zst archive while at it.
    
    Signed-off-by: Kazuki H <kazukih0205 at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/14259
    [ switch to .zst and fix mirror HASH ]
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 toolchain/glibc/common.mk                                     | 11 +++++++----
 ...Revert-Disallow-use-of-DES-encryption-functions-in-n.patch |  6 +++---
 toolchain/glibc/patches/200-add-dl-search-paths.patch         |  2 +-
 3 files changed, 11 insertions(+), 8 deletions(-)

diff --git a/toolchain/glibc/common.mk b/toolchain/glibc/common.mk
index 65e9e0c324..79a7a0131d 100644
--- a/toolchain/glibc/common.mk
+++ b/toolchain/glibc/common.mk
@@ -7,15 +7,15 @@
 include $(TOPDIR)/rules.mk
 
 PKG_NAME:=glibc
-PKG_VERSION:=2.37
+PKG_VERSION:=2.38
 PKG_RELEASE:=1
 
 PKG_SOURCE_PROTO:=git
 PKG_SOURCE_SUBDIR:=$(PKG_NAME)-$(PKG_VERSION)
-PKG_SOURCE_VERSION:=eee7525d35ec16bbe81435e41079ab72519d825c
-PKG_MIRROR_HASH:=fad5a67d9622b75bce5e3e8c91b07a6df0bf8b21cb001a6d06019a6ce4cff31f
+PKG_SOURCE_VERSION:=cfe121910013a46e2477562282c56ae8062089aa
+PKG_MIRROR_HASH:=99b9beb283d644caacea12fe87dd7f0a0141ff26349ee500a78047aba3f5be5c
 PKG_SOURCE_URL:=https://sourceware.org/git/glibc.git
-PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.xz
+PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION)-$(PKG_SOURCE_VERSION).tar.zst
 PKG_CPE_ID:=cpe:/a:gnu:glibc
 
 HOST_BUILD_DIR:=$(BUILD_DIR_TOOLCHAIN)/$(PKG_SOURCE_SUBDIR)
@@ -61,11 +61,14 @@ GLIBC_CONFIGURE:= \
 		--without-gd \
 		--without-cvs \
 		--enable-add-ons \
+		--enable-crypt \
 		--$(if $(CONFIG_SOFT_FLOAT),without,with)-fp \
 		  $(if $(CONFIG_PKG_CC_STACKPROTECTOR_REGULAR),--enable-stack-protector=yes) \
 		  $(if $(CONFIG_PKG_CC_STACKPROTECTOR_STRONG),--enable-stack-protector=strong) \
 		  $(if $(CONFIG_PKG_CC_STACKPROTECTOR_ALL),--enable-stack-protector=all) \
 		  $(if $(CONFIG_PKG_RELRO_FULL),--enable-bind-now) \
+		  $(if $(CONFIG_PKG_FORTIFY_SOURCE_1),--enable-fortify-source=1) \
+		  $(if $(CONFIG_PKG_FORTIFY_SOURCE_2),--enable-fortify-source=2) \
 		--enable-kernel=5.15.0
 
 export libc_cv_ssp=no
diff --git a/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch b/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch
index c9db703938..771cb4c374 100644
--- a/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch
+++ b/toolchain/glibc/patches/050-Revert-Disallow-use-of-DES-encryption-functions-in-n.patch
@@ -82,7 +82,7 @@ provides them.
  int totfails = 0;
  
  int main (int argc, char *argv[]);
-@@ -119,13 +103,3 @@ put8 (char *cp)
+@@ -123,13 +107,3 @@ put8 (char *cp)
  	  printf("%02x", t);
  	}
  }
@@ -469,7 +469,7 @@ provides them.
  * Encode Binary Data::          Encoding and Decoding of Binary Data.
  * Argz and Envz Vectors::       Null-separated string vectors.
  @end menu
-@@ -2423,73 +2423,73 @@ functionality under a different name, su
+@@ -2512,73 +2512,73 @@ functionality under a different name, su
  systems it may be in @file{strings.h} instead.
  @end deftypefun
  
@@ -627,7 +627,7 @@ provides them.
     range [FROM - N + 1, FROM - 1].  If N is odd the first byte in FROM
 --- a/stdlib/stdlib.h
 +++ b/stdlib/stdlib.h
-@@ -984,6 +984,12 @@ extern int getsubopt (char **__restrict
+@@ -1103,6 +1103,12 @@ extern int getsubopt (char **__restrict
  #endif
  
  
diff --git a/toolchain/glibc/patches/200-add-dl-search-paths.patch b/toolchain/glibc/patches/200-add-dl-search-paths.patch
index e927d86f23..15106541ca 100644
--- a/toolchain/glibc/patches/200-add-dl-search-paths.patch
+++ b/toolchain/glibc/patches/200-add-dl-search-paths.patch
@@ -2,7 +2,7 @@ add /usr/lib to default search path for the dynamic linker
 
 --- a/Makeconfig
 +++ b/Makeconfig
-@@ -631,6 +631,9 @@ else
+@@ -632,6 +632,9 @@ else
  default-rpath = $(libdir)
  endif
  



From lede-commits at lists.infradead.org  Mon Apr 29 14:25:24 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 17:25:24 -0400
Subject: [openwrt/openwrt]  procd: make mDNS TXT record parsing more solid
In-Reply-To: <171442592472.1275044.14518926917815187242@git-01.infra.openwrt.org>
References: <171442592472.1275044.14518926917815187242@git-01.infra.openwrt.org>
Message-ID: <mailman.31972.1714425930.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/4b043047132de0b3d90619d538f103af6153fa5a

commit 4b043047132de0b3d90619d538f103af6153fa5a
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Apr 29 21:17:31 2024 +0200

    procd: make mDNS TXT record parsing more solid
    
    mDNS broadcast can't accept empty TXT record and would fail
    registration.
    
    Current procd_add_mdns_service checks only if the first passed arg is
    empty but don't make any verification on the other args permittins
    insertion of empty values in TXT record.
    
    Example:
    
            procd_add_mdns "blah" \
                                    "tcp" "50" \
                                    "1" \
                                    "" \
                                    "3"
    
    Produce:
    
    { "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "", "3" ] } }
    
    The middle empty TXT record should never be included as it's empty.
    
    This can happen with scripts that make fragile parsing and include
    variables even if they are empty.
    
    Prevent this and make the TXT record more solid by checking every
    provided TXT record and include only the non-empty ones.
    
    The fixed JSON is the following:
    
    { "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "3" ] } }
    
    Fixes: b0d9dcf84dd0 ("procd: update to latest git HEAD")
    Reported-by: Paul Donald <newtwen at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15331
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
---
 package/system/procd/files/procd.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 8ee25f4f08..5dc8ec42b7 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -592,18 +592,21 @@ _procd_set_config_changed() {
 }
 
 procd_add_mdns_service() {
-	local service proto port
+	local service proto port txt_count=0
 	service=$1; shift
 	proto=$1; shift
 	port=$1; shift
 	json_add_object "${service}_$port"
 	json_add_string "service" "_$service._$proto.local"
 	json_add_int port "$port"
-	[ -n "$1" ] && {
-		json_add_array txt
-		for txt in "$@"; do json_add_string "" "$txt"; done
-		json_select ..
-	}
+	for txt in "$@"; do
+		[ -z "$txt" ] && continue
+		txt_count=$((txt_count+1))
+		[ $txt_count -eq 1 ] && json_add_array txt
+		json_add_string "" "$txt"
+	done
+	[ $txt_count -gt 0 ] && json_select ..
+
 	json_select ..
 }
 



From lede-commits at lists.infradead.org  Mon Apr 29 14:30:18 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 17:30:18 -0400
Subject: [openwrt/openwrt]  procd: make mDNS TXT record parsing more solid
In-Reply-To: <171442621868.1287567.12497995174737356184@git-01.infra.openwrt.org>
References: <171442621868.1287567.12497995174737356184@git-01.infra.openwrt.org>
Message-ID: <mailman.31973.1714426222.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/2541ff391fc88d2fc378c4fa9374f8b1a3e4e9b9

commit 2541ff391fc88d2fc378c4fa9374f8b1a3e4e9b9
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Apr 29 21:17:31 2024 +0200

    procd: make mDNS TXT record parsing more solid
    
    mDNS broadcast can't accept empty TXT record and would fail
    registration.
    
    Current procd_add_mdns_service checks only if the first passed arg is
    empty but don't make any verification on the other args permittins
    insertion of empty values in TXT record.
    
    Example:
    
            procd_add_mdns "blah" \
                                    "tcp" "50" \
                                    "1" \
                                    "" \
                                    "3"
    
    Produce:
    
    { "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "", "3" ] } }
    
    The middle empty TXT record should never be included as it's empty.
    
    This can happen with scripts that make fragile parsing and include
    variables even if they are empty.
    
    Prevent this and make the TXT record more solid by checking every
    provided TXT record and include only the non-empty ones.
    
    The fixed JSON is the following:
    
    { "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "3" ] } }
    
    Fixes: b0d9dcf84dd0 ("procd: update to latest git HEAD")
    Reported-by: Paul Donald <newtwen at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15331
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 4b043047132de0b3d90619d538f103af6153fa5a)
---
 package/system/procd/files/procd.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 5148b2f03c..d834fa601a 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -570,18 +570,21 @@ _procd_set_config_changed() {
 }
 
 procd_add_mdns_service() {
-	local service proto port
+	local service proto port txt_count=0
 	service=$1; shift
 	proto=$1; shift
 	port=$1; shift
 	json_add_object "${service}_$port"
 	json_add_string "service" "_$service._$proto.local"
 	json_add_int port "$port"
-	[ -n "$1" ] && {
-		json_add_array txt
-		for txt in "$@"; do json_add_string "" "$txt"; done
-		json_select ..
-	}
+	for txt in "$@"; do
+		[ -z "$txt" ] && continue
+		txt_count=$((txt_count+1))
+		[ $txt_count -eq 1 ] && json_add_array txt
+		json_add_string "" "$txt"
+	done
+	[ $txt_count -gt 0 ] && json_select ..
+
 	json_select ..
 }
 



From lede-commits at lists.infradead.org  Mon Apr 29 14:31:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 17:31:03 -0400
Subject: [openwrt/openwrt]  procd: make mDNS TXT record parsing more solid
In-Reply-To: <171442626349.1290404.18370432913905115306@git-01.infra.openwrt.org>
References: <171442626349.1290404.18370432913905115306@git-01.infra.openwrt.org>
Message-ID: <mailman.31974.1714426267.1280.lede-commits@lists.infradead.org>

ansuel pushed a commit to openwrt/openwrt.git, branch openwrt-22.03:
https://git.openwrt.org/ebb3faf31f7c34d71e8ffbf3e8d94bf92086188e

commit ebb3faf31f7c34d71e8ffbf3e8d94bf92086188e
Author: Christian Marangi <ansuelsmth at gmail.com>
AuthorDate: Mon Apr 29 21:17:31 2024 +0200

    procd: make mDNS TXT record parsing more solid
    
    mDNS broadcast can't accept empty TXT record and would fail
    registration.
    
    Current procd_add_mdns_service checks only if the first passed arg is
    empty but don't make any verification on the other args permittins
    insertion of empty values in TXT record.
    
    Example:
    
            procd_add_mdns "blah" \
                                    "tcp" "50" \
                                    "1" \
                                    "" \
                                    "3"
    
    Produce:
    
    { "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "", "3" ] } }
    
    The middle empty TXT record should never be included as it's empty.
    
    This can happen with scripts that make fragile parsing and include
    variables even if they are empty.
    
    Prevent this and make the TXT record more solid by checking every
    provided TXT record and include only the non-empty ones.
    
    The fixed JSON is the following:
    
    { "blah_50": { "service": "_blah._tcp.local", "port": 50, "txt": [ "1", "3" ] } }
    
    Fixes: b0d9dcf84dd0 ("procd: update to latest git HEAD")
    Reported-by: Paul Donald <newtwen at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15331
    Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
    (cherry picked from commit 4b043047132de0b3d90619d538f103af6153fa5a)
---
 package/system/procd/files/procd.sh | 15 +++++++++------
 1 file changed, 9 insertions(+), 6 deletions(-)

diff --git a/package/system/procd/files/procd.sh b/package/system/procd/files/procd.sh
index 5148b2f03c..d834fa601a 100644
--- a/package/system/procd/files/procd.sh
+++ b/package/system/procd/files/procd.sh
@@ -570,18 +570,21 @@ _procd_set_config_changed() {
 }
 
 procd_add_mdns_service() {
-	local service proto port
+	local service proto port txt_count=0
 	service=$1; shift
 	proto=$1; shift
 	port=$1; shift
 	json_add_object "${service}_$port"
 	json_add_string "service" "_$service._$proto.local"
 	json_add_int port "$port"
-	[ -n "$1" ] && {
-		json_add_array txt
-		for txt in "$@"; do json_add_string "" "$txt"; done
-		json_select ..
-	}
+	for txt in "$@"; do
+		[ -z "$txt" ] && continue
+		txt_count=$((txt_count+1))
+		[ $txt_count -eq 1 ] && json_add_array txt
+		json_add_string "" "$txt"
+	done
+	[ $txt_count -gt 0 ] && json_select ..
+
 	json_select ..
 }
 



From lede-commits at lists.infradead.org  Mon Apr 29 19:29:19 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Mon, 29 Apr 2024 22:29:19 -0400
Subject: [openwrt/openwrt]  mediatek: switch to fitblk for JDCloud RE-CP-03
In-Reply-To: <171444415946.2160086.6394308048930015252@git-01.infra.openwrt.org>
References: <171444415946.2160086.6394308048930015252@git-01.infra.openwrt.org>
Message-ID: <mailman.32014.1714444164.1280.lede-commits@lists.infradead.org>

dangole pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/790082098e3e5541e75b396ea1c78192f416e13f

commit 790082098e3e5541e75b396ea1c78192f416e13f
Author: Tianling Shen <cnsztl at immortalwrt.org>
AuthorDate: Tue Apr 2 18:53:29 2024 +0800

    mediatek: switch to fitblk for JDCloud RE-CP-03
    
    Use the new fitblk driver.
    
    Tested-By: Yangyu Chen <cyy at cyyself.name>
    Signed-off-by: Tianling Shen <cnsztl at immortalwrt.org>
---
 package/boot/uboot-envtools/files/mediatek_filogic       |  8 ++------
 .../patches/441-add-jdcloud_re-cp-03.patch               |  2 +-
 target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts   | 16 ++++++++++++++++
 .../mediatek/filogic/base-files/lib/upgrade/platform.sh  |  5 +----
 4 files changed, 20 insertions(+), 11 deletions(-)

diff --git a/package/boot/uboot-envtools/files/mediatek_filogic b/package/boot/uboot-envtools/files/mediatek_filogic
index 02f43ebc7f..7d46e73dbe 100644
--- a/package/boot/uboot-envtools/files/mediatek_filogic
+++ b/package/boot/uboot-envtools/files/mediatek_filogic
@@ -38,7 +38,8 @@ asus,rt-ax59u)
 	;;
 bananapi,bpi-r3|\
 bananapi,bpi-r3-mini|\
-bananapi,bpi-r4)
+bananapi,bpi-r4|\
+jdcloud,re-cp-03)
 	. /lib/upgrade/common.sh
 
 	bootdev="$(fitblk_get_bootdev)"
@@ -98,11 +99,6 @@ glinet,gl-mt6000)
 glinet,gl-mt3000)
 	ubootenv_add_uci_config "/dev/mtd1" "0x0" "0x80000" "0x20000"
 	;;
-jdcloud,re-cp-03)
-	local envdev=$(find_mmc_part "ubootenv" "mmcblk0")
-	ubootenv_add_uci_config "$envdev" "0x0" "0x40000" "0x40000" "1"
-	ubootenv_add_uci_config "$envdev" "0x40000" "0x40000" "0x40000" "1"
-	;;
 mercusys,mr90x-v1|\
 routerich,ax3000)
 	local envdev=/dev/mtd$(find_mtd_index "u-boot-env")
diff --git a/package/boot/uboot-mediatek/patches/441-add-jdcloud_re-cp-03.patch b/package/boot/uboot-mediatek/patches/441-add-jdcloud_re-cp-03.patch
index e0f3a6e235..dc8dfe0140 100644
--- a/package/boot/uboot-mediatek/patches/441-add-jdcloud_re-cp-03.patch
+++ b/package/boot/uboot-mediatek/patches/441-add-jdcloud_re-cp-03.patch
@@ -271,7 +271,7 @@
 +serverip=192.168.1.254
 +loadaddr=0x46000000
 +console=earlycon=uart8250,mmio32,0x11002000 console=ttyS0
-+bootargs=root=/dev/mmcblk0p65
++bootargs=root=/dev/fit0 rootwait
 +bootcmd=if pstore check ; then run boot_recovery ; else run boot_emmc ; fi
 +bootconf=config-1
 +bootdelay=0
diff --git a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
index b62c2f4215..93a5bb86f3 100644
--- a/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
+++ b/target/linux/mediatek/dts/mt7986a-jdcloud-re-cp-03.dts
@@ -23,7 +23,9 @@
 	};
 
 	chosen {
+		bootargs-override = "root=/dev/fit0 rootwait";
 		stdout-path = "serial0:115200n8";
+		rootdisk = <&emmc_rootdisk>;
 	};
 
 	memory at 40000000 {
@@ -157,6 +159,20 @@
 	vmmc-supply = <&reg_3p3v>;
 	vqmmc-supply = <&reg_1p8v>;
 	status = "okay";
+
+	card at 0 {
+		compatible = "mmc-card";
+		reg = <0>;
+
+		block {
+			compatible = "block-device";
+			partitions {
+				emmc_rootdisk: block-partition-production {
+					partname = "production";
+				};
+			};
+		};
+	};
 };
 
 &pio {
diff --git a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
index 6f69706d79..ee0e8b62d7 100755
--- a/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
+++ b/target/linux/mediatek/filogic/base-files/lib/upgrade/platform.sh
@@ -83,6 +83,7 @@ platform_do_upgrade() {
 	bananapi,bpi-r3|\
 	bananapi,bpi-r3-mini|\
 	bananapi,bpi-r4|\
+	jdcloud,re-cp-03|\
 	tplink,tl-xdr4288|\
 	tplink,tl-xdr6086|\
 	tplink,tl-xdr6088|\
@@ -140,10 +141,6 @@ platform_do_upgrade() {
 		CI_KERNPART="fit"
 		nand_do_upgrade "$1"
 		;;
-	jdcloud,re-cp-03)
-		CI_KERNPART="production"
-		emmc_do_upgrade "$1"
-		;;
 	mercusys,mr90x-v1)
 		CI_UBIPART="ubi0"
 		nand_do_upgrade "$1"



From lede-commits at lists.infradead.org  Tue Apr 30 02:08:49 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 05:08:49 -0400
Subject: [openwrt/openwrt]  sifiveu: switch default to 6.6
In-Reply-To: <171446812989.3543414.12755513793583660525@git-01.infra.openwrt.org>
References: <171446812989.3543414.12755513793583660525@git-01.infra.openwrt.org>
Message-ID: <mailman.32112.1714468136.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/81fafec29d47171356c11a0278d1792695543a37

commit 81fafec29d47171356c11a0278d1792695543a37
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Fri Apr 26 13:32:45 2024 +0200

    sifiveu: switch default to 6.6
    
    Switch the default kernel to 6.6.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sifiveu/Makefile | 3 +--
 1 file changed, 1 insertion(+), 2 deletions(-)

diff --git a/target/linux/sifiveu/Makefile b/target/linux/sifiveu/Makefile
index 3a003a35fc..2e2ea96b4b 100644
--- a/target/linux/sifiveu/Makefile
+++ b/target/linux/sifiveu/Makefile
@@ -11,8 +11,7 @@ FEATURES:=ext4
 KERNELNAME:=Image dtbs
 SUBTARGETS:=generic
 
-KERNEL_PATCHVER:=6.1
-KERNEL_TESTING_PATCHVER:=6.6
+KERNEL_PATCHVER:=6.6
 
 include $(INCLUDE_DIR)/target.mk
 



From lede-commits at lists.infradead.org  Tue Apr 30 02:08:50 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 05:08:50 -0400
Subject: [openwrt/openwrt]  sifiveu: drop 6.1 support
In-Reply-To: <171446812989.3543414.12755513793583660525@git-01.infra.openwrt.org>
References: <171446812989.3543414.12755513793583660525@git-01.infra.openwrt.org>
Message-ID: <mailman.32113.1714468136.1280.lede-commits@lists.infradead.org>

wigyori pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/0f5da3977e547914a6bc608be38d442565080198

commit 0f5da3977e547914a6bc608be38d442565080198
Author: Zoltan HERPAI <wigyori at uid0.hu>
AuthorDate: Fri Apr 26 13:33:25 2024 +0200

    sifiveu: drop 6.1 support
    
    Now that 6.6 is the default, remove the 6.1 config and patches.
    
    Signed-off-by: Zoltan HERPAI <wigyori at uid0.hu>
---
 target/linux/sifiveu/config-6.1                    | 392 ---------------------
 ...e-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch |  49 ---
 ...v-sifive-unmatched-add-gpio-poweroff-node.patch |  26 --
 ...sifive-unleashed-define-opp-table-cpufreq.patch | 116 ------
 4 files changed, 583 deletions(-)

diff --git a/target/linux/sifiveu/config-6.1 b/target/linux/sifiveu/config-6.1
deleted file mode 100644
index 98283f4e0d..0000000000
--- a/target/linux/sifiveu/config-6.1
+++ /dev/null
@@ -1,392 +0,0 @@
-CONFIG_64BIT=y
-CONFIG_ARCH_CLOCKSOURCE_INIT=y
-CONFIG_ARCH_DMA_ADDR_T_64BIT=y
-CONFIG_ARCH_MMAP_RND_BITS=18
-CONFIG_ARCH_MMAP_RND_BITS_MAX=24
-CONFIG_ARCH_MMAP_RND_BITS_MIN=18
-CONFIG_ARCH_MMAP_RND_COMPAT_BITS_MAX=17
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX=y
-CONFIG_ARCH_OPTIONAL_KERNEL_RWX_DEFAULT=y
-CONFIG_ARCH_RV64I=y
-CONFIG_ARCH_SELECT_MEMORY_MODEL=y
-CONFIG_ARCH_SPARSEMEM_ENABLE=y
-CONFIG_ARCH_STACKWALK=y
-CONFIG_ARCH_WANTS_THP_SWAP=y
-CONFIG_ASN1=y
-CONFIG_ASSOCIATIVE_ARRAY=y
-CONFIG_ATA=y
-CONFIG_ATA_VERBOSE_ERROR=y
-CONFIG_BLK_DEV_SD=y
-CONFIG_BLK_MQ_PCI=y
-CONFIG_CAVIUM_PTP=y
-CONFIG_CC_HAVE_STACKPROTECTOR_TLS=y
-CONFIG_CC_IMPLICIT_FALLTHROUGH="-Wimplicit-fallthrough=5"
-CONFIG_CC_NO_ARRAY_BOUNDS=y
-CONFIG_CLK_ANALOGBITS_WRPLL_CLN28HPC=y
-CONFIG_CLK_SIFIVE=y
-CONFIG_CLK_SIFIVE_PRCI=y
-CONFIG_CLONE_BACKWARDS=y
-CONFIG_CLZ_TAB=y
-CONFIG_CMODEL_MEDANY=y
-# CONFIG_CMODEL_MEDLOW is not set
-CONFIG_COMMON_CLK=y
-CONFIG_COMPACT_UNEVICTABLE_DEFAULT=1
-# CONFIG_COMPAT_32BIT_TIME is not set
-CONFIG_COMPAT_BRK=y
-CONFIG_CONSOLE_TRANSLATIONS=y
-CONFIG_CONTEXT_TRACKING=y
-CONFIG_CONTEXT_TRACKING_IDLE=y
-CONFIG_COREDUMP=y
-CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS=y
-CONFIG_CPU_ISOLATION=y
-CONFIG_CPU_RMAP=y
-CONFIG_CRC16=y
-# CONFIG_CRC32_SARWATE is not set
-CONFIG_CRC32_SLICEBY8=y
-CONFIG_CRC7=y
-CONFIG_CRC_ITU_T=y
-CONFIG_CRYPTO_CRC32C=y
-CONFIG_CRYPTO_DRBG=y
-CONFIG_CRYPTO_DRBG_HMAC=y
-CONFIG_CRYPTO_DRBG_MENU=y
-CONFIG_CRYPTO_ECHAINIV=y
-CONFIG_CRYPTO_HMAC=y
-CONFIG_CRYPTO_JITTERENTROPY=y
-CONFIG_CRYPTO_LIB_BLAKE2S_GENERIC=y
-CONFIG_CRYPTO_LIB_POLY1305_RSIZE=1
-CONFIG_CRYPTO_LIB_SHA1=y
-CONFIG_CRYPTO_LIB_SHA256=y
-CONFIG_CRYPTO_LIB_UTILS=y
-CONFIG_CRYPTO_RNG=y
-CONFIG_CRYPTO_RNG2=y
-CONFIG_CRYPTO_RNG_DEFAULT=y
-CONFIG_CRYPTO_RSA=y
-CONFIG_CRYPTO_SHA256=y
-CONFIG_CRYPTO_SHA512=y
-CONFIG_DEBUG_BUGVERBOSE=y
-CONFIG_DEBUG_INFO=y
-CONFIG_DECOMPRESS_GZIP=y
-CONFIG_DEVTMPFS=y
-CONFIG_DEVTMPFS_MOUNT=y
-CONFIG_DMA_DIRECT_REMAP=y
-CONFIG_DNOTIFY=y
-CONFIG_DTC=y
-CONFIG_DUMMY_CONSOLE=y
-CONFIG_EDAC=y
-# CONFIG_EDAC_DEBUG is not set
-CONFIG_EDAC_LEGACY_SYSFS=y
-CONFIG_EDAC_SIFIVE=y
-CONFIG_EDAC_SUPPORT=y
-CONFIG_EFI=y
-CONFIG_EFIVAR_FS=m
-# CONFIG_EFI_BOOTLOADER_CONTROL is not set
-# CONFIG_EFI_CAPSULE_LOADER is not set
-# CONFIG_EFI_COCO_SECRET is not set
-# CONFIG_EFI_DISABLE_PCI_DMA is not set
-# CONFIG_EFI_DISABLE_RUNTIME is not set
-CONFIG_EFI_EARLYCON=y
-CONFIG_EFI_ESRT=y
-CONFIG_EFI_GENERIC_STUB=y
-CONFIG_EFI_PARAMS_FROM_FDT=y
-CONFIG_EFI_RUNTIME_WRAPPERS=y
-CONFIG_EFI_STUB=y
-# CONFIG_EFI_TEST is not set
-# CONFIG_EFI_ZBOOT is not set
-CONFIG_ELF_CORE=y
-CONFIG_ERRATA_SIFIVE=y
-CONFIG_ERRATA_SIFIVE_CIP_1200=y
-CONFIG_ERRATA_SIFIVE_CIP_453=y
-# CONFIG_ERRATA_THEAD is not set
-CONFIG_EXCLUSIVE_SYSTEM_RAM=y
-CONFIG_EXT4_FS=y
-CONFIG_FAILOVER=y
-CONFIG_FAT_FS=y
-CONFIG_FHANDLE=y
-CONFIG_FIXED_PHY=y
-CONFIG_FIX_EARLYCON_MEM=y
-CONFIG_FONT_8x16=y
-CONFIG_FONT_AUTOSELECT=y
-CONFIG_FONT_SUPPORT=y
-CONFIG_FPU=y
-CONFIG_FRAME_POINTER=y
-CONFIG_FS_IOMAP=y
-CONFIG_FS_MBCACHE=y
-CONFIG_FWNODE_MDIO=y
-CONFIG_FW_LOADER_PAGED_BUF=y
-CONFIG_FW_LOADER_SYSFS=y
-CONFIG_GCC11_NO_ARRAY_BOUNDS=y
-CONFIG_GENERIC_ALLOCATOR=y
-CONFIG_GENERIC_ARCH_TOPOLOGY=y
-CONFIG_GENERIC_BUG=y
-CONFIG_GENERIC_BUG_RELATIVE_POINTERS=y
-CONFIG_GENERIC_CLOCKEVENTS=y
-CONFIG_GENERIC_CLOCKEVENTS_BROADCAST=y
-CONFIG_GENERIC_CSUM=y
-CONFIG_GENERIC_EARLY_IOREMAP=y
-CONFIG_GENERIC_GETTIMEOFDAY=y
-CONFIG_GENERIC_IDLE_POLL_SETUP=y
-CONFIG_GENERIC_IOREMAP=y
-CONFIG_GENERIC_IRQ_EFFECTIVE_AFF_MASK=y
-CONFIG_GENERIC_IRQ_INJECTION=y
-CONFIG_GENERIC_IRQ_MULTI_HANDLER=y
-CONFIG_GENERIC_IRQ_SHOW=y
-CONFIG_GENERIC_IRQ_SHOW_LEVEL=y
-CONFIG_GENERIC_LIB_DEVMEM_IS_ALLOWED=y
-CONFIG_GENERIC_MSI_IRQ=y
-CONFIG_GENERIC_MSI_IRQ_DOMAIN=y
-CONFIG_GENERIC_PCI_IOMAP=y
-CONFIG_GENERIC_SCHED_CLOCK=y
-CONFIG_GENERIC_SMP_IDLE_THREAD=y
-CONFIG_GENERIC_STRNCPY_FROM_USER=y
-CONFIG_GENERIC_STRNLEN_USER=y
-CONFIG_GENERIC_TIME_VSYSCALL=y
-CONFIG_GLOB=y
-CONFIG_GPIOLIB_IRQCHIP=y
-CONFIG_GPIO_CDEV=y
-CONFIG_GPIO_CDEV_V1=y
-CONFIG_GPIO_GENERIC=y
-CONFIG_GPIO_SIFIVE=y
-CONFIG_HARDIRQS_SW_RESEND=y
-CONFIG_HAS_DMA=y
-CONFIG_HAS_IOMEM=y
-CONFIG_HAS_IOPORT_MAP=y
-CONFIG_HID=y
-CONFIG_HID_GENERIC=y
-CONFIG_HOTPLUG_PCI=y
-# CONFIG_HOTPLUG_PCI_CPCI is not set
-CONFIG_HOTPLUG_PCI_PCIE=y
-CONFIG_HOTPLUG_PCI_SHPC=y
-CONFIG_HVC_DRIVER=y
-CONFIG_HVC_RISCV_SBI=y
-CONFIG_HW_CONSOLE=y
-CONFIG_HZ_PERIODIC=y
-CONFIG_I2C=y
-CONFIG_I2C_BOARDINFO=y
-CONFIG_I2C_COMPAT=y
-CONFIG_I2C_HELPER_AUTO=y
-CONFIG_I2C_OCORES=y
-CONFIG_INITRAMFS_SOURCE=""
-CONFIG_INPUT=y
-# CONFIG_IOMMU_DEBUGFS is not set
-CONFIG_IOMMU_SUPPORT=y
-CONFIG_IO_URING=y
-CONFIG_IRQCHIP=y
-CONFIG_IRQ_DOMAIN=y
-CONFIG_IRQ_DOMAIN_HIERARCHY=y
-CONFIG_IRQ_FORCED_THREADING=y
-CONFIG_IRQ_WORK=y
-CONFIG_JBD2=y
-CONFIG_KALLSYMS=y
-CONFIG_KEYS=y
-CONFIG_LEDS_PWM=y
-CONFIG_LEDS_TRIGGER_DISK=y
-CONFIG_LEGACY_PTYS=y
-CONFIG_LEGACY_PTY_COUNT=256
-CONFIG_LIBFDT=y
-CONFIG_LOCALVERSION_AUTO=y
-CONFIG_LOCK_DEBUGGING_SUPPORT=y
-CONFIG_LOCK_SPIN_ON_OWNER=y
-CONFIG_MACB=y
-# CONFIG_MACB_PCI is not set
-CONFIG_MACB_USE_HWSTAMP=y
-CONFIG_MDIO_BUS=y
-CONFIG_MDIO_DEVICE=y
-CONFIG_MDIO_DEVRES=y
-CONFIG_MEMFD_CREATE=y
-CONFIG_MFD_SYSCON=y
-CONFIG_MICROSEMI_PHY=y
-CONFIG_MIGRATION=y
-CONFIG_MMC=y
-CONFIG_MMC_BLOCK=y
-CONFIG_MMC_SDHCI=y
-CONFIG_MMC_SDHCI_CADENCE=y
-# CONFIG_MMC_SDHCI_PCI is not set
-CONFIG_MMC_SDHCI_PLTFM=y
-CONFIG_MMC_SPI=y
-CONFIG_MMIOWB=y
-CONFIG_MODULES_USE_ELF_RELA=y
-CONFIG_MODULE_SECTIONS=y
-CONFIG_MPILIB=y
-CONFIG_MQ_IOSCHED_DEADLINE=y
-CONFIG_MQ_IOSCHED_KYBER=y
-CONFIG_MTD_SPI_NOR=y
-CONFIG_MTD_SPI_NOR_USE_4K_SECTORS=y
-CONFIG_MUTEX_SPIN_ON_OWNER=y
-CONFIG_NEED_DMA_MAP_STATE=y
-CONFIG_NET_FAILOVER=y
-CONFIG_NET_FLOW_LIMIT=y
-CONFIG_NET_PTP_CLASSIFY=y
-CONFIG_NET_SELFTESTS=y
-CONFIG_NLS=y
-CONFIG_NLS_CODEPAGE_437=y
-CONFIG_NLS_ISO8859_1=y
-# CONFIG_NONPORTABLE is not set
-CONFIG_NR_CPUS=8
-CONFIG_NVMEM=y
-CONFIG_NVMEM_SYSFS=y
-CONFIG_OF=y
-CONFIG_OF_ADDRESS=y
-CONFIG_OF_DMA_DEFAULT_COHERENT=y
-CONFIG_OF_EARLY_FLATTREE=y
-CONFIG_OF_FLATTREE=y
-CONFIG_OF_GPIO=y
-CONFIG_OF_IRQ=y
-CONFIG_OF_KOBJ=y
-CONFIG_OF_MDIO=y
-CONFIG_OID_REGISTRY=y
-CONFIG_PADATA=y
-CONFIG_PAGE_OFFSET=0xff60000000000000
-CONFIG_PAGE_POOL=y
-CONFIG_PAGE_REPORTING=y
-CONFIG_PAGE_SIZE_LESS_THAN_256KB=y
-CONFIG_PAGE_SIZE_LESS_THAN_64KB=y
-CONFIG_PCI=y
-CONFIG_PCIEAER=y
-CONFIG_PCIEAER_INJECT=m
-CONFIG_PCIEASPM=y
-CONFIG_PCIEASPM_DEFAULT=y
-# CONFIG_PCIEASPM_PERFORMANCE is not set
-# CONFIG_PCIEASPM_POWERSAVE is not set
-# CONFIG_PCIEASPM_POWER_SUPERSAVE is not set
-CONFIG_PCIEPORTBUS=y
-CONFIG_PCIE_DPC=y
-CONFIG_PCIE_DW=y
-CONFIG_PCIE_DW_HOST=y
-CONFIG_PCIE_ECRC=y
-CONFIG_PCIE_FU740=y
-CONFIG_PCIE_PTM=y
-CONFIG_PCIE_XILINX=y
-CONFIG_PCI_DEBUG=y
-CONFIG_PCI_DOMAINS=y
-CONFIG_PCI_DOMAINS_GENERIC=y
-CONFIG_PCI_ECAM=y
-CONFIG_PCI_HOST_COMMON=y
-CONFIG_PCI_HOST_GENERIC=y
-CONFIG_PCI_MSI=y
-CONFIG_PCI_MSI_IRQ_DOMAIN=y
-CONFIG_PCI_SW_SWITCHTEC=y
-CONFIG_PGTABLE_LEVELS=5
-CONFIG_PHYLIB=y
-CONFIG_PHYLINK=y
-CONFIG_PHYS_ADDR_T_64BIT=y
-CONFIG_PORTABLE=y
-CONFIG_POSIX_CPU_TIMERS_TASK_WORK=y
-CONFIG_POWER_RESET=y
-CONFIG_POWER_RESET_GPIO=y
-CONFIG_POWER_RESET_GPIO_RESTART=y
-CONFIG_POWER_RESET_RESTART=y
-CONFIG_POWER_RESET_SYSCON=y
-CONFIG_POWER_RESET_SYSCON_POWEROFF=y
-CONFIG_PPS=y
-CONFIG_PREEMPT_NONE_BUILD=y
-CONFIG_PRINTK_TIME=y
-CONFIG_PTP_1588_CLOCK=y
-CONFIG_PTP_1588_CLOCK_OPTIONAL=y
-CONFIG_PWM=y
-CONFIG_PWM_SIFIVE=y
-CONFIG_PWM_SYSFS=y
-CONFIG_QUEUED_RWLOCKS=y
-CONFIG_RANDSTRUCT_NONE=y
-CONFIG_RAS=y
-CONFIG_RATIONAL=y
-CONFIG_RCU_TRACE=y
-CONFIG_RD_GZIP=y
-CONFIG_REALTEK_PHY=y
-CONFIG_REGMAP=y
-CONFIG_REGMAP_MMIO=y
-# CONFIG_RESET_ATTACK_MITIGATION is not set
-CONFIG_RESET_CONTROLLER=y
-CONFIG_RESET_SIMPLE=y
-CONFIG_RFS_ACCEL=y
-CONFIG_RISCV=y
-CONFIG_RISCV_ALTERNATIVE=y
-# CONFIG_RISCV_BOOT_SPINWAIT is not set
-CONFIG_RISCV_DMA_NONCOHERENT=y
-CONFIG_RISCV_INTC=y
-CONFIG_RISCV_ISA_C=y
-CONFIG_RISCV_ISA_SVPBMT=y
-CONFIG_RISCV_ISA_ZICBOM=y
-CONFIG_RISCV_SBI=y
-CONFIG_RISCV_SBI_V01=y
-CONFIG_RISCV_TIMER=y
-CONFIG_RPS=y
-CONFIG_RTC_CLASS=y
-# CONFIG_RTC_DRV_EFI is not set
-CONFIG_RTC_I2C_AND_SPI=y
-CONFIG_RWSEM_SPIN_ON_OWNER=y
-CONFIG_SCHED_DEBUG=y
-CONFIG_SCSI=y
-CONFIG_SCSI_COMMON=y
-CONFIG_SERIAL_8250_DEPRECATED_OPTIONS=y
-CONFIG_SERIAL_8250_EXAR=y
-CONFIG_SERIAL_8250_NR_UARTS=4
-CONFIG_SERIAL_8250_PCI=y
-CONFIG_SERIAL_8250_RUNTIME_UARTS=4
-CONFIG_SERIAL_EARLYCON_RISCV_SBI=y
-CONFIG_SERIAL_MCTRL_GPIO=y
-CONFIG_SERIAL_OF_PLATFORM=y
-CONFIG_SERIAL_SIFIVE=y
-CONFIG_SERIAL_SIFIVE_CONSOLE=y
-CONFIG_SERIO=y
-CONFIG_SERIO_SERPORT=y
-CONFIG_SG_POOL=y
-CONFIG_SIFIVE_CCACHE=y
-CONFIG_SIFIVE_PLIC=y
-CONFIG_SMP=y
-CONFIG_SOCK_RX_QUEUE_MAPPING=y
-# CONFIG_SOC_MICROCHIP_POLARFIRE is not set
-CONFIG_SOC_SIFIVE=y
-# CONFIG_SOC_STARFIVE is not set
-# CONFIG_SOC_VIRT is not set
-CONFIG_SPARSEMEM_VMEMMAP_ENABLE=y
-CONFIG_SPARSE_IRQ=y
-CONFIG_SPI=y
-CONFIG_SPI_BITBANG=y
-CONFIG_SPI_MASTER=y
-CONFIG_SPI_MEM=y
-CONFIG_SPI_SIFIVE=y
-CONFIG_SRCU=y
-CONFIG_STACKTRACE=y
-CONFIG_SWIOTLB=y
-CONFIG_SWPHY=y
-CONFIG_SYSCTL_EXCEPTION_TRACE=y
-# CONFIG_SYSFB_SIMPLEFB is not set
-CONFIG_THREAD_INFO_IN_TASK=y
-CONFIG_TICK_CPU_ACCOUNTING=y
-CONFIG_TIMER_OF=y
-CONFIG_TIMER_PROBE=y
-CONFIG_TOOLCHAIN_HAS_ZICBOM=y
-CONFIG_TOOLCHAIN_HAS_ZIHINTPAUSE=y
-CONFIG_TOOLCHAIN_NEEDS_EXPLICIT_ZICSR_ZIFENCEI=y
-CONFIG_TRACE_CLOCK=y
-CONFIG_TREE_RCU=y
-CONFIG_TREE_SRCU=y
-CONFIG_TUNE_GENERIC=y
-CONFIG_UCS2_STRING=y
-CONFIG_UEVENT_HELPER_PATH=""
-CONFIG_USB=y
-CONFIG_USB_COMMON=y
-CONFIG_USB_EHCI_HCD=y
-# CONFIG_USB_EHCI_HCD_PLATFORM is not set
-CONFIG_USB_EHCI_PCI=y
-CONFIG_USB_HID=y
-CONFIG_USB_NET_DRIVERS=y
-CONFIG_USB_PCI=y
-CONFIG_USB_STORAGE=y
-CONFIG_USB_SUPPORT=y
-# CONFIG_USB_UHCI_HCD is not set
-CONFIG_USB_XHCI_HCD=y
-CONFIG_USB_XHCI_PCI=y
-# CONFIG_USB_XHCI_PLATFORM is not set
-CONFIG_VFAT_FS=y
-CONFIG_VGA_ARB=y
-CONFIG_VGA_ARB_MAX_GPUS=16
-CONFIG_VMAP_STACK=y
-CONFIG_VM_EVENT_COUNTERS=y
-CONFIG_VT=y
-CONFIG_VT_CONSOLE=y
-# CONFIG_VT_HW_CONSOLE_BINDING is not set
-CONFIG_WATCHDOG_CORE=y
-CONFIG_XPS=y
-CONFIG_ZLIB_INFLATE=y
-CONFIG_ZONE_DMA32=y
diff --git a/target/linux/sifiveu/patches-6.1/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch b/target/linux/sifiveu/patches-6.1/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch
deleted file mode 100644
index 9a1c968139..0000000000
--- a/target/linux/sifiveu/patches-6.1/0001-riscv-sifive-fu740-cpu-1-2-3-4-set-compatible-to-sif.patch
+++ /dev/null
@@ -1,49 +0,0 @@
-From ab5c8f5492cce16ff2104393e2f1fa64a3ff6e88 Mon Sep 17 00:00:00 2001
-From: David Abdurachmanov <david.abdurachmanov at sifive.com>
-Date: Wed, 17 Feb 2021 06:06:14 -0800
-Subject: [PATCH 1/7] riscv: sifive: fu740: cpu{1,2,3,4} set compatible to
- sifive,u74-mc
-
-Signed-off-by: David Abdurachmanov <david.abdurachmanov at sifive.com>
----
- arch/riscv/boot/dts/sifive/fu740-c000.dtsi | 8 ++++----
- 1 file changed, 4 insertions(+), 4 deletions(-)
-
---- a/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
-+++ b/arch/riscv/boot/dts/sifive/fu740-c000.dtsi
-@@ -39,7 +39,7 @@
- 			};
- 		};
- 		cpu1: cpu at 1 {
--			compatible = "sifive,bullet0", "riscv";
-+			compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
- 			d-cache-block-size = <64>;
- 			d-cache-sets = <64>;
- 			d-cache-size = <32768>;
-@@ -63,7 +63,7 @@
- 			};
- 		};
- 		cpu2: cpu at 2 {
--			compatible = "sifive,bullet0", "riscv";
-+			compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
- 			d-cache-block-size = <64>;
- 			d-cache-sets = <64>;
- 			d-cache-size = <32768>;
-@@ -87,7 +87,7 @@
- 			};
- 		};
- 		cpu3: cpu at 3 {
--			compatible = "sifive,bullet0", "riscv";
-+			compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
- 			d-cache-block-size = <64>;
- 			d-cache-sets = <64>;
- 			d-cache-size = <32768>;
-@@ -111,7 +111,7 @@
- 			};
- 		};
- 		cpu4: cpu at 4 {
--			compatible = "sifive,bullet0", "riscv";
-+			compatible = "sifive,u74-mc", "sifive,bullet0", "riscv";
- 			d-cache-block-size = <64>;
- 			d-cache-sets = <64>;
- 			d-cache-size = <32768>;
diff --git a/target/linux/sifiveu/patches-6.1/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch b/target/linux/sifiveu/patches-6.1/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch
deleted file mode 100644
index 07170d7c76..0000000000
--- a/target/linux/sifiveu/patches-6.1/0004-riscv-sifive-unmatched-add-gpio-poweroff-node.patch
+++ /dev/null
@@ -1,26 +0,0 @@
-From 14ede57943bc4209755d08daf93ac7be967d7fbe Mon Sep 17 00:00:00 2001
-From: David Abdurachmanov <david.abdurachmanov at sifive.com>
-Date: Mon, 13 Sep 2021 02:18:30 -0700
-Subject: [PATCH 4/7] riscv: sifive: unmatched: add gpio-poweroff node
-
-Add gpio-poweroff node to allow powering off the system.
-
-Signed-off-by: David Abdurachmanov <david.abdurachmanov at sifive.com>
----
- arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts | 6 ++++++
- 1 file changed, 6 insertions(+)
-
---- a/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
-+++ b/arch/riscv/boot/dts/sifive/hifive-unmatched-a00.dts
-@@ -86,6 +86,11 @@
- 			};
- 		};
- 	};
-+
-+	gpio-poweroff {
-+		compatible = "gpio-poweroff";
-+		gpios = <&gpio 2 GPIO_ACTIVE_LOW>;
-+	};
- };
- 
- &uart0 {
diff --git a/target/linux/sifiveu/patches-6.1/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch b/target/linux/sifiveu/patches-6.1/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
deleted file mode 100644
index c4242c6f07..0000000000
--- a/target/linux/sifiveu/patches-6.1/0005-riscv-sifive-unleashed-define-opp-table-cpufreq.patch
+++ /dev/null
@@ -1,116 +0,0 @@
-From d3cf2859a056273400fbdf9d389b75750ff6ca5e Mon Sep 17 00:00:00 2001
-From: David Abdurachmanov <david.abdurachmanov at sifive.com>
-Date: Fri, 14 May 2021 05:27:51 -0700
-Subject: [PATCH 6/7] riscv: sifive: unleashed: define opp table (cpufreq)
-
-Source: https://github.com/sifive/riscv-linux/commits/dev/paulw/cpufreq-dt-aloe-v5.3-rc4
-
-Signed-off-by: David Abdurachmanov <david.abdurachmanov at sifive.com>
----
- arch/riscv/Kconfig                                 |  8 +++++
- arch/riscv/boot/dts/sifive/fu540-c000.dtsi         |  5 ++++
- .../riscv/boot/dts/sifive/hifive-unleashed-a00.dts | 34 ++++++++++++++++++++++
- 3 files changed, 47 insertions(+)
-
---- a/arch/riscv/Kconfig
-+++ b/arch/riscv/Kconfig
-@@ -711,6 +711,14 @@ config PORTABLE
- 	select OF
- 	select MMU
- 
-+menu "CPU Power Management"
-+
-+source "drivers/cpuidle/Kconfig"
-+
-+source "drivers/cpufreq/Kconfig"
-+
-+endmenu
-+
- menu "Power management options"
- 
- source "kernel/power/Kconfig"
---- a/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
-+++ b/arch/riscv/boot/dts/sifive/fu540-c000.dtsi
-@@ -30,6 +30,7 @@
- 			i-cache-size = <16384>;
- 			reg = <0>;
- 			riscv,isa = "rv64imac";
-+			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
- 			status = "disabled";
- 			cpu0_intc: interrupt-controller {
- 				#interrupt-cells = <1>;
-@@ -54,6 +55,7 @@
- 			reg = <1>;
- 			riscv,isa = "rv64imafdc";
- 			tlb-split;
-+			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
- 			next-level-cache = <&l2cache>;
- 			cpu1_intc: interrupt-controller {
- 				#interrupt-cells = <1>;
-@@ -78,6 +80,7 @@
- 			reg = <2>;
- 			riscv,isa = "rv64imafdc";
- 			tlb-split;
-+			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
- 			next-level-cache = <&l2cache>;
- 			cpu2_intc: interrupt-controller {
- 				#interrupt-cells = <1>;
-@@ -102,6 +105,7 @@
- 			reg = <3>;
- 			riscv,isa = "rv64imafdc";
- 			tlb-split;
-+			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
- 			next-level-cache = <&l2cache>;
- 			cpu3_intc: interrupt-controller {
- 				#interrupt-cells = <1>;
-@@ -126,6 +130,7 @@
- 			reg = <4>;
- 			riscv,isa = "rv64imafdc";
- 			tlb-split;
-+			clocks = <&prci FU540_PRCI_CLK_COREPLL>;
- 			next-level-cache = <&l2cache>;
- 			cpu4_intc: interrupt-controller {
- 				#interrupt-cells = <1>;
---- a/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
-+++ b/arch/riscv/boot/dts/sifive/hifive-unleashed-a00.dts
-@@ -80,6 +80,40 @@
- 			label = "d4";
- 		};
- 	};
-+
-+	fu540_c000_opp_table: opp-table {
-+		compatible = "operating-points-v2";
-+		opp-shared;
-+
-+		opp-350000000 {
-+			opp-hz = /bits/ 64 <350000000>;
-+		};
-+		opp-700000000 {
-+			opp-hz = /bits/ 64 <700000000>;
-+		};
-+		opp-999999999 {
-+			opp-hz = /bits/ 64 <999999999>;
-+		};
-+		opp-1400000000 {
-+			opp-hz = /bits/ 64 <1400000000>;
-+		};
-+	};
-+};
-+
-+&cpu0 {
-+	operating-points-v2 = <&fu540_c000_opp_table>;
-+};
-+&cpu1 {
-+	operating-points-v2 = <&fu540_c000_opp_table>;
-+};
-+&cpu2 {
-+	operating-points-v2 = <&fu540_c000_opp_table>;
-+};
-+&cpu3 {
-+	operating-points-v2 = <&fu540_c000_opp_table>;
-+};
-+&cpu4 {
-+	operating-points-v2 = <&fu540_c000_opp_table>;
- };
- 
- &uart0 {



From lede-commits at lists.infradead.org  Tue Apr 30 03:01:08 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 06:01:08 -0400
Subject: [openwrt/openwrt]  ipq40xx: fix I2C pin config on Aruba AP-303H
In-Reply-To: <171447126839.3821928.8586076753647718445@git-01.infra.openwrt.org>
References: <171447126839.3821928.8586076753647718445@git-01.infra.openwrt.org>
Message-ID: <mailman.32136.1714471276.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/47da1786e9554ee68e32287c747fd88bee539d53

commit 47da1786e9554ee68e32287c747fd88bee539d53
Author: Ryan Salsbury <ryanrs at gmail.com>
AuthorDate: Mon Apr 29 18:05:14 2024 -0700

    ipq40xx: fix I2C pin config on Aruba AP-303H
    
    Turn on SoC pull-ups on I2C pins, since there are no discrete pull-up
    resistors on the bus.
    
    Increase clock to 400 kHz. Both chips on the bus support 400 kHz. I
    tested the ISL28022 at 4,000 reads/sec and didn't see any garbled output
    or bus hangs, even with SoC drive strength reduced to 2 for the test.
    
    Signed-off-by: Ryan Salsbury <ryanrs at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15334
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 .../arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts     | 43 ++++++++++++----------
 1 file changed, 23 insertions(+), 20 deletions(-)

diff --git a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
index 0dec567bc4..69d4810277 100644
--- a/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
+++ b/target/linux/ipq40xx/files-6.6/arch/arm/boot/dts/qcom/qcom-ipq4029-ap-303h.dts
@@ -71,25 +71,6 @@
 		watchdog at b017000 {
 			status = "okay";
 		};
-
-		i2c_0: i2c at 78b7000 {
-			pinctrl-0 = <&i2c_0_pins>;
-			pinctrl-names = "default";
-			status = "okay";
-
-			tpm at 29 {
-				/* No Driver */
-				compatible = "atmel,at97sc3203";
-				reg = <0x29>;
-				read-only;
-			};
-
-			power-monitor at 40 {
-				/* No driver */
-				compatible = "isl,isl28022";
-				reg = <0x40>;
-			};
-		};
 	};
 
 	leds {
@@ -214,7 +195,7 @@
 			pins = "gpio20", "gpio21";
 			function = "blsp_i2c0";
 			drive-strength = <4>;
-			bias-disable;
+			bias-pull-up;
 		};
 	};
 
@@ -242,6 +223,28 @@
 	};
 };
 
+&blsp1_i2c3 {
+	pinctrl-0 = <&i2c_0_pins>;
+	pinctrl-names = "default";
+	status = "okay";
+	clock-frequency = <400000>;
+
+	tpm at 29 {
+		/* No Driver */
+		compatible = "atmel,at97sc3203";
+		reg = <0x29>;
+		read-only;
+	};
+
+	power-monitor at 40 {
+		/* No driver */
+		/* Device also replies on address 0x3f, see   */
+		/* ISL28022 datasheet, "Broadcast Addressing" */
+		compatible = "isl,isl28022";
+		reg = <0x40>;
+	};
+};
+
 &blsp1_spi1 {
 	pinctrl-0 = <&spi_0_pins>;
 	pinctrl-names = "default";



From lede-commits at lists.infradead.org  Tue Apr 30 03:36:23 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 06:36:23 -0400
Subject: [openwrt/openwrt]  toolchain/gdb: backport patch for macOS to fix
 invalid range
In-Reply-To: <171447338369.4005714.14084729823313126655@git-01.infra.openwrt.org>
References: <171447338369.4005714.14084729823313126655@git-01.infra.openwrt.org>
Message-ID: <mailman.32151.1714473389.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/ed12436ee92ea29375dc0b4d592063636cc83ccc

commit ed12436ee92ea29375dc0b4d592063636cc83ccc
Author: Josef Schlehofer <pepe.schlehofer at gmail.com>
AuthorDate: Sun Apr 28 23:04:03 2024 +0200

    toolchain/gdb: backport patch for macOS to fix invalid range
    
    With the recent macOS update to Ventura, it looks like gdb could not be
    compiled with clang16 and newer version, because it fails with:
    ./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
        integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
                                                       ^
    ./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 1] for this enumeration type [-Wenum-constexpr-conversion]
    ./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
    ./../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 3] for this enumeration type [-Wenum-constexpr-conversion]
    4 errors generated.
    
    - Upstream bug:
    https://sourceware.org/bugzilla/show_bug.cgi?id=30423
    
    - Backported upstream commit:
    https://sourceware.org/git/?p=binutils-gdb.git;a=commit;h=ae61525fcf456ab395d55c45492a106d1275873a
    
    Fixes: https://github.com/openwrt/openwrt/issues/15314
    
    Signed-off-by: Josef Schlehofer <pepe.schlehofer at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15315
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 ...ignore-Wenum-constexpr-conversion-in-enum.patch | 130 +++++++++++++++++++++
 1 file changed, 130 insertions(+)

diff --git a/toolchain/gdb/patches/0001-gdbsupport-ignore-Wenum-constexpr-conversion-in-enum.patch b/toolchain/gdb/patches/0001-gdbsupport-ignore-Wenum-constexpr-conversion-in-enum.patch
new file mode 100644
index 0000000000..999a5dbe4d
--- /dev/null
+++ b/toolchain/gdb/patches/0001-gdbsupport-ignore-Wenum-constexpr-conversion-in-enum.patch
@@ -0,0 +1,130 @@
+From e3b59e5461c81f03b608f24388af716c1983e2d0 Mon Sep 17 00:00:00 2001
+From: Simon Marchi <simon.marchi at efficios.com>
+Date: Thu, 23 Feb 2023 17:35:40 +0000
+Subject: [PATCH] gdbsupport: ignore -Wenum-constexpr-conversion in
+ enum-flags.h
+
+When building with clang 16, we get:
+
+      CXX    gdb.o
+    In file included from /home/smarchi/src/binutils-gdb/gdb/gdb.c:19:
+    In file included from /home/smarchi/src/binutils-gdb/gdb/defs.h:65:
+    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/enum-flags.h:95:52: error: integer value -1 is outside the valid range of values [0, 15] for this enumeration type [-Wenum-constexpr-conversion]
+        integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
+                                                       ^
+
+The error message does not make it clear in the context of which enum
+flag this fails (i.e. what is T in this context), but it doesn't really
+matter, we have similar warning/errors for many of them, if we let the
+build go through.
+
+clang is right that the value -1 is invalid for the enum type we cast -1
+to.  However, we do need this expression in order to select an integer
+type with the appropriate signedness.  That is, with the same signedness
+as the underlying type of the enum.
+
+I first wondered if that was really needed, if we couldn't use
+std::underlying_type for that.  It turns out that the comment just above
+says:
+
+    /* Note that std::underlying_type<enum_type> is not what we want here,
+       since that returns unsigned int even when the enum decays to signed
+       int.  */
+
+I was surprised, because std::is_signed<std::underlying_type<enum_type>>
+returns the right thing.  So I tried replacing all this with
+std::underlying_type, see if that would work.  Doing so causes some
+build failures in unittests/enum-flags-selftests.c:
+
+      CXX    unittests/enum-flags-selftests.o
+    /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:254:1: error: static assertion failed due to requirement 'gdb::is_same<selftests::enum_flags_tests::check_valid_expr254::archetype<enum_flags<s
+    elftests::enum_flags_tests::RE>, selftests::enum_flags_tests::RE, enum_flags<selftests::enum_flags_tests::RE2>, selftests::enum_flags_tests::RE2, enum_flags<selftests::enum_flags_tests::URE>, selftests::enum_fla
+    gs_tests::URE, int>, selftests::enum_flags_tests::check_valid_expr254::archetype<enum_flags<selftests::enum_flags_tests::RE>, selftests::enum_flags_tests::RE, enum_flags<selftests::enum_flags_tests::RE2>, selfte
+    sts::enum_flags_tests::RE2, enum_flags<selftests::enum_flags_tests::URE>, selftests::enum_flags_tests::URE, unsigned int>>::value == true':
+    CHECK_VALID (true,  int,  true ? EF () : EF2 ())
+    ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    /home/smarchi/src/binutils-gdb/gdb/unittests/enum-flags-selftests.c:91:3: note: expanded from macro 'CHECK_VALID'
+      CHECK_VALID_EXPR_6 (EF, RE, EF2, RE2, UEF, URE, VALID, EXPR_TYPE, EXPR)
+      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:105:3: note: expanded from macro 'CHECK_VALID_EXPR_6'
+      CHECK_VALID_EXPR_INT (ESC_PARENS (typename T1, typename T2,           \
+      ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+    /home/smarchi/src/binutils-gdb/gdb/../gdbsupport/valid-expr.h:66:3: note: expanded from macro 'CHECK_VALID_EXPR_INT'
+      static_assert (gdb::is_detected_exact<archetype<TYPES, EXPR_TYPE>,    \
+      ^              ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
+
+This is a bit hard to decode, but basically enumerations have the
+following funny property that they decay into a signed int, even if
+their implicit underlying type is unsigned.  This code:
+
+    enum A {};
+    enum B {};
+
+    int main() {
+      std::cout << std::is_signed<std::underlying_type<A>::type>::value
+                << std::endl;
+      std::cout << std::is_signed<std::underlying_type<B>::type>::value
+                << std::endl;
+      auto result = true ? A() : B();
+      std::cout << std::is_signed<decltype(result)>::value << std::endl;
+    }
+
+produces:
+
+    0
+    0
+    1
+
+So, the "CHECK_VALID" above checks that this property works for enum flags the
+same way as it would if you were using their underlying enum types.  And
+somehow, changing integer_for_size to use std::underlying_type breaks that.
+
+Since the current code does what we want, and I don't see any way of doing it
+differently, ignore -Wenum-constexpr-conversion around it.
+
+Change-Id: Ibc82ae7bbdb812102ae3f1dd099fc859dc6f3cc2
+---
+ gdbsupport/enum-flags.h | 3 +++
+ include/diagnostics.h   | 9 +++++++++
+ 2 files changed, 12 insertions(+)
+
+--- a/gdbsupport/enum-flags.h
++++ b/gdbsupport/enum-flags.h
+@@ -91,9 +91,12 @@ template<> struct integer_for_size<8, 1>
+ template<typename T>
+ struct enum_underlying_type
+ {
++  DIAGNOSTIC_PUSH
++  DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION
+   typedef typename
+     integer_for_size<sizeof (T), static_cast<bool>(T (-1) < T (0))>::type
+     type;
++  DIAGNOSTIC_POP
+ };
+ 
+ namespace enum_flags_detail
+--- a/include/diagnostics.h
++++ b/include/diagnostics.h
+@@ -66,6 +66,11 @@
+ # define DIAGNOSTIC_ERROR_SWITCH \
+   DIAGNOSTIC_ERROR ("-Wswitch")
+ 
++# if __has_warning ("-Wenum-constexpr-conversion")
++#  define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION \
++   DIAGNOSTIC_IGNORE ("-Wenum-constexpr-conversion")
++# endif
++
+ #elif defined (__GNUC__) /* GCC */
+ 
+ # if __GNUC__ >= 7
+@@ -96,6 +101,10 @@
+ # define DIAGNOSTIC_IGNORE_DEPRECATED_DECLARATIONS
+ #endif
+ 
++#ifndef DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION
++# define DIAGNOSTIC_IGNORE_ENUM_CONSTEXPR_CONVERSION
++#endif
++
+ #ifndef DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
+ # define DIAGNOSTIC_IGNORE_DEPRECATED_REGISTER
+ #endif



From lede-commits at lists.infradead.org  Tue Apr 30 04:38:03 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 07:38:03 -0400
Subject: [openwrt/openwrt]  tools/elfutils: remove dirname
In-Reply-To: <171447708391.170284.18160643877813383925@git-01.infra.openwrt.org>
References: <171447708391.170284.18160643877813383925@git-01.infra.openwrt.org>
Message-ID: <mailman.32182.1714477093.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/00ff73ec6e815d9e82ef9164d23d445a2346579e

commit 00ff73ec6e815d9e82ef9164d23d445a2346579e
Author: Robert Marko <robimarko at gmail.com>
AuthorDate: Tue Apr 30 11:08:46 2024 +0200

    tools/elfutils: remove dirname
    
    In the 0.191 update dirname was used instead of <libgen.h> to fix the
    poisoned basename error:
    /usr/include/libgen.h:35:9: error: attempt to use poisoned "basename"
           35 | #define basename        __xpg_basename
    
    However, doing this has lead to libelf.a pulling in xmalloc, xstrdup and
    friends and statically linking them thus leading to a symbol name conflict
    with FRR host build and anything else that links against libelf and uses
    xmalloc and friends.
    
    Well, it turns out that upstream has added a helper[1] for basename so it
    can compile with musl 1.2.5 which dropped the basename declaration, but it
    also means that we must NOT include <libgen.h> and that poisoned error is
    intentional and added to prevent duplicate basename definitions.
    This also means that for macOS we dont need to do any additional header
    inclusions as the new helper takes care of basename.
    
    So, to fix the symbol conflict we can simply drop the <dirname.h> inclusion
    and build from elfutils.
    
    Tested on Fedora 40 as well as macOS 14.4.1.
    
    [1] https://sourceware.org/git/?p=elfutils.git;a=commit;h=a2194f6b305bf0d0b9dd49dccd0a5c21994c8eea
    
    Fixes: #24030
    Fixes: b6f025b42429 ("tools/elfutils: update to 1.91")
    
    Link: https://github.com/openwrt/openwrt/pull/15337
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 tools/elfutils/Makefile                      |  3 +--
 tools/elfutils/patches/100-portability.patch | 10 +++++-----
 2 files changed, 6 insertions(+), 7 deletions(-)

diff --git a/tools/elfutils/Makefile b/tools/elfutils/Makefile
index 140250801c..466fc31271 100644
--- a/tools/elfutils/Makefile
+++ b/tools/elfutils/Makefile
@@ -4,7 +4,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=elfutils
 PKG_VERSION:=0.191
-PKG_RELEASE:=1
+PKG_RELEASE:=2
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.bz2
 PKG_SOURCE_URL:=https://sourceware.org/$(PKG_NAME)/ftp/$(PKG_VERSION)
@@ -41,7 +41,6 @@ PKG_GNULIB_ARGS = \
 
 PKG_GNULIB_MODS = \
 	argp \
-	dirname \
 	fts \
 	obstack \
 	progname \
diff --git a/tools/elfutils/patches/100-portability.patch b/tools/elfutils/patches/100-portability.patch
index 1a61455f48..6f7564731b 100644
--- a/tools/elfutils/patches/100-portability.patch
+++ b/tools/elfutils/patches/100-portability.patch
@@ -346,12 +346,11 @@
 +}
 --- a/libdwfl/libdwflP.h
 +++ b/libdwfl/libdwflP.h
-@@ -31,6 +31,8 @@
+@@ -31,6 +31,7 @@
  
  #include <libdwfl.h>
  #include <libebl.h>
 +#include <libeu.h>
-+#include <dirname.h>
  #include <assert.h>
  #include <dirent.h>
  #include <errno.h>
@@ -366,17 +365,18 @@
 +#endif
 --- a/libdw/libdwP.h
 +++ b/libdw/libdwP.h
-@@ -32,8 +32,10 @@
+@@ -32,10 +32,10 @@
  #include <stdbool.h>
  #include <pthread.h>
  
 +#include <libeu.h>
  #include <libdw.h>
  #include <dwarf.h>
-+#include <dirname.h>
- 
  
+-
  /* Known location expressions already decoded.  */
+ struct loc_s
+ {
 --- a/libdw/Makefile.am
 +++ b/libdw/Makefile.am
 @@ -34,14 +34,12 @@ endif



From lede-commits at lists.infradead.org  Tue Apr 30 04:51:20 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 07:51:20 -0400
Subject: [openwrt/openwrt]  qualcommax: ipq807x: uboot-envtools: yuncore ax880
In-Reply-To: <171447788013.251593.3723649800292702918@git-01.infra.openwrt.org>
References: <171447788013.251593.3723649800292702918@git-01.infra.openwrt.org>
Message-ID: <mailman.32187.1714477883.1280.lede-commits@lists.infradead.org>

robimarko pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/be37ab6e51b7526d386fce035b6d668d64598248

commit be37ab6e51b7526d386fce035b6d668d64598248
Author: Isaev Ruslan <legale.legale at gmail.com>
AuthorDate: Sun Apr 28 01:49:46 2024 +0300

    qualcommax: ipq807x: uboot-envtools: yuncore ax880
    
    There was no config in the uboot-envtools package, so there is no
    generated /etc/fw_env.config for the fw_printenv and fw_setenv utils.
    Since uboot-envtools 2024.01, there is a way to make these utils work
    without /etc/fw_env.config if the DT has an env partition with the prop.:
    
    compatible = "u-boot,env";
    
    So, this commit adds the prop. above to the appsblenv:0 partition
    in the yuncore ax880 DTS file.
    
    Signed-off-by: Isaev Ruslan <legale.legale at gmail.com>
    Link: https://github.com/openwrt/openwrt/pull/15305
    Signed-off-by: Robert Marko <robimarko at gmail.com>
---
 target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts | 1 +
 1 file changed, 1 insertion(+)

diff --git a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts
index 5364daad45..23e89a9ae4 100644
--- a/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts
+++ b/target/linux/qualcommax/files/arch/arm64/boot/dts/qcom/ipq8072-ax880.dts
@@ -193,6 +193,7 @@
 			};
 
 			partition at 480000 {
+				compatible = "u-boot,env";
 				label = "0:appsblenv";
 				reg = <0x480000 0x10000>;
 			};



From lede-commits at lists.infradead.org  Tue Apr 30 10:35:21 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 13:35:21 -0400
Subject: [openwrt/openwrt]  generic: MIPS64: fix detect_memory_region()
 compilation error
In-Reply-To: <171449852194.2208614.10820843046195537034@git-01.infra.openwrt.org>
References: <171449852194.2208614.10820843046195537034@git-01.infra.openwrt.org>
Message-ID: <mailman.32423.1714498527.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/dcdcb9228be01e08ee6c1b7f5a7c60af53e07176

commit dcdcb9228be01e08ee6c1b7f5a7c60af53e07176
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Mon Apr 29 02:11:17 2024 +0000

    generic: MIPS64: fix detect_memory_region() compilation error
    
    1. Enable this feature only for 32-bit CPUs as MIPS64 can not
       access the full range unmapped uncached memory.
    
    2. Backport this fix to the 6.1 old LTS kernel.
    
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 ...-kernel-fix-detect_memory_region-function.patch | 48 +++++++++++++++-------
 ...-kernel-fix-detect_memory_region-function.patch | 48 +++++++++++++++-------
 .../314-MIPS-add-bootargs-override-property.patch  |  4 +-
 .../315-owrt-hack-fix-mt7688-cache-issue.patch     |  4 +-
 .../314-MIPS-add-bootargs-override-property.patch  |  4 +-
 .../315-owrt-hack-fix-mt7688-cache-issue.patch     |  4 +-
 6 files changed, 74 insertions(+), 38 deletions(-)

diff --git a/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch b/target/linux/generic/pending-6.1/350-mips-kernel-fix-detect_memory_region-function.patch
similarity index 63%
copy from target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch
copy to target/linux/generic/pending-6.1/350-mips-kernel-fix-detect_memory_region-function.patch
index 4654bc14ef..3bf7ae98bf 100644
--- a/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch
+++ b/target/linux/generic/pending-6.1/350-mips-kernel-fix-detect_memory_region-function.patch
@@ -7,35 +7,45 @@ Subject: [PATCH] mips: kernel: fix detect_memory_region() function
 2. Use a fixed pattern instead of a random function pointer as the
    magic value.
 3. Flip magic value and double check it.
+4. Enable this feature only for 32-bit CPUs. Currently, only ath79 and
+   ralink CPUs are using it.
 
 [1] 439a1bcac648 ("fortify: Use __builtin_dynamic_object_size() when available")
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
 ---
- arch/mips/kernel/setup.c | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
+ arch/mips/include/asm/bootinfo.h |  2 ++
+ arch/mips/kernel/setup.c         | 17 ++++++++++++-----
+ 2 files changed, 14 insertions(+), 5 deletions(-)
 
+--- a/arch/mips/include/asm/bootinfo.h
++++ b/arch/mips/include/asm/bootinfo.h
+@@ -93,7 +93,9 @@ const char *get_system_type(void);
+ 
+ extern unsigned long mips_machtype;
+ 
++#ifndef CONFIG_64BIT
+ extern void detect_memory_region(phys_addr_t start, phys_addr_t sz_min,  phys_addr_t sz_max);
++#endif
+ 
+ extern void prom_init(void);
+ extern void prom_free_prom_memory(void);
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -46,6 +46,8 @@
- #include <asm/prom.h>
- #include <asm/fw/fw.h>
- 
-+#define MIPS_MEM_TEST_PATTERN		0xaa5555aa
-+
- #ifdef CONFIG_MIPS_ELF_APPENDED_DTB
- char __section(".appended_dtb") __appended_dtb[0x100000];
- #endif /* CONFIG_MIPS_ELF_APPENDED_DTB */
-@@ -90,7 +92,7 @@ static struct resource bss_resource = {
+@@ -90,21 +90,27 @@ static struct resource bss_resource = {
  unsigned long __kaslr_offset __ro_after_init;
  EXPORT_SYMBOL(__kaslr_offset);
  
 -static void *detect_magic __initdata = detect_memory_region;
-+static u32 detect_magic __initdata;
- 
+-
  #ifdef CONFIG_MIPS_AUTO_PFN_OFFSET
  unsigned long ARCH_PFN_OFFSET;
-@@ -99,12 +101,16 @@ EXPORT_SYMBOL(ARCH_PFN_OFFSET);
+ EXPORT_SYMBOL(ARCH_PFN_OFFSET);
+ #endif
  
++#ifndef CONFIG_64BIT
++static u32 detect_magic __initdata;
++#define MIPS_MEM_TEST_PATTERN		0xaa5555aa
++
  void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max)
  {
 -	void *dm = &detect_magic;
@@ -54,3 +64,11 @@ Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
  	}
  
  	pr_debug("Memory: %lluMB of RAM detected at 0x%llx (min: %lluMB, max: %lluMB)\n",
+@@ -115,6 +121,7 @@ void __init detect_memory_region(phys_ad
+ 
+ 	memblock_add(start, size);
+ }
++#endif /* CONFIG_64BIT */
+ 
+ /*
+  * Manage initrd
diff --git a/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch b/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch
index 4654bc14ef..3bf7ae98bf 100644
--- a/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch
+++ b/target/linux/generic/pending-6.6/350-mips-kernel-fix-detect_memory_region-function.patch
@@ -7,35 +7,45 @@ Subject: [PATCH] mips: kernel: fix detect_memory_region() function
 2. Use a fixed pattern instead of a random function pointer as the
    magic value.
 3. Flip magic value and double check it.
+4. Enable this feature only for 32-bit CPUs. Currently, only ath79 and
+   ralink CPUs are using it.
 
 [1] 439a1bcac648 ("fortify: Use __builtin_dynamic_object_size() when available")
 Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
 ---
- arch/mips/kernel/setup.c | 16 +++++++++++-----
- 1 file changed, 11 insertions(+), 5 deletions(-)
+ arch/mips/include/asm/bootinfo.h |  2 ++
+ arch/mips/kernel/setup.c         | 17 ++++++++++++-----
+ 2 files changed, 14 insertions(+), 5 deletions(-)
 
+--- a/arch/mips/include/asm/bootinfo.h
++++ b/arch/mips/include/asm/bootinfo.h
+@@ -93,7 +93,9 @@ const char *get_system_type(void);
+ 
+ extern unsigned long mips_machtype;
+ 
++#ifndef CONFIG_64BIT
+ extern void detect_memory_region(phys_addr_t start, phys_addr_t sz_min,  phys_addr_t sz_max);
++#endif
+ 
+ extern void prom_init(void);
+ extern void prom_free_prom_memory(void);
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -46,6 +46,8 @@
- #include <asm/prom.h>
- #include <asm/fw/fw.h>
- 
-+#define MIPS_MEM_TEST_PATTERN		0xaa5555aa
-+
- #ifdef CONFIG_MIPS_ELF_APPENDED_DTB
- char __section(".appended_dtb") __appended_dtb[0x100000];
- #endif /* CONFIG_MIPS_ELF_APPENDED_DTB */
-@@ -90,7 +92,7 @@ static struct resource bss_resource = {
+@@ -90,21 +90,27 @@ static struct resource bss_resource = {
  unsigned long __kaslr_offset __ro_after_init;
  EXPORT_SYMBOL(__kaslr_offset);
  
 -static void *detect_magic __initdata = detect_memory_region;
-+static u32 detect_magic __initdata;
- 
+-
  #ifdef CONFIG_MIPS_AUTO_PFN_OFFSET
  unsigned long ARCH_PFN_OFFSET;
-@@ -99,12 +101,16 @@ EXPORT_SYMBOL(ARCH_PFN_OFFSET);
+ EXPORT_SYMBOL(ARCH_PFN_OFFSET);
+ #endif
  
++#ifndef CONFIG_64BIT
++static u32 detect_magic __initdata;
++#define MIPS_MEM_TEST_PATTERN		0xaa5555aa
++
  void __init detect_memory_region(phys_addr_t start, phys_addr_t sz_min, phys_addr_t sz_max)
  {
 -	void *dm = &detect_magic;
@@ -54,3 +64,11 @@ Signed-off-by: Shiji Yang <yangshiji66 at outlook.com>
  	}
  
  	pr_debug("Memory: %lluMB of RAM detected at 0x%llx (min: %lluMB, max: %lluMB)\n",
+@@ -115,6 +121,7 @@ void __init detect_memory_region(phys_ad
+ 
+ 	memblock_add(start, size);
+ }
++#endif /* CONFIG_64BIT */
+ 
+ /*
+  * Manage initrd
diff --git a/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch b/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch
index 26a28167c6..ac3f3b7aba 100644
--- a/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch
+++ b/target/linux/ramips/patches-6.1/314-MIPS-add-bootargs-override-property.patch
@@ -17,7 +17,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -557,8 +557,28 @@ static int __init bootcmdline_scan_chose
+@@ -564,8 +564,28 @@ static int __init bootcmdline_scan_chose
  
  #endif /* CONFIG_OF_EARLY_FLATTREE */
  
@@ -46,7 +46,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	bool dt_bootargs = false;
  
  	/*
-@@ -572,6 +592,14 @@ static void __init bootcmdline_init(void
+@@ -579,6 +599,14 @@ static void __init bootcmdline_init(void
  	}
  
  	/*
diff --git a/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch
index c31e6d7cde..f296c2d18d 100644
--- a/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch
+++ b/target/linux/ramips/patches-6.1/315-owrt-hack-fix-mt7688-cache-issue.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -699,7 +699,6 @@ static void __init arch_mem_init(char **
+@@ -706,7 +706,6 @@ static void __init arch_mem_init(char **
  	mips_reserve_vmcore();
  
  	mips_parse_crashkernel();
@@ -18,7 +18,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	/*
  	 * In order to reduce the possibility of kernel panic when failed to
-@@ -834,6 +833,7 @@ void __init setup_arch(char **cmdline_p)
+@@ -841,6 +840,7 @@ void __init setup_arch(char **cmdline_p)
  
  	cpu_cache_init();
  	paging_init();
diff --git a/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch b/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch
index f9975986fe..ac3f3b7aba 100644
--- a/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch
+++ b/target/linux/ramips/patches-6.6/314-MIPS-add-bootargs-override-property.patch
@@ -17,7 +17,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
 
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -563,8 +563,28 @@ static int __init bootcmdline_scan_chose
+@@ -564,8 +564,28 @@ static int __init bootcmdline_scan_chose
  
  #endif /* CONFIG_OF_EARLY_FLATTREE */
  
@@ -46,7 +46,7 @@ Signed-off-by: David Bauer <mail at david-bauer.net>
  	bool dt_bootargs = false;
  
  	/*
-@@ -578,6 +598,14 @@ static void __init bootcmdline_init(void
+@@ -579,6 +599,14 @@ static void __init bootcmdline_init(void
  	}
  
  	/*
diff --git a/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch b/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch
index 04f0a67325..2bb3d55d70 100644
--- a/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch
+++ b/target/linux/ramips/patches-6.6/315-owrt-hack-fix-mt7688-cache-issue.patch
@@ -10,7 +10,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
 
 --- a/arch/mips/kernel/setup.c
 +++ b/arch/mips/kernel/setup.c
-@@ -705,7 +705,6 @@ static void __init arch_mem_init(char **
+@@ -706,7 +706,6 @@ static void __init arch_mem_init(char **
  	mips_reserve_vmcore();
  
  	mips_parse_crashkernel();
@@ -18,7 +18,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  
  	/*
  	 * In order to reduce the possibility of kernel panic when failed to
-@@ -841,6 +840,7 @@ void __init setup_arch(char **cmdline_p)
+@@ -842,6 +841,7 @@ void __init setup_arch(char **cmdline_p)
  
  	cpu_cache_init();
  	paging_init();



From lede-commits at lists.infradead.org  Tue Apr 30 11:20:10 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 14:20:10 -0400
Subject: [openwrt/openwrt]  kernel: bump 6.1 to 6.1.89
In-Reply-To: <171450121013.2467074.10833400732561599376@git-01.infra.openwrt.org>
References: <171450121013.2467074.10833400732561599376@git-01.infra.openwrt.org>
Message-ID: <mailman.32432.1714501218.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch main:
https://git.openwrt.org/9e86e0b33bfa1a81cfc92647def72f151da2e5b7

commit 9e86e0b33bfa1a81cfc92647def72f151da2e5b7
Author: Shiji Yang <yangshiji66 at qq.com>
AuthorDate: Mon Apr 29 15:09:24 2024 +0000

    kernel: bump 6.1 to 6.1.89
    
    Changelogs:
    https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.67
    https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.68
    https://cdn.kernel.org/pub/linux/kernel/v6.x/ChangeLog-6.1.69
    
    Upstreamed patches:
    target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch [1]
    target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch [2]
    target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch [3]
    target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch [4]
    target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch [5]
    target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch [6]
    target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch [7]
    target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch [8]
    target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch [9]
    target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch [10]
    target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch [11]
    
    Symbol changes:
    MITIGATION_SPECTRE_BHI (new) [12]
    SPECTRE_BHI_{ON,OFF} (deprecated) [12]
    
    References:
    [1] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=8bf7c76a2a207ca2b4cfda0a279192adf27678d7
    [2] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=f1c3c61701a0b12f4906152c1626a5de580ea3d2
    [3] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=19643bf8c9b5bb5eea5163bf2f6a3eee6fb5b99b
    [4] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=e86c9db58eba290e858e2bb80efcde9e3973a5ef
    [5] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=013c787d231188a6408e2991150d3c9bf9a2aa0b
    [6] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=41a004ffba9b1fd8a5a7128ebd0dfa3ed39c3316
    [7] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=7d51db455ca03e5270cc585a75a674abd063fa6c
    [8] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=082b831488a41257b7ac7ffa1d80a0b60d98394d
    [9] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=6f5f72a684a2823f21efbfd20c7e4b528c44a781
    [10] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=a4fe8813a7868ba5867e42e60de7a2b8baac30ff
    [11] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=c1d87d56af063c87961511ee25f6b07a5676d27d
    [12] https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git/commit/?h=v6.1.89&id=d844df110084ef8bd950a52194865f3f63b561ca
    Signed-off-by: Shiji Yang <yangshiji66 at qq.com>
---
 include/kernel-6.1                                 |   4 +-
 .../patches-6.1/950-0106-Add-dwc_otg-driver.patch  |   2 +-
 ...mbing-for-updating-interrupt-endpoint-int.patch |   8 +-
 ...ent-xhci_fixup_endpoint-for-interval-adju.patch |   2 +-
 ...Use-more-event-ring-segment-table-entries.patch |   6 +-
 ...rkaround-for-bogus-SET_DEQ_PENDING-endpoi.patch |   2 +-
 ...-xhci-quirks-add-link-TRB-quirk-for-VL805.patch |   4 +-
 ...or-out-TRBS_PER_SEGMENT-define-in-runtime.patch |   8 +-
 ...0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch |   2 +-
 ...d-a-quirk-for-Superspeed-bulk-OUT-transfe.patch |   8 +-
 ...hci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch |   6 +-
 ...count-for-num_trbs_free-when-invalidating.patch |   8 +-
 ...0-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch |   8 +-
 ...-add-support-for-performing-fake-doorbell.patch |   2 +-
 ...netfilter-flowtable-validate-pppoe-header.patch |  87 ----
 ...netfilter-flowtable-incorrect-pppoe-tuple.patch |  24 -
 ...ow-DSA-switch-drivers-to-provide-their-ow.patch |   2 +-
 ...et-dsa-mt7530-remove-redundant-assignment.patch |   2 +-
 ....4-net-dsa-mt7530-use-external-PCS-driver.patch |  24 +-
 ...et-dsa-mt7530-refactor-SGMII-PCS-creation.patch |   4 +-
 ...-dsa-mt7530-use-unlocked-regmap-accessors.patch |   6 +-
 ...530-use-regmap-to-access-switch-register-.patch |  14 +-
 ...530-move-SGMII-PCS-creation-to-mt7530_pro.patch |   6 +-
 ....4-net-dsa-mt7530-introduce-mutex-helpers.patch |  28 +-
 ...530-move-p5_intf_modes-function-to-mt7530.patch |   4 +-
 ...530-introduce-mt7530_probe_common-helper-.patch |   6 +-
 ...530-introduce-mt7530_remove_common-helper.patch |   4 +-
 ...dsa-mt7530-introduce-separate-MDIO-driver.patch |  16 +-
 ...530-introduce-driver-for-MT7988-built-in-.patch |  24 +-
 ...4-net-dsa-mt7530-fix-support-for-MT7531BE.patch |   8 +-
 ...7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch |  79 ---
 ...-mt7530-update-PCS-driver-to-use-neg_mode.patch |   4 +-
 ...-mt753x-remove-mt753x_phylink_pcs_link_up.patch |   4 +-
 ...530-replace-deprecated-strncpy-with-ethto.patch |   2 +-
 ...530-support-OF-based-registration-of-swit.patch |   4 +-
 ...t7530-fix-10M-100M-speed-on-MT7988-switch.patch |   2 +-
 ...530-always-trap-frames-to-active-CPU-port.patch |  18 +-
 ...530-use-p5_interface_select-as-data-type-.patch |   4 +-
 ...530-store-port-5-SGMII-capability-of-MT75.patch |  28 +-
 ...530-improve-comments-regarding-switch-por.patch |  12 +-
 ...530-improve-code-path-for-setting-up-port.patch |   6 +-
 ...530-do-not-set-priv-p5_interface-on-mt753.patch |   2 +-
 ...530-do-not-run-mt7530_setup_port5-if-port.patch |   6 +-
 ...530-empty-default-case-on-mt7530_setup_po.patch |   4 +-
 ...sa-mt7530-move-XTAL-check-to-mt7530_setup.patch |   4 +-
 ...-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch |   2 +-
 ...530-call-port-6-setup-from-mt7530_mac_con.patch |   8 +-
 ...-mt7530-remove-pad_setup-function-pointer.patch |  22 +-
 ...t7530-correct-port-capabilities-of-MT7988.patch |   2 +-
 ...530-do-not-clear-config-supported_interfa.patch |   2 +-
 ...530-remove-.mac_port_config-for-MT7988-an.patch |   8 +-
 ...530-set-interrupt-register-only-for-MT753.patch |   2 +-
 ...530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch |   2 +-
 ...530-get-rid-of-useless-error-returns-on-p.patch |  18 +-
 ...7530-get-rid-of-priv-info-cpu_port_config.patch |  44 +-
 ...t-dsa-mt7530-get-rid-of-mt753x_mac_config.patch |   4 +-
 ...530-put-initialising-PCS-devices-code-bac.patch |   4 +-
 ...530-sort-link-settings-ops-and-force-link.patch |   8 +-
 ...9-net-dsa-mt7530-simplify-link-operations.patch |   4 +-
 ...530-fix-improper-frames-on-all-25MHz-and-.patch |  74 ---
 ...530-fix-enabling-EEE-on-MT7531-switch-on-.patch |  92 ----
 ...530-trap-link-local-frames-regardless-of-.patch | 483 -------------------
 ...mt7530-provide-own-phylink-MAC-operations.patch |  10 +-
 ...530-fix-mirroring-frames-received-on-loca.patch |  70 ---
 ...530-fix-port-mirroring-for-MT7988-SoC-swi.patch |   2 +-
 ...530-mdio-read-PHY-address-of-switch-from-.patch |   2 +-
 ....10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch |  18 +-
 ...530-rename-p5_intf_sel-and-use-only-for-M.patch |  12 +-
 ...530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch |   2 +-
 ...530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch |  14 +-
 ...530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch |  20 +-
 ...530-move-MT753X_MTRAP-operations-for-MT75.patch |  12 +-
 ...530-return-mt7530_setup_mdio-mt7531_setup.patch |   4 +-
 ...530-define-MAC-speed-capabilities-per-swi.patch |   8 +-
 ...a-mt7530-get-rid-of-function-sanity-check.patch |   2 +-
 ...-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch |   4 +-
 ...530-use-priv-ds-num_ports-instead-of-MT75.patch |   8 +-
 ...530-do-not-pass-port-variable-to-mt7531_r.patch |   4 +-
 ...530-explain-exposing-MDIO-bus-of-MT7531AE.patch |   2 +-
 .../780-usb-net-MeigLink_modem_support.patch       |   4 +-
 ...-bridge_allow_receiption_on_disabled_port.patch |   4 +-
 ...610-netfilter_match_bypass_default_checks.patch |   2 +-
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |   2 +-
 ...ge-add-knob-for-filtering-rx-tx-BPDU-pack.patch |   2 +-
 ...mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch |   2 +-
 .../811-pci_disable_usb_common_quirks.patch        |   8 +-
 .../generic/pending-6.1/920-mangle_bootargs.patch  |   2 +-
 ...k-clk-gate-Propagate-struct-device-with-m.patch | 536 ---------------------
 ...k-cpumux-Propagate-struct-device-where-po.patch |  12 +-
 ...k-clk-mtk-Propagate-struct-device-for-com.patch | 181 -------
 ...k-clk-mux-Propagate-struct-device-for-mtk.patch | 103 ----
 ...-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch |   4 +-
 ...iatek-clk-mtk-Extend-mtk_clk_simple_probe.patch | 189 --------
 ...vebu-Mangle-bootloader-s-kernel-arguments.patch |   2 +-
 target/linux/x86/config-6.1                        |   4 +-
 95 files changed, 309 insertions(+), 2229 deletions(-)

diff --git a/include/kernel-6.1 b/include/kernel-6.1
index 7760c440af..6717917ac1 100644
--- a/include/kernel-6.1
+++ b/include/kernel-6.1
@@ -1,2 +1,2 @@
-LINUX_VERSION-6.1 = .86
-LINUX_KERNEL_HASH-6.1.86 = d3d3c8c44f0f0a870a95bd2823f9d91979d1aa6f266da5d8cccd0c4b15e3115b
+LINUX_VERSION-6.1 = .89
+LINUX_KERNEL_HASH-6.1.89 = 12bab8e092618d1d4eeaf4201e6e70054c94896198956bd84ff0e908b0264719
diff --git a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch
index ab145eb66f..600fe08126 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0106-Add-dwc_otg-driver.patch
@@ -1185,7 +1185,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5686,7 +5686,7 @@ static void port_event(struct usb_hub *h
+@@ -5697,7 +5697,7 @@ static void port_event(struct usb_hub *h
  		port_dev->over_current_count++;
  		port_over_current_notify(port_dev);
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0181-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch b/target/linux/bcm27xx/patches-6.1/950-0181-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
index 34b923fb23..3feabeaf9d 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0181-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0181-usb-add-plumbing-for-updating-interrupt-endpoint-int.patch
@@ -90,10 +90,10 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
 +		 */
 +	void	(*fixup_endpoint)(struct usb_hcd *hcd, struct usb_device *udev,
 +				  struct usb_host_endpoint *ep, int interval);
- 		/* Returns the hardware-chosen device address */
- 	int	(*address_device)(struct usb_hcd *, struct usb_device *udev);
- 		/* prepares the hardware to send commands to the device */
-@@ -435,6 +440,8 @@ extern void usb_hcd_unmap_urb_setup_for_
+ 		/* Set the hardware-chosen device address */
+ 	int	(*address_device)(struct usb_hcd *, struct usb_device *udev,
+ 				  unsigned int timeout_ms);
+@@ -436,6 +441,8 @@ extern void usb_hcd_unmap_urb_setup_for_
  extern void usb_hcd_unmap_urb_for_dma(struct usb_hcd *, struct urb *);
  extern void usb_hcd_flush_endpoint(struct usb_device *udev,
  		struct usb_host_endpoint *ep);
diff --git a/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
index 3c1e41ba0a..a5e08d4cca 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0182-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
@@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
   * non-error returns are a promise to giveback() the urb later
   * we drop ownership so next owner (or urb unlink) can get it
   */
-@@ -5471,6 +5574,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5480,6 +5583,7 @@ static const struct hc_driver xhci_hc_dr
  	.endpoint_reset =	xhci_endpoint_reset,
  	.check_bandwidth =	xhci_check_bandwidth,
  	.reset_bandwidth =	xhci_reset_bandwidth,
diff --git a/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch b/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch
index 93f7ffde9c..1188b4dbe4 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0190-xhci-Use-more-event-ring-segment-table-entries.patch
@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
 
 --- a/drivers/usb/host/xhci-mem.c
 +++ b/drivers/usb/host/xhci-mem.c
-@@ -2522,9 +2522,11 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+@@ -2524,9 +2524,11 @@ int xhci_mem_init(struct xhci_hcd *xhci,
  	 * Event ring setup: Allocate a normal ring, but also setup
  	 * the event ring segment table (ERST).  Section 4.9.3.
  	 */
@@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  	if (!xhci->event_ring)
  		goto fail;
  	if (xhci_check_trb_in_td_math(xhci) < 0)
-@@ -2537,7 +2539,7 @@ int xhci_mem_init(struct xhci_hcd *xhci,
+@@ -2539,7 +2541,7 @@ int xhci_mem_init(struct xhci_hcd *xhci,
  	/* set ERST count with the number of entries in the segment table */
  	val = readl(&xhci->ir_set->erst_size);
  	val &= ERST_SIZE_MASK;
@@ -47,7 +47,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  			val);
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1672,8 +1672,8 @@ struct urb_priv {
+@@ -1677,8 +1677,8 @@ struct urb_priv {
   * Each segment table entry is 4*32bits long.  1K seems like an ok size:
   * (1K bytes * 8bytes/bit) / (4*32 bits) = 64 segment entries in the table,
   * meaning 64 ring segments.
diff --git a/target/linux/bcm27xx/patches-6.1/950-0327-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch b/target/linux/bcm27xx/patches-6.1/950-0327-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch
index db15c65809..ed242cbbe4 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0327-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0327-usb-xhci-workaround-for-bogus-SET_DEQ_PENDING-endpoi.patch
@@ -26,7 +26,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
 
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -674,9 +674,9 @@ deq_found:
+@@ -675,9 +675,9 @@ deq_found:
  	}
  
  	if ((ep->ep_state & SET_DEQ_PENDING)) {
diff --git a/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch b/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
index 073bb8be79..0725689bf8 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0359-xhci-quirks-add-link-TRB-quirk-for-VL805.patch
@@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  		pdev->device == PCI_DEVICE_ID_ASMEDIA_1042_XHCI) {
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -664,6 +664,15 @@ static int xhci_move_dequeue_past_td(str
+@@ -665,6 +665,15 @@ static int xhci_move_dequeue_past_td(str
  	} while (!cycle_found || !td_last_trb_found);
  
  deq_found:
@@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	addr = xhci_trb_virt_to_dma(new_seg, new_deq);
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1902,6 +1902,7 @@ struct xhci_hcd {
+@@ -1907,6 +1907,7 @@ struct xhci_hcd {
  #define XHCI_RESET_TO_DEFAULT	BIT_ULL(44)
  #define XHCI_ZHAOXIN_TRB_FETCH	BIT_ULL(45)
  #define XHCI_ZHAOXIN_HOST	BIT_ULL(46)
diff --git a/target/linux/bcm27xx/patches-6.1/950-0361-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch b/target/linux/bcm27xx/patches-6.1/950-0361-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch
index ab76ad76cd..4147167600 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0361-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0361-xhci-refactor-out-TRBS_PER_SEGMENT-define-in-runtime.patch
@@ -144,7 +144,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	if (ret)
  		return -ENOMEM;
  
-@@ -1811,7 +1815,7 @@ int xhci_alloc_erst(struct xhci_hcd *xhc
+@@ -1813,7 +1817,7 @@ int xhci_alloc_erst(struct xhci_hcd *xhc
  	for (val = 0; val < evt_ring->num_segs; val++) {
  		entry = &erst->entries[val];
  		entry->seg_addr = cpu_to_le64(seg->dma);
@@ -204,7 +204,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  		xhci_err(xhci, "Tried to move enqueue past ring segment\n");
  		return;
  	}
-@@ -3150,7 +3153,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd
+@@ -3151,7 +3154,7 @@ irqreturn_t xhci_irq(struct usb_hcd *hcd
  	 * that clears the EHB.
  	 */
  	while (xhci_handle_event(xhci) > 0) {
@@ -213,7 +213,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  			continue;
  		xhci_update_erst_dequeue(xhci, event_ring_deq);
  		event_ring_deq = xhci->event_ring->dequeue;
-@@ -3292,7 +3295,8 @@ static int prepare_ring(struct xhci_hcd
+@@ -3293,7 +3296,8 @@ static int prepare_ring(struct xhci_hcd
  		}
  	}
  
@@ -247,7 +247,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	 * when the cycle bit is set to 1.
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1634,6 +1634,7 @@ struct xhci_ring {
+@@ -1639,6 +1639,7 @@ struct xhci_ring {
  	unsigned int		num_trbs_free;
  	unsigned int		num_trbs_free_temp;
  	unsigned int		bounce_buf_len;
diff --git a/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch
index 041f98a97d..da0d7cd969 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0362-usb-xhci-add-VLI_TRB_CACHE_BUG-quirk.patch
@@ -63,7 +63,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1904,6 +1904,7 @@ struct xhci_hcd {
+@@ -1909,6 +1909,7 @@ struct xhci_hcd {
  #define XHCI_ZHAOXIN_TRB_FETCH	BIT_ULL(45)
  #define XHCI_ZHAOXIN_HOST	BIT_ULL(46)
  #define XHCI_AVOID_DQ_ON_LINK  BIT_ULL(47)
diff --git a/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch b/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch
index 0dd7b78b30..df13f539bd 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0390-usb-xhci-add-a-quirk-for-Superspeed-bulk-OUT-transfe.patch
@@ -36,7 +36,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -3605,14 +3605,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3606,14 +3606,15 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  	unsigned int num_trbs;
  	unsigned int start_cycle, num_sgs = 0;
  	unsigned int enqd_len, block_len, trb_buff_len, full_len;
@@ -54,7 +54,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	full_len = urb->transfer_buffer_length;
  	/* If we have scatter/gather list, we use it. */
  	if (urb->num_sgs && !(urb->transfer_flags & URB_DMA_MAP_SINGLE)) {
-@@ -3649,6 +3650,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3650,6 +3651,17 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  	start_cycle = ring->cycle_state;
  	send_addr = addr;
  
@@ -72,7 +72,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	/* Queue the TRBs, even if they are zero-length */
  	for (enqd_len = 0; first_trb || enqd_len < full_len;
  			enqd_len += trb_buff_len) {
-@@ -3661,6 +3673,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3662,6 +3674,11 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  		if (enqd_len + trb_buff_len > full_len)
  			trb_buff_len = full_len - enqd_len;
  
@@ -86,7 +86,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  			first_trb = false;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1905,6 +1905,7 @@ struct xhci_hcd {
+@@ -1910,6 +1910,7 @@ struct xhci_hcd {
  #define XHCI_ZHAOXIN_HOST	BIT_ULL(46)
  #define XHCI_AVOID_DQ_ON_LINK  BIT_ULL(47)
  #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48)
diff --git a/target/linux/bcm27xx/patches-6.1/950-0392-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch b/target/linux/bcm27xx/patches-6.1/950-0392-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch
index e3f1848ad5..fecee7d952 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0392-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0392-usb-xhci-rework-XHCI_VLI_SS_BULK_OUT_BUG-quirk.patch
@@ -13,7 +13,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
 
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -3605,7 +3605,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3606,7 +3606,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  	unsigned int num_trbs;
  	unsigned int start_cycle, num_sgs = 0;
  	unsigned int enqd_len, block_len, trb_buff_len, full_len;
@@ -22,7 +22,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	u32 field, length_field, remainder, maxpacket;
  	u64 addr, send_addr;
  
-@@ -3651,14 +3651,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3652,14 +3652,9 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  	send_addr = addr;
  
  	if (xhci->quirks & XHCI_VLI_SS_BULK_OUT_BUG &&
@@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	}
  
  	/* Queue the TRBs, even if they are zero-length */
-@@ -3673,7 +3668,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3674,7 +3669,7 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  		if (enqd_len + trb_buff_len > full_len)
  			trb_buff_len = full_len - enqd_len;
  
diff --git a/target/linux/bcm27xx/patches-6.1/950-0438-usb-xhci-account-for-num_trbs_free-when-invalidating.patch b/target/linux/bcm27xx/patches-6.1/950-0438-usb-xhci-account-for-num_trbs_free-when-invalidating.patch
index f604759c2f..1afe830091 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0438-usb-xhci-account-for-num_trbs_free-when-invalidating.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0438-usb-xhci-account-for-num_trbs_free-when-invalidating.patch
@@ -31,7 +31,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
 
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -1012,11 +1012,13 @@ static int xhci_invalidate_cancelled_tds
+@@ -1013,11 +1013,13 @@ static int xhci_invalidate_cancelled_tds
  						 td->urb->stream_id, td->urb,
  						 cached_td->urb->stream_id, cached_td->urb);
  				cached_td = td;
@@ -45,7 +45,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  		}
  	}
  
-@@ -1264,10 +1266,7 @@ static void update_ring_for_set_deq_comp
+@@ -1265,10 +1267,7 @@ static void update_ring_for_set_deq_comp
  		unsigned int ep_index)
  {
  	union xhci_trb *dequeue_temp;
@@ -56,7 +56,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	dequeue_temp = ep_ring->dequeue;
  
  	/* If we get two back-to-back stalls, and the first stalled transfer
-@@ -1282,8 +1281,6 @@ static void update_ring_for_set_deq_comp
+@@ -1283,8 +1282,6 @@ static void update_ring_for_set_deq_comp
  	}
  
  	while (ep_ring->dequeue != dev->eps[ep_index].queued_deq_ptr) {
@@ -65,7 +65,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  		ep_ring->dequeue++;
  		if (trb_is_link(ep_ring->dequeue)) {
  			if (ep_ring->dequeue ==
-@@ -1293,15 +1290,10 @@ static void update_ring_for_set_deq_comp
+@@ -1294,15 +1291,10 @@ static void update_ring_for_set_deq_comp
  			ep_ring->dequeue = ep_ring->deq_seg->trbs;
  		}
  		if (ep_ring->dequeue == dequeue_temp) {
diff --git a/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch b/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
index ade55cf337..ab0bae587b 100644
--- a/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
+++ b/target/linux/bcm27xx/patches-6.1/950-0469-usb-xhci-add-XHCI_VLI_HUB_TT_QUIRK.patch
@@ -40,7 +40,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	if (pdev->vendor == PCI_VENDOR_ID_ASMEDIA &&
 --- a/drivers/usb/host/xhci-ring.c
 +++ b/drivers/usb/host/xhci-ring.c
-@@ -3582,6 +3582,48 @@ static int xhci_align_td(struct xhci_hcd
+@@ -3583,6 +3583,48 @@ static int xhci_align_td(struct xhci_hcd
  	return 1;
  }
  
@@ -89,7 +89,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  /* This is very similar to what ehci-q.c qtd_fill() does */
  int xhci_queue_bulk_tx(struct xhci_hcd *xhci, gfp_t mem_flags,
  		struct urb *urb, int slot_id, unsigned int ep_index)
-@@ -3750,6 +3792,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
+@@ -3751,6 +3793,8 @@ int xhci_queue_bulk_tx(struct xhci_hcd *
  	}
  
  	check_trb_math(urb, enqd_len);
@@ -98,7 +98,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	giveback_first_trb(xhci, slot_id, ep_index, urb->stream_id,
  			start_cycle, start_trb);
  	return 0;
-@@ -3885,6 +3929,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
+@@ -3886,6 +3930,8 @@ int xhci_queue_ctrl_tx(struct xhci_hcd *
  			/* Event on completion */
  			field | TRB_IOC | TRB_TYPE(TRB_STATUS) | ep_ring->cycle_state);
  
@@ -109,7 +109,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
  	return 0;
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1906,6 +1906,7 @@ struct xhci_hcd {
+@@ -1911,6 +1911,7 @@ struct xhci_hcd {
  #define XHCI_AVOID_DQ_ON_LINK  BIT_ULL(47)
  #define XHCI_VLI_TRB_CACHE_BUG BIT_ULL(48)
  #define XHCI_VLI_SS_BULK_OUT_BUG       BIT_ULL(49)
diff --git a/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch b/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
index edae77ccd1..9c769880a0 100644
--- a/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
+++ b/target/linux/bcm53xx/patches-6.1/180-usb-xhci-add-support-for-performing-fake-doorbell.patch
@@ -108,7 +108,7 @@ it on BCM4708 family.
  	if (xhci->quirks & XHCI_NEC_HOST)
 --- a/drivers/usb/host/xhci.h
 +++ b/drivers/usb/host/xhci.h
-@@ -1902,6 +1902,7 @@ struct xhci_hcd {
+@@ -1907,6 +1907,7 @@ struct xhci_hcd {
  #define XHCI_RESET_TO_DEFAULT	BIT_ULL(44)
  #define XHCI_ZHAOXIN_TRB_FETCH	BIT_ULL(45)
  #define XHCI_ZHAOXIN_HOST	BIT_ULL(46)
diff --git a/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch b/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
deleted file mode 100644
index 29f211e8a5..0000000000
--- a/target/linux/generic/backport-6.1/740-v6.9-01-netfilter-flowtable-validate-pppoe-header.patch
+++ /dev/null
@@ -1,87 +0,0 @@
-From: Pablo Neira Ayuso <pablo at netfilter.org>
-Date: Thu, 11 Apr 2024 13:28:59 +0200
-Subject: [PATCH] netfilter: flowtable: validate pppoe header
-
-Ensure there is sufficient room to access the protocol field of the
-PPPoe header. Validate it once before the flowtable lookup, then use a
-helper function to access protocol field.
-
-Reported-by: syzbot+b6f07e1c07ef40199081 at syzkaller.appspotmail.com
-Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
-Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
----
-
---- a/include/net/netfilter/nf_flow_table.h
-+++ b/include/net/netfilter/nf_flow_table.h
-@@ -335,7 +335,7 @@ int nf_flow_rule_route_ipv6(struct net *
- int nf_flow_table_offload_init(void);
- void nf_flow_table_offload_exit(void);
- 
--static inline __be16 nf_flow_pppoe_proto(const struct sk_buff *skb)
-+static inline __be16 __nf_flow_pppoe_proto(const struct sk_buff *skb)
- {
- 	__be16 proto;
- 
-@@ -351,6 +351,16 @@ static inline __be16 nf_flow_pppoe_proto
- 	return 0;
- }
- 
-+static inline bool nf_flow_pppoe_proto(struct sk_buff *skb, __be16 *inner_proto)
-+{
-+	if (!pskb_may_pull(skb, PPPOE_SES_HLEN))
-+		return false;
-+
-+	*inner_proto = __nf_flow_pppoe_proto(skb);
-+
-+	return true;
-+}
-+
- #define NF_FLOW_TABLE_STAT_INC(net, count) __this_cpu_inc((net)->ft.stat->count)
- #define NF_FLOW_TABLE_STAT_DEC(net, count) __this_cpu_dec((net)->ft.stat->count)
- #define NF_FLOW_TABLE_STAT_INC_ATOMIC(net, count)	\
---- a/net/netfilter/nf_flow_table_inet.c
-+++ b/net/netfilter/nf_flow_table_inet.c
-@@ -21,7 +21,8 @@ nf_flow_offload_inet_hook(void *priv, st
- 		proto = veth->h_vlan_encapsulated_proto;
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		proto = nf_flow_pppoe_proto(skb);
-+		if (!nf_flow_pppoe_proto(skb, &proto))
-+			return NF_ACCEPT;
- 		break;
- 	default:
- 		proto = skb->protocol;
---- a/net/netfilter/nf_flow_table_ip.c
-+++ b/net/netfilter/nf_flow_table_ip.c
-@@ -267,10 +267,11 @@ static unsigned int nf_flow_xmit_xfrm(st
- 	return NF_STOLEN;
- }
- 
--static bool nf_flow_skb_encap_protocol(const struct sk_buff *skb, __be16 proto,
-+static bool nf_flow_skb_encap_protocol(struct sk_buff *skb, __be16 proto,
- 				       u32 *offset)
- {
- 	struct vlan_ethhdr *veth;
-+	__be16 inner_proto;
- 
- 	switch (skb->protocol) {
- 	case htons(ETH_P_8021Q):
-@@ -281,7 +282,8 @@ static bool nf_flow_skb_encap_protocol(c
- 		}
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		if (nf_flow_pppoe_proto(skb) == proto) {
-+		if (nf_flow_pppoe_proto(skb, &inner_proto) &&
-+		    inner_proto == proto) {
- 			*offset += PPPOE_SES_HLEN;
- 			return true;
- 		}
-@@ -310,7 +312,7 @@ static void nf_flow_encap_pop(struct sk_
- 			skb_reset_network_header(skb);
- 			break;
- 		case htons(ETH_P_PPP_SES):
--			skb->protocol = nf_flow_pppoe_proto(skb);
-+			skb->protocol = __nf_flow_pppoe_proto(skb);
- 			skb_pull(skb, PPPOE_SES_HLEN);
- 			skb_reset_network_header(skb);
- 			break;
diff --git a/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch b/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
deleted file mode 100644
index 3b822b169d..0000000000
--- a/target/linux/generic/backport-6.1/740-v6.9-02-netfilter-flowtable-incorrect-pppoe-tuple.patch
+++ /dev/null
@@ -1,24 +0,0 @@
-From: Pablo Neira Ayuso <pablo at netfilter.org>
-Date: Thu, 11 Apr 2024 13:29:00 +0200
-Subject: [PATCH] netfilter: flowtable: incorrect pppoe tuple
-
-pppoe traffic reaching ingress path does not match the flowtable entry
-because the pppoe header is expected to be at the network header offset.
-This bug causes a mismatch in the flow table lookup, so pppoe packets
-enter the classical forwarding path.
-
-Fixes: 72efd585f714 ("netfilter: flowtable: add pppoe support")
-Signed-off-by: Pablo Neira Ayuso <pablo at netfilter.org>
----
-
---- a/net/netfilter/nf_flow_table_ip.c
-+++ b/net/netfilter/nf_flow_table_ip.c
-@@ -156,7 +156,7 @@ static void nf_flow_tuple_encap(struct s
- 		tuple->encap[i].proto = skb->protocol;
- 		break;
- 	case htons(ETH_P_PPP_SES):
--		phdr = (struct pppoe_hdr *)skb_mac_header(skb);
-+		phdr = (struct pppoe_hdr *)skb_network_header(skb);
- 		tuple->encap[i].id = ntohs(phdr->sid);
- 		tuple->encap[i].proto = skb->protocol;
- 		break;
diff --git a/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch b/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch
index 51250ac97a..0119925ab0 100644
--- a/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch
+++ b/target/linux/generic/backport-6.1/766-v6.10-net-dsa-allow-DSA-switch-drivers-to-provide-their-ow.patch
@@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		}
 --- a/net/dsa/dsa2.c
 +++ b/net/dsa/dsa2.c
-@@ -1736,6 +1736,15 @@ static int dsa_switch_probe(struct dsa_s
+@@ -1758,6 +1758,15 @@ static int dsa_switch_probe(struct dsa_s
  	if (!ds->num_ports)
  		return -EINVAL;
  
diff --git a/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch b/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch
index f662a76368..e0319fd355 100644
--- a/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch
+++ b/target/linux/generic/backport-6.1/790-01-v6.2-net-dsa-mt7530-remove-redundant-assignment.patch
@@ -20,7 +20,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3010,9 +3010,6 @@ static void mt753x_phylink_get_caps(stru
+@@ -3198,9 +3198,6 @@ static void mt753x_phylink_get_caps(stru
  	config->mac_capabilities = MAC_ASYM_PAUSE | MAC_SYM_PAUSE |
  				   MAC_10 | MAC_100 | MAC_1000FD;
  
diff --git a/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch b/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch
index 36ff3549e9..2697f2e563 100644
--- a/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch
+++ b/target/linux/generic/backport-6.1/790-02-v6.4-net-dsa-mt7530-use-external-PCS-driver.patch
@@ -44,7 +44,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  #include <linux/phylink.h>
  #include <linux/regmap.h>
  #include <linux/regulator/consumer.h>
-@@ -2651,128 +2652,11 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2839,128 +2840,11 @@ static int mt7531_rgmii_setup(struct mt7
  	return 0;
  }
  
@@ -173,7 +173,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
-@@ -2795,11 +2679,11 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2983,11 +2867,11 @@ mt7531_mac_config(struct dsa_switch *ds,
  		phydev = dp->slave->phydev;
  		return mt7531_rgmii_setup(priv, port, interface, phydev);
  	case PHY_INTERFACE_MODE_SGMII:
@@ -187,7 +187,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	default:
  		return -EINVAL;
  	}
-@@ -2824,11 +2708,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
+@@ -3012,11 +2896,11 @@ mt753x_phylink_mac_select_pcs(struct dsa
  
  	switch (interface) {
  	case PHY_INTERFACE_MODE_TRGMII:
@@ -201,7 +201,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	default:
  		return NULL;
  	}
-@@ -3066,86 +2950,6 @@ static void mt7530_pcs_get_state(struct
+@@ -3254,86 +3138,6 @@ static void mt7530_pcs_get_state(struct
  		state->pause |= MLO_PAUSE_TX;
  }
  
@@ -288,7 +288,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int mt753x_pcs_config(struct phylink_pcs *pcs, unsigned int mode,
  			     phy_interface_t interface,
  			     const unsigned long *advertising,
-@@ -3165,18 +2969,57 @@ static const struct phylink_pcs_ops mt75
+@@ -3353,18 +3157,57 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -352,7 +352,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3184,8 +3027,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3372,8 +3215,6 @@ mt753x_setup(struct dsa_switch *ds)
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
  		priv->pcs[i].priv = priv;
  		priv->pcs[i].port = i;
@@ -361,7 +361,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	ret = priv->info->sw_setup(ds);
-@@ -3200,6 +3041,16 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3388,6 +3229,16 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -378,7 +378,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	return ret;
  }
  
-@@ -3291,7 +3142,7 @@ static const struct mt753x_info mt753x_t
+@@ -3480,7 +3331,7 @@ static const struct mt753x_info mt753x_t
  	},
  	[ID_MT7531] = {
  		.id = ID_MT7531,
@@ -387,7 +387,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.sw_setup = mt7531_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
-@@ -3399,7 +3250,7 @@ static void
+@@ -3588,7 +3439,7 @@ static void
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
@@ -396,7 +396,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	if (!priv)
  		return;
-@@ -3418,6 +3269,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3607,6 +3458,10 @@ mt7530_remove(struct mdio_device *mdiode
  		mt7530_free_irq(priv);
  
  	dsa_unregister_switch(priv->ds);
@@ -409,7 +409,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -391,47 +391,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -401,47 +401,8 @@ enum mt7530_vlan_port_acc_frm {
  					 CCR_TX_OCT_CNT_BAD)
  
  /* MT7531 SGMII register group */
@@ -459,7 +459,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  /* Register for system reset */
  #define MT7530_SYS_CTRL			0x7000
-@@ -730,13 +691,13 @@ struct mt7530_fdb {
+@@ -741,13 +702,13 @@ struct mt7530_fdb {
   * @pm:		The matrix used to show all connections with the port.
   * @pvid:	The VLAN specified is to be considered a PVID at ingress.  Any
   *		untagged frames will be assigned to the related VLAN.
diff --git a/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch b/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
index ed24c452e2..1bf19a813e 100644
--- a/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
+++ b/target/linux/generic/backport-6.1/790-04-v6.4-net-dsa-mt7530-refactor-SGMII-PCS-creation.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3001,26 +3001,56 @@ static const struct regmap_bus mt7531_re
+@@ -3189,26 +3189,56 @@ static const struct regmap_bus mt7531_re
  	.reg_update_bits = mt7530_regmap_update_bits,
  };
  
@@ -88,7 +88,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int i, ret;
  
  	/* Initialise the PCS devices */
-@@ -3042,15 +3072,11 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3230,15 +3260,11 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch b/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
index 0298ebd274..bd28b4be76 100644
--- a/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
+++ b/target/linux/generic/backport-6.1/790-05-v6.4-net-dsa-mt7530-use-unlocked-regmap-accessors.patch
@@ -19,7 +19,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2974,7 +2974,7 @@ static int mt7530_regmap_read(void *cont
+@@ -3162,7 +3162,7 @@ static int mt7530_regmap_read(void *cont
  {
  	struct mt7530_priv *priv = context;
  
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return 0;
  };
  
-@@ -2982,23 +2982,25 @@ static int mt7530_regmap_write(void *con
+@@ -3170,23 +3170,25 @@ static int mt7530_regmap_write(void *con
  {
  	struct mt7530_priv *priv = context;
  
@@ -62,7 +62,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  static int
-@@ -3024,6 +3026,9 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3212,6 +3214,9 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->reg_stride = 4;
  		mt7531_pcs_config[i]->reg_base = MT7531_SGMII_REG_BASE(5 + i);
  		mt7531_pcs_config[i]->max_register = 0x17c;
diff --git a/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch b/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
index e5625f67de..42c225d91c 100644
--- a/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
+++ b/target/linux/generic/backport-6.1/790-06-v6.4-net-dsa-mt7530-use-regmap-to-access-switch-register-.patch
@@ -133,7 +133,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2970,22 +2991,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3158,22 +3179,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -156,7 +156,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void
  mt7530_mdio_regmap_lock(void *mdio_lock)
  {
-@@ -2998,7 +3003,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
+@@ -3186,7 +3191,7 @@ mt7530_mdio_regmap_unlock(void *mdio_loc
  	mutex_unlock(mdio_lock);
  }
  
@@ -165,7 +165,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	.reg_write = mt7530_regmap_write,
  	.reg_read = mt7530_regmap_read,
  };
-@@ -3031,7 +3036,7 @@ mt7531_create_sgmii(struct mt7530_priv *
+@@ -3219,7 +3224,7 @@ mt7531_create_sgmii(struct mt7530_priv *
  		mt7531_pcs_config[i]->lock_arg = &priv->bus->mdio_lock;
  
  		regmap = devm_regmap_init(priv->dev,
@@ -174,7 +174,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					  mt7531_pcs_config[i]);
  		if (IS_ERR(regmap)) {
  			ret = PTR_ERR(regmap);
-@@ -3196,6 +3201,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
+@@ -3385,6 +3390,7 @@ MODULE_DEVICE_TABLE(of, mt7530_of_match)
  static int
  mt7530_probe(struct mdio_device *mdiodev)
  {
@@ -182,7 +182,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv;
  	struct device_node *dn;
  
-@@ -3275,6 +3281,21 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3464,6 +3470,21 @@ mt7530_probe(struct mdio_device *mdiodev
  	mutex_init(&priv->reg_mutex);
  	dev_set_drvdata(&mdiodev->dev, priv);
  
@@ -206,7 +206,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -774,6 +774,7 @@ struct mt753x_info {
+@@ -785,6 +785,7 @@ struct mt753x_info {
   * @dev:		The device pointer
   * @ds:			The pointer to the dsa core structure
   * @bus:		The bus used for the device and built-in PHY
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
   * @rstc:		The pointer to reset control used by MCM
   * @core_pwr:		The power supplied into the core
   * @io_pwr:		The power supplied into the I/O
-@@ -794,6 +795,7 @@ struct mt7530_priv {
+@@ -805,6 +806,7 @@ struct mt7530_priv {
  	struct device		*dev;
  	struct dsa_switch	*ds;
  	struct mii_bus		*bus;
diff --git a/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch b/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
index ca1f38f9c2..9cd817c056 100644
--- a/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
+++ b/target/linux/generic/backport-6.1/790-07-v6.4-net-dsa-mt7530-move-SGMII-PCS-creation-to-mt7530_pro.patch
@@ -18,7 +18,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3082,12 +3082,6 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3270,12 +3270,6 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -31,7 +31,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	return ret;
  }
  
-@@ -3204,6 +3198,7 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3393,6 +3387,7 @@ mt7530_probe(struct mdio_device *mdiodev
  	static struct regmap_config *regmap_config;
  	struct mt7530_priv *priv;
  	struct device_node *dn;
@@ -39,7 +39,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	dn = mdiodev->dev.of_node;
  
-@@ -3296,6 +3291,12 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3485,6 +3480,12 @@ mt7530_probe(struct mdio_device *mdiodev
  	if (IS_ERR(priv->regmap))
  		return PTR_ERR(priv->regmap);
  
diff --git a/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch b/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch
index 813e976810..4f77078eef 100644
--- a/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch
+++ b/target/linux/generic/backport-6.1/790-08-v6.4-net-dsa-mt7530-introduce-mutex-helpers.patch
@@ -114,7 +114,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -645,14 +649,13 @@ static int
+@@ -659,14 +663,13 @@ static int
  mt7531_ind_c45_phy_read(struct mt7530_priv *priv, int port, int devad,
  			int regnum)
  {
@@ -130,7 +130,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -685,7 +688,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr
+@@ -699,7 +702,7 @@ mt7531_ind_c45_phy_read(struct mt7530_pr
  
  	ret = val & MT7531_MDIO_RW_DATA_MASK;
  out:
@@ -139,7 +139,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -694,14 +697,13 @@ static int
+@@ -708,14 +711,13 @@ static int
  mt7531_ind_c45_phy_write(struct mt7530_priv *priv, int port, int devad,
  			 int regnum, u32 data)
  {
@@ -155,7 +155,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -733,7 +735,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p
+@@ -747,7 +749,7 @@ mt7531_ind_c45_phy_write(struct mt7530_p
  	}
  
  out:
@@ -164,7 +164,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -741,14 +743,13 @@ out:
+@@ -755,14 +757,13 @@ out:
  static int
  mt7531_ind_c22_phy_read(struct mt7530_priv *priv, int port, int regnum)
  {
@@ -180,7 +180,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, val,
  				 !(val & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -771,7 +772,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr
+@@ -785,7 +786,7 @@ mt7531_ind_c22_phy_read(struct mt7530_pr
  
  	ret = val & MT7531_MDIO_RW_DATA_MASK;
  out:
@@ -189,7 +189,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -780,14 +781,13 @@ static int
+@@ -794,14 +795,13 @@ static int
  mt7531_ind_c22_phy_write(struct mt7530_priv *priv, int port, int regnum,
  			 u16 data)
  {
@@ -205,7 +205,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	ret = readx_poll_timeout(_mt7530_unlocked_read, &p, reg,
  				 !(reg & MT7531_PHY_ACS_ST), 20, 100000);
-@@ -809,7 +809,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p
+@@ -823,7 +823,7 @@ mt7531_ind_c22_phy_write(struct mt7530_p
  	}
  
  out:
@@ -214,7 +214,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return ret;
  }
-@@ -1161,7 +1161,6 @@ static int
+@@ -1343,7 +1343,6 @@ static int
  mt7530_port_change_mtu(struct dsa_switch *ds, int port, int new_mtu)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -222,7 +222,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	int length;
  	u32 val;
  
-@@ -1172,7 +1171,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1354,7 +1353,7 @@ mt7530_port_change_mtu(struct dsa_switch
  	if (!dsa_is_cpu_port(ds, port))
  		return 0;
  
@@ -231,7 +231,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	val = mt7530_mii_read(priv, MT7530_GMACCR);
  	val &= ~MAX_RX_PKT_LEN_MASK;
-@@ -1193,7 +1192,7 @@ mt7530_port_change_mtu(struct dsa_switch
+@@ -1375,7 +1374,7 @@ mt7530_port_change_mtu(struct dsa_switch
  
  	mt7530_mii_write(priv, MT7530_GMACCR, val);
  
@@ -240,7 +240,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	return 0;
  }
-@@ -1994,10 +1993,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
+@@ -2176,10 +2175,10 @@ mt7530_irq_thread_fn(int irq, void *dev_
  	u32 val;
  	int p;
  
@@ -253,7 +253,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  
  	for (p = 0; p < MT7530_NUM_PHYS; p++) {
  		if (BIT(p) & val) {
-@@ -2033,7 +2032,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
+@@ -2215,7 +2214,7 @@ mt7530_irq_bus_lock(struct irq_data *d)
  {
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
@@ -262,7 +262,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  }
  
  static void
-@@ -2042,7 +2041,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
+@@ -2224,7 +2223,7 @@ mt7530_irq_bus_sync_unlock(struct irq_da
  	struct mt7530_priv *priv = irq_data_get_irq_chip_data(d);
  
  	mt7530_mii_write(priv, MT7530_SYS_INT_EN, priv->irq_enable);
diff --git a/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch b/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
index 177f6af780..9cb0b2dd61 100644
--- a/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
+++ b/target/linux/generic/backport-6.1/790-09-v6.4-net-dsa-mt7530-move-p5_intf_modes-function-to-mt7530.patch
@@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -950,6 +950,24 @@ mt7530_set_ageing_time(struct dsa_switch
+@@ -964,6 +964,24 @@ mt7530_set_ageing_time(struct dsa_switch
  	return 0;
  }
  
@@ -48,7 +48,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	struct mt7530_priv *priv = ds->priv;
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -709,24 +709,6 @@ enum p5_interface_select {
+@@ -720,24 +720,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_GMAC5_SGMII,
  };
  
diff --git a/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch b/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
index 8950caaaef..a6af682826 100644
--- a/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
+++ b/target/linux/generic/backport-6.1/790-10-v6.4-net-dsa-mt7530-introduce-mt7530_probe_common-helper-.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3210,44 +3210,21 @@ static const struct of_device_id mt7530_
+@@ -3399,44 +3399,21 @@ static const struct of_device_id mt7530_
  MODULE_DEVICE_TABLE(of, mt7530_of_match);
  
  static int
@@ -67,7 +67,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->info)
  		return -EINVAL;
  
-@@ -3261,23 +3238,53 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3450,23 +3427,53 @@ mt7530_probe(struct mdio_device *mdiodev
  		return -EINVAL;
  
  	priv->id = priv->info->id;
@@ -131,7 +131,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  		priv->reset = devm_gpiod_get_optional(&mdiodev->dev, "reset",
  						      GPIOD_OUT_LOW);
  		if (IS_ERR(priv->reset)) {
-@@ -3286,12 +3293,15 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3475,12 +3482,15 @@ mt7530_probe(struct mdio_device *mdiodev
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch b/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
index 24eadb589e..4192753e89 100644
--- a/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
+++ b/target/linux/generic/backport-6.1/790-11-v6.4-net-dsa-mt7530-introduce-mt7530_remove_common-helper.patch
@@ -17,7 +17,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3328,6 +3328,17 @@ mt7530_probe(struct mdio_device *mdiodev
+@@ -3517,6 +3517,17 @@ mt7530_probe(struct mdio_device *mdiodev
  }
  
  static void
@@ -35,7 +35,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove(struct mdio_device *mdiodev)
  {
  	struct mt7530_priv *priv = dev_get_drvdata(&mdiodev->dev);
-@@ -3346,15 +3357,10 @@ mt7530_remove(struct mdio_device *mdiode
+@@ -3535,15 +3546,10 @@ mt7530_remove(struct mdio_device *mdiode
  		dev_err(priv->dev, "Failed to disable io pwr: %d\n",
  			ret);
  
diff --git a/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
index a6bb7d9e7b..72a499381f 100644
--- a/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
+++ b/target/linux/generic/backport-6.1/790-12-v6.4-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
@@ -420,7 +420,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static u32
  mt7530_mii_read(struct mt7530_priv *priv, u32 reg)
  {
-@@ -3008,72 +2959,6 @@ static const struct phylink_pcs_ops mt75
+@@ -3196,72 +3147,6 @@ static const struct phylink_pcs_ops mt75
  	.pcs_an_restart = mt7530_pcs_an_restart,
  };
  
@@ -493,7 +493,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_setup(struct dsa_switch *ds)
  {
-@@ -3132,7 +3017,7 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3320,7 +3205,7 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -501,8 +501,8 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
- 	.get_strings		= mt7530_get_strings,
-@@ -3166,8 +3051,9 @@ static const struct dsa_switch_ops mt753
+ 	.preferred_default_local_cpu_port = mt753x_preferred_default_local_cpu_port,
+@@ -3355,8 +3240,9 @@ static const struct dsa_switch_ops mt753
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
  };
@@ -513,7 +513,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	[ID_MT7621] = {
  		.id = ID_MT7621,
  		.pcs_ops = &mt7530_pcs_ops,
-@@ -3200,16 +3086,9 @@ static const struct mt753x_info mt753x_t
+@@ -3389,16 +3275,9 @@ static const struct mt753x_info mt753x_t
  		.mac_port_config = mt7531_mac_config,
  	},
  };
@@ -532,7 +532,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_probe_common(struct mt7530_priv *priv)
  {
  	struct device *dev = priv->dev;
-@@ -3246,88 +3125,9 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3435,88 +3314,9 @@ mt7530_probe_common(struct mt7530_priv *
  
  	return 0;
  }
@@ -623,7 +623,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_remove_common(struct mt7530_priv *priv)
  {
  	if (priv->irq)
-@@ -3337,55 +3137,7 @@ mt7530_remove_common(struct mt7530_priv
+@@ -3526,55 +3326,7 @@ mt7530_remove_common(struct mt7530_priv
  
  	mutex_destroy(&priv->reg_mutex);
  }
@@ -682,7 +682,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  MODULE_DESCRIPTION("Driver for Mediatek MT7530 Switch");
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -834,4 +834,10 @@ static inline void INIT_MT7530_DUMMY_POL
+@@ -845,4 +845,10 @@ static inline void INIT_MT7530_DUMMY_POL
  	p->reg = reg;
  }
  
diff --git a/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
index 9bc3f54c23..f5573fc6c4 100644
--- a/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
+++ b/target/linux/generic/backport-6.1/790-14-v6.4-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
@@ -184,7 +184,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 +MODULE_LICENSE("GPL");
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2041,6 +2041,47 @@ static const struct irq_domain_ops mt753
+@@ -2223,6 +2223,47 @@ static const struct irq_domain_ops mt753
  };
  
  static void
@@ -232,7 +232,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7530_setup_mdio_irq(struct mt7530_priv *priv)
  {
  	struct dsa_switch *ds = priv->ds;
-@@ -2074,8 +2115,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2256,8 +2297,15 @@ mt7530_setup_irq(struct mt7530_priv *pri
  		return priv->irq ? : -EINVAL;
  	}
  
@@ -250,7 +250,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	if (!priv->irq_domain) {
  		dev_err(dev, "failed to create IRQ domain\n");
  		return -ENOMEM;
-@@ -2574,6 +2622,25 @@ static void mt7531_mac_port_get_caps(str
+@@ -2762,6 +2810,25 @@ static void mt7531_mac_port_get_caps(str
  	}
  }
  
@@ -276,7 +276,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static int
  mt753x_pad_setup(struct dsa_switch *ds, const struct phylink_link_state *state)
  {
-@@ -2650,6 +2717,17 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2838,6 +2905,17 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -294,7 +294,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2719,7 +2797,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2907,7 +2985,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  
  	switch (port) {
  	case 0 ... 4: /* Internal phy */
@@ -304,7 +304,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  			goto unsupported;
  		break;
  	case 5: /* 2nd cpu port with phy of port 0 or 4 / external phy */
-@@ -2797,7 +2876,8 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2985,7 +3064,8 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
@@ -314,7 +314,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  	    (phy_interface_mode_is_8023z(interface))) {
  		speed = SPEED_1000;
  		duplex = DUPLEX_FULL;
-@@ -2877,6 +2957,21 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3065,6 +3145,21 @@ mt7531_cpu_port_config(struct dsa_switch
  	return 0;
  }
  
@@ -336,7 +336,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -3019,6 +3114,27 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3207,6 +3302,27 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -364,7 +364,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  const struct dsa_switch_ops mt7530_switch_ops = {
  	.get_tag_protocol	= mtk_get_tag_protocol,
  	.setup			= mt753x_setup,
-@@ -3087,6 +3203,17 @@ const struct mt753x_info mt753x_table[]
+@@ -3276,6 +3392,17 @@ const struct mt753x_info mt753x_table[]
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
@@ -392,9 +392,9 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  };
  
  #define	NUM_TRGMII_CTRL			5
-@@ -54,11 +55,11 @@ enum mt753x_id {
- #define  MT7531_MIRROR_PORT_SET(x)	(((x) & MIRROR_MASK) << 16)
+@@ -59,11 +60,11 @@ enum mt753x_id {
  #define  MT7531_CPU_PMAP_MASK		GENMASK(7, 0)
+ #define  MT7531_CPU_PMAP(x)		FIELD_PREP(MT7531_CPU_PMAP_MASK, x)
  
 -#define MT753X_MIRROR_REG(id)		(((id) == ID_MT7531) ? \
 +#define MT753X_MIRROR_REG(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
@@ -407,7 +407,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
  					 MT7531_MIRROR_MASK : MIRROR_MASK)
  
  /* Registers for BPDU and PAE frame control*/
-@@ -322,9 +323,8 @@ enum mt7530_vlan_port_acc_frm {
+@@ -332,9 +333,8 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch b/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch
index ef2d07ab79..40209b0305 100644
--- a/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch
+++ b/target/linux/generic/backport-6.1/790-15-v6.4-net-dsa-mt7530-fix-support-for-MT7531BE.patch
@@ -73,7 +73,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  }
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3081,6 +3081,12 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3269,6 +3269,12 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
@@ -88,7 +88,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -768,10 +768,10 @@ struct mt753x_info {
+@@ -779,10 +779,10 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -790,7 +790,6 @@ struct mt7530_priv {
+@@ -801,7 +801,6 @@ struct mt7530_priv {
  	unsigned int		p5_intf_sel;
  	u8			mirror_rx;
  	u8			mirror_tx;
@@ -108,7 +108,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
  	struct mt753x_pcs	pcs[MT7530_NUM_PORTS];
  	/* protect among processes for registers access*/
-@@ -798,6 +797,7 @@ struct mt7530_priv {
+@@ -809,6 +808,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch b/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch
deleted file mode 100644
index 068fb38a4e..0000000000
--- a/target/linux/generic/backport-6.1/790-16-v6.4-net-dsa-mt7530-set-all-CPU-ports-in-MT7531_CPU_PMAP.patch
+++ /dev/null
@@ -1,79 +0,0 @@
-From 4b11e3eb0eb7245a0d22a5dc4161c54eea42910c Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Sat, 17 Jun 2023 09:26:44 +0300
-Subject: [PATCH 16/48] net: dsa: mt7530: set all CPU ports in MT7531_CPU_PMAP
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-MT7531_CPU_PMAP represents the destination port mask for trapped-to-CPU
-frames (further restricted by PCR_MATRIX).
-
-Currently the driver sets the first CPU port as the single port in this bit
-mask, which works fine regardless of whether the device tree defines port
-5, 6 or 5+6 as CPU ports. This is because the logic coincides with DSA's
-logic of picking the first CPU port as the CPU port that all user ports are
-affine to, by default.
-
-An upcoming change would like to influence DSA's selection of the default
-CPU port to no longer be the first one, and in that case, this logic needs
-adaptation.
-
-Since there is no observed leakage or duplication of frames if all CPU
-ports are defined in this bit mask, simply include them all.
-
-Suggested-by: Russell King (Oracle) <linux at armlinux.org.uk>
-Suggested-by: Vladimir Oltean <olteanv at gmail.com>
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Reviewed-by: Vladimir Oltean <olteanv at gmail.com>
-Reviewed-by: Russell King (Oracle) <rmk+kernel at armlinux.org.uk>
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/dsa/mt7530.c | 15 +++++++--------
- drivers/net/dsa/mt7530.h |  1 +
- 2 files changed, 8 insertions(+), 8 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -1069,6 +1069,13 @@ mt753x_cpu_port_enable(struct dsa_switch
- 	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)
- 		mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port));
- 
-+	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
-+	 * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that
-+	 * is affine to the inbound user port.
-+	 */
-+	if (priv->id == ID_MT7531 || priv->id == ID_MT7988)
-+		mt7530_set(priv, MT7531_CFC, MT7531_CPU_PMAP(BIT(port)));
-+
- 	/* CPU port gets connected to all user ports of
- 	 * the switch.
- 	 */
-@@ -2411,16 +2418,8 @@ static int
- mt7531_setup_common(struct dsa_switch *ds)
- {
- 	struct mt7530_priv *priv = ds->priv;
--	struct dsa_port *cpu_dp;
- 	int ret, i;
- 
--	/* BPDU to CPU port */
--	dsa_switch_for_each_cpu_port(cpu_dp, ds) {
--		mt7530_rmw(priv, MT7531_CFC, MT7531_CPU_PMAP_MASK,
--			   BIT(cpu_dp->index));
--		break;
--	}
--
- 	mt753x_trap_frames(priv);
- 
- 	/* Enable and reset MIB counters */
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -54,6 +54,7 @@ enum mt753x_id {
- #define  MT7531_MIRROR_PORT_GET(x)	(((x) >> 16) & MIRROR_MASK)
- #define  MT7531_MIRROR_PORT_SET(x)	(((x) & MIRROR_MASK) << 16)
- #define  MT7531_CPU_PMAP_MASK		GENMASK(7, 0)
-+#define  MT7531_CPU_PMAP(x)		FIELD_PREP(MT7531_CPU_PMAP_MASK, x)
- 
- #define MT753X_MIRROR_REG(id)		((((id) == ID_MT7531) || ((id) == ID_MT7988)) ?	\
- 					 MT7531_CFC : MT7530_MFC)
diff --git a/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch b/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch
index bbf6d9b16f..78e332b1c2 100644
--- a/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch
+++ b/target/linux/generic/backport-6.1/790-17-v6.5-net-dsa-mt7530-update-PCS-driver-to-use-neg_mode.patch
@@ -16,7 +16,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3036,7 +3036,7 @@ static void mt7530_pcs_get_state(struct
+@@ -3225,7 +3225,7 @@ static void mt7530_pcs_get_state(struct
  		state->pause |= MLO_PAUSE_TX;
  }
  
@@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			     phy_interface_t interface,
  			     const unsigned long *advertising,
  			     bool permit_pause_to_mac)
-@@ -3064,6 +3064,7 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3253,6 +3253,7 @@ mt753x_setup(struct dsa_switch *ds)
  	/* Initialise the PCS devices */
  	for (i = 0; i < priv->ds->num_ports; i++) {
  		priv->pcs[i].pcs.ops = priv->info->pcs_ops;
diff --git a/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch b/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
index e9a36eea41..d69ee7f104 100644
--- a/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
+++ b/target/linux/generic/backport-6.1/790-19-v6.7-net-dsa-mt753x-remove-mt753x_phylink_pcs_link_up.patch
@@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2851,15 +2851,6 @@ static void mt753x_phylink_mac_link_down
+@@ -3040,15 +3040,6 @@ static void mt753x_phylink_mac_link_down
  	mt7530_clear(priv, MT7530_PMCR_P(port), PMCR_LINK_SETTINGS_MASK);
  }
  
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void mt753x_phylink_mac_link_up(struct dsa_switch *ds, int port,
  				       unsigned int mode,
  				       phy_interface_t interface,
-@@ -2948,8 +2939,6 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3137,8 +3128,6 @@ mt7531_cpu_port_config(struct dsa_switch
  		return ret;
  	mt7530_write(priv, MT7530_PMCR_P(port),
  		     PMCR_CPU_PORT_SETTING(priv->id));
diff --git a/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch b/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch
index e8fec3f6a1..8af6820270 100644
--- a/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch
+++ b/target/linux/generic/backport-6.1/790-20-v6.7-net-dsa-mt7530-replace-deprecated-strncpy-with-ethto.patch
@@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -829,8 +829,7 @@ mt7530_get_strings(struct dsa_switch *ds
+@@ -843,8 +843,7 @@ mt7530_get_strings(struct dsa_switch *ds
  		return;
  
  	for (i = 0; i < ARRAY_SIZE(mt7530_mib); i++)
diff --git a/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch b/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
index 8b374679ca..4c6c057739 100644
--- a/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
+++ b/target/linux/generic/backport-6.1/790-21-v6.9-net-dsa-mt7530-support-OF-based-registration-of-swit.patch
@@ -46,7 +46,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2175,24 +2175,40 @@ mt7530_free_irq_common(struct mt7530_pri
+@@ -2350,24 +2350,40 @@ mt7530_free_irq_common(struct mt7530_pri
  static void
  mt7530_free_irq(struct mt7530_priv *priv)
  {
@@ -92,7 +92,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	bus->priv = priv;
  	bus->name = KBUILD_MODNAME "-mii";
  	snprintf(bus->id, MII_BUS_ID_SIZE, KBUILD_MODNAME "-%d", idx++);
-@@ -2201,16 +2217,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr
+@@ -2376,16 +2392,18 @@ mt7530_setup_mdio(struct mt7530_priv *pr
  	bus->parent = dev;
  	bus->phy_mask = ~ds->phys_mii_mask;
  
diff --git a/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch b/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
index 381902472c..0b141b4a3f 100644
--- a/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
+++ b/target/linux/generic/backport-6.1/790-22-v6.8-net-dsa-mt7530-fix-10M-100M-speed-on-MT7988-switch.patch
@@ -22,7 +22,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2883,8 +2883,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -3072,8 +3072,7 @@ static void mt753x_phylink_mac_link_up(s
  	/* MT753x MAC works in 1G full duplex mode for all up-clocked
  	 * variants.
  	 */
diff --git a/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch b/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
index c3f55f8106..44d8e07c12 100644
--- a/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
+++ b/target/linux/generic/backport-6.1/790-23-v6.9-net-dsa-mt7530-always-trap-frames-to-active-CPU-port.patch
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1064,10 +1064,6 @@ mt753x_cpu_port_enable(struct dsa_switch
+@@ -1239,10 +1239,6 @@ mt753x_cpu_port_enable(struct dsa_switch
  	mt7530_set(priv, MT7530_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
  		   UNU_FFP(BIT(port)));
  
@@ -46,10 +46,10 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 -	if (priv->id == ID_MT7530 || priv->id == ID_MT7621)
 -		mt7530_rmw(priv, MT7530_MFC, CPU_MASK, CPU_EN | CPU_PORT(port));
 -
- 	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
- 	 * the MT7988 SoC. Trapped frames will be forwarded to the CPU port that
- 	 * is affine to the inbound user port.
-@@ -3125,6 +3121,36 @@ static int mt753x_set_mac_eee(struct dsa
+ 	/* Add the CPU port to the CPU port bitmap for MT7531. Trapped frames
+ 	 * will be forwarded to the CPU port that is affine to the inbound user
+ 	 * port.
+@@ -3314,6 +3310,36 @@ static int mt753x_set_mac_eee(struct dsa
  	return 0;
  }
  
@@ -86,7 +86,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int mt7988_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
  {
  	return 0;
-@@ -3179,6 +3205,7 @@ const struct dsa_switch_ops mt7530_switc
+@@ -3369,6 +3395,7 @@ const struct dsa_switch_ops mt7530_switc
  	.phylink_mac_link_up	= mt753x_phylink_mac_link_up,
  	.get_mac_eee		= mt753x_get_mac_eee,
  	.set_mac_eee		= mt753x_set_mac_eee,
@@ -96,7 +96,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -41,8 +41,8 @@ enum mt753x_id {
+@@ -45,8 +45,8 @@ enum mt753x_id {
  #define  UNU_FFP(x)			(((x) & 0xff) << 8)
  #define  UNU_FFP_MASK			UNU_FFP(~0)
  #define  CPU_EN				BIT(7)
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  #define  MIRROR_EN			BIT(3)
  #define  MIRROR_PORT(x)			((x) & 0x7)
  #define  MIRROR_MASK			0x7
-@@ -773,6 +773,7 @@ struct mt753x_info {
+@@ -783,6 +783,7 @@ struct mt753x_info {
   * @irq_domain:		IRQ domain of the switch irq_chip
   * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
   * @create_sgmii:	Pointer to function creating SGMII PCS instance(s)
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   */
  struct mt7530_priv {
  	struct device		*dev;
-@@ -799,6 +800,7 @@ struct mt7530_priv {
+@@ -809,6 +810,7 @@ struct mt7530_priv {
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
  	int (*create_sgmii)(struct mt7530_priv *priv, bool dual_sgmii);
diff --git a/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch b/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
index 35abed6b03..3454948b86 100644
--- a/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
+++ b/target/linux/generic/backport-6.1/790-24-v6.9-net-dsa-mt7530-use-p5_interface_select-as-data-type-.patch
@@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -703,7 +703,7 @@ struct mt7530_port {
+@@ -713,7 +713,7 @@ struct mt7530_port {
  
  /* Port 5 interface select definitions */
  enum p5_interface_select {
@@ -34,7 +34,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	P5_INTF_SEL_PHY_P0,
  	P5_INTF_SEL_PHY_P4,
  	P5_INTF_SEL_GMAC5,
-@@ -789,7 +789,7 @@ struct mt7530_priv {
+@@ -799,7 +799,7 @@ struct mt7530_priv {
  	bool			mcm;
  	phy_interface_t		p6_interface;
  	phy_interface_t		p5_interface;
diff --git a/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch b/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
index 03329f8ba8..357579e2bd 100644
--- a/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
+++ b/target/linux/generic/backport-6.1/790-25-v6.9-net-dsa-mt7530-store-port-5-SGMII-capability-of-MT75.patch
@@ -65,7 +65,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  						    GFP_KERNEL);
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -473,15 +473,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
+@@ -487,15 +487,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
  	return 0;
  }
  
@@ -81,7 +81,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int
  mt7531_pad_setup(struct dsa_switch *ds, phy_interface_t interface)
  {
-@@ -496,9 +487,6 @@ mt7531_pll_setup(struct mt7530_priv *pri
+@@ -510,9 +501,6 @@ mt7531_pll_setup(struct mt7530_priv *pri
  	u32 xtal;
  	u32 val;
  
@@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	val = mt7530_read(priv, MT7531_CREV);
  	top_sig = mt7530_read(priv, MT7531_TOP_SIG_SR);
  	hwstrap = mt7530_read(priv, MT7531_HWTRAP);
-@@ -913,8 +901,6 @@ static const char *p5_intf_modes(unsigne
+@@ -927,8 +915,6 @@ static const char *p5_intf_modes(unsigne
  		return "PHY P4";
  	case P5_INTF_SEL_GMAC5:
  		return "GMAC5";
@@ -100,7 +100,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	default:
  		return "unknown";
  	}
-@@ -2515,6 +2501,12 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2697,6 +2683,12 @@ mt7531_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
@@ -113,7 +113,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	/* all MACs must be forced link-down before sw reset */
  	for (i = 0; i < MT7530_NUM_PORTS; i++)
  		mt7530_write(priv, MT7530_PMCR_P(i), MT7531_FORCE_LNK);
-@@ -2524,21 +2516,18 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2706,21 +2698,18 @@ mt7531_setup(struct dsa_switch *ds)
  		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
  		     SYS_CTRL_REG_RST);
  
@@ -141,7 +141,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
  	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
  		   MT7531_GPIO0_INTERRUPT);
-@@ -2598,11 +2587,6 @@ static void mt7530_mac_port_get_caps(str
+@@ -2787,11 +2776,6 @@ static void mt7530_mac_port_get_caps(str
  	}
  }
  
@@ -153,7 +153,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void mt7531_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
-@@ -2615,7 +2599,7 @@ static void mt7531_mac_port_get_caps(str
+@@ -2804,7 +2788,7 @@ static void mt7531_mac_port_get_caps(str
  		break;
  
  	case 5: /* 2nd cpu port supports either rgmii or sgmii/8023z */
@@ -162,7 +162,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			phy_interface_set_rgmii(config->supported_interfaces);
  			break;
  		}
-@@ -2682,7 +2666,7 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2871,7 +2855,7 @@ static int mt7531_rgmii_setup(struct mt7
  {
  	u32 val;
  
@@ -171,7 +171,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		dev_err(priv->dev, "RGMII mode is not available for port %d\n",
  			port);
  		return -EINVAL;
-@@ -2925,7 +2909,7 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3114,7 +3098,7 @@ mt7531_cpu_port_config(struct dsa_switch
  
  	switch (port) {
  	case 5:
@@ -180,7 +180,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  			interface = PHY_INTERFACE_MODE_RGMII;
  		else
  			interface = PHY_INTERFACE_MODE_2500BASEX;
-@@ -3083,7 +3067,7 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3272,7 +3256,7 @@ mt753x_setup(struct dsa_switch *ds)
  		mt7530_free_irq_common(priv);
  
  	if (priv->create_sgmii) {
@@ -191,7 +191,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -707,7 +707,6 @@ enum p5_interface_select {
+@@ -717,7 +717,6 @@ enum p5_interface_select {
  	P5_INTF_SEL_PHY_P0,
  	P5_INTF_SEL_PHY_P4,
  	P5_INTF_SEL_GMAC5,
@@ -199,7 +199,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  };
  
  struct mt7530_priv;
-@@ -769,6 +768,8 @@ struct mt753x_info {
+@@ -779,6 +778,8 @@ struct mt753x_info {
   *			registers
   * @p6_interface	Holding the current port 6 interface
   * @p5_intf_sel:	Holding the current port 5 interface select
@@ -208,7 +208,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   * @irq:		IRQ number of the switch
   * @irq_domain:		IRQ domain of the switch irq_chip
   * @irq_enable:		IRQ enable bits, synced to SYS_INT_EN
-@@ -790,6 +791,7 @@ struct mt7530_priv {
+@@ -800,6 +801,7 @@ struct mt7530_priv {
  	phy_interface_t		p6_interface;
  	phy_interface_t		p5_interface;
  	enum p5_interface_select p5_intf_sel;
@@ -216,7 +216,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	u8			mirror_rx;
  	u8			mirror_tx;
  	struct mt7530_port	ports[MT7530_NUM_PORTS];
-@@ -799,7 +801,7 @@ struct mt7530_priv {
+@@ -809,7 +811,7 @@ struct mt7530_priv {
  	int irq;
  	struct irq_domain *irq_domain;
  	u32 irq_enable;
diff --git a/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch b/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
index 1489c4f2f3..46dbd53ede 100644
--- a/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
+++ b/target/linux/generic/backport-6.1/790-26-v6.9-net-dsa-mt7530-improve-comments-regarding-switch-por.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2565,12 +2565,14 @@ static void mt7530_mac_port_get_caps(str
+@@ -2754,12 +2754,14 @@ static void mt7530_mac_port_get_caps(str
  				     struct phylink_config *config)
  {
  	switch (port) {
@@ -54,7 +54,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		phy_interface_set_rgmii(config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_MII,
  			  config->supported_interfaces);
-@@ -2578,7 +2580,8 @@ static void mt7530_mac_port_get_caps(str
+@@ -2767,7 +2769,8 @@ static void mt7530_mac_port_get_caps(str
  			  config->supported_interfaces);
  		break;
  
@@ -64,7 +64,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		__set_bit(PHY_INTERFACE_MODE_RGMII,
  			  config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_TRGMII,
-@@ -2593,19 +2596,24 @@ static void mt7531_mac_port_get_caps(str
+@@ -2782,19 +2785,24 @@ static void mt7531_mac_port_get_caps(str
  	struct mt7530_priv *priv = ds->priv;
  
  	switch (port) {
@@ -92,7 +92,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		__set_bit(PHY_INTERFACE_MODE_SGMII,
  			  config->supported_interfaces);
  		__set_bit(PHY_INTERFACE_MODE_1000BASEX,
-@@ -2624,11 +2632,13 @@ static void mt7988_mac_port_get_caps(str
+@@ -2813,11 +2821,13 @@ static void mt7988_mac_port_get_caps(str
  	phy_interface_zero(config->supported_interfaces);
  
  	switch (port) {
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	case 6:
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  config->supported_interfaces);
-@@ -2792,12 +2802,12 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2981,12 +2991,12 @@ mt753x_phylink_mac_config(struct dsa_swi
  	u32 mcr_cur, mcr_new;
  
  	switch (port) {
@@ -122,7 +122,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (priv->p5_interface == state->interface)
  			break;
  
-@@ -2807,7 +2817,7 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2996,7 +3006,7 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p5_intf_sel != P5_DISABLED)
  			priv->p5_interface = state->interface;
  		break;
diff --git a/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch b/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
index 6fbf259735..43f629b243 100644
--- a/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
+++ b/target/linux/generic/backport-6.1/790-27-v6.9-net-dsa-mt7530-improve-code-path-for-setting-up-port.patch
@@ -52,7 +52,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2353,16 +2353,15 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2532,16 +2532,15 @@ mt7530_setup(struct dsa_switch *ds)
  		return ret;
  
  	/* Setup port 5 */
@@ -75,7 +75,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		for_each_child_of_node(dn, mac_np) {
  			if (!of_device_is_compatible(mac_np,
  						     "mediatek,eth-mac"))
-@@ -2393,6 +2392,8 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2572,6 +2571,8 @@ mt7530_setup(struct dsa_switch *ds)
  			of_node_put(phy_node);
  			break;
  		}
@@ -84,7 +84,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  #ifdef CONFIG_GPIOLIB
-@@ -2403,8 +2404,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2582,8 +2583,6 @@ mt7530_setup(struct dsa_switch *ds)
  	}
  #endif /* CONFIG_GPIOLIB */
  
diff --git a/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch b/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch
index 94692d948f..385d587729 100644
--- a/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch
+++ b/target/linux/generic/backport-6.1/790-28-v6.9-net-dsa-mt7530-do-not-set-priv-p5_interface-on-mt753.patch
@@ -31,7 +31,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -971,8 +971,6 @@ static void mt7530_setup_port5(struct ds
+@@ -985,8 +985,6 @@ static void mt7530_setup_port5(struct ds
  	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n",
  		val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface));
  
diff --git a/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch b/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
index c121eb4a35..b4c0b75c49 100644
--- a/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
+++ b/target/linux/generic/backport-6.1/790-29-v6.9-net-dsa-mt7530-do-not-run-mt7530_setup_port5-if-port.patch
@@ -30,7 +30,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -935,9 +935,6 @@ static void mt7530_setup_port5(struct ds
+@@ -949,9 +949,6 @@ static void mt7530_setup_port5(struct ds
  		/* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */
  		val &= ~MHWTRAP_P5_DIS;
  		break;
@@ -40,7 +40,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	default:
  		dev_err(ds->dev, "Unsupported p5_intf_sel %d\n",
  			priv->p5_intf_sel);
-@@ -2358,8 +2355,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2537,8 +2534,6 @@ mt7530_setup(struct dsa_switch *ds)
  		 * Set priv->p5_intf_sel to the appropriate value if PHY muxing
  		 * is detected.
  		 */
@@ -49,7 +49,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		for_each_child_of_node(dn, mac_np) {
  			if (!of_device_is_compatible(mac_np,
  						     "mediatek,eth-mac"))
-@@ -2391,7 +2386,9 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2570,7 +2565,9 @@ mt7530_setup(struct dsa_switch *ds)
  			break;
  		}
  
diff --git a/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch b/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch
index 9b610e0bdb..89527e2b39 100644
--- a/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch
+++ b/target/linux/generic/backport-6.1/790-30-v6.9-net-dsa-mt7530-empty-default-case-on-mt7530_setup_po.patch
@@ -37,7 +37,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -936,9 +936,7 @@ static void mt7530_setup_port5(struct ds
+@@ -950,9 +950,7 @@ static void mt7530_setup_port5(struct ds
  		val &= ~MHWTRAP_P5_DIS;
  		break;
  	default:
@@ -48,7 +48,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	/* Setup RGMII settings */
-@@ -968,7 +966,6 @@ static void mt7530_setup_port5(struct ds
+@@ -982,7 +980,6 @@ static void mt7530_setup_port5(struct ds
  	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, intf_sel=%s, phy-mode=%s\n",
  		val, p5_intf_modes(priv->p5_intf_sel), phy_modes(interface));
  
diff --git a/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch b/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
index dba1cb734e..0dc4baf0c7 100644
--- a/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
+++ b/target/linux/generic/backport-6.1/790-31-v6.9-net-dsa-mt7530-move-XTAL-check-to-mt7530_setup.patch
@@ -24,7 +24,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -408,13 +408,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
+@@ -422,13 +422,6 @@ mt7530_pad_clk_setup(struct dsa_switch *
  
  	xtal = mt7530_read(priv, MT7530_MHWTRAP) & HWTRAP_XTAL_MASK;
  
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	switch (interface) {
  	case PHY_INTERFACE_MODE_RGMII:
  		trgint = 0;
-@@ -2286,6 +2279,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2461,6 +2454,12 @@ mt7530_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
diff --git a/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch b/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch
index 90f8e095ef..46e1b50f24 100644
--- a/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch
+++ b/target/linux/generic/backport-6.1/790-32-v6.9-net-dsa-mt7530-simplify-mt7530_pad_clk_setup.patch
@@ -38,7 +38,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -404,65 +404,54 @@ static int
+@@ -418,65 +418,54 @@ static int
  mt7530_pad_clk_setup(struct dsa_switch *ds, phy_interface_t interface)
  {
  	struct mt7530_priv *priv = ds->priv;
diff --git a/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch b/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
index 93eccc8637..7d78b7df70 100644
--- a/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
+++ b/target/linux/generic/backport-6.1/790-33-v6.9-net-dsa-mt7530-call-port-6-setup-from-mt7530_mac_con.patch
@@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -400,8 +400,8 @@ static void mt7530_pll_setup(struct mt75
+@@ -414,8 +414,8 @@ mt753x_preferred_default_local_cpu_port(
  }
  
  /* Setup port 6 interface mode and TRGMII TX circuit */
@@ -58,7 +58,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  {
  	struct mt7530_priv *priv = ds->priv;
  	u32 ncpo1, ssc_delta, xtal;
-@@ -412,7 +412,7 @@ mt7530_pad_clk_setup(struct dsa_switch *
+@@ -426,7 +426,7 @@ mt7530_pad_clk_setup(struct dsa_switch *
  	if (interface == PHY_INTERFACE_MODE_RGMII) {
  		mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK,
  			   P6_INTF_MODE(0));
@@ -67,7 +67,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	}
  
  	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1));
-@@ -451,7 +451,11 @@ mt7530_pad_clk_setup(struct dsa_switch *
+@@ -465,7 +465,11 @@ mt7530_pad_clk_setup(struct dsa_switch *
  
  	/* Enable the MT7530 TRGMII clocks */
  	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
@@ -79,7 +79,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  	return 0;
  }
  
-@@ -2640,11 +2644,10 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2829,11 +2833,10 @@ mt7530_mac_config(struct dsa_switch *ds,
  {
  	struct mt7530_priv *priv = ds->priv;
  
diff --git a/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch b/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
index a423c0899c..725830e769 100644
--- a/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
+++ b/target/linux/generic/backport-6.1/790-34-v6.9-net-dsa-mt7530-remove-pad_setup-function-pointer.patch
@@ -28,7 +28,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -453,18 +453,6 @@ mt7530_setup_port6(struct dsa_switch *ds
+@@ -467,18 +467,6 @@ mt7530_setup_port6(struct dsa_switch *ds
  	core_set(priv, CORE_TRGMII_GSW_CLK_CG, REG_TRGMIICK_EN);
  }
  
@@ -47,7 +47,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static void
  mt7531_pll_setup(struct mt7530_priv *priv)
  {
-@@ -2631,14 +2619,6 @@ static void mt7988_mac_port_get_caps(str
+@@ -2820,14 +2808,6 @@ static void mt7988_mac_port_get_caps(str
  }
  
  static int
@@ -62,7 +62,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2803,8 +2783,6 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2992,8 +2972,6 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p6_interface == state->interface)
  			break;
  
@@ -71,7 +71,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		if (mt753x_mac_config(ds, port, mode, state) < 0)
  			goto unsupported;
  
-@@ -3127,11 +3105,6 @@ mt753x_conduit_state_change(struct dsa_s
+@@ -3316,11 +3294,6 @@ mt753x_conduit_state_change(struct dsa_s
  	mt7530_rmw(priv, MT7530_MFC, CPU_EN | CPU_PORT_MASK, val);
  }
  
@@ -83,7 +83,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  static int mt7988_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
-@@ -3192,7 +3165,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3382,7 +3355,6 @@ const struct mt753x_info mt753x_table[]
  		.sw_setup = mt7530_setup,
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
@@ -91,7 +91,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3202,7 +3174,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3392,7 +3364,6 @@ const struct mt753x_info mt753x_table[]
  		.sw_setup = mt7530_setup,
  		.phy_read = mt7530_phy_read,
  		.phy_write = mt7530_phy_write,
@@ -99,7 +99,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.mac_port_get_caps = mt7530_mac_port_get_caps,
  		.mac_port_config = mt7530_mac_config,
  	},
-@@ -3212,7 +3183,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3402,7 +3373,6 @@ const struct mt753x_info mt753x_table[]
  		.sw_setup = mt7531_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
@@ -107,7 +107,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.cpu_port_config = mt7531_cpu_port_config,
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
-@@ -3223,7 +3193,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3413,7 +3383,6 @@ const struct mt753x_info mt753x_table[]
  		.sw_setup = mt7988_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
@@ -115,7 +115,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  		.cpu_port_config = mt7988_cpu_port_config,
  		.mac_port_get_caps = mt7988_mac_port_get_caps,
  		.mac_port_config = mt7988_mac_config,
-@@ -3253,9 +3222,8 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3443,9 +3412,8 @@ mt7530_probe_common(struct mt7530_priv *
  	/* Sanity check if these required device operations are filled
  	 * properly.
  	 */
@@ -129,7 +129,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
  
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -722,8 +722,6 @@ struct mt753x_pcs {
+@@ -732,8 +732,6 @@ struct mt753x_pcs {
   * @sw_setup:		Holding the handler to a device initialization
   * @phy_read:		Holding the way reading PHY port
   * @phy_write:		Holding the way writing PHY port
@@ -138,7 +138,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
   * @phy_mode_supported:	Check if the PHY type is being supported on a certain
   *			port
   * @mac_port_validate:	Holding the way to set addition validate type for a
-@@ -739,7 +737,6 @@ struct mt753x_info {
+@@ -749,7 +747,6 @@ struct mt753x_info {
  	int (*sw_setup)(struct dsa_switch *ds);
  	int (*phy_read)(struct mt7530_priv *priv, int port, int regnum);
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
diff --git a/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch b/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
index 3667dbf54a..606c48234c 100644
--- a/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
+++ b/target/linux/generic/backport-6.1/790-35-v6.9-net-dsa-mt7530-correct-port-capabilities-of-MT7988.patch
@@ -25,7 +25,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2604,7 +2604,7 @@ static void mt7988_mac_port_get_caps(str
+@@ -2793,7 +2793,7 @@ static void mt7988_mac_port_get_caps(str
  
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
diff --git a/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch b/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
index 48433705f6..e2f1f23435 100644
--- a/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
+++ b/target/linux/generic/backport-6.1/790-36-v6.9-net-dsa-mt7530-do-not-clear-config-supported_interfa.patch
@@ -27,7 +27,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2600,8 +2600,6 @@ static void mt7531_mac_port_get_caps(str
+@@ -2789,8 +2789,6 @@ static void mt7531_mac_port_get_caps(str
  static void mt7988_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
diff --git a/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch b/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
index b707de87ed..be6fe39f38 100644
--- a/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
+++ b/target/linux/generic/backport-6.1/790-37-v6.9-net-dsa-mt7530-remove-.mac_port_config-for-MT7988-an.patch
@@ -33,7 +33,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2683,17 +2683,6 @@ static bool mt753x_is_mac_port(u32 port)
+@@ -2872,17 +2872,6 @@ static bool mt753x_is_mac_port(u32 port)
  }
  
  static int
@@ -51,7 +51,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2733,6 +2722,9 @@ mt753x_mac_config(struct dsa_switch *ds,
+@@ -2922,6 +2911,9 @@ mt753x_mac_config(struct dsa_switch *ds,
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -61,7 +61,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	return priv->info->mac_port_config(ds, port, mode, state->interface);
  }
  
-@@ -3193,7 +3185,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3383,7 +3375,6 @@ const struct mt753x_info mt753x_table[]
  		.phy_write = mt7531_ind_phy_write,
  		.cpu_port_config = mt7988_cpu_port_config,
  		.mac_port_get_caps = mt7988_mac_port_get_caps,
@@ -69,7 +69,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	},
  };
  EXPORT_SYMBOL_GPL(mt753x_table);
-@@ -3221,8 +3212,7 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3411,8 +3402,7 @@ mt7530_probe_common(struct mt7530_priv *
  	 * properly.
  	 */
  	if (!priv->info->sw_setup || !priv->info->phy_read ||
diff --git a/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch b/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
index 5dfb8bddbb..b8473ed128 100644
--- a/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
+++ b/target/linux/generic/backport-6.1/790-38-v6.9-net-dsa-mt7530-set-interrupt-register-only-for-MT753.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2084,7 +2084,7 @@ mt7530_setup_irq(struct mt7530_priv *pri
+@@ -2259,7 +2259,7 @@ mt7530_setup_irq(struct mt7530_priv *pri
  	}
  
  	/* This register must be set for MT7530 to properly fire interrupts */
diff --git a/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch b/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
index 565f16a47f..216a781087 100644
--- a/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
+++ b/target/linux/generic/backport-6.1/790-39-v6.9-net-dsa-mt7530-do-not-use-SW_PHY_RST-to-reset-MT7531.patch
@@ -22,7 +22,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2478,14 +2478,12 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2660,14 +2660,12 @@ mt7531_setup(struct dsa_switch *ds)
  	val = mt7530_read(priv, MT7531_TOP_SIG_SR);
  	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
  
diff --git a/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch b/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
index d636e2d564..f920a6604d 100644
--- a/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
+++ b/target/linux/generic/backport-6.1/790-40-v6.9-net-dsa-mt7530-get-rid-of-useless-error-returns-on-p.patch
@@ -36,7 +36,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2614,7 +2614,7 @@ static void mt7988_mac_port_get_caps(str
+@@ -2803,7 +2803,7 @@ static void mt7988_mac_port_get_caps(str
  	}
  }
  
@@ -45,7 +45,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7530_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2624,22 +2624,14 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2813,22 +2813,14 @@ mt7530_mac_config(struct dsa_switch *ds,
  		mt7530_setup_port5(priv->ds, interface);
  	else if (port == 6)
  		mt7530_setup_port6(priv->ds, interface);
@@ -71,7 +71,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	val = mt7530_read(priv, MT7531_CLKGEN_CTRL);
  	val |= GP_CLK_EN;
  	val &= ~GP_MODE_MASK;
-@@ -2667,20 +2659,14 @@ static int mt7531_rgmii_setup(struct mt7
+@@ -2856,20 +2848,14 @@ static int mt7531_rgmii_setup(struct mt7
  		case PHY_INTERFACE_MODE_RGMII_ID:
  			break;
  		default:
@@ -95,7 +95,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  mt7531_mac_config(struct dsa_switch *ds, int port, unsigned int mode,
  		  phy_interface_t interface)
  {
-@@ -2688,42 +2674,21 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2877,42 +2863,21 @@ mt7531_mac_config(struct dsa_switch *ds,
  	struct phy_device *phydev;
  	struct dsa_port *dp;
  
@@ -143,7 +143,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static struct phylink_pcs *
-@@ -2752,17 +2717,11 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2941,17 +2906,11 @@ mt753x_phylink_mac_config(struct dsa_swi
  	u32 mcr_cur, mcr_new;
  
  	switch (port) {
@@ -162,7 +162,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  		if (priv->p5_intf_sel != P5_DISABLED)
  			priv->p5_interface = state->interface;
-@@ -2771,16 +2730,10 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2960,16 +2919,10 @@ mt753x_phylink_mac_config(struct dsa_swi
  		if (priv->p6_interface == state->interface)
  			break;
  
@@ -180,7 +180,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	}
  
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
-@@ -2863,7 +2816,6 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3052,7 +3005,6 @@ mt7531_cpu_port_config(struct dsa_switch
  	struct mt7530_priv *priv = ds->priv;
  	phy_interface_t interface;
  	int speed;
@@ -188,7 +188,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	switch (port) {
  	case 5:
-@@ -2888,9 +2840,8 @@ mt7531_cpu_port_config(struct dsa_switch
+@@ -3077,9 +3029,8 @@ mt7531_cpu_port_config(struct dsa_switch
  	else
  		speed = SPEED_1000;
  
@@ -202,7 +202,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mt753x_phylink_mac_link_up(ds, port, MLO_AN_FIXED, interface, NULL,
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -743,9 +743,9 @@ struct mt753x_info {
+@@ -753,9 +753,9 @@ struct mt753x_info {
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
  				  phy_interface_t interface,
  				  unsigned long *supported);
diff --git a/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch b/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
index 60b369c8f8..eb0a5706ec 100644
--- a/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
+++ b/target/linux/generic/backport-6.1/790-41-v6.9-net-dsa-mt7530-get-rid-of-priv-info-cpu_port_config.patch
@@ -57,8 +57,8 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -995,18 +995,10 @@ mt753x_trap_frames(struct mt7530_priv *p
- 		   MT753X_BPDU_CPU_ONLY);
+@@ -1170,18 +1170,10 @@ mt753x_trap_frames(struct mt7530_priv *p
+ 			   MT753X_BPDU_CPU_ONLY);
  }
  
 -static int
@@ -77,7 +77,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	/* Enable Mediatek header mode on the cpu port */
  	mt7530_write(priv, MT7530_PVC_P(port),
-@@ -1032,8 +1024,6 @@ mt753x_cpu_port_enable(struct dsa_switch
+@@ -1207,8 +1199,6 @@ mt753x_cpu_port_enable(struct dsa_switch
  	/* Set to fallback mode for independent VLAN learning */
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_PORT_VLAN_MASK,
  		   MT7530_PORT_FALLBACK_MODE);
@@ -86,16 +86,16 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static int
-@@ -2288,8 +2278,6 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2461,8 +2451,6 @@ mt7530_setup(struct dsa_switch *ds)
  	val |= MHWTRAP_MANUAL;
  	mt7530_write(priv, MT7530_MHWTRAP, val);
  
 -	priv->p6_interface = PHY_INTERFACE_MODE_NA;
 -
- 	mt753x_trap_frames(priv);
+ 	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ)
+ 		mt7530_pll_setup(priv);
  
- 	/* Enable and reset MIB counters */
-@@ -2304,9 +2292,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2480,9 +2468,7 @@ mt7530_setup(struct dsa_switch *ds)
  		mt7530_set(priv, MT7530_PSC_P(i), SA_DIS);
  
  		if (dsa_is_cpu_port(ds, i)) {
@@ -106,7 +106,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		} else {
  			mt7530_port_disable(ds, i);
  
-@@ -2410,9 +2396,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2589,9 +2575,7 @@ mt7531_setup_common(struct dsa_switch *d
  		mt7530_set(priv, MT7531_DBG_CNT(i), MT7531_DIS_CLR);
  
  		if (dsa_is_cpu_port(ds, i)) {
@@ -117,7 +117,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		} else {
  			mt7530_port_disable(ds, i);
  
-@@ -2501,10 +2485,6 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2683,10 +2667,6 @@ mt7531_setup(struct dsa_switch *ds)
  	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
  		   MT7531_GPIO0_INTERRUPT);
  
@@ -125,10 +125,10 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 -	priv->p5_interface = PHY_INTERFACE_MODE_NA;
 -	priv->p6_interface = PHY_INTERFACE_MODE_NA;
 -
- 	/* Enable PHY core PLL, since phy_device has not yet been created
- 	 * provided for phy_[read,write]_mmd_indirect is called, we provide
- 	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
-@@ -2716,26 +2696,9 @@ mt753x_phylink_mac_config(struct dsa_swi
+ 	/* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since
+ 	 * phy_device has not yet been created provided for
+ 	 * phy_[read,write]_mmd_indirect is called, we provide our own
+@@ -2905,26 +2885,9 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
@@ -156,7 +156,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	mcr_cur = mt7530_read(priv, MT7530_PMCR_P(port));
  	mcr_new = mcr_cur;
  	mcr_new &= ~PMCR_LINK_SETTINGS_MASK;
-@@ -2771,17 +2734,10 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2960,17 +2923,10 @@ static void mt753x_phylink_mac_link_up(s
  
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
  
@@ -176,7 +176,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		mcr |= PMCR_FORCE_SPEED_1000;
  		break;
  	case SPEED_100:
-@@ -2799,6 +2755,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2988,6 +2944,7 @@ static void mt753x_phylink_mac_link_up(s
  	if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
  		switch (speed) {
  		case SPEED_1000:
@@ -184,7 +184,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  			mcr |= PMCR_FORCE_EEE1G;
  			break;
  		case SPEED_100:
-@@ -2810,61 +2767,6 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2999,61 +2956,6 @@ static void mt753x_phylink_mac_link_up(s
  	mt7530_set(priv, MT7530_PMCR_P(port), mcr);
  }
  
@@ -246,7 +246,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
  				    struct phylink_config *config)
  {
-@@ -3122,7 +3024,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3312,7 +3214,6 @@ const struct mt753x_info mt753x_table[]
  		.sw_setup = mt7531_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
@@ -254,7 +254,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		.mac_port_get_caps = mt7531_mac_port_get_caps,
  		.mac_port_config = mt7531_mac_config,
  	},
-@@ -3132,7 +3033,6 @@ const struct mt753x_info mt753x_table[]
+@@ -3322,7 +3223,6 @@ const struct mt753x_info mt753x_table[]
  		.sw_setup = mt7988_setup,
  		.phy_read = mt7531_ind_phy_read,
  		.phy_write = mt7531_ind_phy_write,
@@ -264,7 +264,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  };
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -331,13 +331,6 @@ enum mt7530_vlan_port_acc_frm {
+@@ -340,13 +340,6 @@ enum mt7530_vlan_port_acc_frm {
  					 PMCR_TX_FC_EN | PMCR_RX_FC_EN | \
  					 PMCR_FORCE_FDX | PMCR_FORCE_LNK | \
  					 PMCR_FORCE_EEE1G | PMCR_FORCE_EEE100)
@@ -278,7 +278,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  #define MT7530_PMEEECR_P(x)		(0x3004 + (x) * 0x100)
  #define  WAKEUP_TIME_1000(x)		(((x) & 0xFF) << 24)
-@@ -737,7 +730,6 @@ struct mt753x_info {
+@@ -747,7 +740,6 @@ struct mt753x_info {
  	int (*sw_setup)(struct dsa_switch *ds);
  	int (*phy_read)(struct mt7530_priv *priv, int port, int regnum);
  	int (*phy_write)(struct mt7530_priv *priv, int port, int regnum, u16 val);
@@ -286,7 +286,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	void (*mac_port_get_caps)(struct dsa_switch *ds, int port,
  				  struct phylink_config *config);
  	void (*mac_port_validate)(struct dsa_switch *ds, int port,
-@@ -763,7 +755,6 @@ struct mt753x_info {
+@@ -773,7 +765,6 @@ struct mt753x_info {
   * @ports:		Holding the state among ports
   * @reg_mutex:		The lock for protecting among process accessing
   *			registers
@@ -294,7 +294,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
   * @p5_intf_sel:	Holding the current port 5 interface select
   * @p5_sgmii:		Flag for distinguishing if port 5 of the MT7531 switch
   *			has got SGMII
-@@ -785,8 +776,6 @@ struct mt7530_priv {
+@@ -795,8 +786,6 @@ struct mt7530_priv {
  	const struct mt753x_info *info;
  	unsigned int		id;
  	bool			mcm;
diff --git a/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch b/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
index f14634c17a..c83a627808 100644
--- a/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
+++ b/target/linux/generic/backport-6.1/790-42-v6.9-net-dsa-mt7530-get-rid-of-mt753x_mac_config.patch
@@ -18,7 +18,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2661,16 +2661,6 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2850,16 +2850,6 @@ mt7531_mac_config(struct dsa_switch *ds,
  	}
  }
  
@@ -35,7 +35,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static struct phylink_pcs *
  mt753x_phylink_mac_select_pcs(struct dsa_switch *ds, int port,
  			      phy_interface_t interface)
-@@ -2696,8 +2686,8 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2885,8 +2875,8 @@ mt753x_phylink_mac_config(struct dsa_swi
  	struct mt7530_priv *priv = ds->priv;
  	u32 mcr_cur, mcr_new;
  
diff --git a/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch b/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
index 2fa17d4558..84ee7416bf 100644
--- a/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
+++ b/target/linux/generic/backport-6.1/790-43-v6.9-net-dsa-mt7530-put-initialising-PCS-devices-code-bac.patch
@@ -20,7 +20,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2845,17 +2845,9 @@ static int
+@@ -3034,17 +3034,9 @@ static int
  mt753x_setup(struct dsa_switch *ds)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	if (ret)
  		return ret;
  
-@@ -2867,6 +2859,14 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3056,6 +3048,14 @@ mt753x_setup(struct dsa_switch *ds)
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
  
diff --git a/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch b/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
index d7c8180c8a..814a9d06e7 100644
--- a/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
+++ b/target/linux/generic/backport-6.1/790-44-v6.9-net-dsa-mt7530-sort-link-settings-ops-and-force-link.patch
@@ -24,7 +24,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1047,7 +1047,6 @@ mt7530_port_enable(struct dsa_switch *ds
+@@ -1222,7 +1222,6 @@ mt7530_port_enable(struct dsa_switch *ds
  	priv->ports[port].enable = true;
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
  		   priv->ports[port].pm);
@@ -32,7 +32,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	mutex_unlock(&priv->reg_mutex);
  
-@@ -1067,7 +1066,6 @@ mt7530_port_disable(struct dsa_switch *d
+@@ -1242,7 +1241,6 @@ mt7530_port_disable(struct dsa_switch *d
  	priv->ports[port].enable = false;
  	mt7530_rmw(priv, MT7530_PCR_P(port), PCR_MATRIX_MASK,
  		   PCR_MATRIX_CLR);
@@ -40,7 +40,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	mutex_unlock(&priv->reg_mutex);
  }
-@@ -2284,6 +2282,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2460,6 +2458,12 @@ mt7530_setup(struct dsa_switch *ds)
  	mt7530_mib_reset(ds);
  
  	for (i = 0; i < MT7530_NUM_PORTS; i++) {
@@ -53,7 +53,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  		/* Disable forwarding by default on all ports */
  		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
  			   PCR_MATRIX_CLR);
-@@ -2386,6 +2390,12 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2565,6 +2569,12 @@ mt7531_setup_common(struct dsa_switch *d
  		     UNU_FFP_MASK);
  
  	for (i = 0; i < MT7530_NUM_PORTS; i++) {
diff --git a/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch b/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch
index d29b183be1..d9f91a932a 100644
--- a/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch
+++ b/target/linux/generic/backport-6.1/790-45-v6.9-net-dsa-mt7530-simplify-link-operations.patch
@@ -45,7 +45,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2694,23 +2694,13 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2883,23 +2883,13 @@ mt753x_phylink_mac_config(struct dsa_swi
  			  const struct phylink_link_state *state)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -72,7 +72,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  static void mt753x_phylink_mac_link_down(struct dsa_switch *ds, int port,
 --- a/drivers/net/dsa/mt7530.h
 +++ b/drivers/net/dsa/mt7530.h
-@@ -324,8 +324,6 @@ enum mt7530_vlan_port_acc_frm {
+@@ -333,8 +333,6 @@ enum mt7530_vlan_port_acc_frm {
  					 MT7531_FORCE_DPX | \
  					 MT7531_FORCE_RX_FC | \
  					 MT7531_FORCE_TX_FC)
diff --git a/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch b/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
deleted file mode 100644
index e00615d540..0000000000
--- a/target/linux/generic/backport-6.1/790-46-v6.9-net-dsa-mt7530-fix-improper-frames-on-all-25MHz-and-.patch
+++ /dev/null
@@ -1,74 +0,0 @@
-From cfa7c85f92cd3814ad9748eb1ab25658c7f7cc67 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Wed, 20 Mar 2024 23:45:30 +0300
-Subject: [PATCH 48/48] net: dsa: mt7530: fix improper frames on all 25MHz and
- 40MHz XTAL MT7530
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The MT7530 switch after reset initialises with a core clock frequency that
-works with a 25MHz XTAL connected to it. For 40MHz XTAL, the core clock
-frequency must be set to 500MHz.
-
-The mt7530_pll_setup() function is responsible of setting the core clock
-frequency. Currently, it runs on MT7530 with 25MHz and 40MHz XTAL. This
-causes MT7530 switch with 25MHz XTAL to egress and ingress frames
-improperly.
-
-Introduce a check to run it only on MT7530 with 40MHz XTAL.
-
-The core clock frequency is set by writing to a switch PHY's register.
-Access to the PHY's register is done via the MDIO bus the switch is also
-on. Therefore, it works only when the switch makes switch PHYs listen on
-the MDIO bus the switch is on. This is controlled either by the state of
-the ESW_P1_LED_1 pin after reset deassertion or modifying bit 5 of the
-modifiable trap register.
-
-When ESW_P1_LED_1 is pulled high, PHY indirect access is used. That means
-accessing PHY registers via the PHY indirect access control register of the
-switch.
-
-When ESW_P1_LED_1 is pulled low, PHY direct access is used. That means
-accessing PHY registers via the MDIO bus the switch is on.
-
-For MT7530 switch with 40MHz XTAL on a board with ESW_P1_LED_1 pulled high,
-the core clock frequency won't be set to 500MHz, causing the switch to
-egress and ingress frames improperly.
-
-Run mt7530_pll_setup() after PHY direct access is set on the modifiable
-trap register.
-
-With these two changes, all MT7530 switches with 25MHz and 40MHz, and
-P1_LED_1 pulled high or low, will egress and ingress frames properly.
-
-Link: https://github.com/BPI-SINOVOIP/BPI-R2-bsp/blob/4a5dd143f2172ec97a2872fa29c7c4cd520f45b5/linux-mt/drivers/net/ethernet/mediatek/gsw_mt7623.c#L1039
-Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Link: https://lore.kernel.org/r/20240320-for-net-mt7530-fix-25mhz-xtal-with-direct-phy-access-v1-1-d92f605f1160 at arinc9.com
-Signed-off-by: Paolo Abeni <pabeni at redhat.com>
----
- drivers/net/dsa/mt7530.c | 5 +++--
- 1 file changed, 3 insertions(+), 2 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2259,8 +2259,6 @@ mt7530_setup(struct dsa_switch *ds)
- 		     SYS_CTRL_PHY_RST | SYS_CTRL_SW_RST |
- 		     SYS_CTRL_REG_RST);
- 
--	mt7530_pll_setup(priv);
--
- 	/* Lower Tx driving for TRGMII path */
- 	for (i = 0; i < NUM_TRGMII_CTRL; i++)
- 		mt7530_write(priv, MT7530_TRGMII_TD_ODT(i),
-@@ -2276,6 +2274,9 @@ mt7530_setup(struct dsa_switch *ds)
- 	val |= MHWTRAP_MANUAL;
- 	mt7530_write(priv, MT7530_MHWTRAP, val);
- 
-+	if ((val & HWTRAP_XTAL_MASK) == HWTRAP_XTAL_40MHZ)
-+		mt7530_pll_setup(priv);
-+
- 	mt753x_trap_frames(priv);
- 
- 	/* Enable and reset MIB counters */
diff --git a/target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch b/target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
deleted file mode 100644
index dc202a55e6..0000000000
--- a/target/linux/generic/backport-6.1/790-47-v6.10-net-dsa-mt7530-fix-enabling-EEE-on-MT7531-switch-on-.patch
+++ /dev/null
@@ -1,92 +0,0 @@
-From ef972fc9f5743da589ce9546dd565d6c56e679b8 Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Mon, 8 Apr 2024 10:08:53 +0300
-Subject: [PATCH 1/2] net: dsa: mt7530: fix enabling EEE on MT7531 switch on
- all boards
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-The commit 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
-brought EEE support but did not enable EEE on MT7531 switch MACs. EEE is
-enabled on MT7531 switch MACs by pulling the LAN2LED0 pin low on the board
-(bootstrapping), unsetting the EEE_DIS bit on the trap register, or setting
-the internal EEE switch bit on the CORE_PLL_GROUP4 register. Thanks to
-SkyLake Huang (???) from MediaTek for providing information on the
-internal EEE switch bit.
-
-There are existing boards that were not designed to pull the pin low.
-Because of that, the EEE status currently depends on the board design.
-
-The EEE_DIS bit on the trap pertains to the LAN2LED0 pin which is usually
-used to control an LED. Once the bit is unset, the pin will be low. That
-will make the active low LED turn on. The pin is controlled by the switch
-PHY. It seems that the PHY controls the pin in the way that it inverts the
-pin state. That means depending on the wiring of the LED connected to
-LAN2LED0 on the board, the LED may be on without an active link.
-
-To not cause this unwanted behaviour whilst enabling EEE on all boards, set
-the internal EEE switch bit on the CORE_PLL_GROUP4 register.
-
-My testing on MT7531 shows a certain amount of traffic loss when EEE is
-enabled. That said, I haven't come across a board that enables EEE. So
-enable EEE on the switch MACs but disable EEE advertisement on the switch
-PHYs. This way, we don't change the behaviour of the majority of the boards
-that have this switch. The mediatek-ge PHY driver already disables EEE
-advertisement on the switch PHYs but my testing shows that it is somehow
-enabled afterwards. Disabling EEE advertisement before the PHY driver
-initialises keeps it off.
-
-With this change, EEE can now be enabled using ethtool.
-
-Fixes: 40b5d2f15c09 ("net: dsa: mt7530: Add support for EEE features")
-Reviewed-by: Florian Fainelli <florian.fainelli at broadcom.com>
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
- drivers/net/dsa/mt7530.c | 17 ++++++++++++-----
- drivers/net/dsa/mt7530.h |  1 +
- 2 files changed, 13 insertions(+), 5 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2496,18 +2496,25 @@ mt7531_setup(struct dsa_switch *ds)
- 	mt7530_rmw(priv, MT7531_GPIO_MODE0, MT7531_GPIO0_MASK,
- 		   MT7531_GPIO0_INTERRUPT);
- 
--	/* Enable PHY core PLL, since phy_device has not yet been created
--	 * provided for phy_[read,write]_mmd_indirect is called, we provide
--	 * our own mt7531_ind_mmd_phy_[read,write] to complete this
--	 * function.
-+	/* Enable Energy-Efficient Ethernet (EEE) and PHY core PLL, since
-+	 * phy_device has not yet been created provided for
-+	 * phy_[read,write]_mmd_indirect is called, we provide our own
-+	 * mt7531_ind_mmd_phy_[read,write] to complete this function.
- 	 */
- 	val = mt7531_ind_c45_phy_read(priv, MT753X_CTRL_PHY_ADDR,
- 				      MDIO_MMD_VEND2, CORE_PLL_GROUP4);
--	val |= MT7531_PHY_PLL_BYPASS_MODE;
-+	val |= MT7531_RG_SYSPLL_DMY2 | MT7531_PHY_PLL_BYPASS_MODE;
- 	val &= ~MT7531_PHY_PLL_OFF;
- 	mt7531_ind_c45_phy_write(priv, MT753X_CTRL_PHY_ADDR, MDIO_MMD_VEND2,
- 				 CORE_PLL_GROUP4, val);
- 
-+	/* Disable EEE advertisement on the switch PHYs. */
-+	for (i = MT753X_CTRL_PHY_ADDR;
-+	     i < MT753X_CTRL_PHY_ADDR + MT7530_NUM_PHYS; i++) {
-+		mt7531_ind_c45_phy_write(priv, i, MDIO_MMD_AN, MDIO_AN_EEE_ADV,
-+					 0);
-+	}
-+
- 	mt7531_setup_common(ds);
- 
- 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -616,6 +616,7 @@ enum mt7531_clk_skew {
- #define  RG_SYSPLL_DDSFBK_EN		BIT(12)
- #define  RG_SYSPLL_BIAS_EN		BIT(11)
- #define  RG_SYSPLL_BIAS_LPF_EN		BIT(10)
-+#define  MT7531_RG_SYSPLL_DMY2		BIT(6)
- #define  MT7531_PHY_PLL_OFF		BIT(5)
- #define  MT7531_PHY_PLL_BYPASS_MODE	BIT(4)
- 
diff --git a/target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch b/target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
deleted file mode 100644
index 4d70e774a4..0000000000
--- a/target/linux/generic/backport-6.1/790-48-STABLE-net-dsa-mt7530-trap-link-local-frames-regardless-of-.patch
+++ /dev/null
@@ -1,483 +0,0 @@
-From b7427d66cb3d6dca5165de5f7d80d59f08c2795b Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Tue, 9 Apr 2024 18:01:14 +0300
-Subject: [PATCH 2/2] net: dsa: mt7530: trap link-local frames regardless of ST
- Port State
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer
-(DLL) of the Open Systems Interconnection basic reference model (OSI/RM)
-are described; the medium access control (MAC) and logical link control
-(LLC) sublayers. The MAC sublayer is the one facing the physical layer.
-
-In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A
-Bridge component comprises a MAC Relay Entity for interconnecting the Ports
-of the Bridge, at least two Ports, and higher layer entities with at least
-a Spanning Tree Protocol Entity included.
-
-Each Bridge Port also functions as an end station and shall provide the MAC
-Service to an LLC Entity. Each instance of the MAC Service is provided to a
-distinct LLC Entity that supports protocol identification, multiplexing,
-and demultiplexing, for protocol data unit (PDU) transmission and reception
-by one or more higher layer entities.
-
-It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC
-Entity associated with each Bridge Port is modeled as being directly
-connected to the attached Local Area Network (LAN).
-
-On the switch with CPU port architecture, CPU port functions as Management
-Port, and the Management Port functionality is provided by software which
-functions as an end station. Software is connected to an IEEE 802 LAN that
-is wholly contained within the system that incorporates the Bridge.
-Software provides access to the LLC Entity associated with each Bridge Port
-by the value of the source port field on the special tag on the frame
-received by software.
-
-We call frames that carry control information to determine the active
-topology and current extent of each Virtual Local Area Network (VLAN),
-i.e., spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN
-Registration Protocol Data Units (MVRPDUs), and frames from other link
-constrained protocols, such as Extensible Authentication Protocol over LAN
-(EAPOL) and Link Layer Discovery Protocol (LLDP), link-local frames. They
-are not forwarded by a Bridge. Permanently configured entries in the
-filtering database (FDB) ensure that such frames are discarded by the
-Forwarding Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in
-detail:
-
-Each of the reserved MAC addresses specified in Table 8-1
-(01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be
-permanently configured in the FDB in C-VLAN components and ERs.
-
-Each of the reserved MAC addresses specified in Table 8-2
-(01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently
-configured in the FDB in S-VLAN components.
-
-Each of the reserved MAC addresses specified in Table 8-3
-(01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB
-in TPMR components.
-
-The FDB entries for reserved MAC addresses shall specify filtering for all
-Bridge Ports and all VIDs. Management shall not provide the capability to
-modify or remove entries for reserved MAC addresses.
-
-The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of
-propagation of PDUs within a Bridged Network, as follows:
-
-  The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that
-  no conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN)
-  component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward.
-  PDUs transmitted using this destination address, or any other addresses
-  that appear in Table 8-1, Table 8-2, and Table 8-3
-  (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can
-  therefore travel no further than those stations that can be reached via a
-  single individual LAN from the originating station.
-
-  The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an
-  address that no conformant S-VLAN component, C-VLAN component, or MAC
-  Bridge can forward; however, this address is relayed by a TPMR component.
-  PDUs using this destination address, or any of the other addresses that
-  appear in both Table 8-1 and Table 8-2 but not in Table 8-3
-  (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed
-  by any TPMRs but will propagate no further than the nearest S-VLAN
-  component, C-VLAN component, or MAC Bridge.
-
-  The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an
-  address that no conformant C-VLAN component, MAC Bridge can forward;
-  however, it is relayed by TPMR components and S-VLAN components. PDUs
-  using this destination address, or any of the other addresses that appear
-  in Table 8-1 but not in either Table 8-2 or Table 8-3
-  (01-80-C2-00-00-[00,0B,0C,0D,0F]), will be relayed by TPMR components and
-  S-VLAN components but will propagate no further than the nearest C-VLAN
-  component or MAC Bridge.
-
-Because the LLC Entity associated with each Bridge Port is provided via CPU
-port, we must not filter these frames but forward them to CPU port.
-
-In a Bridge, the transmission Port is majorly decided by ingress and egress
-rules, FDB, and spanning tree Port State functions of the Forwarding
-Process. For link-local frames, only CPU port should be designated as
-destination port in the FDB, and the other functions of the Forwarding
-Process must not interfere with the decision of the transmission Port. We
-call this process trapping frames to CPU port.
-
-Therefore, on the switch with CPU port architecture, link-local frames must
-be trapped to CPU port, and certain link-local frames received by a Port of
-a Bridge comprising a TPMR component or an S-VLAN component must be
-excluded from it.
-
-A Bridge of the switch with CPU port architecture cannot comprise a
-Two-Port MAC Relay (TPMR) component as a TPMR component supports only a
-subset of the functionality of a MAC Bridge. A Bridge comprising two Ports
-(Management Port doesn't count) of this architecture will either function
-as a standard MAC Bridge or a standard VLAN Bridge.
-
-Therefore, a Bridge of this architecture can only comprise S-VLAN
-components, C-VLAN components, or MAC Bridge components. Since there's no
-TPMR component, we don't need to relay PDUs using the destination addresses
-specified on the Nearest non-TPMR section, and the proportion of the
-Nearest Customer Bridge section where they must be relayed by TPMR
-components.
-
-One option to trap link-local frames to CPU port is to add static FDB
-entries with CPU port designated as destination port. However, because that
-Independent VLAN Learning (IVL) is being used on every VID, each entry only
-applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC
-Bridge component or a C-VLAN component, there would have to be 16 times
-4096 entries. This switch intellectual property can only hold a maximum of
-2048 entries. Using this option, there also isn't a mechanism to prevent
-link-local frames from being discarded when the spanning tree Port State of
-the reception Port is discarding.
-
-The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4
-registers. Whilst this applies to every VID, it doesn't contain all of the
-reserved MAC addresses without affecting the remaining Standard Group MAC
-Addresses. The REV_UN frame tag utilised using the RGAC4 register covers
-the remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination
-addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF
-destination addresses which may be relayed by MAC Bridges or VLAN Bridges.
-The latter option provides better but not complete conformance.
-
-This switch intellectual property also does not provide a mechanism to trap
-link-local frames with specific destination addresses to CPU port by
-Bridge, to conform to the filtering rules for the distinct Bridge
-components.
-
-Therefore, regardless of the type of the Bridge component, link-local
-frames with these destination addresses will be trapped to CPU port:
-
-01-80-C2-00-00-[00,01,02,03,0E]
-
-In a Bridge comprising a MAC Bridge component or a C-VLAN component:
-
-  Link-local frames with these destination addresses won't be trapped to
-  CPU port which won't conform to IEEE Std 802.1Q-2022:
-
-  01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F]
-
-In a Bridge comprising an S-VLAN component:
-
-  Link-local frames with these destination addresses will be trapped to CPU
-  port which won't conform to IEEE Std 802.1Q-2022:
-
-  01-80-C2-00-00-00
-
-  Link-local frames with these destination addresses won't be trapped to
-  CPU port which won't conform to IEEE Std 802.1Q-2022:
-
-  01-80-C2-00-00-[04,05,06,07,08,09,0A]
-
-Currently on this switch intellectual property, if the spanning tree Port
-State of the reception Port is discarding, link-local frames will be
-discarded.
-
-To trap link-local frames regardless of the spanning tree Port State, make
-the switch regard them as Bridge Protocol Data Units (BPDUs). This switch
-intellectual property only lets the frames regarded as BPDUs bypass the
-spanning tree Port State function of the Forwarding Process.
-
-With this change, the only remaining interference is the ingress rules.
-When the reception Port has no PVID assigned on software, VLAN-untagged
-frames won't be allowed in. There doesn't seem to be a mechanism on the
-switch intellectual property to have link-local frames bypass this function
-of the Forwarding Process.
-
-Fixes: b8f126a8d543 ("net-next: dsa: add dsa support for Mediatek MT7530 switch")
-Reviewed-by: Daniel Golle <daniel at makrotopia.org>
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
----
- drivers/net/dsa/mt7530.c | 229 +++++++++++++++++++++++++++++++++------
- drivers/net/dsa/mt7530.h |   5 +
- 2 files changed, 200 insertions(+), 34 deletions(-)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -943,20 +943,173 @@ static void mt7530_setup_port5(struct ds
- 	mutex_unlock(&priv->reg_mutex);
- }
- 
--/* On page 205, section "8.6.3 Frame filtering" of the active standard, IEEE Std
-- * 802.1Q?-2022, it is stated that frames with 01:80:C2:00:00:00-0F as MAC DA
-- * must only be propagated to C-VLAN and MAC Bridge components. That means
-- * VLAN-aware and VLAN-unaware bridges. On the switch designs with CPU ports,
-- * these frames are supposed to be processed by the CPU (software). So we make
-- * the switch only forward them to the CPU port. And if received from a CPU
-- * port, forward to a single port. The software is responsible of making the
-- * switch conform to the latter by setting a single port as destination port on
-- * the special tag.
-- *
-- * This switch intellectual property cannot conform to this part of the standard
-- * fully. Whilst the REV_UN frame tag covers the remaining :04-0D and :0F MAC
-- * DAs, it also includes :22-FF which the scope of propagation is not supposed
-- * to be restricted for these MAC DAs.
-+/* In Clause 5 of IEEE Std 802-2014, two sublayers of the data link layer (DLL)
-+ * of the Open Systems Interconnection basic reference model (OSI/RM) are
-+ * described; the medium access control (MAC) and logical link control (LLC)
-+ * sublayers. The MAC sublayer is the one facing the physical layer.
-+ *
-+ * In 8.2 of IEEE Std 802.1Q-2022, the Bridge architecture is described. A
-+ * Bridge component comprises a MAC Relay Entity for interconnecting the Ports
-+ * of the Bridge, at least two Ports, and higher layer entities with at least a
-+ * Spanning Tree Protocol Entity included.
-+ *
-+ * Each Bridge Port also functions as an end station and shall provide the MAC
-+ * Service to an LLC Entity. Each instance of the MAC Service is provided to a
-+ * distinct LLC Entity that supports protocol identification, multiplexing, and
-+ * demultiplexing, for protocol data unit (PDU) transmission and reception by
-+ * one or more higher layer entities.
-+ *
-+ * It is described in 8.13.9 of IEEE Std 802.1Q-2022 that in a Bridge, the LLC
-+ * Entity associated with each Bridge Port is modeled as being directly
-+ * connected to the attached Local Area Network (LAN).
-+ *
-+ * On the switch with CPU port architecture, CPU port functions as Management
-+ * Port, and the Management Port functionality is provided by software which
-+ * functions as an end station. Software is connected to an IEEE 802 LAN that is
-+ * wholly contained within the system that incorporates the Bridge. Software
-+ * provides access to the LLC Entity associated with each Bridge Port by the
-+ * value of the source port field on the special tag on the frame received by
-+ * software.
-+ *
-+ * We call frames that carry control information to determine the active
-+ * topology and current extent of each Virtual Local Area Network (VLAN), i.e.,
-+ * spanning tree or Shortest Path Bridging (SPB) and Multiple VLAN Registration
-+ * Protocol Data Units (MVRPDUs), and frames from other link constrained
-+ * protocols, such as Extensible Authentication Protocol over LAN (EAPOL) and
-+ * Link Layer Discovery Protocol (LLDP), link-local frames. They are not
-+ * forwarded by a Bridge. Permanently configured entries in the filtering
-+ * database (FDB) ensure that such frames are discarded by the Forwarding
-+ * Process. In 8.6.3 of IEEE Std 802.1Q-2022, this is described in detail:
-+ *
-+ * Each of the reserved MAC addresses specified in Table 8-1
-+ * (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]) shall be
-+ * permanently configured in the FDB in C-VLAN components and ERs.
-+ *
-+ * Each of the reserved MAC addresses specified in Table 8-2
-+ * (01-80-C2-00-00-[01,02,03,04,05,06,07,08,09,0A,0E]) shall be permanently
-+ * configured in the FDB in S-VLAN components.
-+ *
-+ * Each of the reserved MAC addresses specified in Table 8-3
-+ * (01-80-C2-00-00-[01,02,04,0E]) shall be permanently configured in the FDB in
-+ * TPMR components.
-+ *
-+ * The FDB entries for reserved MAC addresses shall specify filtering for all
-+ * Bridge Ports and all VIDs. Management shall not provide the capability to
-+ * modify or remove entries for reserved MAC addresses.
-+ *
-+ * The addresses in Table 8-1, Table 8-2, and Table 8-3 determine the scope of
-+ * propagation of PDUs within a Bridged Network, as follows:
-+ *
-+ *   The Nearest Bridge group address (01-80-C2-00-00-0E) is an address that no
-+ *   conformant Two-Port MAC Relay (TPMR) component, Service VLAN (S-VLAN)
-+ *   component, Customer VLAN (C-VLAN) component, or MAC Bridge can forward.
-+ *   PDUs transmitted using this destination address, or any other addresses
-+ *   that appear in Table 8-1, Table 8-2, and Table 8-3
-+ *   (01-80-C2-00-00-[00,01,02,03,04,05,06,07,08,09,0A,0B,0C,0D,0E,0F]), can
-+ *   therefore travel no further than those stations that can be reached via a
-+ *   single individual LAN from the originating station.
-+ *
-+ *   The Nearest non-TPMR Bridge group address (01-80-C2-00-00-03), is an
-+ *   address that no conformant S-VLAN component, C-VLAN component, or MAC
-+ *   Bridge can forward; however, this address is relayed by a TPMR component.
-+ *   PDUs using this destination address, or any of the other addresses that
-+ *   appear in both Table 8-1 and Table 8-2 but not in Table 8-3
-+ *   (01-80-C2-00-00-[00,03,05,06,07,08,09,0A,0B,0C,0D,0F]), will be relayed by
-+ *   any TPMRs but will propagate no further than the nearest S-VLAN component,
-+ *   C-VLAN component, or MAC Bridge.
-+ *
-+ *   The Nearest Customer Bridge group address (01-80-C2-00-00-00) is an address
-+ *   that no conformant C-VLAN component, MAC Bridge can forward; however, it is
-+ *   relayed by TPMR components and S-VLAN components. PDUs using this
-+ *   destination address, or any of the other addresses that appear in Table 8-1
-+ *   but not in either Table 8-2 or Table 8-3 (01-80-C2-00-00-[00,0B,0C,0D,0F]),
-+ *   will be relayed by TPMR components and S-VLAN components but will propagate
-+ *   no further than the nearest C-VLAN component or MAC Bridge.
-+ *
-+ * Because the LLC Entity associated with each Bridge Port is provided via CPU
-+ * port, we must not filter these frames but forward them to CPU port.
-+ *
-+ * In a Bridge, the transmission Port is majorly decided by ingress and egress
-+ * rules, FDB, and spanning tree Port State functions of the Forwarding Process.
-+ * For link-local frames, only CPU port should be designated as destination port
-+ * in the FDB, and the other functions of the Forwarding Process must not
-+ * interfere with the decision of the transmission Port. We call this process
-+ * trapping frames to CPU port.
-+ *
-+ * Therefore, on the switch with CPU port architecture, link-local frames must
-+ * be trapped to CPU port, and certain link-local frames received by a Port of a
-+ * Bridge comprising a TPMR component or an S-VLAN component must be excluded
-+ * from it.
-+ *
-+ * A Bridge of the switch with CPU port architecture cannot comprise a Two-Port
-+ * MAC Relay (TPMR) component as a TPMR component supports only a subset of the
-+ * functionality of a MAC Bridge. A Bridge comprising two Ports (Management Port
-+ * doesn't count) of this architecture will either function as a standard MAC
-+ * Bridge or a standard VLAN Bridge.
-+ *
-+ * Therefore, a Bridge of this architecture can only comprise S-VLAN components,
-+ * C-VLAN components, or MAC Bridge components. Since there's no TPMR component,
-+ * we don't need to relay PDUs using the destination addresses specified on the
-+ * Nearest non-TPMR section, and the proportion of the Nearest Customer Bridge
-+ * section where they must be relayed by TPMR components.
-+ *
-+ * One option to trap link-local frames to CPU port is to add static FDB entries
-+ * with CPU port designated as destination port. However, because that
-+ * Independent VLAN Learning (IVL) is being used on every VID, each entry only
-+ * applies to a single VLAN Identifier (VID). For a Bridge comprising a MAC
-+ * Bridge component or a C-VLAN component, there would have to be 16 times 4096
-+ * entries. This switch intellectual property can only hold a maximum of 2048
-+ * entries. Using this option, there also isn't a mechanism to prevent
-+ * link-local frames from being discarded when the spanning tree Port State of
-+ * the reception Port is discarding.
-+ *
-+ * The remaining option is to utilise the BPC, RGAC1, RGAC2, RGAC3, and RGAC4
-+ * registers. Whilst this applies to every VID, it doesn't contain all of the
-+ * reserved MAC addresses without affecting the remaining Standard Group MAC
-+ * Addresses. The REV_UN frame tag utilised using the RGAC4 register covers the
-+ * remaining 01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F] destination
-+ * addresses. It also includes the 01-80-C2-00-00-22 to 01-80-C2-00-00-FF
-+ * destination addresses which may be relayed by MAC Bridges or VLAN Bridges.
-+ * The latter option provides better but not complete conformance.
-+ *
-+ * This switch intellectual property also does not provide a mechanism to trap
-+ * link-local frames with specific destination addresses to CPU port by Bridge,
-+ * to conform to the filtering rules for the distinct Bridge components.
-+ *
-+ * Therefore, regardless of the type of the Bridge component, link-local frames
-+ * with these destination addresses will be trapped to CPU port:
-+ *
-+ * 01-80-C2-00-00-[00,01,02,03,0E]
-+ *
-+ * In a Bridge comprising a MAC Bridge component or a C-VLAN component:
-+ *
-+ *   Link-local frames with these destination addresses won't be trapped to CPU
-+ *   port which won't conform to IEEE Std 802.1Q-2022:
-+ *
-+ *   01-80-C2-00-00-[04,05,06,07,08,09,0A,0B,0C,0D,0F]
-+ *
-+ * In a Bridge comprising an S-VLAN component:
-+ *
-+ *   Link-local frames with these destination addresses will be trapped to CPU
-+ *   port which won't conform to IEEE Std 802.1Q-2022:
-+ *
-+ *   01-80-C2-00-00-00
-+ *
-+ *   Link-local frames with these destination addresses won't be trapped to CPU
-+ *   port which won't conform to IEEE Std 802.1Q-2022:
-+ *
-+ *   01-80-C2-00-00-[04,05,06,07,08,09,0A]
-+ *
-+ * To trap link-local frames to CPU port as conformant as this switch
-+ * intellectual property can allow, link-local frames are made to be regarded as
-+ * Bridge Protocol Data Units (BPDUs). This is because this switch intellectual
-+ * property only lets the frames regarded as BPDUs bypass the spanning tree Port
-+ * State function of the Forwarding Process.
-+ *
-+ * The only remaining interference is the ingress rules. When the reception Port
-+ * has no PVID assigned on software, VLAN-untagged frames won't be allowed in.
-+ * There doesn't seem to be a mechanism on the switch intellectual property to
-+ * have link-local frames bypass this function of the Forwarding Process.
-  */
- static void
- mt753x_trap_frames(struct mt7530_priv *priv)
-@@ -964,35 +1117,43 @@ mt753x_trap_frames(struct mt7530_priv *p
- 	/* Trap 802.1X PAE frames and BPDUs to the CPU port(s) and egress them
- 	 * VLAN-untagged.
- 	 */
--	mt7530_rmw(priv, MT753X_BPC, MT753X_PAE_EG_TAG_MASK |
--		   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
--		   MT753X_BPDU_PORT_FW_MASK,
--		   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
--		   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_BPDU_CPU_ONLY);
-+	mt7530_rmw(priv, MT753X_BPC,
-+		   MT753X_PAE_BPDU_FR | MT753X_PAE_EG_TAG_MASK |
-+			   MT753X_PAE_PORT_FW_MASK | MT753X_BPDU_EG_TAG_MASK |
-+			   MT753X_BPDU_PORT_FW_MASK,
-+		   MT753X_PAE_BPDU_FR |
-+			   MT753X_PAE_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_PAE_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+			   MT753X_BPDU_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_BPDU_CPU_ONLY);
- 
- 	/* Trap frames with :01 and :02 MAC DAs to the CPU port(s) and egress
- 	 * them VLAN-untagged.
- 	 */
--	mt7530_rmw(priv, MT753X_RGAC1, MT753X_R02_EG_TAG_MASK |
--		   MT753X_R02_PORT_FW_MASK | MT753X_R01_EG_TAG_MASK |
--		   MT753X_R01_PORT_FW_MASK,
--		   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
--		   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_BPDU_CPU_ONLY);
-+	mt7530_rmw(priv, MT753X_RGAC1,
-+		   MT753X_R02_BPDU_FR | MT753X_R02_EG_TAG_MASK |
-+			   MT753X_R02_PORT_FW_MASK | MT753X_R01_BPDU_FR |
-+			   MT753X_R01_EG_TAG_MASK | MT753X_R01_PORT_FW_MASK,
-+		   MT753X_R02_BPDU_FR |
-+			   MT753X_R02_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_R02_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+			   MT753X_R01_BPDU_FR |
-+			   MT753X_R01_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_BPDU_CPU_ONLY);
- 
- 	/* Trap frames with :03 and :0E MAC DAs to the CPU port(s) and egress
- 	 * them VLAN-untagged.
- 	 */
--	mt7530_rmw(priv, MT753X_RGAC2, MT753X_R0E_EG_TAG_MASK |
--		   MT753X_R0E_PORT_FW_MASK | MT753X_R03_EG_TAG_MASK |
--		   MT753X_R03_PORT_FW_MASK,
--		   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
--		   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
--		   MT753X_BPDU_CPU_ONLY);
-+	mt7530_rmw(priv, MT753X_RGAC2,
-+		   MT753X_R0E_BPDU_FR | MT753X_R0E_EG_TAG_MASK |
-+			   MT753X_R0E_PORT_FW_MASK | MT753X_R03_BPDU_FR |
-+			   MT753X_R03_EG_TAG_MASK | MT753X_R03_PORT_FW_MASK,
-+		   MT753X_R0E_BPDU_FR |
-+			   MT753X_R0E_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_R0E_PORT_FW(MT753X_BPDU_CPU_ONLY) |
-+			   MT753X_R03_BPDU_FR |
-+			   MT753X_R03_EG_TAG(MT7530_VLAN_EG_UNTAGGED) |
-+			   MT753X_BPDU_CPU_ONLY);
- }
- 
- static void
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -65,6 +65,7 @@ enum mt753x_id {
- 
- /* Registers for BPDU and PAE frame control*/
- #define MT753X_BPC			0x24
-+#define  MT753X_PAE_BPDU_FR		BIT(25)
- #define  MT753X_PAE_EG_TAG_MASK		GENMASK(24, 22)
- #define  MT753X_PAE_EG_TAG(x)		FIELD_PREP(MT753X_PAE_EG_TAG_MASK, x)
- #define  MT753X_PAE_PORT_FW_MASK	GENMASK(18, 16)
-@@ -75,20 +76,24 @@ enum mt753x_id {
- 
- /* Register for :01 and :02 MAC DA frame control */
- #define MT753X_RGAC1			0x28
-+#define  MT753X_R02_BPDU_FR		BIT(25)
- #define  MT753X_R02_EG_TAG_MASK		GENMASK(24, 22)
- #define  MT753X_R02_EG_TAG(x)		FIELD_PREP(MT753X_R02_EG_TAG_MASK, x)
- #define  MT753X_R02_PORT_FW_MASK	GENMASK(18, 16)
- #define  MT753X_R02_PORT_FW(x)		FIELD_PREP(MT753X_R02_PORT_FW_MASK, x)
-+#define  MT753X_R01_BPDU_FR		BIT(9)
- #define  MT753X_R01_EG_TAG_MASK		GENMASK(8, 6)
- #define  MT753X_R01_EG_TAG(x)		FIELD_PREP(MT753X_R01_EG_TAG_MASK, x)
- #define  MT753X_R01_PORT_FW_MASK	GENMASK(2, 0)
- 
- /* Register for :03 and :0E MAC DA frame control */
- #define MT753X_RGAC2			0x2c
-+#define  MT753X_R0E_BPDU_FR		BIT(25)
- #define  MT753X_R0E_EG_TAG_MASK		GENMASK(24, 22)
- #define  MT753X_R0E_EG_TAG(x)		FIELD_PREP(MT753X_R0E_EG_TAG_MASK, x)
- #define  MT753X_R0E_PORT_FW_MASK	GENMASK(18, 16)
- #define  MT753X_R0E_PORT_FW(x)		FIELD_PREP(MT753X_R0E_PORT_FW_MASK, x)
-+#define  MT753X_R03_BPDU_FR		BIT(9)
- #define  MT753X_R03_EG_TAG_MASK		GENMASK(8, 6)
- #define  MT753X_R03_EG_TAG(x)		FIELD_PREP(MT753X_R03_EG_TAG_MASK, x)
- #define  MT753X_R03_PORT_FW_MASK	GENMASK(2, 0)
diff --git a/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch b/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
index ca2657d57d..8962e560f7 100644
--- a/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
+++ b/target/linux/generic/backport-6.1/790-49-v6.10-net-dsa-mt7530-provide-own-phylink-MAC-operations.patch
@@ -19,7 +19,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2841,28 +2841,34 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2861,28 +2861,34 @@ mt7531_mac_config(struct dsa_switch *ds,
  }
  
  static struct phylink_pcs *
@@ -60,7 +60,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  
  	if ((port == 5 || port == 6) && priv->info->mac_port_config)
  		priv->info->mac_port_config(ds, port, mode, state->interface);
-@@ -2872,23 +2878,25 @@ mt753x_phylink_mac_config(struct dsa_swi
+@@ -2892,23 +2898,25 @@ mt753x_phylink_mac_config(struct dsa_swi
  		mt7530_set(priv, MT7530_PMCR_P(port), PMCR_EXT_PHY);
  }
  
@@ -92,7 +92,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  	u32 mcr;
  
  	mcr = PMCR_RX_EN | PMCR_TX_EN | PMCR_FORCE_LNK;
-@@ -2923,7 +2931,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2943,7 +2951,7 @@ static void mt753x_phylink_mac_link_up(s
  		}
  	}
  
@@ -101,7 +101,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  }
  
  static void mt753x_phylink_get_caps(struct dsa_switch *ds, int port,
-@@ -3148,16 +3156,19 @@ const struct dsa_switch_ops mt7530_switc
+@@ -3169,16 +3177,19 @@ const struct dsa_switch_ops mt7530_switc
  	.port_mirror_add	= mt753x_port_mirror_add,
  	.port_mirror_del	= mt753x_port_mirror_del,
  	.phylink_get_caps	= mt753x_phylink_get_caps,
@@ -125,7 +125,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  const struct mt753x_info mt753x_table[] = {
  	[ID_MT7621] = {
  		.id = ID_MT7621,
-@@ -3227,6 +3238,7 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3248,6 +3259,7 @@ mt7530_probe_common(struct mt7530_priv *
  	priv->dev = dev;
  	priv->ds->priv = priv;
  	priv->ds->ops = &mt7530_switch_ops;
diff --git a/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch b/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
deleted file mode 100644
index 7640a9cb41..0000000000
--- a/target/linux/generic/backport-6.1/790-50-v6.10-net-dsa-mt7530-fix-mirroring-frames-received-on-loca.patch
+++ /dev/null
@@ -1,70 +0,0 @@
-From d4097ddef078a113643a6dcde01e99741f852adb Mon Sep 17 00:00:00 2001
-From: =?UTF-8?q?Ar=C4=B1n=C3=A7=20=C3=9CNAL?= <arinc.unal at arinc9.com>
-Date: Sat, 13 Apr 2024 16:01:39 +0300
-Subject: [PATCH 2/5] net: dsa: mt7530: fix mirroring frames received on local
- port
-MIME-Version: 1.0
-Content-Type: text/plain; charset=UTF-8
-Content-Transfer-Encoding: 8bit
-
-This switch intellectual property provides a bit on the ARL global control
-register which controls allowing mirroring frames which are received on the
-local port (monitor port). This bit is unset after reset.
-
-This ability must be enabled to fully support the port mirroring feature on
-this switch intellectual property.
-
-Therefore, this patch fixes the traffic not being reflected on a port,
-which would be configured like below:
-
-  tc qdisc add dev swp0 clsact
-
-  tc filter add dev swp0 ingress matchall skip_sw \
-  action mirred egress mirror dev swp0
-
-As a side note, this configuration provides the hairpinning feature for a
-single port.
-
-Fixes: 37feab6076aa ("net: dsa: mt7530: add support for port mirroring")
-Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
-Signed-off-by: David S. Miller <davem at davemloft.net>
----
- drivers/net/dsa/mt7530.c | 6 ++++++
- drivers/net/dsa/mt7530.h | 4 ++++
- 2 files changed, 10 insertions(+)
-
---- a/drivers/net/dsa/mt7530.c
-+++ b/drivers/net/dsa/mt7530.c
-@@ -2471,6 +2471,9 @@ mt7530_setup(struct dsa_switch *ds)
- 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
- 	}
- 
-+	/* Allow mirroring frames received on the local port (monitor port). */
-+	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
-+
- 	/* Setup VLAN ID 0 for VLAN-unaware bridges */
- 	ret = mt7530_setup_vlan0(priv);
- 	if (ret)
-@@ -2582,6 +2585,9 @@ mt7531_setup_common(struct dsa_switch *d
- 			   PVC_EG_TAG(MT7530_VLAN_EG_CONSISTENT));
- 	}
- 
-+	/* Allow mirroring frames received on the local port (monitor port). */
-+	mt7530_set(priv, MT753X_AGC, LOCAL_EN);
-+
- 	/* Flush the FDB table */
- 	ret = mt7530_fdb_cmd(priv, MT7530_FDB_FLUSH, NULL);
- 	if (ret < 0)
---- a/drivers/net/dsa/mt7530.h
-+++ b/drivers/net/dsa/mt7530.h
-@@ -32,6 +32,10 @@ enum mt753x_id {
- #define SYSC_REG_RSTCTRL		0x34
- #define  RESET_MCM			BIT(2)
- 
-+/* Register for ARL global control */
-+#define MT753X_AGC			0xc
-+#define  LOCAL_EN			BIT(7)
-+
- /* Registers to mac forward control for unknown frames */
- #define MT7530_MFC			0x10
- #define  BC_FFP(x)			(((x) & 0xff) << 24)
diff --git a/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch b/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
index 304ea21adc..cd5b7b287d 100644
--- a/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
+++ b/target/linux/generic/backport-6.1/790-51-v6.10-net-dsa-mt7530-fix-port-mirroring-for-MT7988-SoC-swi.patch
@@ -26,7 +26,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1876,14 +1876,16 @@ mt7530_port_vlan_del(struct dsa_switch *
+@@ -1890,14 +1890,16 @@ mt7530_port_vlan_del(struct dsa_switch *
  
  static int mt753x_mirror_port_get(unsigned int id, u32 val)
  {
diff --git a/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch b/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch
index 6b6a255e26..e9c8f955c9 100644
--- a/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch
+++ b/target/linux/generic/backport-6.1/790-52-v6.10-net-dsa-mt7530-mdio-read-PHY-address-of-switch-from-.patch
@@ -184,7 +184,7 @@ Signed-off-by: Paolo Abeni <pabeni at redhat.com>
  err:
  	if (ret < 0)
  		dev_err(&bus->dev,
-@@ -2670,16 +2678,19 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2684,16 +2692,19 @@ mt7531_setup(struct dsa_switch *ds)
  	 * phy_[read,write]_mmd_indirect is called, we provide our own
  	 * mt7531_ind_mmd_phy_[read,write] to complete this function.
  	 */
diff --git a/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch b/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
index 3cbd62e929..158e5f8c00 100644
--- a/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
+++ b/target/linux/generic/backport-6.1/790-55-v6.10-net-dsa-mt7530-refactor-MT7530_PMCR_P.patch
@@ -33,7 +33,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -889,7 +889,7 @@ static void mt7530_setup_port5(struct ds
+@@ -903,7 +903,7 @@ static void mt7530_setup_port5(struct ds
  		val &= ~MHWTRAP_P5_MAC_SEL & ~MHWTRAP_P5_DIS;
  
  		/* Setup the MAC by default for the cpu port */
@@ -42,7 +42,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		break;
  	case P5_INTF_SEL_GMAC5:
  		/* MT7530_P5_MODE_GMAC: P5 -> External phy or 2nd GMAC */
-@@ -2435,8 +2435,8 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2449,8 +2449,8 @@ mt7530_setup(struct dsa_switch *ds)
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
@@ -53,7 +53,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  		/* Disable forwarding by default on all ports */
  		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
-@@ -2546,8 +2546,8 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2560,8 +2560,8 @@ mt7531_setup_common(struct dsa_switch *d
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
@@ -64,7 +64,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  		/* Disable forwarding by default on all ports */
  		mt7530_rmw(priv, MT7530_PCR_P(i), PCR_MATRIX_MASK,
-@@ -2630,7 +2630,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2644,7 +2644,7 @@ mt7531_setup(struct dsa_switch *ds)
  
  	/* Force link down on all ports before internal reset */
  	for (i = 0; i < MT7530_NUM_PORTS; i++)
@@ -73,7 +73,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	/* Reset the switch through internal reset */
  	mt7530_write(priv, MT7530_SYS_CTRL, SYS_CTRL_SW_RST | SYS_CTRL_REG_RST);
-@@ -2872,7 +2872,7 @@ mt753x_phylink_mac_config(struct phylink
+@@ -2886,7 +2886,7 @@ mt753x_phylink_mac_config(struct phylink
  
  	/* Are we connected to external phy */
  	if (port == 5 && dsa_is_user_port(ds, 5))
@@ -82,7 +82,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  }
  
  static void mt753x_phylink_mac_link_down(struct phylink_config *config,
-@@ -2882,7 +2882,7 @@ static void mt753x_phylink_mac_link_down
+@@ -2896,7 +2896,7 @@ static void mt753x_phylink_mac_link_down
  	struct dsa_port *dp = dsa_phylink_to_port(config);
  	struct mt7530_priv *priv = dp->ds->priv;
  
@@ -91,7 +91,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  }
  
  static void mt753x_phylink_mac_link_up(struct phylink_config *config,
-@@ -2896,7 +2896,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2910,7 +2910,7 @@ static void mt753x_phylink_mac_link_up(s
  	struct mt7530_priv *priv = dp->ds->priv;
  	u32 mcr;
  
@@ -100,7 +100,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	switch (speed) {
  	case SPEED_1000:
-@@ -2911,9 +2911,9 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2925,9 +2925,9 @@ static void mt753x_phylink_mac_link_up(s
  	if (duplex == DUPLEX_FULL) {
  		mcr |= PMCR_FORCE_FDX;
  		if (tx_pause)
@@ -112,7 +112,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	}
  
  	if (mode == MLO_AN_PHY && phydev && phy_init_eee(phydev, false) >= 0) {
-@@ -2928,7 +2928,7 @@ static void mt753x_phylink_mac_link_up(s
+@@ -2942,7 +2942,7 @@ static void mt753x_phylink_mac_link_up(s
  		}
  	}
  
diff --git a/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch b/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
index 9697e7eb4f..9a0ce7c36c 100644
--- a/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
+++ b/target/linux/generic/backport-6.1/790-56-v6.10-net-dsa-mt7530-rename-p5_intf_sel-and-use-only-for-M.patch
@@ -25,7 +25,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -850,19 +850,15 @@ mt7530_set_ageing_time(struct dsa_switch
+@@ -864,19 +864,15 @@ mt7530_set_ageing_time(struct dsa_switch
  	return 0;
  }
  
@@ -52,7 +52,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	}
  }
  
-@@ -879,23 +875,23 @@ static void mt7530_setup_port5(struct ds
+@@ -893,23 +889,23 @@ static void mt7530_setup_port5(struct ds
  	val |= MHWTRAP_MANUAL | MHWTRAP_P5_MAC_SEL | MHWTRAP_P5_DIS;
  	val &= ~MHWTRAP_P5_RGMII_MODE & ~MHWTRAP_PHY0_SEL;
  
@@ -85,7 +85,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		break;
  	}
  
-@@ -923,8 +919,8 @@ static void mt7530_setup_port5(struct ds
+@@ -937,8 +933,8 @@ static void mt7530_setup_port5(struct ds
  
  	mt7530_write(priv, MT7530_MHWTRAP, val);
  
@@ -96,7 +96,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	mutex_unlock(&priv->reg_mutex);
  }
-@@ -2467,13 +2463,11 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2481,13 +2477,11 @@ mt7530_setup(struct dsa_switch *ds)
  	if (ret)
  		return ret;
  
@@ -114,7 +114,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		 */
  		for_each_child_of_node(dn, mac_np) {
  			if (!of_device_is_compatible(mac_np,
-@@ -2497,17 +2491,16 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2511,17 +2505,16 @@ mt7530_setup(struct dsa_switch *ds)
  				}
  				id = of_mdio_parse_addr(ds->dev, phy_node);
  				if (id == 0)
@@ -135,7 +135,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  			mt7530_setup_port5(ds, interface);
  	}
  
-@@ -2645,9 +2638,6 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2659,9 +2652,6 @@ mt7531_setup(struct dsa_switch *ds)
  			   MT7531_EXT_P_MDIO_12);
  	}
  
diff --git a/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch b/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
index 77a2df8586..c8ffd5f07c 100644
--- a/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
+++ b/target/linux/generic/backport-6.1/790-57-v6.10-net-dsa-mt7530-rename-mt753x_bpdu_port_fw-enum-to-mt.patch
@@ -21,7 +21,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1100,42 +1100,34 @@ mt753x_trap_frames(struct mt7530_priv *p
+@@ -1114,42 +1114,34 @@ mt753x_trap_frames(struct mt7530_priv *p
  	 * VLAN-untagged.
  	 */
  	mt7530_rmw(priv, MT753X_BPC,
diff --git a/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch b/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
index 95cdfac02e..c977fe46cd 100644
--- a/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
+++ b/target/linux/generic/backport-6.1/790-58-v6.10-net-dsa-mt7530-refactor-MT7530_MFC-and-MT7531_CFC-ad.patch
@@ -25,7 +25,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1140,7 +1140,7 @@ mt753x_cpu_port_enable(struct dsa_switch
+@@ -1154,7 +1154,7 @@ mt753x_cpu_port_enable(struct dsa_switch
  		     PORT_SPEC_TAG);
  
  	/* Enable flooding on the CPU port */
@@ -33,8 +33,8 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 +	mt7530_set(priv, MT753X_MFC, BC_FFP(BIT(port)) | UNM_FFP(BIT(port)) |
  		   UNU_FFP(BIT(port)));
  
- 	/* Add the CPU port to the CPU port bitmap for MT7531 and the switch on
-@@ -1304,15 +1304,15 @@ mt7530_port_bridge_flags(struct dsa_swit
+ 	/* Add the CPU port to the CPU port bitmap for MT7531. Trapped frames
+@@ -1318,15 +1318,15 @@ mt7530_port_bridge_flags(struct dsa_swit
  			   flags.val & BR_LEARNING ? 0 : SA_DIS);
  
  	if (flags.mask & BR_FLOOD)
@@ -53,7 +53,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  			   flags.val & BR_BCAST_FLOOD ? BC_FFP(BIT(port)) : 0);
  
  	return 0;
-@@ -1848,20 +1848,6 @@ mt7530_port_vlan_del(struct dsa_switch *
+@@ -1862,20 +1862,6 @@ mt7530_port_vlan_del(struct dsa_switch *
  	return 0;
  }
  
@@ -74,7 +74,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  static int mt753x_port_mirror_add(struct dsa_switch *ds, int port,
  				  struct dsa_mall_mirror_tc_entry *mirror,
  				  bool ingress, struct netlink_ext_ack *extack)
-@@ -1877,14 +1863,14 @@ static int mt753x_port_mirror_add(struct
+@@ -1891,14 +1877,14 @@ static int mt753x_port_mirror_add(struct
  	val = mt7530_read(priv, MT753X_MIRROR_REG(priv->id));
  
  	/* MT7530 only supports one monitor port */
@@ -92,7 +92,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	mt7530_write(priv, MT753X_MIRROR_REG(priv->id), val);
  
  	val = mt7530_read(priv, MT7530_PCR_P(port));
-@@ -2524,7 +2510,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2538,7 +2524,7 @@ mt7531_setup_common(struct dsa_switch *d
  	mt7530_mib_reset(ds);
  
  	/* Disable flooding on all ports */
@@ -101,7 +101,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		     UNU_FFP_MASK);
  
  	for (i = 0; i < MT7530_NUM_PORTS; i++) {
-@@ -3086,10 +3072,12 @@ mt753x_conduit_state_change(struct dsa_s
+@@ -3100,10 +3086,12 @@ mt753x_conduit_state_change(struct dsa_s
  	else
  		priv->active_cpu_ports &= ~mask;
  
diff --git a/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch b/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
index d2497d5c90..3c487d21f6 100644
--- a/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
+++ b/target/linux/generic/backport-6.1/790-59-v6.10-net-dsa-mt7530-refactor-MT7530_HWTRAP-and-MT7530_MHW.patch
@@ -30,7 +30,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -403,23 +403,23 @@ mt7530_setup_port6(struct dsa_switch *ds
+@@ -417,23 +417,23 @@ mt7530_setup_port6(struct dsa_switch *ds
  
  	mt7530_rmw(priv, MT7530_P6ECR, P6_INTF_MODE_MASK, P6_INTF_MODE(1));
  
@@ -60,7 +60,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  			ncpo1 = 0x1400;
  	}
  
-@@ -442,19 +442,20 @@ mt7530_setup_port6(struct dsa_switch *ds
+@@ -456,19 +456,20 @@ mt7530_setup_port6(struct dsa_switch *ds
  static void
  mt7531_pll_setup(struct mt7530_priv *priv)
  {
@@ -86,7 +86,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	/* Step 1 : Disable MT7531 COREPLL */
  	val = mt7530_read(priv, MT7531_PLLGP_EN);
-@@ -483,13 +484,13 @@ mt7531_pll_setup(struct mt7530_priv *pri
+@@ -497,13 +498,13 @@ mt7531_pll_setup(struct mt7530_priv *pri
  	usleep_range(25, 35);
  
  	switch (xtal) {
@@ -102,7 +102,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		val = mt7530_read(priv, MT7531_PLLGP_CR0);
  		val &= ~RG_COREPLL_SDM_PCW_M;
  		val |= 0x190000 << RG_COREPLL_SDM_PCW_S;
-@@ -870,20 +871,20 @@ static void mt7530_setup_port5(struct ds
+@@ -884,20 +885,20 @@ static void mt7530_setup_port5(struct ds
  
  	mutex_lock(&priv->reg_mutex);
  
@@ -128,7 +128,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  		/* Setup the MAC by default for the cpu port */
  		mt7530_write(priv, MT753X_PMCR_P(5), 0x56300);
-@@ -891,13 +892,13 @@ static void mt7530_setup_port5(struct ds
+@@ -905,13 +906,13 @@ static void mt7530_setup_port5(struct ds
  
  	/* GMAC5: P5 -> SoC MAC or external PHY */
  	default:
@@ -144,7 +144,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  		/* P5 RGMII RX Clock Control: delay setting for 1000M */
  		mt7530_write(priv, MT7530_P5RGMIIRXCR, CSR_RGMII_EDGE_ALIGN);
-@@ -917,7 +918,7 @@ static void mt7530_setup_port5(struct ds
+@@ -931,7 +932,7 @@ static void mt7530_setup_port5(struct ds
  			     P5_IO_CLK_DRV(1) | P5_IO_DATA_DRV(1));
  	}
  
@@ -153,7 +153,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	dev_dbg(ds->dev, "Setup P5, HWTRAP=0x%x, mode=%s, phy-mode=%s\n", val,
  		mt7530_p5_mode_str(priv->p5_mode), phy_modes(interface));
-@@ -2356,7 +2357,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2370,7 +2371,7 @@ mt7530_setup(struct dsa_switch *ds)
  	}
  
  	/* Waiting for MT7530 got to stable */
@@ -162,7 +162,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	ret = readx_poll_timeout(_mt7530_read, &p, val, val != 0,
  				 20, 1000000);
  	if (ret < 0) {
-@@ -2371,7 +2372,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2385,7 +2386,7 @@ mt7530_setup(struct dsa_switch *ds)
  		return -ENODEV;
  	}
  
@@ -171,7 +171,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		dev_err(priv->dev,
  			"MT7530 with a 20MHz XTAL is not supported!\n");
  		return -EINVAL;
-@@ -2392,12 +2393,12 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2406,12 +2407,12 @@ mt7530_setup(struct dsa_switch *ds)
  			   RD_TAP_MASK, RD_TAP(16));
  
  	/* Enable port 6 */
@@ -189,7 +189,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		mt7530_pll_setup(priv);
  
  	mt753x_trap_frames(priv);
-@@ -2577,7 +2578,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2591,7 +2592,7 @@ mt7531_setup(struct dsa_switch *ds)
  	}
  
  	/* Waiting for MT7530 got to stable */
diff --git a/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch b/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
index e7da939588..cfc38f81d0 100644
--- a/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
+++ b/target/linux/generic/backport-6.1/790-60-v6.10-net-dsa-mt7530-move-MT753X_MTRAP-operations-for-MT75.patch
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -873,8 +873,7 @@ static void mt7530_setup_port5(struct ds
+@@ -887,8 +887,7 @@ static void mt7530_setup_port5(struct ds
  
  	val = mt7530_read(priv, MT753X_MTRAP);
  
@@ -38,7 +38,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	switch (priv->p5_mode) {
  	/* MUX_PHY_P0: P0 -> P5 -> SoC MAC */
-@@ -884,15 +883,13 @@ static void mt7530_setup_port5(struct ds
+@@ -898,15 +897,13 @@ static void mt7530_setup_port5(struct ds
  
  	/* MUX_PHY_P4: P4 -> P5 -> SoC MAC */
  	case MUX_PHY_P4:
@@ -55,7 +55,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		break;
  	}
  
-@@ -1186,6 +1183,14 @@ mt7530_port_enable(struct dsa_switch *ds
+@@ -1200,6 +1197,14 @@ mt7530_port_enable(struct dsa_switch *ds
  
  	mutex_unlock(&priv->reg_mutex);
  
@@ -70,7 +70,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	return 0;
  }
  
-@@ -1204,6 +1209,14 @@ mt7530_port_disable(struct dsa_switch *d
+@@ -1218,6 +1223,14 @@ mt7530_port_disable(struct dsa_switch *d
  		   PCR_MATRIX_CLR);
  
  	mutex_unlock(&priv->reg_mutex);
@@ -85,7 +85,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  }
  
  static int
-@@ -2392,11 +2405,11 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2406,11 +2419,11 @@ mt7530_setup(struct dsa_switch *ds)
  		mt7530_rmw(priv, MT7530_TRGMII_RD(i),
  			   RD_TAP_MASK, RD_TAP(16));
  
@@ -102,7 +102,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	if ((val & MT7530_XTAL_MASK) == MT7530_XTAL_40MHZ)
  		mt7530_pll_setup(priv);
-@@ -2479,8 +2492,11 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2493,8 +2506,11 @@ mt7530_setup(struct dsa_switch *ds)
  			break;
  		}
  
diff --git a/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch b/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
index 7cc145327c..178ac8022f 100644
--- a/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
+++ b/target/linux/generic/backport-6.1/790-61-v6.10-net-dsa-mt7530-return-mt7530_setup_mdio-mt7531_setup.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2658,7 +2658,9 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2672,7 +2672,9 @@ mt7531_setup(struct dsa_switch *ds)
  					 0);
  	}
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	/* Setup VLAN ID 0 for VLAN-unaware bridges */
  	ret = mt7530_setup_vlan0(priv);
-@@ -3017,6 +3019,8 @@ mt753x_setup(struct dsa_switch *ds)
+@@ -3031,6 +3033,8 @@ mt753x_setup(struct dsa_switch *ds)
  	ret = mt7530_setup_mdio(priv);
  	if (ret && priv->irq)
  		mt7530_free_irq_common(priv);
diff --git a/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch b/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
index f4d19db274..af8edf5a42 100644
--- a/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
+++ b/target/linux/generic/backport-6.1/790-62-v6.10-net-dsa-mt7530-define-MAC-speed-capabilities-per-swi.patch
@@ -24,7 +24,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2676,6 +2676,8 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2690,6 +2690,8 @@ mt7531_setup(struct dsa_switch *ds)
  static void mt7530_mac_port_get_caps(struct dsa_switch *ds, int port,
  				     struct phylink_config *config)
  {
@@ -33,7 +33,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2707,6 +2709,8 @@ static void mt7531_mac_port_get_caps(str
+@@ -2721,6 +2723,8 @@ static void mt7531_mac_port_get_caps(str
  {
  	struct mt7530_priv *priv = ds->priv;
  
@@ -42,7 +42,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	switch (port) {
  	/* Ports which are connected to switch PHYs. There is no MII pinout. */
  	case 0 ... 4:
-@@ -2746,14 +2750,17 @@ static void mt7988_mac_port_get_caps(str
+@@ -2760,14 +2764,17 @@ static void mt7988_mac_port_get_caps(str
  	case 0 ... 3:
  		__set_bit(PHY_INTERFACE_MODE_INTERNAL,
  			  config->supported_interfaces);
@@ -62,7 +62,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  	}
  }
  
-@@ -2923,9 +2930,7 @@ static void mt753x_phylink_get_caps(stru
+@@ -2937,9 +2944,7 @@ static void mt753x_phylink_get_caps(stru
  {
  	struct mt7530_priv *priv = ds->priv;
  
diff --git a/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch b/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
index 5bb7756c51..3825952dc3 100644
--- a/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
+++ b/target/linux/generic/backport-6.1/790-63-v6.10-net-dsa-mt7530-get-rid-of-function-sanity-check.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3220,13 +3220,6 @@ mt7530_probe_common(struct mt7530_priv *
+@@ -3235,13 +3235,6 @@ mt7530_probe_common(struct mt7530_priv *
  	if (!priv->info)
  		return -EINVAL;
  
diff --git a/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch b/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
index f8147b6412..df47458014 100644
--- a/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
+++ b/target/linux/generic/backport-6.1/790-64-v6.10-net-dsa-mt7530-refactor-MT7530_PMEEECR_P.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -3048,10 +3048,10 @@ static int mt753x_get_mac_eee(struct dsa
+@@ -3062,10 +3062,10 @@ static int mt753x_get_mac_eee(struct dsa
  			      struct ethtool_eee *e)
  {
  	struct mt7530_priv *priv = ds->priv;
@@ -32,7 +32,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  
  	return 0;
  }
-@@ -3065,11 +3065,11 @@ static int mt753x_set_mac_eee(struct dsa
+@@ -3079,11 +3079,11 @@ static int mt753x_set_mac_eee(struct dsa
  	if (e->tx_lpi_timer > 0xFFF)
  		return -EINVAL;
  
diff --git a/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch b/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
index 0037f97499..e9512421c2 100644
--- a/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
+++ b/target/linux/generic/backport-6.1/790-66-v6.10-net-dsa-mt7530-use-priv-ds-num_ports-instead-of-MT75.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1404,7 +1404,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
+@@ -1418,7 +1418,7 @@ mt7530_port_set_vlan_unaware(struct dsa_
  	mt7530_rmw(priv, MT7530_PPBV1_P(port), G0_PORT_VID_MASK,
  		   G0_PORT_VID_DEF);
  
@@ -28,7 +28,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		if (dsa_is_user_port(ds, i) &&
  		    dsa_port_is_vlan_filtering(dsa_to_port(ds, i))) {
  			all_user_ports_removed = false;
-@@ -2419,7 +2419,7 @@ mt7530_setup(struct dsa_switch *ds)
+@@ -2433,7 +2433,7 @@ mt7530_setup(struct dsa_switch *ds)
  	/* Enable and reset MIB counters */
  	mt7530_mib_reset(ds);
  
@@ -37,7 +37,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2530,7 +2530,7 @@ mt7531_setup_common(struct dsa_switch *d
+@@ -2544,7 +2544,7 @@ mt7531_setup_common(struct dsa_switch *d
  	mt7530_clear(priv, MT753X_MFC, BC_FFP_MASK | UNM_FFP_MASK |
  		     UNU_FFP_MASK);
  
@@ -46,7 +46,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  		/* Clear link settings and enable force mode to force link down
  		 * on all ports until they're enabled later.
  		 */
-@@ -2617,7 +2617,7 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2631,7 +2631,7 @@ mt7531_setup(struct dsa_switch *ds)
  	priv->p5_sgmii = !!(val & PAD_DUAL_SGMII_EN);
  
  	/* Force link down on all ports before internal reset */
diff --git a/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch b/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
index ee8e13ea70..3b3330bdce 100644
--- a/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
+++ b/target/linux/generic/backport-6.1/790-67-v6.10-net-dsa-mt7530-do-not-pass-port-variable-to-mt7531_r.patch
@@ -17,7 +17,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2776,7 +2776,7 @@ mt7530_mac_config(struct dsa_switch *ds,
+@@ -2790,7 +2790,7 @@ mt7530_mac_config(struct dsa_switch *ds,
  		mt7530_setup_port6(priv->ds, interface);
  }
  
@@ -26,7 +26,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
  			       phy_interface_t interface,
  			       struct phy_device *phydev)
  {
-@@ -2827,7 +2827,7 @@ mt7531_mac_config(struct dsa_switch *ds,
+@@ -2841,7 +2841,7 @@ mt7531_mac_config(struct dsa_switch *ds,
  	if (phy_interface_mode_is_rgmii(interface)) {
  		dp = dsa_to_port(ds, port);
  		phydev = dp->slave->phydev;
diff --git a/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch b/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
index 666bcb75e8..6d28e5b5f9 100644
--- a/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
+++ b/target/linux/generic/backport-6.1/790-68-v6.10-net-dsa-mt7530-explain-exposing-MDIO-bus-of-MT7531AE.patch
@@ -19,7 +19,7 @@ Signed-off-by: Ar?n? ?NAL <arinc.unal at arinc9.com>
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -2626,7 +2626,10 @@ mt7531_setup(struct dsa_switch *ds)
+@@ -2640,7 +2640,10 @@ mt7531_setup(struct dsa_switch *ds)
  	if (!priv->p5_sgmii) {
  		mt7531_pll_setup(priv);
  	} else {
diff --git a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch
index dfbe88e8e6..2729a0ec38 100644
--- a/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-6.1/780-usb-net-MeigLink_modem_support.patch
@@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1152,6 +1157,11 @@ static const struct usb_device_id option
+@@ -1156,6 +1161,11 @@ static const struct usb_device_id option
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  	  .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  	/* Quectel products using Qualcomm vendor ID */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1193,6 +1203,11 @@ static const struct usb_device_id option
+@@ -1197,6 +1207,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/pending-6.1/150-bridge_allow_receiption_on_disabled_port.patch b/target/linux/generic/pending-6.1/150-bridge_allow_receiption_on_disabled_port.patch
index 93a2d146b5..ac4a3138a5 100644
--- a/target/linux/generic/pending-6.1/150-bridge_allow_receiption_on_disabled_port.patch
+++ b/target/linux/generic/pending-6.1/150-bridge_allow_receiption_on_disabled_port.patch
@@ -15,7 +15,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -222,6 +222,9 @@ static void __br_handle_local_finish(str
+@@ -227,6 +227,9 @@ static void __br_handle_local_finish(str
  /* note: already called with rcu_read_lock */
  static int br_handle_local_finish(struct net *net, struct sock *sk, struct sk_buff *skb)
  {
@@ -25,7 +25,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  	__br_handle_local_finish(skb);
  
  	/* return 1 to signal the okfn() was called so it's ok to use the skb */
-@@ -390,6 +393,17 @@ forward:
+@@ -397,6 +400,17 @@ forward:
  		goto defer_stp_filtering;
  
  	switch (p->state) {
diff --git a/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch
index 56d62ab8e2..0ab89564ee 100644
--- a/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-6.1/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1225,12 +1262,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1227,12 +1264,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index fb6eb73232..9f8c3d6ff5 100644
--- a/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-6.1/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -7951,7 +7951,7 @@ static int nft_register_flowtable_net_ho
+@@ -7959,7 +7959,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch b/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
index 989aca8f35..20d1c13045 100644
--- a/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
+++ b/target/linux/generic/pending-6.1/710-bridge-add-knob-for-filtering-rx-tx-BPDU-pack.patch
@@ -45,7 +45,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  			if (!(p->flags & BR_BCAST_FLOOD) && skb->dev != br->dev)
 --- a/net/bridge/br_input.c
 +++ b/net/bridge/br_input.c
-@@ -344,6 +344,8 @@ static rx_handler_result_t br_handle_fra
+@@ -349,6 +349,8 @@ static rx_handler_result_t br_handle_fra
  		fwd_mask |= p->group_fwd_mask;
  		switch (dest[5]) {
  		case 0x00:	/* Bridge Group Address */
diff --git a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
index da3fd7cbe1..04d8c8760f 100644
--- a/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
+++ b/target/linux/generic/pending-6.1/795-01-net-dsa-mt7530-do-not-set-MT7530_P5_DIS-when-PHY-.patch
@@ -68,7 +68,7 @@ Best regards,
 
 --- a/drivers/net/dsa/mt7530.c
 +++ b/drivers/net/dsa/mt7530.c
-@@ -1213,7 +1213,7 @@ mt7530_port_disable(struct dsa_switch *d
+@@ -1227,7 +1227,7 @@ mt7530_port_disable(struct dsa_switch *d
  	if (priv->id != ID_MT7530 && priv->id != ID_MT7621)
  		return;
  
diff --git a/target/linux/generic/pending-6.1/811-pci_disable_usb_common_quirks.patch b/target/linux/generic/pending-6.1/811-pci_disable_usb_common_quirks.patch
index 98ea4c06d9..fcb77e5174 100644
--- a/target/linux/generic/pending-6.1/811-pci_disable_usb_common_quirks.patch
+++ b/target/linux/generic/pending-6.1/811-pci_disable_usb_common_quirks.patch
@@ -19,7 +19,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static struct amd_chipset_info {
  	struct pci_dev	*nb_dev;
  	struct pci_dev	*smbus_dev;
-@@ -633,6 +635,10 @@ bool usb_amd_pt_check_port(struct device
+@@ -631,6 +633,10 @@ bool usb_amd_pt_check_port(struct device
  }
  EXPORT_SYMBOL_GPL(usb_amd_pt_check_port);
  
@@ -30,7 +30,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  /*
   * Make sure the controller is completely inactive, unable to
   * generate interrupts or do DMA.
-@@ -712,8 +718,17 @@ reset_needed:
+@@ -710,8 +716,17 @@ reset_needed:
  	uhci_reset_hc(pdev, base);
  	return 1;
  }
@@ -48,7 +48,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  static inline int io_type_enabled(struct pci_dev *pdev, unsigned int mask)
  {
  	u16 cmd;
-@@ -1285,3 +1300,4 @@ static void quirk_usb_early_handoff(stru
+@@ -1283,3 +1298,4 @@ static void quirk_usb_early_handoff(stru
  }
  DECLARE_PCI_FIXUP_CLASS_FINAL(PCI_ANY_ID, PCI_ANY_ID,
  			PCI_CLASS_SERIAL_USB, 8, quirk_usb_early_handoff);
@@ -98,7 +98,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  #endif  /*  __LINUX_USB_PCI_QUIRKS_H  */
 --- a/include/linux/usb/hcd.h
 +++ b/include/linux/usb/hcd.h
-@@ -483,7 +483,14 @@ extern int usb_hcd_pci_probe(struct pci_
+@@ -484,7 +484,14 @@ extern int usb_hcd_pci_probe(struct pci_
  extern void usb_hcd_pci_remove(struct pci_dev *dev);
  extern void usb_hcd_pci_shutdown(struct pci_dev *dev);
  
diff --git a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch
index 76e3f2544d..ca36d0ccab 100644
--- a/target/linux/generic/pending-6.1/920-mangle_bootargs.patch
+++ b/target/linux/generic/pending-6.1/920-mangle_bootargs.patch
@@ -61,7 +61,7 @@ Signed-off-by: Imre Kaloz <kaloz at openwrt.org>
  /*
   * We need to store the untouched command line for future reference.
   * We also need to store the touched command line since the parameter
-@@ -959,6 +982,7 @@ asmlinkage __visible void __init __no_sa
+@@ -961,6 +984,7 @@ asmlinkage __visible void __init __no_sa
  	pr_notice("%s", linux_banner);
  	early_security_init();
  	setup_arch(&command_line);
diff --git a/target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch b/target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch
deleted file mode 100644
index af5715e1f5..0000000000
--- a/target/linux/mediatek/patches-6.1/220-v6.3-clk-mediatek-clk-gate-Propagate-struct-device-with-m.patch
+++ /dev/null
@@ -1,536 +0,0 @@
-From fe5c8d03f3de89ae058e365b783f8c1314f47490 Mon Sep 17 00:00:00 2001
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Date: Fri, 20 Jan 2023 10:20:33 +0100
-Subject: [PATCH 01/15] clk: mediatek: clk-gate: Propagate struct device with
- mtk_clk_register_gates()
-
-Commit e4c23e19aa2a ("clk: mediatek: Register clock gate with device")
-introduces a helper function for the sole purpose of propagating a
-struct device pointer to the clk API when registering the mtk-gate
-clocks to take advantage of Runtime PM when/where needed and where
-a power domain is defined in devicetree.
-
-Function mtk_clk_register_gates() then becomes a wrapper around the
-new mtk_clk_register_gates_with_dev() function that will simply pass
-NULL as struct device: this is essential when registering drivers
-with CLK_OF_DECLARE instead of as a platform device, as there will
-be no struct device to pass... but we can as well simply have only
-one function that always takes such pointer as a param and pass NULL
-when unavoidable.
-
-This commit removes the mtk_clk_register_gates() wrapper and renames
-mtk_clk_register_gates_with_dev() to the former and all of the calls
-to either of the two functions were fixed in all drivers in order to
-reflect this change; also, to improve consistency with other kernel
-functions, the pointer to struct device was moved as the first param.
-
-Since a lot of MediaTek clock drivers are actually registering as a
-platform device, but were still registering the mtk-gate clocks
-without passing any struct device to the clock framework, they've
-been changed to pass a valid one now, as to make all those platforms
-able to use runtime power management where available.
-
-While at it, some much needed indentation changes were also done.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Reviewed-by: Chen-Yu Tsai <wenst at chromium.org>
-Reviewed-by: Markus Schneider-Pargmann <msp at baylibre.com>
-Tested-by: Miles Chen <miles.chen at mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-4-angelogioacchino.delregno at collabora.com
-Tested-by: Mingming Su <mingming.su at mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
-
-[daniel at makrotopia.org: dropped parts not relevant for OpenWrt]
----
- drivers/clk/mediatek/clk-gate.c            | 23 +++++++---------------
- drivers/clk/mediatek/clk-gate.h            |  7 +------
- drivers/clk/mediatek/clk-mt2701-aud.c      |  4 ++--
- drivers/clk/mediatek/clk-mt2701-eth.c      |  4 ++--
- drivers/clk/mediatek/clk-mt2701-g3d.c      |  2 +-
- drivers/clk/mediatek/clk-mt2701-hif.c      |  4 ++--
- drivers/clk/mediatek/clk-mt2701-mm.c       |  4 ++--
- drivers/clk/mediatek/clk-mt2701.c          | 12 +++++------
- drivers/clk/mediatek/clk-mt2712-mm.c       |  4 ++--
- drivers/clk/mediatek/clk-mt2712.c          | 12 +++++------
- drivers/clk/mediatek/clk-mt7622-aud.c      |  4 ++--
- drivers/clk/mediatek/clk-mt7622-eth.c      |  8 ++++----
- drivers/clk/mediatek/clk-mt7622-hif.c      |  8 ++++----
- drivers/clk/mediatek/clk-mt7622.c          | 14 ++++++-------
- drivers/clk/mediatek/clk-mt7629-eth.c      |  7 ++++---
- drivers/clk/mediatek/clk-mt7629-hif.c      |  8 ++++----
- drivers/clk/mediatek/clk-mt7629.c          | 10 +++++-----
- drivers/clk/mediatek/clk-mt7986-eth.c      | 10 +++++-----
- drivers/clk/mediatek/clk-mt7986-infracfg.c |  4 ++--
- 19 files changed, 68 insertions(+), 81 deletions(-)
-
---- a/drivers/clk/mediatek/clk-gate.c
-+++ b/drivers/clk/mediatek/clk-gate.c
-@@ -152,12 +152,12 @@ const struct clk_ops mtk_clk_gate_ops_no
- };
- EXPORT_SYMBOL_GPL(mtk_clk_gate_ops_no_setclr_inv);
- 
--static struct clk_hw *mtk_clk_register_gate(const char *name,
-+static struct clk_hw *mtk_clk_register_gate(struct device *dev, const char *name,
- 					 const char *parent_name,
- 					 struct regmap *regmap, int set_ofs,
- 					 int clr_ofs, int sta_ofs, u8 bit,
- 					 const struct clk_ops *ops,
--					 unsigned long flags, struct device *dev)
-+					 unsigned long flags)
- {
- 	struct mtk_clk_gate *cg;
- 	int ret;
-@@ -202,10 +202,9 @@ static void mtk_clk_unregister_gate(stru
- 	kfree(cg);
- }
- 
--int mtk_clk_register_gates_with_dev(struct device_node *node,
--				    const struct mtk_gate *clks, int num,
--				    struct clk_hw_onecell_data *clk_data,
--				    struct device *dev)
-+int mtk_clk_register_gates(struct device *dev, struct device_node *node,
-+			   const struct mtk_gate *clks, int num,
-+			   struct clk_hw_onecell_data *clk_data)
- {
- 	int i;
- 	struct clk_hw *hw;
-@@ -229,13 +228,13 @@ int mtk_clk_register_gates_with_dev(stru
- 			continue;
- 		}
- 
--		hw = mtk_clk_register_gate(gate->name, gate->parent_name,
-+		hw = mtk_clk_register_gate(dev, gate->name, gate->parent_name,
- 					    regmap,
- 					    gate->regs->set_ofs,
- 					    gate->regs->clr_ofs,
- 					    gate->regs->sta_ofs,
- 					    gate->shift, gate->ops,
--					    gate->flags, dev);
-+					    gate->flags);
- 
- 		if (IS_ERR(hw)) {
- 			pr_err("Failed to register clk %s: %pe\n", gate->name,
-@@ -261,14 +260,6 @@ err:
- 
- 	return PTR_ERR(hw);
- }
--EXPORT_SYMBOL_GPL(mtk_clk_register_gates_with_dev);
--
--int mtk_clk_register_gates(struct device_node *node,
--			   const struct mtk_gate *clks, int num,
--			   struct clk_hw_onecell_data *clk_data)
--{
--	return mtk_clk_register_gates_with_dev(node, clks, num, clk_data, NULL);
--}
- EXPORT_SYMBOL_GPL(mtk_clk_register_gates);
- 
- void mtk_clk_unregister_gates(const struct mtk_gate *clks, int num,
---- a/drivers/clk/mediatek/clk-gate.h
-+++ b/drivers/clk/mediatek/clk-gate.h
-@@ -50,15 +50,10 @@ struct mtk_gate {
- #define GATE_MTK(_id, _name, _parent, _regs, _shift, _ops)		\
- 	GATE_MTK_FLAGS(_id, _name, _parent, _regs, _shift, _ops, 0)
- 
--int mtk_clk_register_gates(struct device_node *node,
-+int mtk_clk_register_gates(struct device *dev, struct device_node *node,
- 			   const struct mtk_gate *clks, int num,
- 			   struct clk_hw_onecell_data *clk_data);
- 
--int mtk_clk_register_gates_with_dev(struct device_node *node,
--				    const struct mtk_gate *clks, int num,
--				    struct clk_hw_onecell_data *clk_data,
--				    struct device *dev);
--
- void mtk_clk_unregister_gates(const struct mtk_gate *clks, int num,
- 			      struct clk_hw_onecell_data *clk_data);
- 
---- a/drivers/clk/mediatek/clk-mt2701-aud.c
-+++ b/drivers/clk/mediatek/clk-mt2701-aud.c
-@@ -127,8 +127,8 @@ static int clk_mt2701_aud_probe(struct p
- 
- 	clk_data = mtk_alloc_clk_data(CLK_AUD_NR);
- 
--	mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, audio_clks,
-+			       ARRAY_SIZE(audio_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r) {
---- a/drivers/clk/mediatek/clk-mt2701-eth.c
-+++ b/drivers/clk/mediatek/clk-mt2701-eth.c
-@@ -51,8 +51,8 @@ static int clk_mt2701_eth_probe(struct p
- 
- 	clk_data = mtk_alloc_clk_data(CLK_ETHSYS_NR);
- 
--	mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks),
--						clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, eth_clks,
-+			       ARRAY_SIZE(eth_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
---- a/drivers/clk/mediatek/clk-mt2701-g3d.c
-+++ b/drivers/clk/mediatek/clk-mt2701-g3d.c
-@@ -45,7 +45,7 @@ static int clk_mt2701_g3dsys_init(struct
- 
- 	clk_data = mtk_alloc_clk_data(CLK_G3DSYS_NR);
- 
--	mtk_clk_register_gates(node, g3d_clks, ARRAY_SIZE(g3d_clks),
-+	mtk_clk_register_gates(&pdev->dev, node, g3d_clks, ARRAY_SIZE(g3d_clks),
- 			       clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
---- a/drivers/clk/mediatek/clk-mt2701-hif.c
-+++ b/drivers/clk/mediatek/clk-mt2701-hif.c
-@@ -48,8 +48,8 @@ static int clk_mt2701_hif_probe(struct p
- 
- 	clk_data = mtk_alloc_clk_data(CLK_HIFSYS_NR);
- 
--	mtk_clk_register_gates(node, hif_clks, ARRAY_SIZE(hif_clks),
--						clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, hif_clks,
-+			       ARRAY_SIZE(hif_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r) {
---- a/drivers/clk/mediatek/clk-mt2701-mm.c
-+++ b/drivers/clk/mediatek/clk-mt2701-mm.c
-@@ -76,8 +76,8 @@ static int clk_mt2701_mm_probe(struct pl
- 
- 	clk_data = mtk_alloc_clk_data(CLK_MM_NR);
- 
--	mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks),
--						clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+			       ARRAY_SIZE(mm_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
---- a/drivers/clk/mediatek/clk-mt2701.c
-+++ b/drivers/clk/mediatek/clk-mt2701.c
-@@ -685,8 +685,8 @@ static int mtk_topckgen_init(struct plat
- 	mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
- 				base, &mt2701_clk_lock, clk_data);
- 
--	mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
--						clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+			       ARRAY_SIZE(top_clks), clk_data);
- 
- 	return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-@@ -789,8 +789,8 @@ static int mtk_infrasys_init(struct plat
- 		}
- 	}
- 
--	mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--						infra_clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+			       ARRAY_SIZE(infra_clks), infra_clk_data);
- 	mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs),
- 						infra_clk_data);
- 
-@@ -902,8 +902,8 @@ static int mtk_pericfg_init(struct platf
- 	if (!clk_data)
- 		return -ENOMEM;
- 
--	mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--						clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+			       ARRAY_SIZE(peri_clks), clk_data);
- 
- 	mtk_clk_register_composites(peri_muxs, ARRAY_SIZE(peri_muxs), base,
- 			&mt2701_clk_lock, clk_data);
---- a/drivers/clk/mediatek/clk-mt2712-mm.c
-+++ b/drivers/clk/mediatek/clk-mt2712-mm.c
-@@ -117,8 +117,8 @@ static int clk_mt2712_mm_probe(struct pl
- 
- 	clk_data = mtk_alloc_clk_data(CLK_MM_NR_CLK);
- 
--	mtk_clk_register_gates(node, mm_clks, ARRAY_SIZE(mm_clks),
--			clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, mm_clks,
-+			       ARRAY_SIZE(mm_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 
---- a/drivers/clk/mediatek/clk-mt2712.c
-+++ b/drivers/clk/mediatek/clk-mt2712.c
-@@ -1324,8 +1324,8 @@ static int clk_mt2712_top_probe(struct p
- 			&mt2712_clk_lock, top_clk_data);
- 	mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), base,
- 			&mt2712_clk_lock, top_clk_data);
--	mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
--			top_clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+			       ARRAY_SIZE(top_clks), top_clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, top_clk_data);
- 
-@@ -1344,8 +1344,8 @@ static int clk_mt2712_infra_probe(struct
- 
- 	clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
- 
--	mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--			clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+			       ARRAY_SIZE(infra_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 
-@@ -1366,8 +1366,8 @@ static int clk_mt2712_peri_probe(struct
- 
- 	clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
- 
--	mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--			clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+			       ARRAY_SIZE(peri_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 
---- a/drivers/clk/mediatek/clk-mt7622-aud.c
-+++ b/drivers/clk/mediatek/clk-mt7622-aud.c
-@@ -114,8 +114,8 @@ static int clk_mt7622_audiosys_init(stru
- 
- 	clk_data = mtk_alloc_clk_data(CLK_AUDIO_NR_CLK);
- 
--	mtk_clk_register_gates(node, audio_clks, ARRAY_SIZE(audio_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, audio_clks,
-+			       ARRAY_SIZE(audio_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r) {
---- a/drivers/clk/mediatek/clk-mt7622-eth.c
-+++ b/drivers/clk/mediatek/clk-mt7622-eth.c
-@@ -69,8 +69,8 @@ static int clk_mt7622_ethsys_init(struct
- 
- 	clk_data = mtk_alloc_clk_data(CLK_ETH_NR_CLK);
- 
--	mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, eth_clks,
-+			       ARRAY_SIZE(eth_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
-@@ -91,8 +91,8 @@ static int clk_mt7622_sgmiisys_init(stru
- 
- 	clk_data = mtk_alloc_clk_data(CLK_SGMII_NR_CLK);
- 
--	mtk_clk_register_gates(node, sgmii_clks, ARRAY_SIZE(sgmii_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, sgmii_clks,
-+			       ARRAY_SIZE(sgmii_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
---- a/drivers/clk/mediatek/clk-mt7622-hif.c
-+++ b/drivers/clk/mediatek/clk-mt7622-hif.c
-@@ -80,8 +80,8 @@ static int clk_mt7622_ssusbsys_init(stru
- 
- 	clk_data = mtk_alloc_clk_data(CLK_SSUSB_NR_CLK);
- 
--	mtk_clk_register_gates(node, ssusb_clks, ARRAY_SIZE(ssusb_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, ssusb_clks,
-+			       ARRAY_SIZE(ssusb_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
-@@ -102,8 +102,8 @@ static int clk_mt7622_pciesys_init(struc
- 
- 	clk_data = mtk_alloc_clk_data(CLK_PCIE_NR_CLK);
- 
--	mtk_clk_register_gates(node, pcie_clks, ARRAY_SIZE(pcie_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, pcie_clks,
-+			       ARRAY_SIZE(pcie_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
---- a/drivers/clk/mediatek/clk-mt7622.c
-+++ b/drivers/clk/mediatek/clk-mt7622.c
-@@ -621,8 +621,8 @@ static int mtk_topckgen_init(struct plat
- 	mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
- 				  base, &mt7622_clk_lock, clk_data);
- 
--	mtk_clk_register_gates(node, top_clks, ARRAY_SIZE(top_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, top_clks,
-+			       ARRAY_SIZE(top_clks), clk_data);
- 
- 	return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- }
-@@ -635,8 +635,8 @@ static int mtk_infrasys_init(struct plat
- 
- 	clk_data = mtk_alloc_clk_data(CLK_INFRA_NR_CLK);
- 
--	mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+			       ARRAY_SIZE(infra_clks), clk_data);
- 
- 	mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes),
- 				  clk_data);
-@@ -663,7 +663,7 @@ static int mtk_apmixedsys_init(struct pl
- 	mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls),
- 			      clk_data);
- 
--	mtk_clk_register_gates(node, apmixed_clks,
-+	mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
- 			       ARRAY_SIZE(apmixed_clks), clk_data);
- 
- 	return of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
-@@ -682,8 +682,8 @@ static int mtk_pericfg_init(struct platf
- 
- 	clk_data = mtk_alloc_clk_data(CLK_PERI_NR_CLK);
- 
--	mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+			       ARRAY_SIZE(peri_clks), clk_data);
- 
- 	mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
- 				    &mt7622_clk_lock, clk_data);
---- a/drivers/clk/mediatek/clk-mt7629-eth.c
-+++ b/drivers/clk/mediatek/clk-mt7629-eth.c
-@@ -82,7 +82,8 @@ static int clk_mt7629_ethsys_init(struct
- 	if (!clk_data)
- 		return -ENOMEM;
- 
--	mtk_clk_register_gates(node, eth_clks, CLK_ETH_NR_CLK, clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, eth_clks,
-+			       CLK_ETH_NR_CLK, clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
-@@ -106,8 +107,8 @@ static int clk_mt7629_sgmiisys_init(stru
- 	if (!clk_data)
- 		return -ENOMEM;
- 
--	mtk_clk_register_gates(node, sgmii_clks[id++], CLK_SGMII_NR_CLK,
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, sgmii_clks[id++],
-+			       CLK_SGMII_NR_CLK, clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
---- a/drivers/clk/mediatek/clk-mt7629-hif.c
-+++ b/drivers/clk/mediatek/clk-mt7629-hif.c
-@@ -75,8 +75,8 @@ static int clk_mt7629_ssusbsys_init(stru
- 
- 	clk_data = mtk_alloc_clk_data(CLK_SSUSB_NR_CLK);
- 
--	mtk_clk_register_gates(node, ssusb_clks, ARRAY_SIZE(ssusb_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, ssusb_clks,
-+			       ARRAY_SIZE(ssusb_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
-@@ -97,8 +97,8 @@ static int clk_mt7629_pciesys_init(struc
- 
- 	clk_data = mtk_alloc_clk_data(CLK_PCIE_NR_CLK);
- 
--	mtk_clk_register_gates(node, pcie_clks, ARRAY_SIZE(pcie_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, pcie_clks,
-+			       ARRAY_SIZE(pcie_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
---- a/drivers/clk/mediatek/clk-mt7629.c
-+++ b/drivers/clk/mediatek/clk-mt7629.c
-@@ -585,8 +585,8 @@ static int mtk_infrasys_init(struct plat
- 	if (!clk_data)
- 		return -ENOMEM;
- 
--	mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+			       ARRAY_SIZE(infra_clks), clk_data);
- 
- 	mtk_clk_register_cpumuxes(node, infra_muxes, ARRAY_SIZE(infra_muxes),
- 				  clk_data);
-@@ -610,8 +610,8 @@ static int mtk_pericfg_init(struct platf
- 	if (!clk_data)
- 		return -ENOMEM;
- 
--	mtk_clk_register_gates(node, peri_clks, ARRAY_SIZE(peri_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, peri_clks,
-+			       ARRAY_SIZE(peri_clks), clk_data);
- 
- 	mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
- 				    &mt7629_clk_lock, clk_data);
-@@ -637,7 +637,7 @@ static int mtk_apmixedsys_init(struct pl
- 	mtk_clk_register_plls(node, plls, ARRAY_SIZE(plls),
- 			      clk_data);
- 
--	mtk_clk_register_gates(node, apmixed_clks,
-+	mtk_clk_register_gates(&pdev->dev, node, apmixed_clks,
- 			       ARRAY_SIZE(apmixed_clks), clk_data);
- 
- 	clk_prepare_enable(clk_data->hws[CLK_APMIXED_ARMPLL]->clk);
---- a/drivers/clk/mediatek/clk-mt7986-eth.c
-+++ b/drivers/clk/mediatek/clk-mt7986-eth.c
-@@ -72,8 +72,8 @@ static void __init mtk_sgmiisys_0_init(s
- 
- 	clk_data = mtk_alloc_clk_data(ARRAY_SIZE(sgmii0_clks));
- 
--	mtk_clk_register_gates(node, sgmii0_clks, ARRAY_SIZE(sgmii0_clks),
--			       clk_data);
-+	mtk_clk_register_gates(NULL, node, sgmii0_clks,
-+			       ARRAY_SIZE(sgmii0_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
-@@ -90,8 +90,8 @@ static void __init mtk_sgmiisys_1_init(s
- 
- 	clk_data = mtk_alloc_clk_data(ARRAY_SIZE(sgmii1_clks));
- 
--	mtk_clk_register_gates(node, sgmii1_clks, ARRAY_SIZE(sgmii1_clks),
--			       clk_data);
-+	mtk_clk_register_gates(NULL, node, sgmii1_clks,
-+			       ARRAY_SIZE(sgmii1_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 
-@@ -109,7 +109,7 @@ static void __init mtk_ethsys_init(struc
- 
- 	clk_data = mtk_alloc_clk_data(ARRAY_SIZE(eth_clks));
- 
--	mtk_clk_register_gates(node, eth_clks, ARRAY_SIZE(eth_clks), clk_data);
-+	mtk_clk_register_gates(NULL, node, eth_clks, ARRAY_SIZE(eth_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 
---- a/drivers/clk/mediatek/clk-mt7986-infracfg.c
-+++ b/drivers/clk/mediatek/clk-mt7986-infracfg.c
-@@ -180,8 +180,8 @@ static int clk_mt7986_infracfg_probe(str
- 	mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data);
- 	mtk_clk_register_muxes(infra_muxes, ARRAY_SIZE(infra_muxes), node,
- 			       &mt7986_clk_lock, clk_data);
--	mtk_clk_register_gates(node, infra_clks, ARRAY_SIZE(infra_clks),
--			       clk_data);
-+	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
-+			       ARRAY_SIZE(infra_clks), clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r) {
---- a/drivers/clk/mediatek/clk-mtk.c
-+++ b/drivers/clk/mediatek/clk-mtk.c
-@@ -459,8 +459,8 @@ int mtk_clk_simple_probe(struct platform
- 	if (!clk_data)
- 		return -ENOMEM;
- 
--	r = mtk_clk_register_gates_with_dev(node, mcd->clks, mcd->num_clks,
--					    clk_data, &pdev->dev);
-+	r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks, mcd->num_clks,
-+				   clk_data);
- 	if (r)
- 		goto free_data;
- 
diff --git a/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch b/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch
index 223155c59b..c7f37718af 100644
--- a/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch
+++ b/target/linux/mediatek/patches-6.1/221-v6.3-clk-mediatek-cpumux-Propagate-struct-device-where-po.patch
@@ -78,7 +78,7 @@ Signed-off-by: Stephen Boyd <sboyd at kernel.org>
  
 --- a/drivers/clk/mediatek/clk-mt2701.c
 +++ b/drivers/clk/mediatek/clk-mt2701.c
-@@ -761,7 +761,7 @@ static void __init mtk_infrasys_init_ear
+@@ -762,7 +762,7 @@ static void __init mtk_infrasys_init_ear
  	mtk_clk_register_factors(infra_fixed_divs, ARRAY_SIZE(infra_fixed_divs),
  						infra_clk_data);
  
@@ -89,7 +89,7 @@ Signed-off-by: Stephen Boyd <sboyd at kernel.org>
  	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get,
 --- a/drivers/clk/mediatek/clk-mt6795-infracfg.c
 +++ b/drivers/clk/mediatek/clk-mt6795-infracfg.c
-@@ -105,7 +105,8 @@ static int clk_mt6795_infracfg_probe(str
+@@ -106,7 +106,8 @@ static int clk_mt6795_infracfg_probe(str
  	if (ret)
  		goto free_clk_data;
  
@@ -101,7 +101,7 @@ Signed-off-by: Stephen Boyd <sboyd at kernel.org>
  
 --- a/drivers/clk/mediatek/clk-mt7622.c
 +++ b/drivers/clk/mediatek/clk-mt7622.c
-@@ -638,8 +638,8 @@ static int mtk_infrasys_init(struct plat
+@@ -639,8 +639,8 @@ static int mtk_infrasys_init(struct plat
  	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
  			       ARRAY_SIZE(infra_clks), clk_data);
  
@@ -114,7 +114,7 @@ Signed-off-by: Stephen Boyd <sboyd at kernel.org>
  				   clk_data);
 --- a/drivers/clk/mediatek/clk-mt7629.c
 +++ b/drivers/clk/mediatek/clk-mt7629.c
-@@ -588,8 +588,8 @@ static int mtk_infrasys_init(struct plat
+@@ -589,8 +589,8 @@ static int mtk_infrasys_init(struct plat
  	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
  			       ARRAY_SIZE(infra_clks), clk_data);
  
@@ -127,8 +127,8 @@ Signed-off-by: Stephen Boyd <sboyd at kernel.org>
  				      clk_data);
 --- a/drivers/clk/mediatek/clk-mt8173.c
 +++ b/drivers/clk/mediatek/clk-mt8173.c
-@@ -892,8 +892,8 @@ static void __init mtk_infrasys_init(str
- 						clk_data);
+@@ -893,8 +893,8 @@ static void __init mtk_infrasys_init(str
+ 			       ARRAY_SIZE(infra_clks), clk_data);
  	mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data);
  
 -	mtk_clk_register_cpumuxes(node, cpu_muxes, ARRAY_SIZE(cpu_muxes),
diff --git a/target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch b/target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch
deleted file mode 100644
index eca1b614cd..0000000000
--- a/target/linux/mediatek/patches-6.1/222-v6.3-clk-mediatek-clk-mtk-Propagate-struct-device-for-com.patch
+++ /dev/null
@@ -1,181 +0,0 @@
-From f23375db001ec0fe9f565be75eff43adde15407e Mon Sep 17 00:00:00 2001
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Date: Fri, 20 Jan 2023 10:20:35 +0100
-Subject: [PATCH 03/15] clk: mediatek: clk-mtk: Propagate struct device for
- composites
-
-Like done for cpumux clocks, propagate struct device for composite
-clocks registered through clk-mtk helpers to be able to get runtime
-pm support for MTK clocks.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Tested-by: Miles Chen <miles.chen at mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-6-angelogioacchino.delregno at collabora.com
-Tested-by: Mingming Su <mingming.su at mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
-
-[daniel at makrotopia.org: remove parts not relevant for OpenWrt]
----
- drivers/clk/mediatek/clk-mt2701.c | 10 ++++++----
- drivers/clk/mediatek/clk-mt2712.c | 12 ++++++++----
- drivers/clk/mediatek/clk-mt7622.c |  8 +++++---
- drivers/clk/mediatek/clk-mt7629.c |  8 +++++---
- drivers/clk/mediatek/clk-mtk.c    | 11 ++++++-----
- drivers/clk/mediatek/clk-mtk.h    |  3 ++-
- 6 files changed, 32 insertions(+), 20 deletions(-)
-
---- a/drivers/clk/mediatek/clk-mt2701.c
-+++ b/drivers/clk/mediatek/clk-mt2701.c
-@@ -679,8 +679,9 @@ static int mtk_topckgen_init(struct plat
- 	mtk_clk_register_factors(top_fixed_divs, ARRAY_SIZE(top_fixed_divs),
- 								clk_data);
- 
--	mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes),
--				base, &mt2701_clk_lock, clk_data);
-+	mtk_clk_register_composites(&pdev->dev, top_muxes,
-+				    ARRAY_SIZE(top_muxes), base,
-+				    &mt2701_clk_lock, clk_data);
- 
- 	mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
- 				base, &mt2701_clk_lock, clk_data);
-@@ -905,8 +906,9 @@ static int mtk_pericfg_init(struct platf
- 	mtk_clk_register_gates(&pdev->dev, node, peri_clks,
- 			       ARRAY_SIZE(peri_clks), clk_data);
- 
--	mtk_clk_register_composites(peri_muxs, ARRAY_SIZE(peri_muxs), base,
--			&mt2701_clk_lock, clk_data);
-+	mtk_clk_register_composites(&pdev->dev, peri_muxs,
-+				    ARRAY_SIZE(peri_muxs), base,
-+				    &mt2701_clk_lock, clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
---- a/drivers/clk/mediatek/clk-mt2712.c
-+++ b/drivers/clk/mediatek/clk-mt2712.c
-@@ -1320,8 +1320,9 @@ static int clk_mt2712_top_probe(struct p
- 	mtk_clk_register_factors(top_early_divs, ARRAY_SIZE(top_early_divs),
- 			top_clk_data);
- 	mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), top_clk_data);
--	mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes), base,
--			&mt2712_clk_lock, top_clk_data);
-+	mtk_clk_register_composites(&pdev->dev, top_muxes,
-+				    ARRAY_SIZE(top_muxes), base,
-+				    &mt2712_clk_lock, top_clk_data);
- 	mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs), base,
- 			&mt2712_clk_lock, top_clk_data);
- 	mtk_clk_register_gates(&pdev->dev, node, top_clks,
-@@ -1395,8 +1396,11 @@ static int clk_mt2712_mcu_probe(struct p
- 
- 	clk_data = mtk_alloc_clk_data(CLK_MCU_NR_CLK);
- 
--	mtk_clk_register_composites(mcu_muxes, ARRAY_SIZE(mcu_muxes), base,
--			&mt2712_clk_lock, clk_data);
-+	r = mtk_clk_register_composites(&pdev->dev, mcu_muxes,
-+					ARRAY_SIZE(mcu_muxes), base,
-+					&mt2712_clk_lock, clk_data);
-+	if (r)
-+		dev_err(&pdev->dev, "Could not register composites: %d\n", r);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 
---- a/drivers/clk/mediatek/clk-mt7622.c
-+++ b/drivers/clk/mediatek/clk-mt7622.c
-@@ -615,8 +615,9 @@ static int mtk_topckgen_init(struct plat
- 	mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs),
- 				 clk_data);
- 
--	mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes),
--				    base, &mt7622_clk_lock, clk_data);
-+	mtk_clk_register_composites(&pdev->dev, top_muxes,
-+				    ARRAY_SIZE(top_muxes), base,
-+				    &mt7622_clk_lock, clk_data);
- 
- 	mtk_clk_register_dividers(top_adj_divs, ARRAY_SIZE(top_adj_divs),
- 				  base, &mt7622_clk_lock, clk_data);
-@@ -685,7 +686,8 @@ static int mtk_pericfg_init(struct platf
- 	mtk_clk_register_gates(&pdev->dev, node, peri_clks,
- 			       ARRAY_SIZE(peri_clks), clk_data);
- 
--	mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
-+	mtk_clk_register_composites(&pdev->dev, peri_muxes,
-+				    ARRAY_SIZE(peri_muxes), base,
- 				    &mt7622_clk_lock, clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
---- a/drivers/clk/mediatek/clk-mt7629.c
-+++ b/drivers/clk/mediatek/clk-mt7629.c
-@@ -566,8 +566,9 @@ static int mtk_topckgen_init(struct plat
- 	mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs),
- 				 clk_data);
- 
--	mtk_clk_register_composites(top_muxes, ARRAY_SIZE(top_muxes),
--				    base, &mt7629_clk_lock, clk_data);
-+	mtk_clk_register_composites(&pdev->dev, top_muxes,
-+				    ARRAY_SIZE(top_muxes), base,
-+				    &mt7629_clk_lock, clk_data);
- 
- 	clk_prepare_enable(clk_data->hws[CLK_TOP_AXI_SEL]->clk);
- 	clk_prepare_enable(clk_data->hws[CLK_TOP_MEM_SEL]->clk);
-@@ -613,7 +614,8 @@ static int mtk_pericfg_init(struct platf
- 	mtk_clk_register_gates(&pdev->dev, node, peri_clks,
- 			       ARRAY_SIZE(peri_clks), clk_data);
- 
--	mtk_clk_register_composites(peri_muxes, ARRAY_SIZE(peri_muxes), base,
-+	mtk_clk_register_composites(&pdev->dev, peri_muxes,
-+				    ARRAY_SIZE(peri_muxes), base,
- 				    &mt7629_clk_lock, clk_data);
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
---- a/drivers/clk/mediatek/clk-mtk.c
-+++ b/drivers/clk/mediatek/clk-mtk.c
-@@ -197,8 +197,8 @@ void mtk_clk_unregister_factors(const st
- }
- EXPORT_SYMBOL_GPL(mtk_clk_unregister_factors);
- 
--static struct clk_hw *mtk_clk_register_composite(const struct mtk_composite *mc,
--		void __iomem *base, spinlock_t *lock)
-+static struct clk_hw *mtk_clk_register_composite(struct device *dev,
-+		const struct mtk_composite *mc, void __iomem *base, spinlock_t *lock)
- {
- 	struct clk_hw *hw;
- 	struct clk_mux *mux = NULL;
-@@ -264,7 +264,7 @@ static struct clk_hw *mtk_clk_register_c
- 		div_ops = &clk_divider_ops;
- 	}
- 
--	hw = clk_hw_register_composite(NULL, mc->name, parent_names, num_parents,
-+	hw = clk_hw_register_composite(dev, mc->name, parent_names, num_parents,
- 		mux_hw, mux_ops,
- 		div_hw, div_ops,
- 		gate_hw, gate_ops,
-@@ -308,7 +308,8 @@ static void mtk_clk_unregister_composite
- 	kfree(mux);
- }
- 
--int mtk_clk_register_composites(const struct mtk_composite *mcs, int num,
-+int mtk_clk_register_composites(struct device *dev,
-+				const struct mtk_composite *mcs, int num,
- 				void __iomem *base, spinlock_t *lock,
- 				struct clk_hw_onecell_data *clk_data)
- {
-@@ -327,7 +328,7 @@ int mtk_clk_register_composites(const st
- 			continue;
- 		}
- 
--		hw = mtk_clk_register_composite(mc, base, lock);
-+		hw = mtk_clk_register_composite(dev, mc, base, lock);
- 
- 		if (IS_ERR(hw)) {
- 			pr_err("Failed to register clk %s: %pe\n", mc->name,
---- a/drivers/clk/mediatek/clk-mtk.h
-+++ b/drivers/clk/mediatek/clk-mtk.h
-@@ -149,7 +149,8 @@ struct mtk_composite {
- 		.flags = 0,						\
- 	}
- 
--int mtk_clk_register_composites(const struct mtk_composite *mcs, int num,
-+int mtk_clk_register_composites(struct device *dev,
-+				const struct mtk_composite *mcs, int num,
- 				void __iomem *base, spinlock_t *lock,
- 				struct clk_hw_onecell_data *clk_data);
- void mtk_clk_unregister_composites(const struct mtk_composite *mcs, int num,
diff --git a/target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch b/target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch
deleted file mode 100644
index a50422da58..0000000000
--- a/target/linux/mediatek/patches-6.1/223-v6.3-clk-mediatek-clk-mux-Propagate-struct-device-for-mtk.patch
+++ /dev/null
@@ -1,103 +0,0 @@
-From 5d911479e4c732729bfa798e4a9e3e5aec3e30a7 Mon Sep 17 00:00:00 2001
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Date: Fri, 20 Jan 2023 10:20:36 +0100
-Subject: [PATCH 04/15] clk: mediatek: clk-mux: Propagate struct device for
- mtk-mux
-
-Like done for other clocks, propagate struct device for mtk mux clocks
-registered through clk-mux helpers to enable runtime pm support.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Tested-by: Miles Chen <miles.chen at mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-7-angelogioacchino.delregno at collabora.com
-Tested-by: Mingming Su <mingming.su at mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
-
-[daniel at makrotopia.org: removed parts not relevant for OpenWrt]
----
- drivers/clk/mediatek/clk-mt7986-infracfg.c |  3 ++-
- drivers/clk/mediatek/clk-mt7986-topckgen.c |  3 ++-
- drivers/clk/mediatek/clk-mux.c             | 14 ++++++++------
- drivers/clk/mediatek/clk-mux.h             |  3 ++-
- 4 files changed, 14 insertions(+), 9 deletions(-)
-
---- a/drivers/clk/mediatek/clk-mt7986-infracfg.c
-+++ b/drivers/clk/mediatek/clk-mt7986-infracfg.c
-@@ -178,7 +178,8 @@ static int clk_mt7986_infracfg_probe(str
- 		return -ENOMEM;
- 
- 	mtk_clk_register_factors(infra_divs, ARRAY_SIZE(infra_divs), clk_data);
--	mtk_clk_register_muxes(infra_muxes, ARRAY_SIZE(infra_muxes), node,
-+	mtk_clk_register_muxes(&pdev->dev, infra_muxes,
-+			       ARRAY_SIZE(infra_muxes), node,
- 			       &mt7986_clk_lock, clk_data);
- 	mtk_clk_register_gates(&pdev->dev, node, infra_clks,
- 			       ARRAY_SIZE(infra_clks), clk_data);
---- a/drivers/clk/mediatek/clk-mt7986-topckgen.c
-+++ b/drivers/clk/mediatek/clk-mt7986-topckgen.c
-@@ -303,7 +303,8 @@ static int clk_mt7986_topckgen_probe(str
- 	mtk_clk_register_fixed_clks(top_fixed_clks, ARRAY_SIZE(top_fixed_clks),
- 				    clk_data);
- 	mtk_clk_register_factors(top_divs, ARRAY_SIZE(top_divs), clk_data);
--	mtk_clk_register_muxes(top_muxes, ARRAY_SIZE(top_muxes), node,
-+	mtk_clk_register_muxes(&pdev->dev, top_muxes,
-+			       ARRAY_SIZE(top_muxes), node,
- 			       &mt7986_clk_lock, clk_data);
- 
- 	clk_prepare_enable(clk_data->hws[CLK_TOP_SYSAXI_SEL]->clk);
---- a/drivers/clk/mediatek/clk-mux.c
-+++ b/drivers/clk/mediatek/clk-mux.c
-@@ -154,9 +154,10 @@ const struct clk_ops mtk_mux_gate_clr_se
- };
- EXPORT_SYMBOL_GPL(mtk_mux_gate_clr_set_upd_ops);
- 
--static struct clk_hw *mtk_clk_register_mux(const struct mtk_mux *mux,
--				 struct regmap *regmap,
--				 spinlock_t *lock)
-+static struct clk_hw *mtk_clk_register_mux(struct device *dev,
-+					   const struct mtk_mux *mux,
-+					   struct regmap *regmap,
-+					   spinlock_t *lock)
- {
- 	struct mtk_clk_mux *clk_mux;
- 	struct clk_init_data init = {};
-@@ -177,7 +178,7 @@ static struct clk_hw *mtk_clk_register_m
- 	clk_mux->lock = lock;
- 	clk_mux->hw.init = &init;
- 
--	ret = clk_hw_register(NULL, &clk_mux->hw);
-+	ret = clk_hw_register(dev, &clk_mux->hw);
- 	if (ret) {
- 		kfree(clk_mux);
- 		return ERR_PTR(ret);
-@@ -198,7 +199,8 @@ static void mtk_clk_unregister_mux(struc
- 	kfree(mux);
- }
- 
--int mtk_clk_register_muxes(const struct mtk_mux *muxes,
-+int mtk_clk_register_muxes(struct device *dev,
-+			   const struct mtk_mux *muxes,
- 			   int num, struct device_node *node,
- 			   spinlock_t *lock,
- 			   struct clk_hw_onecell_data *clk_data)
-@@ -222,7 +224,7 @@ int mtk_clk_register_muxes(const struct
- 			continue;
- 		}
- 
--		hw = mtk_clk_register_mux(mux, regmap, lock);
-+		hw = mtk_clk_register_mux(dev, mux, regmap, lock);
- 
- 		if (IS_ERR(hw)) {
- 			pr_err("Failed to register clk %s: %pe\n", mux->name,
---- a/drivers/clk/mediatek/clk-mux.h
-+++ b/drivers/clk/mediatek/clk-mux.h
-@@ -83,7 +83,8 @@ extern const struct clk_ops mtk_mux_gate
- 			0, _upd_ofs, _upd, CLK_SET_RATE_PARENT,		\
- 			mtk_mux_clr_set_upd_ops)
- 
--int mtk_clk_register_muxes(const struct mtk_mux *muxes,
-+int mtk_clk_register_muxes(struct device *dev,
-+			   const struct mtk_mux *muxes,
- 			   int num, struct device_node *node,
- 			   spinlock_t *lock,
- 			   struct clk_hw_onecell_data *clk_data);
diff --git a/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch b/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch
index de2e6976c3..c7de44fcf3 100644
--- a/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch
+++ b/target/linux/mediatek/patches-6.1/224-v6.3-clk-mediatek-clk-mtk-Add-dummy-clock-ops.patch
@@ -21,9 +21,9 @@ Signed-off-by: Stephen Boyd <sboyd at kernel.org>
 
 --- a/drivers/clk/mediatek/clk-mtk.c
 +++ b/drivers/clk/mediatek/clk-mtk.c
-@@ -18,6 +18,22 @@
- #include "clk-mtk.h"
+@@ -21,6 +21,22 @@
  #include "clk-gate.h"
+ #include "clk-mux.h"
  
 +const struct mtk_gate_regs cg_regs_dummy = { 0, 0, 0 };
 +EXPORT_SYMBOL_GPL(cg_regs_dummy);
diff --git a/target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch b/target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch
deleted file mode 100644
index ad02df10b6..0000000000
--- a/target/linux/mediatek/patches-6.1/226-v6.3-clk-mediatek-clk-mtk-Extend-mtk_clk_simple_probe.patch
+++ /dev/null
@@ -1,189 +0,0 @@
-From 7b6183108c8ccf0dc295f39cdf78bd8078455636 Mon Sep 17 00:00:00 2001
-From: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Date: Fri, 20 Jan 2023 10:20:42 +0100
-Subject: [PATCH] clk: mediatek: clk-mtk: Extend mtk_clk_simple_probe()
-
-As a preparation to increase probe functions commonization across
-various MediaTek SoC clock controller drivers, extend function
-mtk_clk_simple_probe() to be able to register not only gates, but
-also fixed clocks, factors, muxes and composites.
-
-Signed-off-by: AngeloGioacchino Del Regno <angelogioacchino.delregno at collabora.com>
-Reviewed-by: Miles Chen <miles.chen at mediatek.com>
-Reviewed-by: Chen-Yu Tsai <wenst at chromium.org>
-Tested-by: Miles Chen <miles.chen at mediatek.com>
-Link: https://lore.kernel.org/r/20230120092053.182923-13-angelogioacchino.delregno at collabora.com
-Tested-by: Mingming Su <mingming.su at mediatek.com>
-Signed-off-by: Stephen Boyd <sboyd at kernel.org>
----
- drivers/clk/mediatek/clk-mtk.c | 101 ++++++++++++++++++++++++++++++---
- drivers/clk/mediatek/clk-mtk.h |  10 ++++
- 2 files changed, 103 insertions(+), 8 deletions(-)
-
---- a/drivers/clk/mediatek/clk-mtk.c
-+++ b/drivers/clk/mediatek/clk-mtk.c
-@@ -11,12 +11,14 @@
- #include <linux/mfd/syscon.h>
- #include <linux/module.h>
- #include <linux/of.h>
-+#include <linux/of_address.h>
- #include <linux/of_device.h>
- #include <linux/platform_device.h>
- #include <linux/slab.h>
- 
- #include "clk-mtk.h"
- #include "clk-gate.h"
-+#include "clk-mux.h"
- 
- const struct mtk_gate_regs cg_regs_dummy = { 0, 0, 0 };
- EXPORT_SYMBOL_GPL(cg_regs_dummy);
-@@ -466,20 +468,71 @@ int mtk_clk_simple_probe(struct platform
- 	const struct mtk_clk_desc *mcd;
- 	struct clk_hw_onecell_data *clk_data;
- 	struct device_node *node = pdev->dev.of_node;
--	int r;
-+	void __iomem *base;
-+	int num_clks, r;
- 
- 	mcd = of_device_get_match_data(&pdev->dev);
- 	if (!mcd)
- 		return -EINVAL;
- 
--	clk_data = mtk_alloc_clk_data(mcd->num_clks);
-+	/* Composite clocks needs us to pass iomem pointer */
-+	if (mcd->composite_clks) {
-+		if (!mcd->shared_io)
-+			base = devm_platform_ioremap_resource(pdev, 0);
-+		else
-+			base = of_iomap(node, 0);
-+
-+		if (IS_ERR_OR_NULL(base))
-+			return IS_ERR(base) ? PTR_ERR(base) : -ENOMEM;
-+	}
-+
-+	/* Calculate how many clk_hw_onecell_data entries to allocate */
-+	num_clks = mcd->num_clks + mcd->num_composite_clks;
-+	num_clks += mcd->num_fixed_clks + mcd->num_factor_clks;
-+	num_clks += mcd->num_mux_clks;
-+
-+	clk_data = mtk_alloc_clk_data(num_clks);
- 	if (!clk_data)
- 		return -ENOMEM;
- 
--	r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks, mcd->num_clks,
--				   clk_data);
--	if (r)
--		goto free_data;
-+	if (mcd->fixed_clks) {
-+		r = mtk_clk_register_fixed_clks(mcd->fixed_clks,
-+						mcd->num_fixed_clks, clk_data);
-+		if (r)
-+			goto free_data;
-+	}
-+
-+	if (mcd->factor_clks) {
-+		r = mtk_clk_register_factors(mcd->factor_clks,
-+					     mcd->num_factor_clks, clk_data);
-+		if (r)
-+			goto unregister_fixed_clks;
-+	}
-+
-+	if (mcd->mux_clks) {
-+		r = mtk_clk_register_muxes(&pdev->dev, mcd->mux_clks,
-+					   mcd->num_mux_clks, node,
-+					   mcd->clk_lock, clk_data);
-+		if (r)
-+			goto unregister_factors;
-+	};
-+
-+	if (mcd->composite_clks) {
-+		/* We don't check composite_lock because it's optional */
-+		r = mtk_clk_register_composites(&pdev->dev,
-+						mcd->composite_clks,
-+						mcd->num_composite_clks,
-+						base, mcd->clk_lock, clk_data);
-+		if (r)
-+			goto unregister_muxes;
-+	}
-+
-+	if (mcd->clks) {
-+		r = mtk_clk_register_gates(&pdev->dev, node, mcd->clks,
-+					   mcd->num_clks, clk_data);
-+		if (r)
-+			goto unregister_composites;
-+	}
- 
- 	r = of_clk_add_hw_provider(node, of_clk_hw_onecell_get, clk_data);
- 	if (r)
-@@ -497,9 +550,28 @@ int mtk_clk_simple_probe(struct platform
- 	return r;
- 
- unregister_clks:
--	mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
-+	if (mcd->clks)
-+		mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
-+unregister_composites:
-+	if (mcd->composite_clks)
-+		mtk_clk_unregister_composites(mcd->composite_clks,
-+					      mcd->num_composite_clks, clk_data);
-+unregister_muxes:
-+	if (mcd->mux_clks)
-+		mtk_clk_unregister_muxes(mcd->mux_clks,
-+					 mcd->num_mux_clks, clk_data);
-+unregister_factors:
-+	if (mcd->factor_clks)
-+		mtk_clk_unregister_factors(mcd->factor_clks,
-+					   mcd->num_factor_clks, clk_data);
-+unregister_fixed_clks:
-+	if (mcd->fixed_clks)
-+		mtk_clk_unregister_fixed_clks(mcd->fixed_clks,
-+					      mcd->num_fixed_clks, clk_data);
- free_data:
- 	mtk_free_clk_data(clk_data);
-+	if (mcd->shared_io && base)
-+		iounmap(base);
- 	return r;
- }
- EXPORT_SYMBOL_GPL(mtk_clk_simple_probe);
-@@ -511,7 +583,20 @@ int mtk_clk_simple_remove(struct platfor
- 	struct device_node *node = pdev->dev.of_node;
- 
- 	of_clk_del_provider(node);
--	mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
-+	if (mcd->clks)
-+		mtk_clk_unregister_gates(mcd->clks, mcd->num_clks, clk_data);
-+	if (mcd->composite_clks)
-+		mtk_clk_unregister_composites(mcd->composite_clks,
-+					      mcd->num_composite_clks, clk_data);
-+	if (mcd->mux_clks)
-+		mtk_clk_unregister_muxes(mcd->mux_clks,
-+					 mcd->num_mux_clks, clk_data);
-+	if (mcd->factor_clks)
-+		mtk_clk_unregister_factors(mcd->factor_clks,
-+					   mcd->num_factor_clks, clk_data);
-+	if (mcd->fixed_clks)
-+		mtk_clk_unregister_fixed_clks(mcd->fixed_clks,
-+					      mcd->num_fixed_clks, clk_data);
- 	mtk_free_clk_data(clk_data);
- 
- 	return 0;
---- a/drivers/clk/mediatek/clk-mtk.h
-+++ b/drivers/clk/mediatek/clk-mtk.h
-@@ -215,7 +215,17 @@ void mtk_clk_unregister_ref2usb_tx(struc
- struct mtk_clk_desc {
- 	const struct mtk_gate *clks;
- 	size_t num_clks;
-+	const struct mtk_composite *composite_clks;
-+	size_t num_composite_clks;
-+	const struct mtk_fixed_clk *fixed_clks;
-+	size_t num_fixed_clks;
-+	const struct mtk_fixed_factor *factor_clks;
-+	size_t num_factor_clks;
-+	const struct mtk_mux *mux_clks;
-+	size_t num_mux_clks;
- 	const struct mtk_clk_rst_desc *rst_desc;
-+	spinlock_t *clk_lock;
-+	bool shared_io;
- };
- 
- int mtk_clk_simple_probe(struct platform_device *pdev);
diff --git a/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch b/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
index 7ab735af4c..ec6cef800a 100644
--- a/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
+++ b/target/linux/mvebu/patches-6.1/300-mvebu-Mangle-bootloader-s-kernel-arguments.patch
@@ -258,7 +258,7 @@ Signed-off-by: Michael Gray <michael.gray at lantisproject.com>
  static int kernel_init(void *);
  
  extern void init_IRQ(void);
-@@ -994,6 +998,18 @@ asmlinkage __visible void __init __no_sa
+@@ -996,6 +1000,18 @@ asmlinkage __visible void __init __no_sa
  	page_alloc_init();
  
  	pr_notice("Kernel command line: %s\n", saved_command_line);
diff --git a/target/linux/x86/config-6.1 b/target/linux/x86/config-6.1
index 20feecafd0..6c9f30cf91 100644
--- a/target/linux/x86/config-6.1
+++ b/target/linux/x86/config-6.1
@@ -236,6 +236,7 @@ CONFIG_MICROCODE_INTEL=y
 CONFIG_MICROCODE_LATE_LOADING=y
 CONFIG_MIGRATION=y
 CONFIG_MITIGATION_RFDS=y
+CONFIG_MITIGATION_SPECTRE_BHI=y
 # CONFIG_MK6 is not set
 # CONFIG_MK7 is not set
 # CONFIG_MK8 is not set
@@ -351,9 +352,6 @@ CONFIG_SG_POOL=y
 CONFIG_SOFTIRQ_ON_OWN_STACK=y
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
-# CONFIG_SPECTRE_BHI_AUTO is not set
-# CONFIG_SPECTRE_BHI_OFF is not set
-CONFIG_SPECTRE_BHI_ON=y
 CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_SRCU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set



From lede-commits at lists.infradead.org  Tue Apr 30 14:43:14 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 17:43:14 -0400
Subject: [openwrt/openwrt]  kernel: bump 5.15 to 5.15.155
In-Reply-To: <171451339419.3599823.10272595127077626114@git-01.infra.openwrt.org>
References: <171451339419.3599823.10272595127077626114@git-01.infra.openwrt.org>
Message-ID: <mailman.32494.1714513405.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/451b51f0dc02ae1a06cf2afb68294bfb0bb63606

commit 451b51f0dc02ae1a06cf2afb68294bfb0bb63606
Author: Hauke Mehrtens <hauke at hauke-m.de>
AuthorDate: Sat Apr 13 19:22:41 2024 +0200

    kernel: bump 5.15 to 5.15.155
    
    Manual adapted the following patches:
       generic/hack-5.15/221-module_exports.patch
       bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch
       octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
    
    Signed-off-by: Hauke Mehrtens <hauke at hauke-m.de>
    (cherry picked from commit 9693ed6a9edb2ec9c9aa5edfa816dda3897cdfc4)
---
 include/kernel-5.15                                |   4 +-
 ...i-Use-a-mutex-to-prevent-concurrent-frame.patch |   4 +-
 .../patches-5.15/950-0064-Add-dwc_otg-driver.patch |   2 +-
 ...950-0070-MMC-added-alternative-MMC-driver.patch |   6 +-
 ...-for-all-the-downstream-rpi-sound-card-dr.patch |   6 +-
 ...-sc16is7xx-Don-t-spin-if-no-data-received.patch |   2 +-
 ...mal-vchiq-Avoid-use-of-bool-in-structures.patch |   2 +-
 ...mal-vchiq-Add-support-for-event-callbacks.patch |  16 +-
 ...l-vchiq-Free-the-event-context-for-contro.patch |   2 +-
 ...-mmal-vchiq-Fix-memory-leak-in-error-path.patch |   8 +-
 ...ent-xhci_fixup_endpoint-for-interval-adju.patch |   4 +-
 ...1-sc16is7xx-Fix-for-hardware-flow-control.patch |   6 +-
 ...dia-i2c-Add-driver-for-Sony-IMX477-sensor.patch |   2 +-
 ...l-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch |   6 +-
 ...on-devicetree-Add-documentation-for-imx37.patch |   2 +-
 ...l-vchiq-Add-module-parameter-to-enable-lo.patch |  22 +-
 ...l-vchiq-Reset-buffers_with_vpu-on-port_en.patch |   2 +-
 ...-media-i2c-Add-IMX519-CMOS-sensor-binding.patch |   2 +-
 ...dd-and-initialise-an-orientation-field-to.patch |   2 +-
 ...on-t-do-single-sector-reads-during-recove.patch |   2 +-
 .../020-v6.1-05-mm-multi-gen-LRU-groundwork.patch  |   2 +-
 ...6-mm-multi-gen-LRU-minimal-implementation.patch |   6 +-
 ...mm-multi-gen-LRU-support-page-table-walks.patch |   4 +-
 ...n-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch |   4 +-
 ...multi-gen-LRU-per-node-lru_gen_page-lists.patch |   2 +-
 ...net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch |   2 +-
 ...dsa-mt7530-introduce-separate-MDIO-driver.patch |   2 +-
 ...530-introduce-driver-for-MT7988-built-in-.patch |   2 +-
 ...ver-for-Motorcomm-yt8521-gigabit-ethernet.patch |   2 +-
 ...em-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch |   2 +-
 ...6.0-0001-nvmem-microchip-otpc-add-support.patch |   2 +-
 ...xplicit-config-option-to-read-old-syntax-.patch |   2 +-
 target/linux/generic/config-5.15                   |   1 +
 .../generic/hack-5.15/221-module_exports.patch     |   4 +-
 .../780-usb-net-MeigLink_modem_support.patch       |   4 +-
 .../linux/generic/hack-5.15/902-debloat_proc.patch |   2 +-
 ...rt-Revert-driver-core-Set-fw_devlink-on-b.patch |   2 +-
 ...c_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch |   2 +-
 ...610-netfilter_match_bypass_default_checks.patch |   2 +-
 ...f_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch |   2 +-
 ...page-pool-and-page-referenced-frags-in-GR.patch |   2 +-
 .../810-pci_disable_common_quirks.patch            |   8 +-
 ...6.0-clk-qcom-ipq8074-add-PPE-crypto-clock.patch |   4 +-
 .../0023-v6.0-clk-qcom-ipq8074-add-USB-GDSCs.patch |   6 +-
 ...2-clk-qcom-ipq8074-convert-to-parent-data.patch | 436 ++++++++++-----------
 ...com-ipq8074-add-missing-networking-resets.patch |   2 +-
 ...-ipq8074-populate-fw_name-for-all-parents.patch |  20 +-
 ...c-ipq8074-rework-nss_port5-6-clock-to-mul.patch |   8 +-
 .../0118-clk-qcom-Add-WCSSAON-reset.patch          |   2 +-
 ...om-ipq8074-populate-fw_name-for-usb3phy-s.patch |   4 +-
 .../0001-MIPS-lantiq-add-pcie-driver.patch         |   2 +-
 .../patches-5.15/410-bt-mtk-serial-fix.patch       |   2 +-
 ...-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch |   2 +-
 ...rk-for-Gateworks-PLX-PEX860x-switch-with-.patch |  10 +-
 ...-watchdog-add-realtek-otto-watchdog-timer.patch |   2 +-
 target/linux/x86/config-5.15                       |   4 +
 56 files changed, 336 insertions(+), 331 deletions(-)

diff --git a/include/kernel-5.15 b/include/kernel-5.15
index 84a0d0a1bf..4a82b9c9b3 100644
--- a/include/kernel-5.15
+++ b/include/kernel-5.15
@@ -1,2 +1,2 @@
-LINUX_VERSION-5.15 = .153
-LINUX_KERNEL_HASH-5.15.153 = d7ddb1e144a88773b56a5b4a71baea0b241f3996d446be45290537c6997c84bc
+LINUX_VERSION-5.15 = .155
+LINUX_KERNEL_HASH-5.15.155 = c85859b86d2e6d1fc91ca1be8b44f24a9b5bb9f86869b04a8665a3a6559126e4
diff --git a/target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch b/target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch
index 49470cdb47..9c43318d6a 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0008-drm-vc4-hdmi-Use-a-mutex-to-prevent-concurrent-frame.patch
@@ -70,9 +70,9 @@ Signed-off-by: Maxime Ripard <maxime at cerno.tech>
  	edid = drm_get_edid(connector, vc4_hdmi->ddc);
  	cec_s_phys_addr_from_edid(vc4_hdmi->cec_adap, edid);
 -	if (!edid)
--		return -ENODEV;
+-		return 0;
 +	if (!edid) {
-+		ret = -ENODEV;
++		ret = 0;
 +		goto out;
 +	}
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch
index b07d81aa2e..a16aa0fb7b 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0064-Add-dwc_otg-driver.patch
@@ -1123,7 +1123,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
  }
 --- a/drivers/usb/core/hub.c
 +++ b/drivers/usb/core/hub.c
-@@ -5667,7 +5667,7 @@ static void port_event(struct usb_hub *h
+@@ -5676,7 +5676,7 @@ static void port_event(struct usb_hub *h
  		port_dev->over_current_count++;
  		port_over_current_notify(port_dev);
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch b/target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch
index bc655e9274..f32e6887bf 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0070-MMC-added-alternative-MMC-driver.patch
@@ -244,7 +244,7 @@ bcm2835-mmc: uninitialized_var is no more
  static inline int mmc_blk_part_switch(struct mmc_card *card,
  				      unsigned int part_type);
  static void mmc_blk_rw_rq_prep(struct mmc_queue_req *mqrq,
-@@ -2986,6 +2993,8 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2988,6 +2995,8 @@ static int mmc_blk_probe(struct mmc_card
  {
  	struct mmc_blk_data *md;
  	int ret = 0;
@@ -253,7 +253,7 @@ bcm2835-mmc: uninitialized_var is no more
  
  	/*
  	 * Check that the card supports the command class(es) we need.
-@@ -2993,7 +3002,16 @@ static int mmc_blk_probe(struct mmc_card
+@@ -2995,7 +3004,16 @@ static int mmc_blk_probe(struct mmc_card
  	if (!(card->csd.cmdclass & CCC_BLOCK_READ))
  		return -ENODEV;
  
@@ -271,7 +271,7 @@ bcm2835-mmc: uninitialized_var is no more
  
  	card->complete_wq = alloc_workqueue("mmc_complete",
  					WQ_MEM_RECLAIM | WQ_HIGHPRI, 0);
-@@ -3008,6 +3026,17 @@ static int mmc_blk_probe(struct mmc_card
+@@ -3010,6 +3028,17 @@ static int mmc_blk_probe(struct mmc_card
  		goto out_free;
  	}
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0084-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch b/target/linux/bcm27xx/patches-5.15/950-0084-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch
index 61b70c03b8..0ad3950310 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0084-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0084-Add-support-for-all-the-downstream-rpi-sound-card-dr.patch
@@ -16797,7 +16797,7 @@ Signed-off-by: Joerg Schambacher <joerg at hifiberry.com>
 +#endif  /* _TAS5713_H */
 --- a/sound/soc/soc-core.c
 +++ b/sound/soc/soc-core.c
-@@ -1231,7 +1231,7 @@ found:
+@@ -1234,7 +1234,7 @@ found:
   * Returns 0 on success, otherwise a negative error code.
   */
  int snd_soc_runtime_set_dai_fmt(struct snd_soc_pcm_runtime *rtd,
@@ -16806,7 +16806,7 @@ Signed-off-by: Joerg Schambacher <joerg at hifiberry.com>
  {
  	struct snd_soc_dai *cpu_dai;
  	struct snd_soc_dai *codec_dai;
-@@ -1240,7 +1240,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
+@@ -1243,7 +1243,15 @@ int snd_soc_runtime_set_dai_fmt(struct s
  	int ret;
  
  	for_each_rtd_codec_dais(rtd, i, codec_dai) {
@@ -16823,7 +16823,7 @@ Signed-off-by: Joerg Schambacher <joerg at hifiberry.com>
  		if (ret != 0 && ret != -ENOTSUPP)
  			return ret;
  	}
-@@ -1249,8 +1257,21 @@ int snd_soc_runtime_set_dai_fmt(struct s
+@@ -1252,8 +1260,21 @@ int snd_soc_runtime_set_dai_fmt(struct s
  	 * Flip the polarity for the "CPU" end of a CODEC<->CODEC link
  	 * the component which has non_legacy_dai_naming is Codec
  	 */
diff --git a/target/linux/bcm27xx/patches-5.15/950-0108-sc16is7xx-Don-t-spin-if-no-data-received.patch b/target/linux/bcm27xx/patches-5.15/950-0108-sc16is7xx-Don-t-spin-if-no-data-received.patch
index f2016a48ad..778d18557a 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0108-sc16is7xx-Don-t-spin-if-no-data-received.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0108-sc16is7xx-Don-t-spin-if-no-data-received.patch
@@ -12,7 +12,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.org>
 
 --- a/drivers/tty/serial/sc16is7xx.c
 +++ b/drivers/tty/serial/sc16is7xx.c
-@@ -709,6 +709,8 @@ static bool sc16is7xx_port_irq(struct sc
+@@ -710,6 +710,8 @@ static bool sc16is7xx_port_irq(struct sc
  
  			if (rxlen)
  				sc16is7xx_handle_rx(port, rxlen, iir);
diff --git a/target/linux/bcm27xx/patches-5.15/950-0129-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch b/target/linux/bcm27xx/patches-5.15/950-0129-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
index ee2e957d24..4f214429db 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0129-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0129-staging-mmal-vchiq-Avoid-use-of-bool-in-structures.patch
@@ -13,7 +13,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1775,7 +1775,7 @@ int vchiq_mmal_component_enable(struct v
+@@ -1776,7 +1776,7 @@ int vchiq_mmal_component_enable(struct v
  
  	ret = enable_component(instance, component);
  	if (ret == 0)
diff --git a/target/linux/bcm27xx/patches-5.15/950-0130-staging-mmal-vchiq-Add-support-for-event-callbacks.patch b/target/linux/bcm27xx/patches-5.15/950-0130-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
index be08b0a0ac..e4fc303d99 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0130-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0130-staging-mmal-vchiq-Add-support-for-event-callbacks.patch
@@ -234,7 +234,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  /* deals with receipt of buffer to host message */
  static void buffer_to_host_cb(struct vchiq_mmal_instance *instance,
  			      struct mmal_msg *msg, u32 msg_len)
-@@ -1332,6 +1425,7 @@ static int port_disable(struct vchiq_mma
+@@ -1333,6 +1426,7 @@ static int port_disable(struct vchiq_mma
  				mmalbuf->mmal_flags = 0;
  				mmalbuf->dts = MMAL_TIME_UNKNOWN;
  				mmalbuf->pts = MMAL_TIME_UNKNOWN;
@@ -242,7 +242,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  				port->buffer_cb(instance,
  						port, 0, mmalbuf);
  			}
-@@ -1633,6 +1727,43 @@ int mmal_vchi_buffer_cleanup(struct mmal
+@@ -1634,6 +1728,43 @@ int mmal_vchi_buffer_cleanup(struct mmal
  }
  EXPORT_SYMBOL_GPL(mmal_vchi_buffer_cleanup);
  
@@ -286,7 +286,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  /* Initialise a mmal component and its ports
   *
   */
-@@ -1682,6 +1813,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1683,6 +1814,7 @@ int vchiq_mmal_component_init(struct vch
  	ret = port_info_get(instance, &component->control);
  	if (ret < 0)
  		goto release_component;
@@ -294,7 +294,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	for (idx = 0; idx < component->inputs; idx++) {
  		component->input[idx].type = MMAL_PORT_TYPE_INPUT;
-@@ -1692,6 +1824,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1693,6 +1825,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->input[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -302,7 +302,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	for (idx = 0; idx < component->outputs; idx++) {
-@@ -1703,6 +1836,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1704,6 +1837,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->output[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -310,7 +310,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	for (idx = 0; idx < component->clocks; idx++) {
-@@ -1714,6 +1848,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1715,6 +1849,7 @@ int vchiq_mmal_component_init(struct vch
  		ret = port_info_get(instance, &component->clock[idx]);
  		if (ret < 0)
  			goto release_component;
@@ -318,7 +318,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  	}
  
  	*component_out = component;
-@@ -1739,7 +1874,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
+@@ -1740,7 +1875,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
  int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
  				  struct vchiq_mmal_component *component)
  {
@@ -327,7 +327,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	if (mutex_lock_interruptible(&instance->vchiq_mutex))
  		return -EINTR;
-@@ -1751,6 +1886,13 @@ int vchiq_mmal_component_finalise(struct
+@@ -1752,6 +1887,13 @@ int vchiq_mmal_component_finalise(struct
  
  	component->in_use = 0;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0137-staging-mmal-vchiq-Free-the-event-context-for-contro.patch b/target/linux/bcm27xx/patches-5.15/950-0137-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
index e8ae2f6b03..a7a78d69ee 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0137-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0137-staging-mmal-vchiq-Free-the-event-context-for-contro.patch
@@ -17,7 +17,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1901,6 +1901,8 @@ int vchiq_mmal_component_finalise(struct
+@@ -1902,6 +1902,8 @@ int vchiq_mmal_component_finalise(struct
  	for (idx = 0; idx < component->clocks; idx++)
  		free_event_context(&component->clock[idx]);
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0138-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch b/target/linux/bcm27xx/patches-5.15/950-0138-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
index dda0d26c00..47ed459c00 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0138-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0138-staging-mmal-vchiq-Fix-memory-leak-in-error-path.patch
@@ -14,7 +14,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1767,9 +1767,26 @@ static void free_event_context(struct vc
+@@ -1768,9 +1768,26 @@ static void free_event_context(struct vc
  {
  	struct mmal_msg_context *ctx = port->event_context;
  
@@ -41,7 +41,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  }
  
  /* Initialise a mmal component and its ports
-@@ -1867,6 +1884,7 @@ int vchiq_mmal_component_init(struct vch
+@@ -1868,6 +1885,7 @@ int vchiq_mmal_component_init(struct vch
  
  release_component:
  	destroy_component(instance, component);
@@ -49,7 +49,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  unlock:
  	if (component)
  		component->in_use = 0;
-@@ -1882,7 +1900,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
+@@ -1883,7 +1901,7 @@ EXPORT_SYMBOL_GPL(vchiq_mmal_component_i
  int vchiq_mmal_component_finalise(struct vchiq_mmal_instance *instance,
  				  struct vchiq_mmal_component *component)
  {
@@ -58,7 +58,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.org>
  
  	if (mutex_lock_interruptible(&instance->vchiq_mutex))
  		return -EINTR;
-@@ -1894,14 +1912,7 @@ int vchiq_mmal_component_finalise(struct
+@@ -1895,14 +1913,7 @@ int vchiq_mmal_component_finalise(struct
  
  	component->in_use = 0;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0152-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch b/target/linux/bcm27xx/patches-5.15/950-0152-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
index c1952de661..f83c8547c8 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0152-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0152-xhci-implement-xhci_fixup_endpoint-for-interval-adju.patch
@@ -15,7 +15,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
 
 --- a/drivers/usb/host/xhci.c
 +++ b/drivers/usb/host/xhci.c
-@@ -1631,6 +1631,109 @@ command_cleanup:
+@@ -1633,6 +1633,109 @@ command_cleanup:
  }
  
  /*
@@ -125,7 +125,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.org>
   * non-error returns are a promise to giveback() the urb later
   * we drop ownership so next owner (or urb unlink) can get it
   */
-@@ -5470,6 +5573,7 @@ static const struct hc_driver xhci_hc_dr
+@@ -5472,6 +5575,7 @@ static const struct hc_driver xhci_hc_dr
  	.endpoint_reset =	xhci_endpoint_reset,
  	.check_bandwidth =	xhci_check_bandwidth,
  	.reset_bandwidth =	xhci_reset_bandwidth,
diff --git a/target/linux/bcm27xx/patches-5.15/950-0231-sc16is7xx-Fix-for-hardware-flow-control.patch b/target/linux/bcm27xx/patches-5.15/950-0231-sc16is7xx-Fix-for-hardware-flow-control.patch
index ce66193e77..0e15117438 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0231-sc16is7xx-Fix-for-hardware-flow-control.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0231-sc16is7xx-Fix-for-hardware-flow-control.patch
@@ -26,7 +26,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
 
 --- a/drivers/tty/serial/sc16is7xx.c
 +++ b/drivers/tty/serial/sc16is7xx.c
-@@ -524,8 +524,9 @@ static int sc16is7xx_set_baud(struct uar
+@@ -525,8 +525,9 @@ static int sc16is7xx_set_baud(struct uar
  
  	/* Enable enhanced features */
  	regcache_cache_bypass(s->regmap, true);
@@ -38,7 +38,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  	regcache_cache_bypass(s->regmap, false);
  
  	/* Put LCR back to the normal mode */
-@@ -855,7 +856,7 @@ static unsigned int sc16is7xx_get_mctrl(
+@@ -856,7 +857,7 @@ static unsigned int sc16is7xx_get_mctrl(
  	/* DCD and DSR are not wired and CTS/RTS is handled automatically
  	 * so just indicate DSR and CAR asserted
  	 */
@@ -47,7 +47,7 @@ Signed-off-by: Phil Elwell <phil at raspberrypi.com>
  }
  
  static void sc16is7xx_set_mctrl(struct uart_port *port, unsigned int mctrl)
-@@ -942,14 +943,19 @@ static void sc16is7xx_set_termios(struct
+@@ -943,14 +944,19 @@ static void sc16is7xx_set_termios(struct
  	regcache_cache_bypass(s->regmap, true);
  	sc16is7xx_port_write(port, SC16IS7XX_XON1_REG, termios->c_cc[VSTART]);
  	sc16is7xx_port_write(port, SC16IS7XX_XOFF1_REG, termios->c_cc[VSTOP]);
diff --git a/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch b/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch
index 18273c0778..30c66afbfe 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0281-media-i2c-Add-driver-for-Sony-IMX477-sensor.patch
@@ -25,7 +25,7 @@ Signed-off-by: Naushir Patuck <naush at raspberrypi.com>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -17535,6 +17535,14 @@ T:	git git://linuxtv.org/media_tree.git
+@@ -17542,6 +17542,14 @@ T:	git git://linuxtv.org/media_tree.git
  F:	Documentation/devicetree/bindings/media/i2c/sony,imx412.yaml
  F:	drivers/media/i2c/imx412.c
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0299-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch b/target/linux/bcm27xx/patches-5.15/950-0299-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
index 6a58041e94..5404ce60ea 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0299-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0299-staging-mmal-vchiq-Use-vc-sm-cma-to-support-zero-cop.patch
@@ -91,7 +91,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	} else if (msg->u.buffer_from_host.buffer_header.length == 0) {
  		/* empty buffer */
  		if (msg->u.buffer_from_host.buffer_header.flags &
-@@ -1530,6 +1553,9 @@ int vchiq_mmal_port_parameter_set(struct
+@@ -1531,6 +1554,9 @@ int vchiq_mmal_port_parameter_set(struct
  
  	mutex_unlock(&instance->vchiq_mutex);
  
@@ -101,7 +101,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	return ret;
  }
  EXPORT_SYMBOL_GPL(vchiq_mmal_port_parameter_set);
-@@ -1698,6 +1724,31 @@ int vchiq_mmal_submit_buffer(struct vchi
+@@ -1699,6 +1725,31 @@ int vchiq_mmal_submit_buffer(struct vchi
  	unsigned long flags = 0;
  	int ret;
  
@@ -133,7 +133,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	ret = buffer_from_host(instance, port, buffer);
  	if (ret == -EINVAL) {
  		/* Port is disabled. Queue for when it is enabled. */
-@@ -1731,6 +1782,16 @@ int mmal_vchi_buffer_cleanup(struct mmal
+@@ -1732,6 +1783,16 @@ int mmal_vchi_buffer_cleanup(struct mmal
  		release_msg_context(msg_context);
  	buf->msg_context = NULL;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch
index 3fc2ef4042..63ca3ef39b 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0413-Documentation-devicetree-Add-documentation-for-imx37.patch
@@ -132,7 +132,7 @@ Signed-off-by: David Plowman <david.plowman at raspberrypi.com>
 +...
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -17549,6 +17549,7 @@ M:	Raspberry Pi Kernel Maintenance <kern
+@@ -17556,6 +17556,7 @@ M:	Raspberry Pi Kernel Maintenance <kern
  L:	linux-media at vger.kernel.org
  S:	Maintained
  T:	git git://linuxtv.org/media_tree.git
diff --git a/target/linux/bcm27xx/patches-5.15/950-0508-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch b/target/linux/bcm27xx/patches-5.15/950-0508-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch
index 7c9ef95955..a18e6fe287 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0508-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0508-staging-mmal-vchiq-Add-module-parameter-to-enable-lo.patch
@@ -182,7 +182,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  	vchiq_release_message(instance->service_handle, rmsg_handle);
  
-@@ -1088,9 +1101,9 @@ static int create_component(struct vchiq
+@@ -1089,9 +1102,9 @@ static int create_component(struct vchiq
  	component->outputs = rmsg->u.component_create_reply.output_num;
  	component->clocks = rmsg->u.component_create_reply.clock_num;
  
@@ -195,7 +195,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->service_handle, rmsg_handle);
-@@ -1259,10 +1272,9 @@ static int port_action_port(struct vchiq
+@@ -1260,10 +1273,9 @@ static int port_action_port(struct vchiq
  
  	ret = -rmsg->u.port_action_reply.status;
  
@@ -209,7 +209,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->service_handle, rmsg_handle);
-@@ -1306,11 +1318,11 @@ static int port_action_handle(struct vch
+@@ -1307,11 +1319,11 @@ static int port_action_handle(struct vch
  
  	ret = -rmsg->u.port_action_reply.status;
  
@@ -226,7 +226,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->service_handle, rmsg_handle);
-@@ -1349,9 +1361,9 @@ static int port_parameter_set(struct vch
+@@ -1350,9 +1362,9 @@ static int port_parameter_set(struct vch
  
  	ret = -rmsg->u.port_parameter_set_reply.status;
  
@@ -239,7 +239,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->service_handle, rmsg_handle);
-@@ -1409,8 +1421,9 @@ static int port_parameter_get(struct vch
+@@ -1410,8 +1422,9 @@ static int port_parameter_get(struct vch
  	/* Always report the size of the returned parameter to the caller */
  	*value_size = rmsg->u.port_parameter_get_reply.size;
  
@@ -251,7 +251,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  
  release_msg:
  	vchiq_release_message(instance->service_handle, rmsg_handle);
-@@ -1667,7 +1680,7 @@ int vchiq_mmal_port_connect_tunnel(struc
+@@ -1668,7 +1681,7 @@ int vchiq_mmal_port_connect_tunnel(struc
  	if (!dst) {
  		/* do not make new connection */
  		ret = 0;
@@ -260,7 +260,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  		goto release_unlock;
  	}
  
-@@ -1685,14 +1698,14 @@ int vchiq_mmal_port_connect_tunnel(struc
+@@ -1686,14 +1699,14 @@ int vchiq_mmal_port_connect_tunnel(struc
  	/* set new format */
  	ret = port_info_set(instance, dst);
  	if (ret) {
@@ -277,7 +277,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  		goto release_unlock;
  	}
  
-@@ -1701,9 +1714,9 @@ int vchiq_mmal_port_connect_tunnel(struc
+@@ -1702,9 +1715,9 @@ int vchiq_mmal_port_connect_tunnel(struc
  				 MMAL_MSG_PORT_ACTION_TYPE_CONNECT,
  				 dst->component->handle, dst->handle);
  	if (ret < 0) {
@@ -290,7 +290,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  		goto release_unlock;
  	}
  	src->connected = dst;
-@@ -1728,7 +1741,8 @@ int vchiq_mmal_submit_buffer(struct vchi
+@@ -1729,7 +1742,8 @@ int vchiq_mmal_submit_buffer(struct vchi
  	 * videobuf2 won't let us have the dmabuf there.
  	 */
  	if (port->zero_copy && buffer->dma_buf && !buffer->vcsm_handle) {
@@ -300,7 +300,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  		ret = vc_sm_cma_import_dmabuf(buffer->dma_buf,
  					      &buffer->vcsm_handle);
  		if (ret) {
-@@ -1744,8 +1758,8 @@ int vchiq_mmal_submit_buffer(struct vchi
+@@ -1745,8 +1759,8 @@ int vchiq_mmal_submit_buffer(struct vchi
  			vc_sm_cma_free(buffer->vcsm_handle);
  			return ret;
  		}
@@ -311,7 +311,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  	}
  
  	ret = buffer_from_host(instance, port, buffer);
-@@ -1784,8 +1798,8 @@ int mmal_vchi_buffer_cleanup(struct mmal
+@@ -1785,8 +1799,8 @@ int mmal_vchi_buffer_cleanup(struct mmal
  	if (buf->vcsm_handle) {
  		int ret;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0510-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch b/target/linux/bcm27xx/patches-5.15/950-0510-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch
index e41f96c717..9ba31247b6 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0510-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0510-staging-mmal-vchiq-Reset-buffers_with_vpu-on-port_en.patch
@@ -20,7 +20,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
 
 --- a/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
 +++ b/drivers/staging/vc04_services/vchiq-mmal/mmal-vchiq.c
-@@ -1500,6 +1500,8 @@ static int port_enable(struct vchiq_mmal
+@@ -1501,6 +1501,8 @@ static int port_enable(struct vchiq_mmal
  
  	port->enabled = 1;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0520-dt-bindings-media-i2c-Add-IMX519-CMOS-sensor-binding.patch b/target/linux/bcm27xx/patches-5.15/950-0520-dt-bindings-media-i2c-Add-IMX519-CMOS-sensor-binding.patch
index 273285bef5..3b35746fd0 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0520-dt-bindings-media-i2c-Add-IMX519-CMOS-sensor-binding.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0520-dt-bindings-media-i2c-Add-IMX519-CMOS-sensor-binding.patch
@@ -132,7 +132,7 @@ Signed-off-by: Lee Jackson <info at arducam.com>
 +...
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -17553,6 +17553,14 @@ F:	Documentation/devicetree/bindings/med
+@@ -17560,6 +17560,14 @@ F:	Documentation/devicetree/bindings/med
  F:	Documentation/devicetree/bindings/media/i2c/imx477.yaml
  F:	drivers/media/i2c/imx477.c
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0688-drm-panel-Add-and-initialise-an-orientation-field-to.patch b/target/linux/bcm27xx/patches-5.15/950-0688-drm-panel-Add-and-initialise-an-orientation-field-to.patch
index 0b62c8f415..a13fccb48b 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0688-drm-panel-Add-and-initialise-an-orientation-field-to.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0688-drm-panel-Add-and-initialise-an-orientation-field-to.patch
@@ -46,7 +46,7 @@ Signed-off-by: Dave Stevenson <dave.stevenson at raspberrypi.com>
  }
  EXPORT_SYMBOL(drm_panel_init);
  
-@@ -289,16 +292,18 @@ int of_drm_get_panel_orientation(const s
+@@ -294,16 +297,18 @@ int of_drm_get_panel_orientation(const s
  	if (ret < 0)
  		return ret;
  
diff --git a/target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch b/target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch
index 4b2d83bb9a..0b12329e29 100644
--- a/target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch
+++ b/target/linux/bcm27xx/patches-5.15/950-0914-mmc-block-Don-t-do-single-sector-reads-during-recove.patch
@@ -23,7 +23,7 @@ Signed-off-by: Jonathan Bell <jonathan at raspberrypi.com>
 
 --- a/drivers/mmc/core/block.c
 +++ b/drivers/mmc/core/block.c
-@@ -1930,7 +1930,11 @@ static void mmc_blk_mq_rw_recovery(struc
+@@ -1932,7 +1932,11 @@ static void mmc_blk_mq_rw_recovery(struc
  		return;
  	}
  
diff --git a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
index 969d721da6..85710eb79b 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-05-mm-multi-gen-LRU-groundwork.patch
@@ -552,7 +552,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 --- a/kernel/bounds.c
 +++ b/kernel/bounds.c
 @@ -22,6 +22,11 @@ int main(void)
- 	DEFINE(NR_CPUS_BITS, ilog2(CONFIG_NR_CPUS));
+ 	DEFINE(NR_CPUS_BITS, bits_per(CONFIG_NR_CPUS));
  #endif
  	DEFINE(SPINLOCK_SIZE, sizeof(spinlock_t));
 +#ifdef CONFIG_LRU_GEN
diff --git a/target/linux/generic/backport-5.15/020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch b/target/linux/generic/backport-5.15/020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch
index f8a7d9bd7f..14fc73f84d 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-06-mm-multi-gen-LRU-minimal-implementation.patch
@@ -1251,7 +1251,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	get_scan_count(lruvec, sc, nr);
  
  	/* Record the original scan target for proportional adjustments later */
-@@ -3372,6 +4142,9 @@ static void snapshot_refaults(struct mem
+@@ -3375,6 +4145,9 @@ static void snapshot_refaults(struct mem
  	struct lruvec *target_lruvec;
  	unsigned long refaults;
  
@@ -1261,7 +1261,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	target_lruvec = mem_cgroup_lruvec(target_memcg, pgdat);
  	refaults = lruvec_page_state(target_lruvec, WORKINGSET_ACTIVATE_ANON);
  	target_lruvec->refaults[0] = refaults;
-@@ -3736,12 +4509,16 @@ unsigned long try_to_free_mem_cgroup_pag
+@@ -3739,12 +4512,16 @@ unsigned long try_to_free_mem_cgroup_pag
  }
  #endif
  
@@ -1280,7 +1280,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	if (!can_age_anon_pages(pgdat, sc))
  		return;
  
-@@ -4058,12 +4835,11 @@ restart:
+@@ -4061,12 +4838,11 @@ restart:
  		sc.may_swap = !nr_boost_reclaim;
  
  		/*
diff --git a/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch b/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch
index 234dfd916f..4cfd247178 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-08-mm-multi-gen-LRU-support-page-table-walks.patch
@@ -149,7 +149,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 
 --- a/fs/exec.c
 +++ b/fs/exec.c
-@@ -1013,6 +1013,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1014,6 +1014,7 @@ static int exec_mmap(struct mm_struct *m
  	active_mm = tsk->active_mm;
  	tsk->active_mm = mm;
  	tsk->mm = mm;
@@ -157,7 +157,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	/*
  	 * This prevents preemption while active_mm is being loaded and
  	 * it and mm are being updated, which could cause problems for
-@@ -1028,6 +1029,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1029,6 +1030,7 @@ static int exec_mmap(struct mm_struct *m
  	tsk->mm->vmacache_seqnum = 0;
  	vmacache_flush(tsk);
  	task_unlock(tsk);
diff --git a/target/linux/generic/backport-5.15/020-v6.1-15-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch b/target/linux/generic/backport-5.15/020-v6.1-15-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch
index 5b1d378504..b1319d98a3 100644
--- a/target/linux/generic/backport-5.15/020-v6.1-15-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch
+++ b/target/linux/generic/backport-5.15/020-v6.1-15-mm-multi-gen-LRU-move-lru_gen_add_mm-out-of-IRQ-off-.patch
@@ -31,7 +31,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
 
 --- a/fs/exec.c
 +++ b/fs/exec.c
-@@ -1013,7 +1013,6 @@ static int exec_mmap(struct mm_struct *m
+@@ -1014,7 +1014,6 @@ static int exec_mmap(struct mm_struct *m
  	active_mm = tsk->active_mm;
  	tsk->active_mm = mm;
  	tsk->mm = mm;
@@ -39,7 +39,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  	/*
  	 * This prevents preemption while active_mm is being loaded and
  	 * it and mm are being updated, which could cause problems for
-@@ -1028,6 +1027,7 @@ static int exec_mmap(struct mm_struct *m
+@@ -1029,6 +1028,7 @@ static int exec_mmap(struct mm_struct *m
  		local_irq_enable();
  	tsk->mm->vmacache_seqnum = 0;
  	vmacache_flush(tsk);
diff --git a/target/linux/generic/backport-5.15/020-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch b/target/linux/generic/backport-5.15/020-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch
index 8cc9abd84f..cfeeaa662a 100644
--- a/target/linux/generic/backport-5.15/020-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch
+++ b/target/linux/generic/backport-5.15/020-v6.3-26-mm-multi-gen-LRU-per-node-lru_gen_page-lists.patch
@@ -354,7 +354,7 @@ Signed-off-by: Andrew Morton <akpm at linux-foundation.org>
  static void mem_cgroup_css_free(struct cgroup_subsys_state *css)
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -7661,6 +7661,7 @@ static void __init free_area_init_node(i
+@@ -7663,6 +7663,7 @@ static void __init free_area_init_node(i
  	pgdat_set_deferred_range(pgdat);
  
  	free_area_init_core(pgdat);
diff --git a/target/linux/generic/backport-5.15/707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch b/target/linux/generic/backport-5.15/707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch
index 1cae648358..1f2a3ee140 100644
--- a/target/linux/generic/backport-5.15/707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch
+++ b/target/linux/generic/backport-5.15/707-v6.3-net-pcs-add-driver-for-MediaTek-SGMII-PCS.patch
@@ -32,7 +32,7 @@ Signed-off-by: Jakub Kicinski <kuba at kernel.org>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -11783,6 +11783,14 @@ L:	netdev at vger.kernel.org
+@@ -11790,6 +11790,14 @@ L:	netdev at vger.kernel.org
  S:	Maintained
  F:	drivers/net/ethernet/mediatek/
  
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
index b04ec45551..ee944a6fc5 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0011-net-dsa-mt7530-introduce-separate-MDIO-driver.patch
@@ -25,7 +25,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -11895,6 +11895,7 @@ M:	Landen Chao <Landen.Chao at mediatek.com
+@@ -11902,6 +11902,7 @@ M:	Landen Chao <Landen.Chao at mediatek.com
  M:	DENG Qingfang <dqfext at gmail.com>
  L:	netdev at vger.kernel.org
  S:	Maintained
diff --git a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
index 2fad8f2b41..e6c1b941dd 100644
--- a/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
+++ b/target/linux/generic/backport-5.15/790-v6.4-0013-net-dsa-mt7530-introduce-driver-for-MT7988-built-in-.patch
@@ -28,7 +28,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -11893,9 +11893,11 @@ MEDIATEK SWITCH DRIVER
+@@ -11900,9 +11900,11 @@ MEDIATEK SWITCH DRIVER
  M:	Sean Wang <sean.wang at mediatek.com>
  M:	Landen Chao <Landen.Chao at mediatek.com>
  M:	DENG Qingfang <dqfext at gmail.com>
diff --git a/target/linux/generic/backport-5.15/791-v6.2-01-net-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch b/target/linux/generic/backport-5.15/791-v6.2-01-net-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch
index 7c0a490695..c7f5856e8d 100644
--- a/target/linux/generic/backport-5.15/791-v6.2-01-net-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch
+++ b/target/linux/generic/backport-5.15/791-v6.2-01-net-phy-Add-driver-for-Motorcomm-yt8521-gigabit-ethernet.patch
@@ -21,7 +21,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -12694,6 +12694,7 @@ F:	include/uapi/linux/meye.h
+@@ -12701,6 +12701,7 @@ F:	include/uapi/linux/meye.h
  
  MOTORCOMM PHY DRIVER
  M:	Peter Geis <pgwipeout at gmail.com>
diff --git a/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch b/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch
index 79fd479054..ac77fc9b1d 100644
--- a/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch
+++ b/target/linux/generic/backport-5.15/804-v5.18-0009-nvmem-Add-driver-for-OCOTP-in-Sunplus-SP7021.patch
@@ -19,7 +19,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -17959,6 +17959,11 @@ L:	netdev at vger.kernel.org
+@@ -17966,6 +17966,11 @@ L:	netdev at vger.kernel.org
  S:	Maintained
  F:	drivers/net/ethernet/dlink/sundance.c
  
diff --git a/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch b/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch
index 24beeda0d2..f54ba7ebee 100644
--- a/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch
+++ b/target/linux/generic/backport-5.15/806-v6.0-0001-nvmem-microchip-otpc-add-support.patch
@@ -57,7 +57,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -12358,6 +12358,14 @@ S:	Supported
+@@ -12365,6 +12365,14 @@ S:	Supported
  F:	Documentation/devicetree/bindings/mtd/atmel-nand.txt
  F:	drivers/mtd/nand/raw/atmel/*
  
diff --git a/target/linux/generic/backport-5.15/820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch b/target/linux/generic/backport-5.15/820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
index d207ea4872..9ce78e1f09 100644
--- a/target/linux/generic/backport-5.15/820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
+++ b/target/linux/generic/backport-5.15/820-v6.7-0002-nvmem-add-explicit-config-option-to-read-old-syntax-.patch
@@ -132,7 +132,7 @@ Signed-off-by: Greg Kroah-Hartman <gregkh at linuxfoundation.org>
  	imx_ocotp_nvmem_config.priv = priv;
 --- a/drivers/nvmem/meson-efuse.c
 +++ b/drivers/nvmem/meson-efuse.c
-@@ -93,6 +93,7 @@ static int meson_efuse_probe(struct plat
+@@ -74,6 +74,7 @@ static int meson_efuse_probe(struct plat
  
  	econfig->dev = dev;
  	econfig->name = dev_name(dev);
diff --git a/target/linux/generic/config-5.15 b/target/linux/generic/config-5.15
index f527a6fb51..00977650c7 100644
--- a/target/linux/generic/config-5.15
+++ b/target/linux/generic/config-5.15
@@ -4253,6 +4253,7 @@ CONFIG_NEW_LEDS=y
 # CONFIG_NFC is not set
 # CONFIG_NFP is not set
 # CONFIG_NFSD is not set
+# CONFIG_NFSD_V2 is not set
 # CONFIG_NFSD_V2_ACL is not set
 CONFIG_NFSD_V3=y
 # CONFIG_NFSD_V3_ACL is not set
diff --git a/target/linux/generic/hack-5.15/221-module_exports.patch b/target/linux/generic/hack-5.15/221-module_exports.patch
index 87f541b46f..8db0f7dac7 100644
--- a/target/linux/generic/hack-5.15/221-module_exports.patch
+++ b/target/linux/generic/hack-5.15/221-module_exports.patch
@@ -27,8 +27,8 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 +#define SYMTAB_DISCARD_GPL
 +#endif
 +
- /* Align . to a 8 byte boundary equals to maximum function alignment. */
- #define ALIGN_FUNCTION()  . = ALIGN(8)
+ /* Align . function alignment. */
+ #define ALIGN_FUNCTION()  . = ALIGN(CONFIG_FUNCTION_ALIGNMENT)
  
 @@ -485,14 +495,14 @@
  	/* Kernel symbol table: Normal symbols */			\
diff --git a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
index 0060fbbd2a..75c2e41fb6 100644
--- a/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
+++ b/target/linux/generic/hack-5.15/780-usb-net-MeigLink_modem_support.patch
@@ -43,7 +43,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  
  #define QUECTEL_VENDOR_ID			0x2c7c
  /* These Quectel products use Quectel's vendor ID */
-@@ -1147,6 +1152,11 @@ static const struct usb_device_id option
+@@ -1152,6 +1157,11 @@ static const struct usb_device_id option
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x0023)}, /* ONYX 3G device */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, 0x9000), /* SIMCom SIM5218 */
  	  .driver_info = NCTRL(0) | NCTRL(1) | NCTRL(2) | NCTRL(3) | RSVD(4) },
@@ -55,7 +55,7 @@ Subject: [PATCH] net/usb/qmi_wwan: add MeigLink modem support
  	/* Quectel products using Qualcomm vendor ID */
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC15)},
  	{ USB_DEVICE(QUALCOMM_VENDOR_ID, QUECTEL_PRODUCT_UC20),
-@@ -1188,6 +1198,11 @@ static const struct usb_device_id option
+@@ -1193,6 +1203,11 @@ static const struct usb_device_id option
  	  .driver_info = ZLP },
  	{ USB_DEVICE(QUECTEL_VENDOR_ID, QUECTEL_PRODUCT_BG96),
  	  .driver_info = RSVD(4) },
diff --git a/target/linux/generic/hack-5.15/902-debloat_proc.patch b/target/linux/generic/hack-5.15/902-debloat_proc.patch
index 4d82317b70..c7e40dfc6a 100644
--- a/target/linux/generic/hack-5.15/902-debloat_proc.patch
+++ b/target/linux/generic/hack-5.15/902-debloat_proc.patch
@@ -29,7 +29,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/fs/locks.c
 +++ b/fs/locks.c
-@@ -2953,6 +2953,8 @@ static const struct seq_operations locks
+@@ -3008,6 +3008,8 @@ static const struct seq_operations locks
  
  static int __init proc_locks_init(void)
  {
diff --git a/target/linux/generic/hack-5.15/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch b/target/linux/generic/hack-5.15/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
index 4f4d6c7509..b4339e82d7 100644
--- a/target/linux/generic/hack-5.15/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
+++ b/target/linux/generic/hack-5.15/930-Revert-Revert-Revert-driver-core-Set-fw_devlink-on-b.patch
@@ -19,7 +19,7 @@ Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 
 --- a/drivers/base/core.c
 +++ b/drivers/base/core.c
-@@ -1562,7 +1562,7 @@ static void device_links_purge(struct de
+@@ -1577,7 +1577,7 @@ static void device_links_purge(struct de
  #define FW_DEVLINK_FLAGS_RPM		(FW_DEVLINK_FLAGS_ON | \
  					 DL_FLAG_PM_RUNTIME)
  
diff --git a/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch b/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
index ac5e3a69b8..42f5a8c246 100644
--- a/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
+++ b/target/linux/generic/pending-5.15/120-Fix-alloc_node_mem_map-with-ARCH_PFN_OFFSET-calcu.patch
@@ -71,7 +71,7 @@ Signed-off-by: Tobias Wolf <dev-NTEO at vplace.de>
 
 --- a/mm/page_alloc.c
 +++ b/mm/page_alloc.c
-@@ -7620,7 +7620,7 @@ static void __init alloc_node_mem_map(st
+@@ -7622,7 +7622,7 @@ static void __init alloc_node_mem_map(st
  	if (pgdat == NODE_DATA(0)) {
  		mem_map = NODE_DATA(0)->node_mem_map;
  		if (page_to_pfn(mem_map) != pgdat->node_start_pfn)
diff --git a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
index c1e050e935..b17196d3a9 100644
--- a/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
+++ b/target/linux/generic/pending-5.15/610-netfilter_match_bypass_default_checks.patch
@@ -91,7 +91,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
  		for (i = sizeof(struct ipt_entry);
  		     i < e->target_offset;
  		     i += m->u.match_size) {
-@@ -1222,12 +1259,15 @@ compat_copy_entry_to_user(struct ipt_ent
+@@ -1224,12 +1261,15 @@ compat_copy_entry_to_user(struct ipt_ent
  	compat_uint_t origsize;
  	const struct xt_entry_match *ematch;
  	int ret = 0;
diff --git a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
index 70aee30eb6..2f1b3ed793 100644
--- a/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
+++ b/target/linux/generic/pending-5.15/701-netfilter-nf_tables-ignore-EOPNOTSUPP-on-flowtable-d.patch
@@ -18,7 +18,7 @@ Signed-off-by: Felix Fietkau <nbd at nbd.name>
 
 --- a/net/netfilter/nf_tables_api.c
 +++ b/net/netfilter/nf_tables_api.c
-@@ -7770,7 +7770,7 @@ static int nft_register_flowtable_net_ho
+@@ -7803,7 +7803,7 @@ static int nft_register_flowtable_net_ho
  		err = flowtable->data.type->setup(&flowtable->data,
  						  hook->ops.dev,
  						  FLOW_BLOCK_BIND);
diff --git a/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch b/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch
index 8e2f3a9475..54c07f0022 100644
--- a/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch
+++ b/target/linux/generic/pending-5.15/750-skb-Do-mix-page-pool-and-page-referenced-frags-in-GR.patch
@@ -17,7 +17,7 @@ Signed-off-by: Alexander Duyck <alexanderduyck at fb.com>
 
 --- a/net/core/skbuff.c
 +++ b/net/core/skbuff.c
-@@ -4359,6 +4359,15 @@ int skb_gro_receive(struct sk_buff *p, s
+@@ -4360,6 +4360,15 @@ int skb_gro_receive(struct sk_buff *p, s
  	if (unlikely(p->len + len >= 65536 || NAPI_GRO_CB(skb)->flush))
  		return -E2BIG;
  
diff --git a/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch b/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch
index f7f16ee37d..302051cc3b 100644
--- a/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch
+++ b/target/linux/generic/pending-5.15/810-pci_disable_common_quirks.patch
@@ -25,7 +25,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -206,6 +206,7 @@ static void quirk_mmio_always_on(struct
+@@ -207,6 +207,7 @@ static void quirk_mmio_always_on(struct
  DECLARE_PCI_FIXUP_CLASS_EARLY(PCI_ANY_ID, PCI_ANY_ID,
  				PCI_CLASS_BRIDGE_HOST, 8, quirk_mmio_always_on);
  
@@ -33,7 +33,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * The Mellanox Tavor device gives false positive parity errors.  Disable
   * parity error reporting.
-@@ -3368,6 +3369,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+@@ -3369,6 +3370,8 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65f9, quirk_intel_mc_errata);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x65fa, quirk_intel_mc_errata);
  
@@ -42,7 +42,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * Ivytown NTB BAR sizes are misreported by the hardware due to an erratum.
   * To work around this, query the size it should be configured to by the
-@@ -3393,6 +3396,8 @@ static void quirk_intel_ntb(struct pci_d
+@@ -3394,6 +3397,8 @@ static void quirk_intel_ntb(struct pci_d
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e08, quirk_intel_ntb);
  DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0x0e0d, quirk_intel_ntb);
  
@@ -51,7 +51,7 @@ Signed-off-by: Gabor Juhos <juhosg at openwrt.org>
  /*
   * Some BIOS implementations leave the Intel GPU interrupts enabled, even
   * though no one is handling them (e.g., if the i915 driver is never
-@@ -3431,6 +3436,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
+@@ -3432,6 +3437,8 @@ DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_IN
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x010a, disable_igfx_irq);
  DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_INTEL, 0x0152, disable_igfx_irq);
  
diff --git a/target/linux/ipq807x/patches-5.15/0021-v6.0-clk-qcom-ipq8074-add-PPE-crypto-clock.patch b/target/linux/ipq807x/patches-5.15/0021-v6.0-clk-qcom-ipq8074-add-PPE-crypto-clock.patch
index a0b171fd27..ff2df84ad1 100644
--- a/target/linux/ipq807x/patches-5.15/0021-v6.0-clk-qcom-ipq8074-add-PPE-crypto-clock.patch
+++ b/target/linux/ipq807x/patches-5.15/0021-v6.0-clk-qcom-ipq8074-add-PPE-crypto-clock.patch
@@ -17,7 +17,7 @@ Link: https://lore.kernel.org/r/20220515210048.483898-5-robimarko at gmail.com
 
 --- a/drivers/clk/qcom/gcc-ipq8074.c
 +++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -3177,6 +3177,24 @@ static struct clk_branch gcc_nss_ptp_ref
+@@ -3179,6 +3179,24 @@ static struct clk_branch gcc_nss_ptp_ref
  	},
  };
  
@@ -42,7 +42,7 @@ Link: https://lore.kernel.org/r/20220515210048.483898-5-robimarko at gmail.com
  static struct clk_branch gcc_nssnoc_ce_apb_clk = {
  	.halt_reg = 0x6830c,
  	.clkr = {
-@@ -4649,6 +4667,7 @@ static struct clk_regmap *gcc_ipq8074_cl
+@@ -4651,6 +4669,7 @@ static struct clk_regmap *gcc_ipq8074_cl
  	[GCC_PCIE0_RCHNG_CLK_SRC] = &pcie0_rchng_clk_src.clkr,
  	[GCC_PCIE0_RCHNG_CLK] = &gcc_pcie0_rchng_clk.clkr,
  	[GCC_PCIE0_AXI_S_BRIDGE_CLK] = &gcc_pcie0_axi_s_bridge_clk.clkr,
diff --git a/target/linux/ipq807x/patches-5.15/0023-v6.0-clk-qcom-ipq8074-add-USB-GDSCs.patch b/target/linux/ipq807x/patches-5.15/0023-v6.0-clk-qcom-ipq8074-add-USB-GDSCs.patch
index b200616c3f..fda7ee9958 100644
--- a/target/linux/ipq807x/patches-5.15/0023-v6.0-clk-qcom-ipq8074-add-USB-GDSCs.patch
+++ b/target/linux/ipq807x/patches-5.15/0023-v6.0-clk-qcom-ipq8074-add-USB-GDSCs.patch
@@ -33,7 +33,7 @@ Link: https://lore.kernel.org/r/20220515210048.483898-9-robimarko at gmail.com
  #include "reset.h"
  
  enum {
-@@ -4402,6 +4403,22 @@ static struct clk_branch gcc_pcie0_axi_s
+@@ -4404,6 +4405,22 @@ static struct clk_branch gcc_pcie0_axi_s
  	},
  };
  
@@ -56,7 +56,7 @@ Link: https://lore.kernel.org/r/20220515210048.483898-9-robimarko at gmail.com
  static const struct alpha_pll_config ubi32_pll_config = {
  	.l = 0x4e,
  	.config_ctl_val = 0x200d4aa8,
-@@ -4805,6 +4822,11 @@ static const struct qcom_reset_map gcc_i
+@@ -4807,6 +4824,11 @@ static const struct qcom_reset_map gcc_i
  	[GCC_PCIE1_AXI_MASTER_STICKY_ARES] = { 0x76040, 6 },
  };
  
@@ -68,7 +68,7 @@ Link: https://lore.kernel.org/r/20220515210048.483898-9-robimarko at gmail.com
  static const struct of_device_id gcc_ipq8074_match_table[] = {
  	{ .compatible = "qcom,gcc-ipq8074" },
  	{ }
-@@ -4827,6 +4849,8 @@ static const struct qcom_cc_desc gcc_ipq
+@@ -4829,6 +4851,8 @@ static const struct qcom_cc_desc gcc_ipq
  	.num_resets = ARRAY_SIZE(gcc_ipq8074_resets),
  	.clk_hws = gcc_ipq8074_hws,
  	.num_clk_hws = ARRAY_SIZE(gcc_ipq8074_hws),
diff --git a/target/linux/ipq807x/patches-5.15/0047-v6.2-clk-qcom-ipq8074-convert-to-parent-data.patch b/target/linux/ipq807x/patches-5.15/0047-v6.2-clk-qcom-ipq8074-convert-to-parent-data.patch
index c209adbc06..20245698b5 100644
--- a/target/linux/ipq807x/patches-5.15/0047-v6.2-clk-qcom-ipq8074-convert-to-parent-data.patch
+++ b/target/linux/ipq807x/patches-5.15/0047-v6.2-clk-qcom-ipq8074-convert-to-parent-data.patch
@@ -808,8 +808,8 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -975,6 +647,18 @@ static const struct freq_tbl ftbl_pcie_a
- 	F(19200000, P_XO, 1, 0, 0),
+@@ -976,6 +648,18 @@ static const struct freq_tbl ftbl_pcie_a
+ 	{ }
  };
  
 +static const struct clk_parent_data gcc_xo_gpll0_sleep_clk[] = {
@@ -827,7 +827,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 pcie0_aux_clk_src = {
  	.cmd_rcgr = 0x75024,
  	.freq_tbl = ftbl_pcie_aux_clk_src,
-@@ -983,12 +667,22 @@ static struct clk_rcg2 pcie0_aux_clk_src
+@@ -984,12 +668,22 @@ static struct clk_rcg2 pcie0_aux_clk_src
  	.parent_map = gcc_xo_gpll0_sleep_clk_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "pcie0_aux_clk_src",
@@ -852,7 +852,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_regmap_mux pcie0_pipe_clk_src = {
  	.reg = 0x7501c,
  	.shift = 8,
-@@ -997,8 +691,8 @@ static struct clk_regmap_mux pcie0_pipe_
+@@ -998,8 +692,8 @@ static struct clk_regmap_mux pcie0_pipe_
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "pcie0_pipe_clk_src",
@@ -863,7 +863,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.ops = &clk_regmap_mux_closest_ops,
  			.flags = CLK_SET_RATE_PARENT,
  		},
-@@ -1013,7 +707,7 @@ static struct clk_rcg2 pcie1_axi_clk_src
+@@ -1014,7 +708,7 @@ static struct clk_rcg2 pcie1_axi_clk_src
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "pcie1_axi_clk_src",
  		.parent_data = gcc_xo_gpll0,
@@ -872,7 +872,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1026,12 +720,22 @@ static struct clk_rcg2 pcie1_aux_clk_src
+@@ -1027,12 +721,22 @@ static struct clk_rcg2 pcie1_aux_clk_src
  	.parent_map = gcc_xo_gpll0_sleep_clk_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "pcie1_aux_clk_src",
@@ -897,7 +897,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_regmap_mux pcie1_pipe_clk_src = {
  	.reg = 0x7601c,
  	.shift = 8,
-@@ -1040,8 +744,8 @@ static struct clk_regmap_mux pcie1_pipe_
+@@ -1041,8 +745,8 @@ static struct clk_regmap_mux pcie1_pipe_
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "pcie1_pipe_clk_src",
@@ -908,7 +908,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.ops = &clk_regmap_mux_closest_ops,
  			.flags = CLK_SET_RATE_PARENT,
  		},
-@@ -1060,6 +764,20 @@ static const struct freq_tbl ftbl_sdcc_a
+@@ -1061,6 +765,20 @@ static const struct freq_tbl ftbl_sdcc_a
  	{ }
  };
  
@@ -929,7 +929,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 sdcc1_apps_clk_src = {
  	.cmd_rcgr = 0x42004,
  	.freq_tbl = ftbl_sdcc_apps_clk_src,
-@@ -1068,8 +786,8 @@ static struct clk_rcg2 sdcc1_apps_clk_sr
+@@ -1069,8 +787,8 @@ static struct clk_rcg2 sdcc1_apps_clk_sr
  	.parent_map = gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "sdcc1_apps_clk_src",
@@ -940,8 +940,8 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_floor_ops,
  	},
  };
-@@ -1080,6 +798,20 @@ static const struct freq_tbl ftbl_sdcc_i
- 	F(308570000, P_GPLL6, 3.5, 0, 0),
+@@ -1082,6 +800,20 @@ static const struct freq_tbl ftbl_sdcc_i
+ 	{ }
  };
  
 +static const struct clk_parent_data gcc_xo_gpll0_gpll6_gpll0_div2[] = {
@@ -961,7 +961,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 sdcc1_ice_core_clk_src = {
  	.cmd_rcgr = 0x5d000,
  	.freq_tbl = ftbl_sdcc_ice_core_clk_src,
-@@ -1088,8 +820,8 @@ static struct clk_rcg2 sdcc1_ice_core_cl
+@@ -1090,8 +822,8 @@ static struct clk_rcg2 sdcc1_ice_core_cl
  	.parent_map = gcc_xo_gpll0_gpll6_gpll0_div2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "sdcc1_ice_core_clk_src",
@@ -972,7 +972,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1102,8 +834,8 @@ static struct clk_rcg2 sdcc2_apps_clk_sr
+@@ -1104,8 +836,8 @@ static struct clk_rcg2 sdcc2_apps_clk_sr
  	.parent_map = gcc_xo_gpll0_gpll2_gpll0_out_main_div2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "sdcc2_apps_clk_src",
@@ -983,7 +983,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_floor_ops,
  	},
  };
-@@ -1115,6 +847,18 @@ static const struct freq_tbl ftbl_usb_ma
+@@ -1117,6 +849,18 @@ static const struct freq_tbl ftbl_usb_ma
  	{ }
  };
  
@@ -1002,7 +1002,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 usb0_master_clk_src = {
  	.cmd_rcgr = 0x3e00c,
  	.freq_tbl = ftbl_usb_master_clk_src,
-@@ -1123,8 +867,8 @@ static struct clk_rcg2 usb0_master_clk_s
+@@ -1125,8 +869,8 @@ static struct clk_rcg2 usb0_master_clk_s
  	.parent_map = gcc_xo_gpll0_out_main_div2_gpll0_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "usb0_master_clk_src",
@@ -1013,7 +1013,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1142,8 +886,8 @@ static struct clk_rcg2 usb0_aux_clk_src
+@@ -1144,8 +888,8 @@ static struct clk_rcg2 usb0_aux_clk_src
  	.parent_map = gcc_xo_gpll0_sleep_clk_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "usb0_aux_clk_src",
@@ -1024,7 +1024,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1155,6 +899,20 @@ static const struct freq_tbl ftbl_usb_mo
+@@ -1157,6 +901,20 @@ static const struct freq_tbl ftbl_usb_mo
  	{ }
  };
  
@@ -1045,7 +1045,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 usb0_mock_utmi_clk_src = {
  	.cmd_rcgr = 0x3e020,
  	.freq_tbl = ftbl_usb_mock_utmi_clk_src,
-@@ -1163,12 +921,22 @@ static struct clk_rcg2 usb0_mock_utmi_cl
+@@ -1165,12 +923,22 @@ static struct clk_rcg2 usb0_mock_utmi_cl
  	.parent_map = gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "usb0_mock_utmi_clk_src",
@@ -1070,7 +1070,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_regmap_mux usb0_pipe_clk_src = {
  	.reg = 0x3e048,
  	.shift = 8,
-@@ -1177,8 +945,8 @@ static struct clk_regmap_mux usb0_pipe_c
+@@ -1179,8 +947,8 @@ static struct clk_regmap_mux usb0_pipe_c
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "usb0_pipe_clk_src",
@@ -1081,7 +1081,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.ops = &clk_regmap_mux_closest_ops,
  			.flags = CLK_SET_RATE_PARENT,
  		},
-@@ -1193,8 +961,8 @@ static struct clk_rcg2 usb1_master_clk_s
+@@ -1195,8 +963,8 @@ static struct clk_rcg2 usb1_master_clk_s
  	.parent_map = gcc_xo_gpll0_out_main_div2_gpll0_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "usb1_master_clk_src",
@@ -1092,7 +1092,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1207,8 +975,8 @@ static struct clk_rcg2 usb1_aux_clk_src
+@@ -1209,8 +977,8 @@ static struct clk_rcg2 usb1_aux_clk_src
  	.parent_map = gcc_xo_gpll0_sleep_clk_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "usb1_aux_clk_src",
@@ -1103,7 +1103,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1221,12 +989,22 @@ static struct clk_rcg2 usb1_mock_utmi_cl
+@@ -1223,12 +991,22 @@ static struct clk_rcg2 usb1_mock_utmi_cl
  	.parent_map = gcc_xo_gpll6_gpll0_gpll0_out_main_div2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "usb1_mock_utmi_clk_src",
@@ -1128,7 +1128,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_regmap_mux usb1_pipe_clk_src = {
  	.reg = 0x3f048,
  	.shift = 8,
-@@ -1235,8 +1013,8 @@ static struct clk_regmap_mux usb1_pipe_c
+@@ -1237,8 +1015,8 @@ static struct clk_regmap_mux usb1_pipe_c
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "usb1_pipe_clk_src",
@@ -1139,7 +1139,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.ops = &clk_regmap_mux_closest_ops,
  			.flags = CLK_SET_RATE_PARENT,
  		},
-@@ -1250,8 +1028,9 @@ static struct clk_branch gcc_xo_clk_src
+@@ -1252,8 +1030,9 @@ static struct clk_branch gcc_xo_clk_src
  		.enable_mask = BIT(1),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_xo_clk_src",
@@ -1151,7 +1151,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			},
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT | CLK_IS_CRITICAL,
-@@ -1265,9 +1044,8 @@ static struct clk_fixed_factor gcc_xo_di
+@@ -1267,9 +1046,8 @@ static struct clk_fixed_factor gcc_xo_di
  	.div = 4,
  	.hw.init = &(struct clk_init_data){
  		.name = "gcc_xo_div4_clk_src",
@@ -1163,7 +1163,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.num_parents = 1,
  		.ops = &clk_fixed_factor_ops,
  		.flags = CLK_SET_RATE_PARENT,
-@@ -1285,6 +1063,20 @@ static const struct freq_tbl ftbl_system
+@@ -1287,6 +1065,20 @@ static const struct freq_tbl ftbl_system
  	{ }
  };
  
@@ -1184,7 +1184,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 system_noc_bfdcd_clk_src = {
  	.cmd_rcgr = 0x26004,
  	.freq_tbl = ftbl_system_noc_bfdcd_clk_src,
-@@ -1292,8 +1084,8 @@ static struct clk_rcg2 system_noc_bfdcd_
+@@ -1294,8 +1086,8 @@ static struct clk_rcg2 system_noc_bfdcd_
  	.parent_map = gcc_xo_gpll0_gpll6_gpll0_out_main_div2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "system_noc_bfdcd_clk_src",
@@ -1195,7 +1195,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  		.flags = CLK_IS_CRITICAL,
  	},
-@@ -1304,9 +1096,8 @@ static struct clk_fixed_factor system_no
+@@ -1306,9 +1098,8 @@ static struct clk_fixed_factor system_no
  	.div = 1,
  	.hw.init = &(struct clk_init_data){
  		.name = "system_noc_clk_src",
@@ -1207,7 +1207,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.num_parents = 1,
  		.ops = &clk_fixed_factor_ops,
  		.flags = CLK_SET_RATE_PARENT,
-@@ -1327,7 +1118,7 @@ static struct clk_rcg2 nss_ce_clk_src =
+@@ -1329,7 +1120,7 @@ static struct clk_rcg2 nss_ce_clk_src =
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_ce_clk_src",
  		.parent_data = gcc_xo_gpll0,
@@ -1216,7 +1216,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1338,6 +1129,20 @@ static const struct freq_tbl ftbl_nss_no
+@@ -1340,6 +1131,20 @@ static const struct freq_tbl ftbl_nss_no
  	{ }
  };
  
@@ -1237,7 +1237,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_noc_bfdcd_clk_src = {
  	.cmd_rcgr = 0x68088,
  	.freq_tbl = ftbl_nss_noc_bfdcd_clk_src,
-@@ -1345,8 +1150,8 @@ static struct clk_rcg2 nss_noc_bfdcd_clk
+@@ -1347,8 +1152,8 @@ static struct clk_rcg2 nss_noc_bfdcd_clk
  	.parent_map = gcc_xo_bias_pll_nss_noc_clk_gpll0_gpll2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_noc_bfdcd_clk_src",
@@ -1248,7 +1248,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1356,9 +1161,8 @@ static struct clk_fixed_factor nss_noc_c
+@@ -1358,9 +1163,8 @@ static struct clk_fixed_factor nss_noc_c
  	.div = 1,
  	.hw.init = &(struct clk_init_data){
  		.name = "nss_noc_clk_src",
@@ -1260,7 +1260,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.num_parents = 1,
  		.ops = &clk_fixed_factor_ops,
  		.flags = CLK_SET_RATE_PARENT,
-@@ -1371,6 +1175,18 @@ static const struct freq_tbl ftbl_nss_cr
+@@ -1373,6 +1177,18 @@ static const struct freq_tbl ftbl_nss_cr
  	{ }
  };
  
@@ -1279,7 +1279,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_crypto_clk_src = {
  	.cmd_rcgr = 0x68144,
  	.freq_tbl = ftbl_nss_crypto_clk_src,
-@@ -1379,8 +1195,8 @@ static struct clk_rcg2 nss_crypto_clk_sr
+@@ -1381,8 +1197,8 @@ static struct clk_rcg2 nss_crypto_clk_sr
  	.parent_map = gcc_xo_nss_crypto_pll_gpll0_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_crypto_clk_src",
@@ -1290,7 +1290,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1394,6 +1210,24 @@ static const struct freq_tbl ftbl_nss_ub
+@@ -1396,6 +1212,24 @@ static const struct freq_tbl ftbl_nss_ub
  	{ }
  };
  
@@ -1315,7 +1315,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_ubi0_clk_src = {
  	.cmd_rcgr = 0x68104,
  	.freq_tbl = ftbl_nss_ubi_clk_src,
-@@ -1401,8 +1235,8 @@ static struct clk_rcg2 nss_ubi0_clk_src
+@@ -1403,8 +1237,8 @@ static struct clk_rcg2 nss_ubi0_clk_src
  	.parent_map = gcc_xo_ubi32_gpll0_gpll2_gpll4_gpll6_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_ubi0_clk_src",
@@ -1326,7 +1326,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  		.flags = CLK_SET_RATE_PARENT,
  	},
-@@ -1415,9 +1249,8 @@ static struct clk_regmap_div nss_ubi0_di
+@@ -1417,9 +1251,8 @@ static struct clk_regmap_div nss_ubi0_di
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_ubi0_div_clk_src",
@@ -1338,7 +1338,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ro_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1432,8 +1265,8 @@ static struct clk_rcg2 nss_ubi1_clk_src
+@@ -1434,8 +1267,8 @@ static struct clk_rcg2 nss_ubi1_clk_src
  	.parent_map = gcc_xo_ubi32_gpll0_gpll2_gpll4_gpll6_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_ubi1_clk_src",
@@ -1349,7 +1349,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  		.flags = CLK_SET_RATE_PARENT,
  	},
-@@ -1446,9 +1279,8 @@ static struct clk_regmap_div nss_ubi1_di
+@@ -1448,9 +1281,8 @@ static struct clk_regmap_div nss_ubi1_di
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_ubi1_div_clk_src",
@@ -1361,7 +1361,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ro_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1462,6 +1294,16 @@ static const struct freq_tbl ftbl_ubi_mp
+@@ -1464,6 +1296,16 @@ static const struct freq_tbl ftbl_ubi_mp
  	{ }
  };
  
@@ -1378,7 +1378,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 ubi_mpt_clk_src = {
  	.cmd_rcgr = 0x68090,
  	.freq_tbl = ftbl_ubi_mpt_clk_src,
-@@ -1469,8 +1311,8 @@ static struct clk_rcg2 ubi_mpt_clk_src =
+@@ -1471,8 +1313,8 @@ static struct clk_rcg2 ubi_mpt_clk_src =
  	.parent_map = gcc_xo_gpll0_out_main_div2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "ubi_mpt_clk_src",
@@ -1389,7 +1389,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1481,6 +1323,18 @@ static const struct freq_tbl ftbl_nss_im
+@@ -1483,6 +1325,18 @@ static const struct freq_tbl ftbl_nss_im
  	{ }
  };
  
@@ -1408,7 +1408,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_imem_clk_src = {
  	.cmd_rcgr = 0x68158,
  	.freq_tbl = ftbl_nss_imem_clk_src,
-@@ -1488,8 +1342,8 @@ static struct clk_rcg2 nss_imem_clk_src
+@@ -1490,8 +1344,8 @@ static struct clk_rcg2 nss_imem_clk_src
  	.parent_map = gcc_xo_gpll0_gpll4_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_imem_clk_src",
@@ -1419,7 +1419,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1500,6 +1354,24 @@ static const struct freq_tbl ftbl_nss_pp
+@@ -1502,6 +1356,24 @@ static const struct freq_tbl ftbl_nss_pp
  	{ }
  };
  
@@ -1444,7 +1444,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_ppe_clk_src = {
  	.cmd_rcgr = 0x68080,
  	.freq_tbl = ftbl_nss_ppe_clk_src,
-@@ -1507,8 +1379,8 @@ static struct clk_rcg2 nss_ppe_clk_src =
+@@ -1509,8 +1381,8 @@ static struct clk_rcg2 nss_ppe_clk_src =
  	.parent_map = gcc_xo_bias_gpll0_gpll4_nss_ubi32_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_ppe_clk_src",
@@ -1455,7 +1455,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1518,9 +1390,8 @@ static struct clk_fixed_factor nss_ppe_c
+@@ -1520,9 +1392,8 @@ static struct clk_fixed_factor nss_ppe_c
  	.div = 4,
  	.hw.init = &(struct clk_init_data){
  		.name = "nss_ppe_cdiv_clk_src",
@@ -1467,7 +1467,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.num_parents = 1,
  		.ops = &clk_fixed_factor_ops,
  		.flags = CLK_SET_RATE_PARENT,
-@@ -1534,6 +1405,22 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1536,6 +1407,22 @@ static const struct freq_tbl ftbl_nss_po
  	{ }
  };
  
@@ -1490,7 +1490,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_port1_rx_clk_src = {
  	.cmd_rcgr = 0x68020,
  	.freq_tbl = ftbl_nss_port1_rx_clk_src,
-@@ -1541,8 +1428,8 @@ static struct clk_rcg2 nss_port1_rx_clk_
+@@ -1543,8 +1430,8 @@ static struct clk_rcg2 nss_port1_rx_clk_
  	.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port1_rx_clk_src",
@@ -1501,7 +1501,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1554,9 +1441,8 @@ static struct clk_regmap_div nss_port1_r
+@@ -1556,9 +1443,8 @@ static struct clk_regmap_div nss_port1_r
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port1_rx_div_clk_src",
@@ -1513,7 +1513,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1571,6 +1457,22 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1573,6 +1459,22 @@ static const struct freq_tbl ftbl_nss_po
  	{ }
  };
  
@@ -1536,7 +1536,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_port1_tx_clk_src = {
  	.cmd_rcgr = 0x68028,
  	.freq_tbl = ftbl_nss_port1_tx_clk_src,
-@@ -1578,8 +1480,8 @@ static struct clk_rcg2 nss_port1_tx_clk_
+@@ -1580,8 +1482,8 @@ static struct clk_rcg2 nss_port1_tx_clk_
  	.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port1_tx_clk_src",
@@ -1547,7 +1547,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1591,9 +1493,8 @@ static struct clk_regmap_div nss_port1_t
+@@ -1593,9 +1495,8 @@ static struct clk_regmap_div nss_port1_t
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port1_tx_div_clk_src",
@@ -1559,7 +1559,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1608,8 +1509,8 @@ static struct clk_rcg2 nss_port2_rx_clk_
+@@ -1610,8 +1511,8 @@ static struct clk_rcg2 nss_port2_rx_clk_
  	.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port2_rx_clk_src",
@@ -1570,7 +1570,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1621,9 +1522,8 @@ static struct clk_regmap_div nss_port2_r
+@@ -1623,9 +1524,8 @@ static struct clk_regmap_div nss_port2_r
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port2_rx_div_clk_src",
@@ -1582,7 +1582,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1638,8 +1538,8 @@ static struct clk_rcg2 nss_port2_tx_clk_
+@@ -1640,8 +1540,8 @@ static struct clk_rcg2 nss_port2_tx_clk_
  	.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port2_tx_clk_src",
@@ -1593,7 +1593,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1651,9 +1551,8 @@ static struct clk_regmap_div nss_port2_t
+@@ -1653,9 +1553,8 @@ static struct clk_regmap_div nss_port2_t
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port2_tx_div_clk_src",
@@ -1605,7 +1605,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1668,8 +1567,8 @@ static struct clk_rcg2 nss_port3_rx_clk_
+@@ -1670,8 +1569,8 @@ static struct clk_rcg2 nss_port3_rx_clk_
  	.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port3_rx_clk_src",
@@ -1616,7 +1616,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1681,9 +1580,8 @@ static struct clk_regmap_div nss_port3_r
+@@ -1683,9 +1582,8 @@ static struct clk_regmap_div nss_port3_r
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port3_rx_div_clk_src",
@@ -1628,7 +1628,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1698,8 +1596,8 @@ static struct clk_rcg2 nss_port3_tx_clk_
+@@ -1700,8 +1598,8 @@ static struct clk_rcg2 nss_port3_tx_clk_
  	.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port3_tx_clk_src",
@@ -1639,7 +1639,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1711,9 +1609,8 @@ static struct clk_regmap_div nss_port3_t
+@@ -1713,9 +1611,8 @@ static struct clk_regmap_div nss_port3_t
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port3_tx_div_clk_src",
@@ -1651,7 +1651,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1728,8 +1625,8 @@ static struct clk_rcg2 nss_port4_rx_clk_
+@@ -1730,8 +1627,8 @@ static struct clk_rcg2 nss_port4_rx_clk_
  	.parent_map = gcc_xo_uniphy0_rx_tx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port4_rx_clk_src",
@@ -1662,7 +1662,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1741,9 +1638,8 @@ static struct clk_regmap_div nss_port4_r
+@@ -1743,9 +1640,8 @@ static struct clk_regmap_div nss_port4_r
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port4_rx_div_clk_src",
@@ -1674,7 +1674,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1758,8 +1654,8 @@ static struct clk_rcg2 nss_port4_tx_clk_
+@@ -1760,8 +1656,8 @@ static struct clk_rcg2 nss_port4_tx_clk_
  	.parent_map = gcc_xo_uniphy0_tx_rx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port4_tx_clk_src",
@@ -1685,7 +1685,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1771,9 +1667,8 @@ static struct clk_regmap_div nss_port4_t
+@@ -1773,9 +1669,8 @@ static struct clk_regmap_div nss_port4_t
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port4_tx_div_clk_src",
@@ -1697,7 +1697,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1793,6 +1688,27 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1795,6 +1690,27 @@ static const struct freq_tbl ftbl_nss_po
  	{ }
  };
  
@@ -1725,7 +1725,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_port5_rx_clk_src = {
  	.cmd_rcgr = 0x68060,
  	.freq_tbl = ftbl_nss_port5_rx_clk_src,
-@@ -1800,8 +1716,8 @@ static struct clk_rcg2 nss_port5_rx_clk_
+@@ -1802,8 +1718,8 @@ static struct clk_rcg2 nss_port5_rx_clk_
  	.parent_map = gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port5_rx_clk_src",
@@ -1736,7 +1736,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1813,9 +1729,8 @@ static struct clk_regmap_div nss_port5_r
+@@ -1815,9 +1731,8 @@ static struct clk_regmap_div nss_port5_r
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port5_rx_div_clk_src",
@@ -1748,7 +1748,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1835,6 +1750,27 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1837,6 +1752,27 @@ static const struct freq_tbl ftbl_nss_po
  	{ }
  };
  
@@ -1776,7 +1776,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_port5_tx_clk_src = {
  	.cmd_rcgr = 0x68068,
  	.freq_tbl = ftbl_nss_port5_tx_clk_src,
-@@ -1842,8 +1778,8 @@ static struct clk_rcg2 nss_port5_tx_clk_
+@@ -1844,8 +1780,8 @@ static struct clk_rcg2 nss_port5_tx_clk_
  	.parent_map = gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port5_tx_clk_src",
@@ -1787,7 +1787,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1855,9 +1791,8 @@ static struct clk_regmap_div nss_port5_t
+@@ -1857,9 +1793,8 @@ static struct clk_regmap_div nss_port5_t
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port5_tx_div_clk_src",
@@ -1799,7 +1799,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1877,6 +1812,22 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1879,6 +1814,22 @@ static const struct freq_tbl ftbl_nss_po
  	{ }
  };
  
@@ -1822,7 +1822,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_port6_rx_clk_src = {
  	.cmd_rcgr = 0x68070,
  	.freq_tbl = ftbl_nss_port6_rx_clk_src,
-@@ -1884,8 +1835,8 @@ static struct clk_rcg2 nss_port6_rx_clk_
+@@ -1886,8 +1837,8 @@ static struct clk_rcg2 nss_port6_rx_clk_
  	.parent_map = gcc_xo_uniphy2_rx_tx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port6_rx_clk_src",
@@ -1833,7 +1833,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1897,9 +1848,8 @@ static struct clk_regmap_div nss_port6_r
+@@ -1899,9 +1850,8 @@ static struct clk_regmap_div nss_port6_r
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port6_rx_div_clk_src",
@@ -1845,7 +1845,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1919,6 +1869,22 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1921,6 +1871,22 @@ static const struct freq_tbl ftbl_nss_po
  	{ }
  };
  
@@ -1868,7 +1868,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 nss_port6_tx_clk_src = {
  	.cmd_rcgr = 0x68078,
  	.freq_tbl = ftbl_nss_port6_tx_clk_src,
-@@ -1926,8 +1892,8 @@ static struct clk_rcg2 nss_port6_tx_clk_
+@@ -1928,8 +1894,8 @@ static struct clk_rcg2 nss_port6_tx_clk_
  	.parent_map = gcc_xo_uniphy2_tx_rx_ubi32_bias_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "nss_port6_tx_clk_src",
@@ -1879,7 +1879,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1939,9 +1905,8 @@ static struct clk_regmap_div nss_port6_t
+@@ -1941,9 +1907,8 @@ static struct clk_regmap_div nss_port6_t
  	.clkr = {
  		.hw.init = &(struct clk_init_data){
  			.name = "nss_port6_tx_div_clk_src",
@@ -1891,7 +1891,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.ops = &clk_regmap_div_ops,
  			.flags = CLK_SET_RATE_PARENT,
-@@ -1964,8 +1929,8 @@ static struct clk_rcg2 crypto_clk_src =
+@@ -1966,8 +1931,8 @@ static struct clk_rcg2 crypto_clk_src =
  	.parent_map = gcc_xo_gpll0_gpll0_out_main_div2_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "crypto_clk_src",
@@ -1902,7 +1902,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1975,6 +1940,22 @@ static struct freq_tbl ftbl_gp_clk_src[]
+@@ -1977,6 +1942,22 @@ static struct freq_tbl ftbl_gp_clk_src[]
  	{ }
  };
  
@@ -1925,7 +1925,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  static struct clk_rcg2 gp1_clk_src = {
  	.cmd_rcgr = 0x08004,
  	.freq_tbl = ftbl_gp_clk_src,
-@@ -1983,8 +1964,8 @@ static struct clk_rcg2 gp1_clk_src = {
+@@ -1985,8 +1966,8 @@ static struct clk_rcg2 gp1_clk_src = {
  	.parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "gp1_clk_src",
@@ -1936,7 +1936,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -1997,8 +1978,8 @@ static struct clk_rcg2 gp2_clk_src = {
+@@ -1999,8 +1980,8 @@ static struct clk_rcg2 gp2_clk_src = {
  	.parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "gp2_clk_src",
@@ -1947,7 +1947,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -2011,8 +1992,8 @@ static struct clk_rcg2 gp3_clk_src = {
+@@ -2013,8 +1994,8 @@ static struct clk_rcg2 gp3_clk_src = {
  	.parent_map = gcc_xo_gpll0_gpll6_gpll0_sleep_clk_map,
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "gp3_clk_src",
@@ -1958,7 +1958,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  		.ops = &clk_rcg2_ops,
  	},
  };
-@@ -2024,9 +2005,8 @@ static struct clk_branch gcc_blsp1_ahb_c
+@@ -2026,9 +2007,8 @@ static struct clk_branch gcc_blsp1_ahb_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_ahb_clk",
@@ -1970,7 +1970,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2041,9 +2021,8 @@ static struct clk_branch gcc_blsp1_qup1_
+@@ -2043,9 +2023,8 @@ static struct clk_branch gcc_blsp1_qup1_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup1_i2c_apps_clk",
@@ -1982,7 +1982,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2058,9 +2037,8 @@ static struct clk_branch gcc_blsp1_qup1_
+@@ -2060,9 +2039,8 @@ static struct clk_branch gcc_blsp1_qup1_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup1_spi_apps_clk",
@@ -1994,7 +1994,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2075,9 +2053,8 @@ static struct clk_branch gcc_blsp1_qup2_
+@@ -2077,9 +2055,8 @@ static struct clk_branch gcc_blsp1_qup2_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup2_i2c_apps_clk",
@@ -2006,7 +2006,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2092,9 +2069,8 @@ static struct clk_branch gcc_blsp1_qup2_
+@@ -2094,9 +2071,8 @@ static struct clk_branch gcc_blsp1_qup2_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup2_spi_apps_clk",
@@ -2018,7 +2018,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2109,9 +2085,8 @@ static struct clk_branch gcc_blsp1_qup3_
+@@ -2111,9 +2087,8 @@ static struct clk_branch gcc_blsp1_qup3_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup3_i2c_apps_clk",
@@ -2030,7 +2030,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2126,9 +2101,8 @@ static struct clk_branch gcc_blsp1_qup3_
+@@ -2128,9 +2103,8 @@ static struct clk_branch gcc_blsp1_qup3_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup3_spi_apps_clk",
@@ -2042,7 +2042,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2143,9 +2117,8 @@ static struct clk_branch gcc_blsp1_qup4_
+@@ -2145,9 +2119,8 @@ static struct clk_branch gcc_blsp1_qup4_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup4_i2c_apps_clk",
@@ -2054,7 +2054,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2160,9 +2133,8 @@ static struct clk_branch gcc_blsp1_qup4_
+@@ -2162,9 +2135,8 @@ static struct clk_branch gcc_blsp1_qup4_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup4_spi_apps_clk",
@@ -2066,7 +2066,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2177,9 +2149,8 @@ static struct clk_branch gcc_blsp1_qup5_
+@@ -2179,9 +2151,8 @@ static struct clk_branch gcc_blsp1_qup5_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup5_i2c_apps_clk",
@@ -2078,7 +2078,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2194,9 +2165,8 @@ static struct clk_branch gcc_blsp1_qup5_
+@@ -2196,9 +2167,8 @@ static struct clk_branch gcc_blsp1_qup5_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup5_spi_apps_clk",
@@ -2090,7 +2090,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2211,9 +2181,8 @@ static struct clk_branch gcc_blsp1_qup6_
+@@ -2213,9 +2183,8 @@ static struct clk_branch gcc_blsp1_qup6_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup6_i2c_apps_clk",
@@ -2102,7 +2102,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2228,9 +2197,8 @@ static struct clk_branch gcc_blsp1_qup6_
+@@ -2230,9 +2199,8 @@ static struct clk_branch gcc_blsp1_qup6_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_qup6_spi_apps_clk",
@@ -2114,7 +2114,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2245,9 +2213,8 @@ static struct clk_branch gcc_blsp1_uart1
+@@ -2247,9 +2215,8 @@ static struct clk_branch gcc_blsp1_uart1
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_uart1_apps_clk",
@@ -2126,7 +2126,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2262,9 +2229,8 @@ static struct clk_branch gcc_blsp1_uart2
+@@ -2264,9 +2231,8 @@ static struct clk_branch gcc_blsp1_uart2
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_uart2_apps_clk",
@@ -2138,7 +2138,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2279,9 +2245,8 @@ static struct clk_branch gcc_blsp1_uart3
+@@ -2281,9 +2247,8 @@ static struct clk_branch gcc_blsp1_uart3
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_uart3_apps_clk",
@@ -2150,7 +2150,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2296,9 +2261,8 @@ static struct clk_branch gcc_blsp1_uart4
+@@ -2298,9 +2263,8 @@ static struct clk_branch gcc_blsp1_uart4
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_uart4_apps_clk",
@@ -2162,7 +2162,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2313,9 +2277,8 @@ static struct clk_branch gcc_blsp1_uart5
+@@ -2315,9 +2279,8 @@ static struct clk_branch gcc_blsp1_uart5
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_uart5_apps_clk",
@@ -2174,7 +2174,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2330,9 +2293,8 @@ static struct clk_branch gcc_blsp1_uart6
+@@ -2332,9 +2295,8 @@ static struct clk_branch gcc_blsp1_uart6
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_blsp1_uart6_apps_clk",
@@ -2186,7 +2186,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2348,9 +2310,8 @@ static struct clk_branch gcc_prng_ahb_cl
+@@ -2350,9 +2312,8 @@ static struct clk_branch gcc_prng_ahb_cl
  		.enable_mask = BIT(8),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_prng_ahb_clk",
@@ -2198,7 +2198,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2365,9 +2326,8 @@ static struct clk_branch gcc_qpic_ahb_cl
+@@ -2367,9 +2328,8 @@ static struct clk_branch gcc_qpic_ahb_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_qpic_ahb_clk",
@@ -2210,7 +2210,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2382,9 +2342,8 @@ static struct clk_branch gcc_qpic_clk =
+@@ -2384,9 +2344,8 @@ static struct clk_branch gcc_qpic_clk =
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_qpic_clk",
@@ -2222,7 +2222,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2399,9 +2358,8 @@ static struct clk_branch gcc_pcie0_ahb_c
+@@ -2401,9 +2360,8 @@ static struct clk_branch gcc_pcie0_ahb_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie0_ahb_clk",
@@ -2234,7 +2234,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2416,9 +2374,8 @@ static struct clk_branch gcc_pcie0_aux_c
+@@ -2418,9 +2376,8 @@ static struct clk_branch gcc_pcie0_aux_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie0_aux_clk",
@@ -2246,7 +2246,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2433,9 +2390,8 @@ static struct clk_branch gcc_pcie0_axi_m
+@@ -2435,9 +2392,8 @@ static struct clk_branch gcc_pcie0_axi_m
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie0_axi_m_clk",
@@ -2258,7 +2258,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2450,9 +2406,8 @@ static struct clk_branch gcc_pcie0_axi_s
+@@ -2452,9 +2408,8 @@ static struct clk_branch gcc_pcie0_axi_s
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie0_axi_s_clk",
@@ -2270,7 +2270,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2468,9 +2423,8 @@ static struct clk_branch gcc_pcie0_pipe_
+@@ -2470,9 +2425,8 @@ static struct clk_branch gcc_pcie0_pipe_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie0_pipe_clk",
@@ -2282,7 +2282,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2485,9 +2439,8 @@ static struct clk_branch gcc_sys_noc_pci
+@@ -2487,9 +2441,8 @@ static struct clk_branch gcc_sys_noc_pci
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sys_noc_pcie0_axi_clk",
@@ -2294,7 +2294,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2502,9 +2455,8 @@ static struct clk_branch gcc_pcie1_ahb_c
+@@ -2504,9 +2457,8 @@ static struct clk_branch gcc_pcie1_ahb_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie1_ahb_clk",
@@ -2306,7 +2306,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2519,9 +2471,8 @@ static struct clk_branch gcc_pcie1_aux_c
+@@ -2521,9 +2473,8 @@ static struct clk_branch gcc_pcie1_aux_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie1_aux_clk",
@@ -2318,7 +2318,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2536,9 +2487,8 @@ static struct clk_branch gcc_pcie1_axi_m
+@@ -2538,9 +2489,8 @@ static struct clk_branch gcc_pcie1_axi_m
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie1_axi_m_clk",
@@ -2330,7 +2330,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2553,9 +2503,8 @@ static struct clk_branch gcc_pcie1_axi_s
+@@ -2555,9 +2505,8 @@ static struct clk_branch gcc_pcie1_axi_s
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie1_axi_s_clk",
@@ -2342,7 +2342,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2571,9 +2520,8 @@ static struct clk_branch gcc_pcie1_pipe_
+@@ -2573,9 +2522,8 @@ static struct clk_branch gcc_pcie1_pipe_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_pcie1_pipe_clk",
@@ -2354,7 +2354,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2588,9 +2536,8 @@ static struct clk_branch gcc_sys_noc_pci
+@@ -2590,9 +2538,8 @@ static struct clk_branch gcc_sys_noc_pci
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sys_noc_pcie1_axi_clk",
@@ -2366,7 +2366,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2605,9 +2552,8 @@ static struct clk_branch gcc_usb0_aux_cl
+@@ -2607,9 +2554,8 @@ static struct clk_branch gcc_usb0_aux_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb0_aux_clk",
@@ -2378,7 +2378,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2622,9 +2568,8 @@ static struct clk_branch gcc_sys_noc_usb
+@@ -2624,9 +2570,8 @@ static struct clk_branch gcc_sys_noc_usb
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sys_noc_usb0_axi_clk",
@@ -2390,7 +2390,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2639,9 +2584,8 @@ static struct clk_branch gcc_usb0_master
+@@ -2641,9 +2586,8 @@ static struct clk_branch gcc_usb0_master
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb0_master_clk",
@@ -2402,7 +2402,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2656,9 +2600,8 @@ static struct clk_branch gcc_usb0_mock_u
+@@ -2658,9 +2602,8 @@ static struct clk_branch gcc_usb0_mock_u
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb0_mock_utmi_clk",
@@ -2414,7 +2414,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2673,9 +2616,8 @@ static struct clk_branch gcc_usb0_phy_cf
+@@ -2675,9 +2618,8 @@ static struct clk_branch gcc_usb0_phy_cf
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb0_phy_cfg_ahb_clk",
@@ -2426,7 +2426,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2691,9 +2633,8 @@ static struct clk_branch gcc_usb0_pipe_c
+@@ -2693,9 +2635,8 @@ static struct clk_branch gcc_usb0_pipe_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb0_pipe_clk",
@@ -2438,7 +2438,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2708,9 +2649,8 @@ static struct clk_branch gcc_usb0_sleep_
+@@ -2710,9 +2651,8 @@ static struct clk_branch gcc_usb0_sleep_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb0_sleep_clk",
@@ -2450,7 +2450,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2725,9 +2665,8 @@ static struct clk_branch gcc_usb1_aux_cl
+@@ -2727,9 +2667,8 @@ static struct clk_branch gcc_usb1_aux_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb1_aux_clk",
@@ -2462,7 +2462,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2742,9 +2681,8 @@ static struct clk_branch gcc_sys_noc_usb
+@@ -2744,9 +2683,8 @@ static struct clk_branch gcc_sys_noc_usb
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sys_noc_usb1_axi_clk",
@@ -2474,7 +2474,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2759,9 +2697,8 @@ static struct clk_branch gcc_usb1_master
+@@ -2761,9 +2699,8 @@ static struct clk_branch gcc_usb1_master
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb1_master_clk",
@@ -2486,7 +2486,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2776,9 +2713,8 @@ static struct clk_branch gcc_usb1_mock_u
+@@ -2778,9 +2715,8 @@ static struct clk_branch gcc_usb1_mock_u
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb1_mock_utmi_clk",
@@ -2498,7 +2498,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2793,9 +2729,8 @@ static struct clk_branch gcc_usb1_phy_cf
+@@ -2795,9 +2731,8 @@ static struct clk_branch gcc_usb1_phy_cf
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb1_phy_cfg_ahb_clk",
@@ -2510,7 +2510,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2811,9 +2746,8 @@ static struct clk_branch gcc_usb1_pipe_c
+@@ -2813,9 +2748,8 @@ static struct clk_branch gcc_usb1_pipe_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb1_pipe_clk",
@@ -2522,7 +2522,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2828,9 +2762,8 @@ static struct clk_branch gcc_usb1_sleep_
+@@ -2830,9 +2764,8 @@ static struct clk_branch gcc_usb1_sleep_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_usb1_sleep_clk",
@@ -2534,7 +2534,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2845,9 +2778,8 @@ static struct clk_branch gcc_sdcc1_ahb_c
+@@ -2847,9 +2780,8 @@ static struct clk_branch gcc_sdcc1_ahb_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sdcc1_ahb_clk",
@@ -2546,7 +2546,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2862,9 +2794,8 @@ static struct clk_branch gcc_sdcc1_apps_
+@@ -2864,9 +2796,8 @@ static struct clk_branch gcc_sdcc1_apps_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sdcc1_apps_clk",
@@ -2558,7 +2558,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2879,9 +2810,8 @@ static struct clk_branch gcc_sdcc1_ice_c
+@@ -2881,9 +2812,8 @@ static struct clk_branch gcc_sdcc1_ice_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sdcc1_ice_core_clk",
@@ -2570,7 +2570,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2896,9 +2826,8 @@ static struct clk_branch gcc_sdcc2_ahb_c
+@@ -2898,9 +2828,8 @@ static struct clk_branch gcc_sdcc2_ahb_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sdcc2_ahb_clk",
@@ -2582,7 +2582,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2913,9 +2842,8 @@ static struct clk_branch gcc_sdcc2_apps_
+@@ -2915,9 +2844,8 @@ static struct clk_branch gcc_sdcc2_apps_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_sdcc2_apps_clk",
@@ -2594,7 +2594,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2930,9 +2858,8 @@ static struct clk_branch gcc_mem_noc_nss
+@@ -2932,9 +2860,8 @@ static struct clk_branch gcc_mem_noc_nss
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_mem_noc_nss_axi_clk",
@@ -2606,7 +2606,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2947,9 +2874,8 @@ static struct clk_branch gcc_nss_ce_apb_
+@@ -2949,9 +2876,8 @@ static struct clk_branch gcc_nss_ce_apb_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_ce_apb_clk",
@@ -2618,7 +2618,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2964,9 +2890,8 @@ static struct clk_branch gcc_nss_ce_axi_
+@@ -2966,9 +2892,8 @@ static struct clk_branch gcc_nss_ce_axi_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_ce_axi_clk",
@@ -2630,7 +2630,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2981,9 +2906,8 @@ static struct clk_branch gcc_nss_cfg_clk
+@@ -2983,9 +2908,8 @@ static struct clk_branch gcc_nss_cfg_clk
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_cfg_clk",
@@ -2642,7 +2642,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -2998,9 +2922,8 @@ static struct clk_branch gcc_nss_crypto_
+@@ -3000,9 +2924,8 @@ static struct clk_branch gcc_nss_crypto_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_crypto_clk",
@@ -2654,7 +2654,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3015,9 +2938,8 @@ static struct clk_branch gcc_nss_csr_clk
+@@ -3017,9 +2940,8 @@ static struct clk_branch gcc_nss_csr_clk
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_csr_clk",
@@ -2666,7 +2666,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3032,9 +2954,8 @@ static struct clk_branch gcc_nss_edma_cf
+@@ -3034,9 +2956,8 @@ static struct clk_branch gcc_nss_edma_cf
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_edma_cfg_clk",
@@ -2678,7 +2678,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3049,9 +2970,8 @@ static struct clk_branch gcc_nss_edma_cl
+@@ -3051,9 +2972,8 @@ static struct clk_branch gcc_nss_edma_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_edma_clk",
@@ -2690,7 +2690,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3066,9 +2986,8 @@ static struct clk_branch gcc_nss_imem_cl
+@@ -3068,9 +2988,8 @@ static struct clk_branch gcc_nss_imem_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_imem_clk",
@@ -2702,7 +2702,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3083,9 +3002,8 @@ static struct clk_branch gcc_nss_noc_clk
+@@ -3085,9 +3004,8 @@ static struct clk_branch gcc_nss_noc_clk
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_noc_clk",
@@ -2714,7 +2714,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3100,9 +3018,8 @@ static struct clk_branch gcc_nss_ppe_btq
+@@ -3102,9 +3020,8 @@ static struct clk_branch gcc_nss_ppe_btq
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_ppe_btq_clk",
@@ -2726,7 +2726,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3117,9 +3034,8 @@ static struct clk_branch gcc_nss_ppe_cfg
+@@ -3119,9 +3036,8 @@ static struct clk_branch gcc_nss_ppe_cfg
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_ppe_cfg_clk",
@@ -2738,7 +2738,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3134,9 +3050,8 @@ static struct clk_branch gcc_nss_ppe_clk
+@@ -3136,9 +3052,8 @@ static struct clk_branch gcc_nss_ppe_clk
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_ppe_clk",
@@ -2750,7 +2750,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3151,9 +3066,8 @@ static struct clk_branch gcc_nss_ppe_ipe
+@@ -3153,9 +3068,8 @@ static struct clk_branch gcc_nss_ppe_ipe
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_ppe_ipe_clk",
@@ -2762,7 +2762,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3168,9 +3082,8 @@ static struct clk_branch gcc_nss_ptp_ref
+@@ -3170,9 +3084,8 @@ static struct clk_branch gcc_nss_ptp_ref
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_ptp_ref_clk",
@@ -2774,7 +2774,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3186,9 +3099,8 @@ static struct clk_branch gcc_crypto_ppe_
+@@ -3188,9 +3101,8 @@ static struct clk_branch gcc_crypto_ppe_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_crypto_ppe_clk",
@@ -2786,7 +2786,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3203,9 +3115,8 @@ static struct clk_branch gcc_nssnoc_ce_a
+@@ -3205,9 +3117,8 @@ static struct clk_branch gcc_nssnoc_ce_a
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_ce_apb_clk",
@@ -2798,7 +2798,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3220,9 +3131,8 @@ static struct clk_branch gcc_nssnoc_ce_a
+@@ -3222,9 +3133,8 @@ static struct clk_branch gcc_nssnoc_ce_a
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_ce_axi_clk",
@@ -2810,7 +2810,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3237,9 +3147,8 @@ static struct clk_branch gcc_nssnoc_cryp
+@@ -3239,9 +3149,8 @@ static struct clk_branch gcc_nssnoc_cryp
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_crypto_clk",
@@ -2822,7 +2822,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3254,9 +3163,8 @@ static struct clk_branch gcc_nssnoc_ppe_
+@@ -3256,9 +3165,8 @@ static struct clk_branch gcc_nssnoc_ppe_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_ppe_cfg_clk",
@@ -2834,7 +2834,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3271,9 +3179,8 @@ static struct clk_branch gcc_nssnoc_ppe_
+@@ -3273,9 +3181,8 @@ static struct clk_branch gcc_nssnoc_ppe_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_ppe_clk",
@@ -2846,7 +2846,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3288,9 +3195,8 @@ static struct clk_branch gcc_nssnoc_qosg
+@@ -3290,9 +3197,8 @@ static struct clk_branch gcc_nssnoc_qosg
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_qosgen_ref_clk",
@@ -2858,7 +2858,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3305,9 +3211,8 @@ static struct clk_branch gcc_nssnoc_snoc
+@@ -3307,9 +3213,8 @@ static struct clk_branch gcc_nssnoc_snoc
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_snoc_clk",
@@ -2870,7 +2870,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3322,9 +3227,8 @@ static struct clk_branch gcc_nssnoc_time
+@@ -3324,9 +3229,8 @@ static struct clk_branch gcc_nssnoc_time
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_timeout_ref_clk",
@@ -2882,7 +2882,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3339,9 +3243,8 @@ static struct clk_branch gcc_nssnoc_ubi0
+@@ -3341,9 +3245,8 @@ static struct clk_branch gcc_nssnoc_ubi0
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_ubi0_ahb_clk",
@@ -2894,7 +2894,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3356,9 +3259,8 @@ static struct clk_branch gcc_nssnoc_ubi1
+@@ -3358,9 +3261,8 @@ static struct clk_branch gcc_nssnoc_ubi1
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nssnoc_ubi1_ahb_clk",
@@ -2906,7 +2906,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3374,9 +3276,8 @@ static struct clk_branch gcc_ubi0_ahb_cl
+@@ -3376,9 +3278,8 @@ static struct clk_branch gcc_ubi0_ahb_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi0_ahb_clk",
@@ -2918,7 +2918,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3392,9 +3293,8 @@ static struct clk_branch gcc_ubi0_axi_cl
+@@ -3394,9 +3295,8 @@ static struct clk_branch gcc_ubi0_axi_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi0_axi_clk",
@@ -2930,7 +2930,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3410,9 +3310,8 @@ static struct clk_branch gcc_ubi0_nc_axi
+@@ -3412,9 +3312,8 @@ static struct clk_branch gcc_ubi0_nc_axi
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi0_nc_axi_clk",
@@ -2942,7 +2942,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3428,9 +3327,8 @@ static struct clk_branch gcc_ubi0_core_c
+@@ -3430,9 +3329,8 @@ static struct clk_branch gcc_ubi0_core_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi0_core_clk",
@@ -2954,7 +2954,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3446,9 +3344,8 @@ static struct clk_branch gcc_ubi0_mpt_cl
+@@ -3448,9 +3346,8 @@ static struct clk_branch gcc_ubi0_mpt_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi0_mpt_clk",
@@ -2966,7 +2966,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3464,9 +3361,8 @@ static struct clk_branch gcc_ubi1_ahb_cl
+@@ -3466,9 +3363,8 @@ static struct clk_branch gcc_ubi1_ahb_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi1_ahb_clk",
@@ -2978,7 +2978,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3482,9 +3378,8 @@ static struct clk_branch gcc_ubi1_axi_cl
+@@ -3484,9 +3380,8 @@ static struct clk_branch gcc_ubi1_axi_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi1_axi_clk",
@@ -2990,7 +2990,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3500,9 +3395,8 @@ static struct clk_branch gcc_ubi1_nc_axi
+@@ -3502,9 +3397,8 @@ static struct clk_branch gcc_ubi1_nc_axi
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi1_nc_axi_clk",
@@ -3002,7 +3002,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3518,9 +3412,8 @@ static struct clk_branch gcc_ubi1_core_c
+@@ -3520,9 +3414,8 @@ static struct clk_branch gcc_ubi1_core_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi1_core_clk",
@@ -3014,7 +3014,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3536,9 +3429,8 @@ static struct clk_branch gcc_ubi1_mpt_cl
+@@ -3538,9 +3431,8 @@ static struct clk_branch gcc_ubi1_mpt_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_ubi1_mpt_clk",
@@ -3026,7 +3026,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3553,9 +3445,8 @@ static struct clk_branch gcc_cmn_12gpll_
+@@ -3555,9 +3447,8 @@ static struct clk_branch gcc_cmn_12gpll_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_cmn_12gpll_ahb_clk",
@@ -3038,7 +3038,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3570,9 +3461,8 @@ static struct clk_branch gcc_cmn_12gpll_
+@@ -3572,9 +3463,8 @@ static struct clk_branch gcc_cmn_12gpll_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_cmn_12gpll_sys_clk",
@@ -3050,7 +3050,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3587,9 +3477,8 @@ static struct clk_branch gcc_mdio_ahb_cl
+@@ -3589,9 +3479,8 @@ static struct clk_branch gcc_mdio_ahb_cl
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_mdio_ahb_clk",
@@ -3062,7 +3062,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3604,9 +3493,8 @@ static struct clk_branch gcc_uniphy0_ahb
+@@ -3606,9 +3495,8 @@ static struct clk_branch gcc_uniphy0_ahb
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_ahb_clk",
@@ -3074,7 +3074,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3621,9 +3509,8 @@ static struct clk_branch gcc_uniphy0_sys
+@@ -3623,9 +3511,8 @@ static struct clk_branch gcc_uniphy0_sys
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_sys_clk",
@@ -3086,7 +3086,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3638,9 +3525,8 @@ static struct clk_branch gcc_uniphy1_ahb
+@@ -3640,9 +3527,8 @@ static struct clk_branch gcc_uniphy1_ahb
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy1_ahb_clk",
@@ -3098,7 +3098,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3655,9 +3541,8 @@ static struct clk_branch gcc_uniphy1_sys
+@@ -3657,9 +3543,8 @@ static struct clk_branch gcc_uniphy1_sys
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy1_sys_clk",
@@ -3110,7 +3110,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3672,9 +3557,8 @@ static struct clk_branch gcc_uniphy2_ahb
+@@ -3674,9 +3559,8 @@ static struct clk_branch gcc_uniphy2_ahb
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy2_ahb_clk",
@@ -3122,7 +3122,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3689,9 +3573,8 @@ static struct clk_branch gcc_uniphy2_sys
+@@ -3691,9 +3575,8 @@ static struct clk_branch gcc_uniphy2_sys
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy2_sys_clk",
@@ -3134,7 +3134,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3706,9 +3589,8 @@ static struct clk_branch gcc_nss_port1_r
+@@ -3708,9 +3591,8 @@ static struct clk_branch gcc_nss_port1_r
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port1_rx_clk",
@@ -3146,7 +3146,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3723,9 +3605,8 @@ static struct clk_branch gcc_nss_port1_t
+@@ -3725,9 +3607,8 @@ static struct clk_branch gcc_nss_port1_t
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port1_tx_clk",
@@ -3158,7 +3158,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3740,9 +3621,8 @@ static struct clk_branch gcc_nss_port2_r
+@@ -3742,9 +3623,8 @@ static struct clk_branch gcc_nss_port2_r
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port2_rx_clk",
@@ -3170,7 +3170,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3757,9 +3637,8 @@ static struct clk_branch gcc_nss_port2_t
+@@ -3759,9 +3639,8 @@ static struct clk_branch gcc_nss_port2_t
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port2_tx_clk",
@@ -3182,7 +3182,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3774,9 +3653,8 @@ static struct clk_branch gcc_nss_port3_r
+@@ -3776,9 +3655,8 @@ static struct clk_branch gcc_nss_port3_r
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port3_rx_clk",
@@ -3194,7 +3194,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3791,9 +3669,8 @@ static struct clk_branch gcc_nss_port3_t
+@@ -3793,9 +3671,8 @@ static struct clk_branch gcc_nss_port3_t
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port3_tx_clk",
@@ -3206,7 +3206,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3808,9 +3685,8 @@ static struct clk_branch gcc_nss_port4_r
+@@ -3810,9 +3687,8 @@ static struct clk_branch gcc_nss_port4_r
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port4_rx_clk",
@@ -3218,7 +3218,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3825,9 +3701,8 @@ static struct clk_branch gcc_nss_port4_t
+@@ -3827,9 +3703,8 @@ static struct clk_branch gcc_nss_port4_t
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port4_tx_clk",
@@ -3230,7 +3230,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3842,9 +3717,8 @@ static struct clk_branch gcc_nss_port5_r
+@@ -3844,9 +3719,8 @@ static struct clk_branch gcc_nss_port5_r
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port5_rx_clk",
@@ -3242,7 +3242,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3859,9 +3733,8 @@ static struct clk_branch gcc_nss_port5_t
+@@ -3861,9 +3735,8 @@ static struct clk_branch gcc_nss_port5_t
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port5_tx_clk",
@@ -3254,7 +3254,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3876,9 +3749,8 @@ static struct clk_branch gcc_nss_port6_r
+@@ -3878,9 +3751,8 @@ static struct clk_branch gcc_nss_port6_r
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port6_rx_clk",
@@ -3266,7 +3266,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3893,9 +3765,8 @@ static struct clk_branch gcc_nss_port6_t
+@@ -3895,9 +3767,8 @@ static struct clk_branch gcc_nss_port6_t
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_nss_port6_tx_clk",
@@ -3278,7 +3278,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3910,9 +3781,8 @@ static struct clk_branch gcc_port1_mac_c
+@@ -3912,9 +3783,8 @@ static struct clk_branch gcc_port1_mac_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_port1_mac_clk",
@@ -3290,7 +3290,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3927,9 +3797,8 @@ static struct clk_branch gcc_port2_mac_c
+@@ -3929,9 +3799,8 @@ static struct clk_branch gcc_port2_mac_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_port2_mac_clk",
@@ -3302,7 +3302,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3944,9 +3813,8 @@ static struct clk_branch gcc_port3_mac_c
+@@ -3946,9 +3815,8 @@ static struct clk_branch gcc_port3_mac_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_port3_mac_clk",
@@ -3314,7 +3314,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3961,9 +3829,8 @@ static struct clk_branch gcc_port4_mac_c
+@@ -3963,9 +3831,8 @@ static struct clk_branch gcc_port4_mac_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_port4_mac_clk",
@@ -3326,7 +3326,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3978,9 +3845,8 @@ static struct clk_branch gcc_port5_mac_c
+@@ -3980,9 +3847,8 @@ static struct clk_branch gcc_port5_mac_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_port5_mac_clk",
@@ -3338,7 +3338,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -3995,9 +3861,8 @@ static struct clk_branch gcc_port6_mac_c
+@@ -3997,9 +3863,8 @@ static struct clk_branch gcc_port6_mac_c
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_port6_mac_clk",
@@ -3350,7 +3350,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4012,9 +3877,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4014,9 +3879,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port1_rx_clk",
@@ -3362,7 +3362,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4029,9 +3893,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4031,9 +3895,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port1_tx_clk",
@@ -3374,7 +3374,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4046,9 +3909,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4048,9 +3911,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port2_rx_clk",
@@ -3386,7 +3386,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4063,9 +3925,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4065,9 +3927,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port2_tx_clk",
@@ -3398,7 +3398,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4080,9 +3941,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4082,9 +3943,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port3_rx_clk",
@@ -3410,7 +3410,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4097,9 +3957,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4099,9 +3959,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port3_tx_clk",
@@ -3422,7 +3422,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4114,9 +3973,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4116,9 +3975,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port4_rx_clk",
@@ -3434,7 +3434,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4131,9 +3989,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4133,9 +3991,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port4_tx_clk",
@@ -3446,7 +3446,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4148,9 +4005,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4150,9 +4007,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port5_rx_clk",
@@ -3458,7 +3458,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4165,9 +4021,8 @@ static struct clk_branch gcc_uniphy0_por
+@@ -4167,9 +4023,8 @@ static struct clk_branch gcc_uniphy0_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy0_port5_tx_clk",
@@ -3470,7 +3470,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4182,9 +4037,8 @@ static struct clk_branch gcc_uniphy1_por
+@@ -4184,9 +4039,8 @@ static struct clk_branch gcc_uniphy1_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy1_port5_rx_clk",
@@ -3482,7 +3482,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4199,9 +4053,8 @@ static struct clk_branch gcc_uniphy1_por
+@@ -4201,9 +4055,8 @@ static struct clk_branch gcc_uniphy1_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy1_port5_tx_clk",
@@ -3494,7 +3494,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4216,9 +4069,8 @@ static struct clk_branch gcc_uniphy2_por
+@@ -4218,9 +4071,8 @@ static struct clk_branch gcc_uniphy2_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy2_port6_rx_clk",
@@ -3506,7 +3506,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4233,9 +4085,8 @@ static struct clk_branch gcc_uniphy2_por
+@@ -4235,9 +4087,8 @@ static struct clk_branch gcc_uniphy2_por
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_uniphy2_port6_tx_clk",
@@ -3518,7 +3518,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4251,9 +4102,8 @@ static struct clk_branch gcc_crypto_ahb_
+@@ -4253,9 +4104,8 @@ static struct clk_branch gcc_crypto_ahb_
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_crypto_ahb_clk",
@@ -3530,7 +3530,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4269,9 +4119,8 @@ static struct clk_branch gcc_crypto_axi_
+@@ -4271,9 +4121,8 @@ static struct clk_branch gcc_crypto_axi_
  		.enable_mask = BIT(1),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_crypto_axi_clk",
@@ -3542,7 +3542,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4287,9 +4136,8 @@ static struct clk_branch gcc_crypto_clk
+@@ -4289,9 +4138,8 @@ static struct clk_branch gcc_crypto_clk
  		.enable_mask = BIT(2),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_crypto_clk",
@@ -3554,7 +3554,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4304,9 +4152,8 @@ static struct clk_branch gcc_gp1_clk = {
+@@ -4306,9 +4154,8 @@ static struct clk_branch gcc_gp1_clk = {
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_gp1_clk",
@@ -3566,7 +3566,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4321,9 +4168,8 @@ static struct clk_branch gcc_gp2_clk = {
+@@ -4323,9 +4170,8 @@ static struct clk_branch gcc_gp2_clk = {
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_gp2_clk",
@@ -3578,7 +3578,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4338,9 +4184,8 @@ static struct clk_branch gcc_gp3_clk = {
+@@ -4340,9 +4186,8 @@ static struct clk_branch gcc_gp3_clk = {
  		.enable_mask = BIT(0),
  		.hw.init = &(struct clk_init_data){
  			.name = "gcc_gp3_clk",
@@ -3590,7 +3590,7 @@ Link: https://lore.kernel.org/r/20221030175703.1103224-1-robimarko at gmail.com
  			.num_parents = 1,
  			.flags = CLK_SET_RATE_PARENT,
  			.ops = &clk_branch2_ops,
-@@ -4362,7 +4207,7 @@ static struct clk_rcg2 pcie0_rchng_clk_s
+@@ -4364,7 +4209,7 @@ static struct clk_rcg2 pcie0_rchng_clk_s
  	.clkr.hw.init = &(struct clk_init_data){
  		.name = "pcie0_rchng_clk_src",
  		.parent_data = gcc_xo_gpll0,
diff --git a/target/linux/ipq807x/patches-5.15/0051-v6.2-clk-qcom-ipq8074-add-missing-networking-resets.patch b/target/linux/ipq807x/patches-5.15/0051-v6.2-clk-qcom-ipq8074-add-missing-networking-resets.patch
index 81014ab24c..182fbe7f0d 100644
--- a/target/linux/ipq807x/patches-5.15/0051-v6.2-clk-qcom-ipq8074-add-missing-networking-resets.patch
+++ b/target/linux/ipq807x/patches-5.15/0051-v6.2-clk-qcom-ipq8074-add-missing-networking-resets.patch
@@ -18,7 +18,7 @@ Link: https://lore.kernel.org/r/20221107132901.489240-3-robimarko at gmail.com
 
 --- a/drivers/clk/qcom/gcc-ipq8074.c
 +++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -4665,6 +4665,20 @@ static const struct qcom_reset_map gcc_i
+@@ -4667,6 +4667,20 @@ static const struct qcom_reset_map gcc_i
  	[GCC_PCIE1_AXI_SLAVE_ARES] = { 0x76040, 4 },
  	[GCC_PCIE1_AHB_ARES] = { 0x76040, 5 },
  	[GCC_PCIE1_AXI_MASTER_STICKY_ARES] = { 0x76040, 6 },
diff --git a/target/linux/ipq807x/patches-5.15/0052-v6.2-clk-qcom-ipq8074-populate-fw_name-for-all-parents.patch b/target/linux/ipq807x/patches-5.15/0052-v6.2-clk-qcom-ipq8074-populate-fw_name-for-all-parents.patch
index 35a0a07c70..a55df15c6e 100644
--- a/target/linux/ipq807x/patches-5.15/0052-v6.2-clk-qcom-ipq8074-populate-fw_name-for-all-parents.patch
+++ b/target/linux/ipq807x/patches-5.15/0052-v6.2-clk-qcom-ipq8074-populate-fw_name-for-all-parents.patch
@@ -22,7 +22,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
 
 --- a/drivers/clk/qcom/gcc-ipq8074.c
 +++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -674,7 +674,7 @@ static struct clk_rcg2 pcie0_aux_clk_src
+@@ -675,7 +675,7 @@ static struct clk_rcg2 pcie0_aux_clk_src
  };
  
  static const struct clk_parent_data gcc_pcie20_phy0_pipe_clk_xo[] = {
@@ -31,7 +31,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  	{ .fw_name = "xo", .name = "xo" },
  };
  
-@@ -727,7 +727,7 @@ static struct clk_rcg2 pcie1_aux_clk_src
+@@ -728,7 +728,7 @@ static struct clk_rcg2 pcie1_aux_clk_src
  };
  
  static const struct clk_parent_data gcc_pcie20_phy1_pipe_clk_xo[] = {
@@ -40,7 +40,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  	{ .fw_name = "xo", .name = "xo" },
  };
  
-@@ -1131,7 +1131,7 @@ static const struct freq_tbl ftbl_nss_no
+@@ -1133,7 +1133,7 @@ static const struct freq_tbl ftbl_nss_no
  
  static const struct clk_parent_data gcc_xo_bias_pll_nss_noc_clk_gpll0_gpll2[] = {
  	{ .fw_name = "xo", .name = "xo" },
@@ -49,7 +49,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  	{ .hw = &gpll0.clkr.hw },
  	{ .hw = &gpll2.clkr.hw },
  };
-@@ -1356,7 +1356,7 @@ static const struct freq_tbl ftbl_nss_pp
+@@ -1358,7 +1358,7 @@ static const struct freq_tbl ftbl_nss_pp
  
  static const struct clk_parent_data gcc_xo_bias_gpll0_gpll4_nss_ubi32[] = {
  	{ .fw_name = "xo", .name = "xo" },
@@ -58,7 +58,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  	{ .hw = &gpll0.clkr.hw },
  	{ .hw = &gpll4.clkr.hw },
  	{ .hw = &nss_crypto_pll.clkr.hw },
-@@ -1407,10 +1407,10 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1409,10 +1409,10 @@ static const struct freq_tbl ftbl_nss_po
  
  static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_ubi32_bias[] = {
  	{ .fw_name = "xo", .name = "xo" },
@@ -72,7 +72,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  };
  
  static const struct parent_map gcc_xo_uniphy0_rx_tx_ubi32_bias_map[] = {
-@@ -1459,10 +1459,10 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1461,10 +1461,10 @@ static const struct freq_tbl ftbl_nss_po
  
  static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_ubi32_bias[] = {
  	{ .fw_name = "xo", .name = "xo" },
@@ -86,7 +86,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  };
  
  static const struct parent_map gcc_xo_uniphy0_tx_rx_ubi32_bias_map[] = {
-@@ -1690,12 +1690,12 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1692,12 +1692,12 @@ static const struct freq_tbl ftbl_nss_po
  
  static const struct clk_parent_data gcc_xo_uniphy0_rx_tx_uniphy1_rx_tx_ubi32_bias[] = {
  	{ .fw_name = "xo", .name = "xo" },
@@ -104,7 +104,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  };
  
  static const struct parent_map
-@@ -1752,12 +1752,12 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1754,12 +1754,12 @@ static const struct freq_tbl ftbl_nss_po
  
  static const struct clk_parent_data gcc_xo_uniphy0_tx_rx_uniphy1_tx_rx_ubi32_bias[] = {
  	{ .fw_name = "xo", .name = "xo" },
@@ -122,7 +122,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  };
  
  static const struct parent_map
-@@ -1814,10 +1814,10 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1816,10 +1816,10 @@ static const struct freq_tbl ftbl_nss_po
  
  static const struct clk_parent_data gcc_xo_uniphy2_rx_tx_ubi32_bias[] = {
  	{ .fw_name = "xo", .name = "xo" },
@@ -136,7 +136,7 @@ Link: https://lore.kernel.org/r/20221116214655.1116467-1-robimarko at gmail.com
  };
  
  static const struct parent_map gcc_xo_uniphy2_rx_tx_ubi32_bias_map[] = {
-@@ -1871,10 +1871,10 @@ static const struct freq_tbl ftbl_nss_po
+@@ -1873,10 +1873,10 @@ static const struct freq_tbl ftbl_nss_po
  
  static const struct clk_parent_data gcc_xo_uniphy2_tx_rx_ubi32_bias[] = {
  	{ .fw_name = "xo", .name = "xo" },
diff --git a/target/linux/ipq807x/patches-5.15/0101-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch b/target/linux/ipq807x/patches-5.15/0101-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch
index 62a30bbb22..1cd614761a 100644
--- a/target/linux/ipq807x/patches-5.15/0101-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch
+++ b/target/linux/ipq807x/patches-5.15/0101-clk-qcom-gcc-ipq8074-rework-nss_port5-6-clock-to-mul.patch
@@ -23,7 +23,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
 
 --- a/drivers/clk/qcom/gcc-ipq8074.c
 +++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -1676,13 +1676,21 @@ static struct clk_regmap_div nss_port4_t
+@@ -1678,13 +1678,21 @@ static struct clk_regmap_div nss_port4_t
  	},
  };
  
@@ -49,7 +49,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	F(156250000, P_UNIPHY1_RX, 2, 0, 0),
  	F(312500000, P_UNIPHY1_RX, 1, 0, 0),
  	{ }
-@@ -1738,13 +1746,21 @@ static struct clk_regmap_div nss_port5_r
+@@ -1740,13 +1748,21 @@ static struct clk_regmap_div nss_port5_r
  	},
  };
  
@@ -75,7 +75,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	F(156250000, P_UNIPHY1_TX, 2, 0, 0),
  	F(312500000, P_UNIPHY1_TX, 1, 0, 0),
  	{ }
-@@ -1800,13 +1816,21 @@ static struct clk_regmap_div nss_port5_t
+@@ -1802,13 +1818,21 @@ static struct clk_regmap_div nss_port5_t
  	},
  };
  
@@ -101,7 +101,7 @@ Signed-off-by: Christian Marangi <ansuelsmth at gmail.com>
  	F(156250000, P_UNIPHY2_RX, 2, 0, 0),
  	F(312500000, P_UNIPHY2_RX, 1, 0, 0),
  	{ }
-@@ -1857,13 +1881,21 @@ static struct clk_regmap_div nss_port6_r
+@@ -1859,13 +1883,21 @@ static struct clk_regmap_div nss_port6_r
  	},
  };
  
diff --git a/target/linux/ipq807x/patches-5.15/0118-clk-qcom-Add-WCSSAON-reset.patch b/target/linux/ipq807x/patches-5.15/0118-clk-qcom-Add-WCSSAON-reset.patch
index be0524338d..ec366fd421 100644
--- a/target/linux/ipq807x/patches-5.15/0118-clk-qcom-Add-WCSSAON-reset.patch
+++ b/target/linux/ipq807x/patches-5.15/0118-clk-qcom-Add-WCSSAON-reset.patch
@@ -15,7 +15,7 @@ Acked-by: Stephen Boyd <sboyd at kernel.org>
 
 --- a/drivers/clk/qcom/gcc-ipq8074.c
 +++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -4711,6 +4711,7 @@ static const struct qcom_reset_map gcc_i
+@@ -4713,6 +4713,7 @@ static const struct qcom_reset_map gcc_i
  	[GCC_NSSPORT4_RESET] = { .reg = 0x68014, .bitmask = BIT(27) | GENMASK(9, 8) },
  	[GCC_NSSPORT5_RESET] = { .reg = 0x68014, .bitmask = BIT(28) | GENMASK(11, 10) },
  	[GCC_NSSPORT6_RESET] = { .reg = 0x68014, .bitmask = BIT(29) | GENMASK(13, 12) },
diff --git a/target/linux/ipq807x/patches-5.15/0131-clk-qcom-ipq8074-populate-fw_name-for-usb3phy-s.patch b/target/linux/ipq807x/patches-5.15/0131-clk-qcom-ipq8074-populate-fw_name-for-usb3phy-s.patch
index e0e8125ba6..2fe6a1a422 100644
--- a/target/linux/ipq807x/patches-5.15/0131-clk-qcom-ipq8074-populate-fw_name-for-usb3phy-s.patch
+++ b/target/linux/ipq807x/patches-5.15/0131-clk-qcom-ipq8074-populate-fw_name-for-usb3phy-s.patch
@@ -18,7 +18,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
 
 --- a/drivers/clk/qcom/gcc-ipq8074.c
 +++ b/drivers/clk/qcom/gcc-ipq8074.c
-@@ -928,7 +928,7 @@ static struct clk_rcg2 usb0_mock_utmi_cl
+@@ -930,7 +930,7 @@ static struct clk_rcg2 usb0_mock_utmi_cl
  };
  
  static const struct clk_parent_data gcc_usb3phy_0_cc_pipe_clk_xo[] = {
@@ -27,7 +27,7 @@ Signed-off-by: Robert Marko <robimarko at gmail.com>
  	{ .fw_name = "xo", .name = "xo" },
  };
  
-@@ -996,7 +996,7 @@ static struct clk_rcg2 usb1_mock_utmi_cl
+@@ -998,7 +998,7 @@ static struct clk_rcg2 usb1_mock_utmi_cl
  };
  
  static const struct clk_parent_data gcc_usb3phy_1_cc_pipe_clk_xo[] = {
diff --git a/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch b/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch
index 8063307c52..b0f8492d1b 100644
--- a/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch
+++ b/target/linux/lantiq/patches-5.15/0001-MIPS-lantiq-add-pcie-driver.patch
@@ -5479,7 +5479,7 @@ Signed-off-by: John Crispin <blogic at openwrt.org>
  	  (transaction layer end-to-end CRC checking).
 --- a/include/linux/pci.h
 +++ b/include/linux/pci.h
-@@ -1482,6 +1482,8 @@ void pci_walk_bus(struct pci_bus *top, i
+@@ -1483,6 +1483,8 @@ void pci_walk_bus(struct pci_bus *top, i
  		  void *userdata);
  int pci_cfg_space_size(struct pci_dev *dev);
  unsigned char pci_bus_max_busnr(struct pci_bus *bus);
diff --git a/target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch b/target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch
index 3e2db443db..4f703dbc00 100644
--- a/target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch
+++ b/target/linux/mediatek/patches-5.15/410-bt-mtk-serial-fix.patch
@@ -19,7 +19,7 @@
  	},
  	[PORT_NPCM] = {
  		.name		= "Nuvoton 16550",
-@@ -2752,6 +2752,11 @@ serial8250_do_set_termios(struct uart_po
+@@ -2746,6 +2746,11 @@ serial8250_do_set_termios(struct uart_po
  	unsigned long flags;
  	unsigned int baud, quot, frac = 0;
  
diff --git a/target/linux/mediatek/patches-5.15/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch b/target/linux/mediatek/patches-5.15/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch
index 72ad2a9846..1031750afb 100644
--- a/target/linux/mediatek/patches-5.15/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch
+++ b/target/linux/mediatek/patches-5.15/730-v6.5-net-phy-add-driver-for-MediaTek-SoC-built-in-GE-PHYs.patch
@@ -24,7 +24,7 @@ Signed-off-by: David S. Miller <davem at davemloft.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -11791,6 +11791,15 @@ S:	Maintained
+@@ -11798,6 +11798,15 @@ S:	Maintained
  F:	drivers/net/pcs/pcs-mtk-lynxi.c
  F:	include/linux/pcs/pcs-mtk-lynxi.h
  
diff --git a/target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch b/target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
index e09ccce0f8..12910b74e4 100644
--- a/target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
+++ b/target/linux/octeontx/patches-5.15/0004-PCI-add-quirk-for-Gateworks-PLX-PEX860x-switch-with-.patch
@@ -14,7 +14,7 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
 
 --- a/drivers/pci/quirks.c
 +++ b/drivers/pci/quirks.c
-@@ -25,6 +25,7 @@
+@@ -26,6 +26,7 @@
  #include <linux/ktime.h>
  #include <linux/mm.h>
  #include <linux/nvme.h>
@@ -22,10 +22,10 @@ Signed-off-by: Tim Harvey <tharvey at gateworks.com>
  #include <linux/platform_data/x86/apple.h>
  #include <linux/pm_runtime.h>
  #include <linux/suspend.h>
-@@ -5900,3 +5901,34 @@ static void nvidia_ion_ahci_fixup(struct
- 	pdev->dev_flags |= PCI_DEV_FLAGS_HAS_MSI_MASKING;
- }
- DECLARE_PCI_FIXUP_FINAL(PCI_VENDOR_ID_NVIDIA, 0x0ab8, nvidia_ion_ahci_fixup);
+@@ -6000,3 +6001,34 @@ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_I
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa73f, dpc_log_size);
+ DECLARE_PCI_FIXUP_HEADER(PCI_VENDOR_ID_INTEL, 0xa76e, dpc_log_size);
+ #endif
 +
 +#ifdef CONFIG_PCI_HOST_THUNDER_PEM
 +/*
diff --git a/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch b/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch
index 60db030647..7df22b0725 100644
--- a/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch
+++ b/target/linux/realtek/patches-5.15/008-5.17-watchdog-add-realtek-otto-watchdog-timer.patch
@@ -32,7 +32,7 @@ Signed-off-by: Guenter Roeck <linux at roeck-us.net>
 
 --- a/MAINTAINERS
 +++ b/MAINTAINERS
-@@ -15896,6 +15896,13 @@ S:	Maintained
+@@ -15903,6 +15903,13 @@ S:	Maintained
  F:	include/sound/rt*.h
  F:	sound/soc/codecs/rt*
  
diff --git a/target/linux/x86/config-5.15 b/target/linux/x86/config-5.15
index cf94f3bbff..dc37973ac4 100644
--- a/target/linux/x86/config-5.15
+++ b/target/linux/x86/config-5.15
@@ -224,6 +224,7 @@ CONFIG_MICROCODE_AMD=y
 CONFIG_MICROCODE_INTEL=y
 CONFIG_MICROCODE_LATE_LOADING=y
 CONFIG_MIGRATION=y
+CONFIG_MITIGATION_RFDS=y
 # CONFIG_MK6 is not set
 # CONFIG_MK7 is not set
 # CONFIG_MK8 is not set
@@ -327,6 +328,9 @@ CONFIG_SG_POOL=y
 # CONFIG_SMSC_SCH311X_WDT is not set
 CONFIG_SPARSEMEM_STATIC=y
 CONFIG_SPARSE_IRQ=y
+# CONFIG_SPECTRE_BHI_AUTO is not set
+# CONFIG_SPECTRE_BHI_OFF is not set
+CONFIG_SPECTRE_BHI_ON=y
 CONFIG_SPECULATION_MITIGATIONS=y
 CONFIG_SRCU=y
 # CONFIG_STATIC_CALL_SELFTEST is not set



From lede-commits at lists.infradead.org  Tue Apr 30 14:48:35 2024
From: lede-commits at lists.infradead.org (LEDE Commits)
Date: Tue, 30 Apr 2024 17:48:35 -0400
Subject: [openwrt/openwrt]  lua: fix CVE-2014-5461
In-Reply-To: <171451371559.3631012.6479496106387641961@git-01.infra.openwrt.org>
References: <171451371559.3631012.6479496106387641961@git-01.infra.openwrt.org>
Message-ID: <mailman.32497.1714513720.1280.lede-commits@lists.infradead.org>

hauke pushed a commit to openwrt/openwrt.git, branch openwrt-23.05:
https://git.openwrt.org/507f9439e7b930cfd8033dbfeaf3fe7df2e9dfd3

commit 507f9439e7b930cfd8033dbfeaf3fe7df2e9dfd3
Author: Rosen Penev <rosenp at gmail.com>
AuthorDate: Sun Feb 11 15:06:44 2024 -0800

    lua: fix CVE-2014-5461
    
    Patch taken from Debian.
    
    Refresh patches
    
    Signed-off-by: Rosen Penev <rosenp at gmail.com>
    (cherry picked from commit 78b0106f7d5093641f68d37c041a5863eb9dd9a0)
---
 package/utils/lua/Makefile                            |  2 +-
 .../lua/patches-host/001-include-version-number.patch |  3 +--
 .../patches-host/013-lnum-strtoul-parsing-fixes.patch | 11 ++---------
 package/utils/lua/patches-host/100-no_readline.patch  |  6 +++---
 .../utils/lua/patches-host/400-CVE-2014-5461.patch    | 19 +++++++++++++++++++
 .../lua/patches/001-include-version-number.patch      |  3 +--
 .../lua/patches/013-lnum-strtoul-parsing-fixes.patch  | 11 ++---------
 package/utils/lua/patches/400-CVE-2014-5461.patch     | 19 +++++++++++++++++++
 8 files changed, 48 insertions(+), 26 deletions(-)

diff --git a/package/utils/lua/Makefile b/package/utils/lua/Makefile
index 46e7bb0dcd..36d332f1c7 100644
--- a/package/utils/lua/Makefile
+++ b/package/utils/lua/Makefile
@@ -9,7 +9,7 @@ include $(TOPDIR)/rules.mk
 
 PKG_NAME:=lua
 PKG_VERSION:=5.1.5
-PKG_RELEASE:=10
+PKG_RELEASE:=11
 
 PKG_SOURCE:=$(PKG_NAME)-$(PKG_VERSION).tar.gz
 PKG_SOURCE_URL:=https://www.lua.org/ftp/ \
diff --git a/package/utils/lua/patches-host/001-include-version-number.patch b/package/utils/lua/patches-host/001-include-version-number.patch
index f769e60736..806d37003e 100644
--- a/package/utils/lua/patches-host/001-include-version-number.patch
+++ b/package/utils/lua/patches-host/001-include-version-number.patch
@@ -8,7 +8,6 @@ Including it allows multiple lua versions to coexist.
 Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 ---
 
-diff --git a/Makefile b/Makefile
 --- a/Makefile
 +++ b/Makefile
 @@ -41,10 +41,10 @@ RANLIB= ranlib
@@ -42,7 +41,7 @@ rename to doc/luac5.1.1
 diff --git a/src/Makefile b/src/Makefile
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -29,10 +29,10 @@ CORE_O=	lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
+@@ -29,10 +29,10 @@ CORE_O=	lapi.o lcode.o ldebug.o ldo.o ld
  LIB_O=	lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
  	lstrlib.o loadlib.o linit.o
  
diff --git a/package/utils/lua/patches-host/013-lnum-strtoul-parsing-fixes.patch b/package/utils/lua/patches-host/013-lnum-strtoul-parsing-fixes.patch
index 7f00c8c3a2..8887229589 100644
--- a/package/utils/lua/patches-host/013-lnum-strtoul-parsing-fixes.patch
+++ b/package/utils/lua/patches-host/013-lnum-strtoul-parsing-fixes.patch
@@ -1,8 +1,6 @@
-diff --git a/src/lnum.c b/src/lnum.c
-index 1456b6a2ed23..b0632b04c2b7 100644
 --- a/src/lnum.c
 +++ b/src/lnum.c
-@@ -127,6 +127,8 @@ static int luaO_str2i (const char *s, lua_Integer *res, char **endptr_ref) {
+@@ -127,6 +127,8 @@ static int luaO_str2i (const char *s, lu
  #else
        return 0;  /* Reject the number */
  #endif
@@ -11,7 +9,7 @@ index 1456b6a2ed23..b0632b04c2b7 100644
      }
    } else if ((v > LUA_INTEGER_MAX) || (*endptr && (!isspace(*endptr)))) {
      return TK_NUMBER;	/* not in signed range, or has '.', 'e' etc. trailing */
-@@ -310,3 +312,13 @@ int try_unmint( lua_Integer *r, lua_Integer ib ) {
+@@ -310,3 +312,13 @@ int try_unmint( lua_Integer *r, lua_Inte
    return 0;
  }
  
@@ -25,8 +23,6 @@ index 1456b6a2ed23..b0632b04c2b7 100644
 +  return (unsigned LUA_INTEGER)v;
 +}
 +#endif
-diff --git a/src/lnum_config.h b/src/lnum_config.h
-index 19d7a4231a49..1092eead6629 100644
 --- a/src/lnum_config.h
 +++ b/src/lnum_config.h
 @@ -141,7 +141,12 @@
@@ -43,6 +39,3 @@ index 19d7a4231a49..1092eead6629 100644
  #endif
  #ifndef LUA_INTEGER_MIN
  # define LUA_INTEGER_MIN (-LUA_INTEGER_MAX -1)  /* -2^16|32 */
--- 
-1.9.1
-
diff --git a/package/utils/lua/patches-host/100-no_readline.patch b/package/utils/lua/patches-host/100-no_readline.patch
index 209c302bb7..700114e43c 100644
--- a/package/utils/lua/patches-host/100-no_readline.patch
+++ b/package/utils/lua/patches-host/100-no_readline.patch
@@ -10,7 +10,7 @@
  #if defined(LUA_USE_MACOSX)
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -17,6 +17,7 @@
+@@ -17,6 +17,7 @@ LIBS= -lm $(MYLIBS)
  MYCFLAGS=
  MYLDFLAGS=
  MYLIBS=
@@ -18,7 +18,7 @@
  
  # == END OF USER SETTINGS. NO NEED TO CHANGE ANYTHING BELOW THIS LINE =========
  
-@@ -75,7 +76,7 @@
+@@ -75,7 +76,7 @@ echo:
  	@echo "MYLIBS = $(MYLIBS)"
  
  # convenience targets for popular platforms
@@ -27,7 +27,7 @@
  none:
  	@echo "Please choose a platform:"
  	@echo "   $(PLATS)"
-@@ -90,16 +91,16 @@
+@@ -90,16 +91,16 @@ bsd:
  	$(MAKE) all MYCFLAGS="-DLUA_USE_POSIX -DLUA_USE_DLOPEN" MYLIBS="-Wl,-E"
  
  freebsd:
diff --git a/package/utils/lua/patches-host/400-CVE-2014-5461.patch b/package/utils/lua/patches-host/400-CVE-2014-5461.patch
new file mode 100644
index 0000000000..cce73ff96b
--- /dev/null
+++ b/package/utils/lua/patches-host/400-CVE-2014-5461.patch
@@ -0,0 +1,19 @@
+From: Enrico Tassi <gareuselesinge at debian.org>
+Date: Tue, 26 Aug 2014 16:20:55 +0200
+Subject: Fix stack overflow in vararg functions
+
+---
+ src/ldo.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/ldo.c
++++ b/src/ldo.c
+@@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId fu
+     CallInfo *ci;
+     StkId st, base;
+     Proto *p = cl->p;
+-    luaD_checkstack(L, p->maxstacksize);
++    luaD_checkstack(L, p->maxstacksize + p->numparams);
+     func = restorestack(L, funcr);
+     if (!p->is_vararg) {  /* no varargs? */
+       base = func + 1;
diff --git a/package/utils/lua/patches/001-include-version-number.patch b/package/utils/lua/patches/001-include-version-number.patch
index f769e60736..806d37003e 100644
--- a/package/utils/lua/patches/001-include-version-number.patch
+++ b/package/utils/lua/patches/001-include-version-number.patch
@@ -8,7 +8,6 @@ Including it allows multiple lua versions to coexist.
 Signed-off-by: Rafa? Mi?ecki <rafal at milecki.pl>
 ---
 
-diff --git a/Makefile b/Makefile
 --- a/Makefile
 +++ b/Makefile
 @@ -41,10 +41,10 @@ RANLIB= ranlib
@@ -42,7 +41,7 @@ rename to doc/luac5.1.1
 diff --git a/src/Makefile b/src/Makefile
 --- a/src/Makefile
 +++ b/src/Makefile
-@@ -29,10 +29,10 @@ CORE_O=	lapi.o lcode.o ldebug.o ldo.o ldump.o lfunc.o lgc.o llex.o lmem.o \
+@@ -29,10 +29,10 @@ CORE_O=	lapi.o lcode.o ldebug.o ldo.o ld
  LIB_O=	lauxlib.o lbaselib.o ldblib.o liolib.o lmathlib.o loslib.o ltablib.o \
  	lstrlib.o loadlib.o linit.o
  
diff --git a/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch b/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch
index 7f00c8c3a2..8887229589 100644
--- a/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch
+++ b/package/utils/lua/patches/013-lnum-strtoul-parsing-fixes.patch
@@ -1,8 +1,6 @@
-diff --git a/src/lnum.c b/src/lnum.c
-index 1456b6a2ed23..b0632b04c2b7 100644
 --- a/src/lnum.c
 +++ b/src/lnum.c
-@@ -127,6 +127,8 @@ static int luaO_str2i (const char *s, lua_Integer *res, char **endptr_ref) {
+@@ -127,6 +127,8 @@ static int luaO_str2i (const char *s, lu
  #else
        return 0;  /* Reject the number */
  #endif
@@ -11,7 +9,7 @@ index 1456b6a2ed23..b0632b04c2b7 100644
      }
    } else if ((v > LUA_INTEGER_MAX) || (*endptr && (!isspace(*endptr)))) {
      return TK_NUMBER;	/* not in signed range, or has '.', 'e' etc. trailing */
-@@ -310,3 +312,13 @@ int try_unmint( lua_Integer *r, lua_Integer ib ) {
+@@ -310,3 +312,13 @@ int try_unmint( lua_Integer *r, lua_Inte
    return 0;
  }
  
@@ -25,8 +23,6 @@ index 1456b6a2ed23..b0632b04c2b7 100644
 +  return (unsigned LUA_INTEGER)v;
 +}
 +#endif
-diff --git a/src/lnum_config.h b/src/lnum_config.h
-index 19d7a4231a49..1092eead6629 100644
 --- a/src/lnum_config.h
 +++ b/src/lnum_config.h
 @@ -141,7 +141,12 @@
@@ -43,6 +39,3 @@ index 19d7a4231a49..1092eead6629 100644
  #endif
  #ifndef LUA_INTEGER_MIN
  # define LUA_INTEGER_MIN (-LUA_INTEGER_MAX -1)  /* -2^16|32 */
--- 
-1.9.1
-
diff --git a/package/utils/lua/patches/400-CVE-2014-5461.patch b/package/utils/lua/patches/400-CVE-2014-5461.patch
new file mode 100644
index 0000000000..cce73ff96b
--- /dev/null
+++ b/package/utils/lua/patches/400-CVE-2014-5461.patch
@@ -0,0 +1,19 @@
+From: Enrico Tassi <gareuselesinge at debian.org>
+Date: Tue, 26 Aug 2014 16:20:55 +0200
+Subject: Fix stack overflow in vararg functions
+
+---
+ src/ldo.c | 2 +-
+ 1 file changed, 1 insertion(+), 1 deletion(-)
+
+--- a/src/ldo.c
++++ b/src/ldo.c
+@@ -274,7 +274,7 @@ int luaD_precall (lua_State *L, StkId fu
+     CallInfo *ci;
+     StkId st, base;
+     Proto *p = cl->p;
+-    luaD_checkstack(L, p->maxstacksize);
++    luaD_checkstack(L, p->maxstacksize + p->numparams);
+     func = restorestack(L, funcr);
+     if (!p->is_vararg) {  /* no varargs? */
+       base = func + 1;



